API-RESTFUL

NULS customized the NULS2.0 wallet version required for docking. The docking wallet embeds the NULS-API module. The module encapsulates the NULS-SDK function, uses the HTTP protocol to access the interface, and supports JSON-RPC. And Restful two formats.

beta wallet download address

NULS-API offline operation tool download address

Settings

The default port number for the `NULS-API` module is 18004, which can be modified in the nuls.ncf configuration file, as follows:
[nuls-API]
#httpServerStart port
server_port=18004

Description

In order to better understand the related business of nuls2.0, and the meaning of the return value of the interface, do some explanation here in advance.

Online & Offline

The nuls-api module provides several online and offline interfaces.

Online interface: The wallet must operate normally and be able to connect to other nodes in the network to properly synchronize blocks and broadcast data.Before calling the online interface, it is best to sync to the latest block.The data generated by the interface is saved in the wallet.For example, create an account, change a password, transfer money, get a block header, and so on.

Offline interface: NULS 2.0 provides a NULS-API tool for offline operation .No need to install a wallet, you can run independently on a server that is not connected to the network.The user receives the relevant parameters by calling the offline interface, and obtains the return value, and the corresponding data is not stored in the wallet.For example, creating an account offline, offline assembly transfer transactions, offline signatures, and the like.

Field Description

chain's chainId:

Nuls2.0 supports multi-chain parallel and cross-chain transfer. Each chain is distinguished by chain id. The chain id of the nuls main network is 1, and the chain id of the nuls test network is 2.

Chain assets:

NULS 2.0 supports each chain in addition to the default assets, dynamically add assets according to business needs.Each asset of each chain is distinguished by a composite primary key of the chain ID and the asset ID.For example, NULS of the NULS main network, chainId=1, assetId=1

** Type value of the transaction: **

NULS2.0 has multiple transactions by default. Each transaction has different functions. When calling the interface to query the transaction details, the type field can be used to distinguish different transaction types. The following are the enumeration values of the transaction type:
int COIN_BASE = 1;						// coinBase block reward
int TRANSFER = 2;						// transfer
int ACCOUNT_ALIAS = 3;					/ / Set the account alias
int REGISTER_AGENT = 4;					// New consensus node
int DEPOSIT = 5;						// Entrusted to participate in the consensus
int CANCEL_DEPOSIT = 6;					// cancel the delegate consensus
int YELLOW_PUNISH = 7;					// yellow card
int RED_PUNISH = 8;						// red card
int STOP_AGENT = 9;						// Unregister the consensus node
int CROSS_CHAIN = 10;					// Cross-chain transfer
int REGISTER_CHAIN_AND_ASSET = 11;		// registration chain
int DESTROY_CHAIN_AND_ASSET = 12;		// Logout chain
int ADD_ASSET_TO_CHAIN = 13;			// Add an asset to the chain
int REMOVE_ASSET_FROM_CHAIN = 14;		// Delete the assets on the chain
int CREATE_CONTRACT = 15;				// Create a smart contract
int CALL_CONTRACT = 16;					/ / Call smart contract
int DELETE_CONTRACT = 17;				// delete the smart contract
int CONTRACT_TRANSFER = 18;				// Internal transfer of the contract
int CONTRACT_RETURN_GAS = 19;			// Contract execution fee refund
int CONTRACT_CREATE_AGENT = 20;			// contract new consensus node
int CONTRACT_DEPOSIT = 21;				// Contract commissioned to participate in the consensus
int CONTRACT_CANCEL_DEPOSIT = 22;		// Contract cancellation commission consensus
int CONTRACT_STOP_AGENT = 23;			// Contract cancellation consensus node
int VERIFIER_CHANGE = 24;				// certifier change

From and to: of the transaction

Take a transfer transaction as an example: tx.type = 2

From is the transferor of the transfer transaction, each from a certain amount of assets transferred as a transferor, wherein the nonce value will change after each transfer, you can get the current latest nonce value by calling the query account balance interface.

To is the recipient of the transfer transaction, each to is regarded as the recipient receives the amount of an asset, where lockTime is the lock time.When the lock time is greater than 0, it means that the real time exceeds this value, the asset can be used normally; when lockTime = -1, it means permanent lock, special transaction is needed to unlock, such as participation in the consensus and cancellation of the consensus .

Transaction fee = the sum of the main assets of the chain - the sum of the main assets of the chain

interview method

  • json-rpc access method

    Add request header Content-Type: application/json;charset=UTF-8

    HttpMethod: POST

    URL: http://{ip}:{port}/jsonrpc

      Example: http://127.0.0.1:18004/jsonrpc
    

    Request data format:

    {
      "jsonrpc":"2.0",
      "method": "methodCMD", //interface name
      "params":[], //All interface parameters are passed as arrays, and the order of the parameters cannot be changed. If the parameters are not required, they must also be filled in null placeholders.
      "id":1234
    }
    
  • restful access method

    Add request header Content-Type: application/json;charset=UTF-8

    For the rest, please refer to the RESTFUL interface documentation

Interface debugging

We provide the import files (JSON-RPC and RESTFUL) of the Postman interface tuning tool. After importing, you can debug the interface.

JSON-PRC Interface Debugging - POSTMAN Import File

RESTFUL Interface Debugging - POSTMAN Import File

Interface List

0.1 Get information about this chain

Cmd: /api/info

Detailed description: Get information about this chain

HttpMethod: GET

parameter list

No parameters

return value

Field Name Field Type Parameter Description
chainId string ID of this chain
assetId string ID of the default primary asset of this chain
inflationAmount string The initial number of default primary assets for this chain
agentChainId string Chain ID of the chain consensus asset
agentAssetId string ID of the chain consensus asset

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.1 Creating accounts in batches

Cmd: /api/account

Detailed description: The created account exists in the local wallet

HttpMethod: POST

Form json data:

{
  "count" : 0,
  "prefix" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form accountcreateform Create Account Form in Batch Yes
        count int New Account Quantity Yes
        prefix string address prefix no
        password string Account Password Yes

return value

Field Name Field Type Parameter Description
list list<string> Account Address

Example request data:

request path: slightly

request form data:

{
  "count" : 1,
  "password" : "abcd1234"
}

Example response data:

{
  "success" : true,
  "data" : {
    "list" : [ "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG" ]
  }
}

1.2 Modify account password

Cmd: /api/account/password/{address}

Detailed description: Change account password

HttpMethod: PUT

Form json data:

{
  "password" : null,
  "newPassword" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
address string account address yes
form accountupdatepasswordform Account Password Information Form Yes
        password string original password yes
        newPassword string new password yes

return value

Field Name Field Type Parameter Description
value boolean Whether to modify successfully

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.3 Export account private key

Cmd: /api/account/prikey/{address}

Detailed description: Only the private key of the existing account of the local wallet can be exported

HttpMethod: POST

Form json data:

{
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
address string account address yes
form accountpasswordform Account Password Information Form Yes
        password string Password Yes

return value

Field Name Field Type Parameter Description
value string private key

Example request data:

request path: http://localhost:18004/api/account/prikey/tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG

request form data:

{
  "password" : "abcd1111"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "c55c80b0afcbebea36bc2cc1f07a1946935fe578c0c8c35190180f99619d5f48"
  }
}

1.4 Importing an account based on a private key

Cmd: /api/account/import/pri

Detailed description: When importing the private key, you need to enter the password to encrypt the plaintext private key

HttpMethod: POST

Form json data:

{
  "priKey" : null,
  "password" : null,
  "overwrite" : false
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form accountprikeypasswordform Import account form based on private key Yes
        priKey string Private Key Yes
        password string Password Yes
        overwrite boolean Whether to overwrite the account: false: Do not overwrite import, true: Overwrite import Yes

return value

Field Name Field Type Parameter Description
value string Account Address

Example request data:

request path: slightly

request form data:

{
  "priKey" : "c55c80b0afcbebea36bc2cc1f07a1946935fe578c0c8c35190180f99619d5f48",
  "password" : "abcd1234",
  "overwrite" : true
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG"
  }
}

1.5 Importing accounts based on keyStore

Cmd: /api/account/import/keystore

Detailed description: Import account according to keyStore

HttpMethod: POST

parameter list

Parameter Name Parameter Type Parameter Description Required
Import account based on private key inputstream Import account form based on private key Yes
        Import accounts based on private key inputstream Import account form based on private key Yes

return value

Field Name Field Type Parameter Description
value string Account Address

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.6 Importing accounts based on the keystore file path

Cmd: /api/account/import/keystore/path

Detailed description: Import account according to the keystore file path

HttpMethod: POST

Form json data:

{
  "path" : null,
  "password" : null,
  "overwrite" : false
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form accountkeystoreimportform Import account form based on keystore file path Yes
        path string local keystore file path Yes
        password string Password Yes
        overwrite boolean Whether to overwrite the account: false: Do not overwrite import, true: Overwrite import Yes

return value

Field Name Field Type Parameter Description
value string Account Address

Example request data:

request path: slightly

request form data:

{
  "path" : "e:\\tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG.keystore",
  "password" : "abcd1234",
  "overwrite" : true
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG"
  }
}

1.7 Importing accounts based on keystore strings

Cmd: /api/account/import/keystore/json

Detailed description: Import account based on keystore string

HttpMethod: POST

Form json data:

{
  "keystore" : {
    "address" : null,
    "encryptedPrivateKey" : null,
    "pubKey" : null,
    "prikey" : null
  },
  "password" : null,
  "overwrite" : false
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form accountkeystorejsonimportform Import Account Form from Keystore String Yes
        keystore object keystore string yes
                address string Account Address Yes
                encryptedPrivateKey string Encrypted Private Key Yes
                pubKey string Public Key Yes
                prikey string Private Key Yes
        password string Password Yes
        overwrite boolean Whether to overwrite the account: false: Do not overwrite import, true: Overwrite import Yes

return value

Field Name Field Type Parameter Description
value string Account Address

Example request data:

request path: slightly

request form data:

{
  "keystore" : {
    "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
    "encryptedPrivateKey" : "54793157409d0414248ef290eac96270c1a0115d712e845f0eb372bb977cbc0cafe39d598175473fa1bd5329dd1fae95",
    "pubKey" : "023cee1aa6158ee640c8f48f9a9fa9735c8ed5426f2c353b0ed65e123033d820e6",
    "prikey" : null
  },
  "password" : "abcd1234",
  "overwrite" : true
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG"
  }
}

1.8 Account backup, export the AccountKeyStore file to the specified directory

Cmd: /api/account/export/{address}

Detailed description: Account backup, export AccountKeyStore file to the specified directory

HttpMethod: POST

Form json data:

{
  "password" : null,
  "path" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
address string account address yes
form accountkeystorebackup keystone export information form Yes
        password string Password Yes
        path string File Path Yes

return value

Field Name Field Type Parameter Description
path string Exported file path

Example request data:

request path: http://localhost:18004/api/account/export/tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG

request form data:

{
  "password" : "abcd1234",
  "path" : "e:/"
}

Example response data:

{
  "success" : true,
  "data" : {
    "path" : "e:\\\\tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG.keystore"
  }
}

1.9 Account Settings Alias

Cmd: /api/account/alias

Detailed description: The alias format is a combination of 1-20 digits lowercase letters and numbers. Setting an alias will destroy 1 nuls

HttpMethod: POST

Form json data:

{
  "address" : null,
  "alias" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form setaliasform Account Settings Alias Form Yes
        address string Account Address Yes
        alias string alias yes
        password string Account Password Yes

return value

Field Name Field Type Parameter Description
value string set the hash of the alias transaction

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.10 Querying account balance

Cmd: /api/accountledger/balance/{address}

Detailed description: According to the asset chain ID and asset ID, query the balance and nonce value of the corresponding assets of the chain account

HttpMethod: POST

Form json data:

{
  "assetChainId" : 0,
  "assetId" : 0
}

parameter list

Parameter Name Parameter Type Parameter Description Required
balanceDto balanceform Account Balance Form Yes
        assetChainId int Asset Chain ID Yes
        assetId int Asset ID Yes

return value

Field Name Field Type Parameter Description
total string total balance
freeze string lock amount
available string Available balances
timeLock string Time Locked Amount
consensusLock string Consensus Locked Amount
nonce string account asset nonce value
nonceType int 1: confirmed nonce value, 0: unconfirmed nonce value

Example request data:

request path: http://localhost:18004/api/accountledger/balance/tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG

request form data:

{
  "assetChainId" : 2,
  "assetId" : 1
}

Example response data:

{
  "success" : true,
  "data" : {
    "total" : "10000000000000",
    "freeze" : "0",
    "available" : "10000000000000",
    "timeLock" : "0",
    "consensusLock" : "0",
    "nonce" : "0000000000000000",
    "nonceType" : 1
  }
}

1.11 Verify that the address format is correct

Cmd: /api/account/address/validate

Detailed description: Verify that the address format is correct

HttpMethod: POST

parameter list

No parameters

return value

No return value

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.12 Offline - Create an account in bulk

Cmd: /api/account/offline

Detailed description: The created account will not be saved to the wallet, and the interface directly returns the keystore information of the account

HttpMethod: POST

Form json data:

{
  "count" : 0,
  "prefix" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form accountcreateform Offline Batch Create Account Form Yes
        count int New Account Quantity Yes
        prefix string address prefix no
        password string Account Password Yes

return value

Field Name Field Type Parameter Description
list list<object> Account keystore list
        address string Account Address
        pubKey string Public Key
        prikey string Clear Text Private Key
        encryptedPrivateKey string Encrypted Private Key

Example request data:

request path: slightly

request form data:

{
  "count" : 1,
  "prefix" : "tNULS",
  "password" : "abcd1234"
}

Example response data:

{
  "success" : true,
  "data" : [ {
    "address" : "tNULSeBaMoS1x2VryPZGyaVSfbaqcLfhqhbXit",
    "pubKey" : "03a299ec3c3bbb3da290a10c1deafae08f1f630e5edab89cde65f4dc0c42537c42",
    "prikey" : "",
    "encryptedPrivateKey" : "56070f74ebbcbf0097d5ceca5fc075b76f5f59bd3851be02cab08d953330c327267a2406bc6173e3093520744219c491"
  } ]
}

1.13 Obtaining the account clear text private key offline

Cmd: /api/account/priKey/offline

Detailed description: Obtain the account clear text private key offline

HttpMethod: POST

Form json data:

{
  "address" : null,
  "encryptedPriKey" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form getprikeyform Get the account clear text private key form offline Yes
        address string Account Address Yes
        encryptedPriKey string Account Ciphertext Private Key Yes
        password string Account Password Yes

return value

Field Name Field Type Parameter Description
value string Cleartext private key

Example request data:

request path: slightly

request form data:

{
  "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "encryptedPriKey" : "54793157409d0414248ef290eac96270c1a0115d712e845f0eb372bb977cbc0cafe39d598175473fa1bd5329dd1fae95",
  "password" : "abcd1234"
}

Example response data:

{
  "success" : true,
  "data" : {
    "priKey" : "c55c80b0afcbebea36bc2cc1f07a1946935fe578c0c8c35190180f99619d5f48"
  }
}

1.14 Modify account password offline

Cmd: /api/account/password/offline/

**Detailed description: Offline account password **

HttpMethod: PUT

Form json data:

{
  "address" : null,
  "encryptedPriKey" : null,
  "oldPassword" : null,
  "newPassword" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form resetpasswordform Offline Change Account Password Form Yes
        address string Account Address Yes
        encryptedPriKey string Account Ciphertext Private Key Yes
        oldPassword string Account original password Yes
        newPassword string Account New Password Yes

return value

Field Name Field Type Parameter Description
value string Encrypted private key after resetting password

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.15 Multiple Account Summary Signature

Cmd: /api/account/multi/sign

Detailed description: Multi-account transfer transaction for signature offline assembly. When calling interface, parameters can pass address and private key, or pass address and encrypted private key and encrypted password

HttpMethod: POST

Form json data:

{
  "dtoList" : [ {
    "address" : null,
    "priKey" : null,
    "encryptedPrivateKey" : null,
    "password" : null
  } ],
  "txHex" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form multisignform Multiple Account Summary Signature Form Yes
        dtoList list<object> keystore collection Yes
                address string address
                priKey string Clear Text Private Key No
                encryptedPrivateKey string Encrypt private key No
                password string Password No
        txHex string Transaction Serialization Hex String Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Signed transaction hex string

Example request data:

request path: slightly

request form data:

{
  "dtoList" : [ {
    "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
    "priKey" : "c55c80b0afcbebea36bc2cc1f07a1946935fe578c0c8c35190180f99619d5f48",
    "encryptedPrivateKey" : null,
    "password" : null
  } ],
  "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f0000000000000000000000000000000000000000000000000000000000000000000000000000"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f000000000000000000000000000000000000000000000000000000000000000000000000006921023cee1aa6158ee640c8f48f9a9fa9735c8ed5426f2c353b0ed65e123033d820e646304402203c376fd0121fce6228516c011126a8526c5bc543afb7e4272c0de708a55d834f02204ebcd942e019b77bbec37f7e2b77b591ba4ce0fbc5fe9335ab91ae925ded6bed",
    "hash" : "5a91b75e6a6d1f415638375627933b42ce7179b4c6390ca0dcc5a0c2c74bd34a"
  }
}

1.16 Clear text private key digest signature

Cmd: /api/account/priKey/sign

Detailed description: Clear text private key summary signature

HttpMethod: POST

Form json data:

{
  "txHex" : null,
  "address" : null,
  "priKey" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form prikeysignform Clear Text Private Key Summary Signature Form Yes
        txHex string Transaction Serialization Hex String Yes
        address string Account Address Yes
        priKey string Account Clear Text Private Key Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Signed transaction hex string

Example request data:

request path: slightly

request form data:

{
  "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f0000000000000000000000000000000000000000000000000000000000000000000000000000",
  "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "priKey" : "c55c80b0afcbebea36bc2cc1f07a1946935fe578c0c8c35190180f99619d5f48"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f000000000000000000000000000000000000000000000000000000000000000000000000006921023cee1aa6158ee640c8f48f9a9fa9735c8ed5426f2c353b0ed65e123033d820e646304402203c376fd0121fce6228516c011126a8526c5bc543afb7e4272c0de708a55d834f02204ebcd942e019b77bbec37f7e2b77b591ba4ce0fbc5fe9335ab91ae925ded6bed",
    "hash" : "5a91b75e6a6d1f415638375627933b42ce7179b4c6390ca0dcc5a0c2c74bd34a"
  }
}

1.17 ciphertext private key digest signature

Cmd: /api/account/encryptedPriKey/sign

Detailed description: ciphertext private key digest signature

HttpMethod: POST

Form json data:

{
  "txHex" : null,
  "address" : null,
  "encryptedPriKey" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form encryptedprikeysignform ciphertext private key summary signature form Yes
        txHex string Transaction Serialization Hex String Yes
        address string Account Address Yes
        encryptedPriKey string Account Ciphertext Private Key Yes
        password string Account Password Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Signed transaction hex string

Example request data:

request path: slightly

request form data:

{
  "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f0000000000000000000000000000000000000000000000000000000000000000000000000000",
  "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "encryptedPriKey" : "54793157409d0414248ef290eac96270c1a0115d712e845f0eb372bb977cbc0cafe39d598175473fa1bd5329dd1fae95",
  "password" : "abcd1234"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f000000000000000000000000000000000000000000000000000000000000000000000000006921023cee1aa6158ee640c8f48f9a9fa9735c8ed5426f2c353b0ed65e123033d820e646304402203c376fd0121fce6228516c011126a8526c5bc543afb7e4272c0de708a55d834f02204ebcd942e019b77bbec37f7e2b77b591ba4ce0fbc5fe9335ab91ae925ded6bed",
    "hash" : "5a91b75e6a6d1f415638375627933b42ce7179b4c6390ca0dcc5a0c2c74bd34a"
  }
}

1.18 Creating a multi-signed account

Cmd: /api/account/multiSign/create

Detailed description: Create a multi-sign account based on the public key of multiple accounts, minSigns the minimum number of signatures required to create a transaction for a multi-signed account

HttpMethod: POST

Form json data:

{
  "pubKeys" : [ ],
  "minSigns" : 0
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form multisignaccountcreateform Create a multi-sign account form Yes
        pubKeys list<string> Account Public Key Collection Yes
        minSigns int Minimum Signatures Yes

return value

Field Name Field Type Parameter Description
value string Account address

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.19 Creating an alias transaction offline

Cmd: /api/account/aliasTx/create

Detailed description: Create a multi-sign account based on the public key of multiple accounts, minSigns the minimum number of signatures required to create a transaction for a multi-signed account

HttpMethod: POST

Form json data:

{
  "address" : null,
  "alias" : null,
  "nonce" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
dto aliasdto Create a multi-signed account form Yes
        address string Account Address Yes
        alias string alias yes
        nonce string Asset nonce value Yes
        remark string Transaction Notes No

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization hex string

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.20 Multi-signed account offline creation set alias transaction

Cmd: /api/account/multiSign/aliasTx/create

**Detailed description: Multi-signed account offline creation set alias transaction **

HttpMethod: POST

Form json data:

{
  "address" : null,
  "alias" : null,
  "nonce" : null,
  "remark" : null,
  "pubKeys" : [ ],
  "minSigns" : 0
}

parameter list

Parameter Name Parameter Type Parameter Description Required
dto multisignaliasdto Create an Alias Transaction Form Yes
        address string Account Address Yes
        alias string alias yes
        nonce string Asset nonce value Yes
        remark string Transaction Notes No
        pubKeys list<string> Public Key Collection Yes
        minSigns int Minimum Signatures Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization hex string

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

1.21 Get the account address format based on the private key

Cmd: /api/account/address/priKey

Detailed description: Get account address format based on private key

HttpMethod: POST

Form json data:

{
  "priKey" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
form prikeyform private key form yes
        priKey string Account Clear Text Private Key Yes

return value

Field Name Field Type Parameter Description
value string Account Address

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

2.1 Query block header according to block height

Cmd: /api/block/header/height/{height}

**Detailed description: Query block header according to block height **

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
height long block height yes

return value

Field Name Field Type Parameter Description
hash string hash value of the block
preHash string hash value of the previous block
merkleHash string Merkel hash
time string Block generation time
height long block height
txCount int Number of Block Packaged Transactions
blockSignature string Signature Hex.encode(byte[])
size int Size
packingAddress string Packing address
roundIndex long Consensus Round
consensusMemberCount int Number of Consensus Members
roundStartTime string Current Consensus Round Start Time
packingIndexOfRound int The current round of packaging out the block rankings
mainVersion short Current version of the main network
blockVersion short The version of the block, which can be understood as the version of the local wallet
stateRoot string Smart Contract World State Root
txHashList list<string> Block packed transaction hash collection

Example request data:

request path: http://localhost:18004/api/block/header/height/1

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "hash" : "0b21cc1e77865f3e414e69ccb63d65c2bdedd98f2aa3d6e414d4791ee897190f",
    "preHash" : "d8880f913c984e4dece5cfb3f5f1d96d6ee923ffb0b47be0079fe84472ddda83",
    "merkleHash" : "bace93bafd0834437019ad402bbcdc274b6c29c806d72135adbed9e46c7a4450",
    "time" : "1970-01-19 10:14:32.032",
    "height" : 1,
    "txCount" : 1,
    "blockSignature" : "473045022100a6a41777c78a3faafb7735d3b28a8bdb2501601bb4953fbbdcd48e892415fb3f02204c72100178b85d9ae4486808d0fa404e63f54912eea27bfd931da558fc3b8599",
    "size" : 247,
    "packingAddress" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
    "roundIndex" : 156327293,
    "consensusMemberCount" : 1,
    "roundStartTime" : "1970-01-19 10:14:32.032",
    "packingIndexOfRound" : 1,
    "mainVersion" : 1,
    "blockVersion" : 1,
    "stateRoot" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
  }
}

2.2 Query block header based on block hash

Cmd: /api/block/header/hash/{hash}

Detailed description: Query block header according to block hash

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
hash string block hash yes

return value

Field Name Field Type Parameter Description
hash string hash value of the block
preHash string hash value of the previous block
merkleHash string Merkel hash
time string Block generation time
height long block height
txCount int Number of Block Packaged Transactions
blockSignature string Signature Hex.encode(byte[])
size int Size
packingAddress string Packing address
roundIndex long Consensus Round
consensusMemberCount int Number of Consensus Members
roundStartTime string Current Consensus Round Start Time
packingIndexOfRound int The current round of packaging out the block rankings
mainVersion short Current version of the main network
blockVersion short The version of the block, which can be understood as the version of the local wallet
stateRoot string Smart Contract World State Root
txHashList list<string> Block packed transaction hash collection

Example request data:

request path: http://localhost:18004/api/block/header/hash/0b21cc1e77865f3e414e69ccb63d65c2bdedd98f2aa3d6e414d4791ee897190f

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "hash" : "0b21cc1e77865f3e414e69ccb63d65c2bdedd98f2aa3d6e414d4791ee897190f",
    "preHash" : "d8880f913c984e4dece5cfb3f5f1d96d6ee923ffb0b47be0079fe84472ddda83",
    "merkleHash" : "bace93bafd0834437019ad402bbcdc274b6c29c806d72135adbed9e46c7a4450",
    "time" : "1970-01-19 10:14:32.032",
    "height" : 1,
    "txCount" : 1,
    "blockSignature" : "473045022100a6a41777c78a3faafb7735d3b28a8bdb2501601bb4953fbbdcd48e892415fb3f02204c72100178b85d9ae4486808d0fa404e63f54912eea27bfd931da558fc3b8599",
    "size" : 247,
    "packingAddress" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
    "roundIndex" : 156327293,
    "consensusMemberCount" : 1,
    "roundStartTime" : "1970-01-19 10:14:32.032",
    "packingIndexOfRound" : 1,
    "mainVersion" : 1,
    "blockVersion" : 1,
    "stateRoot" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
  }
}

2.3 Querying the latest block header information

Cmd: /api/block/header/newest

Detailed description: Query the latest block header information

HttpMethod: GET

parameter list

No parameters

return value

Field Name Field Type Parameter Description
hash string hash value of the block
preHash string hash value of the previous block
merkleHash string Merkel hash
time string Block generation time
height long block height
txCount int Number of Block Packaged Transactions
blockSignature string Signature Hex.encode(byte[])
size int Size
packingAddress string Packing address
roundIndex long Consensus Round
consensusMemberCount int Number of Consensus Members
roundStartTime string Current Consensus Round Start Time
packingIndexOfRound int The current round of packaging out the block rankings
mainVersion short Current version of the main network
blockVersion short The version of the block, which can be understood as the version of the local wallet
stateRoot string Smart Contract World State Root
txHashList list<string> Block packed transaction hash collection

Example request data:

request path: slightly

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "hash" : "0b21cc1e77865f3e414e69ccb63d65c2bdedd98f2aa3d6e414d4791ee897190f",
    "preHash" : "d8880f913c984e4dece5cfb3f5f1d96d6ee923ffb0b47be0079fe84472ddda83",
    "merkleHash" : "bace93bafd0834437019ad402bbcdc274b6c29c806d72135adbed9e46c7a4450",
    "time" : "1970-01-19 10:14:32.032",
    "height" : 1,
    "txCount" : 1,
    "blockSignature" : "473045022100a6a41777c78a3faafb7735d3b28a8bdb2501601bb4953fbbdcd48e892415fb3f02204c72100178b85d9ae4486808d0fa404e63f54912eea27bfd931da558fc3b8599",
    "size" : 247,
    "packingAddress" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
    "roundIndex" : 156327293,
    "consensusMemberCount" : 1,
    "roundStartTime" : "1970-01-19 10:14:32.032",
    "packingIndexOfRound" : 1,
    "mainVersion" : 1,
    "blockVersion" : 1,
    "stateRoot" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
  }
}

2.4 Querying the latest block

Cmd: /api/block/newest

**Detailed description: Contains all transaction information packaged by the block. This interface returns more data and is cautiously called **

HttpMethod: GET

parameter list

No parameters

return value

Field Name Field Type Parameter Description
header object block header information, only return the corresponding partial data
        hash string hash value of block
        preHash string hash value of the previous block
        merkleHash string Merkel hash
        time string Block generation time
        height long Block Height
        txCount int Block Packing Transactions
        blockSignature string Signature Hex.encode(byte[])
        size int Size
        packingAddress string Package Address
        roundIndex long Consensus Rounds
        consensusMemberCount int Number of Consensus Members
        roundStartTime string Current Consensus Round Start Time
        packingIndexOfRound int Current rounds of packaged blocks
        mainVersion short Current version of the main network
        blockVersion short The version of the block, which can be understood as the version of the local wallet
        stateRoot string Smart Contract World Status Root
        txHashList list<string> Block packed transaction hash collection
txs list<object> Trading List
        hash string trading hash value
        type int Transaction Type
        time string Trading Hours
        blockHeight long Block Height
        remark string Trade Notes
        transactionSignature string Transaction Signature
        txDataHex string Transaction Business Data Serialization String
        status int Transaction Status 0: unConfirm (to be confirmed), 1: confirm (confirmed)
        size int Transactions Size
        inBlockIndex int The order in the block, stored in rocksDB is unordered, assigned when saving the block, sorted according to this value after taking out
        from list<object> Input
                address string Account Address
                assetsChainId int id of asset distribution chain
                assetsId int Asset id
                amount string Quantity
                nonce string Hex string for account nonce value, preventing double-flower trading, Take the last 8 bytes of a transaction hash
                locked byte 0 normal trade, -1 unlocked trade (exit consensus, Exit commission)
        to list<object> Output
                address string Account Address
                assetsChainId int id of asset distribution chain
                assetsId int Asset id
                amount string Quantity
                lockTime long unlock time, -1 is permanent lock

Example request data:

request path: slightly

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "header" : {
      "hash" : "92285f81a649a7c65b1fe9e52738bb95c4aac6a7f4ab4b0b971c09662a9433ad",
      "preHash" : "c9d0d84c47455e8dc0ccc328133c1e2bbb31d74b9f6ac99c14cc4f2d7663d4cc",
      "merkleHash" : "646a2bea27384ca31c45acd9980c7adec2ba8cfa95477c74cbca93db9f966caa",
      "time" : "1970-01-19 10:14:33.033",
      "height" : 9,
      "txCount" : 2,
      "blockSignature" : "463044022024e463c5dcb039f40e3ff2f733c294f5e705e38aa4caebbea6c14a100f39dbe30220222c673b226fc6c6c9cb535ff4440728ecf00968114798be40499e16b12b1709",
      "size" : 234,
      "packingAddress" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
      "roundIndex" : 156327301,
      "consensusMemberCount" : 1,
      "roundStartTime" : "1970-01-19 10:14:33.033",
      "packingIndexOfRound" : 1,
      "mainVersion" : 1,
      "blockVersion" : 1,
      "stateRoot" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    },
    "txs" : [ {
      "hash" : "c418229126d1c2246828f99752bbffcb5d5a6fef552d64275482f80f79690fe6",
      "type" : 1,
      "time" : "2019-07-16 18:30:11.011",
      "blockHeight" : 9,
      "remark" : null,
      "transactionSignature" : null,
      "status" : 0,
      "size" : 80,
      "inBlockIndex" : 0,
      "form" : [ ],
      "to" : [ {
        "address" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000",
        "lockTime" : 0
      } ]
    }, {
      "hash" : "247a026d48f6be0c358423898e38a50ac0c2c1a851419b1ec843a667bab90df9",
      "type" : 2,
      "time" : "2019-07-16 18:30:03.003",
      "blockHeight" : 9,
      "remark" : "remark",
      "transactionSignature" : "2103958b790c331954ed367d37bac901de5c2f06ac8368b37d7bd6cd5ae143c1d7e34630440220084da59fca5edc6ed047c1360bb45d3e7ec297c367b8c2810421b2a43d1eabba02201f9e499fe63ad2dbbd83c1dafcb8437f5aba1c61fd0e5c9075a80b50820ca3ac",
      "status" : 0,
      "size" : 261,
      "inBlockIndex" : 0,
      "form" : [ {
        "address" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000100000",
        "nonce" : "0000000000000000",
        "locked" : 0
      } ],
      "to" : [ {
        "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000000000",
        "lockTime" : 0
      } ]
    } ]
  }
}

2.5 Query block based on block height

Cmd: /api/block/height/{height}

**Detailed description: Contains all transaction information packaged by the block. This interface returns more data and is cautiously called **

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
height long block height yes

return value

Field Name Field Type Parameter Description
header object block header information, only return the corresponding partial data
        hash string hash value of block
        preHash string hash value of the previous block
        merkleHash string Merkel hash
        time string Block generation time
        height long Block Height
        txCount int Block Packing Transactions
        blockSignature string Signature Hex.encode(byte[])
        size int Size
        packingAddress string Package Address
        roundIndex long Consensus Rounds
        consensusMemberCount int Number of Consensus Members
        roundStartTime string Current Consensus Round Start Time
        packingIndexOfRound int Current rounds of packaged blocks
        mainVersion short Current version of the main network
        blockVersion short The version of the block, which can be understood as the version of the local wallet
        stateRoot string Smart Contract World Status Root
        txHashList list<string> Block packed transaction hash collection
txs list<object> Trading List
        hash string trading hash value
        type int Transaction Type
        time string Trading Hours
        blockHeight long Block Height
        remark string Trade Notes
        transactionSignature string Transaction Signature
        txDataHex string Transaction Business Data Serialization String
        status int Transaction Status 0: unConfirm (to be confirmed), 1: confirm (confirmed)
        size int Transactions Size
        inBlockIndex int The order in the block, stored in rocksDB is unordered, assigned when saving the block, sorted according to this value after taking out
        from list<object> Input
                address string Account Address
                assetsChainId int id of asset distribution chain
                assetsId int Asset id
                amount string Quantity
                nonce string Hex string for account nonce value, preventing double-flower trading, Take the last 8 bytes of a transaction hash
                locked byte 0 normal trade, -1 unlocked trade (exit consensus, Exit commission)
        to list<object> Output
                address string Account Address
                assetsChainId int id of asset distribution chain
                assetsId int Asset id
                amount string Quantity
                lockTime long unlock time, -1 is permanent lock

Example request data:

request path: http://localhost:18004/api/block/height/9

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "header" : {
      "hash" : "92285f81a649a7c65b1fe9e52738bb95c4aac6a7f4ab4b0b971c09662a9433ad",
      "preHash" : "c9d0d84c47455e8dc0ccc328133c1e2bbb31d74b9f6ac99c14cc4f2d7663d4cc",
      "merkleHash" : "646a2bea27384ca31c45acd9980c7adec2ba8cfa95477c74cbca93db9f966caa",
      "time" : "1970-01-19 10:14:33.033",
      "height" : 9,
      "txCount" : 2,
      "blockSignature" : "463044022024e463c5dcb039f40e3ff2f733c294f5e705e38aa4caebbea6c14a100f39dbe30220222c673b226fc6c6c9cb535ff4440728ecf00968114798be40499e16b12b1709",
      "size" : 234,
      "packingAddress" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
      "roundIndex" : 156327301,
      "consensusMemberCount" : 1,
      "roundStartTime" : "1970-01-19 10:14:33.033",
      "packingIndexOfRound" : 1,
      "mainVersion" : 1,
      "blockVersion" : 1,
      "stateRoot" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    },
    "txs" : [ {
      "hash" : "c418229126d1c2246828f99752bbffcb5d5a6fef552d64275482f80f79690fe6",
      "type" : 1,
      "time" : "2019-07-16 18:30:11.011",
      "blockHeight" : 9,
      "remark" : null,
      "transactionSignature" : null,
      "status" : 0,
      "size" : 80,
      "inBlockIndex" : 0,
      "form" : [ ],
      "to" : [ {
        "address" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000",
        "lockTime" : 0
      } ]
    }, {
      "hash" : "247a026d48f6be0c358423898e38a50ac0c2c1a851419b1ec843a667bab90df9",
      "type" : 2,
      "time" : "2019-07-16 18:30:03.003",
      "blockHeight" : 9,
      "remark" : "remark",
      "transactionSignature" : "2103958b790c331954ed367d37bac901de5c2f06ac8368b37d7bd6cd5ae143c1d7e34630440220084da59fca5edc6ed047c1360bb45d3e7ec297c367b8c2810421b2a43d1eabba02201f9e499fe63ad2dbbd83c1dafcb8437f5aba1c61fd0e5c9075a80b50820ca3ac",
      "status" : 0,
      "size" : 261,
      "inBlockIndex" : 0,
      "form" : [ {
        "address" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000100000",
        "nonce" : "0000000000000000",
        "locked" : 0
      } ],
      "to" : [ {
        "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000000000",
        "lockTime" : 0
      } ]
    } ]
  }
}

