Browse Source

docs: rename API/client fields

follow up on https://github.com/blockstack/stacks-blockchain-api/pull/266/
feat/stacks-js-updates
Alexander Graebe 4 years ago
parent
commit
dd6441ebeb
  1. 8
      src/pages/references/stacks-blockchain-api.md
  2. 2
      src/pages/smart-contracts/testing-contracts.md
  3. 4
      src/pages/stacks-blockchain/integrate-stacking.md

8
src/pages/references/stacks-blockchain-api.md

@ -22,11 +22,11 @@ The Stacks 2.0 Blockchain API is centrally-hosted. However, every running Stacks
While the Node RPC API doesn't give the same functionality as the hosted Stacks 2.0 Blockchain API, you get similar functionality in a way that is scoped to that specific node. The RPC API includes the following endpoints:
- [POST /v2/transactions](https://blockstack.github.io/stacks-blockchain-api/#operation/post_core_node_transactions)
- [GET /v2/contracts/interface/{stacks_address}/{contract_name}](https://blockstack.github.io/stacks-blockchain-api/#operation/get_contract_interface)
- [POST /v2/map_entry/{stacks_address}/{contract_name}/{map_name}](https://blockstack.github.io/stacks-blockchain-api/#operation/get_contract_data_map_entry)
- [GET /v2/contracts/source/{stacks_address}/{contract_name}](https://blockstack.github.io/stacks-blockchain-api/#operation/get_contract_source)
- [GET /v2/contracts/interface/{contract_address}/{contract_name}](https://blockstack.github.io/stacks-blockchain-api/#operation/get_contract_interface)
- [POST /v2/map_entry/{contract_address}/{contract_name}/{map_name}](https://blockstack.github.io/stacks-blockchain-api/#operation/get_contract_data_map_entry)
- [GET /v2/contracts/source/{contract_address}/{contract_name}](https://blockstack.github.io/stacks-blockchain-api/#operation/get_contract_source)
- [GET /v2/accounts/{principal}](https://blockstack.github.io/stacks-blockchain-api/#operation/get_account_info)
- [POST /v2/contracts/call-read/{stacks_address}/{contract_name}/{function_name}](https://blockstack.github.io/stacks-blockchain-api/#operation/call_read_only_function)
- [POST /v2/contracts/call-read/{contract_address}/{contract_name}/{function_name}](https://blockstack.github.io/stacks-blockchain-api/#operation/call_read_only_function)
- [GET /v2/fees/transfer](https://blockstack.github.io/stacks-blockchain-api/#operation/get_fee_transfer)
- [GET /v2/info](https://blockstack.github.io/stacks-blockchain-api/#operation/get_core_api_info)

2
src/pages/smart-contracts/testing-contracts.md

@ -97,7 +97,7 @@ provider = await ProviderRegistry.createProvider();
helloWorldClient = new Client("SP3GWX3NE58KXHESRYE4DYQ1S31PQJTCRXB3PE9SB.hello-world", "hello-world", provider);
```
Take a look at the client initialization. It requires a contract id and name in the following format: `{owner_stacks_address}.{contract_identifier}`. The second field indicates the location of the smart contract file, without the `.clar` suffix. By default, the location is assumed to be relative to the `contracts` folder.
Take a look at the client initialization. It requires a contract id and name in the following format: `{contract_address}.{contract_identifier}`. The second field indicates the location of the smart contract file, without the `.clar` suffix. By default, the location is assumed to be relative to the `contracts` folder.
As you can see above, a sample Stacks address and contract identifier is already provided for you. You don't need to modify anything.

4
src/pages/stacks-blockchain/integrate-stacking.md

@ -209,7 +209,7 @@ const smartContracts = new SmartContractsApi(apiConfig);
// read-only contract call
const isEligible = await smartContracts.callReadOnlyFunction({
stacksAddress: poxInfo.contract_id.split('.')[0],
contractAddress: poxInfo.contract_id.split('.')[0],
contractName: poxInfo.contract_id.split('.')[1],
functionName: 'can-stack-stx',
readOnlyFunctionArgs: {
@ -321,7 +321,7 @@ const contractName = poxInfo.contract_id.split('.')[1];
const functionName = 'get-stacker-info';
const stackingInfo = await smartContracts.callReadOnlyFunction({
stacksAddress: contractAddress,
contractAddress,
contractName,
functionName,
readOnlyFunctionArgs: {

Loading…
Cancel
Save