Skip to content

Commit

Permalink
Clarify API in plugins (neo-project#829)
Browse files Browse the repository at this point in the history
Clarify a number of APIs are provided by plugins
  • Loading branch information
Celia18305 committed Jun 10, 2019
1 parent fcf1171 commit 15c13c1
Show file tree
Hide file tree
Showing 44 changed files with 270 additions and 170 deletions.
3 changes: 2 additions & 1 deletion en-us/node/cli/latest-version/api/claimgas.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Claims GAS in the wallet.

> [!Note]
>
> Before you can invoke this method you must open the wallet in NEO-CLI.
> - Before you can invoke this method you must open the wallet in NEO-CLI.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
4 changes: 3 additions & 1 deletion en-us/node/cli/latest-version/api/dumpprivkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Exports the private key of the specified address.

> [!Note]
> You need to open the wallet in the NEO-CLI node before you execute this command.
>
> - You need to open the wallet in the NEO-CLI node before you execute this command.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
72 changes: 72 additions & 0 deletions en-us/node/cli/latest-version/api/getapplicationlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# getapplicationlog method

Returns the contract log based on the specified txid. The complete contract logs are stored under the ApplicationLogs directory.

> [!Note]
>
> This method is provided by the plugin [ApplicationLogs](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

txid:Transaction ID

## Example

Request body:

```json
{
"jsonrpc": "2.0",
"method": "getapplicationlog",
"params": ["b6377ca56ff74ea5416469094f56ab7abd6caa46c0b5eb16b9c1998b567ff1e3"],
"id": 1
}
```

Response body:

```
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"txid": "0xb6377ca56ff74ea5416469094f56ab7abd6caa46c0b5eb16b9c1998b567ff1e3",
"executions": [
{
"trigger": "Application",
"contract": "0x23c3aaaa31a0c373c23505157e9fb2665c7065ec",
"vmstate": "HALT",
"gas_consumed": "2.931",
"stack": [],
"notifications": [
{
"contract": "0x1578103c13e39df15d0d29826d957e85d770d8c9",
"state": {
"type": "Array",
"value": [
{
"type": "ByteArray",
"value": "7472616e73666572"
},
{
"type": "ByteArray",
"value": "235a717ed7ed18a43de47499c3d05b8d4a4bcf3a"
},
{
"type": "ByteArray",
"value": "0b2f7cac1d57b9f535d35da1a5421015e4e32b19"
},
{
"type": "ByteArray",
"value": "00f44a4f9df66d01"
}
]
}
}
]
}
]
}
}
```

4 changes: 3 additions & 1 deletion en-us/node/cli/latest-version/api/getbalance.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Returns the balance of the corresponding asset in the wallet, based on the specified asset number. This method applies to global assets and the contract assets that conform to NEP-5 standards.

> [!Note]
> You need to open the wallet in the NEO-CLI node before you execute this command.
>
> - You need to open the wallet in the NEO-CLI node before you execute this command.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
4 changes: 4 additions & 0 deletions en-us/node/cli/latest-version/api/getclaimable.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Returns claimable GAS information of the specified address.

> [!Note]
>
> This method is provided by the plugin [RpcSystemAssetTracker](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameters Description

`address`:Specifiies the address you want to query.
Expand Down
4 changes: 4 additions & 0 deletions en-us/node/cli/latest-version/api/getmetricblocktimestamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Returns timestamps of the specified block and its previous n blocks.

> [!Note]
>
> This method is provided by the plugin [CoreMetrics](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

`blocks numbers`:Set the number of blocks you want to query forward.
Expand Down
4 changes: 4 additions & 0 deletions en-us/node/cli/latest-version/api/getnep5balances.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Returns the balance of all NEP-5 assets in the specified address.

> [!Note]
>
> This method is provided by the plugin [RpcNep5Tracker](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

address:The address that you want to query balance.
Expand Down
4 changes: 4 additions & 0 deletions en-us/node/cli/latest-version/api/getnep5transfers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Returns all the NEP-5 transaction information occurred in the specified address.

> [!Note]
>
> This method is provided by the plugin [RpcNep5Tracker](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

address:The address to query the transaction information.
Expand Down
4 changes: 3 additions & 1 deletion en-us/node/cli/latest-version/api/getnewaddress.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Creates a new address.

> [!Note]
> You need to open the wallet in the NEO-CLI node before you execute this command.
>
> - You need to open the wallet in the NEO-CLI node before you execute this command.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Example

Expand Down
4 changes: 4 additions & 0 deletions en-us/node/cli/latest-version/api/getunclaimed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Returns unclaimed GAS amount of the specified address.

> [!Note]
>
> This method is provided by the plugin [RpcSystemAssetTracker](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

`address`:Set the standard address you want to query.
Expand Down
3 changes: 2 additions & 1 deletion en-us/node/cli/latest-version/api/getunclaimedgas.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Gets the amount of unclaimed GAS in the wallet.

> [!Note]
>
> Before you can invoke this method you must open the wallet in NEO-CLI.
> - Before you can invoke this method you must open the wallet in NEO-CLI.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Example

Expand Down
4 changes: 4 additions & 0 deletions en-us/node/cli/latest-version/api/getunspents.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Returns information of the unspent UTXO assets (e.g. NEO, GAS) at the specified address.

> [!Note]
>
> This method is provided by the plugin [RpcSystemAssetTracker](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

`address`:Set the standard address you want to query.
Expand Down
4 changes: 4 additions & 0 deletions en-us/node/cli/latest-version/api/getwalletheight.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Obtains the current wallet index height.

> [!Note]
>
> This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Example

Request body:
Expand Down
3 changes: 2 additions & 1 deletion en-us/node/cli/latest-version/api/importprivkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Imports the private key to the wallet.

> [!Note]
>
> Before you can invoke this method you must open the wallet in NEO-CLI.
> - Before you can invoke this method you must open the wallet in NEO-CLI.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
3 changes: 2 additions & 1 deletion en-us/node/cli/latest-version/api/invoke.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Returns the result after calling a smart contract at scripthash with the given p

> [!Note]
>
> This method is to test your VM script as if they were ran on the blockchain at that point in time. This RPC call does not affect the blockchain in any way.
> - This method is to test your VM script as if they were ran on the blockchain at that point in time. This RPC call does not affect the blockchain in any way.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
3 changes: 2 additions & 1 deletion en-us/node/cli/latest-version/api/invokefunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Returns the result after calling a smart contract at scripthash with the given o

> [!Note]
>
> This method is to test your VM script as if they were ran on the blockchain at that point in time. This RPC call does not affect the blockchain in any way.
> - This method is to test your VM script as if they were ran on the blockchain at that point in time. This RPC call does not affect the blockchain in any way.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
3 changes: 2 additions & 1 deletion en-us/node/cli/latest-version/api/invokescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Returns the result after passing a script through the VM.

> [!Note]
>
> This method is to test your VM script as if they were ran on the blockchain at that point in time. This RPC call does not affect the blockchain in any way.
> - This method is to test your VM script as if they were ran on the blockchain at that point in time. This RPC call does not affect the blockchain in any way.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
4 changes: 3 additions & 1 deletion en-us/node/cli/latest-version/api/listaddress.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Lists all the addresses in the current wallet.

> [!Note]
> You need to open the wallet in the NEO-CLI node before invoking this method.
>
> - You need to open the wallet in the NEO-CLI node before invoking this method.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Example

Expand Down
4 changes: 3 additions & 1 deletion en-us/node/cli/latest-version/api/sendfrom.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Transfer from the specified address to the destination address.

> [!Note]
> You need to open the wallet in the NEO-CLI node before executing this command.
>
> - You need to open the wallet in the NEO-CLI node before executing this command.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
4 changes: 3 additions & 1 deletion en-us/node/cli/latest-version/api/sendmany.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Bulk transfer order, and you can specify a change address.

> [!Note]
> You need to open the wallet in the NEO-CLI node before executing this command.
>
> - You need to open the wallet in the NEO-CLI node before executing this command.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
4 changes: 3 additions & 1 deletion en-us/node/cli/latest-version/api/sendtoaddress.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
Transfers to the specified address.

> [!Note]
> You need to open the wallet in the Neo-CLI node before you execute this command.
>
> - You need to open the wallet in the Neo-CLI node before you execute this command.
> - This method is provided by the plugin [RpcWallet](https://github.com/neo-project/neo-plugins/releases). You need to install the plugin before you can invoke the method.
## Parameter Description

Expand Down
71 changes: 0 additions & 71 deletions en-us/node/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,74 +20,3 @@ To install the plug-in, create a new **Plugins** folder (The first letter is cap

![plugins.png](../../assets/plugins.png)

## API methods

### getapplicationlog method

Returns the contract log based on the specified txid. The complete contract logs are stored under the ApplicationLogs directory.

This method is provided by the [ApplicationLogs](https://github.com/neo-project/neo-plugins/releases/download/v2.9.2/ApplicationLogs.zip) plugin. You need to install the plugin before invoking the method.

#### Parameter Description

txid:Transaction ID

#### Example

Request body:

```json
{
"jsonrpc": "2.0",
"method": "getapplicationlog",
"params": ["b6377ca56ff74ea5416469094f56ab7abd6caa46c0b5eb16b9c1998b567ff1e3"],
"id": 1
}
```

Response body:

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"txid": "0xb6377ca56ff74ea5416469094f56ab7abd6caa46c0b5eb16b9c1998b567ff1e3",
"executions": [
{
"trigger": "Application",
"contract": "0x23c3aaaa31a0c373c23505157e9fb2665c7065ec",
"vmstate": "HALT",
"gas_consumed": "2.931",
"stack": [],
"notifications": [
{
"contract": "0x1578103c13e39df15d0d29826d957e85d770d8c9",
"state": {
"type": "Array",
"value": [
{
"type": "ByteArray",
"value": "7472616e73666572"
},
{
"type": "ByteArray",
"value": "235a717ed7ed18a43de47499c3d05b8d4a4bcf3a"
},
{
"type": "ByteArray",
"value": "0b2f7cac1d57b9f535d35da1a5421015e4e32b19"
},
{
"type": "ByteArray",
"value": "00f44a4f9df66d01"
}
]
}
}
]
}
]
}
}
```
4 changes: 3 additions & 1 deletion zh-cn/node/cli/latest-version/api/claimgas.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
提取钱包中的 GAS。

> [!Note]
> 执行此命令前需要在 NEO-CLI 节点中打开钱包。
>
> - 执行此命令前需要在 NEO-CLI 节点中打开钱包。
> - 此方法由插件提供,需要安装 [RpcWallet](https://github.com/neo-project/neo-plugins/releases) 插件才可以调用。
## 参数说明

Expand Down
4 changes: 3 additions & 1 deletion zh-cn/node/cli/latest-version/api/dumpprivkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
导出指定地址的私钥。

> [!Note]
> 执行此命令前需要在 Neo-CLI 节点中打开钱包。
>
> - 执行此命令前需要在 Neo-CLI 节点中打开钱包。
> - 此方法由插件提供,需要安装 [RpcWallet](https://github.com/neo-project/neo-plugins/releases) 插件才可以调用。
## 参数说明

Expand Down
Loading

0 comments on commit 15c13c1

Please sign in to comment.