2.6 Query block based on block hash

Cmd: /api/block/hash/{hash}

**Detailed description: Contains all transaction information packaged by the block. This interface returns more data and is cautiously called **

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
hash string block hash yes

return value

Field Name Field Type Parameter Description
header object block header information, only return the corresponding partial data
        hash string hash value of block
        preHash string hash value of the previous block
        merkleHash string Merkel hash
        time string Block generation time
        height long Block Height
        txCount int Block Packing Transactions
        blockSignature string Signature Hex.encode(byte[])
        size int Size
        packingAddress string Package Address
        roundIndex long Consensus Rounds
        consensusMemberCount int Number of Consensus Members
        roundStartTime string Current Consensus Round Start Time
        packingIndexOfRound int Current rounds of packaged blocks
        mainVersion short Current version of the main network
        blockVersion short The version of the block, which can be understood as the version of the local wallet
        stateRoot string Smart Contract World Status Root
        txHashList list<string> Block packed transaction hash collection
txs list<object> Trading List
        hash string trading hash value
        type int Transaction Type
        time string Trading Hours
        blockHeight long Block Height
        remark string Trade Notes
        transactionSignature string Transaction Signature
        txDataHex string Transaction Business Data Serialization String
        status int Transaction Status 0: unConfirm (to be confirmed), 1: confirm (confirmed)
        size int Transactions Size
        inBlockIndex int The order in the block, stored in rocksDB is unordered, assigned when saving the block, sorted according to this value after taking out
        from list<object> Input
                address string Account Address
                assetsChainId int id of asset distribution chain
                assetsId int Asset id
                amount string Quantity
                nonce string Hex string for account nonce value, preventing double-flower trading, Take the last 8 bytes of a transaction hash
                locked byte 0 normal trade, -1 unlocked trade (exit consensus, Exit commission)
        to list<object> Output
                address string Account Address
                assetsChainId int id of asset distribution chain
                assetsId int Asset id
                amount string Quantity
                lockTime long unlock time, -1 is permanent lock

Example request data:

request path: http://localhost:18004/api/block/hash/92285f81a649a7c65b1fe9e52738bb95c4aac6a7f4ab4b0b971c09662a9433ad

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "header" : {
      "hash" : "92285f81a649a7c65b1fe9e52738bb95c4aac6a7f4ab4b0b971c09662a9433ad",
      "preHash" : "c9d0d84c47455e8dc0ccc328133c1e2bbb31d74b9f6ac99c14cc4f2d7663d4cc",
      "merkleHash" : "646a2bea27384ca31c45acd9980c7adec2ba8cfa95477c74cbca93db9f966caa",
      "time" : "1970-01-19 10:14:33.033",
      "height" : 9,
      "txCount" : 2,
      "blockSignature" : "463044022024e463c5dcb039f40e3ff2f733c294f5e705e38aa4caebbea6c14a100f39dbe30220222c673b226fc6c6c9cb535ff4440728ecf00968114798be40499e16b12b1709",
      "size" : 234,
      "packingAddress" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
      "roundIndex" : 156327301,
      "consensusMemberCount" : 1,
      "roundStartTime" : "1970-01-19 10:14:33.033",
      "packingIndexOfRound" : 1,
      "mainVersion" : 1,
      "blockVersion" : 1,
      "stateRoot" : "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    },
    "txs" : [ {
      "hash" : "c418229126d1c2246828f99752bbffcb5d5a6fef552d64275482f80f79690fe6",
      "type" : 1,
      "time" : "2019-07-16 18:30:11.011",
      "blockHeight" : 9,
      "remark" : null,
      "transactionSignature" : null,
      "status" : 0,
      "size" : 80,
      "inBlockIndex" : 0,
      "form" : [ ],
      "to" : [ {
        "address" : "tNULSeBaMkrt4z9FYEkkR9D6choPVvQr94oYZp",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000",
        "lockTime" : 0
      } ]
    }, {
      "hash" : "247a026d48f6be0c358423898e38a50ac0c2c1a851419b1ec843a667bab90df9",
      "type" : 2,
      "time" : "2019-07-16 18:30:03.003",
      "blockHeight" : 9,
      "remark" : "remark",
      "transactionSignature" : "2103958b790c331954ed367d37bac901de5c2f06ac8368b37d7bd6cd5ae143c1d7e34630440220084da59fca5edc6ed047c1360bb45d3e7ec297c367b8c2810421b2a43d1eabba02201f9e499fe63ad2dbbd83c1dafcb8437f5aba1c61fd0e5c9075a80b50820ca3ac",
      "status" : 0,
      "size" : 261,
      "inBlockIndex" : 0,
      "form" : [ {
        "address" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000100000",
        "nonce" : "0000000000000000",
        "locked" : 0
      } ],
      "to" : [ {
        "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
        "assetsChainId" : 2,
        "assetsId" : 1,
        "amount" : "100000000000",
        "lockTime" : 0
      } ]
    } ]
  }
}

2.7 Querying block serialization strings based on block height

Cmd: /api/block/serialization/height/{height}

**Detailed description: Contains all transaction information packaged by the block. This interface returns more data and is cautiously called **

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
height long block height yes

return value

Field Name Field Type Parameter Description
Return value string Returns the HEX string after the serialization of the block

Example request data:

request path: http://localhost:18004/api/block/serialization/height/1

request form data: no

Example response data:

{
  "success" : true,
  "data" : "772f158614cefd4f4e0a7ef1cd442f4de7439c10b5642afe582ed09b585d9b1e37d371e184142ebb1d46f4160a18a1e27d51c23dd66c0ccc607044821ae7fff24ddc4c5d01000000010000005c6e7c5409010043dc4c5d0100010001005064002056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b42100000000000000000000000000000000000000000000000000000000000000000f2517abe887d67e21037fae74d15153c3b55857ca0abd5c34c865dfa1c0d0232997c545bae5541a0863473045022100c6515c296a80ae8ef48713cae87b693003fb57cc41ce2af4dcc93d32e3cb382502201b84db49946fee5fd57edb350fe0f4c78cac3a503cfb11cbb3a4f6082ffe26cb01004ddc4c5d000002000000"
}

2.8 Serializing strings based on block hash query block

Cmd: /api/block/serialization/hash/{hash}

**Detailed description: Contains all transaction information packaged by the block. This interface returns more data and is cautiously called **

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
hash string block hash yes

return value

Field Name Field Type Parameter Description
Return value string Returns the HEX string after the serialization of the block

Example request data:

request path: http://localhost:18004/api/block/serialization/hash/5ce81f9a470459276b633465f2572862aa7156a42220d29d724ced9bf9d723f9

request form data: no

Example response data:

{
  "success" : true,
  "data" : "772f158614cefd4f4e0a7ef1cd442f4de7439c10b5642afe582ed09b585d9b1e37d371e184142ebb1d46f4160a18a1e27d51c23dd66c0ccc607044821ae7fff24ddc4c5d01000000010000005c6e7c5409010043dc4c5d0100010001005064002056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b42100000000000000000000000000000000000000000000000000000000000000000f2517abe887d67e21037fae74d15153c3b55857ca0abd5c34c865dfa1c0d0232997c545bae5541a0863473045022100c6515c296a80ae8ef48713cae87b693003fb57cc41ce2af4dcc93d32e3cb382502201b84db49946fee5fd57edb350fe0f4c78cac3a503cfb11cbb3a4f6082ffe26cb01004ddc4c5d000002000000"
}

3.1 Get trading based on hash

Cmd: /api/tx/{hash}

Detailed description: Get transaction based on hash

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
hash string transaction hash yes

return value

Field Name Field Type Parameter Description
hash string hash value of the transaction
type int Transaction Type
time string Trading Hours
blockHeight long Block Height
remark string Trading Notes
transactionSignature string Transaction Signature
txDataHex string Transaction Business Data Serialization String
status int Transaction Status 0: unConfirm (to be confirmed), 1: confirm (confirmed)
size int Transactions Size
inBlockIndex int The order in the block, stored in rocksDB is unordered, assigned when saving the block, sorted according to this value after taking out
from list<object> Input
        address string Account Address
        assetsChainId int id of asset distribution chain
        assetsId int Asset id
        amount string Quantity
        nonce string The Hex string for the account's nonce value, preventing double-flower trading, taking the last 8 bytes of a transaction hash
        locked byte 0 ordinary trade, -1 unlocked amount trade (exit consensus, exit commission)
to list<object> Output
        address string Account Address
        assetsChainId int id of asset distribution chain
        assetsId int Asset id
        amount string Quantity
        lockTime long unlock time, -1 is permanent lock

Example request data:

request path: http://localhost:18004/api/tx/247a026d48f6be0c358423898e38a50ac0c2c1a851419b1ec843a667bab90df9

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "hash" : "247a026d48f6be0c358423898e38a50ac0c2c1a851419b1ec843a667bab90df9",
    "type" : 2,
    "time" : "2019-07-16 18:30:03.003",
    "blockHeight" : 9,
    "remark" : "remark",
    "transactionSignature" : "2103958b790c331954ed367d37bac901de5c2f06ac8368b37d7bd6cd5ae143c1d7e34630440220084da59fca5edc6ed047c1360bb45d3e7ec297c367b8c2810421b2a43d1eabba02201f9e499fe63ad2dbbd83c1dafcb8437f5aba1c61fd0e5c9075a80b50820ca3ac",
    "status" : 1,
    "size" : 261,
    "inBlockIndex" : 0,
    "form" : [ {
      "address" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
      "assetsChainId" : 2,
      "assetsId" : 1,
      "amount" : "100000100000",
      "nonce" : "0000000000000000",
      "locked" : 0
    } ],
    "to" : [ {
      "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
      "assetsChainId" : 2,
      "assetsId" : 1,
      "amount" : "100000000000",
      "lockTime" : 0
    } ]
  }
}

3.2 Verifying the transaction

Cmd: /api/accountledger/transaction/validate

Detailed description: Verify offline assembled transaction, verify successful return of transaction hash value, failure returns error message

HttpMethod: POST

Form json data:

{
  "txHex" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Verify that the transaction is correct txform Verify that the transaction is correct Form Yes
        txHex string Transaction Serialization hex string Yes

return value

Field Name Field Type Parameter Description
value string transaction hash

Example request data:

request path: slightly

request form data:

{
  "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f000000000000000000000000000000000000000000000000000000000000000000000000006921023cee1aa6158ee640c8f48f9a9fa9735c8ed5426f2c353b0ed65e123033d820e646304402203c376fd0121fce6228516c011126a8526c5bc543afb7e4272c0de708a55d834f02204ebcd942e019b77bbec37f7e2b77b591ba4ce0fbc5fe9335ab91ae925ded6bed"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "5a91b75e6a6d1f415638375627933b42ce7179b4c6390ca0dcc5a0c2c74bd34a"
  }
}

3.3 Broadcast Trading

Cmd: /api/accountledger/transaction/broadcast

Detailed description: Broadcast offline assembly transaction, successfully returns true, failure returns error message

HttpMethod: POST

Form json data:

{
  "txHex" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Broadcast Trading txform Broadcast Trading Form Yes
        txHex string Transaction Serialization hex string Yes

return value

Field Name Field Type Parameter Description
value boolean success
hash string transaction hash

Example request data:

request path: slightly

request form data:

{
  "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f000000000000000000000000000000000000000000000000000000000000000000000000006921023cee1aa6158ee640c8f48f9a9fa9735c8ed5426f2c353b0ed65e123033d820e646304402203c376fd0121fce6228516c011126a8526c5bc543afb7e4272c0de708a55d834f02204ebcd942e019b77bbec37f7e2b77b591ba4ce0fbc5fe9335ab91ae925ded6bed"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : true,
    "hash" : "5a91b75e6a6d1f415638375627933b42ce7179b4c6390ca0dcc5a0c2c74bd34a"
  }
}

3.4 Single transfer

Cmd: /api/accountledger/transfer

Detailed Description: Initiate a single account single asset transfer transaction

HttpMethod: POST

Form json data:

{
  "address" : null,
  "toAddress" : null,
  "password" : null,
  "amount" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Single Transfer transferform Single Transfer Form Yes
        address string Account Address Yes
        toAddress string Account Address Yes
        password string Account Password Yes
        amount biginteger Amount Yes
        remark string Notes No

return value

Field Name Field Type Parameter Description
value string transaction hash

Example request data:

request path: slightly

request form data:

{
  "address" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "toAddress" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "password" : "nuls123456",
  "amount" : 10000000000,
  "remark" : "remark"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "89368623898cde34fe81b5ede6fe5bed75ffb61021ec6caa01a9a5dcd9262d69"
  }
}

3.5 Offline assembly transfer transaction

Cmd: /api/accountledger/createTransferTxOffline

Detailed Description: Offline transfer transactions based on inputs and outputs for single or multiple account transfer transactions.The transaction fee is the sum of the main assets of the chain in the inputs, minus the sum of the main assets of the chain in the output

HttpMethod: POST

Form json data:

{
  "inputs" : [ {
    "address" : null,
    "assetChainId" : 0,
    "assetId" : 0,
    "amount" : null,
    "nonce" : null
  } ],
  "outputs" : [ {
    "address" : null,
    "assetChainId" : 0,
    "assetId" : 0,
    "amount" : null,
    "lockTime" : 0
  } ],
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
TransferDto transferdto Transfer Transaction Form Yes
        inputs list<object> Transfer Transaction Input List Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                nonce string Asset nonce value Yes
        outputs list<object> Transfer Transaction Output List Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                lockTime long Lock Time Yes
        remark string Transaction Notes Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization hex string

Example request data:

request path: slightly

request form data:

{
  "inputs" : [ {
    "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
    "assetChainId" : 2,
    "assetId" : 1,
    "amount" : 1100000,
    "nonce" : "0000000000000000"
  } ],
  "outputs" : [ {
    "address" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
    "assetChainId" : 2,
    "assetId" : 1,
    "amount" : "1000000",
    "lockTime" : 0
  } ],
  "remark" : null
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "02003fac2d5d00008c0117020001efa328e600912da9872390a675486ab9e8ec211402000100e0c8100000000000000000000000000000000000000000000000000000000000080000000000000000000117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010040420f0000000000000000000000000000000000000000000000000000000000000000000000000000",
    "hash" : "5a91b75e6a6d1f415638375627933b42ce7179b4c6390ca0dcc5a0c2c74bd34a"
  }
}

3.6 Calculate the commission fee for creating a transfer transaction offline

Cmd: /api/accountledger/calcTransferTxFee

Detailed description: Calculate the commission fee required to create a transfer transaction offline

HttpMethod: POST

Form json data:

{
  "addressCount" : 0,
  "fromLength" : 0,
  "toLength" : 0,
  "remark" : null,
  "price" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
TransferTxFeeDto transfertxfeedto Transfer transaction fee Yes
        addressCount int Transfer Address Quantity Yes
        fromLength int Transfer Entry Length Yes
        toLength int Transfer output length Yes
        remark string Transaction Notes Yes
        price biginteger Fee Price No

return value

Field Name Field Type Parameter Description
value string transaction fee

Example request data:

request path: slightly

request form data:

{
  "addressCount" : 6,
  "fromLength" : 6,
  "toLength" : 2,
  "remark" : "remark",
  "price" : "100000"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : 200000
  }
}

3.7 Multi-signed account offline assembly transfer transaction

Cmd: /api/accountledger/createMultiSignTransferTxOffline

Detailed Description: Offline transfer transactions based on inputs and outputs for single or multiple account transfer transactions.The transaction fee is the sum of the main assets of the chain in the inputs, minus the sum of the main assets of the chain in the output

HttpMethod: POST

Form json data:

