Browse Source

Don't use -latest in stacks-blockchain-api URLs

fix-rpc-references
CharlieC3 4 years ago
committed by Alexander Graebe
parent
commit
facbb831d4
  1. 6
      src/pages/stacks-blockchain/accounts.md
  2. 2
      src/pages/stacks-blockchain/managing-accounts.md
  3. 8
      src/pages/stacks-blockchain/network.md
  4. 2
      src/pages/stacks-blockchain/sending-tokens.md
  5. 10
      src/pages/stacks-blockchain/transactions.md

6
src/pages/stacks-blockchain/accounts.md

@ -91,7 +91,7 @@ const stacksAddress = getAddressFromPrivateKey(
STX balance and nonce can be obtained through the [`GET /v2/accounts/<stx_address>`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_account_info) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/v2/accounts/<stx_address>'
curl 'https://stacks-node-api.krypton.blockstack.xyz/v2/accounts/<stx_address>'
```
Sample response:
@ -110,7 +110,7 @@ Sample response:
All token balances can be obtained through the [`GET /extended/v1/address/<stx_address>/balances`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_account_balance) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/extended/v1/address/<stx_address>/balances'
curl 'https://stacks-node-api.krypton.blockstack.xyz/extended/v1/address/<stx_address>/balances'
```
Sample response:
@ -134,7 +134,7 @@ Sample response:
All asset events associated with the account can be obtained through the [`GET /extended/v1/address/<stx_address>/assets`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_account_balance) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/extended/v1/address/<stx_address>/assets'
curl 'https://stacks-node-api.krypton.blockstack.xyz/extended/v1/address/<stx_address>/assets'
```
Sample response:

2
src/pages/stacks-blockchain/managing-accounts.md

@ -56,7 +56,7 @@ const { AccountsApi, FaucetsApi, Configuration } = require('@stacks/blockchain-a
const apiConfig = new Configuration({
fetchApi: fetch,
basePath: 'https://stacks-node-api-latest.krypton.blockstack.xyz',
basePath: 'https://stacks-node-api.krypton.blockstack.xyz',
});
const privateKey = makeRandomPrivKey();

8
src/pages/stacks-blockchain/network.md

@ -16,7 +16,7 @@ Fees are used to incentivize miners to confirm transactions on the Stacks 2.0 bl
Fee estimates can obtained through the [`GET /v2/fees/transfer`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_fee_transfer) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/v2/fees/transfer'
curl 'https://stacks-node-api.krypton.blockstack.xyz/v2/fees/transfer'
```
The API will respond with the fee rate (as integer):
@ -52,7 +52,7 @@ The time to mine a block, to confirm transactions, will eventually match the exp
The block time is hardcoded and will change throughout the implementation phases of the [testnet](/stacks-blockchain/testnet). The current block time can be obtained through the [`GET /extended/v1/info/network_block_times`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_network_block_times) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/extended/v1/info/network_block_times'
curl 'https://stacks-node-api.krypton.blockstack.xyz/extended/v1/info/network_block_times'
```
The API will respond with the block time (in seconds):
@ -79,7 +79,7 @@ However, for read-only function calls, transactions are **not** required. Instea
A read-only contract call can be done using the [`POST /v2/contracts/call-read/<stx_address>/<contract_name>/<function_name>`](https://blockstack.github.io/stacks-blockchain-api/#operation/call_read_only_function) endpoint:
```bash
curl --location --request POST 'https://stacks-node-api-latest.krypton.blockstack.xyz/v2/contracts/call-read/<stx_address>/<contract_name>/<function_name>' \
curl --location --request POST 'https://stacks-node-api.krypton.blockstack.xyz/v2/contracts/call-read/<stx_address>/<contract_name>/<function_name>' \
--header 'Content-Type: application/json' \
--data-raw '{
"sender": "<stx_address>.<contract_name>",
@ -155,7 +155,7 @@ The easiest way of identifying the health is by looking at the `blockRateStatus`
The network information can be obtained using the [`GET /v2/info`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_core_api_info) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/v2/info'
curl 'https://stacks-node-api.krypton.blockstack.xyz/v2/info'
```
Sample response:

2
src/pages/stacks-blockchain/sending-tokens.md

@ -65,7 +65,7 @@ const { TransactionsApi, Configuration } = require('@stacks/blockchain-api-clien
const apiConfig = new Configuration({
fetchApi: fetch,
basePath: 'https://stacks-node-api-latest.krypton.blockstack.xyz',
basePath: 'https://stacks-node-api.krypton.blockstack.xyz',
});
const key = 'edf9aee84d9b7abc145504dde6726c64f369d37ee34ded868fabd876c26570bc01';

10
src/pages/stacks-blockchain/transactions.md

@ -381,7 +381,7 @@ A sponsored transaction is one where a second signer sets and pays the transacti
With a serialized transaction in the [raw format](#raw-format), it can be broadcasted to the network using the [`POST /v2/transactions`](https://blockstack.github.io/stacks-blockchain-api/#operation/post_core_node_transactions) endpoint:
```bash
curl --location --request POST 'https://stacks-node-api-latest.krypton.blockstack.xyz/v2/transactions' \
curl --location --request POST 'https://stacks-node-api.krypton.blockstack.xyz/v2/transactions' \
--header 'Content-Type: text/plain' \
--data-raw '<tx_raw_format>'
```
@ -408,7 +408,7 @@ For convenience, a Postman Collection was created and published: [![Run in Postm
Recent transactions can be obtained through the [`GET /extended/v1/tx`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_transaction_list) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/extended/v1/tx'
curl 'https://stacks-node-api.krypton.blockstack.xyz/extended/v1/tx'
```
Sample response:
@ -445,7 +445,7 @@ Sample response:
Mempool (registered, but not processed) transactions can be obtained using the [`GET /extended/v1/tx/mempool`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_mempool_transaction_list) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/extended/v1/tx/mempool'
curl 'https://stacks-node-api.krypton.blockstack.xyz/extended/v1/tx/mempool'
```
Sample response:
@ -483,7 +483,7 @@ Sample response:
Recent transactions can be filtered by [transaction type](/stacks-blockchain/transactions#types) using the `type` query parameter:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/extended/v1/tx/?type=contract_call'
curl 'https://stacks-node-api.krypton.blockstack.xyz/extended/v1/tx/?type=contract_call'
```
### Get transaction by ID
@ -491,7 +491,7 @@ curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/extended/v1/tx/?type
A specific transaction can be obtained using the [`GET /extended/v1/tx/<tx_id>`](https://blockstack.github.io/stacks-blockchain-api/#operation/get_transaction_by_id) endpoint:
```bash
curl 'https://stacks-node-api-latest.krypton.blockstack.xyz/extended/v1/tx/<tx_id>'
curl 'https://stacks-node-api.krypton.blockstack.xyz/extended/v1/tx/<tx_id>'
```
Sample response:

Loading…
Cancel
Save