diff --git a/docs/faq/basic.md b/docs/faq/basic.md index b957309..fd8fe3c 100644 --- a/docs/faq/basic.md +++ b/docs/faq/basic.md @@ -52,7 +52,7 @@ Since each new block is require to pass majority consensus, forks may not occur. Neo consensus nodes are elected by NEO holders. The network itself is permissionless; anyone may register as a candidate or cast a vote for a candidate. Candidates with a sufficient share of the total number of votes are elected as Neo Council members. The top 7 of these 21 Council members are the network's consensus (validator) nodes. -For more information, visit the following [link](https://docs.neo.org/docs/en-us/basic/consensus/vote_validator.html). +For more information, visit the following [link](../n3/foundation/consensus/vote_validator.md). ## How do I check the status of my transaction? diff --git a/docs/n3/foundation/Wallets.md b/docs/n3/foundation/Wallets.md index cf3eab8..6a16113 100644 --- a/docs/n3/foundation/Wallets.md +++ b/docs/n3/foundation/Wallets.md @@ -369,7 +369,7 @@ Example: The full-node wallet is a complete backup of blockchain data, which saves all the onchain data and participates in p2p network, therefore it needs a large storage space. -Neo-CLI and Neo-GUI are all full-node wallet. For more information refer to [Neo node](../../node/introduction.md). +Neo-CLI and Neo-GUI are all full-node wallet. For more information refer to [Neo node](../node/introduction.md). ### SPV wallet diff --git a/docs/n3/reference/rpc/api.md b/docs/n3/reference/rpc/api.md index 5dea8c4..87b676f 100644 --- a/docs/n3/reference/rpc/api.md +++ b/docs/n3/reference/rpc/api.md @@ -2,7 +2,7 @@ Each NEO-CLI node provides an API interface for obtaining blockchain data from it, making it easy to develop blockchain applications. The interface is provided via [JSON-RPC](http://wiki.geekdream.com/Specification/json-rpc_2.0.html), and the underlying protocol uses HTTP/HTTPS for communication. -To start a node that provides an RPC service, you must install the plugin [RpcServer](https://github.com/neo-project/neo-modules/releases). Refer to [Installing plugins](../../../node/cli/config#installing-plugins) for instructions. No need to add an argument when starting Neo-CLI. +To start a node that provides an RPC service, you must install the plugin [RpcServer](https://github.com/neo-project/neo-modules/releases). Refer to [Installing plugins](../../node/cli/config#installing-plugins) for instructions. No need to add an argument when starting Neo-CLI. :::note @@ -29,92 +29,92 @@ You can modify the port in config.json in the RpcServer folder. | Method | Parameter | Description | | --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ | -| [getbestblockhash](api/getbestblockhash.md) | | Gets the hash of the latest block in the blockchain. | -| [getblock](api/getblock.md) | [verbose=0] | Returns the block information with the specified hash value or index. | -| [getblockcount](api/getblockcount.md) | | Gets the block count of the blockchain. | -| [getblockhash](api/getblockhash.md) | | Returns the block hash with the specified index. | -| [getblockheader](api/getblockheader.md) | [verbose=0] | Returns the information of the block header with the specified script hash or index. | -| [getcommittee](api/getcommittee.md) | | Gets the public key list of current Neo committee members. | -| [getnativecontracts](api/getnativecontracts.md) | | Gets the list of native contracts. | -| [getnextblockvalidators](api/getnextblockvalidators.md) | | Gets the validators list of the next block. | -| [getcontractstate](api/getcontractstate.md) | | Returns information of the contract with the specified script hash. | -| [getrawmempool](api/getrawmempool.md) | [shouldGetUnverified=0] | Gets a list of confirmed transactions in memory. If the value is 1 it gets all the transactions including both confirmed and unconfirmed transactions. | -| [getrawtransaction](api/getrawtransaction.md) | [verbose=0] | Returns the transaction information with the specified hash value. | -| [getstorage](api/getstorage.md) | | Returns the value with the contract script hash and the key. | -| [gettransactionheight](api/gettransactionheight.md) | | Returns the transaction height with the specified transaction hash. | -| [findStorage](api/findStorage.md) | \ | Finds storage items by contract ID or script hash and prefix. | +| [getbestblockhash](getbestblockhash.md) | | Gets the hash of the latest block in the blockchain. | +| [getblock](getblock.md) | [verbose=0] | Returns the block information with the specified hash value or index. | +| [getblockcount](getblockcount.md) | | Gets the block count of the blockchain. | +| [getblockhash](getblockhash.md) | | Returns the block hash with the specified index. | +| [getblockheader](getblockheader.md) | [verbose=0] | Returns the information of the block header with the specified script hash or index. | +| [getcommittee](getcommittee.md) | | Gets the public key list of current Neo committee members. | +| [getnativecontracts](getnativecontracts.md) | | Gets the list of native contracts. | +| [getnextblockvalidators](getnextblockvalidators.md) | | Gets the validators list of the next block. | +| [getcontractstate](getcontractstate.md) | | Returns information of the contract with the specified script hash. | +| [getrawmempool](getrawmempool.md) | [shouldGetUnverified=0] | Gets a list of confirmed transactions in memory. If the value is 1 it gets all the transactions including both confirmed and unconfirmed transactions. | +| [getrawtransaction](getrawtransaction.md) | [verbose=0] | Returns the transaction information with the specified hash value. | +| [getstorage](getstorage.md) | | Returns the value with the contract script hash and the key. | +| [gettransactionheight](gettransactionheight.md) | | Returns the transaction height with the specified transaction hash. | +| [findStorage](findStorage.md) | \ | Finds storage items by contract ID or script hash and prefix. | ### Node | Method | Parameter | Description | | --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ | -| [getconnectioncount](api/getconnectioncount.md) | | Gets the current connection count of the node. | -| [getpeers](api/getpeers.md) | | Gets a list of nodes that are currently connected/disconnected by this node. | -| [getversion](api/getversion.md) | | Gets the version information of the node. | -| [sendrawtransaction](api/sendrawtransaction.md) | | Broadcasts a transaction over the network. | -| [submitblock](api/submitblock.md) | | Submits a new block to the network.
**Note**: Need to be a validator | +| [getconnectioncount](getconnectioncount.md) | | Gets the current connection count of the node. | +| [getpeers](getpeers.md) | | Gets a list of nodes that are currently connected/disconnected by this node. | +| [getversion](getversion.md) | | Gets the version information of the node. | +| [sendrawtransaction](sendrawtransaction.md) | | Broadcasts a transaction over the network. | +| [submitblock](submitblock.md) | | Submits a new block to the network.
**Note**: Need to be a validator | ### Smart Contract | Method | Parameter | Description | | --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ | -| [getunclaimedgas](api/getunclaimedgas.md) | | Get unclaimed gas of the specified address. | -| [invokefunction](api/invokefunction.md) | \[params] \[sender] \[signers] | Invokes a smart contract with the specified script hash, passing in the method name and its params. | -| [invokescript](api/invokescript.md) | \[sender] \[signers] | Runs a script through the virtual machine and returns the results. | -| [traverseiterator](api/traverseiterator.md) | `` `` `` | Gets the Iterator type data. | +| [getunclaimedgas](getunclaimedgas.md) | | Get unclaimed gas of the specified address. | +| [invokefunction](invokefunction.md) | \[params] \[sender] \[signers] | Invokes a smart contract with the specified script hash, passing in the method name and its params. | +| [invokescript](invokescript.md) | \[sender] \[signers] | Runs a script through the virtual machine and returns the results. | +| [traverseiterator](traverseiterator.md) | `` `` `` | Gets the Iterator type data. | ### Tool | Method | Parameter | Description | | --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ | -| [listplugins](api/listplugins.md) | | Returns a list of plugins loaded by the node. | -| [validateaddress](api/validateaddress.md) | | Verifies whether the address is a valid NEO address. | +| [listplugins](listplugins.md) | | Returns a list of plugins loaded by the node. | +| [validateaddress](validateaddress.md) | | Verifies whether the address is a valid NEO address. | ### Wallet | Method | Parameter | Description | | --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ | -| [calculatenetworkfee](api/calculatenetworkfee.md) | | Calculates network fee for the specified transaction. | -| [closewallet](api/closewallet.md) | | Closes the current wallet. | -| [dumpprivkey](api/dumpprivkey.md) | | Exports the private key of the specified address. | -| [getnewaddress](api/getnewaddress.md) | | Creates a new address. | -| [getwalletbalance](api/getwalletbalance.md) | | Returns the balance of the corresponding asset in the wallet. | -| [getwalletunclaimedgas](api/getwalletunclaimedgas.md) | | Gets the amount of unclaimed GAS in the wallet. | -| [importprivkey](api/importprivkey.md) | | Imports the private key to the wallet. | -| [invokecontractverify](api/invokecontractverify.md) | \[params] \[signers] | Invokes the verification method of contract. | -| [listaddress](api/listaddress.md) | | Lists all the addresses in the current wallet. | -| [openwallet](api/openwallet.md) | | Opens the specified wallet. | -| [sendfrom](api/sendfrom.md) | | Transfers from the specified address to the destination address. | -| [sendmany](api/sendmany.md) | \[signers] | Initiates multiple transfers to multiple addresses in a transaction. | -| [sendtoaddress](api/sendtoaddress.md) | \[signers] | Transfers to the specified address. | +| [calculatenetworkfee](calculatenetworkfee.md) | | Calculates network fee for the specified transaction. | +| [closewallet](closewallet.md) | | Closes the current wallet. | +| [dumpprivkey](dumpprivkey.md) | | Exports the private key of the specified address. | +| [getnewaddress](getnewaddress.md) | | Creates a new address. | +| [getwalletbalance](getwalletbalance.md) | | Returns the balance of the corresponding asset in the wallet. | +| [getwalletunclaimedgas](getwalletunclaimedgas.md) | | Gets the amount of unclaimed GAS in the wallet. | +| [importprivkey](importprivkey.md) | | Imports the private key to the wallet. | +| [invokecontractverify](invokecontractverify.md) | \[params] \[signers] | Invokes the verification method of contract. | +| [listaddress](listaddress.md) | | Lists all the addresses in the current wallet. | +| [openwallet](openwallet.md) | | Opens the specified wallet. | +| [sendfrom](sendfrom.md) | | Transfers from the specified address to the destination address. | +| [sendmany](sendmany.md) | \[signers] | Initiates multiple transfers to multiple addresses in a transaction. | +| [sendtoaddress](sendtoaddress.md) | \[signers] | Transfers to the specified address. | ### ApplicationLogs plugin | Method | Parameter | Description | | --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ | -| [getapplicationlog](api/getapplicationlog.md) | | Returns the contract event information based on the specified txid. | +| [getapplicationlog](getapplicationlog.md) | | Returns the contract event information based on the specified txid. | ### TokensTracker plugin | Method | Parameter | Description | | --------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------ | -| [getnep11balances](api/getnep11balances.md) | | Returns the balance of all NEP11 assets in the specified address. | -| [getnep11properties](api/getnep11properties.md) | | Returns the customized properties of NEP-11 assets. | -| [getnep11transfers](api/getnep17transfers.md) | [timestamp] | Returns all the NEP11 transaction information occurred in the specified address. | -| [getnep17balances](api/getnep17balances.md) | | Returns the balance of all NEP17 assets in the specified address. | -| [getnep17transfers](api/getnep17transfers.md) | [timestamp] | Returns all the NEP17 transaction information occurred in the specified address. | +| [getnep11balances](getnep11balances.md) | | Returns the balance of all NEP11 assets in the specified address. | +| [getnep11properties](getnep11properties.md) | | Returns the customized properties of NEP-11 assets. | +| [getnep11transfers](getnep17transfers.md) | [timestamp] | Returns all the NEP11 transaction information occurred in the specified address. | +| [getnep17balances](getnep17balances.md) | | Returns the balance of all NEP17 assets in the specified address. | +| [getnep17transfers](getnep17transfers.md) | [timestamp] | Returns all the NEP17 transaction information occurred in the specified address. | ### StateService plugin | Method | Parameter | Description | | --------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------ | -| [getstateroot](api/getstateroot.md) | | Queries the state root by the block height. | -| [getproof](api/getproof.md) | | Gets proof by querying root hash, contract hash, and storage key. | -| [verifyproof](api/verifyproof.md) | | Verifies using the root hash and proof, and gets the value of the storage corresponding to the key. | -| [getstateheight](api/getstateheight.md) | | Queries the stateroot height. | -| [getstate](api/getstate.md) | | Queries `state` with the `root hash`, `contract hash` and `storage key`. | -| [findstates](api/findstates.md) | [key] [count] | Queries `state` with the prefix of `root hash`, `contract hash` and `storage key`. | +| [getstateroot](getstateroot.md) | | Queries the state root by the block height. | +| [getproof](getproof.md) | | Gets proof by querying root hash, contract hash, and storage key. | +| [verifyproof](verifyproof.md) | | Verifies using the root hash and proof, and gets the value of the storage corresponding to the key. | +| [getstateheight](getstateheight.md) | | Queries the stateroot height. | +| [getstate](getstate.md) | | Queries `state` with the `root hash`, `contract hash` and `storage key`. | +| [findstates](findstates.md) | [key] [count] | Queries `state` with the prefix of `root hash`, `contract hash` and `storage key`. | :::note @@ -184,7 +184,7 @@ To make sure you get the latest result synchronize your client to the latest blo You can use the Chrome extension in Postman to facilitate the test (Installation of the Chrome extension requires Internet connection). A test screenshot is shown below: -![image](../../../assets/api_3.jpg) +![image](../../assets/api_3.jpg) ## See also diff --git a/docs/n3/reference/rpc/getwalletbalance.md b/docs/n3/reference/rpc/getwalletbalance.md index 7aa5815..e57548d 100644 --- a/docs/n3/reference/rpc/getwalletbalance.md +++ b/docs/n3/reference/rpc/getwalletbalance.md @@ -19,7 +19,7 @@ For example, NEO is 0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 Gas is 0xd2a4cff31913016155e38e474a2c06d08be276cf -You can query asset ID using the [CLI command](../../../../node/cli/cli.md) `list asset` or using the blockchain browser. +You can query asset ID using the [CLI command](../../node/cli/cli.md) `list asset` or using the blockchain browser. ## Example diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/faq/basic.md b/i18n/zh/docusaurus-plugin-content-docs/current/faq/basic.md index 85aa1fe..d0f13c8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/faq/basic.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/faq/basic.md @@ -30,7 +30,7 @@ Neo 使用 一种改进的拜占庭容错机制 (dBFT),可以对由 𝑛 ## 如何成为 Neo 的共识节点? 成为共识节点有什么激励吗? -Neo 的共识节点由 Neo 持有者投票选出。详细信息可参考 [这里](https://docs.neo.org/docs/zh-cn/basic/consensus/vote_validator.html);所有交易的网络费会作为奖励发给当前打包交易出块的共识节点。 +Neo 的共识节点由 Neo 持有者投票选出。详细信息可参考 [这里](../n3/foundation/consensus/vote_validator.md);所有交易的网络费会作为奖励发给当前打包交易出块的共识节点。 ## 有哪些 Neo 的区块链浏览器可以使用? @@ -46,7 +46,7 @@ NEP-17 标准是 Neo N3 的通证标准,它取代了以前的 NEP-5,表示 ## 如何在 Neo-CLI 中查看 NEP-17 资产? -想要看到 NEP-17 资产,需要使用 RPC 的 [getnep17balances](../../docs/zh-cn/reference/rpc/latest-version/api/getnep17balances.md) 方法或 Neo-CLI 的 [balanceof](../../docs/zh-cn/node/cli/cli.html#balanceof) 方法。 +想要看到 NEP-17 资产,需要使用 RPC 的 [getnep17balances](../n3/reference/rpc/getnep17balances.md) 方法或 Neo-CLI 的 [balanceof](../../docs/zh-cn/node/cli/cli.html#balanceof) 方法。 ## NEP-6 是什么? diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/faq/dev.md b/i18n/zh/docusaurus-plugin-content-docs/current/faq/dev.md index 1ee778a..8dd16d9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/faq/dev.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/faq/dev.md @@ -8,10 +8,8 @@ 要搭建私链,有以下方法可供选择: -- [单节点模式快速搭建](../../docs/zh-cn/develop/network/private-chain/solo.md) -- [在本地主机搭建私有链](../../docs/zh-cn/develop/network/private-chain/private-chain2.md) - -还可以参见 [社区文章](../../articles/zh-cn/index.md),学习更多私链搭建方法。 +- [单节点模式快速搭建](../n3/develop/network/private-chain/solo.md) +- [在本地主机搭建私有链](../n3/develop/network/private-chain/private-chain2.md) ## 可以使用哪些语言开发智能合约? diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/Advances/Oracles.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/Advances/Oracles.md index bbd0e30..4b69604 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/Advances/Oracles.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/Advances/Oracles.md @@ -4,7 +4,7 @@ Neo Oracle Service 是 Neo N3 内置的链外数据访问服务,它允许用户在智能合约中构建对外部数据源的访问请求,并由委员会指定的可信Oracle节点获取数据后,将其传入回调函数中继续执行相关智能合约逻辑。 -![img](https://docs.neo.org/docs/zh-cn/advanced/assets/oracle.png) +![img](assets/oracle.png) ## 关键机制 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/deploy/deploy.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/deploy/deploy.md index 1c2f465..124fb90 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/deploy/deploy.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/deploy/deploy.md @@ -14,7 +14,7 @@ 智能合约的部署是通过交易调用 API 来部署。通常的做法是通过 Neo-CLI 或 Neo-GUI 的智能合约发布功能来部署合约。 -部署智能合约以及调用智能合约均会产生费用,详情请参见 [系统手续费](../../reference/fees.md)。 +部署智能合约以及调用智能合约均会产生费用,详情请参见 [系统手续费](../../fees.md)。 ## 准备工作 在开始部署之前,请确认您已经完成以下工作: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/deploy/invoke.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/deploy/invoke.md index fd3434b..6611b51 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/deploy/invoke.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/deploy/invoke.md @@ -8,7 +8,7 @@ ### 使用 Neo-CLI 查询 -使用RPC API [getcontractstate 方法](../../reference/rpc/latest-version/api/getcontractstate.md) 查询合约详情。 +使用RPC API [getcontractstate 方法](../../reference/rpc/getcontractstate.md) 查询合约详情。 ### 使用 Neo-GUI 查询 @@ -31,7 +31,7 @@ Neo-GUI 中会更直观地显示合约信息,也能查看 manifest 和 nef 文 详情请参考 [invoke](../../node/cli/cli.md#invoke) 命令。 -- 使用 RPC API [invokefunction](../../reference/rpc/latest-version/api/invokefunction.md) 或 [invokescript](../../reference/rpc/latest-version/api/invokescript.md) 来调用合约。推荐使用 invokefunction 方法。 +- 使用 RPC API [invokefunction](../../reference/rpc/invokefunction.md) 或 [invokescript](../../reference/rpc/invokescript.md) 来调用合约。推荐使用 invokefunction 方法。 ### 使用 Neo-GUI 调用 @@ -105,13 +105,13 @@ public class Contract1 : SmartContract - method:被调用合约的方法,如 name 、 balanceOf 、 transfer 等,字符串类型。 -- flags:调用合约方法时允许的权限,参考 ([CallFlags 枚举](https://docs.neo.org/docs/zh-cn/reference/scapi/framework/services/CallFlags.html#%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E))。 +- flags:调用合约方法时允许的权限,参考 ([CallFlags 枚举](../../reference/scapi/framework/services/callflags.md))。 - params:被调用合约的方法的参数列表,数组类型。 ### 权限相关字段 -在合约的 Manifest 文件中定义了三个与权限相关的字段,参见下表。通过 Groups 和 Trusts 字段,钱包会根据合约之间是否可信,或者合约是否在同一组中来决定是否给用户安全警告。而 Permissions 和签名作用域决定了合约之间能否互相调用。关于签名作用域,请参考 [invokefunction 方法](../../reference/rpc/latest-version/api/invokefunction.md) 的参数说明。 +在合约的 Manifest 文件中定义了三个与权限相关的字段,参见下表。通过 Groups 和 Trusts 字段,钱包会根据合约之间是否可信,或者合约是否在同一组中来决定是否给用户安全警告。而 Permissions 和签名作用域决定了合约之间能否互相调用。关于签名作用域,请参考 [invokefunction 方法](../../reference/rpc/invokefunction.md) 的参数说明。 | 字段 | 类型 | 说明 | | ------------- | ----------------------------- | ------------------------------------------------------------ | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/write/basics.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/write/basics.md index 6c0bc9f..6bee9b9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/write/basics.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/develop/write/basics.md @@ -198,7 +198,7 @@ public class Contract1 : SmartContract `SupportedStandards` 表示合约符合的 NEP 标准,比如 `NEP-17` 是 Neo 上的代币标准。 -`ContractPermission` 表示合约申请的权限,`ContractTrust` 表示合约信任哪些合约调用自己。参考 [权限相关字段](../deploy/invoke.html#权限相关字段)。 +`ContractPermission` 表示合约申请的权限,`ContractTrust` 表示合约信任哪些合约调用自己。参考 [权限相关字段](../deploy/invoke.md#权限相关字段)。 也可以添加其它字段,如: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/client.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/client.md index af8150c..37250c0 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/client.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/client.md @@ -52,7 +52,7 @@ Neo-CLI 提供以下功能: 如果想启动节点的同时开启 RPC API,务必在部署节点时正确安装 RpcServer 插件。 - 要查看更多 API 信息,请参阅 [API 参考](../reference/rpc/latest-version/api.md)。 + 要查看更多 API 信息,请参阅 [API 参考](../reference/rpc/api.md)。 - 提供 NEP17 资产的交易信息。 @@ -79,7 +79,7 @@ Neo-CLI 钱包支持两种格式的钱包, sqlite 钱包(格式为.db3)和 - 用户第一次充值(NEO/GAS)时,程序动态创建 NEO 地址,优点:无需人工定期创建地址;缺点:不方便备份钱包。 - 要动态创建地址,可以使用 RpcServer API 的 [getnewaddress 方法](../reference/rpc/latest-version/api/getnewaddress.md) 实现。程序会返回创建的地址。 + 要动态创建地址,可以使用 RpcServer API 的 [getnewaddress 方法](../reference/rpc/getnewaddress.md) 实现。程序会返回创建的地址。 - 交易所提前创建一批 NEO 地址,并在用户第一次充值(NEO/GAS)时,给用户分配一个 NEO 地址。优点:方便备份钱包;缺点:当地址不足时需要人工创建 NEO 地址。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/deploynode.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/deploynode.md index 2ce9a74..60622b0 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/deploynode.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/deploynode.md @@ -12,7 +12,7 @@ sidebar_position: 1 ## 安装插件 -一些附加功能被独立封装在插件中用以调用,提升了节点的安全性,稳定性和灵活性。关于插件的详细信息,请参见 [安装插件](../node/cli/config.html/#安装插件)。 +一些附加功能被独立封装在插件中用以调用,提升了节点的安全性,稳定性和灵活性。关于插件的详细信息,请参见 [安装插件](../node/cli/config.md/#安装插件)。 交易所需要在[这里]( https://github.com/neo-project/neo-modules/releases/)下载安装以下插件,以保证 API 的正常使用和自动读取离线包的完整性: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/gas.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/gas.md index 077d979..536e4cb 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/gas.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/gas.md @@ -36,7 +36,7 @@ GAS(缩写符号 GAS)代表了 Neo 区块链的使用权。只要获得 NEO 快照间隔越短,计算越精确。如果快照时间间隔不均匀,可以采用加权平均算法。 :::note - 在 NEO N3 中,由于交易所用户无法参与投票,所以固定收益为计算提取的 GAS 总量的10%。具体可见[GAS 分配规则](https://docs.neo.org/docs/zh-cn/basic/governance.html#gas-%E5%88%86%E9%85%8D%E8%A7%84%E5%88%99)。 + 在 NEO N3 中,由于交易所用户无法参与投票,所以固定收益为计算提取的 GAS 总量的10%。具体可见[GAS 分配规则](../foundation/governance.md)。 ::: ## RPC 方法 @@ -45,7 +45,7 @@ GAS(缩写符号 GAS)代表了 Neo 区块链的使用权。只要获得 NEO | 方法 | 描述 | | ------------------------------------------------------------ | --------------------------------------- | -| [getunclaimedgas](../reference/rpc/latest-version/api/getunclaimedgas.md) | 显示当前钱包内所有地址生成的 GAS 数量。 | +| [getunclaimedgas](../reference/rpc/getunclaimedgas.md) | 显示当前钱包内所有地址生成的 GAS 数量。 | ## 交易所提取 GAS diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/transaction.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/transaction.md index 26f0b9d..e9261bd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/transaction.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/exchange/transaction.md @@ -24,7 +24,7 @@ NetworkFee = VerificationCost + tx.size * FeePerByte ## 系统费 -系统费是根据 NeoVM 要执行的指令计算得出的费用,有关每个操作指令的费用,请参考[系统费用](../reference/fees.md)。Neo N3 中取消了每笔交易 10 GAS 的免费额度,系统费用总额受合约脚本的指令数量和指令类型影响,计算公式如下: +系统费是根据 NeoVM 要执行的指令计算得出的费用,有关每个操作指令的费用,请参考[系统费用](../fees.md)。Neo N3 中取消了每笔交易 10 GAS 的免费额度,系统费用总额受合约脚本的指令数量和指令类型影响,计算公式如下: ``` SystemFee = InvocationCost = The sum of all executed opcode fee @@ -313,7 +313,7 @@ symbol ### 调用 getapplicationlog -使用 [getapplicationlog](../reference/rpc/latest-version/api/getapplicationlog.md) 这个 API 来获取交易信息。 +使用 [getapplicationlog](../reference/rpc/getapplicationlog.md) 这个 API 来获取交易信息。 正确安装 ApplicationLogs 插件并启动 Neo-CLI 节点后,可以看到在neo-cli 根目录下生成了一个 ApplicationLogs 文件夹,完整的合约日志会记录到该目录下,每笔 NEP-17 交易会记录在 leveldb 文件中,通过 API 来读取。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/foundation/governance.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/foundation/governance.md index ee8c4f8..1409ed9 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/foundation/governance.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/foundation/governance.md @@ -75,7 +75,7 @@ Neo N3 的委员会成员的数量为 21 个。每 21 个区块高度为一个 E ## 相关参考 -[治理 API](../reference/govapi/index.md) +[治理 API](../reference/governance_api/index.md) [Neo 治理页面](https://neo.org/gov) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/node/cli/config.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/node/cli/config.md index 595bcd0..6124e88 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/node/cli/config.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/node/cli/config.md @@ -103,17 +103,17 @@ Neo-CLI 在执行过程中会访问配置文件 `config.json`。启动 Neo-CLI |插件|描述|包含 API|| |--- |--- |--- |--- | -| ApplicationLogs | 同步智能合约和 NativeContract 的日志(Notify) | [getapplicationlog](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getapplicationlog.html) | 推荐 | +| ApplicationLogs | 同步智能合约和 NativeContract 的日志(Notify) | [getapplicationlog](../../reference/rpc/getapplicationlog.md) | 推荐 | | DBFTPlugin | dBFT 共识插件 | | 作为共识节点时必选 | | LevelDBStore | 区块链数据使用 LevelDB 存储引擎 | | 必选 | | MPTTrie | 使用 LevelDB 存储 MPT 数据 | | 作为 StateRoot 共识节点时必选 | | OracleService | Oracle 服务插件 | | 作为 Oracle 服务节点时必选 | | RocksDBStore | 区块链数据使用 RocksDBStore 存储引擎 | | 和 LevelDBStore 二选一 | -| RpcServer | 提供节点的 RPC 功能 | [RPC API](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api.html#命令列表) | 必选 | +| RpcServer | 提供节点的 RPC 功能 | [RPC API](../../reference/rpc/rpc.md#命令列表) | 必选 | | SQLiteWallet | 提供基于SQLite的.db3钱包功能 | | 可选 | | StatesDumper | 导出 Neo-CLI 状态数据 | | 可选 | -| StateService | StateRoot 共识服务插件 | [getstateroot](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getstateroot.html) [getproof](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getproof.html) [verifyproof](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/verifyproof.html) [getstateheight](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getstateheight.html) | 作为 StateRoot 共识节点时必选 | -| TokensTracker | 提供NEP-11、NEP-17余额及交易历史的RPC查询功能。 | [getnep11balances](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getnep11balances.html) [getnep11properties](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getnep11properties.html) [getnep11transfers](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getnep11transfers.html) [getnep17balances](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getnep17balances.html) [getnep17transfers](https://github.com/neo-project/docs/blob/cad14667651edfccad1eec508ab2af80889d6762/docs/zh-cn/reference/rpc/latest-version/api/getnep17transfers.html) | 推荐 | +| StateService | StateRoot 共识服务插件 | [getstateroot](../../reference/rpc/getstateroot.md) [getproof](../../reference/rpc/getproof.md) [verifyproof](../../reference/rpc/verifyproof.md) [getstateheight](../../reference/rpc/getstateheight.md) | 作为 StateRoot 共识节点时必选 | +| TokensTracker | 提供NEP-11、NEP-17余额及交易历史的RPC查询功能。 | [getnep11balances](../../reference/rpc/getnep11balances.md) [getnep11properties](../../reference/rpc/getnep11properties.md) [getnep11transfers](../../reference/rpc/getnep11transfers.md) [getnep17balances](../../reference/rpc/getnep17balances.md) [getnep17transfers](../../reference/rpc/getnep17transfers.md) | 推荐 | 安装插件有两种方式: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/node/gui/blockchain.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/node/gui/blockchain.md index 8f41d0b..cfb0b71 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/node/gui/blockchain.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/node/gui/blockchain.md @@ -4,7 +4,7 @@ ## 区块 -区块(Block)是区块链的最基本的单位,是一种逻辑结构。数据通过区块,永久记录在区块链网络上。关于区块的基本概念请参考 [区块 ](../../basic/concept/blockchain/block.md)。 +区块(Block)是区块链的最基本的单位,是一种逻辑结构。数据通过区块,永久记录在区块链网络上。关于区块的基本概念请参考 [区块 ](../../foundation/blocks.md)。 ### 查看区块列表 @@ -45,7 +45,7 @@ - **交易体**:显示交易的基本信息,如所在区块、大小、时间戳等,以及交易的转账记录和交易的见证人。 - **交易日志**:显示交易中智能合约的执行日志,包括 NEP-17 转账是否成功等信息。 -关于交易的基本概念请参考 [交易](../../basic/concept/transaction.md)。 +关于交易的基本概念请参考 [交易](../../foundation/transactions.md)。 ## 资产 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/reference/governance_api/index.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/reference/governance_api/index.md index 2c5f808..5c380d0 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/n3/reference/governance_api/index.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/reference/governance_api/index.md @@ -10,8 +10,8 @@ | 方法 | 参数 | 费用(GAS) | | ---- | ------------------------------------ | ---- | -| [`RegisterCandidate`](scapi/framework/native/Neo/RegisterCandidate.md) | ECPoint publicKey | 可调,初始0.00001 | -| [`UnregisterCandidate`](scapi/framework/native/Neo/UnregisterCandidate.md) | ECPoint publicKey | 0.00065536 (CpuFee) | +| [`RegisterCandidate`](../scapi/framework/native/Neo/RegisterCandidate.md) | ECPoint publicKey | 可调,初始0.00001 | +| [`UnregisterCandidate`](../scapi/framework/native/Neo/UnregisterCandidate.md) | ECPoint publicKey | 0.00065536 (CpuFee) | :::note 注册/注销候选人均需要验证候选人地址的签名,即只有候选人自己才能执行注册/注销操作。 @@ -25,13 +25,13 @@ | 方法 | 参数 | 费用(GAS) | | ---- | ------------------------------------ | ---- | -| [`Vote`](scapi/framework/native/Neo/Vote.md) | UInt160 account, byte[] voteTo | 0.00065536 (CpuFee) | +| [`Vote`](../scapi/framework/native/Neo/Vote.md) | UInt160 account, byte[] voteTo | 0.00065536 (CpuFee) | 由于账户NEO余额会随交易而不断变化,而且投票和注册的候选人也在不断变化,因此在每个区块都会根据以上变化更新候选人及相应投票结果。 | 方法 | 参数 | 费用(GAS) | | ---- | ------------------------------------ | ---- | -| [`GetCandidates`](scapi/framework/native/Neo/GetCandidates.md) | null | 0 | +| [`GetCandidates`](../scapi/framework/native/Neo/GetCandidates.md) | null | 0 | ## 委员会 @@ -72,13 +72,13 @@ | 方法 | 参数 | 费用(GAS) | 合约 | | ---- | ------------------------------------ | ---- | ---- | -| [`GetDesignatedByRole`](scapi/framework/native/RoleManagement/GetDesignatedByRole.md) | Role role, uint index | 0.00032768 (CpuFee) | RoleManagement | -| [`GetFeePerByte`](scapi/framework/native/Policy/GetFeePerByte.md) | null | 0.00032768 (CpuFee) | PolicyContract | +| [`GetDesignatedByRole`](../scapi/framework/native/RoleManagement/GetDesignatedByRole.md) | Role role, uint index | 0.00032768 (CpuFee) | RoleManagement | +| [`GetFeePerByte`](../scapi/framework/native/Policy/GetFeePerByte.md) | null | 0.00032768 (CpuFee) | PolicyContract | | GetExecFeeFactor | null | 0.00032768 (CpuFee) | PolicyContract | | GetStoragePrice | null | 0.00032768 (CpuFee) | PolicyContract | -| [`IsBlocked`](scapi/framework/native/Policy/IsBlocked.md) | UInt160 account | 0.00032768 (CpuFee) | PolicyContract | +| [`IsBlocked`](../scapi/framework/native/Policy/IsBlocked.md) | UInt160 account | 0.00032768 (CpuFee) | PolicyContract | | GetPrice | null | 0.00032768 (CpuFee) | OracleContract | -| [`GetGasPerBlock`](scapi/framework/native/Neo/GetGasPerBlock.md) | null | 0.00032768 (CpuFee) | NeoToken | +| [`GetGasPerBlock`](../scapi/framework/native/Neo/GetGasPerBlock.md) | null | 0.00032768 (CpuFee) | NeoToken | | GetRegisterPrice | null | 0.00032768 (CpuFee) | NeoToken | | GetMinimumDeploymentFee | null | 0.00032768 (CpuFee) | ContractManagement | @@ -90,7 +90,7 @@ | 方法 | 参数 | 费用(GAS) | 返回结果 | | ---- | ------------------------------------ | ---- | ---- | -| [`GetCommittee`](scapi/framework/native/Neo/GetCommittee.md) | null | 0.04194304 (CpuFee) | 返回当前委员会(`Array`) | +| [`GetCommittee`](../scapi/framework/native/Neo/GetCommittee.md) | null | 0.04194304 (CpuFee) | 返回当前委员会(`Array`) | ## 共识节点 @@ -104,7 +104,7 @@ | 方法 | 参数 | 费用(GAS) | 返回结果 | | ---- | ------------------------------------ | ---- | ---- | -| [`GetNextBlockValidators`](scapi/framework/native/Neo/GetNextBlockValidators.md) | null | 0.04194304 (CpuFee) | 返回下个块(正在持久化的块)的共识节点(`Array`) | +| [`GetNextBlockValidators`](../scapi/framework/native/Neo/GetNextBlockValidators.md) | null | 0.04194304 (CpuFee) | 返回下个块(正在持久化的块)的共识节点(`Array`) | ## Token分配 @@ -118,14 +118,14 @@ NEO及GAS均为[Nep17](https://github.com/neo-project/proposals/blob/master/nep- | 方法 | 参数 | 费用(GAS) | 作用 | | ---- | ------------------------------------ | ---- | ---- | -| [`symbol`](govapi/symbol.md) | null | 0 | 返回Token标志(String) | -| [`decimals`](govapi/decimals.md) | null | 0 | 返回Token精度(UInt) | -| [`TotalSupply`](scapi/framework/native/Neo/TotalSupply.md) | null | 0.00032768 (CpuFee) | 返回Token当前流通量(BigInteger) | -| [`BalanceOf`](scapi/framework/native/Neo/BalanceOf.md) | UInt160 account | 0.00032768 (CpuFee) | 返回该账户的余额(BigInteger) | -| [`Transfer`](scapi/framework/native/Neo/Transfer.md) | UInt160 from, UInt160 to, BigInteger amount | 0.00131072 (CpuFee) + 0.0000005 (StorageFee) | 将指定数额的Token从from转往to,注意这里需要校验from的签名,方法调用者是否为from,to是否能够收款,以及from余额是否充足 | +| symbol | null | 0 | 返回Token标志(String) | +| decimals | null | 0 | 返回Token精度(UInt) | +| [`TotalSupply`](../scapi/framework/native/Neo/TotalSupply.md) | null | 0.00032768 (CpuFee) | 返回Token当前流通量(BigInteger) | +| [`BalanceOf`](../scapi/framework/native/Neo/BalanceOf.md) | UInt160 account | 0.00032768 (CpuFee) | 返回该账户的余额(BigInteger) | +| [`Transfer`](../scapi/framework/native/Neo/Transfer.md) | UInt160 from, UInt160 to, BigInteger amount | 0.00131072 (CpuFee) + 0.0000005 (StorageFee) | 将指定数额的Token从from转往to,注意这里需要校验from的签名,方法调用者是否为from,to是否能够收款,以及from余额是否充足 | NEO扩展的合约方法如下: | 方法 | 参数 | 费用(GAS) | 返回结果 | | ---- | ------------------------------------ | ---- | ---- | -| [`UnclaimedGas`](scapi/framework/native/Neo/UnclaimedGas.md) | UInt160 account, uint end | 0.00131072 (CpuFee) | 返回该账户到指定高度未提取的GAS(uint) | \ No newline at end of file +| [`UnclaimedGas`](../scapi/framework/native/Neo/UnclaimedGas.md) | UInt160 account, uint end | 0.00131072 (CpuFee) | 返回该账户到指定高度未提取的GAS(uint) | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/n3/reference/rpc/api.md b/i18n/zh/docusaurus-plugin-content-docs/current/n3/reference/rpc/api.md new file mode 100644 index 0000000..e8e1bc1 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/n3/reference/rpc/api.md @@ -0,0 +1,182 @@ +# API 参考 + +每个 Neo-CLI 节点都可选的提供了一套 API 接口,用于从该节点获取区块链数据,使得开发区块链应用变得十分方便。接口通过 [JSON-RPC](http://wiki.geekdream.com/Specification/json-rpc_2.0.md) 的方式提供,底层使用 HTTP/HTTPS 协议进行通讯。 + +要启用 RPC服务,你需要安装 [RpcServer 插件](https://github.com/neo-project/neo-modules/releases),可参考 [安装插件](../../../node/cli/config.md#安装插件) 进行安装。启动 Neo-CLI 时无需添加参数。 + +:::note + 如果安装时找不到对应版本的文件,则表示当前未发布对应版本的 RpcServer 插件,开发者可以自行编译 [neo-modules](https://github.com/neo-project/neo-modules) 项目: +::: +> +> 1. 在 neo-cli.dll 所在的目录新建 Plugins 文件夹 +> 2. 将编译后的 RpcServer 文件放到 Plugins 文件夹中,然后重新启动 Neo-CLI。 + +## 监听端口 + +JSON-RPC 服务器启动后,会监听 TCP 端口,默认为本地地址(127.0.0.1)的 10332 端口,即 + +``` +http://127.0.0.1:10332/ +``` + +如需更改可修改 RpcServer 文件夹中的 config.json 配置文件。 + +## 命令列表 + +### 区块链 + +| 方法 | 参数 | 说明 | +| ------------------------------------------------------- | ---------------------------- | ------------------------------------------------------------ | +| [getbestblockhash](getbestblockhash.md) | | 获取当前链中高度最大的区块的散列 | +| [getblock](getblock.md) | `\` [verbose=0] | 根据指定的哈希或索引,返回对应的区块信息 | +| [getblockcount](getblockcount.md) | | 获取当前链中区块的数量 | +| [getblockhash](getblockhash.md) | `\` | 根据指定的索引,返回对应区块的散列值 | +| [getblockheader](getblockheader.md) | `\` [verbose=0] | 根据指定的哈希或索引,返回对应的区块头信息 | +| [getcommittee](getcommittee.md) | | 获取委员会成员公钥列表 | +| [getnativecontracts](getnativecontracts.md) | | 获得原生合约的列表 | +| [getnextblockvalidators](getnextblockvalidators.md) | | 获得下个区块的验证人列表 | +| [getcontractstate](getcontractstate.md) | `\` | 根据合约脚本散列,查询合约信息 | +| [getrawmempool](getrawmempool.md) | [shouldGetUnverified=0] | 获取内存中已确认的交易列表,如果参数为1,则获取内存中所有的交易列表(包括已确认和未确认交易) | +| [getrawtransaction](getrawtransaction.md) | `\` [verbose=0] | 根据指定的散列值,返回对应的交易信息 | +| [getstorage](getstorage.md) | `\` `\` | 根据合约脚本散列和存储的 key,返回存储的 value | +| [gettransactionheight](gettransactionheight.md) | `\` | 根据交易哈希获取交易所在的区块高度 | + +### 节点 + +| 方法 | 参数 | 说明 | +| ----------------------------------------------- | ------ | ------------------------------------------ | +| [getconnectioncount](getconnectioncount.md) | | 获取节点当前的连接数 | +| [getpeers](getpeers.md) | | 获得节点当前已连接/未连接的节点列表 | +| [getversion](getversion.md) | | 获取节点的版本信息 | +| [sendrawtransaction](sendrawtransaction.md) | `\` | 广播交易 | +| [submitblock](submitblock.md) | `\` | 提交新的区块
**注意**:需要成为共识节点 | + +### 智能合约 + +| 方法 | 参数 | 说明 | +| --------------------------------------- | --------------------------------------- | ---------------------------------------------- | +| [getunclaimedgas](getunclaimedgas.md) | `\
` | 查询指定地址未获取的 gas | +| [invokefunction](invokefunction.md) | `\` `\` \[params] \[sender] \[signers] | 用指定的哈希调用智能合约,传入方法名及参数 | +| [invokescript](invokescript.md) | `\