{
  "pubKeys" : [ ],
  "minSigns" : 0,
  "inputs" : [ {
    "address" : null,
    "assetChainId" : 0,
    "assetId" : 0,
    "amount" : null,
    "nonce" : null
  } ],
  "outputs" : [ {
    "address" : null,
    "assetChainId" : 0,
    "assetId" : 0,
    "amount" : null,
    "lockTime" : 0
  } ],
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
TransferDto multisigntransferdto Multi-Sign Account Transfer Transaction Form Yes
        pubKeys list<string> Public Key Collection Yes
        minSigns int Minimum Signatures Yes
        inputs list<object> Transfer Transaction Input List Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                nonce string Asset nonce value Yes
        outputs list<object> Transfer Transaction Output List Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                lockTime long Lock Time Yes
        remark string Transaction Notes Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization hex string

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

3.8 Calculate the commission required to create a multi-sign account transfer transaction offline

Cmd: /api/accountledger/calcMultiSignTransferTxFee

Detailed description: Calculate the commission fee for offline multi-sign account transfer transactions

HttpMethod: POST

Form json data:

{
  "pubKeyCount" : 0,
  "fromLength" : 0,
  "toLength" : 0,
  "remark" : null,
  "price" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
MultiSignTransferTxFeeDto multisigntransfertxfeedto Multi-Sign Account Transfer Transaction Fee Form Yes
        pubKeyCount int Multi-signal address corresponding to the number of public keys Yes
        fromLength int Transfer Entry Length Yes
        toLength int Transfer output length Yes
        remark string Transaction Notes Yes
        price biginteger Fee Price No

return value

Field Name Field Type Parameter Description
value string transaction fee

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

4.1 Publishing contract

Cmd: /api/contract/create

Detailed description: Release contract

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "gasLimit" : 0,
  "price" : 0,
  "password" : null,
  "remark" : null,
  "contractCode" : null,
  "alias" : null,
  "args" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Release Contract contractcreate Release Contract Form Yes
        sender string Transaction Creator Yes
        gasLimit long Maximum gas consumption Yes
        price long Execution contract price Yes
        password string Transaction Creator Account Password Yes
        remark string Notes No
        contractCode string Smart Contract Code (Hex encoded string of bytecode) Yes
        alias string Contract Alias Yes
        args object[] Parameter List No

return value

Field Name Field Type Parameter Description
txHash string publish contract trading hash
contractAddress string generated contract address

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "gasLimit" : 20000,
  "price" : 25,
  "password" : "nuls123456",
  "remark" : "restful-nrc20-remark",
  "contractCode" : "504b03040a0000080000aa7b564e00000000000000000000000003000400696f2ffeca0000504b03040a0000080000aa7b564e00000000000000000000000008000000696f2f6e756c732f504b03040a0000080000aa7b564e00000000000000000000000011000000696f2f6e756c732f636f6e74726163742f504b03040a0000080000aa7b564e00000000000000000000000017000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b0304140008080800aa7b564e00000000000000000000000028000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373b558f97754e5197eeecc90990c972d9090059209a498cc9291a58a8152020d35ca5602b1605bbd99b9492ecc12670922b46ead4babd56aeb5ad1565bd4aa2c020169d59ed353cfe93fd17f84d3d3e7fdee9d3b37612639d5d31ff2ddf77ecbfb3eeff67c77f2afff7cf639804df87b23a23825c323329c96e14c1831fcb411cdf859108f86119497281e93e171997e22cce149197e1ec62ff0d462acc2d3413c13c672fc2a8ce7f0bcccfc3a8817827831cc53bf91e125195e96e5df8af4bb205e09a3430e44f19a0cafcbf086a87d5386df87f096cc9c9597b7457a27843fc8f38f21bc2b7ade0be24f41fc39887341bcaf219033b2a686a6bdc78d692399317213c99152c1ca4d6cd3d0503c951dcb673484d266caca1a99a2066d58c3e252be646446ca535399531a5aeca359a33499dc654d0ce74ae68459e0f1d098417d2993a796d97bca252b93dc674c71b171c49ac819a57281c68766af6edf6be593b972a6984ce573a582912a258be913c9c174ba60168bdb6a9bdb419d412393c99f34d31a4a5f43e337342f0056f5f6d58a6360773e6d4a10ac9cb9bf9c1d330b878db18c8a7a3e6564468d8225efce64a0346931643db7c228e54f98b9e488959de26691a9bbed503957b2b2e6a855b4787c3097636e4a563e47151b6a7b62b87b92a39679924afcbd7d4c6b6b05fdada96cd86ee5acd20e0d3b7a6f75b0decc5c35c37da31a968822cbc80c66f304ae61dd6cfc078d02ebb164166639125dd09143e64365ab60a6a5b2541548e16938dcbb4032e75dad1b8e45f99339b3a0a173fef3acc8e294994bcb565d1d19ac14e8a269235336a5796655c0a9a94a152c192919a9132c47f56eb302b5d048ae386e16f614f2590d47be917bb5bdeb3bc6121c57ea7da53cc3e974f181710d772c60af6ec0828e129242c5030d772e84be2ebea0313555c84f53dd722b972a9846d11c543306c92a6ca4d3667ad48eef7232d79cf565c5f29832e66e0ae53315510ebb49fabf84973d1032ec2d1babe2260f2ed77eb868565f96550e559739b3ab12d7af19cc5109a6bdc583c0d5ba283569a64e90657aeb9f4fd659ab7fa24115ffc68a40df63f3eaf0528b9cf7678b131a06ff27bbb5358547f2e542cadc6349cb2df7306bbf6cd7d18fa48edb65d8884d3a36638b8e217ca0e3436cd1b0a27a6fdc6d1427d9ac3abe8d3b74dc25c35f64f347f858c727381fc4051d177149c7a7b84c42abc3edca76cf61a74586a64da1c82573def5e11ca96477c62816cda2e0213d5cd17115333aaee13a0fccbacf782dd58a888e49983a72c8e83821c367b8a1c382b910ba4a2755d0cd7ad79116adf7e05e1d79301e7fc5df747c8ef31a3a8673c5f2f8b895b2b82fe274703aa254cbe6691d5fe0bc8ea36087270e4f9a11551d916cb9588a8c999109f6312f864869d2c845f2850819dfc8f078e4f67e394e289db32c389413c98fdb36fac5c52f79e32c7cafb216aae57260ecb899a2f6b535fb6bb7f3a261cd7c5153772c0b2e706ce8d001be1c1edacf712a7f527a6bb82e6f86b2e54cc9529f59fdf55ab0ded9d69a78f749eb34149d5b29c22b7f812bcc3f55a6735bbdf7be1d916db7cef4dd3aa5a1bda68123ac4e524ec0cc5a54df5587bd544dd93d3f6172df861a306a1a0d16ec0f025ae83d26e71b53f9ec9451607ee761337e04f9c9868c7b85097943f71eabc51de8e637750c3ec49140039a842af8e3a049d8423d49187cfa8433d493c400d2b492b7f2ef2ecffb003fd699616ca3bc9d3349be697c2e8a5e8676416df90ec70635b9163b38eaf6067c173bf91c745677f1a911422d45beb98ad62fa8682376d750e4ff688ea2be05156dc6f76a280acc45945c50d110f6388afecd1d8bf834a3335476090d571088de40f0e80c4257d05815c3d1d81568d1f815f8a2cd812bf0471397b0b8397015fa552c915397d1780d4b05d0752cf3e3be1b587e54736666b0e21a9a2eba40fbb158fd060c30658bb11a2d6865296cc606a639c6246f645a0799d6434c729a491687b6d8401d8744ea57711049cac5a7a4ef739f5f491b95febb29b705b86d58797eeb4892e50189c51754212692441c8e5dc74a1fbec4aafd89af1064602e24e2ce54f340a02df015429c1449c21f505e75f2f72a887529313611650bc3bd8ec9bf8d798b33e4552f92ae1749ecc53e276dfb29f978ba1b07e8bf9f6797e0204f04f00327a1f6da56ae1de2cc52f86ea22588919b680ee2f0ac248bdf4b7c737c3d825127ef670823c0674f34c6142566d0128d715c1d8d736c95d4c54492ac05aa85daa2c0df8b46825e46b0cd84bc8e80c4b1a8adcf75ac07f7398ef5e087ca31910eaaf408b895fe9ae9e0bde5a4e3491e914cf6c4fe8960e01c02fe6b68932aaba4a6795fdc4ecdbeb8e4c0ef817884d11a453b2174d2f83aea1488115b9f07a21dfb7684713f81f9545417c31fdaa9dd446bad90063517e98ff0632798166d8ae6ae2863199728c6e24e143921f29c3836a9583d80101e64120d92d1980760970bb04b454e53d24105b0665a7fe22279d041d21e750cb7df404705c49ad92096aa9d134ce624bbcff200687701b4ab9ad494340f80075c00136c0151d15d01b0b602404d5c45671d1c59e2c8d1cdbc0747b78ba3dbc5d14d1febe2305c1c978943623c142586ae8aedfdf1c45544ce62859a60e53040e7a057b0b6cc83d5efe9f022a35c22ee32ab6d9a55f4302faf47d8e7a73d8d30e4621f72b10f31cd5b5487df89946a04a9b746e9e21e165ba896533ef914a42c4e3de1907584f545740381685b40bc4bc8108bb705e85d375daaf2acdd0d8fb2d01ea3d5c7b1923abad85955268ab83823187770469846bb61234ec3865821f72826f2c907af83e78c83a7d38327d1b46e06eb2b687a66a1b1cbfe296a7b1a2bf00ccbfe590f924e1749a78ba4d345d2e922697191582e927f7045740cd8b1f0f2b74dd66dce453610508b6dce1dd51688276c49507a59fc39ea7b5efe958836bc40067991fcfc126fa2973d88075cc4032ee20117f1808378156fb5e3e4f32a8bdb335b3923f90f816493248bf3147f42381e9de6aa448ba1bc8a6fed8fc69b36cce0b68a7b8db10423de5d85ee4df72b64ac577975bcc680bf4ee86f78ca72bd0b793d5b6e9ff30563b776031372bf82ec931f340e90a203a4cb01928837f54a862b207ae682b0b3fc16d59d65cdbdcd78bee301e025b7ec1c726b60ac2b00f8b3c701708c6f12cfd5bc075648d3b285dfacde0817dde60cab6def320aef29832df631d7e06a654653415f045fd34e4dd979c8b133e5dc371dd19804597843cabab62ddbc973d4f33eed7e407afcd0435c1daecd0e14944d918aee1543eb2d8ef59263dd74acb7d6f0327e0d7d73ddfc98ee7ce231d9ea9a6c75dc14a9acbe8be6383ced96984f79b1a68ec38959666d8f2f52d12542f894fe5cf6a4758d6b7e8debf11ac7639104887fb6ef2755c53c8c5f2ae53e2c278b3e4b36ece0f35534fe17504b0708ec308779cb09000028180000504b0304140008080800aa7b564e00000000000000000000000022000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373a552d14e1341143d03b5cb16aa28a8a0284a08697970131ff481a76a24694282a19507dfa6bb431d989da933b325fc9a0f7e801f65bc534ba5b6a5896eb23b3be79e7bcebd33f7c7cf6fdf01bcc64e84e711b623bc60a8367a3d6bfa5c7de80bed19569a5a0bfb5e71e7848bf092186dcbb53b1376c828699e0b86f55afde89cf779a2b8ee262d6fa5ee1e306c9e14dacb5c9c4a273b4a34b4369e7b69b463d83b9226d18572496ab4b73cf589cb2e123ee224a7525c9248d95de51da318963291ca9c2b4a5eacd59b0ccb9ea8aa55f47aea8a61e3ba869cfb2fc93bd96d6a2fbac29244dce154582a8ecf18ded4a61b37b2cc0ae70e668aec8c37f3915b6add0b3bd6d5fedcae4ec4d7425a9191e2921f1e26c3db39554d2faafe99eee85ae4d09a9ce1d33ca17fb489f86034e8ae63ae94b90cc7c9d0fe2fb799475d6999c2a6e2502af2a8b4cd85d0af0295616b42d0876832e030acfe19c2e3ceb9486942f76fcbd8fd6be06f278fcd7e99816101e1894b749788695fa15d99d66580b0952958157727b07b589dc0eee301a9dfc0b0466f144cd70784877844ff01ac2efc0647a1c7d81886d6166f864684cdd9b94ff0748aef388d085b83ef33dca135141a7c4ad46e488a10ff02504b070868fe421cca0100005e040000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c6173738d565b6f1b4514fec6bbde75b69bbb49d224b46929e05b6a2ee19a4b73218140d2943835b4406163af926d9cdd74771d90a0129540ea033c801020242e2f252f790089b80824c45390f82ffc03049c995dbb89e3243cf8ccd93367e67cdf7c6746fef39f5f7e03f018ae6988e34213148c7333c1cd248f4da998d63083e735bcc0cd0c66b937abe2450d2770218697f838c7cd7c0c176358e0ee256e5e56b1a822c71075deb64d97e1d49ce564ed72c9cb161cdb778d829ff58a6bd98962d1353d6f9841f5364cbbc853a39b46a96c3274cd5d37368decbae1af6627ad9559db37574c97529511cbb6fc3186cb89a3773d66b6e1f6c93c833ce5140940eb9c659b17cbebcba6bb642c9728d231e7148c52de702dfe1d06657fd5f2189a2736365c87b04f6f9ab6cfa0cfdac47caa64789e49d39983607c67cdb4b34bdc9edbb798389e5d2cdbbeb56ee62dcfa22a970cd758377dd39db06dc7377ccbb169cf546382462d27bb68de285bae59a41d632ba6bf10883190481e2747ccab659f39e694f98969b479ae2aa0e6edf9e065f381a03d54f6104979b930eb64e2706114a2639488f97d6152c9b057b20bcbd7cd823f9cbccac01c2ed28129219241a234e77ca3b0366f6c08eda8c1a9f4aae1ad06824b89e42c152156e5122533fa88f94ece772d7b85215e852f760ea2b4b39673ca6ec19cb1782f6842cdf33c4d471f967474a15b470f3727d1abe332f22a5e21e9fe7f37a87855c7237854c5151d4fe16986ee7a189365ab244e3bbe6fe5bbe2f28deab88ad7b8799d006606c28b364ae43203e2ae898c37740c6384a1adfef4187a1bea1ff6391d5a3e9059f43a43e7be7312413aa6fea308379aded362c4ab514b9054c60627c330983828cd41b5c2631aaecbaff6cf11f9fd89a9c3a771869ecc38a82b2121c215a78735c2451723e94ea346f37de8a7effbe9ab44a34c633c75172c95de412495d981941adc81fca358758a6c17a2646f50a68b267868818f4e94719aa2a9603d06f000203c5e97098f578e088fd796708efc4e89261f2467bf7d080f93e590b234f2e5d1d44f88fc50c3a088e03ba2a61e248435191248868bc7289b575404977b0c34117d8fd6dc143b74055935d44a889a2e444320523d90f71b0249370622d503f980d67c7808909e104806830d80c8f5406e3704725e2c3a0044ae07f211adf9f810205c335e98ae7cb8d75f9423d1782b95fe1e51793bbd8b965405d134fdee202a6da77f8732cf75dba58ea22143bf0ad4afd0ba45375ec4298b9f679020514cda9b205513e45db4f381627205b12db472ef0fa8f21664699b404882462f01053e818a4fe9e43e23989f13e52ff026be14b40602c0355ab7e89fc6e3824e1143148be009d1a0badac2fe46bf8a2715d6adb0b836cea9d32b1752ff393cc6e9805d734a306be26046da4ef7ad069c78580ac36f55e37210271a5a10efbb07bf43dc9eafe9367d43cdf32da6f0dd1e35a643d89d04fa193c4b5038d84128ede3ec5fbae511824b30c947e84718cbefffa445f49c862caed1b6bc51867ec5892b77a1773457484141a5b5a32df025eeb7073e616e6dbb594147059df58d77674fe30d8540231815760c67c3a746c173f42c35fd07504b0708ea7bbc798f040000e6090000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c6173738d56df531b5514fe6e76b31bb60be19740015b5aab8624b06ad156c36f84160da5051a0bd5da25d9c296b08bbb1b5e1c1ffa6ff8aebcf0a033923a3ae3f88433fe2ffe078e7aeedd854212c0879c7bf6dc73eef9cef9cebd933ffff9e53700efe189864e4c3441c12417535c4c73db8c8a590d73b8a3e12e177398e7dabc8a4f345cc244029ff235cfc54202f71258e4ea7d2e1ea85852b1cc203ff3dc6d862b79db359c4ad9378aae1378663130fcd29631552a7996efe7186281cb10df35cb158ba12bffdcdc358d6d33d834a6ed8d7927b0362c8fbc9451dbb183718687a9f30fbc60b7e1f18305823be3960840326f3bd6bdcaf6bae5ad98eb65b2b4e7dda2592e989ecdbf23a31c6cda3e43f38a673afe33cb9bddb59c80419f771ccb9b299bbe6fd176b61e4ce06e598eb1c2e58d53c154e3f5a58a13d8db56c1f66dca72dff4cc6d2bb0bc29c7710333b05d87ce4c372ed03cf63196acaf2ab66795e84475c30ae6040d03a9c18b8850fd23e76b17f498f72b4e47af70e6fc704dd0772124b187729d4163c23ff6ba9c3a9b0c854a30cb54ed6b9153d974368cc5f5e75631c80dae3130971353b72588318988e6e5c02c6e2d983b822f1a674abd69fa9b21c9526a709e92502d95323933fa4804ee72e0d9ce0643e7117c717268a593b565b7e215ad399bf3af090687b99b8e3eace8e842b78e1e2e2ea357c74314547c4674fdff0950f148c73b7857c5aa8e5bb8cdd05d0b63ba62974b96c7d0712af26b7ed5c674ace131179f132bd981c01da3b2b203e26689cd2f74e430cad05adb3786de867c47534ded2a84048bc9a6eca73a248cd4a0fef34a6db47d62a4a8eb8d8681483277762ca7c43094aa27a59ea7a841b91affa3c939c7bf3f3573f636aed1d3d8099a47488871aee9018d71bac54a8cd3aad17e1ffae9fb75fa2ad32ad3da997e0996ce1c2096ce1e404a0f1d40fe51445d21d98538c92c790ea109c36881810e1a82ab644d87f118c01b80d0785e26349e3926349e5bc20dd293120986374fc8b7f036490ec7a09587c6d33f21f6c3717e45186f8a7c7ae810e5634861300a1e276f9e4d1175bc42af09eb2d8ab92d4ee80abd8e112b1162ba060d8148b540720d81641a03916a814c50cce419407a2220596a743d10b916c84c4320c322a80e885c0be40ec5dc3d0308e78b27a68b1e9df517f970ea5ea433df232eef670ed192ae229ea1df77884bfb99dfa12c70de0e699a68c9d2af0af55b24f7a065859dbc783f4307896cd24907e9c8413e441b5fc8265791d843926b7f4095f7204bfb04421265f41250200f150bd4b94582f9804a5ec2975816650d84808fcb7a41ff266e8a724a18215b0cef8be1d4d516f637fa557ca0b06e85756a93bc747adba2d27f8eda381b56d79c1695357130a3ad57fb36c39ab8598acc4f8fec7268a732b4d0def70a7ebbb8398fe826add2f0ac119b8f4fb0311bc1ee20d01fe22382c2c10e41699b64ffd20d8f115c82493a223dc658e1f42705d1531a55f1848ee58332f22b2eadbe84dede5c25064529c9f6d65097b8de16ea8439d9fa4d15ed5574d40eded313833712018d614cc8715c8f9e19051fd393d4f41f504b0708826261e37e040000ca090000504b01020a000a0000080000aa7b564e000000000000000000000000030004000000000000000000000000000000696f2ffeca0000504b01020a000a0000080000aa7b564e000000000000000000000000080000000000000000000000000025000000696f2f6e756c732f504b01020a000a0000080000aa7b564e00000000000000000000000011000000000000000000000000004b000000696f2f6e756c732f636f6e74726163742f504b01020a000a0000080000aa7b564e00000000000000000000000017000000000000000000000000007a000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b01021400140008080800aa7b564eec308779cb090000281800002800000000000000000000000000af000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373504b01021400140008080800aa7b564e68fe421cca0100005e0400002200000000000000000000000000d00a0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373504b01021400140008080800aa7b564eea7bbc798f040000e60900003000000000000000000000000000ea0c0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c617373504b01021400140008080800aa7b564e826261e37e040000ca0900003000000000000000000000000000d7110000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c617373504b0506000000000800080051020000b31600000000",
  "alias" : "restful_nrc20",
  "args" : [ "io", "IO", 80000, 1 ]
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHash" : "98dad7871ef9c02f19ba15929e2620e9465a410904ed8960b5893c9f3c4eb8fe",
    "contractAddress" : "tNULSeBaMx7J2im9edmmyZofHoTWW6nCTbvy3K"
  }
}

4.2 Calling the contract

Cmd: /api/contract/call

**Detailed description: Call contract **

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "gasLimit" : 0,
  "price" : 0,
  "password" : null,
  "remark" : null,
  "contractAddress" : null,
  "value" : null,
  "methodName" : null,
  "methodDesc" : null,
  "args" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Call Contract contractcall Call Contract Form Yes
        sender string Transaction Creator Yes
        gasLimit long Maximum gas consumption Yes
        price long Execution contract price Yes
        password string Transaction Creator Account Password Yes
        remark string Notes No
        contractAddress string Smart Contract Address Yes
        value biginteger The amount of the primary network asset that the caller transferred to the contract address. If there is no such service, fill in 0 Yes
        methodName string method name yes
        methodDesc string Method Description, if the method in the contract is not overloaded, this parameter can be empty No
        args object[] Parameter List No

return value

Field Name Field Type Parameter Description
txHash string Call contract trading hash

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "gasLimit" : 20000,
  "price" : 25,
  "password" : "nuls123456",
  "remark" : null,
  "contractAddress" : "tNULSeBaMx7J2im9edmmyZofHoTWW6nCTbvy3K",
  "value" : 0,
  "methodName" : "transfer",
  "methodDesc" : null,
  "args" : [ "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", 990 ]
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHash" : "f7b04c3d0863d79b08d6bd2758899fce8b5a4f09d2142a12bf2545ff978e0250"
  }
}

4.3 Deleting a contract

Cmd: /api/contract/delete

Detailed description: Delete contract

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "contractAddress" : null,
  "password" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Delete Contract contractdelete Delete Contract Form Yes
        sender string Transaction Creator Yes
        contractAddress string Smart Contract Address Yes
        password string Transaction Creator Account Password Yes
        remark string Notes No

return value

Field Name Field Type Parameter Description
txHash string delete contract transaction hash

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "contractAddress" : "tNULSeBaMx7J2im9edmmyZofHoTWW6nCTbvy3K",
  "password" : "nuls123456",
  "remark" : "delete-remark"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHash" : "c1ddf2254adf571ea441406bd0593d5fbc809e1e8aa8e5064fb3885fd7536f87"
  }
}

4.4 Contract Token Transfer

Cmd: /api/contract/tokentransfer

Detailed description: Contract token transfer

HttpMethod: POST

Form json data:

{
  "fromAddress" : null,
  "password" : null,
  "toAddress" : null,
  "contractAddress" : null,
  "amount" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
token transfer contracttokentransfer token transfer form yes
        fromAddress string Transferr Account Address Yes
        password string Transferr Account Address Password Yes
        toAddress string Transferr Account Address Yes
        contractAddress string Contract Address Yes
        amount biginteger Amount of transferred token assets Yes
        remark string Notes No

return value

Field Name Field Type Parameter Description
txHash string Trading hash

Example request data:

request path: slightly

request form data:

{
  "fromAddress" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "password" : "nuls123456",
  "toAddress" : "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD",
  "contractAddress" : "tNULSeBaNAKfKnLMR5XG5qtwXt5JS1b3QosZxg",
  "amount" : 8000,
  "remark" : "800"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHash" : "a53fd2bff66a8e7ea243691afb95832d95cb2206c34684e233042ee3f399db5d"
  }
}

4.5 Contract transaction from account address to contract address transfer (main chain asset)

Cmd: /api/contract/transfer2contract

Detailed description: Contract transaction from account address to contract address transfer (main chain asset)

HttpMethod: POST

Form json data:

{
  "fromAddress" : null,
  "password" : null,
  "toAddress" : null,
  "amount" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Transfer to Contract Address contracttransfer Transfer to Contract Address Form Yes
        fromAddress string Transferr Account Address Yes
        password string Transferr Account Address Password Yes
        toAddress string Transferred contract address Yes
        amount biginteger Transferred main chain asset amount Yes
        remark string Notes No

return value

Field Name Field Type Parameter Description
txHash string Trading hash

Example request data:

request path: slightly

request form data:

{
  "fromAddress" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "password" : "nuls123456",
  "toAddress" : "tNULSeBaMxyMyafiQjq1wCW7cQouyEhRL8njtu",
  "amount" : "400000000",
  "remark" : "Transfer to contract"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHash" : "e04fcdbfd571754dac48d7c3cd8f3b6e9830e9ce00292fad0ec601ad50bb8d5e"
  }
}

4.6 Get the token balance of the specified contract of the account address

Cmd: /api/contract/balance/token/{contractAddress}/{address}

Detailed description: Get the token balance of the specified contract of the account address

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
contractAddress string contract address yes
address string account address yes

return value

Field Name Field Type Parameter Description
contractAddress string contract address
name string token name
symbol string token symbol
amount string token quantity
decimals long Number of decimal places supported by token
blockHeight long Block Height at Contract Creation
status int Contract Status (0-None, 1-Normal, 2-End)

Example request data:

request path: http://localhost:18004/api/contract/balance/token/tNULSeBaNAKfKnLMR5XG5qtwXt5JS1b3QosZxg/tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "contractAddress" : "tNULSeBaNAKfKnLMR5XG5qtwXt5JS1b3QosZxg",
    "name" : "io",
    "symbol" : "IO",
    "amount" : "8000",
    "decimals" : 1,
    "blockHeight" : 719,
    "status" : 1
  }
}

4.7 Getting Smart Contract Details

Cmd: /api/contract/info/{address}

Detailed description: Get smart contract details

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
address string contract address yes

return value

Field Name Field Type Parameter Description
createTxHash string publish contract trading hash
address string contract address
creater string contract creator address
alias string contract alias
createTime long contract creation time (unit: second)
blockHeight long Block Height at Contract Creation
isDirectPayable boolean Whether to accept direct transfer
tokenType int token type, 0 - non-token, 1 - NRC20, 2 - NRC721
isNrc20 boolean Is it a NRC20 contract
nrc20TokenName string NRC20-token name
nrc20TokenSymbol string NRC20-token symbol
decimals long Number of decimal places supported by NRC20-token
totalSupply string NRC20-token Distribution Total
status string contract status (not_found, normal, stop)
method list<object> Contract Method List
        name string method name
        desc string Method Description
        args list<object> Method parameter list
                type string Parameter Type
                name string Parameter Name
                required boolean Required
        returnArg string Return value type
        view boolean Whether view method (calling this method data is not on the chain)
        event boolean Whether it is an event
        payable boolean Is it acceptable to transfer the main chain asset
        jsonSerializable boolean Method Returns whether JSON is serialized

Example request data:

request path: http://localhost:18004/api/contract/info/tNULSeBaMxyMyafiQjq1wCW7cQouyEhRL8njtu

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "createTxHash" : "de8825c942f50896f65c3c7c9ab18e388218568c7da64e09420a106b02edd81f",
    "address" : "tNULSeBaMxyMyafiQjq1wCW7cQouyEhRL8njtu",
    "creater" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
    "alias" : "rf_innercall_offline",
    "createTime" : 1563285762,
    "blockHeight" : 743,
    "directPayable" : true,
    "nrc20" : false,
    "nrc20TokenName" : null,
    "nrc20TokenSymbol" : null,
    "decimals" : 0,
    "totalSupply" : null,
    "status" : "normal",
    "method" : [ {
      "name" : "_payable",
      "desc" : "() return void",
      "args" : [ ],
      "returnArg" : "void",
      "view" : false,
      "event" : false,
      "payable" : true
    }, {
      "name" : "<init>",
      "desc" : "() return void",
      "args" : [ ],
      "returnArg" : "void",
      "view" : false,
      "event" : false,
      "payable" : false
    }, {
      "name" : "getName",
      "desc" : "() return String",
      "args" : [ ],
      "returnArg" : "String",
      "view" : false,
      "event" : false,
      "payable" : false
    }, {
      "name" : "getSymbol",
      "desc" : "() return String",
      "args" : [ ],
      "returnArg" : "String",
      "view" : false,
      "event" : false,
      "payable" : false
    }, {
      "name" : "getDecimals",
      "desc" : "() return int",
      "args" : [ ],
      "returnArg" : "int",
      "view" : false,
      "event" : false,
      "payable" : false
    }, {
      "name" : "balance",
      "desc" : "() return String",
      "args" : [ ],
      "returnArg" : "String",
      "view" : false,
      "event" : false,
      "payable" : false
    }, {
      "name" : "single",
      "desc" : "() return String",
      "args" : [ ],
      "returnArg" : "String",
      "view" : false,
      "event" : false,
      "payable" : false
    }, {
      "name" : "multy",
      "desc" : "() return String",
      "args" : [ ],
      "returnArg" : "String",
      "view" : false,
      "event" : false,
      "payable" : true
    }, {
      "name" : "multyForAddress",
      "desc" : "(Address add1, BigInteger add1_na, Address add2, BigInteger add2_na, String add3ForString, BigInteger add3_na) return String",
      "args" : [ {
        "type" : "Address",
        "name" : "add1",
        "required" : false
      }, {
        "type" : "BigInteger",
        "name" : "add1_na",
        "required" : false
      }, {
        "type" : "Address",
        "name" : "add2",
        "required" : false
      }, {
        "type" : "BigInteger",
        "name" : "add2_na",
        "required" : false
      }, {
        "type" : "String",
        "name" : "add3ForString",
        "required" : false
      }, {
        "type" : "BigInteger",
        "name" : "add3_na",
        "required" : false
      } ],
      "returnArg" : "String",
      "view" : false,
      "event" : false,
      "payable" : true
    }, {
      "name" : "allInfo",
      "desc" : "() return String",
      "args" : [ ],
      "returnArg" : "String",
      "view" : false,
      "event" : false,
      "payable" : false
    } ]
  }
}

4.8 Getting Smart Contract Execution Results

Cmd: /api/contract/result/{hash}

Detailed description: Get smart contract execution results

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
hash string transaction hash yes

return value

Field Name Field Type Parameter Description
success boolean Successful contract execution
errorMessage string Execution failure information
contractAddress string contract address
result string Contract execution result
gasLimit long GAS Limit
gasUsed long GAS has been used
price long GAS unit price
totalFee string Total transaction fee
txSizeFee string Transaction Size Fee
actualContractFee string Actual execution contract fee
refundFee string Contract return fee
value string The amount of the primary network asset that the caller transferred to the contract address. If there is no such service, it is 0
stackTrace string Exception Stack Trace
transfers list<object> Contract Transfer List (from contract)
        txHash string Contract Generation Transaction: Contract Transfer Transaction hash
        from string Transferred contract address
        value string Transfer amount
        outputs list<object> Transferred Address List
                to string
                value string
        orginTxHash string Call contract transaction hash (source transaction hash, contract transaction derived from calling contract transaction)
events list<string> Contract Event List
tokenTransfers list<object> Contract Token Transfer List
        contractAddress string Contract Address
        from string Payment Party
        to string Payee
        value string Transfer amount
        name string token name
        symbol string token symbol
        decimals long Number of decimal places supported by token
