From d02a02d018277d154f7056a2d4e13220cd5d428f Mon Sep 17 00:00:00 2001 From: Pen <18875240351@163.com> Date: Tue, 10 Sep 2019 19:24:04 +0800 Subject: [PATCH] change folder name --- docs/{Guide => aaa}/README.md | 0 docs/{Guide => aaa}/g_contribute.md | 0 docs/{Guide => aaa}/g_joinCCC.md | 0 docs/{Guide => aaa}/g_linux_tutorial.md | 2 +- docs/{Guide => aaa}/g_multi_sign_account.md | 0 docs/{Guide => aaa}/g_transaction.md | 0 docs/guide/README.md | 25 - docs/guide/g_contribute.md | 45 - docs/guide/g_joinCCC.md | 69 - docs/guide/g_linux_tutorial.md | 1711 ------------------- docs/guide/g_multi_sign_account.md | 223 --- docs/guide/g_transaction.md | 16 - 12 files changed, 1 insertion(+), 2090 deletions(-) rename docs/{Guide => aaa}/README.md (100%) rename docs/{Guide => aaa}/g_contribute.md (100%) rename docs/{Guide => aaa}/g_joinCCC.md (100%) rename docs/{Guide => aaa}/g_linux_tutorial.md (99%) rename docs/{Guide => aaa}/g_multi_sign_account.md (100%) rename docs/{Guide => aaa}/g_transaction.md (100%) delete mode 100644 docs/guide/README.md delete mode 100644 docs/guide/g_contribute.md delete mode 100644 docs/guide/g_joinCCC.md delete mode 100644 docs/guide/g_linux_tutorial.md delete mode 100644 docs/guide/g_multi_sign_account.md delete mode 100644 docs/guide/g_transaction.md diff --git a/docs/Guide/README.md b/docs/aaa/README.md similarity index 100% rename from docs/Guide/README.md rename to docs/aaa/README.md diff --git a/docs/Guide/g_contribute.md b/docs/aaa/g_contribute.md similarity index 100% rename from docs/Guide/g_contribute.md rename to docs/aaa/g_contribute.md diff --git a/docs/Guide/g_joinCCC.md b/docs/aaa/g_joinCCC.md similarity index 100% rename from docs/Guide/g_joinCCC.md rename to docs/aaa/g_joinCCC.md diff --git a/docs/Guide/g_linux_tutorial.md b/docs/aaa/g_linux_tutorial.md similarity index 99% rename from docs/Guide/g_linux_tutorial.md rename to docs/aaa/g_linux_tutorial.md index 6f833da7..d23fb9bb 100644 --- a/docs/Guide/g_linux_tutorial.md +++ b/docs/aaa/g_linux_tutorial.md @@ -10,7 +10,7 @@ This section is a guide for the use of the full node wallet for the Linux versio | :------: | :--------: | :------: | | V0.9.0 | 2018-03-18 | alpha | | V0.9.1 | 2019-07-08 | Beta | -| V1.0.0 | 2019-09-08 | Mainnet| +| V1.0.0 | 2019-09-08 | Mainnet | ## Preparation diff --git a/docs/Guide/g_multi_sign_account.md b/docs/aaa/g_multi_sign_account.md similarity index 100% rename from docs/Guide/g_multi_sign_account.md rename to docs/aaa/g_multi_sign_account.md diff --git a/docs/Guide/g_transaction.md b/docs/aaa/g_transaction.md similarity index 100% rename from docs/Guide/g_transaction.md rename to docs/aaa/g_transaction.md diff --git a/docs/guide/README.md b/docs/guide/README.md deleted file mode 100644 index 09b53fd8..00000000 --- a/docs/guide/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# What is NULS - -### NULS is a blockchain infrastructure for customizable services, driven by our global open-source community. - -Following the principles of pluggability, modularization and parallel expansion, NULS provides smart contracts, multi-chain mechanism and cross-chain consensus to reduce cost of development and usage, and to promote the application of blockchain in the commercial field and the interaction among chains - -Upholding the "chain" as the core in the NULS development philosophy, NULS is striving for building its core product: "Chain Factory". In the meantime, NULS will realize the value circulation among chains through cross-chain module and build the ecosystem of blockchains. - -## 1. Our Mission - -- Provide flexible blockchain technology that supports a wide variety of enterprise applications -- Efficient, high performance technology to solve bottlenecks -- Promote usage of blockchain technology by reducing the barrier of entry development cost -- Provide the most powerful system of trust through a decentralized network -## 2. Whitepaper -The NULS whitepaper is an authoritative report that addresses what NULS’ goal is and how we plan to achieve it. - -[Learn more from whitepaper](https://nuls.io/wp-content/uploads/2019/06/NULS_Whitepaper_2.0.pdf) - -## 3. Yellowpaper - -The NULS yellowpaper is the technical detailed version of the whitepaper, which drills down into the underlying aspects of NULS. - - -[Learn more from Yellowpaper](https://nuls.io/wp-content/uploads/2019/06/NulsYellowpaper1.1.pdf) \ No newline at end of file diff --git a/docs/guide/g_contribute.md b/docs/guide/g_contribute.md deleted file mode 100644 index b0dbf9ea..00000000 --- a/docs/guide/g_contribute.md +++ /dev/null @@ -1,45 +0,0 @@ -# How to contribute -> The development of NULS is inseparable from the community and requires the participation of community members. We provide different ways for community members to participate, and you can choose what you are good at to contribute to NULS. For each contributor, the name of the contributor is published with its consent (we also attach the node name if the node is owned) -## Join the Mainnet development -Although the main network is now in a stable state of operation, in order to cope with changes, the development of the main network is still in progress. We need the help of the community to solve the challenges in the development of the main network and improve the NULS blockchain infrastructure together. We urge developers in the community to join us and contribute, and your efforts will be rewarded. - -- How to join the tech community:[https://nuls.io/developer](https://nuls.io/developer) -- NULS Github:[https://github.com/nuls-io](https://github.com/nuls-io) -## Report bugs -In the software development process, although there are strict tests, we still can't avoid bugs in the program. So if you find bugs in the process of using our application or developing, please timely feedback to us, and we will actively deal with them. There are three ways to feed back bugs: -- Feedback through [community forum](https://nuls.community/) - - Mainnet:https://nuls.community/d/135-collect-the-bugs-of-the-mainnet-bugs - - Testnet:https://nuls.community/d/134-collect-the-bugs-of-the-testnet-bugs - -- Send email to support@nuls.io -- Direct feedback to the community manager or operations staff - -## Write document -NULS formulated the document writing incentive plan, invited the community to write NULS related documents together, and gave corresponding rewards according to the efforts of community members. - -## Translate document -As a global open source blockchain project, NULS needs a lot of bilingual documents in Chinese and English. If you are a professional in this field, we really need your help. - -## List of contributors - -> The rankings are arranged alphabetically, in no particular order - -Name|Email| Node Alias/ID -:--|:--|:-- -Angang Tang | tangangang@nuls.io | -- -Albert | albert@nuls.io | -- -Charlie Li | lichao@nuls.io | --- -Cody Lan | lanjinsheng@nuls.io | --- -Davi Yang | davi@nuls.io | --- -Yuanchen Jiang | jiangyuanchen@nuls.io | --- -Yifeng Qin | qinyifeng@nuls.io |-- -Niels | niels@nuls.io | niels -Pierre Luo | luohao@nuls.io |--- -Pen Luo | pen@nuls.io |--- -Siwei | 13809668344@139.com |siwei -Vivi Zhou | zhouwei@nuls.io |--- - - - - - diff --git a/docs/guide/g_joinCCC.md b/docs/guide/g_joinCCC.md deleted file mode 100644 index 3ce3175e..00000000 --- a/docs/guide/g_joinCCC.md +++ /dev/null @@ -1,69 +0,0 @@ -# Invitation of community developers - -## 1. Introduction -NULS is a public blockchain project, dedicated to creating a truly open-source, self-innovative blockchain platform driven by our community. NULS wants to lower the barrier for enterprises/individuals to use the base-level blockchain technology. - -NULS technical community is organized by a group of developers who are passionate and enthusiastic about NULS. The technical community will work closely with the NULS core dev team to design and build the underlying NULS architecture and applications. By implementing the modular design, multi-chain mechanism, cross-chain consensus and other mechanisms, enterprises/individuals can customize their own blockchains with very simple configuration. - -In the community, we adhere to the following vision: - -- **Equal**: Members from both the technical community and the core dev team are equal and they shall work together. -- **Synergetic**: The technical community and the dev team jointly develop the base-level technology to build the NULS ecosystem. -- **Sharing**: - - Technical achievements of NULS are shared with the community; - - Development bonuses of NULS are shared with the community; - - The influence and brand of NULS are shared with the community; - - Technical innovation of NULS is shared with the whole industry; - - All the industrial standards set by NULS are shared with the whole industry. -- **Fair**: Reward for each developer is based on his/her contribution. -- **Innovative**: A strong technical community is the guarantee for the innovation in the blockchain field. - -## 2. Are you the one? -NULS technical community is open for all developers. -If you are expecting the revolution driven by the blockchain technology and you’d like to create a brave new world with us: - -Please join the NULS dev Telegram group: -[https://t.me/joinchat/HK7hw0uqJGC31heVAHKFyQ](https://nuls.community) - -**Notice**: We are not seeking for out-sourcing services. If you see anything here which can be improved, it can just be your playground! - -## 3. What are we offering? -The NULS team will give reward for each developer who contributes to NULS. The amount of reward depends on the contribution. -Currently, if you prove yourself to be a competent developer and join the core group of technical community - CCC (Code Craft Council), we will create a node in the NULS main-net for you and stake 200,000 NULS tokens to help get consensus reward. 50% of the reward (Currently around 1,500 NULS tokens per month) will be used to support the developers and the remaining 50% will go back into the community fund pool. -Note: The parameter of 50% is the initial setting, the subsequent adjustments are decided by the community, and we will announce the changes in the community as well. - -## 4. Our plan -Make it easy to build a blockchain! - -First, we would like to build a module repository which covers 80% of underlying technology of blockchain. By increasing the number of modules in the module repository, we will lower the barriers to get into the blockchain world. The cost for enterprises to build blockchains will be much lower, and the chains will be user friendly. We believe that in this way blockchain technology can be more integrated into our daily life. -The NULS team and technical community are currently building a new architecture: NULS 2.0 that will allow NULS modules to run independently, with low-coupling modules interacting with standard defined interfaces. Developers will no longer be limited to the programming language used by the blockchain system itself, and will only need to follow the NULS module standard to develop their own functional modules by using their preferred programming language, which will surely remove the threshold to develop more basic and business modules in the NULS module repository. - -Second, based on the module repository, NULS will launch its core product: Chain Factory. For developers who are familiar with the parameters of the blockchain they want to build, such as the consensus mechanism, block size and block generation time, they can build their own blockchains with only 4 steps and just a few minutes. Even if they don’t know the details about the base-level blockchain technology, this will greatly shorten the amount of time spent on blockchain development, estimated between 6 and 12 months. -For all the works above, we would never get done without the active involvement of the technical community. If you have any suggestions, you can always address them in our technical community. As always, we love to see new perspectives. - -Currently, there are more than 200 NULS technical community members across the world. We welcome more developers to join us. You will work directly with core dev team to develop the NULS base-level archicture and more! - -## 5. Current situation of the technical community - -A. From the very beginning, we believe that NULS belongs to the whole community, and the long-term development of NULS can't be achieved without the creativity of the community. In the past year, we were glad to witness how community developers volunteered to contribute to the NULS ecosystem. Josh from the United Kingdom developed our official website (nuls.io). Moshe from France developed blockchain browsers (nuls.world/) and web wallet (nuls.world/wallet) for NULS. Berzeck from Bolivia is working on the base-level development of NULS currently. -B. Despite this, we still have lots of work to be finished. We will continue to update a to-do list under this post, which will include the design, development, and improvement of NULS. All developers can choose accordingly, based on their abilities and interests. - -## 6. How to join us - -1. For the convenience of communication, you should join the Telegram group of our technical community (mentioned above), and firstly read through the pinned message in the group. -2. Talk to our community developer Moshe. Briefly introduce your experience, background, etc. - Community developers will discuss about some technical issues with you and get a brief understanding about what you want to do, which will determine what you could work on in the future. - - We also strongly recommend you to learn more about NULS through these links below: - - Official website: [https://nuls.io/](https://nuls.io/) - - Code: [https://github.com/nuls-io/nuls](https://github.com/nuls-io/nuls) - - Dev documents: [https://dev.nuls.io/docs/](https://dev.nuls.io/docs/) - - Community forum: [https://nuls.community](https://nuls.community) -3. You are going to choose an interesting and competent task. At that time, we will ask you to join one of the development group due to your subject and work with other developers. We strongly recommend that you download WeChat as a communication tool: - - [https://play.google.com/store/apps/details?id=com.tencent.mm&hl=zh](https://nuls.community/d/9-invitation-of-community-developers/4) - -4. In the group, each group leader will provide necessary documentations to help new developers to get started quickly. At the same time, we hope that developers will maintain effective communication with each other in order to work efficiently. After about a month of work, developers who are stable, efficient and have high quality output may apply to have a consensus node in the NULS main-net. Your application will be evaluated by the technical community and the core team. If the application is approved, we will create a consensus node for you as reward. - -## 7. Refer to task list -[https://nuls.community/d/9-invitation-of-community-developers/4](https://nuls.community/d/9-invitation-of-community-developers/4) (Continuously updated) \ No newline at end of file diff --git a/docs/guide/g_linux_tutorial.md b/docs/guide/g_linux_tutorial.md deleted file mode 100644 index 6f833da7..00000000 --- a/docs/guide/g_linux_tutorial.md +++ /dev/null @@ -1,1711 +0,0 @@ -# Linux CLI Manual - -## Introduction - -This section is a guide for the use of the full node wallet for the Linux version, it will show how to create accounts, import accounts, transfer, and create nodes or stake, etc. It's assumed you have at least basic skills administering Linux operating systems which is the recommended system to create stable NULS nodes. - -## Version history - -| Versions | Date | Contents | -| :------: | :--------: | :------: | -| V0.9.0 | 2018-03-18 | alpha | -| V0.9.1 | 2019-07-08 | Beta | -| V1.0.0 | 2019-09-08 | Mainnet| - -## Preparation - -### Server hardware configuration - -**Minimum requirements:** - -| CPU | Memory | Disk space | Bandwidth | -| :------------: | :----: | :--------: | :-----------: | -| 4-Core 3.0 GHz | 16GB | 128GB | 20Mbps uplink | - -**Recommended requirements:** - -| CPU | Memory | Disk space | Bandwidth | -| :------------: | :----: | :--------: | :------------: | -| 8-core 3.0 GHz | 32GB | 256GB | 100Mbps uplink | - -### System and kernel version - -**Linux system** - -- CentOS 6, 7 - -The Linux kernel version is recommended to use 2.6.32 and above - -## Get started - -### Download - -- Access NULS official website for the latest version of full node wallet: http://nuls.io/wallet.com; GitHub link: https://github.com/nuls-io/nuls-wallet-release -- After entering the interface of [NULS official wallet download](http://nuls.io/wallet), select Linux version. MEGA and Baidu Cloud Disk are available for your choice. - -To download Beta wallet using a Linux system, you can type the following command: - -```shell - $wget http://nuls-usa-west.oss-us-west-1.aliyuncs.com/2.0/NULS-Wallet-linux64-beta1-main.tar.gz -``` - -Note: the download address may be different if there are subsequent versions. - -### Installation - -- Extract the downloaded file in Linux: - -```shell - $ tar -zxf NULS-Wallet-linux64-beta1-main.tar.gz -``` - -### Run - -- Enter the extracted directory and run the boot script to start the full node wallet - -```shell - $ cd NULS-Wallet-linux64-beta1 - $ ./start -``` - -## Use wallet - -### Quick start - -- After confirming that the wallet has been started, execute the command line program to operate the wallet. - -Enter the cmdclient/1.0.0 directory and execute the following command: - -```shell - $ cd cmdclient/1.0.0 - $ ./cmd.sh -``` - -At this point, you can see the input prompt `nuls>>> `, now you can directly type NULS commands to operate the wallet. -For example, to create an account you should type the following command: - -```shell - nuls>>> create - Please enter the new password(8-20 characters, the combination of letters and numbers). - Enter your password:********* - Please confirm new password:********* - [ "tNULSeBaMjxVA6QijNXjEf3RYxwTbTLSqXvpa8" ] -``` - -Command ` create ` generates a single account, next enter your password and confirm the new password. If successful, the address of the account will be returned. - -## Conventions - -- Password rules: password length varies from 8 to 20 and must contain both letters and digits. -- Command parameter description: - < Parameter> required parameter. - [parameter] optional parameter. - " |" means 'or' logical operator, namely you can choose either the previous parameter or the latter. - -## Wallet commands - -### Help command - -Print all valid commands, - -- **command: help [-a]|[group]|[command]** - -| Parameter | Description | -| :-------- | :----------------------------------------------------------- | -| -a | format the printed command, optional | -| command | view instructions for the specific command | -| group | view all instructions for the commands in the specific command group | - -Return: help - -```json -getaccount
--get account information -``` - -Return: help -a - -```json -getaccount
--get account information - OPTIONS: -
the account address - Required -``` - -Example - -```shell -nuls>>> help -nuls>>> help -a -nuls>>> help account -nuls>>> help create -``` - -### Create an account - -Create an account and return the set of account addresses - -- **command: create [number]** - -| Parameter | Description | -| :----------------------------------------------------------- | :---------- | -| [number] the number of accounts you want to create, optional | | - -When creating an account, you are required to enter the password for the account. A password must be set to ensure the security of the assets. - -Return: accounts set - -```json -[ "tNULSeBaMmhBVJnJqcB7S7gKsPEoikZo2W89pm", "tNULSeBaMhUKHmueWB1h87vpWr62vrAjPshwTs", "tNULSeBaMvXiStrcQc4SF3rWGS8fyPqhUQXoS4" ] - -``` - -Example - -Create a single account - -```shell -nuls>>> create -Please enter the new password(8-20 characters, the combination of letters and numbers). -Enter your new password:********** -Please confirm new password:********** -[ "tNULSeBaMjxVA6QijNXjEf3RYxwTbTLSqXvpa8" ] - -``` - -Create multiple accounts at once - -``` -nuls>>> create 3 -Please enter the new password(8-20 characters, the combination of letters and numbers). -Enter your new password:********** -Please confirm new password:********** -[ "tNULSeBaMmhBVJnJqcB7S7gKsPEoikZo2W89pm", "tNULSeBaMhUKHmueWB1h87vpWr62vrAjPshwTs", "tNULSeBaMvXiStrcQc4SF3rWGS8fyPqhUQXoS4" ] - -``` - -### Back up account - -To back up an account, a file named as the account address with the extension .keystore is generated, which is the backup file for the account - -- **command: backup <address> [path]** - -| Parameter | Description | -| --------------- | ------------------------------------------------------------ | -| <address> | account address, required | -| [path] | the directory where the generated backup file is included, current directory by default, optional | - -Return - -```shell -The path to the backup file is /home/nuls2/nuls-v2/tNULSeBaMmhBVJnJqcB7S7gKsPEoikZo2W89pm.keystore - -``` - -Example: backup an account with a password - -``` - shell - nuls>>> backup tNULSeBaMmhBVJnJqcB7S7gKsPEoikZo2W89pm /home/nuls2/nuls-v2/NULS-Wallet-linux64-beta1 - Please enter the password. - Enter your password:******** - The path to the backup file is /home/nuls2/nuls-v2/tNULSeBaMmhBVJnJqcB7S7gKsPEoikZo2W89pm.keystore - -``` - -### Remove account - -Enter the password to remove a local account based on the account address - -- **command: remove <address>** - -| Parameter | Description | -| --------------- | ------------------------- | -| <address> | account address, required | - -Return - -```json -Success - -``` - -Example - -```shell -nuls>>> remove tNULSeBaMhUKHmueWB1h87vpWr62vrAjPshwTs -Please enter the password. -Enter your password:******** -Success - -``` - -### Modify account password - -Set a new password according to the account address and password. - -- **command:resetpwd <address>** - -| Parameter | Description | -| --------------- | ------------------------- | -| <address> | account address, required | - -Return - -```json -Success - -``` - -Example - -```shell -nuls>>> resetpwd tNULSeBaMvXiStrcQc4SF3rWGS8fyPqhUQXoS4 -Enter your old password:******** -Enter new password********* -Please confirm new password:********* - -``` - -### Set alias - -Set an alias to the account. If a node is created with this account, its alias will be displayed as the node source - -- **command: setalias <address> <alias>** - -| Parameter | Description | -| --------------- | ------------------------- | -| <address> | account address, required | -| <alias> | alias name, required | - -Return: transaction hash - -```json -txHash:0020f94f36aefd59f9cca9bff3c018fc287dc6c0bcd7fbeb047133cadb5747e7d98d" - -``` - -Example - -```shell -nuls>>> setalias tNULSeBaMjxVA6QijNXjEf3RYxwTbTLSqXvpa8 nuls -Enter your account password********** -txHash:0020830971e02527f18f8f9e32f974d8c73ce6bd249de859cae170476b87d0ec9582 - -``` - -### Import account keystore - -Import the account keystore file to recover a local account. The operation is not executed if the local account already exists locally. - -- **command: importkeystore <path>** - -| Parameter | Description | -| ------------ | -------------------------------------------------- | -| <path> | path of the keystore file to be imported, required | - -Note: the original password is required to import the keystore file and recover the account - -Return: address of the imported account - -```json -"tNULSeBaMjxVA6QijNXjEf3RYxwTbTLSqXvpa8" - -``` - -Example - -```shell -nuls>>>importkeystore /home/nuls2/nuls-v2/tNULSeBaMjxVA6QijNXjEf3RYxwTbTLSqXvpa8.keystore -Please enter the password (password is between 8 and 20 inclusive of numbers and letters), If you do not want to set a password, return directly. -Enter your password:********** -tNULSeBaMjxVA6QijNXjEf3RYxwTbTLSqXvpa8 - -``` - -### Import account private key - -Import the account private key to generate a local account, overwritten if the local account already exists. You are required to set a password for the account when importing. This function can be used to retrieve the account through the private key if you forget the account password. - -- **command: import <privatekey>** - -| Parameter | Description | -| ------------------ | ------------------------------- | -| <privatekey> | account's private key, required | - -```json -"NsdyM1Ls5qw8wutvAQsr93jxgq8qYAZy" - -``` - -Example - -```shell -nuls>>> import 74ca3facb66e5e9f2b78e86507d1f36cf601bc3de1d5f5e5b515c4f995d53873 -Please enter the password (password is between 8 and 20 inclusive of numbers and letters), If you do not want to set a password, return directly. -Enter your password:******** -Please confirm new password:******** -tNULSeBaMjxVA6QijNXjEf3RYxwTbTLSqXvpa8 - -``` - -### Query account information - -Query account information with the account address - -- ** command: getaccount <address>** - -| Parameter | Description | -| --------------- | :------------------------ | -| <address> | account address, required | - -Return - -```json -{ - "encryptedPrikeyHex" : "724d68268849f3680d480c9257f33229c0fac88890d5355c0e4d9c457af5c6e8b8f9f7ca9fd52fbd8079fbce1782052d", // the encrypted private key - "alias" : "zlj", // alias - "balance" : { - "freeze" : 0, // frozen assets - "total" : 997999999800000, // total assets - "available" : 997999999800000 // usable assets - }, - "address" : "5MR_2CeG11nRqx7nGNeh8hTXADibqfSYeNu", // account address - "pubkeyHex" : "0211c45f28710cd26a2c45fb790895a0ff2e095a290f1825b31d80ebc30913c486" //public key -} - -``` - -Example - -```shell -nuls>>> getaccount 5MR_2CeG11nRqx7nGNeh8hTXADibqfSYeNu -{ - "encryptedPrikeyHex" : "724d68268849f3680d480c9257f33229c0fac88890d5355c0e4d9c457af5c6e8b8f9f7ca9fd52fbd8079fbce1782052d", //encrypted private key - "alias" : "zlj", //alias - "balance" : { - "freeze" : 0, // frozen assets - "total" : 997999999800000, // total assets - "available" : 997999999800000 // usable assets - }, - "address" : "5MR_2CeG11nRqx7nGNeh8hTXADibqfSYeNu", // account address - "pubkeyHex" : "0211c45f28710cd26a2c45fb790895a0ff2e095a290f1825b31d80ebc30913c486" // encrypted public key -} - -``` - -### Query account list - -Query the account list with the paging parameters and return all accounts in descending order by creation time. - -- ** command: getaccounts <pageNumber> <pageSize>** - -| Parameter | Description | -| ------------------ | -------------------------------------------------- | -| <pageNumber> | page number indicating the page to query, required | -| <pageSize> | number of rows displayed per page, required | - -Return: accounts set - -```json -[ { - "address" : "5MR_2CeG11nRqx7nGNeh8hTXADibqfSYeNu", //address - "alias" : null, //alias - "pubkeyHex" : "0211c45f28710cd26a2c45fb790895a0ff2e095a290f1825b31d80ebc30913c486", //public key - "encryptedPrikeyHex" : "724d68268849f3680d480c9257f33229c0fac88890d5355c0e4d9c457af5c6e8b8f9f7ca9fd52fbd8079fbce1782052d" //private key -}, { - "address" : "5MR_2CetN1KeWAVsaUsqD7JwMBwjGuRGpGW", - "alias" : null, - "pubkeyHex" : "0205a70731e7653eca328ba7d71f0a789f8cfb1ced32f5a00d4fc3fb2ad8b9f7c1", - "encryptedPrikeyHex" : "e38d2dd08154a0eedf8298f5fe50b86723e521522f38aba5c68072bad365c3e8c57d7ac3ae83f8d646a17f845a38bc57" -}, { - "address" : "5MR_2CXrzwoCoP4vnUxHJ5gdUUXZJhCpjq9", - "alias" : "zlj", - "pubkeyHex" : "03021a46a7e5ea59ae8884340568e9e79511fbd352b4ba28db39f15856918cdbeb", - "encryptedPrikeyHex" : "bfbfdad874f74215e241ad15152d8648925c497b6a826965f5c06c46fd9b008313e6918ebcfcb56f2cdf8d1b9f088f77" -} ] - -``` - -Example: get all accounts list - -```shell -nuls>>> getaccounts -[ { - "address" : "5MR_2CeG11nRqx7nGNeh8hTXADibqfSYeNu", //address - "alias" : null, //alias - "pubkeyHex" : "0211c45f28710cd26a2c45fb790895a0ff2e095a290f1825b31d80ebc30913c486", //encrypted public key - "encryptedPrikeyHex" : "724d68268849f3680d480c9257f33229c0fac88890d5355c0e4d9c457af5c6e8b8f9f7ca9fd52fbd8079fbce1782052d" //encrypted private key -}, { - "address" : "5MR_2CetN1KeWAVsaUsqD7JwMBwjGuRGpGW", - "alias" : null, - "pubkeyHex" : "0205a70731e7653eca328ba7d71f0a789f8cfb1ced32f5a00d4fc3fb2ad8b9f7c1", - "encryptedPrikeyHex" : "e38d2dd08154a0eedf8298f5fe50b86723e521522f38aba5c68072bad365c3e8c57d7ac3ae83f8d646a17f845a38bc57" -}, { - "address" : "5MR_2CXrzwoCoP4vnUxHJ5gdUUXZJhCpjq9", - "alias" : "zlj", - "pubkeyHex" : "03021a46a7e5ea59ae8884340568e9e79511fbd352b4ba28db39f15856918cdbeb", - "encryptedPrikeyHex" : "bfbfdad874f74215e241ad15152d8648925c497b6a826965f5c06c46fd9b008313e6918ebcfcb56f2cdf8d1b9f088f77" -} ] - -``` - -### Query account's private key - -Query the account’s private key with the account address and password - -- **command: getprikey <address>** - -| Parameter | Description | -| --------------- | ------------------------- | -| <address> | account address, required | - -Return: the private key of the imported account (unencrypted) - -```json -00a166d10c2cc4cd8f76449ff699ab3eee44fe4f82b4bb866f7bba02751a6fd655 - -``` - -Example - -```shell -nuls>>> getprikey 5MR_2CXrzwoCoP4vnUxHJ5gdUUXZJhCpjq9 -Enter your account password********** -7b4d3ec971fc01ea813b52f6c35091d43beac4a68550bae2db63975149244678 - -``` - -### Query account balance - -Query account balance with the account address - -- **command: getbalance <address>** - -| Parameter | Description | -| --------------- | ------------------------- | -| <address> | account address, required | - -Return: the address of the imported account - -```json -{ -"total": "9999998.99",// balance -"freeze": "0", // locked balance -"available": "9999998.99"// usable balance -} - -``` - -Example - -```shell -nuls>>> getbalance Nse2TpVsJd4gLoj79MAY8NHwEsYuXwtT -{ - "total" : "9999998.99", - "freeze" : "0", - "available" : "9999998.99" -} - -``` - -### Transfer - -Transfer NULS to the specific account with the account address - -- **command:transfer <formAddress>|<formAlias> <toAddress>|<toAlias> <amount> [remark]** - -| Parameter | Description | -| ------------------- | ---------------------------------------------------------- | -| <fromAddress> | sender address(Select any item with the fromAlias) | -| <fromAlias> | sender address alias(Select any item with the fromAddress) | -| <toAddress> | receiver address(Select any item with the toAlias) | -| <toAlias> | receiver address(Select any item with the toAddress) | -| <amount> | transfer amount, required | -| [remark] | remark, optional | - -Return: transfer transaction hash - -```json -"00200bef73ad728c48146c8a5eb0d76fe7325b85803c61d8357c16dba09ea33b3596" - -``` - -Example - -```shell -nuls>>> transfer Nse2TpVsJd4gLoj79MAY8NHwEsYuXwtT NsdtmV5XkgSdpBXi65ueTsrv2W5beV2T 100 transfer -Please enter the password. -Enter your password: ********* -"00200bef73ad728c48146c8a5eb0d76fe7325b85803c61d8357c16dba09ea33b3596" - -``` - -### Query transaction details - -Query the transaction details with the transaction hash - -- **command: gettx <hash>** - -| Parameter | Description | -| ------------ | -------------------------- | -| <hash> | transaction hash, optional | - -Return: transaction details - -```json -{ - "type" : 2, //transaction type (refer to the table below for Enumeration type description [Enumeration type]) - "coinData" : "ARc5MAGYBT3XNVp+BIuhGvGcejuTev8DODkwAQCgZ/cFAAAAAAAAAAAAAAAACO/WnDT4pvmsAAEXOTABL/80LO1f8vxvfNXc5l9eeIDTGKM5MAEAAOH1BQAAAAAAAAAAAAAAAAA=", - "txData" : null, - "time" : 1552979783918, - "transactionSignature" : "IQIRxF8ocQzSaixF+3kIlaD/LglaKQ8YJbMdgOvDCRPEhgBGMEQCICdnNr3HqEg/UZZ6RLBHyGuPChoLdMtcOHXT3Xlb5SC3AiBGAWSPGH3yjtEkaVbLsI5n9UcqDvOfG3Ui1jf672IDCg==", - "remark" : "6L2s6LSm", - "hash" : { - "digestAlgType" : 0, - "digestBytes" : "CivAIHpVyqNr/h87/FWk7vXsXqBekHJ+3kQc5mZp+H8=", - "digestHex" : "00200a2bc0207a55caa36bfe1f3bfc55a4eef5ec5ea05e90727ede441ce66669f87f" - }, - "blockHeight" : 341, //block height - "status" : "CONFIRMED", //confirmation state - "size" : 225, - "inBlockIndex" : 0, - "coinDataInstance" : { - "from" : [ { - "address" : "OTABmAU91zVafgSLoRrxnHo7k3r/Azg=", - "assetsChainId" : 12345, - "assetsId" : 1, - "amount" : 100100000, - "nonce" : "79acNPim+aw=", - "locked" : 0 - } ], - "to" : [ { - "address" : "OTABL/80LO1f8vxvfNXc5l9eeIDTGKM=", - "assetsChainId" : 12345, - "assetsId" : 1, - "amount" : 100000000, - "lockTime" : 0 - } ] - }, - "fee" : 100000, //fee - "multiSignTx" : false -} - -``` - -Example: query transfer transaction - -```shell -nuls>>> gettx 00200a2bc0207a55caa36bfe1f3bfc55a4eef5ec5ea05e90727ede441ce66669f87f -{ - "type" : 2, //transaction type (refer to the table below for Enumeration type description [Enumeration type]) - "coinData" : "ARc5MAGYBT3XNVp+BIuhGvGcejuTev8DODkwAQCgZ/cFAAAAAAAAAAAAAAAACO/WnDT4pvmsAAEXOTABL/80LO1f8vxvfNXc5l9eeIDTGKM5MAEAAOH1BQAAAAAAAAAAAAAAAAA=", - "txData" : null, - "time" : 1552979783918, - "transactionSignature" : "IQIRxF8ocQzSaixF+3kIlaD/LglaKQ8YJbMdgOvDCRPEhgBGMEQCICdnNr3HqEg/UZZ6RLBHyGuPChoLdMtcOHXT3Xlb5SC3AiBGAWSPGH3yjtEkaVbLsI5n9UcqDvOfG3Ui1jf672IDCg==", - "remark" : "6L2s6LSm", - "hash" : { - "digestAlgType" : 0, - "digestBytes" : "CivAIHpVyqNr/h87/FWk7vXsXqBekHJ+3kQc5mZp+H8=", - "digestHex" : "00200a2bc0207a55caa36bfe1f3bfc55a4eef5ec5ea05e90727ede441ce66669f87f" - }, - "blockHeight" : 341, //block height - "status" : "CONFIRMED", //confirmation state - "size" : 225, - "inBlockIndex" : 0, - "coinDataInstance" : { - "from" : [ { - "address" : "OTABmAU91zVafgSLoRrxnHo7k3r/Azg=", - "assetsChainId" : 12345, - "assetsId" : 1, - "amount" : 100100000, - "nonce" : "79acNPim+aw=", - "locked" : 0 - } ], - "to" : [ { - "address" : "OTABL/80LO1f8vxvfNXc5l9eeIDTGKM=", - "assetsChainId" : 12345, - "assetsId" : 1, - "amount" : 100000000, - "lockTime" : 0 - } ] - }, - "fee" : 100000, //fee - "multiSignTx" : false -} - -``` - -#### Enumeration type description - -``` -/** coinbase transaction*/ - int TX_TYPE_COINBASE = 1; - /** transfer */ - int TX_TYPE_TRANSFER = 2; - /** set alias */ - int TX_TYPE_ALIAS = 3; - /** create consensus node */ - int TX_TYPE_REGISTER_AGENT = 4; - /** agent (join consensus) */ - int TX_TYPE_JOIN_CONSENSUS = 5; - /** cancel agent (cancel consensus)*/ - int TX_TYPE_CANCEL_DEPOSIT = 6; - /** yellow punish */ - int TX_TYPE_YELLOW_PUNISH = 7; - /** red punish */ - int TX_TYPE_RED_PUNISH = 8; - /** stop node (stop consensus node)*/ - int TX_TYPE_STOP_AGENT = 9; - /** cross-chain transfer */ - int TX_TYPE_CROSS_CHAIN_TRANSFER = 10; - /** register chain */ - int TX_TYPE_REGISTER_CHAIN_AND_ASSET = 11; - /** destroy chain*/ - int TX_TYPE_DESTROY_CHAIN_AND_ASSET = 12; - /** add asset to chain*/ - int TX_TYPE_ADD_ASSET_TO_CHAIN = 13; - /** remove asset from chain*/ - int TX_TYPE_REMOVE_ASSET_FROM_CHAIN = 14; - /** create contract */ - int TX_TYPE_CREATE_CONTRACT = 100; - /** call contract */ - int TX_TYPE_CALL_CONTRACT = 101; - /** delete contract*/ - int TX_TYPE_DELETE_CONTRACT = 102; - -``` - -### Transfer using account alias - -Transfer to an external address with an account alias - -- **command: transfer <address> <toAddress> <amount> [remark]** - -| Parameter | Description | -| ----------------- | -------------------------- | -| <address> | sender address, required | -| <toAddress> | receiver address, required | -| <amount> | transfer amount, required | -| [remark] | remark, optional | - -Return: transaction hash - -``` -00205315329f62824b3fae1675ef9419ae7dd097d6609d61df4b1345f9481f7c8be3 - -``` - -Example: transfer 10,000 NULS to external address through alias "zlj" - -``` -nuls>>> transfer zlj 5MR_2CeG11nRqx7nGNeh8hTXADibqfSYeNu 10000 -Enter your account password********** -00205315329f62824b3fae1675ef9419ae7dd097d6609d61df4b1345f9481f7c8be3 - -``` - -### Create agent node - -To create an agent node, two addresses are required, the first one is the node address, on which you need to provide the password for the node account, the other is the package address, and no password is required. Meanwhile, you’re required to offer no less than 20,000 NULS as a deposit. - -- **command: createagent <agentAddress> <packingAddress> <commissionRate> <deposit>** - -| Parameter | Description | -| ---------------------- | ------------------------------------------------------------ | -| <agentAddress> | account address to create a node, required | -| <packingAddress> | account address of the packaging node, required (note: the account should be password-less, otherwise the node cannot package to generate blocks) | -| <commissionRate> | agent commission ratio with a range from 10 to 100, required | -| <deposit> | deposit to create a node, no less than 20000 NULS, required | - -Return: agent hash of the node - -```json -"002006a5b7eb1d32ed6d7d54e24e219b112d4fdb8530db5506ee953b6f65a0fdb55e" - -``` - -Example: create a node with a commission rate of 10% and a deposit of 20,000 NULS. - -```shell -nuls>>> createagent Nse2TpVsJd4gLoj79MAY8NHwEsYuXwtT NsdvAnqc8oEiNiGgcp6pEusfiRFZi4vt 10 20000 -Please enter the password. -Enter your password: ********** -"002006a5b7eb1d32ed6d7d54e24e219b112d4fdb8530db5506ee953b6f65a0fdb55e" - -``` - -### Join consensus (agent node) - -Join consensus by account address and node agentHash, which requires at least 2,000NULS - -- **command: deposit <address> <agentHash> <deposit>** - -| Parameter | Description | -| ----------------- | ------------------------------------------------------------ | -| <address> | account address, required | -| <agentHash> | agentHash of the node, optional | -| <deposit> | deposit required to join consensus, no less than 2000NULS, required | - -Return: the hash of the transaction to join consensus, which is needed to cancel the consensus. - -```json -"0020d349b7ad322ff958e3abfa799d9ac76341afa6e1fb4d3857353a5adc74ba3fd0" - -``` - -Example - -```shell -nuls>>> deposit NsdtmV5XkgSdpBXi65ueTsrv2W5beV2T 002006a5b7eb1d32ed6d7d54e24e219b112d4fdb8530db5506ee953b6f65a0fdb55e 5000 -"0020d349b7ad322ff958e3abfa799d9ac76341afa6e1fb4d3857353a5adc74ba3fd0" - -``` - -### Cancel consensus (cancel agent) - -Cancel consensus (agent) according to the account address and the hash of the transaction generated when joining the consensus. When a single account joins consensus on agent nodes multiple times, each agent transaction is independent, so to cancel consensus, the agent can only be canceled by the corresponding transaction hash of the single agent, rather than cancel all the agents at one time. - -- **command: withdraw <address> <txHash>** - -| Parameter | Description | -| --------------- | --------------------------------------- | -| <address> | account address, required | -| <txHash> | hash of the agent transaction, required | - -Return: transaction hash used to cancel consensus - -```json -"00201d70ac37b53d41c0e813ad245fc42e1d3a5d174d9148fbbbaed3c18d4d67bdbf" - -``` - -Example - -```shell -nuls>>> withdraw NsdtmV5XkgSdpBXi65ueTsrv2W5beV2T 0020d349b7ad322ff958e3abfa799d9ac76341afa6e1fb4d3857353a5adc74ba3fd0 -"00201d70ac37b53d41c0e813ad245fc42e1d3a5d174d9148fbbbaed3c18d4d67bdbf" - -``` - -### Stop agent - -Stop the node, all NULS delegated to the node will be refunded, and the deposit of the node creator will be locked for 72 hours. - -- **command: stopagent <address>** - -| Parameter | Description | -| --------------- | ------------------------- | -| <address> | account address, required | - -Return: transaction hash to stop a node - -```json -"0020f15eecd7c85be76521ed6af4d58a3810f7df58e536481cff4a96af6d4fddec5f" - -``` - -Example - -```shell -nuls>>> stopagent Nse2TpVsJd4gLoj79MAY8NHwEsYuXwtT -Please enter the password. -Enter your password:********** -"0020f15eecd7c85be76521ed6af4d58a3810f7df58e536481cff4a96af6d4fddec5f" - -``` - -### Get header information of the latest block - -Get the latest block header’s information - -- **command: getbestblockheader** - -Return - -```json -{ - "hash" : "0020b446a0244e4e46f8736f1ab56c33616facb836bc8344367f2f048b703f0c8f57", //block hash - "preHash" : "0020c0dcf9209f66ee7e7778c817ba7c04d67b5e6a056b42dec7fbfe44eb5f91bdfc", //previous block hash - "merkleHash" : "00200511ced5779c54aa2170b941a1f9a7ae08dfd009b1dfaacc3679d15da9fb9c3e", //merkle hash - "time" : "2019-03-19 18:26:20.020", //packing time - "height" : 1479, //block height - "txCount" : 1, // number of transactions included in the block - "blockSignature" : "00473045022100b1a07f6da3d4ce46cab278967d76875483527e3fc749a460afdf0c375f2ec2ae022053e40e8b4d8bf4e571284e45f18c46c31163ed640a2328f3ba90ac7708808365", //block singnature - "size" : 0, //block size - "packingAddress" : null, // packing address - "roundIndex" : 155299118, - "consensusMemberCount" : 100, - "roundStartTime" : "2019-03-19 18:26:10.010", - "packingIndexOfRound" : 1, - "mainVersion" : 1, - "blockVersion" : 0, - "stateRoot" : null -} - -``` - -Example - -```shell -nuls>>> getbestblockheader -{ - "hash" : "0020b446a0244e4e46f8736f1ab56c33616facb836bc8344367f2f048b703f0c8f57", - "preHash" : "0020c0dcf9209f66ee7e7778c817ba7c04d67b5e6a056b42dec7fbfe44eb5f91bdfc", - "merkleHash" : "00200511ced5779c54aa2170b941a1f9a7ae08dfd009b1dfaacc3679d15da9fb9c3e", - "time" : "2019-03-19 18:26:20.020", - "height" : 1479, - "txCount" : 0, - "blockSignature" : "00473045022100b1a07f6da3d4ce46cab278967d76875483527e3fc749a460afdf0c375f2ec2ae022053e40e8b4d8bf4e571284e45f18c46c31163ed640a2328f3ba90ac7708808365", - "size" : 0, - "packingAddress" : null, - "roundIndex" : 155299118, - "consensusMemberCount" : 100, - "roundStartTime" : "2019-03-19 18:26:10.010", - "packingIndexOfRound" : 1, - "mainVersion" : 1, - "blockVersion" : 0, - "stateRoot" : null -} - -``` - -### Query block header information - -Query block information with either a block height or a block hash. - -- **command: getblock <hash> | <height>** - -| Parameter | Description | -| -------------- | ------------ | -| <hash> | block hash | -| <height> | block height | - -Return - -```json -{ - "hash" : "0020b446a0244e4e46f8736f1ab56c33616facb836bc8344367f2f048b703f0c8f57", //block hash - "preHash" : "0020c0dcf9209f66ee7e7778c817ba7c04d67b5e6a056b42dec7fbfe44eb5f91bdfc", //previous block hash - "merkleHash" : "00200511ced5779c54aa2170b941a1f9a7ae08dfd009b1dfaacc3679d15da9fb9c3e", //merkle hash - "time" : "2019-03-19 18:26:20.020", //packing time - "height" : 1479, //block height - "txCount" : 1, // number of transactions included in the block - "blockSignature" : "00473045022100b1a07f6da3d4ce46cab278967d76875483527e3fc749a460afdf0c375f2ec2ae022053e40e8b4d8bf4e571284e45f18c46c31163ed640a2328f3ba90ac7708808365", //block signature - "size" : 0, //block size - "packingAddress" : null, //packing address - "roundIndex" : 155299118, - "consensusMemberCount" : 100, - "roundStartTime" : "2019-03-19 18:26:10.010", - "packingIndexOfRound" : 1, - "mainVersion" : 1, - "blockVersion" : 0, - "stateRoot" : null -} - -``` - -Example: get block with block height - -```shell -nuls>>> getblock 28115 -{ - "hash" : "0020b446a0244e4e46f8736f1ab56c33616facb836bc8344367f2f048b703f0c8f57", //block hash - "preHash" : "0020c0dcf9209f66ee7e7778c817ba7c04d67b5e6a056b42dec7fbfe44eb5f91bdfc", //previous block hash - "merkleHash" : "00200511ced5779c54aa2170b941a1f9a7ae08dfd009b1dfaacc3679d15da9fb9c3e", //merkle hash - "time" : "2019-03-19 18:26:20.020", //packing time - "height" : 1479, //block height - "txCount" : 1, // number of transactions included in the block - "blockSignature" : "00473045022100b1a07f6da3d4ce46cab278967d76875483527e3fc749a460afdf0c375f2ec2ae022053e40e8b4d8bf4e571284e45f18c46c31163ed640a2328f3ba90ac7708808365", //block signature - "size" : 0, //block size - "packingAddress" : null, //packing address - "roundIndex" : 155299118, - "consensusMemberCount" : 100, - "roundStartTime" : "2019-03-19 18:26:10.010", - "packingIndexOfRound" : 1, - "mainVersion" : 1, - "blockVersion" : 0, - "stateRoot" : null -} - -``` - -### Create smart contracts - -This interface is called to create a smart contract on the chain - -- **command:createcontract <sender> <gaslimt> <price> <contractCode> [remark]** - -| Parameter | Description | -| ----------------- | ------------------------------------------------------------ | -| <sender> | Create the account address for the smart contract | -| <gaslimt> | Consumes of the gas for creating the contract | -| <price> | Unit price, how much Na is each Gas value.Na is the minimum unit for NULS, 1 NULS = 100 million Na, and the minimum unit price of the system is 25Na/Gas | -| <contractCode> | Hex code of the contract code | -| [remark] | remark | - -Returns the transaction hash for which the contract was created and the address of the contract - -``` -{ - "txHash" : "00205fb44fd0924a57857e71d06ec0549366b5d879b2cbd68488ed88a2dbf96c130f", //transaction hash - "contractAddress" : "tNULSeBaN6ofkEqsPJmWVaeMpENTgmC5ifWtz9" //contract address -} - -``` - -The example creates a contract (contractCode omits the middle) - -``` -nuls>>> createcontract tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD 200000 25 504b03040a........000000800080051020000b31600000000 remarkdemo -The arguments structure: -[ { - "type" : "String", - "name" : "name", - "required" : true -}, { - "type" : "String", - "name" : "symbol", - "required" : true -}, { - "type" : "BigInteger", - "name" : "initialAmount", - "required" : true -}, { - "type" : "int", - "name" : "decimals", - "required" : true -} ] -Please enter the arguments you want to fill in according to the arguments structure(eg. "a",2,["c",4],"","e" or "'a',2,['c',4],'','e'"). -Enter the arguments:"KQB","KQB",10000,2 -{ - "txHash" : "0020ec1d68eaed63e2db8649b0a39f16b7c5af24f86b787233f6ba6d577d7d090587", - "contractAddress" : "tNULSeBaNBYK9MQcWWbfgFTHj2U4j8KQGDzzuK" -} - -``` - -### Get contract basic information - -Gets the description of the smart contract and the argument list of the constructor and the calling method - -- **command:getcontractinfo <contract address>** - -| Parameter | Description | -| ------------------------ | ---------------- | -| <contract address> | contract address | - -Return - -``` -Skip - -``` - -example - -``` -nuls>>> getcontractinfo tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L -getcontractinfo tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L -{ - "createTxHash" : "00203a48dcfc26426152805be49830c72005b4648d0182bbf6c2e8980380364eb59f", - "address" : "tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L", - "creater" : "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", - "createTime" : 1553563706022, - "blockHeight" : 46, - "isNrc20" : true, - "nrc20TokenName" : "QKB", - "nrc20TokenSymbol" : "QKB", - "decimals" : 2, - "totalSupply" : "200000000", - "status" : "normal", - "method" : [ { - "name" : "", - "desc" : "(String name, String symbol, BigInteger initialAmount, int decimals) return void", - "args" : [ { - "type" : "String", - "name" : "name", - "required" : true - }, { - "type" : "String", - "name" : "symbol", - "required" : true - }, { - "type" : "BigInteger", - "name" : "initialAmount", - "required" : true - }, { - "type" : "int", - "name" : "decimals", - "required" : true - } ], - "returnArg" : "void", - "view" : false, - "event" : false, - "payable" : false - },{ - "name" : "transfer", - "desc" : "(Address to, BigInteger value) return boolean", - "args" : [ { - "type" : "Address", - "name" : "to", - "required" : true - }, { - "type" : "BigInteger", - "name" : "value", - "required" : true - } ], - "returnArg" : "boolean", - "view" : false, - "event" : false, - "payable" : false - }] -} - - -``` - -### Invoke smart contracts - -Call the functions provided by the smart contract - -- **command:callcontract <sender> <gasLimit> <price> <contractAddress> <methodName> <value> [-d methodDesc] [-r remark]** - -| Parameter | Description | -| --------------------- | ------------------------------------------------------------ | -| <senderAddress> | The account address invoking the contract | -| <gasLimit> | The maximum amount of Gas that the contract is allowed to consume | -| <price> | Unit price, how much Na is each Gas value.Na is the minimum unit for NULS, 1 NULS = 100 million Na, and the minimum unit price of the system is 25Na/Gas | -| <contractAddress> | The contract address of the call | -| <methodName> | The method name of the contract | -| <value> | If a transfer is to be made to the contract, the amount of the transfer | -| [-d methodDesc] | Use this method to describe the parameter list if there is a method with the same name in the contract | -| [-r remark] | remark | - -Returns: transaction hash - -``` -"0020c9079e0f0454103adceed798d40171c41a8db04586dba966fbe7f2ab722583ad" //transaction hash - -``` - -The example calls the nrc20-token transfer function for a specified contract, Example ` tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L ` NRC20 contract address, number of input parameters for receiving address and account transfer - -``` -nuls>>> callcontract tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD 200000 25 tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L transfer 0 -r call -callcontract tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD 200000 25 tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L transfer 0 -r call -Please Enter your account passwordzhoujun172 -********** -Please enter the arguments according to the arguments structure(eg. "a",2,["c",4],"","e" or "'a',2,['c',4],'','e'"), -If this method has no arguments(Refer to the command named "getcontractinfo" for the arguments structure of the method.), return directly. -Enter the arguments:"tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",2 -"0020c9079e0f0454103adceed798d40171c41a8db04586dba966fbe7f2ab722583ad" - -``` - -### Delete smart contract - -Stop an available smart contract - -- **commmand:deletecontract <senderAddress> <contractAddress>** - -| Parameter | Description | -| --------------------- | ----------------------------------------- | -| <senderAddress> | The account address invoking the contract | -| <contractAddress> | The contract address of the call | - -Returns: transaction hash - -``` -"0020c55e885dd910dad0b2c49f5b71b62691b57884ca21fd47668f1f5cadc84daad6" //交易hash - -``` - -example - -``` -nuls>>> deletecontract tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L -deletecontract tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L -Please enter your account passwordzhoujun172 -********** -"0020c55e885dd910dad0b2c49f5b71b62691b57884ca21fd47668f1f5cadc84daad6" - -``` - -### Call the contract view method - -Calling the contract view method immediately returns the result, no transaction is generated - -- **commmand:viewcontract <contractAddress> <methodName> [-d methodDesc] --view contract** - -| Parameter | Description | -| -------------------- | ------------------------------------------------------------ | -| <contractAddress> | The contract address of the call | -| <methodName> | Method called | -| [-d methodDesc] | Use this method to describe the parameter list if there is a method with the same name in the contract | - -The return value - -``` -The return value varies depending on the function being called - -``` - -The example calls the nrc20-token contract's query Token balance function to query the Token balance of the specified address - -``` -nuls>>> viewcontract tNULSeBaN6pwyVwXjfpm5BMH5eiirvthoZDVEc balanceOf -viewcontract tNULSeBaN6pwyVwXjfpm5BMH5eiirvthoZDVEc balanceOf -Please enter the arguments according to the arguments structure(eg. "a",2,["c",4],"","e" or "'a',2,['c',4],'','e'"), -If this method has no arguments(Refer to the command named "getcontractinfo" for the arguments structure of the method.), return directly. -Enter the arguments:"tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD" -"tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD" -{ - "result" : "20000000" -} - -``` - -### Transfer money to the contract address - -To the specified contract address into the main network currency - -- **command:transfertocontract <senderAddress> <contractAddress> <amount> [remark]** - -| Parameter | Description | -| ------------------- | ---------------------------------- | -| <senderAddress> | Transfer out account address | -| <contractAddress | transfer into the contract address | -| <amount> | transfer amount | -| [remark] | remark | - -Returns: transaction hash - -``` -"0020f5d6b87c246595d1b060a3fa8bac6a2992490e38fdfcad40db2a3908297e7979" - -``` - -The example transfers two NULS to the specified contract - -``` -nuls>>> transfertocontract tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD tNULSeBaN1NRtaj1ZPAmEmTqcpkyCLqv64PR7U 2 remark -Please enter your account password -********** -"0020f5d6b87c246595d1b060a3fa8bac6a2992490e38fdfcad40db2a3908297e7979" - -``` - -### token transfer - -NRC20 token transfer - -- **command:tokentransfer <formAddress> <toAddress> <contractAddress> <amount> [remark]** - -| Parameter | Description | -| -------------------- | ---------------- | -| <fromAddress> | sender address | -| <toAddress | receiver address | -| <contractAddress> | contract address | -| <amount> | transfer amount | -| [remark] | remark | - -Returns: transaction hash - -``` -"002022dffd96026b493945d2cf9ad276c4bc9655c735b72e6fcc85a2d19f6cbe25e8" - -``` - -Token transfer example : - -``` -nuls>>> tokentransfer tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD tNULSeBaNBh9RUsVrVmMy8NHcZJ2BhNVsM1Vta tNULSeBaN6pwyVwXjfpm5BMH5eiirvthoZDVEc 200000 25 10000 -Please enter your account password -********** -"002022dffd96026b493945d2cf9ad276c4bc9655c735b72e6fcc85a2d19f6cbe25e8" - -``` - -### Get contract transaction - -Gets the transaction information of the contract, including the transaction details, the contract invocation parameters, and the contract execution results - -- **command:getcontracttx <hash>** - -| Parameter | Description | -| --------- | ---------------- | -| <hash> | transaction hash | - -return value - -``` -skip - -``` - -example - -``` -nuls>>> getcontracttx 00203a48dcfc26426152805be49830c72005b4648d0182bbf6c2e8980380364eb59f -getcontracttx 00203a48dcfc26426152805be49830c72005b4648d0182bbf6c2e8980380364eb59f -{ - "hash" : "00203a48dcfc26426152805be49830c72005b4648d0182bbf6c2e8980380364eb59f", - "type" : "100", - "time" : "2019-03-26 09:28:26", - "blockHeight" : 46, - "fee" : 0.0, - "value" : 0.0, - "remark" : null, - "scriptSig" : "210318f683066b45e7a5225779061512e270044cc40a45c924afcf78bb7587758ca0004630440220112a446b2a684510b4016fa97b92d2f3fead03128f0f658c99a6a8d230d05d4e02201e23a2f6e68aacdff2d117bd5bbe7ce2440babfe4211168eafbae41acad5d505", - "status" : "confirm", - "confirmCount" : 0, - "size" : 6686, - "inputs" : [ { - "address" : "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", - "assetsChainId" : 2, - "assetsId" : 1, - "amount" : "5700000", - "nonce" : "ffffffff", - "locked" : 0, - "value" : 0.0 - } ], - "outputs" : [ ], - "txData" : { - "data" : { - "sender" : "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", - "contractAddress" : "tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L", - "value" : 0.0, - "hexCode" : "504b03040a0000080...........31600000000", - "gasLimit" : 200000, - "price" : "0.00000025", - "args" : [ [ "QKB" ], [ "QKB" ], [ "2000000" ], [ "2" ] ] - } - }, - "contractResult" : { - "success" : true, - "errorMessage" : null, - "contractAddress" : "tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L", - "result" : null, - "gasLimit" : 200000, - "gasUsed" : 14029, - "price" : "0.00000025", - "totalFee" : 0.0, - "txSizeFee" : 0.0, - "actualContractFee" : 0.0, - "refundFee" : 0.0, - "stateRoot" : "be76399c41a8cb4be5ecf80e04dab36830b124cb1c43fea6ca69ae62259899ba", - "value" : 0.0, - "stackTrace" : null, - "balance" : 0.0, - "transfers" : [ ], - "events" : [ "{\"contractAddress\":\"tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L\",\"blockNumber\":46,\"event\":\"TransferEvent\",\"payload\":{\"from\":null,\"to\":\"tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD\",\"value\":\"200000000\"}}" ], - "tokenTransfers" : [ { - "contractAddress" : "tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L", - "from" : null, - "to" : "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", - "value" : "200000000", - "name" : "QKB", - "symbol" : "QKB", - "decimals" : 2 - } ], - "remark" : "create" - } -} - - - -``` - -### Get the contract execution result - -Gets the execution result of a contract - -- **command:getcontractresult <hash>** - -| Parameter | Description | -| --------- | ---------------- | -| <hash> | transaction hash | - -return value - -``` -skip - -``` - -example - -``` -nuls>>> getcontractresult 00203a48dcfc26426152805be49830c72005b4648d0182bbf6c2e8980380364eb59f -{ - "success" : true, - "errorMessage" : null, - "contractAddress" : "tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L", - "result" : null, - "gasLimit" : 200000, - "gasUsed" : 14029, - "price" : "0.00000025", - "totalFee" : 0.0, - "txSizeFee" : 0.0, - "actualContractFee" : 0.0, - "refundFee" : 0.0, - "stateRoot" : "be76399c41a8cb4be5ecf80e04dab36830b124cb1c43fea6ca69ae62259899ba", - "value" : 0.0, - "stackTrace" : null, - "balance" : 0.0, - "transfers" : [ ], - "events" : [ "{\"contractAddress\":\"tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L\",\"blockNumber\":46,\"event\":\"TransferEvent\",\"payload\":{\"from\":null,\"to\":\"tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD\",\"value\":\"200000000\"}}" ], - "tokenTransfers" : [ { - "contractAddress" : "tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L", - "from" : null, - "to" : "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", - "value" : "200000000", - "name" : "QKB", - "symbol" : "QKB", - "decimals" : 2 - } ], - "remark" : "create" -} - - -``` - -### Get the contract constructor - -Gets the list of parameters that need to be passed in to create the specified contract - -- **command:getcontractcontructor <contractCode>** - -| Parameter | Description | -| ----------------- | ----------------------------- | -| <contractCode> | Hex code of the contract code | - -return value - -``` -skip - -``` - -example - -``` -nuls>>> getcontractcontructor 504b03040a000008000.........20000b31600000000 -{ - "constructor" : { - "name" : "", - "desc" : "(String name, String symbol, BigInteger initialAmount, int decimals) return void", - "args" : [ { - "type" : "String", - "name" : "name", - "required" : true - }, { - "type" : "String", - "name" : "symbol", - "required" : true - }, { - "type" : "BigInteger", - "name" : "initialAmount", - "required" : true - }, { - "type" : "int", - "name" : "decimals", - "required" : true - } ], - "returnArg" : "void", - "view" : false, - "event" : false, - "payable" : false - }, - "isNrc20" : true -} - - -``` - -### Gets the list of contracts created for the specified account - -Gets the list of contracts created by the specified account address - -- **command:getaccountcontracts <createAddress>** - -| Parameter | Description | -| ------------------ | --------------- | -| <createAddress> | account address | - -return value - -``` -{ - "contractAddress" : "tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L", - "createTime" : "2019-03-26 09:28:26.026", - "height" : 46, - "confirmCount" : 402, - "remarkName" : null, - "status" : 2, - "msg" : null, - "create" : true -} - -``` - -example - -``` -nuls>>> getaccountcontracts tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD -[ { - "contractAddress" : "tNULSeBaMz7vkyhgqLXVdcT75dC5udULVs1D2L", - "createTime" : "2019-03-26 09:28:26.026", - "height" : 46, - "confirmCount" : 402, - "remarkName" : null, - "status" : 2, - "msg" : null, - "create" : true -}, { - "contractAddress" : "tNULSeBaMzsHrbMy2VK23RzwjkXS1qo2ycG5Cg", - "createTime" : "2019-03-25 16:08:25.025", - "height" : 253, - "confirmCount" : 195, - "remarkName" : null, - "status" : 0, - "msg" : null, - "create" : true -}, { - "contractAddress" : "tNULSeBaNBYK9MQcWWbfgFTHj2U4j8KQGDzzuK", - "createTime" : "2019-03-25 15:33:54.054", - "height" : 46, - "confirmCount" : 402, - "remarkName" : null, - "status" : 0, - "msg" : null, - "create" : true -} ] - -``` - -### Query network information - -Query network basic information - -- **command: network info** - -Return - -```json -{ - "localBestHeight" : 35317,//latest block height locally - "netBestHeight" : 35317,//latest block height of the network - "timeOffset" : "0ms",//network time offset - "inCount" : 0,//number of in-nodes - "outCount" : 1//number of out-nodes -} - -``` - -Example - -```shell -nuls>>> network info -{ - "localBestHeight" : 35317, - "netBestHeight" : 35317, - "timeOffset" : "0ms", - "inCount" : 0, - "outCount" : 1 -} - -``` - -### Query IP's of network nodes - -Query IP's of network nodes - -- **command: network nodes** - -Return information - -```json -[" 192.168.1.223 "] - -``` - -Example: get a block with the block height - -```shell -nuls>>> network nodes -[ "192.168.1.223" ] - -``` - -### Register the Parallel Chain in the Main Chain - -Parallel chains need to complete registration in the main chain when sending cross-chain transactions, this command needs to run on the main network node - -- **command: registercrosschain <address> <chainId> <chainName> <magicNumber> <assetId> <symbol> <assetName> <initNumber> [decimalPlaces] [minAvailableNodeNum] [txConfirmedBlockNum]** - -| Parameter | Specification | -| --------------------- | ------------------------------------------------------------ | -| <address> | registered cross-chain fee payment account | -| <chainId> | registered chain id | -| <chainName> | registered chain name | -| <magicNumber> | magic number parameter of the registered running chain | -| <assetId> | registered asset id | -| <symbol> | asset abbreviation e.g. BTC | -| <assetName> | asset name | -| <initNumber> | initiated asset amount | -| [decimalPlaces] | asset decimal places default 8 | -| [minAvailableNodeNum] | cross-chain transaction available conditions: minimum number of available nodes, default 5 | -| [txConfirmedBlockNum] | the number of confirmed blocks for the registered transaction, default 30 | - -Return - -``` -6c29d99c2b02cfc766ef25bee2ea619610a5fce1d778c3038885111f590ae312 #registered transaction hash - -``` - -Example - -```nuls>>> registercrosschain tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD 3 testchain 123456 10 TB tb 1000 -Please enter the password. -Enter your password:********** -6c29d99c2b02cfc766ef25bee2ea619610a5fce1d778c3038885111f590ae312 - -``` - -### Query Parallel Chain Registration Information - -Query the registration information of a test on the main network - -- **Command: crosschaininfo <chainId>** - -| Parameter | Specification | -| ------------ | ------------------- | -| <chainId> | registered chain id | - -Return - -```{ - "chainId" : 3, - "chainName" : "testchain", - "addressType" : "1", - "magicNumber" : 123456, - "minAvailableNodeNum" : 5, - "txConfirmedBlockNum" : 0, - "regAddress" : "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", - "regTxHash" : "6c29d99c2b02cfc766ef25bee2ea619610a5fce1d778c3038885111f590ae312", - "createTime" : 1557739548367, - "seeds" : "192.168.1.192:8088", - "selfAssetKeyList" : [ "3-10" ], - "totalAssetKeyList" : [ "3-10" ] -} - -``` - -Return chain specification - -| parameter | required | type | description | -| ------------------- | -------- | ------ | ------------------------------------------------------------ | -| chainId | true | int | chain symbol | -| assetId | true | int | asset id | -| chainName | true | string | chain name | -| addressType | true | int | the address type of the account created on the chain: 1 within the ecological 2 non-ecological | -| magicNumber | true | string | magic number | -| minAvailableNodeNum | true | int | minimum number of available nodes | -| txConfirmBlockNum | true | int | transaction confirmation block number | -| symbol | true | string | asset symbol | -| assetName | true | string | asset name | -| initNumber | true | string | asset initial number | -| decimalPlaces | true | int | minimum asset separable digits | -| address | true | string | the main network address of created chain | -| password | true | string | private key password | - -Example - -``` -nuls>>> crosschaininfo 11 -{ - "chainId" : 11, - "chainName" : "Neth", - "addressType" : "1", - "magicNumber" : 20190303, - "minAvailableNodeNum" : 5, - "txConfirmedBlockNum" : 0, - "regAddress" : "tNULSeBaMgDEcAUhPSdF3D3C6mT54HPUt81cQ4", - "regTxHash" : "7a672b093b274b93bc145dda0e598eddf1f1cf0ccb9aba3e67b3899a5b4ad7a1", - "createTime" : 1557921296460, - "seeds" : "192.168.1.192:8088", - "selfAssetKeyList" : [ "11-1" ], - "totalAssetKeyList" : [ "11-1", "2-1" ] -} - -``` - -### Send Cross-chain Transaction - -- **Command: getecrosstx <chainId> <formAddress> <toAddress> <assetChainId> <assetId> <amount> [remark]** - -| Parameter | Specification | -| ----------------- | ------------------------------- | -| <chainId> | chain id of running transaction | -| <formAddress> | from address | -| <toAddress> | to address | -| <assetChainId> | chain Id of the transfer asset | -| <assetId> | transfer asset id | -| <amount> | transfer amount of assets | -| <remark> | transfer remark | - -Return :transaction hash - -``` -529bb34c0f4760fa55dd98b92d3e913ed2306b7ac1f93c4491007e266bb04ef5 - -``` - -Example - -``` -nuls>>> createcrosstx 2 tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD M9busmFhQeu1Efn6rDyeQkFjHxv2dSzkuH8 2 1 1 -Please enter the password. -Enter your password:********** -529bb34c0f4760fa55dd98b92d3e913ed2306b7ac1f93c4491007e266bb04ef5 - -``` - -### Query Cross-chain Transaction Confirmation Status - -- **Command:getcrosstxstate <chainId> <txHash>** - -| Parameter | Specification | -| ------------ | -------------------------- | -| <chainId> | currently running chain id | -| <txHash> | transaction hash | - -Return - -``` -Confirmed | Unconfirmed - -``` - -Example - -``` -nuls>>> getcrosstxstate 2 529bb34c0f4760fa55dd98b92d3e913ed2306b7ac1f93c4491007e266bb04ef5 -Unconfirmed - -``` - -### Exit the wallet CLI - -Exit the command line, it won’t stop the wallet. - -- **command: exit** - -Example - -```shell -nuls>>> exit - -``` - diff --git a/docs/guide/g_multi_sign_account.md b/docs/guide/g_multi_sign_account.md deleted file mode 100644 index 6d5d9273..00000000 --- a/docs/guide/g_multi_sign_account.md +++ /dev/null @@ -1,223 +0,0 @@ -# Multi-signature account - -## Introduction - -Multi-signature accounts are relative to single-signature accounts. The common account address we use every day is that a single-signature account needs to be signed with our account private key when creating a transaction to ensure that our transaction is safe and not changed. .The multi-signature account address is generated by a certain calculation by a public key of multiple common accounts.When creating a transaction, it needs to be signed by the private key corresponding to the multiple public keys that create this multi-signed account, in order to ensure the security of multi-signing account transactions. - -When generating a multi-sign account, the public key of N common addresses is used to generate a multi-sign account that requires M signatures to create a legitimate transaction, N ≥ M.Therefore, this account generally requires multiple people to sign, and the minimum number of signatures (M) can be used to use the account's token. - -## Features - -Multi-signature accounts in nuls2.0 can do some of the same operations as regular accounts: - -- Create multi-sign transfer transactions with multi-asset transfers -- Set an alias for a multi-signed account -- Create a consensus node -- Participation in consensus - -## Instructions - -We'll cover how to use the various features of a multi-signature account, the issues you might encounter, and the issues developers need to pay attention when assembling multi-sign transactions.Developers may need to have some knowledge of the nuls2.0 general transaction before reading this article.This document contains some interface descriptions. For a more complete description, please refer to the module documentation. - -**Generate multi-signature accounts** - -A multi-signature account is generated by multiple common addresses in order to satisfy the functional scenario of an asset transaction that allows multiple people to control an account.Therefore, when creating a multi-sign account, neither the public key nor the private key is generated, but the generated multi-sign account information includes the public key, the minimum number of signatures, the multi-signing account address, etc. of all participants when the account is generated. information. -It is worth noting that the participant public key list is a string list parameter with compatibility. The list can be used to input the string of the common account public key or the string of the account address, and can be mixed in, for example. There are three common accounts a, b, and c, and you need to create a multi-signature account. The public key list can be as follows: -``` -pubKeys = [public key of A account, address of B account, public key of C account] -``` -note -* If you want to pass in the account address, then the address account needs to exist in the node that invokes the interface. The public key string does not have this restriction. -* The order in which each public key in the pubKeys public key list is passed does not affect the resulting account. -* The public key string can be obtained by calling the interface module 'ac_getPubKey`. - -**Create a multi-sign transfer transaction** - -The multi-signature address transfer transaction in NULS 2.0 is consistent with the general address transfer transaction protocol and has the same transaction type (type value).However, multi-sign transfer transactions still have special characteristics. The rules for assembling and verifying transactions are different from ordinary transactions. Some things to note are: - -- Transaction from can not mix multiple different addresses, multi-sign transfer transactions If multiple from is assembled, then all from addresses can only be the same multi-sign address, the assets in from can be different, the transaction to There is no such restriction. -- Signatures or signatures when assembling new deals. -- Broadcast transactions are automatically sent when the minimum number of signatures is reached after signing. -- There is no need to continue signing transactions that have reached the minimum number of signatures, it will only increase transaction data, and will not bring more convenience to transaction verification and security. - -**signature** - -After the multi-signal transaction is assembled, it is generally necessary to hand over the transaction data to each multi-sign account controller to sign the transaction separately, so that the minimum signature number of the multi-sign account is satisfied, and finally complete and legal transaction data is obtained.The multi-signing transaction signature interface of nuls2.0 automatically verifies whether the transaction reaches the minimum number of signatures after each execution of the signature, to decide whether to send and broadcast the transaction, without the user separately broadcasting the transaction. -- When multiple people sign, the next signer only needs to get the value of tx in the return value. - -**Set alias **, **Create node **, **delegate **, **Exit delegate **, **Stop node ** transaction is basically the same as ordinary account transaction, but the signature method is different. - -## interface -### ac_createMultiSignAccount -Create a multi-sign account /create a multi sign account - -| Parameter Name | Parameter Type | Parameter Description | Is Not Empty | -| -------- | :-------------: | ------------------------------------------------------------ | :------: | -| chainId | int | chain id | yes | -| pubKeys | list<string> | Public key collection (public key of any common address or common account address present in the current node) | Yes | -minSigns | int | Minimum Signature | Yes | - -return value - -| Field Name | Field Type | Parameter Description | -| ------- | :------: | ------------ | -| address | string | Multi-Sign Account Address| - - -### ac_createMultiSignTransfer -Create a multi-signal address transfer transaction /create multi sign transfer - -| Parameter Name | Parameter Type | Parameter Description | Is Not Empty | -| ------------------------------------------------------------ | :--------: | ------------------------------------------ | :------: | -| chainId | int | chain id | yes | -| inputs | list | Transaction payer data | Yes | -|         address | string | Account Address| Yes | -|         assetsChainId | integer | Asset Chain ID | Yes | -|         assetsId | integer | Asset ID | Yes | -|         amount | biginteger | Quantity | Yes | -| outputs | list | Transaction Recipient Data | Yes | -|         address | string | Account Address| Yes | -|         assetsChainId | integer | Asset Chain ID | Yes | -|         assetsId | integer | Asset ID | Yes | -|         amount | biginteger | Quantity | Yes | -|         lockTime | long | unlock time, -1 is always locked, 0 is not locked (default) | no| -| remark | string | Transaction Notes | Yes | -| signAddress | string | The first signature account address (without filling, only create transactions are not signed) | No | -| signPassword | string | The first signature account password (without filling, only create transactions are not signed) | No | - -return value - -| Field Name | Field Type | Parameter Description | -| --------- | :------: | ----------------------------------------------------------- | -| tx | string | Complete transaction serialization string, continue signature if the transaction does not reach the minimum number of signatures | -| txHash | string | Trading hash | -| completed | boolean | true: the transaction is complete (broadcast), false: the transaction is not completed, the minimum number of signatures has not been reached | - - -### ac_signMultiSignTransaction -Multi-sign transaction signature / sign MultiSign Transaction - -| Parameter Name | Parameter Type | Parameter Description | Is Not Empty | -| ------------ | :------: | -------------- | :------: | -| chainId | int | chain id | yes | -| tx | string | Transaction Data String | Yes | -| signAddress | string | Signature Account Address | Yes | -| signPassword | string | Signature Account Password | Yes | - -return value - -| Field Name | Field Type | Parameter Description | -| --------- | :------: | ----------------------------------------------------------- | -| tx | string | Complete transaction serialization string, continue signature if the transaction does not reach the minimum number of signatures | -| txHash | string | Trading hash | -| completed | boolean | true: the transaction is complete (broadcast), false: the transaction is not completed, the minimum number of signatures has not been reached | - -### ac_setMultiSignAlias -Set the alias of multi sign account - -| Parameter Name | Parameter Type | Parameter Description | Is Not Empty | -| ------------ | :------: | ------------------------------------------ | :------: | -| chainId | int | chain id | yes | -| address | string | Multi-Sign Account Address | Yes | -| alias | string | alias | yes | -| signAddress | string | The first signature account address (without filling, only create transactions are not signed) | No | -| signPassword | string | The first signature account password (without filling, only create transactions are not signed) | No | - -return value - -| Field Name | Field Type | Parameter Description | -| --------- | :------: | ----------------------------------------------------------- | -| tx | string | Complete transaction serialization string, continue signature if the transaction does not reach the minimum number of signatures | -| txHash | string | Trading hash | -| completed | boolean | true: the transaction is complete (broadcast), false: the transaction is not completed, the minimum number of signatures has not been reached | - - - -### cs_createMultiAgent - -Multi-Sign Account Create Agent transaction - -| Parameter Name | Parameter Type | Parameter Description | Is Not Empty | -| -------------- | :------: | --------------------- | :------: | -| chainId | int | chain id | yes | -| agentAddress | string | node address (multiple signing address) | yes | -| packingAddress | string | Node Block Address | Yes | -| rewardAddress | string | reward address, default node address | no | -| commissionRate | int | Commission Ratio | Yes | -| deposit | string | Mortgage amount | Yes | -| password | string | Signature Account Password | Yes | -| signAddress | string | Signature Account Address | Yes | - -return value - -| Field Name | Field Type | Parameter Description | -| --------- | :------: | ----------------------------------------------------------- | -| tx | string | Complete transaction serialization string, continue signature if the transaction does not reach the minimum number of signatures | -| txHash | string | Trading hash | -| completed | boolean | true: the transaction is complete (broadcast), false: the transaction is not completed, the minimum number of signatures has not been reached | - - - -### cs_multiDeposit - -Multi-Sign Account deposit agent transaction - -| Parameter Name | Parameter Type | Parameter Description | Is Not Empty | -| ----------- | :------: | ------------ | :------: | -| chainId | int | chain id | yes | -| address | string | Multi-Sign Account Address | Yes | -| agentHash | string | Node HASH | Yes | -| deposit | string | commission amount | yes | -| password | string | Signature Account Password | Yes | -| signAddress | string | Signature Account Address | Yes | - -return value - -| Field Name | Field Type | Parameter Description | -| --------- | :------: | ----------------------------------------------------------- | -| tx | string | Complete transaction serialization string, continue signature if the transaction does not reach the minimum number of signatures | -| txHash | string | Trading hash | -| completed | boolean | true: the transaction is complete (broadcast), false: the transaction is not completed, the minimum number of signatures has not been reached | - - - -### cs_multiWithdraw - -Multi-Sign Account withdraw deposit agent transaction - -| Parameter Name | Parameter Type | Parameter Description | Is Not Empty | -| ----------- | :------: | ---------------- | :------: | -| chainId | int | chain id | yes | -| address | string | Multi-Sign Account Address | Yes | -| txHash | string | Join the consensus transaction HASH | Yes | -| password | string | Signature Account Password | Yes | -| signAddress | string | Signature Account Address | Yes | - -return value - -| Field Name | Field Type | Parameter Description | -| --------- | :------: | ----------------------------------------------------------- | -| tx | string | Complete transaction serialization string, continue signature if the transaction does not reach the minimum number of signatures | -| txHash | string | Trading hash | -| completed | boolean | true: the transaction is complete (broadcast), false: the transaction is not completed, the minimum number of signatures has not been reached | - - - -### cs_stopMultiAgent - -Multi-Sign Account Stop Agent - -| Parameter Name | Parameter Type | Parameter Description | Is Not Empty | -| ----------- | :------: | ------------------ | :------: | -| chainId | int | chain id | yes | -| address | string | node address (multiple signing address) | yes | -| password | string | Signature Account Password | Yes | -| signAddress | string | Signature Account Address | Yes | - -return value - -| Field Name | Field Type | Parameter Description | -| --------- | :------: | ----------------------------------------------------------- | -| tx | string | Complete transaction serialization string, continue signature if the transaction does not reach the minimum number of signatures | -| txHash | string | Trading hash | -| completed | boolean | true: the transaction is complete (broadcast), false: the transaction is not completed, the minimum number of signatures has not been reached | diff --git a/docs/guide/g_transaction.md b/docs/guide/g_transaction.md deleted file mode 100644 index 38b0f9b7..00000000 --- a/docs/guide/g_transaction.md +++ /dev/null @@ -1,16 +0,0 @@ -# Trading guide for NULS - -## Trade guide for Huobi platform - -- 中文:[https://huobiglobal.zendesk.com/hc/zh-cn/categories/115000389432](https://huobiglobal.zendesk.com/hc/zh-cn/categories/115000389432) -- English:[https://huobiglobal.zendesk.com/hc/en-us/categories/115000389432](https://huobiglobal.zendesk.com/hc/en-us/categories/115000389432) - -## Trade guide for Binance platform - -- 中文:[https://support.binance.com/hc/zh-cn/categories/115000056052](https://support.binance.com/hc/zh-cn/categories/115000056052) -- English:[https://support.binance.com/hc/en-us/categories/115000056052](https://support.binance.com/hc/zh-cn/categories/115000056052) - -## Trade guide for OKEX platform - -- 中文:[https://support.okex.com/hc/zh-cn/categories/115000275231](https://support.okex.com/hc/zh-cn/categories/115000275231) -- English:[https://support.okex.com/hc/en-us/categories/115000275231](https://support.okex.com/hc/en-us/categories/115000275231) \ No newline at end of file