invokeRegisterCmds list<object> Contract Call List of Calls to External Commands
        cmdName string command name
        args map Command parameters, parameters are not fixed, according to different commands, so not described here, the structure is {parameter name=parameter value}
        cmdRegisterMode string Registered Command Mode (QUERY_DATA or NEW_TX)
        newTxHash string generated transaction hash (when the command mode called is NEW_TX, the transaction is generated)
contractTxList list<string> List of serialized strings for contract generation transactions
remark string Notes

Example request data:

request path: http://localhost:18004/api/contract/result/f0a5fc5d20c39355e35f1fe8011b1a28e7c65d8566ae8d76b297a22d1110851d

request form data: no

Example response data:

{
  "success" : true,
  "data" : {
    "flag" : true,
    "data" : {
      "success" : true,
      "errorMessage" : null,
      "contractAddress" : "tNULSeBaN1rhd9k9eqNkvwC9HXBWLQ79dRuy81",
      "result" : "multyForAddress: 888634777633",
      "gasLimit" : 200000,
      "gasUsed" : 20038,
      "price" : 25,
      "totalFee" : "5100000",
      "txSizeFee" : "100000",
      "actualContractFee" : "500950",
      "refundFee" : "4499050",
      "value" : 10000000000,
      "stackTrace" : null,
      "transfers" : [ {
        "txHash" : "4877f6a865dea5b4ac82a8370d73e62da15bc7acb2145a03822dddfdab329d2b",
        "from" : "tNULSeBaN1rhd9k9eqNkvwC9HXBWLQ79dRuy81",
        "value" : "200000000",
        "outputs" : [ {
          "to" : "tNULSeBaMp9wC9PcWEcfesY7YmWrPfeQzkN1xL",
          "value" : "100000000"
        }, {
          "to" : "tNULSeBaMshNPEnuqiDhMdSA4iNs6LMgjY6tcL",
          "value" : "100000000"
        } ],
        "orginTxHash" : "b5473eefecd1c70ac4276f70062a92bdbfe8f779cbe48de2d0315686cc7e6789"
      } ],
      "events" : [ "{\"contractAddress\":\"TTb1LZLo6izPGmXa9dGPmb5D2vpLpNqA\",\"blockNumber\":1343847,\"event\":\"TransferEvent\",\"payload\":{\"from\":\"TTasNs8MGGGaFT9hd9DLmkammYYv69vs\",\"to\":\"TTau7kAxyhc4yMomVJ2QkMVECKKZK1uG\",\"value\":\"1000\"}}" ],
      "tokenTransfers" : [ {
        "contractAddress" : "TTb1LZLo6izPGmXa9dGPmb5D2vpLpNqA",
        "from" : "TTasNs8MGGGaFT9hd9DLmkammYYv69vs",
        "to" : "TTau7kAxyhc4yMomVJ2QkMVECKKZK1uG",
        "value" : "1000",
        "name" : "a",
        "symbol" : "a",
        "decimals" : 8
      } ],
      "invokeRegisterCmds" : [ {
        "cmdName" : "cs_createContractAgent",
        "args" : {
          "contractBalance" : "2030000000000",
          "commissionRate" : "100",
          "chainId" : 2,
          "deposit" : "2000000000000",
          "contractAddress" : "tNULSeBaMzZedU4D3xym1JcyNa5sqtuFku8AKm",
          "contractNonce" : "0000000000000000",
          "blockTime" : 1562564381,
          "packingAddress" : "tNULSeBaMtEPLXxUgyfnBt9bpb5Xv84dyJV98p",
          "contractSender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG"
        },
        "cmdRegisterMode" : "NEW_TX",
        "newTxHash" : "a8eae11b52990e39c9d3233ba1d2c8827336d261c0f14aca43dd4f06435dfaba"
      } ],
      "contractTxList" : [ "12002fbb225d0037b5473eefecd1c70ac4276f70062a92bdbfe8f779cbe48de2d0315686cc7e678902000253472f4702eb83b71871a4c4e0c71526bb86b8afd0011702000253472f4702eb83b71871a4c4e0c71526bb86b8af0200010000c2eb0b0000000000000000000000000000000000000000000000000000000008000000000000000000021702000194f6239c075d184e265eaea97a67eeced51725160200010000e1f50500000000000000000000000000000000000000000000000000000000000000000000000017020001ce8ffa95606f0bfd2778cff2eff8fe8999e20c440200010000e1f50500000000000000000000000000000000000000000000000000000000000000000000000000", "1400bf6b285d006600204aa9d1010000000000000000000000000000000000000000000000000000020002f246b18e8c697f00ed9bd22696998e469d3f824b020001d7424d91c83566eb94233b5416f2aa77709c03e1020002f246b18e8c697f00ed9bd22696998e469d3f824b648c0117020002f246b18e8c697f00ed9bd22696998e469d3f824b0200010000204aa9d1010000000000000000000000000000000000000000000000000000080000000000000000000117020002f246b18e8c697f00ed9bd22696998e469d3f824b0200010000204aa9d1010000000000000000000000000000000000000000000000000000ffffffffffffffff00" ],
      "remark" : "call"
    }
  }
}

4.9 Get the list of smart contract execution results

Cmd: /api/contract/result/list

Detailed description: Get smart contract execution result list

HttpMethod: POST

Form json data:

{
  "hashList" : [ ]
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Get the list of smart contract execution results contractresultlistform Get smart contract execution result list form Yes
        hashList list<string> Trading hash list Yes

return value

Field Name Field Type Parameter Description
hash1 or hash2 or hash3... object Use the hash value in the transaction hash list as the key, where the key name is dynamic
        success boolean Successful contract execution
        errorMessage string Execution Failure Information
        contractAddress string Contract Address
        result string Contract execution results
        gasLimit long GAS Limit
        gasUsed long GAS has been used
        price long GAS unit price
        totalFee string Total Transaction Fees
        txSizeFee string Transaction Size Fees
        actualContractFee string Actual Execution Contract Fee
        refundFee string Fees returned by the contract
        value string The amount of the primary network asset that the caller transferred to the contract address, or 0 if there is no such service
        stackTrace string Exception Stack Trace
        transfers list<object> Contract Transfer List (from contract)
                txHash string Contract Generation Transaction: Contract Transfer Transaction hash
                from string Transferred contract address
                value string Transfer amount
                outputs list<object> Transferred Address List
                        to string transfer address
                        value string Transfer amount
                orginTxHash string Call contract transaction hash (source transaction hash, contract transaction is called Contract trading is derived)
        events list<string> Contract Event List
        tokenTransfers list<object> Contract Token Transfer List
                contractAddress string contract address
                from string payment
                to string Payee
                value string Transfer amount
                name string token name
                symbol string token symbol
                decimals long Number of decimal places supported by token
        invokeRegisterCmds list<object> Contract Call List of Calls for External Commands
                cmdName string command name
                args map command parameters, parameters are not fixed, depending on different commands Therefore, it is not described here, and the structure is {parameter name=parameter value}
                cmdRegisterMode string Registered Command Mode (QUERY_DATA or NEW_TX)
                newTxHash string generated transaction hash (when the command mode is called NEW\ When _TX, a transaction will be generated)
        contractTxList list<string> Serialized String List for Contract Generation Transactions
        remark string Notes

Example request data:

request path: slightly

request form data:

{
  "hashList" : [ "c2460b94430074dd98e497ed9d48afb8f44d1323b73ca2086f5abaa0684b760d", "48b2f348f201f9d10848f4031a746919470b679f621327b0e0edf50a339f2e87", "2e99610b7d295790b636fcdb8acf72d70fcae61c873df0984ef248bbbaa6daa2" ]
}

Example response data:

{
  "success" : true,
  "data" : {
    "c2460b94430074dd98e497ed9d48afb8f44d1323b73ca2086f5abaa0684b760d" : {
      "success" : true,
      "errorMessage" : null,
      "contractAddress" : "tNULSeBaN5Y2gRias1NMNVmsmXqJbu5Bcp3ZPL",
      "result" : null,
      "gasLimit" : 20000,
      "gasUsed" : 13429,
      "price" : 30,
      "totalFee" : "1300000",
      "txSizeFee" : "700000",
      "actualContractFee" : "402870",
      "refundFee" : "197130",
      "value" : "0",
      "stackTrace" : null,
      "transfers" : [ ],
      "events" : [ "{\"contractAddress\":\"tNULSeBaN5Y2gRias1NMNVmsmXqJbu5Bcp3ZPL\",\"blockNumber\":68,\"event\":\"TransferEvent\",\"payload\":{\"from\":null,\"to\":\"tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG\",\"value\":\"800000\"}}" ],
      "tokenTransfers" : [ {
        "contractAddress" : "tNULSeBaN5Y2gRias1NMNVmsmXqJbu5Bcp3ZPL",
        "from" : null,
        "to" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
        "value" : "800000",
        "name" : "io",
        "symbol" : "IO",
        "decimals" : 1
      } ],
      "invokeRegisterCmds" : [ ],
      "contractTxList" : [ ],
      "remark" : "create"
    },
    "48b2f348f201f9d10848f4031a746919470b679f621327b0e0edf50a339f2e87" : {
      "success" : true,
      "errorMessage" : null,
      "contractAddress" : "tNULSeBaN5Y2gRias1NMNVmsmXqJbu5Bcp3ZPL",
      "result" : "true",
      "gasLimit" : 200000,
      "gasUsed" : 9444,
      "price" : 30,
      "totalFee" : "6100000",
      "txSizeFee" : "100000",
      "actualContractFee" : "283320",
      "refundFee" : "5716680",
      "value" : "0",
      "stackTrace" : null,
      "transfers" : [ ],
      "events" : [ "{\"contractAddress\":\"tNULSeBaN5Y2gRias1NMNVmsmXqJbu5Bcp3ZPL\",\"blockNumber\":71,\"event\":\"TransferEvent\",\"payload\":{\"from\":\"tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG\",\"to\":\"tNULSeBaMtkzQ1tH8JWBGZDCmRHCmySevE4frM\",\"value\":\"4000\"}}" ],
      "tokenTransfers" : [ {
        "contractAddress" : "tNULSeBaN5Y2gRias1NMNVmsmXqJbu5Bcp3ZPL",
        "from" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
        "to" : "tNULSeBaMtkzQ1tH8JWBGZDCmRHCmySevE4frM",
        "value" : "4000",
        "name" : "io",
        "symbol" : "IO",
        "decimals" : 1
      } ],
      "invokeRegisterCmds" : [ ],
      "contractTxList" : [ ],
      "remark" : "call"
    },
    "2e99610b7d295790b636fcdb8acf72d70fcae61c873df0984ef248bbbaa6daa2" : {
      "success" : true,
      "errorMessage" : null,
      "contractAddress" : "tNULSeBaN5Y2gRias1NMNVmsmXqJbu5Bcp3ZPL",
      "result" : "true",
      "gasLimit" : 200000,
      "gasUsed" : 5836,
      "price" : 30,
      "totalFee" : "6100000",
      "txSizeFee" : "100000",
      "actualContractFee" : "175080",
      "refundFee" : "5824920",
      "value" : "0",
      "stackTrace" : null,
      "transfers" : [ ],
      "events" : [ "{\"contractAddress\":\"tNULSeBaN5Y2gRias1NMNVmsmXqJbu5Bcp3ZPL\",\"blockNumber\":72,\"event\":\"ApprovalEvent\",\"payload\":{\"owner\":\"tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG\",\"spender\":\"tNULSeBaMtkzQ1tH8JWBGZDCmRHCmySevE4frM\",\"value\":\"4000\"}}" ],
      "tokenTransfers" : [ ],
      "invokeRegisterCmds" : [ ],
      "contractTxList" : [ ],
      "remark" : "call"
    }
  }
}

4.10 Get Contract Code Constructor

Cmd: /api/contract/constructor

Detailed description: Get contract code constructor

HttpMethod: POST

Form json data:

{
  "contractCode" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Get Contract Code Constructor contractcode Get Contract Code Constructor Form Yes
        contractCode string Smart Contract Code (Hex encoded string of bytecode) Yes

return value

Field Name Field Type Parameter Description
Constructor object contract constructor details
        name string method name
        desc string Method Description
        args list<object> Method parameter list
                type string Parameter Type
                name string Parameter Name
                required boolean Required
        returnArg string Return value type
        view boolean Whether view method (calling this method data is not on the chain)
        event boolean Whether it is an event
        payable boolean Is it acceptable to transfer the main chain asset
        jsonSerializable boolean Method Returns whether JSON is serialized
isNrc20 boolean Is it a NRC20 contract

Example request data:

request path: slightly

request form data:

{
  "contractCode" : "504b03040a0000080000aa7b564e00000000000000000000000003000400696f2ffeca0000504b03040a0000080000aa7b564e00000000000000000000000008000000696f2f6e756c732f504b03040a0000080000aa7b564e00000000000000000000000011000000696f2f6e756c732f636f6e74726163742f504b03040a0000080000aa7b564e00000000000000000000000017000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b0304140008080800aa7b564e00000000000000000000000028000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373b558f97754e5197eeecc90990c972d9090059209a498cc9291a58a8152020d35ca5602b1605bbd99b9492ecc12670922b46ead4babd56aeb5ad1565bd4aa2c020169d59ed353cfe93fd17f84d3d3e7fdee9d3b37612639d5d31ff2ddf77ecbfb3eeff67c77f2afff7cf639804df87b23a23825c323329c96e14c1831fcb411cdf859108f86119497281e93e171997e22cce149197e1ec62ff0d462acc2d3413c13c672fc2a8ce7f0bcccfc3a8817827831cc53bf91e125195e96e5df8af4bb205e09a3430e44f19a0cafcbf086a87d5386df87f096cc9c9597b7457a27843fc8f38f21bc2b7ade0be24f41fc39887341bcaf219033b2a686a6bdc78d692399317213c99152c1ca4d6cd3d0503c951dcb673484d266caca1a99a2066d58c3e252be646446ca535399531a5aeca359a33499dc654d0ce74ae68459e0f1d098417d2993a796d97bca252b93dc674c71b171c49ac819a57281c68766af6edf6be593b972a6984ce573a582912a258be913c9c174ba60168bdb6a9bdb419d412393c99f34d31a4a5f43e337342f0056f5f6d58a6360773e6d4a10ac9cb9bf9c1d330b878db18c8a7a3e6564468d8225efce64a0346931643db7c228e54f98b9e488959de26691a9bbed503957b2b2e6a855b4787c3097636e4a563e47151b6a7b62b87b92a39679924afcbd7d4c6b6b05fdada96cd86ee5acd20e0d3b7a6f75b0decc5c35c37da31a968822cbc80c66f304ae61dd6cfc078d02ebb164166639125dd09143e64365ab60a6a5b2541548e16938dcbb4032e75dad1b8e45f99339b3a0a173fef3acc8e294994bcb565d1d19ac14e8a269235336a5796655c0a9a94a152c192919a9132c47f56eb302b5d048ae386e16f614f2590d47be917bb5bdeb3bc6121c57ea7da53cc3e974f181710d772c60af6ec0828e129242c5030d772e84be2ebea0313555c84f53dd722b972a9846d11c543306c92a6ca4d3667ad48eef7232d79cf565c5f29832e66e0ae53315510ebb49fabf84973d1032ec2d1babe2260f2ed77eb868565f96550e559739b3ab12d7af19cc5109a6bdc583c0d5ba283569a64e90657aeb9f4fd659ab7fa24115ffc68a40df63f3eaf0528b9cf7678b131a06ff27bbb5358547f2e542cadc6349cb2df7306bbf6cd7d18fa48edb65d8884d3a36638b8e217ca0e3436cd1b0a27a6fdc6d1427d9ac3abe8d3b74dc25c35f64f347f858c727381fc4051d177149c7a7b84c42abc3edca76cf61a74586a64da1c82573def5e11ca96477c62816cda2e0213d5cd17115333aaee13a0fccbacf782dd58a888e49983a72c8e83821c367b8a1c382b910ba4a2755d0cd7ad79116adf7e05e1d79301e7fc5df747c8ef31a3a8673c5f2f8b895b2b82fe274703aa254cbe6691d5fe0bc8ea36087270e4f9a11551d916cb9588a8c999109f6312f864869d2c845f2850819dfc8f078e4f67e394e289db32c389413c98fdb36fac5c52f79e32c7cafb216aae57260ecb899a2f6b535fb6bb7f3a261cd7c5153772c0b2e706ce8d001be1c1edacf712a7f527a6bb82e6f86b2e54cc9529f59fdf55ab0ded9d69a78f749eb34149d5b29c22b7f812bcc3f55a6735bbdf7be1d916db7cef4dd3aa5a1bda68123ac4e524ec0cc5a54df5587bd544dd93d3f6172df861a306a1a0d16ec0f025ae83d26e71b53f9ec9451607ee761337e04f9c9868c7b85097943f71eabc51de8e637750c3ec49140039a842af8e3a049d8423d49187cfa8433d493c400d2b492b7f2ef2ecffb003fd699616ca3bc9d3349be697c2e8a5e8676416df90ec70635b9163b38eaf6067c173bf91c745677f1a911422d45beb98ad62fa8682376d750e4ff688ea2be05156dc6f76a280acc45945c50d110f6388afecd1d8bf834a3335476090d571088de40f0e80c4257d05815c3d1d81568d1f815f8a2cd812bf0471397b0b8397015fa552c915397d1780d4b05d0752cf3e3be1b587e54736666b0e21a9a2eba40fbb158fd060c30658bb11a2d6865296cc606a639c6246f645a0799d6434c729a491687b6d8401d8744ea57711049cac5a7a4ef739f5f491b95febb29b705b86d58797eeb4892e50189c51754212692441c8e5dc74a1fbec4aafd89af1064602e24e2ce54f340a02df015429c1449c21f505e75f2f72a887529313611650bc3bd8ec9bf8d798b33e4552f92ae1749ecc53e276dfb29f978ba1b07e8bf9f6797e0204f04f00327a1f6da56ae1de2cc52f86ea22588919b680ee2f0ac248bdf4b7c737c3d825127ef670823c0674f34c6142566d0128d715c1d8d736c95d4c54492ac05aa85daa2c0df8b46825e46b0cd84bc8e80c4b1a8adcf75ac07f7398ef5e087ca31910eaaf408b895fe9ae9e0bde5a4e3491e914cf6c4fe8960e01c02fe6b68932aaba4a6795fdc4ecdbeb8e4c0ef817884d11a453b2174d2f83aea1488115b9f07a21dfb7684713f81f9545417c31fdaa9dd446bad90063517e98ff0632798166d8ae6ae2863199728c6e24e143921f29c3836a9583d80101e64120d92d1980760970bb04b454e53d24105b0665a7fe22279d041d21e750cb7df404705c49ad92096aa9d134ce624bbcff200687701b4ab9ad494340f80075c00136c0151d15d01b0b602404d5c45671d1c59e2c8d1cdbc0747b78ba3dbc5d14d1febe2305c1c978943623c142586ae8aedfdf1c45544ce62859a60e53040e7a057b0b6cc83d5efe9f022a35c22ee32ab6d9a55f4302faf47d8e7a73d8d30e4621f72b10f31cd5b5487df89946a04a9b746e9e21e165ba896533ef914a42c4e3de1907584f545740381685b40bc4bc8108bb705e85d375daaf2acdd0d8fb2d01ea3d5c7b1923abad85955268ab83823187770469846bb61234ec3865821f72826f2c907af83e78c83a7d38327d1b46e06eb2b687a66a1b1cbfe296a7b1a2bf00ccbfe590f924e1749a78ba4d345d2e922697191582e927f7045740cd8b1f0f2b74dd66dce453610508b6dce1dd51688276c49507a59fc39ea7b5efe958836bc40067991fcfc126fa2973d88075cc4032ee20117f1808378156fb5e3e4f32a8bdb335b3923f90f816493248bf3147f42381e9de6aa448ba1bc8a6fed8fc69b36cce0b68a7b8db10423de5d85ee4df72b64ac577975bcc680bf4ee86f78ca72bd0b793d5b6e9ff30563b776031372bf82ec931f340e90a203a4cb01928837f54a862b207ae682b0b3fc16d59d65cdbdcd78bee301e025b7ec1c726b60ac2b00f8b3c701708c6f12cfd5bc075648d3b285dfacde0817dde60cab6def320aef29832df631d7e06a654653415f045fd34e4dd979c8b133e5dc371dd19804597843cabab62ddbc973d4f33eed7e407afcd0435c1daecd0e14944d918aee1543eb2d8ef59263dd74acb7d6f0327e0d7d73ddfc98ee7ce231d9ea9a6c75dc14a9acbe8be6383ced96984f79b1a68ec38959666d8f2f52d12542f894fe5cf6a4758d6b7e8debf11ac7639104887fb6ef2755c53c8c5f2ae53e2c278b3e4b36ece0f35534fe17504b0708ec308779cb09000028180000504b0304140008080800aa7b564e00000000000000000000000022000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373a552d14e1341143d03b5cb16aa28a8a0284a08697970131ff481a76a24694282a19507dfa6bb431d989da933b325fc9a0f7e801f65bc534ba5b6a5896eb23b3be79e7bcebd33f7c7cf6fdf01bcc64e84e711b623bc60a8367a3d6bfa5c7de80bed19569a5a0bfb5e71e7848bf092186dcbb53b1376c828699e0b86f55afde89cf779a2b8ee262d6fa5ee1e306c9e14dacb5c9c4a273b4a34b4369e7b69b463d83b9226d18572496ab4b73cf589cb2e123ee224a7525c9248d95de51da318963291ca9c2b4a5eacd59b0ccb9ea8aa55f47aea8a61e3ba869cfb2fc93bd96d6a2fbac29244dce154582a8ecf18ded4a61b37b2cc0ae70e668aec8c37f3915b6add0b3bd6d5fedcae4ec4d7425a9191e2921f1e26c3db39554d2faafe99eee85ae4d09a9ce1d33ca17fb489f86034e8ae63ae94b90cc7c9d0fe2fb799475d6999c2a6e2502af2a8b4cd85d0af0295616b42d0876832e030acfe19c2e3ceb9486942f76fcbd8fd6be06f278fcd7e99816101e1894b749788695fa15d99d66580b0952958157727b07b589dc0eee301a9dfc0b0466f144cd70784877844ff01ac2efc0647a1c7d81886d6166f864684cdd9b94ff0748aef388d085b83ef33dca135141a7c4ad46e488a10ff02504b070868fe421cca0100005e040000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c6173738d565b6f1b4514fec6bbde75b69bbb49d224b46929e05b6a2ee19a4b73218140d2943835b4406163af926d9cdd74771d90a0129540ea033c801020242e2f252f790089b80824c45390f82ffc03049c995dbb89e3243cf8ccd93367e67cdf7c6746fef39f5f7e03f018ae6988e34213148c7333c1cd248f4da998d63083e735bcc0cd0c66b937abe2450d2770218697f838c7cd7c0c176358e0ee256e5e56b1a822c71075deb64d97e1d49ce564ed72c9cb161cdb778d829ff58a6bd98962d1353d6f9841f5364cbbc853a39b46a96c3274cd5d37368decbae1af6627ad9559db37574c97529511cbb6fc3186cb89a3773d66b6e1f6c93c833ce5140940eb9c659b17cbebcba6bb642c9728d231e7148c52de702dfe1d06657fd5f2189a2736365c87b04f6f9ab6cfa0cfdac47caa64789e49d39983607c67cdb4b34bdc9edbb798389e5d2cdbbeb56ee62dcfa22a970cd758377dd39db06dc7377ccbb169cf546382462d27bb68de285bae59a41d632ba6bf10883190481e2747ccab659f39e694f98969b479ae2aa0e6edf9e065f381a03d54f6104979b930eb64e2706114a2639488f97d6152c9b057b20bcbd7cd823f9cbccac01c2ed28129219241a234e77ca3b0366f6c08eda8c1a9f4aae1ad06824b89e42c152156e5122533fa88f94ece772d7b85215e852f760ea2b4b39673ca6ec19cb1782f6842cdf33c4d471f967474a15b470f3727d1abe332f22a5e21e9fe7f37a87855c7237854c5151d4fe16986ee7a189365ab244e3bbe6fe5bbe2f28deab88ad7b8799d006606c28b364ae43203e2ae898c37740c6384a1adfef4187a1bea1ff6391d5a3e9059f43a43e7be7312413aa6fea308379aded362c4ab514b9054c60627c330983828cd41b5c2631aaecbaff6cf11f9fd89a9c3a771869ecc38a82b2121c215a78735c2451723e94ea346f37de8a7effbe9ab44a34c633c75172c95de412495d981941adc81fca358758a6c17a2646f50a68b267868818f4e94719aa2a9603d06f000203c5e97098f578e088fd796708efc4e89261f2467bf7d080f93e590b234f2e5d1d44f88fc50c3a088e03ba2a61e248435191248868bc7289b575404977b0c34117d8fd6dc143b74055935d44a889a2e444320523d90f71b0249370622d503f980d67c7808909e104806830d80c8f5406e3704725e2c3a0044ae07f211adf9f810205c335e98ae7cb8d75f9423d1782b95fe1e51793bbd8b965405d134fdee202a6da77f8732cf75dba58ea22143bf0ad4afd0ba45375ec4298b9f679020514cda9b205513e45db4f381627205b12db472ef0fa8f21664699b404882462f01053e818a4fe9e43e23989f13e52ff026be14b40602c0355ab7e89fc6e3824e1143148be009d1a0badac2fe46bf8a2715d6adb0b836cea9d32b1752ff393cc6e9805d734a306be26046da4ef7ad069c78580ac36f55e37210271a5a10efbb07bf43dc9eafe9367d43cdf32da6f0dd1e35a643d89d04fa193c4b5038d84128ede3ec5fbae511824b30c947e84718cbefffa445f49c862caed1b6bc51867ec5892b77a1773457484141a5b5a32df025eeb7073e616e6dbb594147059df58d77674fe30d8540231815760c67c3a746c173f42c35fd07504b0708ea7bbc798f040000e6090000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c6173738d56df531b5514fe6e76b31bb60be19740015b5aab8624b06ad156c36f84160da5051a0bd5da25d9c296b08bbb1b5e1c1ffa6ff8aebcf0a033923a3ae3f88433fe2ffe078e7aeedd854212c0879c7bf6dc73eef9cef9cebd933ffff9e53700efe189864e4c3441c12417535c4c73db8c8a590d73b8a3e12e177398e7dabc8a4f345cc244029ff235cfc54202f71258e4ea7d2e1ea85852b1cc203ff3dc6d862b79db359c4ad9378aae1378663130fcd29631552a7996efe7186281cb10df35cb158ba12bffdcdc358d6d33d834a6ed8d7927b0362c8fbc9451dbb183718687a9f30fbc60b7e1f18305823be3960840326f3bd6bdcaf6bae5ad98eb65b2b4e7dda2592e989ecdbf23a31c6cda3e43f38a673afe33cb9bddb59c80419f771ccb9b299bbe6fd176b61e4ce06e598eb1c2e58d53c154e3f5a58a13d8db56c1f66dca72dff4cc6d2bb0bc29c7710333b05d87ce4c372ed03cf63196acaf2ab66795e84475c30ae6040d03a9c18b8850fd23e76b17f498f72b4e47af70e6fc704dd0772124b187729d4163c23ff6ba9c3a9b0c854a30cb54ed6b9153d974368cc5f5e75631c80dae3130971353b72588318988e6e5c02c6e2d983b822f1a674abd69fa9b21c9526a709e92502d95323933fa4804ee72e0d9ce0643e7117c717268a593b565b7e215ad399bf3af090687b99b8e3eace8e842b78e1e2e2ea357c74314547c4674fdff0950f148c73b7857c5aa8e5bb8cdd05d0b63ba62974b96c7d0712af26b7ed5c674ace131179f132bd981c01da3b2b203e26689cd2f74e430cad05adb3786de867c47534ded2a84048bc9a6eca73a248cd4a0fef34a6db47d62a4a8eb8d8681483277762ca7c43094aa27a59ea7a841b91affa3c939c7bf3f3573f636aed1d3d8099a47488871aee9018d71bac54a8cd3aad17e1ffae9fb75fa2ad32ad3da997e0996ce1c2096ce1e404a0f1d40fe51445d21d98538c92c790ea109c36881810e1a82ab644d87f118c01b80d0785e26349e3926349e5bc20dd293120986374fc8b7f036490ec7a09587c6d33f21f6c3717e45186f8a7c7ae810e5634861300a1e276f9e4d1175bc42af09eb2d8ab92d4ee80abd8e112b1162ba060d8148b540720d81641a03916a814c50cce419407a2220596a743d10b916c84c4320c322a80e885c0be40ec5dc3d0308e78b27a68b1e9df517f970ea5ea433df232eef670ed192ae229ea1df77884bfb99dfa12c70de0e699a68c9d2af0af55b24f7a065859dbc783f4307896cd24907e9c8413e441b5fc8265791d843926b7f4095f7204bfb04421265f41250200f150bd4b94582f9804a5ec2975816650d84808fcb7a41ff266e8a724a18215b0cef8be1d4d516f637fa557ca0b06e85756a93bc747adba2d27f8eda381b56d79c1695357130a3ad57fb36c39ab8598acc4f8fec7268a732b4d0def70a7ebbb8398fe826add2f0ac119b8f4fb0311bc1ee20d01fe22382c2c10e41699b64ffd20d8f115c82493a223dc658e1f42705d1531a55f1848ee58332f22b2eadbe84dede5c25064529c9f6d65097b8de16ea8439d9fa4d15ed5574d40eded313833712018d614cc8715c8f9e19051fd393d4f41f504b0708826261e37e040000ca090000504b01020a000a0000080000aa7b564e000000000000000000000000030004000000000000000000000000000000696f2ffeca0000504b01020a000a0000080000aa7b564e000000000000000000000000080000000000000000000000000025000000696f2f6e756c732f504b01020a000a0000080000aa7b564e00000000000000000000000011000000000000000000000000004b000000696f2f6e756c732f636f6e74726163742f504b01020a000a0000080000aa7b564e00000000000000000000000017000000000000000000000000007a000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b01021400140008080800aa7b564eec308779cb090000281800002800000000000000000000000000af000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373504b01021400140008080800aa7b564e68fe421cca0100005e0400002200000000000000000000000000d00a0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373504b01021400140008080800aa7b564eea7bbc798f040000e60900003000000000000000000000000000ea0c0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c617373504b01021400140008080800aa7b564e826261e37e040000ca0900003000000000000000000000000000d7110000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c617373504b0506000000000800080051020000b31600000000"
}

Example response data:

{
  "success" : true,
  "data" : {
    "constructor" : {
      "name" : "<init>",
      "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
    },
    "nrc20" : true
  }
}

4.11 Get information about the specified function of the published contract

Cmd: /api/contract/method

Detailed description: Get information about the specified function of the published contract

HttpMethod: POST

Form json data:

{
  "contractAddress" : null,
  "methodName" : null,
  "methodDesc" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Get information about the specified function of the published contract contractmethodform Get the information form of the specified function of the published contract Yes
        contractAddress string Smart Contract Address Yes
        methodName string method name yes
        methodDesc string Method Description, if the method in the contract is not overloaded, this parameter can be empty No

return value

Field Name Field Type Parameter Description
name string method name
desc string Method Description
args list<object> Method parameter list
        type string Parameter Type
        name string Parameter Name
        required boolean Required?
returnArg string return value type
view boolean whether the view method (calling this method data is not on the chain)
event boolean Whether it is an event
payable boolean Is it a method of accepting main chain asset transfers
jsonSerializable boolean Method Returns whether JSON is serialized

Example request data:

request path: slightly

request form data:

{
  "contractAddress" : "tNULSeBaMxyMyafiQjq1wCW7cQouyEhRL8njtu",
  "methodName" : "multyForAddress",
  "methodDesc" : null
}

Example response data:

{
  "success" : true,
  "data" : {
    "name" : "multyForAddress",
    "desc" : "(Address add1, BigInteger add1_na, Address add2, BigInteger add2_na, String add3ForString, BigInteger add3_na) return String",
    "args" : [ {
      "type" : "Address",
      "name" : "add1",
      "required" : false
    }, {
      "type" : "BigInteger",
      "name" : "add1_na",
      "required" : false
    }, {
      "type" : "Address",
      "name" : "add2",
      "required" : false
    }, {
      "type" : "BigInteger",
      "name" : "add2_na",
      "required" : false
    }, {
      "type" : "String",
      "name" : "add3ForString",
      "required" : false
    }, {
      "type" : "BigInteger",
      "name" : "add3_na",
      "required" : false
    } ],
    "returnArg" : "String",
    "view" : false,
    "event" : false,
    "payable" : true
  }
}

4.12 Get the list of parameter types for the specified function of the published contract

Cmd: /api/contract/method/argstypes

Detailed description: Get a list of parameter types for the specified function of the published contract

HttpMethod: POST

Form json data:

{
  "contractAddress" : null,
  "methodName" : null,
  "methodDesc" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Get the list of parameter types for the specified function of the published contract contractmethodform Get the parameter type form of the specified function of the published contract Yes
        contractAddress string Smart Contract Address Yes
        methodName string method name yes
        methodDesc string Method Description, if the method in the contract is not overloaded, this parameter can be empty No

return value

Field Name Field Type Parameter Description
Return value list<string>

Example request data:

request path: slightly

request form data:

{
  "contractAddress" : "tNULSeBaMxyMyafiQjq1wCW7cQouyEhRL8njtu",
  "methodName" : "multyForAddress",
  "methodDesc" : null
}

Example response data:

{
  "success" : true,
  "data" : [ "Address", "BigInteger", "Address", "BigInteger", "String", "BigInteger" ]
}

4.13 Verifying the release contract

Cmd: /api/contract/validate/create

Detailed description: Verify the release contract

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "gasLimit" : 0,
  "price" : 0,
  "contractCode" : null,
  "args" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Verify Release Contract contractvalidatecreate Verify Release Contract Form Yes
        sender string Transaction Creator Yes
        gasLimit long Maximum gas consumption Yes
        price long Execution contract price Yes
        contractCode string Smart Contract Code (Hex encoded string of bytecode) Yes
        args object[] Parameter List No

return value

Field Name Field Type Parameter Description
success boolean Verify success or not
code string Error code for verification failure
msg string Verify failed error message

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "gasLimit" : 20000,
  "price" : 25,
  "contractCode" : "504b03040a0000080000aa7b564e00000000000000000000000003000400696f2ffeca0000504b03040a0000080000aa7b564e00000000000000000000000008000000696f2f6e756c732f504b03040a0000080000aa7b564e00000000000000000000000011000000696f2f6e756c732f636f6e74726163742f504b03040a0000080000aa7b564e00000000000000000000000017000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b0304140008080800aa7b564e00000000000000000000000028000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373b558f97754e5197eeecc90990c972d9090059209a498cc9291a58a8152020d35ca5602b1605bbd99b9492ecc12670922b46ead4babd56aeb5ad1565bd4aa2c020169d59ed353cfe93fd17f84d3d3e7fdee9d3b37612639d5d31ff2ddf77ecbfb3eeff67c77f2afff7cf639804df87b23a23825c323329c96e14c1831fcb411cdf859108f86119497281e93e171997e22cce149197e1ec62ff0d462acc2d3413c13c672fc2a8ce7f0bcccfc3a8817827831cc53bf91e125195e96e5df8af4bb205e09a3430e44f19a0cafcbf086a87d5386df87f096cc9c9597b7457a27843fc8f38f21bc2b7ade0be24f41fc39887341bcaf219033b2a686a6bdc78d692399317213c99152c1ca4d6cd3d0503c951dcb673484d266caca1a99a2066d58c3e252be646446ca535399531a5aeca359a33499dc654d0ce74ae68459e0f1d098417d2993a796d97bca252b93dc674c71b171c49ac819a57281c68766af6edf6be593b972a6984ce573a582912a258be913c9c174ba60168bdb6a9bdb419d412393c99f34d31a4a5f43e337342f0056f5f6d58a6360773e6d4a10ac9cb9bf9c1d330b878db18c8a7a3e6564468d8225efce64a0346931643db7c228e54f98b9e488959de26691a9bbed503957b2b2e6a855b4787c3097636e4a563e47151b6a7b62b87b92a39679924afcbd7d4c6b6b05fdada96cd86ee5acd20e0d3b7a6f75b0decc5c35c37da31a968822cbc80c66f304ae61dd6cfc078d02ebb164166639125dd09143e64365ab60a6a5b2541548e16938dcbb4032e75dad1b8e45f99339b3a0a173fef3acc8e294994bcb565d1d19ac14e8a269235336a5796655c0a9a94a152c192919a9132c47f56eb302b5d048ae386e16f614f2590d47be917bb5bdeb3bc6121c57ea7da53cc3e974f181710d772c60af6ec0828e129242c5030d772e84be2ebea0313555c84f53dd722b972a9846d11c543306c92a6ca4d3667ad48eef7232d79cf565c5f29832e66e0ae53315510ebb49fabf84973d1032ec2d1babe2260f2ed77eb868565f96550e559739b3ab12d7af19cc5109a6bdc583c0d5ba283569a64e90657aeb9f4fd659ab7fa24115ffc68a40df63f3eaf0528b9cf7678b131a06ff27bbb5358547f2e542cadc6349cb2df7306bbf6cd7d18fa48edb65d8884d3a36638b8e217ca0e3436cd1b0a27a6fdc6d1427d9ac3abe8d3b74dc25c35f64f347f858c727381fc4051d177149c7a7b84c42abc3edca76cf61a74586a64da1c82573def5e11ca96477c62816cda2e0213d5cd17115333aaee13a0fccbacf782dd58a888e49983a72c8e83821c367b8a1c382b910ba4a2755d0cd7ad79116adf7e05e1d79301e7fc5df747c8ef31a3a8673c5f2f8b895b2b82fe274703aa254cbe6691d5fe0bc8ea36087270e4f9a11551d916cb9588a8c999109f6312f864869d2c845f2850819dfc8f078e4f67e394e289db32c389413c98fdb36fac5c52f79e32c7cafb216aae57260ecb899a2f6b535fb6bb7f3a261cd7c5153772c0b2e706ce8d001be1c1edacf712a7f527a6bb82e6f86b2e54cc9529f59fdf55ab0ded9d69a78f749eb34149d5b29c22b7f812bcc3f55a6735bbdf7be1d916db7cef4dd3aa5a1bda68123ac4e524ec0cc5a54df5587bd544dd93d3f6172df861a306a1a0d16ec0f025ae83d26e71b53f9ec9451607ee761337e04f9c9868c7b85097943f71eabc51de8e637750c3ec49140039a842af8e3a049d8423d49187cfa8433d493c400d2b492b7f2ef2ecffb003fd699616ca3bc9d3349be697c2e8a5e8676416df90ec70635b9163b38eaf6067c173bf91c745677f1a911422d45beb98ad62fa8682376d750e4ff688ea2be05156dc6f76a280acc45945c50d110f6388afecd1d8bf834a3335476090d571088de40f0e80c4257d05815c3d1d81568d1f815f8a2cd812bf0471397b0b8397015fa552c915397d1780d4b05d0752cf3e3be1b587e54736666b0e21a9a2eba40fbb158fd060c30658bb11a2d6865296cc606a639c6246f645a0799d6434c729a491687b6d8401d8744ea57711049cac5a7a4ef739f5f491b95febb29b705b86d58797eeb4892e50189c51754212692441c8e5dc74a1fbec4aafd89af1064602e24e2ce54f340a02df015429c1449c21f505e75f2f72a887529313611650bc3bd8ec9bf8d798b33e4552f92ae1749ecc53e276dfb29f978ba1b07e8bf9f6797e0204f04f00327a1f6da56ae1de2cc52f86ea22588919b680ee2f0ac248bdf4b7c737c3d825127ef670823c0674f34c6142566d0128d715c1d8d736c95d4c54492ac05aa85daa2c0df8b46825e46b0cd84bc8e80c4b1a8adcf75ac07f7398ef5e087ca31910eaaf408b895fe9ae9e0bde5a4e3491e914cf6c4fe8960e01c02fe6b68932aaba4a6795fdc4ecdbeb8e4c0ef817884d11a453b2174d2f83aea1488115b9f07a21dfb7684713f81f9545417c31fdaa9dd446bad90063517e98ff0632798166d8ae6ae2863199728c6e24e143921f29c3836a9583d80101e64120d92d1980760970bb04b454e53d24105b0665a7fe22279d041d21e750cb7df404705c49ad92096aa9d134ce624bbcff200687701b4ab9ad494340f80075c00136c0151d15d01b0b602404d5c45671d1c59e2c8d1cdbc0747b78ba3dbc5d14d1febe2305c1c978943623c142586ae8aedfdf1c45544ce62859a60e53040e7a057b0b6cc83d5efe9f022a35c22ee32ab6d9a55f4302faf47d8e7a73d8d30e4621f72b10f31cd5b5487df89946a04a9b746e9e21e165ba896533ef914a42c4e3de1907584f545740381685b40bc4bc8108bb705e85d375daaf2acdd0d8fb2d01ea3d5c7b1923abad85955268ab83823187770469846bb61234ec3865821f72826f2c907af83e78c83a7d38327d1b46e06eb2b687a66a1b1cbfe296a7b1a2bf00ccbfe590f924e1749a78ba4d345d2e922697191582e927f7045740cd8b1f0f2b74dd66dce453610508b6dce1dd51688276c49507a59fc39ea7b5efe958836bc40067991fcfc126fa2973d88075cc4032ee20117f1808378156fb5e3e4f32a8bdb335b3923f90f816493248bf3147f42381e9de6aa448ba1bc8a6fed8fc69b36cce0b68a7b8db10423de5d85ee4df72b64ac577975bcc680bf4ee86f78ca72bd0b793d5b6e9ff30563b776031372bf82ec931f340e90a203a4cb01928837f54a862b207ae682b0b3fc16d59d65cdbdcd78bee301e025b7ec1c726b60ac2b00f8b3c701708c6f12cfd5bc075648d3b285dfacde0817dde60cab6def320aef29832df631d7e06a654653415f045fd34e4dd979c8b133e5dc371dd19804597843cabab62ddbc973d4f33eed7e407afcd0435c1daecd0e14944d918aee1543eb2d8ef59263dd74acb7d6f0327e0d7d73ddfc98ee7ce231d9ea9a6c75dc14a9acbe8be6383ced96984f79b1a68ec38959666d8f2f52d12542f894fe5cf6a4758d6b7e8debf11ac7639104887fb6ef2755c53c8c5f2ae53e2c278b3e4b36ece0f35534fe17504b0708ec308779cb09000028180000504b0304140008080800aa7b564e00000000000000000000000022000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373a552d14e1341143d03b5cb16aa28a8a0284a08697970131ff481a76a24694282a19507dfa6bb431d989da933b325fc9a0f7e801f65bc534ba5b6a5896eb23b3be79e7bcebd33f7c7cf6fdf01bcc64e84e711b623bc60a8367a3d6bfa5c7de80bed19569a5a0bfb5e71e7848bf092186dcbb53b1376c828699e0b86f55afde89cf779a2b8ee262d6fa5ee1e306c9e14dacb5c9c4a273b4a34b4369e7b69b463d83b9226d18572496ab4b73cf589cb2e123ee224a7525c9248d95de51da318963291ca9c2b4a5eacd59b0ccb9ea8aa55f47aea8a61e3ba869cfb2fc93bd96d6a2fbac29244dce154582a8ecf18ded4a61b37b2cc0ae70e668aec8c37f3915b6add0b3bd6d5fedcae4ec4d7425a9191e2921f1e26c3db39554d2faafe99eee85ae4d09a9ce1d33ca17fb489f86034e8ae63ae94b90cc7c9d0fe2fb799475d6999c2a6e2502af2a8b4cd85d0af0295616b42d0876832e030acfe19c2e3ceb9486942f76fcbd8fd6be06f278fcd7e99816101e1894b749788695fa15d99d66580b0952958157727b07b589dc0eee301a9dfc0b0466f144cd70784877844ff01ac2efc0647a1c7d81886d6166f864684cdd9b94ff0748aef388d085b83ef33dca135141a7c4ad46e488a10ff02504b070868fe421cca0100005e040000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c6173738d565b6f1b4514fec6bbde75b69bbb49d224b46929e05b6a2ee19a4b73218140d2943835b4406163af926d9cdd74771d90a0129540ea033c801020242e2f252f790089b80824c45390f82ffc03049c995dbb89e3243cf8ccd93367e67cdf7c6746fef39f5f7e03f018ae6988e34213148c7333c1cd248f4da998d63083e735bcc0cd0c66b937abe2450d2770218697f838c7cd7c0c176358e0ee256e5e56b1a822c71075deb64d97e1d49ce564ed72c9cb161cdb778d829ff58a6bd98962d1353d6f9841f5364cbbc853a39b46a96c3274cd5d37368decbae1af6627ad9559db37574c97529511cbb6fc3186cb89a3773d66b6e1f6c93c833ce5140940eb9c659b17cbebcba6bb642c9728d231e7148c52de702dfe1d06657fd5f2189a2736365c87b04f6f9ab6cfa0cfdac47caa64789e49d39983607c67cdb4b34bdc9edbb798389e5d2cdbbeb56ee62dcfa22a970cd758377dd39db06dc7377ccbb169cf546382462d27bb68de285bae59a41d632ba6bf10883190481e2747ccab659f39e694f98969b479ae2aa0e6edf9e065f381a03d54f6104979b930eb64e2706114a2639488f97d6152c9b057b20bcbd7cd823f9cbccac01c2ed28129219241a234e77ca3b0366f6c08eda8c1a9f4aae1ad06824b89e42c152156e5122533fa88f94ece772d7b85215e852f760ea2b4b39673ca6ec19cb1782f6842cdf33c4d471f967474a15b470f3727d1abe332f22a5e21e9fe7f37a87855c7237854c5151d4fe16986ee7a189365ab244e3bbe6fe5bbe2f28deab88ad7b8799d006606c28b364ae43203e2ae898c37740c6384a1adfef4187a1bea1ff6391d5a3e9059f43a43e7be7312413aa6fea308379aded362c4ab514b9054c60627c330983828cd41b5c2631aaecbaff6cf11f9fd89a9c3a771869ecc38a82b2121c215a78735c2451723e94ea346f37de8a7effbe9ab44a34c633c75172c95de412495d981941adc81fca358758a6c17a2646f50a68b267868818f4e94719aa2a9603d06f000203c5e97098f578e088fd796708efc4e89261f2467bf7d080f93e590b234f2e5d1d44f88fc50c3a088e03ba2a61e248435191248868bc7289b575404977b0c34117d8fd6dc143b74055935d44a889a2e444320523d90f71b0249370622d503f980d67c7808909e104806830d80c8f5406e3704725e2c3a0044ae07f211adf9f810205c335e98ae7cb8d75f9423d1782b95fe1e51793bbd8b965405d134fdee202a6da77f8732cf75dba58ea22143bf0ad4afd0ba45375ec4298b9f679020514cda9b205513e45db4f381627205b12db472ef0fa8f21664699b404882462f01053e818a4fe9e43e23989f13e52ff026be14b40602c0355ab7e89fc6e3824e1143148be009d1a0badac2fe46bf8a2715d6adb0b836cea9d32b1752ff393cc6e9805d734a306be26046da4ef7ad069c78580ac36f55e37210271a5a10efbb07bf43dc9eafe9367d43cdf32da6f0dd1e35a643d89d04fa193c4b5038d84128ede3ec5fbae511824b30c947e84718cbefffa445f49c862caed1b6bc51867ec5892b77a1773457484141a5b5a32df025eeb7073e616e6dbb594147059df58d77674fe30d8540231815760c67c3a746c173f42c35fd07504b0708ea7bbc798f040000e6090000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c6173738d56df531b5514fe6e76b31bb60be19740015b5aab8624b06ad156c36f84160da5051a0bd5da25d9c296b08bbb1b5e1c1ffa6ff8aebcf0a033923a3ae3f88433fe2ffe078e7aeedd854212c0879c7bf6dc73eef9cef9cebd933ffff9e53700efe189864e4c3441c12417535c4c73db8c8a590d73b8a3e12e177398e7dabc8a4f345cc244029ff235cfc54202f71258e4ea7d2e1ea85852b1cc203ff3dc6d862b79db359c4ad9378aae1378663130fcd29631552a7996efe7186281cb10df35cb158ba12bffdcdc358d6d33d834a6ed8d7927b0362c8fbc9451dbb183718687a9f30fbc60b7e1f18305823be3960840326f3bd6bdcaf6bae5ad98eb65b2b4e7dda2592e989ecdbf23a31c6cda3e43f38a673afe33cb9bddb59c80419f771ccb9b299bbe6fd176b61e4ce06e598eb1c2e58d53c154e3f5a58a13d8db56c1f66dca72dff4cc6d2bb0bc29c7710333b05d87ce4c372ed03cf63196acaf2ab66795e84475c30ae6040d03a9c18b8850fd23e76b17f498f72b4e47af70e6fc704dd0772124b187729d4163c23ff6ba9c3a9b0c854a30cb54ed6b9153d974368cc5f5e75631c80dae3130971353b72588318988e6e5c02c6e2d983b822f1a674abd69fa9b21c9526a709e92502d95323933fa4804ee72e0d9ce0643e7117c717268a593b565b7e215ad399bf3af090687b99b8e3eace8e842b78e1e2e2ea357c74314547c4674fdff0950f148c73b7857c5aa8e5bb8cdd05d0b63ba62974b96c7d0712af26b7ed5c674ace131179f132bd981c01da3b2b203e26689cd2f74e430cad05adb3786de867c47534ded2a84048bc9a6eca73a248cd4a0fef34a6db47d62a4a8eb8d8681483277762ca7c43094aa27a59ea7a841b91affa3c939c7bf3f3573f636aed1d3d8099a47488871aee9018d71bac54a8cd3aad17e1ffae9fb75fa2ad32ad3da997e0996ce1c2096ce1e404a0f1d40fe51445d21d98538c92c790ea109c36881810e1a82ab644d87f118c01b80d0785e26349e3926349e5bc20dd293120986374fc8b7f036490ec7a09587c6d33f21f6c3717e45186f8a7c7ae810e5634861300a1e276f9e4d1175bc42af09eb2d8ab92d4ee80abd8e112b1162ba060d8148b540720d81641a03916a814c50cce419407a2220596a743d10b916c84c4320c322a80e885c0be40ec5dc3d0308e78b27a68b1e9df517f970ea5ea433df232eef670ed192ae229ea1df77884bfb99dfa12c70de0e699a68c9d2af0af55b24f7a065859dbc783f4307896cd24907e9c8413e441b5fc8265791d843926b7f4095f7204bfb04421265f41250200f150bd4b94582f9804a5ec2975816650d84808fcb7a41ff266e8a724a18215b0cef8be1d4d516f637fa557ca0b06e85756a93bc747adba2d27f8eda381b56d79c1695357130a3ad57fb36c39ab8598acc4f8fec7268a732b4d0def70a7ebbb8398fe826add2f0ac119b8f4fb0311bc1ee20d01fe22382c2c10e41699b64ffd20d8f115c82493a223dc658e1f42705d1531a55f1848ee58332f22b2eadbe84dede5c25064529c9f6d65097b8de16ea8439d9fa4d15ed5574d40eded313833712018d614cc8715c8f9e19051fd393d4f41f504b0708826261e37e040000ca090000504b01020a000a0000080000aa7b564e000000000000000000000000030004000000000000000000000000000000696f2ffeca0000504b01020a000a0000080000aa7b564e000000000000000000000000080000000000000000000000000025000000696f2f6e756c732f504b01020a000a0000080000aa7b564e00000000000000000000000011000000000000000000000000004b000000696f2f6e756c732f636f6e74726163742f504b01020a000a0000080000aa7b564e00000000000000000000000017000000000000000000000000007a000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b01021400140008080800aa7b564eec308779cb090000281800002800000000000000000000000000af000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373504b01021400140008080800aa7b564e68fe421cca0100005e0400002200000000000000000000000000d00a0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373504b01021400140008080800aa7b564eea7bbc798f040000e60900003000000000000000000000000000ea0c0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c617373504b01021400140008080800aa7b564e826261e37e040000ca0900003000000000000000000000000000d7110000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c617373504b0506000000000800080051020000b31600000000",
  "args" : [ "io", "IO", 80000, 1 ]
}

Example response data:

[ {
  "success" : true,
  "data" : {
    "success" : true
  }
}, "For a verification failure example, please refer to [/api/contract/validate/call] - Verify the call contract" ]

4.14 Verifying the call contract

Cmd: /api/contract/validate/call

**Detailed description: Verify call contract **

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "value" : 0,
  "gasLimit" : 0,
  "price" : 0,
  "contractAddress" : null,
  "methodName" : null,
  "methodDesc" : null,
  "args" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Verify Call Contract contractvalidatecall Verify Call Contract Form Yes
        sender string Transaction Creator Yes
        value long The amount of the primary network asset that the caller transferred to the contract address. If there is no such service, fill in 0 No
        gasLimit long Maximum gas consumption Yes
        price long Execution contract price Yes
        contractAddress string Smart Contract Address Yes
        methodName string method name yes
        methodDesc string Method Description, if the method in the contract is not overloaded, this parameter can be empty No
        args object[] Parameter List No

return value

Field Name Field Type Parameter Description
success boolean Verify success or not
code string Error code for verification failure
msg string Verify failed error message

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "value" : 0,
  "gasLimit" : 20000,
  "price" : 25,
  "contractAddress" : "tNULSeBaMx7J2im9edmmyZofHoTWW6nCTbvy3K",
  "methodName" : "transfer",
  "methodDesc" : null,
  "args" : [ "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", 990 ]
}

Example response data:

[ {
  "success" : true,
  "data" : {
    "success" : true
  }
}, {
  "success" : true,
  "data" : {
    "msg" : "Data error;contract error - contract[tNULSeBaMx7J2im9edmmyZofHoTWW6nCTbvy3K] has stopped",
    "success" : false,
    "code" : "err_0014"
  }
} ]

4.15 Verify the deletion of the contract

Cmd: /api/contract/validate/delete

**Detailed description: Verify delete contract **

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "contractAddress" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Verify Delete Contract contractvalidatedelete Verify Delete Contract Form Yes
        sender string Transaction Creator Yes
        contractAddress string Smart Contract Address Yes

return value

Field Name Field Type Parameter Description
success boolean Verify success or not
code string Error code for verification failure
msg string Verify failed error message

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "contractAddress" : "tNULSeBaNAKfKnLMR5XG5qtwXt5JS1b3QosZxg"
}

Example response data:

[ {
  "success" : true,
  "data" : {
    "success" : true
  }
}, "For a verification failure example, please refer to [/api/contract/validate/call] - Verify the call contract" ]

4.16 Estimating the release of the contract transaction gas

Cmd: /api/contract/imputedgas/create

Detailed description: Estimate the release of the contract transaction gas

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "contractCode" : null,
  "args" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Estimate GAS for publishing contract transactions imputedgascontractcreate Estimate GAS form for publishing contract transactions Yes
        sender string Transaction Creator Yes
        contractCode string Smart Contract Code (Hex encoded string of bytecode) Yes
        args object[] Parameter List No

return value

Field Name Field Type Parameter Description
gasLimit long The consumed gas value, the execution failed to return the value 1

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "contractCode" : "504b03040a0000080000aa7b564e00000000000000000000000003000400696f2ffeca0000504b03040a0000080000aa7b564e00000000000000000000000008000000696f2f6e756c732f504b03040a0000080000aa7b564e00000000000000000000000011000000696f2f6e756c732f636f6e74726163742f504b03040a0000080000aa7b564e00000000000000000000000017000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b0304140008080800aa7b564e00000000000000000000000028000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373b558f97754e5197eeecc90990c972d9090059209a498cc9291a58a8152020d35ca5602b1605bbd99b9492ecc12670922b46ead4babd56aeb5ad1565bd4aa2c020169d59ed353cfe93fd17f84d3d3e7fdee9d3b37612639d5d31ff2ddf77ecbfb3eeff67c77f2afff7cf639804df87b23a23825c323329c96e14c1831fcb411cdf859108f86119497281e93e171997e22cce149197e1ec62ff0d462acc2d3413c13c672fc2a8ce7f0bcccfc3a8817827831cc53bf91e125195e96e5df8af4bb205e09a3430e44f19a0cafcbf086a87d5386df87f096cc9c9597b7457a27843fc8f38f21bc2b7ade0be24f41fc39887341bcaf219033b2a686a6bdc78d692399317213c99152c1ca4d6cd3d0503c951dcb673484d266caca1a99a2066d58c3e252be646446ca535399531a5aeca359a33499dc654d0ce74ae68459e0f1d098417d2993a796d97bca252b93dc674c71b171c49ac819a57281c68766af6edf6be593b972a6984ce573a582912a258be913c9c174ba60168bdb6a9bdb419d412393c99f34d31a4a5f43e337342f0056f5f6d58a6360773e6d4a10ac9cb9bf9c1d330b878db18c8a7a3e6564468d8225efce64a0346931643db7c228e54f98b9e488959de26691a9bbed503957b2b2e6a855b4787c3097636e4a563e47151b6a7b62b87b92a39679924afcbd7d4c6b6b05fdada96cd86ee5acd20e0d3b7a6f75b0decc5c35c37da31a968822cbc80c66f304ae61dd6cfc078d02ebb164166639125dd09143e64365ab60a6a5b2541548e16938dcbb4032e75dad1b8e45f99339b3a0a173fef3acc8e294994bcb565d1d19ac14e8a269235336a5796655c0a9a94a152c192919a9132c47f56eb302b5d048ae386e16f614f2590d47be917bb5bdeb3bc6121c57ea7da53cc3e974f181710d772c60af6ec0828e129242c5030d772e84be2ebea0313555c84f53dd722b972a9846d11c543306c92a6ca4d3667ad48eef7232d79cf565c5f29832e66e0ae53315510ebb49fabf84973d1032ec2d1babe2260f2ed77eb868565f96550e559739b3ab12d7af19cc5109a6bdc583c0d5ba283569a64e90657aeb9f4fd659ab7fa24115ffc68a40df63f3eaf0528b9cf7678b131a06ff27bbb5358547f2e542cadc6349cb2df7306bbf6cd7d18fa48edb65d8884d3a36638b8e217ca0e3436cd1b0a27a6fdc6d1427d9ac3abe8d3b74dc25c35f64f347f858c727381fc4051d177149c7a7b84c42abc3edca76cf61a74586a64da1c82573def5e11ca96477c62816cda2e0213d5cd17115333aaee13a0fccbacf782dd58a888e49983a72c8e83821c367b8a1c382b910ba4a2755d0cd7ad79116adf7e05e1d79301e7fc5df747c8ef31a3a8673c5f2f8b895b2b82fe274703aa254cbe6691d5fe0bc8ea36087270e4f9a11551d916cb9588a8c999109f6312f864869d2c845f2850819dfc8f078e4f67e394e289db32c389413c98fdb36fac5c52f79e32c7cafb216aae57260ecb899a2f6b535fb6bb7f3a261cd7c5153772c0b2e706ce8d001be1c1edacf712a7f527a6bb82e6f86b2e54cc9529f59fdf55ab0ded9d69a78f749eb34149d5b29c22b7f812bcc3f55a6735bbdf7be1d916db7cef4dd3aa5a1bda68123ac4e524ec0cc5a54df5587bd544dd93d3f6172df861a306a1a0d16ec0f025ae83d26e71b53f9ec9451607ee761337e04f9c9868c7b85097943f71eabc51de8e637750c3ec49140039a842af8e3a049d8423d49187cfa8433d493c400d2b492b7f2ef2ecffb003fd699616ca3bc9d3349be697c2e8a5e8676416df90ec70635b9163b38eaf6067c173bf91c745677f1a911422d45beb98ad62fa8682376d750e4ff688ea2be05156dc6f76a280acc45945c50d110f6388afecd1d8bf834a3335476090d571088de40f0e80c4257d05815c3d1d81568d1f815f8a2cd812bf0471397b0b8397015fa552c915397d1780d4b05d0752cf3e3be1b587e54736666b0e21a9a2eba40fbb158fd060c30658bb11a2d6865296cc606a639c6246f645a0799d6434c729a491687b6d8401d8744ea57711049cac5a7a4ef739f5f491b95febb29b705b86d58797eeb4892e50189c51754212692441c8e5dc74a1fbec4aafd89af1064602e24e2ce54f340a02df015429c1449c21f505e75f2f72a887529313611650bc3bd8ec9bf8d798b33e4552f92ae1749ecc53e276dfb29f978ba1b07e8bf9f6797e0204f04f00327a1f6da56ae1de2cc52f86ea22588919b680ee2f0ac248bdf4b7c737c3d825127ef670823c0674f34c6142566d0128d715c1d8d736c95d4c54492ac05aa85daa2c0df8b46825e46b0cd84bc8e80c4b1a8adcf75ac07f7398ef5e087ca31910eaaf408b895fe9ae9e0bde5a4e3491e914cf6c4fe8960e01c02fe6b68932aaba4a6795fdc4ecdbeb8e4c0ef817884d11a453b2174d2f83aea1488115b9f07a21dfb7684713f81f9545417c31fdaa9dd446bad90063517e98ff0632798166d8ae6ae2863199728c6e24e143921f29c3836a9583d80101e64120d92d1980760970bb04b454e53d24105b0665a7fe22279d041d21e750cb7df404705c49ad92096aa9d134ce624bbcff200687701b4ab9ad494340f80075c00136c0151d15d01b0b602404d5c45671d1c59e2c8d1cdbc0747b78ba3dbc5d14d1febe2305c1c978943623c142586ae8aedfdf1c45544ce62859a60e53040e7a057b0b6cc83d5efe9f022a35c22ee32ab6d9a55f4302faf47d8e7a73d8d30e4621f72b10f31cd5b5487df89946a04a9b746e9e21e165ba896533ef914a42c4e3de1907584f545740381685b40bc4bc8108bb705e85d375daaf2acdd0d8fb2d01ea3d5c7b1923abad85955268ab83823187770469846bb61234ec3865821f72826f2c907af83e78c83a7d38327d1b46e06eb2b687a66a1b1cbfe296a7b1a2bf00ccbfe590f924e1749a78ba4d345d2e922697191582e927f7045740cd8b1f0f2b74dd66dce453610508b6dce1dd51688276c49507a59fc39ea7b5efe958836bc40067991fcfc126fa2973d88075cc4032ee20117f1808378156fb5e3e4f32a8bdb335b3923f90f816493248bf3147f42381e9de6aa448ba1bc8a6fed8fc69b36cce0b68a7b8db10423de5d85ee4df72b64ac577975bcc680bf4ee86f78ca72bd0b793d5b6e9ff30563b776031372bf82ec931f340e90a203a4cb01928837f54a862b207ae682b0b3fc16d59d65cdbdcd78bee301e025b7ec1c726b60ac2b00f8b3c701708c6f12cfd5bc075648d3b285dfacde0817dde60cab6def320aef29832df631d7e06a654653415f045fd34e4dd979c8b133e5dc371dd19804597843cabab62ddbc973d4f33eed7e407afcd0435c1daecd0e14944d918aee1543eb2d8ef59263dd74acb7d6f0327e0d7d73ddfc98ee7ce231d9ea9a6c75dc14a9acbe8be6383ced96984f79b1a68ec38959666d8f2f52d12542f894fe5cf6a4758d6b7e8debf11ac7639104887fb6ef2755c53c8c5f2ae53e2c278b3e4b36ece0f35534fe17504b0708ec308779cb09000028180000504b0304140008080800aa7b564e00000000000000000000000022000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373a552d14e1341143d03b5cb16aa28a8a0284a08697970131ff481a76a24694282a19507dfa6bb431d989da933b325fc9a0f7e801f65bc534ba5b6a5896eb23b3be79e7bcebd33f7c7cf6fdf01bcc64e84e711b623bc60a8367a3d6bfa5c7de80bed19569a5a0bfb5e71e7848bf092186dcbb53b1376c828699e0b86f55afde89cf779a2b8ee262d6fa5ee1e306c9e14dacb5c9c4a273b4a34b4369e7b69b463d83b9226d18572496ab4b73cf589cb2e123ee224a7525c9248d95de51da318963291ca9c2b4a5eacd59b0ccb9ea8aa55f47aea8a61e3ba869cfb2fc93bd96d6a2fbac29244dce154582a8ecf18ded4a61b37b2cc0ae70e668aec8c37f3915b6add0b3bd6d5fedcae4ec4d7425a9191e2921f1e26c3db39554d2faafe99eee85ae4d09a9ce1d33ca17fb489f86034e8ae63ae94b90cc7c9d0fe2fb799475d6999c2a6e2502af2a8b4cd85d0af0295616b42d0876832e030acfe19c2e3ceb9486942f76fcbd8fd6be06f278fcd7e99816101e1894b749788695fa15d99d66580b0952958157727b07b589dc0eee301a9dfc0b0466f144cd70784877844ff01ac2efc0647a1c7d81886d6166f864684cdd9b94ff0748aef388d085b83ef33dca135141a7c4ad46e488a10ff02504b070868fe421cca0100005e040000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c6173738d565b6f1b4514fec6bbde75b69bbb49d224b46929e05b6a2ee19a4b73218140d2943835b4406163af926d9cdd74771d90a0129540ea033c801020242e2f252f790089b80824c45390f82ffc03049c995dbb89e3243cf8ccd93367e67cdf7c6746fef39f5f7e03f018ae6988e34213148c7333c1cd248f4da998d63083e735bcc0cd0c66b937abe2450d2770218697f838c7cd7c0c176358e0ee256e5e56b1a822c71075deb64d97e1d49ce564ed72c9cb161cdb778d829ff58a6bd98962d1353d6f9841f5364cbbc853a39b46a96c3274cd5d37368decbae1af6627ad9559db37574c97529511cbb6fc3186cb89a3773d66b6e1f6c93c833ce5140940eb9c659b17cbebcba6bb642c9728d231e7148c52de702dfe1d06657fd5f2189a2736365c87b04f6f9ab6cfa0cfdac47caa64789e49d39983607c67cdb4b34bdc9edbb798389e5d2cdbbeb56ee62dcfa22a970cd758377dd39db06dc7377ccbb169cf546382462d27bb68de285bae59a41d632ba6bf10883190481e2747ccab659f39e694f98969b479ae2aa0e6edf9e065f381a03d54f6104979b930eb64e2706114a2639488f97d6152c9b057b20bcbd7cd823f9cbccac01c2ed28129219241a234e77ca3b0366f6c08eda8c1a9f4aae1ad06824b89e42c152156e5122533fa88f94ece772d7b85215e852f760ea2b4b39673ca6ec19cb1782f6842cdf33c4d471f967474a15b470f3727d1abe332f22a5e21e9fe7f37a87855c7237854c5151d4fe16986ee7a189365ab244e3bbe6fe5bbe2f28deab88ad7b8799d006606c28b364ae43203e2ae898c37740c6384a1adfef4187a1bea1ff6391d5a3e9059f43a43e7be7312413aa6fea308379aded362c4ab514b9054c60627c330983828cd41b5c2631aaecbaff6cf11f9fd89a9c3a771869ecc38a82b2121c215a78735c2451723e94ea346f37de8a7effbe9ab44a34c633c75172c95de412495d981941adc81fca358758a6c17a2646f50a68b267868818f4e94719aa2a9603d06f000203c5e97098f578e088fd796708efc4e89261f2467bf7d080f93e590b234f2e5d1d44f88fc50c3a088e03ba2a61e248435191248868bc7289b575404977b0c34117d8fd6dc143b74055935d44a889a2e444320523d90f71b0249370622d503f980d67c7808909e104806830d80c8f5406e3704725e2c3a0044ae07f211adf9f810205c335e98ae7cb8d75f9423d1782b95fe1e51793bbd8b965405d134fdee202a6da77f8732cf75dba58ea22143bf0ad4afd0ba45375ec4298b9f679020514cda9b205513e45db4f381627205b12db472ef0fa8f21664699b404882462f01053e818a4fe9e43e23989f13e52ff026be14b40602c0355ab7e89fc6e3824e1143148be009d1a0badac2fe46bf8a2715d6adb0b836cea9d32b1752ff393cc6e9805d734a306be26046da4ef7ad069c78580ac36f55e37210271a5a10efbb07bf43dc9eafe9367d43cdf32da6f0dd1e35a643d89d04fa193c4b5038d84128ede3ec5fbae511824b30c947e84718cbefffa445f49c862caed1b6bc51867ec5892b77a1773457484141a5b5a32df025eeb7073e616e6dbb594147059df58d77674fe30d8540231815760c67c3a746c173f42c35fd07504b0708ea7bbc798f040000e6090000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c6173738d56df531b5514fe6e76b31bb60be19740015b5aab8624b06ad156c36f84160da5051a0bd5da25d9c296b08bbb1b5e1c1ffa6ff8aebcf0a033923a3ae3f88433fe2ffe078e7aeedd854212c0879c7bf6dc73eef9cef9cebd933ffff9e53700efe189864e4c3441c12417535c4c73db8c8a590d73b8a3e12e177398e7dabc8a4f345cc244029ff235cfc54202f71258e4ea7d2e1ea85852b1cc203ff3dc6d862b79db359c4ad9378aae1378663130fcd29631552a7996efe7186281cb10df35cb158ba12bffdcdc358d6d33d834a6ed8d7927b0362c8fbc9451dbb183718687a9f30fbc60b7e1f18305823be3960840326f3bd6bdcaf6bae5ad98eb65b2b4e7dda2592e989ecdbf23a31c6cda3e43f38a673afe33cb9bddb59c80419f771ccb9b299bbe6fd176b61e4ce06e598eb1c2e58d53c154e3f5a58a13d8db56c1f66dca72dff4cc6d2bb0bc29c7710333b05d87ce4c372ed03cf63196acaf2ab66795e84475c30ae6040d03a9c18b8850fd23e76b17f498f72b4e47af70e6fc704dd0772124b187729d4163c23ff6ba9c3a9b0c854a30cb54ed6b9153d974368cc5f5e75631c80dae3130971353b72588318988e6e5c02c6e2d983b822f1a674abd69fa9b21c9526a709e92502d95323933fa4804ee72e0d9ce0643e7117c717268a593b565b7e215ad399bf3af090687b99b8e3eace8e842b78e1e2e2ea357c74314547c4674fdff0950f148c73b7857c5aa8e5bb8cdd05d0b63ba62974b96c7d0712af26b7ed5c674ace131179f132bd981c01da3b2b203e26689cd2f74e430cad05adb3786de867c47534ded2a84048bc9a6eca73a248cd4a0fef34a6db47d62a4a8eb8d8681483277762ca7c43094aa27a59ea7a841b91affa3c939c7bf3f3573f636aed1d3d8099a47488871aee9018d71bac54a8cd3aad17e1ffae9fb75fa2ad32ad3da997e0996ce1c2096ce1e404a0f1d40fe51445d21d98538c92c790ea109c36881810e1a82ab644d87f118c01b80d0785e26349e3926349e5bc20dd293120986374fc8b7f036490ec7a09587c6d33f21f6c3717e45186f8a7c7ae810e5634861300a1e276f9e4d1175bc42af09eb2d8ab92d4ee80abd8e112b1162ba060d8148b540720d81641a03916a814c50cce419407a2220596a743d10b916c84c4320c322a80e885c0be40ec5dc3d0308e78b27a68b1e9df517f970ea5ea433df232eef670ed192ae229ea1df77884bfb99dfa12c70de0e699a68c9d2af0af55b24f7a065859dbc783f4307896cd24907e9c8413e441b5fc8265791d843926b7f4095f7204bfb04421265f41250200f150bd4b94582f9804a5ec2975816650d84808fcb7a41ff266e8a724a18215b0cef8be1d4d516f637fa557ca0b06e85756a93bc747adba2d27f8eda381b56d79c1695357130a3ad57fb36c39ab8598acc4f8fec7268a732b4d0def70a7ebbb8398fe826add2f0ac119b8f4fb0311bc1ee20d01fe22382c2c10e41699b64ffd20d8f115c82493a223dc658e1f42705d1531a55f1848ee58332f22b2eadbe84dede5c25064529c9f6d65097b8de16ea8439d9fa4d15ed5574d40eded313833712018d614cc8715c8f9e19051fd393d4f41f504b0708826261e37e040000ca090000504b01020a000a0000080000aa7b564e000000000000000000000000030004000000000000000000000000000000696f2ffeca0000504b01020a000a0000080000aa7b564e000000000000000000000000080000000000000000000000000025000000696f2f6e756c732f504b01020a000a0000080000aa7b564e00000000000000000000000011000000000000000000000000004b000000696f2f6e756c732f636f6e74726163742f504b01020a000a0000080000aa7b564e00000000000000000000000017000000000000000000000000007a000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b01021400140008080800aa7b564eec308779cb090000281800002800000000000000000000000000af000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373504b01021400140008080800aa7b564e68fe421cca0100005e0400002200000000000000000000000000d00a0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373504b01021400140008080800aa7b564eea7bbc798f040000e60900003000000000000000000000000000ea0c0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c617373504b01021400140008080800aa7b564e826261e37e040000ca0900003000000000000000000000000000d7110000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c617373504b0506000000000800080051020000b31600000000",
  "args" : [ "io", "IO", 80000, 1 ]
}

Example response data:

{
  "success" : true,
  "data" : {
    "gasLimit" : 20143
  }
}

4.17 Estimating the gas that calls the contract transaction

Cmd: /api/contract/imputedgas/call

_Detailed description: Estimate the gas of the contract transaction

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "value" : null,
  "contractAddress" : null,
  "methodName" : null,
  "methodDesc" : null,
  "args" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Estimate GAS for calling contract transactions imputedgascontractcall Estimate GAS form for calling contract transactions Yes
        sender string Transaction Creator Yes
        value biginteger The amount of the primary network asset that the caller transferred to the contract address. If there is no such service, fill in 0 No
        contractAddress string Smart Contract Address Yes
        methodName string method name yes
        methodDesc string Method Description, if the method in the contract is not overloaded, this parameter can be empty No
        args object[] Parameter List No

return value

Field Name Field Type Parameter Description
gasLimit long The consumed gas value, the execution failed to return the value 1

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "value" : 0,
  "contractAddress" : "tNULSeBaNAKfKnLMR5XG5qtwXt5JS1b3QosZxg",
  "methodName" : "transfer",
  "methodDesc" : null,
  "args" : [ "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", 990 ]
}

Example response data:

{
  "success" : true,
  "data" : {
    "gasLimit" : 17538
  }
}

4.18 Calling the contract without the chain method

Cmd: /api/contract/view

Detailed description: Call contract not chained method

HttpMethod: POST

Form json data:

{
  "contractAddress" : null,
  "methodName" : null,
  "methodDesc" : null,
  "args" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Call contract not linked method contractviewcall Call contract not on the chain method form Yes
        contractAddress string Smart Contract Address Yes
        methodName string method name yes
        methodDesc string Method Description, if the method in the contract is not overloaded, this parameter can be empty No
        args object[] Parameter List No

return value

Field Name Field Type Parameter Description
result string Call result of view method

Example request data:

request path: slightly

request form data:

{
  "contractAddress" : "tNULSeBaNAKfKnLMR5XG5qtwXt5JS1b3QosZxg",
  "methodName" : "balanceOf",
  "methodDesc" : null,
  "args" : [ "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD" ]
}

Example response data:

{
  "success" : true,
  "data" : {
    "result" : "8000"
  }
}

4.19 Offline Assembly - Publish Contract Transactions

Cmd: /api/contract/create/offline

Detailed description: Offline assembly - release contract transaction

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "senderBalance" : null,
  "nonce" : null,
  "alias" : null,
  "contractCode" : null,
  "gasLimit" : 0,
  "args" : null,
  "argsType" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Release Contract Offline Trading contractcreateoffline Publish Contract Offline Trading Form Yes
        sender string Transaction Creator Yes
        senderBalance biginteger Account Balance Yes
        nonce string account nonce value yes
        alias string Contract Alias Yes
        contractCode string Smart Contract Code (Hex encoded string of bytecode) Yes
        gasLimit long GAS Limits Yes
        args object[] Parameter List No
        argsType string[] Parameter Type List No
        remark string Notes No

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String
contractAddress string generated contract address

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "alias" : "rf_nrc20_offline",
  "senderBalance" : "999999998523475",
  "nonce" : "9c0aea02bed90ddd",
  "contractCode" : "504b03040a0000080000aa7b564e00000000000000000000000003000400696f2ffeca0000504b03040a0000080000aa7b564e00000000000000000000000008000000696f2f6e756c732f504b03040a0000080000aa7b564e00000000000000000000000011000000696f2f6e756c732f636f6e74726163742f504b03040a0000080000aa7b564e00000000000000000000000017000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b0304140008080800aa7b564e00000000000000000000000028000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373b558f97754e5197eeecc90990c972d9090059209a498cc9291a58a8152020d35ca5602b1605bbd99b9492ecc12670922b46ead4babd56aeb5ad1565bd4aa2c020169d59ed353cfe93fd17f84d3d3e7fdee9d3b37612639d5d31ff2ddf77ecbfb3eeff67c77f2afff7cf639804df87b23a23825c323329c96e14c1831fcb411cdf859108f86119497281e93e171997e22cce149197e1ec62ff0d462acc2d3413c13c672fc2a8ce7f0bcccfc3a8817827831cc53bf91e125195e96e5df8af4bb205e09a3430e44f19a0cafcbf086a87d5386df87f096cc9c9597b7457a27843fc8f38f21bc2b7ade0be24f41fc39887341bcaf219033b2a686a6bdc78d692399317213c99152c1ca4d6cd3d0503c951dcb673484d266caca1a99a2066d58c3e252be646446ca535399531a5aeca359a33499dc654d0ce74ae68459e0f1d098417d2993a796d97bca252b93dc674c71b171c49ac819a57281c68766af6edf6be593b972a6984ce573a582912a258be913c9c174ba60168bdb6a9bdb419d412393c99f34d31a4a5f43e337342f0056f5f6d58a6360773e6d4a10ac9cb9bf9c1d330b878db18c8a7a3e6564468d8225efce64a0346931643db7c228e54f98b9e488959de26691a9bbed503957b2b2e6a855b4787c3097636e4a563e47151b6a7b62b87b92a39679924afcbd7d4c6b6b05fdada96cd86ee5acd20e0d3b7a6f75b0decc5c35c37da31a968822cbc80c66f304ae61dd6cfc078d02ebb164166639125dd09143e64365ab60a6a5b2541548e16938dcbb4032e75dad1b8e45f99339b3a0a173fef3acc8e294994bcb565d1d19ac14e8a269235336a5796655c0a9a94a152c192919a9132c47f56eb302b5d048ae386e16f614f2590d47be917bb5bdeb3bc6121c57ea7da53cc3e974f181710d772c60af6ec0828e129242c5030d772e84be2ebea0313555c84f53dd722b972a9846d11c543306c92a6ca4d3667ad48eef7232d79cf565c5f29832e66e0ae53315510ebb49fabf84973d1032ec2d1babe2260f2ed77eb868565f96550e559739b3ab12d7af19cc5109a6bdc583c0d5ba283569a64e90657aeb9f4fd659ab7fa24115ffc68a40df63f3eaf0528b9cf7678b131a06ff27bbb5358547f2e542cadc6349cb2df7306bbf6cd7d18fa48edb65d8884d3a36638b8e217ca0e3436cd1b0a27a6fdc6d1427d9ac3abe8d3b74dc25c35f64f347f858c727381fc4051d177149c7a7b84c42abc3edca76cf61a74586a64da1c82573def5e11ca96477c62816cda2e0213d5cd17115333aaee13a0fccbacf782dd58a888e49983a72c8e83821c367b8a1c382b910ba4a2755d0cd7ad79116adf7e05e1d79301e7fc5df747c8ef31a3a8673c5f2f8b895b2b82fe274703aa254cbe6691d5fe0bc8ea36087270e4f9a11551d916cb9588a8c999109f6312f864869d2c845f2850819dfc8f078e4f67e394e289db32c389413c98fdb36fac5c52f79e32c7cafb216aae57260ecb899a2f6b535fb6bb7f3a261cd7c5153772c0b2e706ce8d001be1c1edacf712a7f527a6bb82e6f86b2e54cc9529f59fdf55ab0ded9d69a78f749eb34149d5b29c22b7f812bcc3f55a6735bbdf7be1d916db7cef4dd3aa5a1bda68123ac4e524ec0cc5a54df5587bd544dd93d3f6172df861a306a1a0d16ec0f025ae83d26e71b53f9ec9451607ee761337e04f9c9868c7b85097943f71eabc51de8e637750c3ec49140039a842af8e3a049d8423d49187cfa8433d493c400d2b492b7f2ef2ecffb003fd699616ca3bc9d3349be697c2e8a5e8676416df90ec70635b9163b38eaf6067c173bf91c745677f1a911422d45beb98ad62fa8682376d750e4ff688ea2be05156dc6f76a280acc45945c50d110f6388afecd1d8bf834a3335476090d571088de40f0e80c4257d05815c3d1d81568d1f815f8a2cd812bf0471397b0b8397015fa552c915397d1780d4b05d0752cf3e3be1b587e54736666b0e21a9a2eba40fbb158fd060c30658bb11a2d6865296cc606a639c6246f645a0799d6434c729a491687b6d8401d8744ea57711049cac5a7a4ef739f5f491b95febb29b705b86d58797eeb4892e50189c51754212692441c8e5dc74a1fbec4aafd89af1064602e24e2ce54f340a02df015429c1449c21f505e75f2f72a887529313611650bc3bd8ec9bf8d798b33e4552f92ae1749ecc53e276dfb29f978ba1b07e8bf9f6797e0204f04f00327a1f6da56ae1de2cc52f86ea22588919b680ee2f0ac248bdf4b7c737c3d825127ef670823c0674f34c6142566d0128d715c1d8d736c95d4c54492ac05aa85daa2c0df8b46825e46b0cd84bc8e80c4b1a8adcf75ac07f7398ef5e087ca31910eaaf408b895fe9ae9e0bde5a4e3491e914cf6c4fe8960e01c02fe6b68932aaba4a6795fdc4ecdbeb8e4c0ef817884d11a453b2174d2f83aea1488115b9f07a21dfb7684713f81f9545417c31fdaa9dd446bad90063517e98ff0632798166d8ae6ae2863199728c6e24e143921f29c3836a9583d80101e64120d92d1980760970bb04b454e53d24105b0665a7fe22279d041d21e750cb7df404705c49ad92096aa9d134ce624bbcff200687701b4ab9ad494340f80075c00136c0151d15d01b0b602404d5c45671d1c59e2c8d1cdbc0747b78ba3dbc5d14d1febe2305c1c978943623c142586ae8aedfdf1c45544ce62859a60e53040e7a057b0b6cc83d5efe9f022a35c22ee32ab6d9a55f4302faf47d8e7a73d8d30e4621f72b10f31cd5b5487df89946a04a9b746e9e21e165ba896533ef914a42c4e3de1907584f545740381685b40bc4bc8108bb705e85d375daaf2acdd0d8fb2d01ea3d5c7b1923abad85955268ab83823187770469846bb61234ec3865821f72826f2c907af83e78c83a7d38327d1b46e06eb2b687a66a1b1cbfe296a7b1a2bf00ccbfe590f924e1749a78ba4d345d2e922697191582e927f7045740cd8b1f0f2b74dd66dce453610508b6dce1dd51688276c49507a59fc39ea7b5efe958836bc40067991fcfc126fa2973d88075cc4032ee20117f1808378156fb5e3e4f32a8bdb335b3923f90f816493248bf3147f42381e9de6aa448ba1bc8a6fed8fc69b36cce0b68a7b8db10423de5d85ee4df72b64ac577975bcc680bf4ee86f78ca72bd0b793d5b6e9ff30563b776031372bf82ec931f340e90a203a4cb01928837f54a862b207ae682b0b3fc16d59d65cdbdcd78bee301e025b7ec1c726b60ac2b00f8b3c701708c6f12cfd5bc075648d3b285dfacde0817dde60cab6def320aef29832df631d7e06a654653415f045fd34e4dd979c8b133e5dc371dd19804597843cabab62ddbc973d4f33eed7e407afcd0435c1daecd0e14944d918aee1543eb2d8ef59263dd74acb7d6f0327e0d7d73ddfc98ee7ce231d9ea9a6c75dc14a9acbe8be6383ced96984f79b1a68ec38959666d8f2f52d12542f894fe5cf6a4758d6b7e8debf11ac7639104887fb6ef2755c53c8c5f2ae53e2c278b3e4b36ece0f35534fe17504b0708ec308779cb09000028180000504b0304140008080800aa7b564e00000000000000000000000022000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373a552d14e1341143d03b5cb16aa28a8a0284a08697970131ff481a76a24694282a19507dfa6bb431d989da933b325fc9a0f7e801f65bc534ba5b6a5896eb23b3be79e7bcebd33f7c7cf6fdf01bcc64e84e711b623bc60a8367a3d6bfa5c7de80bed19569a5a0bfb5e71e7848bf092186dcbb53b1376c828699e0b86f55afde89cf779a2b8ee262d6fa5ee1e306c9e14dacb5c9c4a273b4a34b4369e7b69b463d83b9226d18572496ab4b73cf589cb2e123ee224a7525c9248d95de51da318963291ca9c2b4a5eacd59b0ccb9ea8aa55f47aea8a61e3ba869cfb2fc93bd96d6a2fbac29244dce154582a8ecf18ded4a61b37b2cc0ae70e668aec8c37f3915b6add0b3bd6d5fedcae4ec4d7425a9191e2921f1e26c3db39554d2faafe99eee85ae4d09a9ce1d33ca17fb489f86034e8ae63ae94b90cc7c9d0fe2fb799475d6999c2a6e2502af2a8b4cd85d0af0295616b42d0876832e030acfe19c2e3ceb9486942f76fcbd8fd6be06f278fcd7e99816101e1894b749788695fa15d99d66580b0952958157727b07b589dc0eee301a9dfc0b0466f144cd70784877844ff01ac2efc0647a1c7d81886d6166f864684cdd9b94ff0748aef388d085b83ef33dca135141a7c4ad46e488a10ff02504b070868fe421cca0100005e040000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c6173738d565b6f1b4514fec6bbde75b69bbb49d224b46929e05b6a2ee19a4b73218140d2943835b4406163af926d9cdd74771d90a0129540ea033c801020242e2f252f790089b80824c45390f82ffc03049c995dbb89e3243cf8ccd93367e67cdf7c6746fef39f5f7e03f018ae6988e34213148c7333c1cd248f4da998d63083e735bcc0cd0c66b937abe2450d2770218697f838c7cd7c0c176358e0ee256e5e56b1a822c71075deb64d97e1d49ce564ed72c9cb161cdb778d829ff58a6bd98962d1353d6f9841f5364cbbc853a39b46a96c3274cd5d37368decbae1af6627ad9559db37574c97529511cbb6fc3186cb89a3773d66b6e1f6c93c833ce5140940eb9c659b17cbebcba6bb642c9728d231e7148c52de702dfe1d06657fd5f2189a2736365c87b04f6f9ab6cfa0cfdac47caa64789e49d39983607c67cdb4b34bdc9edbb798389e5d2cdbbeb56ee62dcfa22a970cd758377dd39db06dc7377ccbb169cf546382462d27bb68de285bae59a41d632ba6bf10883190481e2747ccab659f39e694f98969b479ae2aa0e6edf9e065f381a03d54f6104979b930eb64e2706114a2639488f97d6152c9b057b20bcbd7cd823f9cbccac01c2ed28129219241a234e77ca3b0366f6c08eda8c1a9f4aae1ad06824b89e42c152156e5122533fa88f94ece772d7b85215e852f760ea2b4b39673ca6ec19cb1782f6842cdf33c4d471f967474a15b470f3727d1abe332f22a5e21e9fe7f37a87855c7237854c5151d4fe16986ee7a189365ab244e3bbe6fe5bbe2f28deab88ad7b8799d006606c28b364ae43203e2ae898c37740c6384a1adfef4187a1bea1ff6391d5a3e9059f43a43e7be7312413aa6fea308379aded362c4ab514b9054c60627c330983828cd41b5c2631aaecbaff6cf11f9fd89a9c3a771869ecc38a82b2121c215a78735c2451723e94ea346f37de8a7effbe9ab44a34c633c75172c95de412495d981941adc81fca358758a6c17a2646f50a68b267868818f4e94719aa2a9603d06f000203c5e97098f578e088fd796708efc4e89261f2467bf7d080f93e590b234f2e5d1d44f88fc50c3a088e03ba2a61e248435191248868bc7289b575404977b0c34117d8fd6dc143b74055935d44a889a2e444320523d90f71b0249370622d503f980d67c7808909e104806830d80c8f5406e3704725e2c3a0044ae07f211adf9f810205c335e98ae7cb8d75f9423d1782b95fe1e51793bbd8b965405d134fdee202a6da77f8732cf75dba58ea22143bf0ad4afd0ba45375ec4298b9f679020514cda9b205513e45db4f381627205b12db472ef0fa8f21664699b404882462f01053e818a4fe9e43e23989f13e52ff026be14b40602c0355ab7e89fc6e3824e1143148be009d1a0badac2fe46bf8a2715d6adb0b836cea9d32b1752ff393cc6e9805d734a306be26046da4ef7ad069c78580ac36f55e37210271a5a10efbb07bf43dc9eafe9367d43cdf32da6f0dd1e35a643d89d04fa193c4b5038d84128ede3ec5fbae511824b30c947e84718cbefffa445f49c862caed1b6bc51867ec5892b77a1773457484141a5b5a32df025eeb7073e616e6dbb594147059df58d77674fe30d8540231815760c67c3a746c173f42c35fd07504b0708ea7bbc798f040000e6090000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c6173738d56df531b5514fe6e76b31bb60be19740015b5aab8624b06ad156c36f84160da5051a0bd5da25d9c296b08bbb1b5e1c1ffa6ff8aebcf0a033923a3ae3f88433fe2ffe078e7aeedd854212c0879c7bf6dc73eef9cef9cebd933ffff9e53700efe189864e4c3441c12417535c4c73db8c8a590d73b8a3e12e177398e7dabc8a4f345cc244029ff235cfc54202f71258e4ea7d2e1ea85852b1cc203ff3dc6d862b79db359c4ad9378aae1378663130fcd29631552a7996efe7186281cb10df35cb158ba12bffdcdc358d6d33d834a6ed8d7927b0362c8fbc9451dbb183718687a9f30fbc60b7e1f18305823be3960840326f3bd6bdcaf6bae5ad98eb65b2b4e7dda2592e989ecdbf23a31c6cda3e43f38a673afe33cb9bddb59c80419f771ccb9b299bbe6fd176b61e4ce06e598eb1c2e58d53c154e3f5a58a13d8db56c1f66dca72dff4cc6d2bb0bc29c7710333b05d87ce4c372ed03cf63196acaf2ab66795e84475c30ae6040d03a9c18b8850fd23e76b17f498f72b4e47af70e6fc704dd0772124b187729d4163c23ff6ba9c3a9b0c854a30cb54ed6b9153d974368cc5f5e75631c80dae3130971353b72588318988e6e5c02c6e2d983b822f1a674abd69fa9b21c9526a709e92502d95323933fa4804ee72e0d9ce0643e7117c717268a593b565b7e215ad399bf3af090687b99b8e3eace8e842b78e1e2e2ea357c74314547c4674fdff0950f148c73b7857c5aa8e5bb8cdd05d0b63ba62974b96c7d0712af26b7ed5c674ace131179f132bd981c01da3b2b203e26689cd2f74e430cad05adb3786de867c47534ded2a84048bc9a6eca73a248cd4a0fef34a6db47d62a4a8eb8d8681483277762ca7c43094aa27a59ea7a841b91affa3c939c7bf3f3573f636aed1d3d8099a47488871aee9018d71bac54a8cd3aad17e1ffae9fb75fa2ad32ad3da997e0996ce1c2096ce1e404a0f1d40fe51445d21d98538c92c790ea109c36881810e1a82ab644d87f118c01b80d0785e26349e3926349e5bc20dd293120986374fc8b7f036490ec7a09587c6d33f21f6c3717e45186f8a7c7ae810e5634861300a1e276f9e4d1175bc42af09eb2d8ab92d4ee80abd8e112b1162ba060d8148b540720d81641a03916a814c50cce419407a2220596a743d10b916c84c4320c322a80e885c0be40ec5dc3d0308e78b27a68b1e9df517f970ea5ea433df232eef670ed192ae229ea1df77884bfb99dfa12c70de0e699a68c9d2af0af55b24f7a065859dbc783f4307896cd24907e9c8413e441b5fc8265791d843926b7f4095f7204bfb04421265f41250200f150bd4b94582f9804a5ec2975816650d84808fcb7a41ff266e8a724a18215b0cef8be1d4d516f637fa557ca0b06e85756a93bc747adba2d27f8eda381b56d79c1695357130a3ad57fb36c39ab8598acc4f8fec7268a732b4d0def70a7ebbb8398fe826add2f0ac119b8f4fb0311bc1ee20d01fe22382c2c10e41699b64ffd20d8f115c82493a223dc658e1f42705d1531a55f1848ee58332f22b2eadbe84dede5c25064529c9f6d65097b8de16ea8439d9fa4d15ed5574d40eded313833712018d614cc8715c8f9e19051fd393d4f41f504b0708826261e37e040000ca090000504b01020a000a0000080000aa7b564e000000000000000000000000030004000000000000000000000000000000696f2ffeca0000504b01020a000a0000080000aa7b564e000000000000000000000000080000000000000000000000000025000000696f2f6e756c732f504b01020a000a0000080000aa7b564e00000000000000000000000011000000000000000000000000004b000000696f2f6e756c732f636f6e74726163742f504b01020a000a0000080000aa7b564e00000000000000000000000017000000000000000000000000007a000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b01021400140008080800aa7b564eec308779cb090000281800002800000000000000000000000000af000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373504b01021400140008080800aa7b564e68fe421cca0100005e0400002200000000000000000000000000d00a0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373504b01021400140008080800aa7b564eea7bbc798f040000e60900003000000000000000000000000000ea0c0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c617373504b01021400140008080800aa7b564e826261e37e040000ca0900003000000000000000000000000000d7110000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c617373504b0506000000000800080051020000b31600000000",
  "gasLimit" : 20245,
  "args" : [ "air", "AIR", 10000, 2 ],
  "argsType" : [ "String", "String", "BigInteger", "int" ],
  "remark" : "() return void"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "0f008629375d0e28292072657475726e20766f6964fd8119020001f7ec6473df12e751d64cf20a8baa7edd50810f810200020d2f73cb93099a8cfd0cbdd060155abfe2f50917fd1a19504b03040a0000080000aa7b564e00000000000000000000000003000400696f2ffeca0000504b03040a0000080000aa7b564e00000000000000000000000008000000696f2f6e756c732f504b03040a0000080000aa7b564e00000000000000000000000011000000696f2f6e756c732f636f6e74726163742f504b03040a0000080000aa7b564e00000000000000000000000017000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b0304140008080800aa7b564e00000000000000000000000028000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373b558f97754e5197eeecc90990c972d9090059209a498cc9291a58a8152020d35ca5602b1605bbd99b9492ecc12670922b46ead4babd56aeb5ad1565bd4aa2c020169d59ed353cfe93fd17f84d3d3e7fdee9d3b37612639d5d31ff2ddf77ecbfb3eeff67c77f2afff7cf639804df87b23a23825c323329c96e14c1831fcb411cdf859108f86119497281e93e171997e22cce149197e1ec62ff0d462acc2d3413c13c672fc2a8ce7f0bcccfc3a8817827831cc53bf91e125195e96e5df8af4bb205e09a3430e44f19a0cafcbf086a87d5386df87f096cc9c9597b7457a27843fc8f38f21bc2b7ade0be24f41fc39887341bcaf219033b2a686a6bdc78d692399317213c99152c1ca4d6cd3d0503c951dcb673484d266caca1a99a2066d58c3e252be646446ca535399531a5aeca359a33499dc654d0ce74ae68459e0f1d098417d2993a796d97bca252b93dc674c71b171c49ac819a57281c68766af6edf6be593b972a6984ce573a582912a258be913c9c174ba60168bdb6a9bdb419d412393c99f34d31a4a5f43e337342f0056f5f6d58a6360773e6d4a10ac9cb9bf9c1d330b878db18c8a7a3e6564468d8225efce64a0346931643db7c228e54f98b9e488959de26691a9bbed503957b2b2e6a855b4787c3097636e4a563e47151b6a7b62b87b92a39679924afcbd7d4c6b6b05fdada96cd86ee5acd20e0d3b7a6f75b0decc5c35c37da31a968822cbc80c66f304ae61dd6cfc078d02ebb164166639125dd09143e64365ab60a6a5b2541548e16938dcbb4032e75dad1b8e45f99339b3a0a173fef3acc8e294994bcb565d1d19ac14e8a269235336a5796655c0a9a94a152c192919a9132c47f56eb302b5d048ae386e16f614f2590d47be917bb5bdeb3bc6121c57ea7da53cc3e974f181710d772c60af6ec0828e129242c5030d772e84be2ebea0313555c84f53dd722b972a9846d11c543306c92a6ca4d3667ad48eef7232d79cf565c5f29832e66e0ae53315510ebb49fabf84973d1032ec2d1babe2260f2ed77eb868565f96550e559739b3ab12d7af19cc5109a6bdc583c0d5ba283569a64e90657aeb9f4fd659ab7fa24115ffc68a40df63f3eaf0528b9cf7678b131a06ff27bbb5358547f2e542cadc6349cb2df7306bbf6cd7d18fa48edb65d8884d3a36638b8e217ca0e3436cd1b0a27a6fdc6d1427d9ac3abe8d3b74dc25c35f64f347f858c727381fc4051d177149c7a7b84c42abc3edca76cf61a74586a64da1c82573def5e11ca96477c62816cda2e0213d5cd17115333aaee13a0fccbacf782dd58a888e49983a72c8e83821c367b8a1c382b910ba4a2755d0cd7ad79116adf7e05e1d79301e7fc5df747c8ef31a3a8673c5f2f8b895b2b82fe274703aa254cbe6691d5fe0bc8ea36087270e4f9a11551d916cb9588a8c999109f6312f864869d2c845f2850819dfc8f078e4f67e394e289db32c389413c98fdb36fac5c52f79e32c7cafb216aae57260ecb899a2f6b535fb6bb7f3a261cd7c5153772c0b2e706ce8d001be1c1edacf712a7f527a6bb82e6f86b2e54cc9529f59fdf55ab0ded9d69a78f749eb34149d5b29c22b7f812bcc3f55a6735bbdf7be1d916db7cef4dd3aa5a1bda68123ac4e524ec0cc5a54df5587bd544dd93d3f6172df861a306a1a0d16ec0f025ae83d26e71b53f9ec9451607ee761337e04f9c9868c7b85097943f71eabc51de8e637750c3ec49140039a842af8e3a049d8423d49187cfa8433d493c400d2b492b7f2ef2ecffb003fd699616ca3bc9d3349be697c2e8a5e8676416df90ec70635b9163b38eaf6067c173bf91c745677f1a911422d45beb98ad62fa8682376d750e4ff688ea2be05156dc6f76a280acc45945c50d110f6388afecd1d8bf834a3335476090d571088de40f0e80c4257d05815c3d1d81568d1f815f8a2cd812bf0471397b0b8397015fa552c915397d1780d4b05d0752cf3e3be1b587e54736666b0e21a9a2eba40fbb158fd060c30658bb11a2d6865296cc606a639c6246f645a0799d6434c729a491687b6d8401d8744ea57711049cac5a7a4ef739f5f491b95febb29b705b86d58797eeb4892e50189c51754212692441c8e5dc74a1fbec4aafd89af1064602e24e2ce54f340a02df015429c1449c21f505e75f2f72a887529313611650bc3bd8ec9bf8d798b33e4552f92ae1749ecc53e276dfb29f978ba1b07e8bf9f6797e0204f04f00327a1f6da56ae1de2cc52f86ea22588919b680ee2f0ac248bdf4b7c737c3d825127ef670823c0674f34c6142566d0128d715c1d8d736c95d4c54492ac05aa85daa2c0df8b46825e46b0cd84bc8e80c4b1a8adcf75ac07f7398ef5e087ca31910eaaf408b895fe9ae9e0bde5a4e3491e914cf6c4fe8960e01c02fe6b68932aaba4a6795fdc4ecdbeb8e4c0ef817884d11a453b2174d2f83aea1488115b9f07a21dfb7684713f81f9545417c31fdaa9dd446bad90063517e98ff0632798166d8ae6ae2863199728c6e24e143921f29c3836a9583d80101e64120d92d1980760970bb04b454e53d24105b0665a7fe22279d041d21e750cb7df404705c49ad92096aa9d134ce624bbcff200687701b4ab9ad494340f80075c00136c0151d15d01b0b602404d5c45671d1c59e2c8d1cdbc0747b78ba3dbc5d14d1febe2305c1c978943623c142586ae8aedfdf1c45544ce62859a60e53040e7a057b0b6cc83d5efe9f022a35c22ee32ab6d9a55f4302faf47d8e7a73d8d30e4621f72b10f31cd5b5487df89946a04a9b746e9e21e165ba896533ef914a42c4e3de1907584f545740381685b40bc4bc8108bb705e85d375daaf2acdd0d8fb2d01ea3d5c7b1923abad85955268ab83823187770469846bb61234ec3865821f72826f2c907af83e78c83a7d38327d1b46e06eb2b687a66a1b1cbfe296a7b1a2bf00ccbfe590f924e1749a78ba4d345d2e922697191582e927f7045740cd8b1f0f2b74dd66dce453610508b6dce1dd51688276c49507a59fc39ea7b5efe958836bc40067991fcfc126fa2973d88075cc4032ee20117f1808378156fb5e3e4f32a8bdb335b3923f90f816493248bf3147f42381e9de6aa448ba1bc8a6fed8fc69b36cce0b68a7b8db10423de5d85ee4df72b64ac577975bcc680bf4ee86f78ca72bd0b793d5b6e9ff30563b776031372bf82ec931f340e90a203a4cb01928837f54a862b207ae682b0b3fc16d59d65cdbdcd78bee301e025b7ec1c726b60ac2b00f8b3c701708c6f12cfd5bc075648d3b285dfacde0817dde60cab6def320aef29832df631d7e06a654653415f045fd34e4dd979c8b133e5dc371dd19804597843cabab62ddbc973d4f33eed7e407afcd0435c1daecd0e14944d918aee1543eb2d8ef59263dd74acb7d6f0327e0d7d73ddfc98ee7ce231d9ea9a6c75dc14a9acbe8be6383ced96984f79b1a68ec38959666d8f2f52d12542f894fe5cf6a4758d6b7e8debf11ac7639104887fb6ef2755c53c8c5f2ae53e2c278b3e4b36ece0f35534fe17504b0708ec308779cb09000028180000504b0304140008080800aa7b564e00000000000000000000000022000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373a552d14e1341143d03b5cb16aa28a8a0284a08697970131ff481a76a24694282a19507dfa6bb431d989da933b325fc9a0f7e801f65bc534ba5b6a5896eb23b3be79e7bcebd33f7c7cf6fdf01bcc64e84e711b623bc60a8367a3d6bfa5c7de80bed19569a5a0bfb5e71e7848bf092186dcbb53b1376c828699e0b86f55afde89cf779a2b8ee262d6fa5ee1e306c9e14dacb5c9c4a273b4a34b4369e7b69b463d83b9226d18572496ab4b73cf589cb2e123ee224a7525c9248d95de51da318963291ca9c2b4a5eacd59b0ccb9ea8aa55f47aea8a61e3ba869cfb2fc93bd96d6a2fbac29244dce154582a8ecf18ded4a61b37b2cc0ae70e668aec8c37f3915b6add0b3bd6d5fedcae4ec4d7425a9191e2921f1e26c3db39554d2faafe99eee85ae4d09a9ce1d33ca17fb489f86034e8ae63ae94b90cc7c9d0fe2fb799475d6999c2a6e2502af2a8b4cd85d0af0295616b42d0876832e030acfe19c2e3ceb9486942f76fcbd8fd6be06f278fcd7e99816101e1894b749788695fa15d99d66580b0952958157727b07b589dc0eee301a9dfc0b0466f144cd70784877844ff01ac2efc0647a1c7d81886d6166f864684cdd9b94ff0748aef388d085b83ef33dca135141a7c4ad46e488a10ff02504b070868fe421cca0100005e040000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c6173738d565b6f1b4514fec6bbde75b69bbb49d224b46929e05b6a2ee19a4b73218140d2943835b4406163af926d9cdd74771d90a0129540ea033c801020242e2f252f790089b80824c45390f82ffc03049c995dbb89e3243cf8ccd93367e67cdf7c6746fef39f5f7e03f018ae6988e34213148c7333c1cd248f4da998d63083e735bcc0cd0c66b937abe2450d2770218697f838c7cd7c0c176358e0ee256e5e56b1a822c71075deb64d97e1d49ce564ed72c9cb161cdb778d829ff58a6bd98962d1353d6f9841f5364cbbc853a39b46a96c3274cd5d37368decbae1af6627ad9559db37574c97529511cbb6fc3186cb89a3773d66b6e1f6c93c833ce5140940eb9c659b17cbebcba6bb642c9728d231e7148c52de702dfe1d06657fd5f2189a2736365c87b04f6f9ab6cfa0cfdac47caa64789e49d39983607c67cdb4b34bdc9edbb798389e5d2cdbbeb56ee62dcfa22a970cd758377dd39db06dc7377ccbb169cf546382462d27bb68de285bae59a41d632ba6bf10883190481e2747ccab659f39e694f98969b479ae2aa0e6edf9e065f381a03d54f6104979b930eb64e2706114a2639488f97d6152c9b057b20bcbd7cd823f9cbccac01c2ed28129219241a234e77ca3b0366f6c08eda8c1a9f4aae1ad06824b89e42c152156e5122533fa88f94ece772d7b85215e852f760ea2b4b39673ca6ec19cb1782f6842cdf33c4d471f967474a15b470f3727d1abe332f22a5e21e9fe7f37a87855c7237854c5151d4fe16986ee7a189365ab244e3bbe6fe5bbe2f28deab88ad7b8799d006606c28b364ae43203e2ae898c37740c6384a1adfef4187a1bea1ff6391d5a3e9059f43a43e7be7312413aa6fea308379aded362c4ab514b9054c60627c330983828cd41b5c2631aaecbaff6cf11f9fd89a9c3a771869ecc38a82b2121c215a78735c2451723e94ea346f37de8a7effbe9ab44a34c633c75172c95de412495d981941adc81fca358758a6c17a2646f50a68b267868818f4e94719aa2a9603d06f000203c5e97098f578e088fd796708efc4e89261f2467bf7d080f93e590b234f2e5d1d44f88fc50c3a088e03ba2a61e248435191248868bc7289b575404977b0c34117d8fd6dc143b74055935d44a889a2e444320523d90f71b0249370622d503f980d67c7808909e104806830d80c8f5406e3704725e2c3a0044ae07f211adf9f810205c335e98ae7cb8d75f9423d1782b95fe1e51793bbd8b965405d134fdee202a6da77f8732cf75dba58ea22143bf0ad4afd0ba45375ec4298b9f679020514cda9b205513e45db4f381627205b12db472ef0fa8f21664699b404882462f01053e818a4fe9e43e23989f13e52ff026be14b40602c0355ab7e89fc6e3824e1143148be009d1a0badac2fe46bf8a2715d6adb0b836cea9d32b1752ff393cc6e9805d734a306be26046da4ef7ad069c78580ac36f55e37210271a5a10efbb07bf43dc9eafe9367d43cdf32da6f0dd1e35a643d89d04fa193c4b5038d84128ede3ec5fbae511824b30c947e84718cbefffa445f49c862caed1b6bc51867ec5892b77a1773457484141a5b5a32df025eeb7073e616e6dbb594147059df58d77674fe30d8540231815760c67c3a746c173f42c35fd07504b0708ea7bbc798f040000e6090000504b0304140008080800aa7b564e00000000000000000000000030000000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c6173738d56df531b5514fe6e76b31bb60be19740015b5aab8624b06ad156c36f84160da5051a0bd5da25d9c296b08bbb1b5e1c1ffa6ff8aebcf0a033923a3ae3f88433fe2ffe078e7aeedd854212c0879c7bf6dc73eef9cef9cebd933ffff9e53700efe189864e4c3441c12417535c4c73db8c8a590d73b8a3e12e177398e7dabc8a4f345cc244029ff235cfc54202f71258e4ea7d2e1ea85852b1cc203ff3dc6d862b79db359c4ad9378aae1378663130fcd29631552a7996efe7186281cb10df35cb158ba12bffdcdc358d6d33d834a6ed8d7927b0362c8fbc9451dbb183718687a9f30fbc60b7e1f18305823be3960840326f3bd6bdcaf6bae5ad98eb65b2b4e7dda2592e989ecdbf23a31c6cda3e43f38a673afe33cb9bddb59c80419f771ccb9b299bbe6fd176b61e4ce06e598eb1c2e58d53c154e3f5a58a13d8db56c1f66dca72dff4cc6d2bb0bc29c7710333b05d87ce4c372ed03cf63196acaf2ab66795e84475c30ae6040d03a9c18b8850fd23e76b17f498f72b4e47af70e6fc704dd0772124b187729d4163c23ff6ba9c3a9b0c854a30cb54ed6b9153d974368cc5f5e75631c80dae3130971353b72588318988e6e5c02c6e2d983b822f1a674abd69fa9b21c9526a709e92502d95323933fa4804ee72e0d9ce0643e7117c717268a593b565b7e215ad399bf3af090687b99b8e3eace8e842b78e1e2e2ea357c74314547c4674fdff0950f148c73b7857c5aa8e5bb8cdd05d0b63ba62974b96c7d0712af26b7ed5c674ace131179f132bd981c01da3b2b203e26689cd2f74e430cad05adb3786de867c47534ded2a84048bc9a6eca73a248cd4a0fef34a6db47d62a4a8eb8d8681483277762ca7c43094aa27a59ea7a841b91affa3c939c7bf3f3573f636aed1d3d8099a47488871aee9018d71bac54a8cd3aad17e1ffae9fb75fa2ad32ad3da997e0996ce1c2096ce1e404a0f1d40fe51445d21d98538c92c790ea109c36881810e1a82ab644d87f118c01b80d0785e26349e3926349e5bc20dd293120986374fc8b7f036490ec7a09587c6d33f21f6c3717e45186f8a7c7ae810e5634861300a1e276f9e4d1175bc42af09eb2d8ab92d4ee80abd8e112b1162ba060d8148b540720d81641a03916a814c50cce419407a2220596a743d10b916c84c4320c322a80e885c0be40ec5dc3d0308e78b27a68b1e9df517f970ea5ea433df232eef670ed192ae229ea1df77884bfb99dfa12c70de0e699a68c9d2af0af55b24f7a065859dbc783f4307896cd24907e9c8413e441b5fc8265791d843926b7f4095f7204bfb04421265f41250200f150bd4b94582f9804a5ec2975816650d84808fcb7a41ff266e8a724a18215b0cef8be1d4d516f637fa557ca0b06e85756a93bc747adba2d27f8eda381b56d79c1695357130a3ad57fb36c39ab8598acc4f8fec7268a732b4d0def70a7ebbb8398fe826add2f0ac119b8f4fb0311bc1ee20d01fe22382c2c10e41699b64ffd20d8f115c82493a223dc658e1f42705d1531a55f1848ee58332f22b2eadbe84dede5c25064529c9f6d65097b8de16ea8439d9fa4d15ed5574d40eded313833712018d614cc8715c8f9e19051fd393d4f41f504b0708826261e37e040000ca090000504b01020a000a0000080000aa7b564e000000000000000000000000030004000000000000000000000000000000696f2ffeca0000504b01020a000a0000080000aa7b564e000000000000000000000000080000000000000000000000000025000000696f2f6e756c732f504b01020a000a0000080000aa7b564e00000000000000000000000011000000000000000000000000004b000000696f2f6e756c732f636f6e74726163742f504b01020a000a0000080000aa7b564e00000000000000000000000017000000000000000000000000007a000000696f2f6e756c732f636f6e74726163742f746f6b656e2f504b01021400140008080800aa7b564eec308779cb090000281800002800000000000000000000000000af000000696f2f6e756c732f636f6e74726163742f746f6b656e2f53696d706c65546f6b656e2e636c617373504b01021400140008080800aa7b564e68fe421cca0100005e0400002200000000000000000000000000d00a0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e2e636c617373504b01021400140008080800aa7b564eea7bbc798f040000e60900003000000000000000000000000000ea0c0000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e24417070726f76616c4576656e742e636c617373504b01021400140008080800aa7b564e826261e37e040000ca0900003000000000000000000000000000d7110000696f2f6e756c732f636f6e74726163742f746f6b656e2f546f6b656e245472616e736665724576656e742e636c617373504b0506000000000800080051020000b316000000001072665f6e726332305f6f66666c696e65154f0000000000001900000000000000040103616972010341495201053130303030010132480117020001f7ec6473df12e751d64cf20a8baa7edd50810f81020001006d67120000000000000000000000000000000000000000000000000000000000089c0aea02bed90ddd000000",
    "contractAddress" : "tNULSeBaMwYiR4p1X9xNJPiyJfrXjr4KgkcFjG",
    "hash" : "9443656bab59f52441286e1d859855be28cbe155973c712c07385a21b7212152"
  }
}

4.20 Offline Assembly - Calling a contract transaction

Cmd: /api/contract/call/offline

Detailed description: Offline assembly - Calling contract transactions

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "senderBalance" : null,
  "nonce" : null,
  "contractAddress" : null,
  "gasLimit" : 0,
  "value" : null,
  "methodName" : null,
  "methodDesc" : null,
  "args" : null,
  "argsType" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Call Contract Offline Trading contractcalloffline Call Contract Offline Trading Form Yes
        sender string Transaction Creator Yes
        senderBalance biginteger Account Balance Yes
        nonce string account nonce value yes
        contractAddress string Smart Contract Address Yes
        gasLimit long GAS Limits Yes
        value biginteger The amount of the primary network asset that the caller transferred to the contract address. If there is no such service, fill in 0 Yes
        methodName string method name yes
        methodDesc string Method Description, if the method in the contract is not overloaded, this parameter can be empty No
        args object[] Parameter List No
        argsType string[] Parameter Type List No
        remark string Notes No

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "senderBalance" : "999999998523475",
  "nonce" : "9c0aea02bed90ddd",
  "contractAddress" : "tNULSeBaMwYiR4p1X9xNJPiyJfrXjr4KgkcFjG",
  "gasLimit" : 14166,
  "value" : 0,
  "methodName" : "transfer",
  "methodDesc" : null,
  "args" : [ "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD", 3800 ],
  "argsType" : [ "Address", "BigInteger" ],
  "remark" : "remark_call_test"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "1000be2a375d1072656d61726b5f63616c6c5f7465737497020001f7ec6473df12e751d64cf20a8baa7edd50810f810200020d2f73cb93099a8cfd0cbdd060155abfe2f50917000000000000000000000000000000000000000000000000000000000000000056370000000000001900000000000000087472616e7366657200020126744e554c536542614d6e7273364a4b724379365451647a594a5a6b4d5a4a446e673751417344010433383030480117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010006ee060000000000000000000000000000000000000000000000000000000000089c0aea02bed90ddd000000",
    "hash" : "aa69824582c6a3c1a4d486bbd38377a4c4a0ec4ea75a898fc70d109364a41bbf"
  }
}

4.21 Offline Assembly - Delete Contract Transactions

Cmd: /api/contract/delete/offline

Detailed description: Offline assembly - delete contract transaction

HttpMethod: POST

Form json data:

{
  "sender" : null,
  "senderBalance" : null,
  "nonce" : null,
  "contractAddress" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Delete Contract Offline Trading contractdeleteoffline Delete Contract Offline Trading Form Yes
        sender string Transaction Creator Yes
        senderBalance biginteger Account Balance Yes
        nonce string account nonce value yes
        contractAddress string Smart Contract Address Yes
        remark string Notes No

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data:

{
  "sender" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "senderBalance" : "999999998523475",
  "nonce" : "9c0aea02bed90ddd",
  "contractAddress" : "tNULSeBaMxyMyafiQjq1wCW7cQouyEhRL8njtu",
  "remark" : "delete contract"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "11004f2c375d0f64656c65746520636f6e74726163742e020001f7ec6473df12e751d64cf20a8baa7edd50810f81020002245bcd36879bc30bfc719a417939b3aa924247ca480117020001f7ec6473df12e751d64cf20a8baa7edd50810f8102000100a086010000000000000000000000000000000000000000000000000000000000089c0aea02bed90ddd000000",
    "hash" : "780cd742592e16e9062f5a04f72273b1c92f8f130e2c93bdb25662fa4ad7aa50"
  }
}

4.22 Offline Assembly - Contract Token Transfer Transaction

Cmd: /api/contract/tokentransfer/offline

Detailed description: Offline assembly - contract token transfer transaction

HttpMethod: POST

Form json data:

{
  "fromAddress" : null,
  "senderBalance" : null,
  "nonce" : null,
  "toAddress" : null,
  "contractAddress" : null,
  "gasLimit" : 0,
  "amount" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
token transfer offline transaction contracttokentransferoffline token transfer offline transaction form yes
        fromAddress string Transferr Account Address Yes
        senderBalance biginteger Transferring Account Balance Yes
        nonce string Transferr account nonce value Yes
        toAddress string Transferr Account Address Yes
        contractAddress string Contract Address Yes
        gasLimit long GAS Limits Yes
        amount biginteger Amount of transferred token assets Yes
        remark string Notes No

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data:

{
  "fromAddress" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "senderBalance" : "999999998523475",
  "nonce" : "9c0aea02bed90ddd",
  "toAddress" : "tNULSeBaMnrs6JKrCy6TQdzYJZkMZJDng7QAsD",
  "contractAddress" : "tNULSeBaN3MH7HX8kXzKw4X9tLKQ991X1GiAbK",
  "gasLimit" : 14166,
  "amount" : 10,
  "remark" : "1"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "1000632b375d0431e4b8aa95020001f7ec6473df12e751d64cf20a8baa7edd50810f810200026b8d9b09ed5c1a692a6109c5ee99ccb6177b13a1000000000000000000000000000000000000000000000000000000000000000056370000000000001900000000000000087472616e7366657200020126744e554c536542614d6e7273364a4b724379365451647a594a5a6b4d5a4a446e67375141734401023130480117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010006ee060000000000000000000000000000000000000000000000000000000000089c0aea02bed90ddd000000",
    "hash" : "4eb36b1fb31b0888895c0cdcab39c80ac986b18f7aef721a390ff1727c77ef10"
  }
}

4.23 Offline Assembly - Contract transactions from account address to contract address transfer (main chain asset)

Cmd: /api/contract/transfer2contract/offline

Detailed description: Offline assembly - contract transaction from account address to contract address (main chain asset)

HttpMethod: POST

Form json data:

{
  "fromAddress" : null,
  "senderBalance" : null,
  "nonce" : null,
  "toAddress" : null,
  "gasLimit" : 0,
  "amount" : null,
  "remark" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Transferring offline transactions to contract addresses contracttransferoffline Transferring offline transaction forms to contract addresses Yes
        fromAddress string Transferr Account Address Yes
        senderBalance biginteger Transferring Account Balance Yes
        nonce string Transferr account nonce value Yes
        toAddress string Transferred contract address Yes
        gasLimit long GAS Limits Yes
        amount biginteger Transferred main chain asset amount Yes
        remark string Notes No

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data:

{
  "fromAddress" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "senderBalance" : "999999998523475",
  "nonce" : "9c0aea02bed90ddd",
  "toAddress" : "tNULSeBaMxyMyafiQjq1wCW7cQouyEhRL8njtu",
  "gasLimit" : 25896,
  "amount" : "400000000",
  "remark" : "Offline transfer to contract"
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "1000e82b375d15e7a6bbe7babfe59091e59088e7baa6e8bdace8b4a677020001f7ec6473df12e751d64cf20a8baa7edd50810f81020002245bcd36879bc30bfc719a417939b3aa924247ca0084d7170000000000000000000000000000000000000000000000000000000028650000000000001900000000000000085f70617961626c650e28292072657475726e20766f6964008c0117020001f7ec6473df12e751d64cf20a8baa7edd50810f810200010088ebe21700000000000000000000000000000000000000000000000000000000089c0aea02bed90ddd000117020002245bcd36879bc30bfc719a417939b3aa924247ca020001000084d71700000000000000000000000000000000000000000000000000000000000000000000000000",
    "hash" : "4ed64d90abf420beba1baf68399c85d290347dc41de2c49384a2f8c895d4addf"
  }
}

5.1 Creating a consensus node

Cmd: /api/consensus/agent

Detailed description: Create consensus node

HttpMethod: POST

Form json data:

{
  "agentAddress" : null,
  "packingAddress" : null,
  "rewardAddress" : null,
  "commissionRate" : 0,
  "deposit" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
CreateAgentForm createagentform Create Consensus Node Form Yes
        agentAddress string Node 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 Password Yes

return value

Field Name Field Type Parameter Description
value string transaction hash

Example request data:

request path: slightly

request form data:

{
  "agentAddress" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "packingAddress" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "rewardAddress" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "commissionRate" : 10,
  "deposit" : "2000000000000",
  "password" : "abcd1234"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "52456e830fa389c72c4a71e4224db5aa869d0fbfd0cb2175096e6e5fb6a5c6ee"
  }
}

5.2 Logout Consensus Node

Cmd: /api/consensus/agent/stop

Detailed description: Logout consensus node

HttpMethod: POST

Form json data:

{
  "address" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
StopAgentForm stopagentform Unregister Consensus Node Form Yes
        address string Consensus Node Address Yes
        password string Password Yes

return value

Field Name Field Type Parameter Description
value string transaction hash

Example request data:

request path: slightly

request form data:

{
  "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "password" : "abcd1234"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "fcaf8c92a0eafd2ca57744c165e1a955edcbfde98248494937200cc30d524e2e"
  }
}

5.3 Entrusted to participate in the consensus

Cmd: /api/consensus/deposit

Detailed description: Entrusted participation in consensus

HttpMethod: POST

Form json data:

{
  "address" : null,
  "agentHash" : null,
  "deposit" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
DepositForm depositform Delegate Participation Consensus Form Yes
        address string Participation in Consensus Account Address Yes
        agentHash string consensus node hash yes
        deposit string Amount of consensus Yes
        password string Password Yes

return value

Field Name Field Type Parameter Description
value string transaction hash

Example request data:

request path: slightly

request form data:

{
  "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "agentHash" : "52456e830fa389c72c4a71e4224db5aa869d0fbfd0cb2175096e6e5fb6a5c6ee",
  "deposit" : "200000000000",
  "password" : "abcd1234"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "4ae333f8bf821884d0f589f35516c8bdd9661dbd8a7009b063ac862eeefc10f6"
  }
}

5.4 Exit Consensus

Cmd: /api/consensus/withdraw

Detailed description: Exit consensus

HttpMethod: POST

Form json data:

{
  "address" : null,
  "txHash" : null,
  "password" : null
}

parameter list

Parameter Name Parameter Type Parameter Description Required
Exit Consensus withdrawform Exit Consensus Form Yes
        address string Node Address Yes
        txHash string Trading hash when joining consensus Yes
        password string Password Yes

return value

Field Name Field Type Parameter Description
value string transaction hash

Example request data:

request path: slightly

request form data:

{
  "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "txHash" : "4ae333f8bf821884d0f589f35516c8bdd9661dbd8a7009b063ac862eeefc10f6",
  "password" : "abcd1234"
}

Example response data:

{
  "success" : true,
  "data" : {
    "value" : "13a0e252bf05ec02f3ae0a84fc3b8183dbfc0e16c562b20b8e28b73b139f2c0e"
  }
}

5.5 Querying the node's delegate consensus list

Cmd: /api/consensus/list/deposit/{agentHash}

Detailed description: Query node's delegate consensus list

HttpMethod: GET

parameter list

Parameter Name Parameter Type Parameter Description Required
agentHash string Create a consensus node transaction hash Yes

return value

Field Name Field Type Parameter Description
deposit string
agentHash string node hash
address string Account Address
time long delegation time
txHash string Trusted transaction hash
blockHeight long Block height at delegate
delHeight long Exit the block height of the delegate

Example request data:

request path: http://localhost:18004/api/consensus/list/deposit/786402b17649b968e4643cb52fa30225645b0dc7b8761b047a1f080d3dd30dcd

request form data: no

Example response data:

{
  "success" : true,
  "data" : [ {
    "deposit" : "200000000000",
    "agentHash" : "786402b17649b968e4643cb52fa30225645b0dc7b8761b047a1f080d3dd30dcd",
    "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
    "time" : 1563277510,
    "txHash" : "bd93cf73331c0d9986cb90922d2eec785ea9eda3da85cd9d629b5a4c7f36c452",
    "blockHeight" : 462,
    "delHeight" : -1
  }, {
    "deposit" : "200000000000",
    "agentHash" : "786402b17649b968e4643cb52fa30225645b0dc7b8761b047a1f080d3dd30dcd",
    "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
    "time" : 1563277712,
    "txHash" : "be5257bc0814cbda61378ff2afa81e98cae0018cd7d78b8d1ca9812c66d27e84",
    "blockHeight" : 482,
    "delHeight" : -1
  } ]
}

5.6 Offline Assembly - Create Consensus Node Transactions

Cmd: /api/consensus/agent/offline

Detailed description: The assets required to participate in the consensus can be obtained through the query chain information interface (agentChainId and agentAssetId)

HttpMethod: POST

Form json data:

{
  "agentAddress" : null,
  "packingAddress" : null,
  "rewardAddress" : null,
  "commissionRate" : 0,
  "deposit" : null,
  "input" : {
    "address" : null,
    "assetChainId" : 0,
    "assetId" : 0,
    "amount" : null,
    "nonce" : null
  }
}

parameter list

Parameter Name Parameter Type Parameter Description Required
ConsensusDto consensusdto Create consensus node form offline Yes
        agentAddress string Node Creation Address Yes
        packingAddress string Node Block Address Yes
        rewardAddress string Get Consensus Reward Address Yes
        commissionRate int Node commission ratio Yes
        deposit biginteger Create Node Margin Yes
        input object Transaction input information Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                nonce string Asset nonce value Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data:

{
  "agentAddress" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "packingAddress" : "tNULSeBaMvEtDfvZuukDf2mVyfGo3DdiN8KLRG",
  "rewardAddress" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "commissionRate" : 10,
  "deposit" : "2000000000000",
  "input" : {
    "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
    "assetChainId" : 2,
    "assetId" : 1,
    "amount" : "2000001000000",
    "nonce" : "63ac862eeefc10f6"
  }
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "040019b72d5d006600204aa9d1010000000000000000000000000000000000000000000000000000020001efa328e600912da9872390a675486ab9e8ec2114020001f7ec6473df12e751d64cf20a8baa7edd50810f81020001efa328e600912da9872390a675486ab9e8ec21140a8c0117020001efa328e600912da9872390a675486ab9e8ec211402000100406259a9d10100000000000000000000000000000000000000000000000000000863ac862eeefc10f6000117020001efa328e600912da9872390a675486ab9e8ec21140200010000204aa9d1010000000000000000000000000000000000000000000000000000ffffffffffffffff00",
    "hash" : "786402b17649b968e4643cb52fa30225645b0dc7b8761b047a1f080d3dd30dcd"
  }
}

5.7 Offline Assembly - Unregister Consensus Node Transaction

Cmd: /api/consensus/agent/stop/offline

**Detailed description: The StopDepositDto information of the assembly transaction can be obtained by querying the node's delegate consensus list, and the input nonce value can be empty **

HttpMethod: POST

Form json data:

{
  "agentHash" : null,
  "agentAddress" : null,
  "deposit" : null,
  "price" : null,
  "depositList" : [ {
    "depositHash" : null,
    "input" : {
      "address" : null,
      "assetChainId" : 0,
      "assetId" : 0,
      "amount" : null,
      "nonce" : null
    }
  } ]
}

parameter list

Parameter Name Parameter Type Parameter Description Required
StopConsensusDto stopconsensusdto Offline Logout Consensus Node Form Yes
        agentHash string Create node transaction hash Yes
        agentAddress string Node Address Yes
        deposit biginteger Create a node's margin Yes
        price biginteger Fee Price No
        depositList list<object> Stop delegate list Yes
                depositHash string Trusted Consensus Trading hash Yes
                input object Transaction input Yes
                        address string Account Address Yes
                           assetChainId int Chain id of assets Yes
                        assetId int asset id yes
                        amount biginteger Asset Amount Yes
                        nonce string asset nonce value yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data:

{
  "agentHash" : "786402b17649b968e4643cb52fa30225645b0dc7b8761b047a1f080d3dd30dcd",
  "agentAddress" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "deposit" : "2000000000000",
  "price" : "100000",
  "depositList" : [ {
    "depositHash" : "bd93cf73331c0d9986cb90922d2eec785ea9eda3da85cd9d629b5a4c7f36c452",
    "input" : {
      "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
      "assetChainId" : 2,
      "assetId" : 1,
      "amount" : "200000000000",
      "nonce" : ""
    }
  }, {
    "depositHash" : "be5257bc0814cbda61378ff2afa81e98cae0018cd7d78b8d1ca9812c66d27e84",
    "input" : {
      "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
      "assetChainId" : 2,
      "assetId" : 1,
      "amount" : "200000000000",
      "nonce" : ""
    }
  } ]
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "0900e1bc2d5d0020786402b17649b968e4643cb52fa30225645b0dc7b8761b047a1f080d3dd30dcdfd5c010317020001efa328e600912da9872390a675486ab9e8ec21140200010000204aa9d1010000000000000000000000000000000000000000000000000000087a1f080d3dd30dcdff17020001efa328e600912da9872390a675486ab9e8ec21140200010000d0ed902e00000000000000000000000000000000000000000000000000000008629b5a4c7f36c452ff17020001efa328e600912da9872390a675486ab9e8ec21140200010000d0ed902e000000000000000000000000000000000000000000000000000000081ca9812c66d27e84ff0217020001efa328e600912da9872390a675486ab9e8ec211402000100609948a9d1010000000000000000000000000000000000000000000000000000f1ca2d5d0000000017020001efa328e600912da9872390a675486ab9e8ec21140200010000a0db215d000000000000000000000000000000000000000000000000000000000000000000000000",
    "hash" : "c07b40a70858b262a39b55deb08c9d505384c017580f91976979e8984a096eaf"
  }
}

5.8 Offline Assembly - Entrusted to participate in consensus transactions

Cmd: /api/consensus/deposit/offline

Detailed description: The assets required to participate in the consensus can be obtained through the query chain information interface (agentChainId and agentAssetId)

HttpMethod: POST

Form json data:

{
  "address" : null,
  "deposit" : null,
  "agentHash" : null,
  "input" : {
    "address" : null,
    "assetChainId" : 0,
    "assetId" : 0,
    "amount" : null,
    "nonce" : null
  }
}

parameter list

Parameter Name Parameter Type Parameter Description Required
DepositDto depositdto Offline delegate participation consensus form Yes
        address string Account Address Yes
        deposit biginteger Delegate amount Yes
        agentHash string consensus node hash yes
        input object Transaction input information Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                nonce string Asset nonce value Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data:

{
  "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "deposit" : "200000000000",
  "agentHash" : "786402b17649b968e4643cb52fa30225645b0dc7b8761b047a1f080d3dd30dcd",
  "input" : {
    "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
    "assetChainId" : 2,
    "assetId" : 1,
    "amount" : "200010000000",
    "nonce" : "629b5a4c7f36c452"
  }
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "050090b92d5d005700d0ed902e000000000000000000000000000000000000000000000000000000020001efa328e600912da9872390a675486ab9e8ec2114786402b17649b968e4643cb52fa30225645b0dc7b8761b047a1f080d3dd30dcd8c0117020001efa328e600912da9872390a675486ab9e8ec211402000100806686912e00000000000000000000000000000000000000000000000000000008629b5a4c7f36c452000117020001efa328e600912da9872390a675486ab9e8ec21140200010000d0ed902e000000000000000000000000000000000000000000000000000000ffffffffffffffff00",
    "hash" : "be5257bc0814cbda61378ff2afa81e98cae0018cd7d78b8d1ca9812c66d27e84"
  }
}

5.9 Offline Assembly - Exit Consensus Trading

Cmd: /api/consensus/withdraw/offline

Detailed description: The input data of the interface is the output data of the trusted consensus transaction, and the nonce value can be empty

HttpMethod: POST

Form json data:

{
  "address" : null,
  "depositHash" : null,
  "price" : null,
  "input" : {
    "address" : null,
    "assetChainId" : 0,
    "assetId" : 0,
    "amount" : null,
    "nonce" : null
  }
}

parameter list

Parameter Name Parameter Type Parameter Description Required
WithDrawDto withdrawdto Offline Exit Consensus Form Yes
        address string address yes
        depositHash string Delegation of Consensus Transaction Yes
        price biginteger Fee Price No
        input object Transaction input information Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                nonce string Asset nonce value Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data:

{
  "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
  "depositHash" : "be5257bc0814cbda61378ff2afa81e98cae0018cd7d78b8d1ca9812c66d27e84",
  "price" : "1000000",
  "input" : {
    "address" : "tNULSeBaMujLBcZWfE2wHKnZo7PGvqvNrt6yWG",
    "assetChainId" : 2,
    "assetId" : 1,
    "amount" : 200000000000,
    "nonce" : ""
  }
}

Example response data:

{
  "success" : true,
  "data" : {
    "txHex" : "060090ba2d5d0020be5257bc0814cbda61378ff2afa81e98cae0018cd7d78b8d1ca9812c66d27e848c0117020001efa328e600912da9872390a675486ab9e8ec21140200010000d0ed902e000000000000000000000000000000000000000000000000000000081ca9812c66d27e84ff0117020001efa328e600912da9872390a675486ab9e8ec211402000100c08dde902e000000000000000000000000000000000000000000000000000000000000000000000000",
    "hash" : "d1a054a1bc5d20bab53235993a5a2aee6f3c644e67e0044c60a08c7c49bb0ff2"
  }
}

5.10 Multi-Sign Account Offline Assembly - Create Consensus Node Transaction

Cmd: /api/consensus/multiSign/agent/offline

Detailed description: The assets required to participate in the consensus can be obtained through the query chain information interface (agentChainId and agentAssetId)

HttpMethod: POST

Form json data:

{
  "agentAddress" : null,
  "packingAddress" : null,
  "rewardAddress" : null,
  "commissionRate" : 0,
  "deposit" : null,
  "input" : null,
  "pubKeys" : [ ],
  "minSigns" : 0
}

parameter list

Parameter Name Parameter Type Parameter Description Required
MultiSignConsensusDto multisignconsensusdto Multi-Sign Account Offline Create Consensus Node Form Yes
        agentAddress string Node Creation Address Yes
        packingAddress string Node Block Address Yes
        rewardAddress string Get Consensus Reward Address Yes
        commissionRate int Node commission ratio Yes
        deposit biginteger Create Node Margin Yes
        input object Transaction input information Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                nonce string Asset nonce value Yes
        pubKeys list<string> Public Key Collection Yes
        minSigns int Minimum Signatures Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

5.11 Offline Assembly - Multi-Sign Account Entrusted to Participate in Consensus Trading

Cmd: /api/consensus/multiSign/deposit/offline

Detailed description: The assets required to participate in the consensus can be obtained through the query chain information interface (agentChainId and agentAssetId)

HttpMethod: POST

Form json data:

{
  "address" : null,
  "deposit" : null,
  "agentHash" : null,
  "input" : null,
  "pubKeys" : [ ],
  "minSigns" : 0
}

parameter list

Parameter Name Parameter Type Parameter Description Required
MultiSignDepositDto multisigndepositdto Multi-Sign Account Offline Delegate Participation Consensus Form Yes
        address string Account Address Yes
        deposit biginteger Delegate amount Yes
        agentHash string consensus node hash yes
        input object Transaction input information Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                nonce string Asset nonce value Yes
        pubKeys list<string> Public Key Collection Yes
        minSigns int Minimum Signatures Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

5.12 Offline Assembly - Multi-Sign Account Exit Consensus Transaction

Cmd: /api/consensus/multiSign/withdraw/offline

Detailed description: The input data of the interface is the output data of the trusted consensus transaction, and the nonce value can be empty

HttpMethod: POST

Form json data:

{
  "address" : null,
  "depositHash" : null,
  "price" : null,
  "input" : null,
  "pubKeys" : [ ],
  "minSigns" : 0
}

parameter list

Parameter Name Parameter Type Parameter Description Required
WithDrawDto multisignwithdrawdto Multi-Sign Account Offline Exit Consensus Form Yes
        address string address yes
        depositHash string Delegation of Consensus Transaction Yes
        price biginteger Fee Price No
        input object Transaction input information Yes
                address string Account Address Yes
                assetChainId int Asset Chain id Yes
                assetId int Asset id Yes
                amount biginteger Asset Amount Yes
                nonce string Asset nonce value Yes
        pubKeys list<string> Public Key Collection Yes
        minSigns int Minimum Signatures Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

5.13 Offline Assembly - Multi-Sign Account Deregistration Consensus Node Transaction

Cmd: /api/consensus/multiSign/agent/stop/offline

**Detailed description: The StopDepositDto information of the assembly transaction can be obtained by querying the node's delegate consensus list, and the input nonce value can be empty **

HttpMethod: POST

Form json data:

{
  "agentHash" : null,
  "agentAddress" : null,
  "deposit" : null,
  "price" : null,
  "depositList" : null,
  "pubKeys" : [ ],
  "minSigns" : 0
}

parameter list

Parameter Name Parameter Type Parameter Description Required
StopConsensusDto multisignstopconsensusdto Multi-Sign Account Offline Logout Consensus Node Form Yes
        agentHash string Create node transaction hash Yes
        agentAddress string Node Address Yes
        deposit biginteger Create a node's margin Yes
        price biginteger Fee Price No
        depositList list<object> Stop delegate list Yes
                depositHash string Trusted Consensus Trading hash Yes
                input object Transaction input Yes
                        address string Account Address Yes
                           assetChainId int Chain id of assets Yes
                        assetId int asset id yes
                        amount biginteger Asset Amount Yes
                        nonce string asset nonce value yes
        pubKeys list<string> Public Key Collection Yes
        minSigns int Minimum Signatures Yes

return value

Field Name Field Type Parameter Description
hash string transaction hash
txHex string Transaction Serialization String

Example request data:

request path: slightly

request form data: no

Example response data:

slightly

Last Updated: 9/10/2019, 3:04:19 PM