API | Description |
---|---|
v2/tokens | Get access token |
user/v5/batchCreateUser | Create account |
vip210/v1/uid/createToken | Create token to account |
vip210/v1/address/createToken | Create token to address |
vip210/v1/uid/setCreator | Set token administrator by account |
vip210/v1/address/setCreator | Set token administrator by address |
vip210/v1/uid/mintToken | Mint token to account |
vip210/v1/address/mintToken | Mint token to address |
vip210/v1/uid/batchMintToken | Batch mint token to account |
vip210/v1/address/batchMintToken | Batch mint token to address |
vip210/v1/uid/approve | Authorize token transfer by account in batches |
vip210/v1/address/approve | Authorize token transfer by address in batches |
vip210/v1/uid/uid/transferFrom | Authorized transfer: from account to account |
vip210/v1/uid/address/transferFrom | Authorized transfer: from account to address |
vip210/v1/address/uid/transferFrom | Authorized transfer: from address to account |
vip210/v1/address/address/transferFrom | Authorized transfer: from address to address |
vip210/v1/uid/uid/batchTransferFrom | Authorized batch transfer: from account to account |
vip210/v1/uid/address/batchTransferFrom | Authorized batch transfer: from account to address |
vip210/v1/address/uid/batchTransferFrom | Authorized batch transfer: from address to account |
vip210/v1/address/address/batchTransferFrom | Authorized batch transfer: from address to address |
vip210/v1/uid/setApprovalForAll | Manage all tokens by authorized account |
vip210/v1/address/setApprovalForAll | Manage all tokens by authorized address |
vip210/v1/burnToken | Burn token of the specified account |
vip210/v1/query/uid/balanceOf | Query token balance of the specified account |
vip210/v1/query/uid/balanceOfBatch | Batch query token balance of accounts |
vip210/v1/query/address/balanceOf | Query token balance of the specified address |
vip210/v1/query/address/balanceOfBatch | Batch query token balance of addresses |
vip210/v1/query/uid/uid/allowance | Query authorized transferable quota of account A to account B |
vip210/v1/query/uid/address/allowance | Query authorized transferable quota of account A to address B |
vip210/v1/query/address/uid/allowance | Query authorized transferable quota of address A to account B |
vip210/v1/query/address/address/allowance | Query authorized transferable quota of address A to address B |
vip210/v1/query/uid/uid/isApprovedForAll | Query whether account A has all the authorizations of account B |
vip210/v1/query/uid/address/isApprovedForAll | Query whether account A has all the authorizations of address B |
vip210/v1/query/address/uid/isApprovedForAll | Query whether address A has all the authorizations of account B |
vip210/v1/query/address/address/isApprovedForAll | Query whether address A has all the authorizations of address B |
vip210/v1/setMetadataBaseURI | Set token base url |
vip210/v1/query/tokenURI | Query token url |
vip210/v1/query/tokens | Query token information |
Request URL
-
AWS / Projects hosted outside of China: https://developer.vetoolchain.com/api/
-
Ali / Projects hosted inside China: https://developer.vetoolchain.cn/api/
Request Header
Header | Description | Example |
---|---|---|
content-type | indicates the media type of the resource | application/json;charset=utf-8 |
x-api-token | contains the JWT token to authenticate a user | eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... |
Result Code
code | message | codeString |
---|---|---|
1 |
success
|
success
|
-1 | ERR_SERVER_ERROR | SYNCFailRetry |
1002 |
Exception, parameter {0} is empty
|
SYNCFailTerminate |
1003 |
Exception, parameter {0} is illegal
|
SYNCFailTerminate
|
1100 | ERR_GET_DEVELOPER_INFO_FAILED | SYNCFailTerminate |
1101 | ERR_GENERATE_TOKEN_FAILED | SYNCFailTerminate |
1102 | ERR_VERIFY_SIGNATURE_FAILED | SYNCFailTerminate |
2100 | ERR_DEVELOPER_INFO_IS_NOT_FOUND | SYNCFailTerminate |
2119 | ERR_DEVELOPER_TOKEN_IS_EXPIRED | SYNCFailTerminate |
2120 | ERR_DEVELOPER_PROJECT_IS_NOT_ENABLED | SYNCFailTerminate |
2121 | ERR_DEVELOPER_TOKEN_IS_NOT_WITHIN_TIME_FRAME | SYNCFailTerminate |
3019 | ERR_TCC_INSUFFICIENT | SYNCFailTerminate |
100004 | ERR_TOKEN_IS_INVAILD | SYNCFailTerminate |
100006 | ERR_NO_ACCESS | SYNCFailTerminate |
Description: When the request fails, codeString has two definitions. Among them, when codeString returns SYNCFailRetry, an internal system error occurs, indicating that the request needs to be retried. When it returns to SYNCFailTerminate, it means that the request has failed verification. Please reconstruct the request according to the error message.
Terms
Status
When you send the request, the requestNo is the request number, orderStatus is the request status. Inside one request, there may be several sub-requests. For example: mint token to accounnt, you can have many [vid, toUID] pairs inside one request, each will have a transaction on blockchain. Here the orderStatus means the whole request status, if any of transactions is FAILED, it will fail. Therefore, when the request status (orderStatus) is failed, please check the on-chain status of each transaction.
Name | Type | Description |
---|---|---|
orderStatus | string | PROCESSING, SUCCESS, FAILED |
Account
When the client calls to create account, the escrow account created in ToolChain consists of two parts: UID and wallet address. The address is derived from UID, and they are same.
Name | Type | Description |
---|---|---|
UID | string | account, 32bytes, hex string |
Address | string | address, 20bytes, hex string |
Idempotent
ToolChain®️'s idempotent processing of write requests requires the requester to provide the request number (requestNo) to achieve. The same request number will only be executed once in ToolChain®️, and repeated requests will be regarded as query operations.
-
Get access token
POST v2/tokens
Get token, for the method of obtaining appid and appkey, please refer to here
Java Sample:
signString :appid=15cf8af3ebeca443d377bd5c2658cae9
&appkey=15cf8af3ebeca443d377bd5c2658cae98a1030dd513184568e89fbbd776bc2cb
&nonce =3806143519628774
×tamp=1552185608
signature : sha256( signString )
public static String sha256( String text )
{
try {
MessageDigest message = MessageDigest.getInstance( "SHA-256" );
byte[] hash = message.digest( text.getBytes( "UTF-8" ) );
return(Hex.encodeHexString( hash ) );
} catch ( Exception e ) {
e.printStackTrace();
}
return(null);
}
public static String signature( TokenRequest request )
{
StringBuffer sign = new StringBuffer();
sign.append( String.format( "appid=%s&", request.getAppid() ) );
sign.append( String.format( "appkey=%s&", appkey ) );
sign.append( String.format( "nonce=%s&", request.getNonce() ) );
sign.append( String.format( "timestamp=%s", request.getTimestamp() ) );
return(sha256( sign.toString().toLowerCase() ) );
}
public static void testGetToken()
{
TokenRequest request = new TokenRequest();
request.setAppid( appid );
request.setNonce( RandomUtils.nextHexString( 8 ) );
request.setTimestamp( String.valueOf( (System.currentTimeMillis() / 1000) ) );
request.setSignature( signature( request ) );
System.out.println( JSONObject.toJSONString( request ) );
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
appid | string | Y | appid |
nonce | string | Y | random number (length is 16) |
signature | string | Y | sha256 signature |
timestamp | string | Y | current timestamp, within 5 minutes (UTC time) |
source | string | N | application request source. For the same request source, the valid request is the latest request |
Request Example
{
"appid": "15cf8af3ebeca443d377bd5c2658cae9",
"nonce": "3806143519628774",
"signature": "1c442f56664317d81c32e41010660f54ba1e71223fa6d766ebbe45de3906998b",
"timestamp": "1552185608"
}
Response Example
{
"code": "common.success",
"data": {
"timeToLive": 86400,
"expireTime": 1593257539,
"expire": 86400,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpbklkIjoiNGNhY2IyNzk3NDVjIiwiYXBwSWQiOiJhODJiN2I5MGNmMDE0ZDFhMDk5YzEzOTdmMzA5NzZiYyIsInNvdXJjZSI6ImFhYSIsImV4cCI6MTU5MzI1NzUzOSwiaWF0IjoxNTkzMTcxMTM5fQ.YhXSdmicmbjajIiZqyIPpUPWn1lFrsO6G8-JWK_yXmY"
}
}
Response Parameters
Name | Type | Description |
---|---|---|
token | string | returned token |
expire | integer | token effective time (24 hours), unit: second |
timeTolive | integer | token remaining effective time, unit: second |
expireTime | integer | expiry timestamp |
After getting the token, you can start sending **HTTP GET/POST** requests to call the blockchain service. Each time it is called, please make sure that the value of the x-api-token of the HTTP request is valid.
-
Create account
POST user/v5/batchCreateUser
Create account. Please repeat the request until the orderStatus becomes the final status.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
quantity | integer | Y | quantity. It is recommended to create no more than 5 in a single request. |
Request Example
{
"quantity": 5,
"requestNo": "20210701-001"
}
Response Example
{
"data": {
"requestNo": "20210701-001",
"orderStatus": "SUCCESS",
"users": [
{
"address": "0xc6914fa7e1409e0d2e85933331f9f0394163de52",
"uid": "0x57795956418a28ba9a72181fe323fb509f9c6959362ff2e3a13ee0128218e6d6"
},
{
"address": "0xb4ae46837fdd6a41c9fbd2e3d6d1fe4007023b66",
"uid": "0xd5a3e4dce2d7d8438104157ca3b53a1b1a2bd4b44e9bce45bb1d15bdfa7703d5"
},
{
"address": "0xf55ca42b56746f93fc2792484bf9648ce0d2b5ee",
"uid": "0xe78e2e860ef455958517a359dd19e3f4093f41bba7653919bed8c91ceeddf777"
},
{
"address": "0xd4cd05fcceb154ddce38aa28ce5158bd34740ee6",
"uid": "0x56f386ef92baec301bfdf2ccfb5e143725116585f95d55b80eab8d40a94ed25b"
},
{
"address": "0x8c80140ad3b83926af555830a63309b98c25cd47",
"uid": "0x2203b26196f5f41789a9285d50c5838de439ef7e93063465bfc9bbf19554b163"
}
]
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
+ users | array | account list |
└ uid | string | UID of account, start with '0x', 32 bytes |
└ address | string | address of UID, start with '0x', 20 bytes |
-
Create token to account
POST vip210/v1/uid/createToken
Create token to account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the ownerUID field in the request parameters is the UID of the contract administrator account.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of contract administrator account, start with '0x', 32 bytes, please refer to here |
initialOwnerUID | string | Y | token administrator account, start with '0x', 32 bytes |
initialSupply | string | Y | Initial issuance of token,It supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. Id value range is [0,2256-1]. |
name | string | Y | name of token |
symbol | string | Y | symbol of token |
decimals | integer | Y | the decimal precision of token, the value range is [0,255] |
data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo": "createToken20210706002",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"initialOwnerUID":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20",
"initialSupply":"100000000",
"name":"VET-token06",
"symbol":"VET-Symbol",
"decimals":18,
"data":"tokenuid1data001",
"ownerUID":"0x42ceddea9c55dcf8087b7d65232cf6f4a8a38ff2621e40443af42bc6b530198e"
}
Response Example
{
"data": {
"requestNo": "createToken20210706002",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"clauseIndex": 0,
"txID": "0x6c0eed9af1df59257da6ec69e52dc9db1c7c6815e5b070be9cee7e3de6933e43",
"txStatus": "SUCCESS",
"tokenId": "11",
"amount": "100000000",
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210TxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg
|
string | transaction failure information |
clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
txID | string | blockchain transaction ID |
txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
tokenId | string | tokenId,returns a decimal value |
amount | string | the number of tokens, consistent with the initialSupply value in the request. |
-
Create token to address
POST vip210/v1/address/createToken
Create token to address. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the ownerUID field in the request parameters is the UID of the contract administrator account.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of contract administrator account, start with '0x', 32 bytes, please refer to here |
initialOwnerAddress | string | Y | token administrator address, start with '0x', 20 bytes |
initialSupply | string | Y | Initial issuance of token,it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. Id value range is [0,2256-1]. |
name | string | Y | name of token |
symbol | string | Y | symbol of token |
decimals | integer | Y | decimals, the value range is [0,255] |
data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo": "createTokenAddress20210707004",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"initialOwnerAddress":"0x5245f56e636d622544c6bdee06ce6a4cb7925e2d",
"initialSupply":"200000000",
"name":"tokenAddress-name",
"symbol":"tokenAddress-symbol",
"decimals":18,
"data":"tokenAddress-data",
"ownerUID":"0x42ceddea9c55dcf8087b7d65232cf6f4a8a38ff2621e40443af42bc6b530198e"
}
Response Example
{
"data": {
"requestNo": "createTokenAddress20210707004",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"clauseIndex": 0,
"txID": "0xc58c5fa379ee8ea7b78298ac4de0b1884590b57c18e76edf0f30c41e9322080f",
"txStatus": "SUCCESS",
"tokenId": "12",
"amount": "200000000",
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210TxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg
|
string | transaction failure information |
clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
txID | string | blockchain transaction ID |
txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
tokenId | string | tokenId,returns a decimal value |
amount | string | the number of tokens, consistent with the initialSupply value in the request. |
-
Set token administrator by account.
POST vip210/v1/uid/setCreator
Set token administrator by account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the ownerUID field in the request parameters is the UID of the contract administrator account.
2. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of contract administrator account, start with '0x', 32 bytes, please refer to here |
tokenIds | array[string] | Y | collection of tokenIds, single tokenId returned by create token interface. |
toUID | string | Y | UID of token administrator target account, start with '0x', 32 bytes |
Request Parameters
{
"requestNo": "setCreator20210706001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"toUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad",
"tokenIds":["1"],
"ownerUID":"0x42ceddea9c55dcf8087b7d65232cf6f4a8a38ff2621e40443af42bc6b530198e"
}
Request Example
{
"data": {
"requestNo": "setCreator20210706001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"clauseIndex": 0,
"txID": "0xec1700af4420d1aad7360fa4cceb482baec89ccd7bf9f8ae6f738424dede0d1f",
"txStatus": "SUCCESS",
"tokenId": null,
"amount": null,
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210TxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Example
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg
|
string | transaction failure information |
clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
txID | string | blockchain transaction ID |
txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
tokenId | string | here tokenId returns null |
amount | string | here amount returns null |
-
Set token administrator by address
POST vip210/v1/address/setCreator
Set token administrator by address. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the ownerUID field in the request parameters is the UID of the contract administrator account.
2. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
Request Example
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of contract administrator account, start with '0x', 32 bytes, please refer to here |
tokenIds | array[string] | Y | collection of tokenIds |
toAddress | string | Y | address of token administrator target account, start with '0x', 20 bytes |
Request Parameters
{
"requestNo": "setCreatorAddress20210706007",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"toAddress":"0x526d4ccb9e6368f0bc2742a066a87708917aa7a7",
"tokenIds":["2"],
"ownerUID":"0x42ceddea9c55dcf8087b7d65232cf6f4a8a38ff2621e40443af42bc6b530198e"
}
Request Example
{
"data": {
"requestNo": "setCreatorAddress20210706007",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"clauseIndex": 0,
"txID": "0xfc72e2f183f5ec0fad96863819365ba0aed31b61fd4d569b7776bef97dffcb13",
"txStatus": "SUCCESS",
"tokenId": null,
"amount": null,
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210TxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Example
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg
|
string | transaction failure information |
clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
txID | string | blockchain transaction ID |
txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
tokenId | string | here tokenId returns null |
amount | string | here amount returns null |
-
Mint token to account
POST vip210/v1/uid/mintToken
Mint token to account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter ownerUID is the UID of the token administrator account. Please confirm whether you have used Set token administrator interface. If you have not used it, the token administrator account comes from the initialOwnerUID field passed in when creating the token.
2. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of the contract administrator account, start with '0x', 32 bytes, please refer to here |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ toUID | string | Y | UID of the target account, start with '0x', 32 bytes |
└ amount | string | Y | issuance quota, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. Id value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"mintToken20210707002",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"toUID":"0x4ac1f92e49cdd528b441fe619f8478611770fe514d8ee4638f3515f297ea13dd",
"tokenId":"1",
"amount":"100",
"data":"testminttouiddata"
}
],
"ownerUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad"
}
Response Example
{
"data": {
"requestNo": "mintToken20210707002",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0x8dda50b10498124a2915777116157f55e45973bf5dd7f2f78f183248c72eab38",
"txStatus": "SUCCESS",
"tokenId": "1",
"amount": "100"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | issuance quota, consistent with the amount value passed in the request. |
-
Mint token to address
POST vip210/v1/address/mintToken
Mint token to address. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter ownerUID is the UID of the token administrator account. Please confirm whether you have used Set token administrator interface. If you have not used it, the token administrator account comes from the initialOwnerUID field passed in when creating the token.
2. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of token administrator account, start with '0x', 32 bytes, please refer to here |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ toAddress | string | Y | address of the target account, start with '0x', 20 bytes |
└ amount | string | Y | issuance quota, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. Id value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"mintTokenAddress20210707001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"toAddress":"0x2a3981fa91e45bb7a69bb7289b26484e1bd5e1bd",
"tokenId":"12",
"amount":"20000",
"data":"minttoaddressdata"
}
],
"ownerUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad"
}
Response Example
{
"data": {
"requestNo": "mintTokenAddress20210707001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0x8e23c4e199c38ba7f3266c990a9dfe8ebc92adfe2ec181cf87d528f1084d6c2d",
"txStatus": "SUCCESS",
"tokenId": "1",
"amount": "20000"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | issuance quota, consistent with the amount value passed in the request. |
-
Batch mint token to account
POST vip210/v1/uid/batchMintToken
batch mint token to account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter ownerUID is the UID of the token administrator account. Please confirm whether you have used Set token administrator interface. If you have not used it, the token administrator account comes from the initialOwnerUID field passed in when creating the token.
2. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of token administrator account, start with '0x', 32 bytes, please refer to here |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ tokenId | string | Y | tokenId, returned by the create token interface.. |
└ amount | string | Y | issuance quota, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. Id value range is [0,2256-1]. |
toUID | string | Y | UID of the target account, start with '0x', 32 bytes |
data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo": "batchMintToken20210625002",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"tokenId":"4",
"amount":"10000"
},
{
"tokenId":"5",
"amount":"20000"
}
],
"toUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad",
"data":"testbatchMintTokenUIDdata",
"ownerUID":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20"
}
Response Example
{
"data": {
"requestNo": "batchMintToken20210625002",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"clauseIndex": 0,
"txID": "0x2c368e9c805dea5c0ae28dd01b85b7d335fe9c13cfd06a56dc98fb9b57a992a3",
"txStatus": "SUCCESS",
"tokenId": null,
"amount": null,
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210TxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
txID | string | blockchain transaction ID |
txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
tokenId | string | here tokenId returns null |
amount | string | here amount returns null |
-
Batch mint token to address
POST vip210/v1/address/batchMintToken
batch mint token to address. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter ownerUID is the UID of the token administrator account. Please confirm whether you have used Set token administrator interface. If you have not used it, the token administrator account comes from the initialOwnerUID field passed in when creating the token.
2. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of token administrator account, start with '0x', 32 bytes, please refer to here |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ amount | string | Y | issuance quota, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. Id value range is [0,2256-1]. |
toAddress | string | Y | address of the target account, start with '0x', 20 bytes |
data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo": "batchMintTokenAddress20210628002",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":
[
{
"tokenId":"8",
"amount":"1000000"
},
{
"tokenId":"9",
"amount":"1000000"
}
],
"toAddress":"0xbc8100cce9bd8db3db00e9411398388e3c0996c0",
"data":"batchMintTokenAddressdata",
"ownerUID":"0x42ceddea9c55dcf8087b7d65232cf6f4a8a38ff2621e40443af42bc6b530198e"
}
Response Example
{
"data": {
"requestNo": "batchMintTokenAddress20210628002",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"clauseIndex": 0,
"txID": "0x6c57600fc0d85d36423fb04842d9e75afe2c732cf094b36ffe0e91e401b226dd",
"txStatus": "SUCCESS",
"tokenId": null,
"amount": null,
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210TxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
txID | string | blockchain transaction ID |
txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
tokenId | string | here tokenId returns null |
amount | string | here amount returns null |
-
Authorize token transfer by account in batches
POST vip210/v1/uid/approve
Authorize token transfer by account in batches. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
currentOwnerUID | string | Y | UID of current token owner, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ amount | string | Y | authorized quota, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ spenderUID | string | Y | the UID of authorized account, start with '0x', 32 bytes |
Request Example
{
"requestNo":"approveUID20210707008",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"spenderUID":"0xc5009679cdd7d9b6de384f53bbd785a98a5156b7d9de954c32cc0c9535ce9adc",
"tokenId":"11",
"amount":"20"
},
{
"spenderUID":"0xb2a9eefff71c65bc612e06f6ca445544bdcfa1f92a3125d5bb0001f41d9c5946",
"tokenId":"12",
"amount":"30"
}],
"currentOwnerUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad"
}
Response Example
{
"data": {
"requestNo": "approveUID20210707009",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0x51a1d86bf4572414b20a1f8c7315a556eaf38c51be3057d92cb22525bf7f4dcc",
"txStatus": "SUCCESS",
"tokenId": "11",
"amount": "20"
},
{
"clauseIndex": 1,
"txID": "0x51a1d86bf4572414b20a1f8c7315a556eaf38c51be3057d92cb22525bf7f4dcc",
"txStatus": "SUCCESS",
"tokenId": "12",
"amount": "30"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | authorized quota, consistent with the amount value passed in the request. |
-
Authorize token transfer by address in batches
POST vip210/v1/address/approve
Authorize token transfer by address in batches. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
currentOwnerUID | string | Y | UID of current token owner, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ amount | string | Y | authorized quota, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ spenderAddress | string | Y | the address of authorized account, start with '0x', 20 bytes |
Request Example
{
"requestNo":"approveAddress20210707002",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"spenderAddress":"0x800e4a6d3ae03238eb7186a179115e4509ba37f8",
"tokenId":"11",
"amount":"20"
}
],
"currentOwnerUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad"
}
Response Example
{
"data": {
"requestNo": "approveAddress20210707002",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0xfa17f68923f5503db958230213349059fb4301d92a5891c88ba9f868bbf986d0",
"txStatus": "SUCCESS",
"tokenId": "11",
"amount": "20"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | authorized quota, consistent with the amount value passed in the request. |
-
Authorized transfer: from account to account
POST vip210/v1/uid/uid/transferFrom
Authorized transfer: from account to account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
2. Check whether the request parameter delegateUID has been fully authorized by the current token owner. You can use Query whether account A has all the authorizations of account B interface to determine whether the authorized account has been fully authorized. If all authorizations have been obtained, go directly to step 5 to check.
3. Check whether the request parameter delegateUID has been authorized by the current token owner. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota. If it is not 0, it means that the authorized account has been authorized by the token owner.
4. Check whether the amount transferred in the request parameter is not greater than the authorized quota of the authorized account. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota.
5. Check whether the amount transferred in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
delegateUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ fromUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
└ toUID | string | Y | UID of target account, start with '0x', 32 bytes |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ amount | string | Y | number of transfers, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"transferFromUID2UID202100707001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"fromUID":"0x4ac1f92e49cdd528b441fe619f8478611770fe514d8ee4638f3515f297ea13dd",
"toUID":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20",
"tokenId":"11",
"amount":"5",
"data":"transferFromUID2UIDData"
}
],
"delegateUID":"0xc5009679cdd7d9b6de384f53bbd785a98a5156b7d9de954c32cc0c9535ce9adc"
}
Response Example
{
"data": {
"requestNo": "transferFromUID2UID202100707001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0xf77e53d807935bad531a674b4a89656d76fbad9bd002da7f263ba3fcbff873b0",
"txStatus": "SUCCESS",
"tokenId": "11",
"amount": "5"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | number of transfers, consistent with the amount value passed in the request. |
-
Authorized transfer: from account to address
POST vip210/v1/uid/address/transferFrom
Authorized transfer: from account to address. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
2. Check whether the request parameter delegateUID has been fully authorized by the current token owner. You can use Query whether account A has all the authorizations of account B interface to determine whether the authorized account has been fully authorized. If all authorizations have been obtained, go directly to step 5 to check.
3. Check whether the request parameter delegateUID has been authorized by the current token owner. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota. If it is not 0, it means that the authorized account has been authorized by the token owner.
4. Check whether the amount transferred in the request parameter is not greater than the authorized quota of the authorized account. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota.
5. Check whether the amount transferred in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
delegateUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ fromUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
└ toAddress | string | Y | address of target account, start with '0x', 20 bytes |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ amount | string | Y | number of transfers, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"transferFromUID2Adress20210707001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"fromUID":"0x4ac1f92e49cdd528b441fe619f8478611770fe514d8ee4638f3515f297ea13dd",
"toAddress":"0xd2d9c4f4b8dcdc624d37fcee01aaf797ddb7c17f",
"tokenId":"11",
"amount":"5",
"data":"transferFromUID2AddressData"
}
],
"delegateUID":"0xc5009679cdd7d9b6de384f53bbd785a98a5156b7d9de954c32cc0c9535ce9adc"
}
Response Example
{
"data": {
"requestNo": "transferFromUID2Adress20210707001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0xb008a2e0130736df948d51c8eaae4cd5d9f93ca501d685f59c0122e65b8d3624",
"txStatus": "SUCCESS",
"tokenId": "11",
"amount": "5"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | number of transfers, consistent with the amount value passed in the request. |
-
Authorized transfer: from address to account
POST vip210/v1/address/uid/transferFrom
Authorized transfer: from address to account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
2. Check whether the request parameter delegateUID has been fully authorized by the current token owner. You can use Query whether account A has all the authorizations of account B interface to determine whether the authorized account has been fully authorized. If all authorizations have been obtained, go directly to step 5 to check.
3. Check whether the request parameter delegateUID has been authorized by the current token owner. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota. If it is not 0, it means that the authorized account has been authorized by the token owner.
4. Check whether the amount transferred in the request parameter is not greater than the authorized quota of the authorized account. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota.
5. Check whether the amount transferred in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
delegateUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ fromAddress | string | Y | address of authorized account, start with '0x', 20 bytes |
└ toUID | string | Y | UID of target account, start with '0x', 32 bytes |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ amount | string | Y | number of transfers, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"transferFromAdress2UID20210701001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"fromAddress":"0x2a3981fa91e45bb7a69bb7289b26484e1bd5e1bd",
"toUID":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20",
"tokenId":"11",
"amount":"5",
"data":"transferFromUID2AddressData"
}
],
"delegateUID":"0xc5009679cdd7d9b6de384f53bbd785a98a5156b7d9de954c32cc0c9535ce9adc"
}
Response Example
{
"data": {
"requestNo": "transferFromAdress2UID20210701001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0x110c89b00cfa60c09a5cdc2bb5016924ec8ddba1024b7e4fbf761792cc3f82ea",
"txStatus": "SUCCESS",
"tokenId": "11",
"amount": "5"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | number of transfers, consistent with the amount value passed in the request. |
-
Authorized transfer: from address to address
POST vip210/v1/address/address/transferFrom
Authorized transfer: from address to address. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
2. Check whether the request parameter delegateUID has been fully authorized by the current token owner. You can use Query whether account A has all the authorizations of account B interface to determine whether the authorized account has been fully authorized. If all authorizations have been obtained, go directly to step 5 to check.
3. Check whether the request parameter delegateUID has been authorized by the current token owner. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota. If it is not 0, it means that the authorized account has been authorized by the token owner.
4. Check whether the amount transferred in the request parameter is not greater than the authorized quota of the authorized account. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota.
5. Check whether the amount transferred in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
delegateUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ fromAddress | string | Y | address of authorized account, start with '0x', 20 bytes |
└ toAddress | string | Y | address of target account, start with '0x', 20 bytes |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ amount | string | Y | number of transfers, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"transferFromAdress2Address20210707001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"fromAddress":"0x2a3981fa91e45bb7a69bb7289b26484e1bd5e1bd",
"toAddress":"0xd2d9c4f4b8dcdc624d37fcee01aaf797ddb7c17f",
"tokenId":"11",
"amount":"5",
"data":"transferFromUID2AddressData"
}
],
"delegateUID":"0xc5009679cdd7d9b6de384f53bbd785a98a5156b7d9de954c32cc0c9535ce9adc"
}
Response Example
{
"data": {
"requestNo": "transferFromAdress2Address20210707001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0x6c7feafb1fdd4334e830df32d455c76bce6cd90e488a1dbfa67e2e84c716eb79",
"txStatus": "SUCCESS",
"tokenId": "11",
"amount": "5"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | number of transfers, consistent with the amount value passed in the request. |
-
Authorized batch transfer: from account to account
POST vip210/v1/uid/uid/batchTransferFrom
Authorized batch transfer: from account to account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
2. Check whether the request parameter delegateUID has been fully authorized by the current token owner. You can use Query whether account A has all the authorizations of account B interface to determine whether the authorized account has been fully authorized. If all authorizations have been obtained, go directly to step 5 to check.
3. Check whether the request parameter delegateUID has been authorized by the current token owner. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota. If it is not 0, it means that the authorized account has been authorized by the token owner.
4. Check whether the amount transferred in the request parameter is not greater than the authorized quota of the authorized account. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota.
5. Check whether the amount transferred in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
delegateUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ fromUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
└ toUID | string | Y | UID of target account, start with '0x', 32 bytes |
└ tokenIds | array[string] | Y | collection of tokenIds. For each token, it returned by the create token interface. |
└ amounts | array[string] | Y | collection of amounts, which is consistent with tokenId. For each amount, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"batchTransferFromUIDUID20210628001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"fromUID":"0x6471601d37fe28581cad0df823b8d2c14b955020943465fe324cbd2a92584016",
"toUID":"0x4ecac8226b4fc5f129226137336786694a7cc002e8e37cd32ede82196090d252",
"tokenIds":["6","7"],
"amounts":["300","300"],
"data":"batchTransferFromUIDUIDdata1"
},
{
"fromUID":"0x6471601d37fe28581cad0df823b8d2c14b955020943465fe324cbd2a92584016",
"toUID":"0xc767be6eb27bcec39afd6387f020102f27b4115dc0f470e422dcbe05f4df4075",
"tokenIds":["8","9"],
"amounts":["500","500"],
"data":"batchTransferFromUIDUIDdata1"
}
],
"delegateUID":"0x90176ce56db63aeb48e21c68740843287bea5745f34e9ab9879a95e39d6f098a"
}
Response Example
{
"data": {
"requestNo": "batchTransferFromUIDUID20210628001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"tokenIds": null,
"amounts": null,
"clauseIndex": 0,
"txID": "0x3d87f85188bb612e2d78455035b86f44d03baeb7a0eb49942244558f45fc4f2a",
"txStatus": "SUCCESS"
},
{
"tokenIds": null,
"amounts": null,
"clauseIndex": 1,
"txID": "0x3d87f85188bb612e2d78455035b86f44d03baeb7a0eb49942244558f45fc4f2a",
"txStatus": "SUCCESS"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTransferFromResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenIds | array[string] | here tokenIds returns null |
└ amounts | array[string] | here amounts returns null |
-
Authorized batch transfer: from account to address
POST vip210/v1/uid/address/batchTransferFrom
Authorized batch transfer: from account to address. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
2. Check whether the request parameter delegateUID has been fully authorized by the current token owner. You can use Query whether account A has all the authorizations of account B interface to determine whether the authorized account has been fully authorized. If all authorizations have been obtained, go directly to step 5 to check.
3. Check whether the request parameter delegateUID has been authorized by the current token owner. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota. If it is not 0, it means that the authorized account has been authorized by the token owner.
4. Check whether the amount transferred in the request parameter is not greater than the authorized quota of the authorized account. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota.
5. Check whether the amount transferred in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
delegateUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ fromUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
└ toAddress | string | Y | address of target account, start with '0x', 20 bytes |
└ tokenIds | array[string] | Y | collection of tokenIds. For each token, it returned by the create token interface. |
└ amounts | array[string] | Y | collection of amounts, which is consistent with tokenId. For each amount, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"batchTransferFromUIDAddress20210628002",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"fromUID":"0x6471601d37fe28581cad0df823b8d2c14b955020943465fe324cbd2a92584016",
"toAddress":"0x7b540498852dea65816026b98eadb3115f026b64",
"tokenIds":["6","7"],
"amounts":["300","300"],
"data":"batchTransferFromUIDAddressdata1"
},
{
"fromUID":"0x6471601d37fe28581cad0df823b8d2c14b955020943465fe324cbd2a92584016",
"toAddress":"0x2e84c6312c45d3151a19199aa3287e0e545ff9ba",
"tokenIds":["8","9"],
"amounts":["500","500"],
"data":"batchTransferFromUIDAddressdata2"
}
],
"delegateUID":"0x90176ce56db63aeb48e21c68740843287bea5745f34e9ab9879a95e39d6f098a"
}
Response Example
{
{
"data": {
"requestNo": "batchTransferFromUIDAddress20210628002",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"tokenIds": null,
"amounts": null,
"clauseIndex": 0,
"txID": "0xa944c33e4ba83ab193c5e077f045d3801fcd687bc63fd508a7c9757cc40c7f4c",
"txStatus": "SUCCESS"
},
{
"tokenIds": null,
"amounts": null,
"clauseIndex": 1,
"txID": "0xa944c33e4ba83ab193c5e077f045d3801fcd687bc63fd508a7c9757cc40c7f4c",
"txStatus": "SUCCESS"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTransferFromResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenIds | array[string] | here tokenIds returns null |
└ amounts | array[string] | here amounts returns null |
-
Authorized batch transfer: from address to account
POST vip210/v1/address/uid/batchTransferFrom
Authorized batch transfer: from address to account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
2. Check whether the request parameter delegateUID has been fully authorized by the current token owner. You can use Query whether account A has all the authorizations of account B interface to determine whether the authorized account has been fully authorized. If all authorizations have been obtained, go directly to step 5 to check.
3. Check whether the request parameter delegateUID has been authorized by the current token owner. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota. If it is not 0, it means that the authorized account has been authorized by the token owner.
4. Check whether the amount transferred in the request parameter is not greater than the authorized quota of the authorized account. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota.
5. Check whether the amount transferred in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
delegateUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ fromAddress | string | Y | address of authorized account, start with '0x', 20 bytes |
└ toUID | string | Y | UID of target account, start with '0x', 32 bytes |
└ tokenIds | array[string] | Y | collection of tokenIds. For each token, it returned by the create token interface. |
└ amounts | array[string] | Y | collection of amounts, which is consistent with tokenId. For each amount, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"batchTransferFromAddressUID20210628003",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"fromAddress":"0xbc8100cce9bd8db3db00e9411398388e3c0996c0",
"toUID":"0x4ecac8226b4fc5f129226137336786694a7cc002e8e37cd32ede82196090d252",
"tokenIds":["6","7"],
"amounts":["300","300"],
"data":"batchTransferFromAddressUIDdata1"
},
{
"fromAddress":"0xbc8100cce9bd8db3db00e9411398388e3c0996c0",
"toUID":"0xc767be6eb27bcec39afd6387f020102f27b4115dc0f470e422dcbe05f4df4075",
"tokenIds":["8","9"],
"amounts":["500","500"],
"data":"batchTransferFromAddressUIDdata2"
}
],
"delegateUID":"0x90176ce56db63aeb48e21c68740843287bea5745f34e9ab9879a95e39d6f098a"
}
Response Example
{
"data": {
"requestNo": "batchTransferFromAddressUID20210628003",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"tokenIds": null,
"amounts": null,
"clauseIndex": 0,
"txID": "0xd28433d2aef4feb077caed547373b91dc843c3622e210590a21db77135610338",
"txStatus": "SUCCESS"
},
{
"tokenIds": null,
"amounts": null,
"clauseIndex": 1,
"txID": "0xd28433d2aef4feb077caed547373b91dc843c3622e210590a21db77135610338",
"txStatus": "SUCCESS"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTransferFromResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenIds | array[string] | here tokenIds returns null |
└ amounts | array[string] | here amounts returns null |
-
Authorized batch transfer: from address to address
POST vip210/v1/address/address/batchTransferFrom
Authorized batch transfer: from address to address. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
2. Check whether the request parameter delegateUID has been fully authorized by the current token owner. You can use Query whether account A has all the authorizations of account B interface to determine whether the authorized account has been fully authorized. If all authorizations have been obtained, go directly to step 5 to check.
3. Check whether the request parameter delegateUID has been authorized by the current token owner. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota. If it is not 0, it means that the authorized account has been authorized by the token owner.
4. Check whether the amount transferred in the request parameter is not greater than the authorized quota of the authorized account. You can use interface Query authorized transferable quota of account A to account B to query the authorization quota.
5. Check whether the amount transferred in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
delegateUID | string | Y | UID of authorized account, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ fromAddress | string | Y | address of authorized account, start with '0x', 20 bytes |
└ toAddress | string | Y | address of target account, start with '0x', 20 bytes |
└ tokenIds | array[string] | Y | collection of tokenIds. For each token, it returned by the create token interface. |
└ amounts | array[string] | Y | collection of amounts, which is consistent with tokenId. For each amount, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
{
"requestNo":"batchTransferFromAddressAddress20210628004",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"fromAddress":"0xbc8100cce9bd8db3db00e9411398388e3c0996c0",
"toAddress":"0x7b540498852dea65816026b98eadb3115f026b64",
"tokenIds":["6","7"],
"amounts":["300","300"],
"data":"batchTransferFromAddressAddressdata1"
},
{
"fromAddress":"0xbc8100cce9bd8db3db00e9411398388e3c0996c0",
"toAddress":"0x2e84c6312c45d3151a19199aa3287e0e545ff9ba",
"tokenIds":["8","9"],
"amounts":["500","500"],
"data":"batchTransferFromAddressAddressdata2"
}
],
"delegateUID":"0x90176ce56db63aeb48e21c68740843287bea5745f34e9ab9879a95e39d6f098a"
}
}
Response Example
{
"data": {
"requestNo": "batchTransferFromAddressAddress20210628004",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"tokenIds": null,
"amounts": null,
"clauseIndex": 0,
"txID": "0xd28433d2aef4feb077caed547373b91dc843c3622e210590a21db77135610338",
"txStatus": "SUCCESS"
},
{
"tokenIds": null,
"amounts": null,
"clauseIndex": 1,
"txID": "0xd28433d2aef4feb077caed547373b91dc843c3622e210590a21db77135610338",
"txStatus": "SUCCESS"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTransferFromResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenIds | array[string] | here tokenIds returns null |
└ amounts | array[string] | here amounts returns null |
-
Manage all tokens by authorized account
POST vip210/v1/uid/setApprovalForAll
Manage all tokens by authorized account. Please repeat the request until the orderStatus becomes the final status.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
currentOwnerUID | string | Y | UID of current token owner, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ approved | boolean | Y | If approved |
└ delegateUID | string | Y | the UID of authorized account, start with '0x', 32 bytes |
Request Example
{
"requestNo":"setApprovalForAll20210625001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"delegateUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad",
"approved":true
}
],
"currentOwnerUID":"0xc5009679cdd7d9b6de384f53bbd785a98a5156b7d9de954c32cc0c9535ce9adc"
}
Response Example
{
"data": {
"requestNo": "setApprovalForAll20210625001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0x7ee17a3cd60d6d4cf0cb2137b6d08e7d7b7d8f5b26951245f701b2f9ac81d573",
"txStatus": "SUCCESS",
"tokenId": null,
"amount": null
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | here tokenId returns null |
└ amount | string | here amount returns null |
-
Manage all tokens by authorized address
POST vip210/v1/address/setApprovalForAll
Manage all tokens by authorized address. Please repeat the request until the orderStatus becomes the final status.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
currentOwnerUID | string | Y | UID of current token owner, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ approved | boolean | Y | If approved |
└ delegateAddress | string | Y | the address of authorized account, start with '0x', 20 bytes |
Request Example
{
"requestNo":"setApprovalForAll20210628002",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"delegateAddress":"0xac9ad0c997fadfc19820389424bd008da661cd97",
"approved":true
}
],
"currentOwnerUID":"0x6471601d37fe28581cad0df823b8d2c14b955020943465fe324cbd2a92584016"
}
Response Example
{
"data": {
"requestNo": "setApprovalForAll20210628002",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0x16de3626916447c767d8e2daa01dbccabc7ec020116f4d7e132139bd1e3e340d",
"txStatus": "SUCCESS",
"tokenId": null,
"amount": null
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | here tokenId returns null |
└ amount | string | here amount returns null |
-
Burn token of the specified account
POST vip210/v1/burnToken
Burn token of the specified account. Please repeat the request until the orderStatus becomes the final status.
Note: When the smart contract transaction fails, there will be an error message in the errorMsg field of the response result. Please check as follows:
1. Check whether the request parameter tokenId exists in the current smart contract. You can use query token information interface. If the name and symbol in the response parameters are empty, it indicates that there is no tokenId in the current smart contract.
5. Check whether the amount burned in the request parameters is not greater than the balance of the token owner's account. You can use interface Query token balance of the specified account to query the account balance.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
currentOwnerUID | string | Y | UID of current token owner, start with '0x', 32 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
└ amount | string | Y | quantity destroyed, it supports decimal and hexadecimal. If it starts at '0x', it is hexadecimal. The value range is [0,2256-1]. |
└ data | string | N | comment, maximum length is 256 bytes |
Request Example
{
"requestNo":"burnToken20210628002",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"tokenId":"1",
"amount":"100000",
"data":"burnTokendata001"
}],
"ownerUID":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20"
}
Response Example
{
"data": {
"requestNo": "burnToken20210628002",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"list": [
{
"clauseIndex": 0,
"txID": "0x6ca0c38e8b18ea2b0e940ad7e43fe3aa5982d5f551f9598b20ebd35083510c31",
"txStatus": "SUCCESS",
"tokenId": "1",
"amount": "100000"
}
],
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210BatchTxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
+ list | array | return list, the order is the same as request list |
└ clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
└ txID | string | blockchain transaction ID |
└ txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
└ tokenId | string | consistent with the tokenId value passed in |
└ amount | string | quantity destroyed, consistent with the amount value passed in the request. |
-
Query token balance of the specified account
POST vip210/v1/query/uid/balanceOf
Query token balance of the specified account.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
uid | string | Y | queried UID of account,start with '0x', 32 bytes |
tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"uid":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20",
"tokenId":"11"
}
Response Example
{
"data": {
"balance": "100000020",
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210BalanceOfResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
balance | string | balance of token, returns the decimal value |
-
Batch query token balance of accounts
POST vip210/v1/query/uid/balanceOfBatch
Batch query token balance of accounts.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ uid | string | Y | queried UID of account,start with '0x', 32 bytes |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"uid":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20",
"tokenId":"11"
},
{
"uid":"0x4ac1f92e49cdd528b441fe619f8478611770fe514d8ee4638f3515f297ea13dd",
"tokenId":"12"
}
]
}
Response Example
{
"data": {
"balances": [
"100000020",
"10000"
],
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210BalanceOfBatchResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
balances | array[string] | A collection of the number of tokens, in the same order as the request list |
-
Query token balance of the specified address
POST vip210/v1/query/address/balanceOf
Query token balance of the specified address.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
address | string | Y | queried UID of address,start with '0x', 20 bytes |
tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"address":"0x7b540498852dea65816026b98eadb3115f026b64",
"tokenId":"6"
}
Response Example
{
"data": {
"balance": "100001200",
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210BalanceOfResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
balance | string | balance of token, returns the decimal value |
-
Batch query token balance of addresses
POST vip210/v1/query/address/balanceOfBatch
Batch query token balance of addresses.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
+ list | array | Y | request list, the maximum number of lists is 50 |
└ address | string | Y | queried UID of address,start with '0x', 20 bytes |
└ tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"list":[
{
"uid":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20",
"tokenId":"11"
},
{
"uid":"0x4ac1f92e49cdd528b441fe619f8478611770fe514d8ee4638f3515f297ea13dd",
"tokenId":"12"
}
]
}
Response Example
{
"data": {
"balances": [
"100000020",
"10000"
],
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210BalanceOfBatchResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
balances | array[string] | A collection of the number of tokens, in the same order as the request list |
-
Query authorized transferable quota of account A to account B
POST vip210/v1/query/uid/uid/allowance
Query authorized transferable quota of account A to account B.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
tokenOwnerUID | string | Y | UID of current token owner, start with '0x', 32 bytes |
spenderUID | string | Y | the UID of authorized account, start with '0x', 32 bytes |
tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"tokenOwnerUID":"0x4d1ba311b43c25c592973eeafe648aedffd5ef514496adb927c8a9efa5eedb20",
"spenderUID":"0xb2a9eefff71c65bc612e06f6ca445544bdcfa1f92a3125d5bb0001f41d9c5946",
"tokenId":"5"
}
Response Example
{
"data": {
"allowed": "1000",
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210AllowanceResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
allowed | string | authorized issuance quota, returns a decimal value |
-
Query authorized transferable quota of account A to address B
POST vip210/v1/query/uid/address/allowance
Query authorized transferable quota of account A to address B.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
tokenOwnerUID | string | Y | UID of current token owner, start with '0x', 32 bytes |
spenderAddress | string | Y | the address of authorized account, start with '0x', 20 bytes |
tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"tokenOwnerUID":"0x6471601d37fe28581cad0df823b8d2c14b955020943465fe324cbd2a92584016",
"spenderAddress":"0xac9ad0c997fadfc19820389424bd008da661cd97",
"tokenId":"8"
}
Response Example
{
"data": {
"allowed": "100",
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210AllowanceResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
allowed | string | authorized issuance quota, returns a decimal value |
-
Query authorized transferable quota of address A to account B
POST vip210/v1/query/address/uid/allowance
Query authorized transferable quota of address A to account B.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
tokenOwnerAddress | string | Y | address of current token owner, start with '0x', 20 bytes |
spenderUID | string | Y | the UID of authorized account, start with '0x', 32 bytes |
tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"tokenOwnerAddress":"0xbc8100cce9bd8db3db00e9411398388e3c0996c0",
"spenderUID":"0x90176ce56db63aeb48e21c68740843287bea5745f34e9ab9879a95e39d6f098a",
"tokenId":"8"
}
Response Example
{
"data": {
"allowed": "100",
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210AllowanceResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
allowed | string | authorized issuance quota, returns a decimal value |
-
Query authorized transferable quota of address A to address B
POST vip210/v1/query/address/address/allowance
Query authorized transferable quota of address A to address B.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
tokenOwnerAddress | string | Y | the address of current token owner, start with '0x', 20 bytes |
spenderAddress | string | Y | the address of authorized account, start with '0x', 32 bytes |
tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"tokenOwnerAddress":"0xbc8100cce9bd8db3db00e9411398388e3c0996c0",
"spenderAddress":"0xac9ad0c997fadfc19820389424bd008da661cd97",
"tokenId":"8"
}
Response Example
{
"data": {
"allowed": "100",
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210AllowanceResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Parameters
Name | Type | Description |
---|---|---|
allowed | string | authorized issuance quota, returns a decimal value |
-
Query whether account A has all the authorizations of account B
POST vip210/v1/query/uid/uid/isApprovedForAll
Query whether account A has all the authorizations of account B.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of current token owner account,start with '0x',32 bytes |
operatorUID | string | Y | UID of the account being queried, start with '0x', 32 bytes |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"operatorUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad",
"ownerUID":"0xc5009679cdd7d9b6de384f53bbd785a98a5156b7d9de954c32cc0c9535ce9adc"
}
Response Example
{
"data": {
"approved": true,
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210IsApprovedForAllResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
approved | boolean | If approved |
-
Query whether account A has all the authorizations of address B
POST vip210/v1/query/uid/address/isApprovedForAll
Query whether account A has all the authorizations of address B.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerUID | string | Y | UID of current token owner account,start with '0x',32 bytes |
operatorAddress | string | Y | address of the account being queried, start with '0x', 20 bytes |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"operatorAddress":"0xac9ad0c997fadfc19820389424bd008da661cd97",
"ownerUID":"0x6471601d37fe28581cad0df823b8d2c14b955020943465fe324cbd2a92584016"
}
Response Example
{
"data": {
"approved": true,
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210IsApprovedForAllResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
approved | boolean | If approved |
-
Query whether address A has all the authorizations of account B
POST vip210/v1/query/address/uid/isApprovedForAll
Query whether address A has all the authorizations of account B.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerAddress | string | Y | address of current token owner account,start with '0x',20 bytes |
operatorUID | string | Y | UID of the account being queried, start with '0x', 32 bytes |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"operatorUID":"0x90176ce56db63aeb48e21c68740843287bea5745f34e9ab9879a95e39d6f098a",
"ownerAddress":"0x7b540498852dea65816026b98eadb3115f026b64"
}
Response Example
{
"data": {
"approved": true,
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210IsApprovedForAllResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
approved | boolean | If approved |
-
Query whether address A has all the authorizations of address B
POST vip210/v1/query/address/address/isApprovedForAll
Query whether address A has all the authorizations of address B.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
ownerAddress | string | Y | address of current token owner account,start with '0x',20 bytes |
operatorAddress | string | Y | address of the account being queried, start with '0x', 20 bytes |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"operatorUID":"0xb899fc472a3ffd6eaf03d075e1636f7afde9a9396e763c84591acec6881284ad",
"ownerUID":"0xc5009679cdd7d9b6de384f53bbd785a98a5156b7d9de954c32cc0c9535ce9adc"
}
Response Example
{
"data": {
"approved": true,
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210IsApprovedForAllResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
approved | boolean | If approved |
-
Set token base url
POST vip210/v1/setMetadataBaseURI
Set base url for token. Please repeat the request until the orderStatus becomes the final status.
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
requestNo | string | Y | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
baseURI | string | Y | base url |
ownerUID | string | Y | UID of the contract administrator account, start with '0x', 32 bytes, please refer to here |
Request Example
{
"requestNo": "setMetadataBaseURI20210707001",
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"baseURI":"https://www.vechain.com/",
"ownerUID":"0x42ceddea9c55dcf8087b7d65232cf6f4a8a38ff2621e40443af42bc6b530198e"
}
Response Example
{
"data": {
"requestNo": "setMetadataBaseURI20210707001",
"orderStatus": "SUCCESS",
"errorMsg": null,
"errorMsgDetailList": null,
"clauseIndex": 0,
"txID": "0x57e486df164cfd96536f3e1f40f44c56f05425e87d4b45c822213df317ca17f7",
"txStatus": "SUCCESS",
"tokenId": null,
"amount": null,
"@clazz": "com.vechain.tconchain.model.vip210.response.VIP210TxResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
requestNo | string | the maximum length is 50, which is generated by the requester to ensure that the request is idempotent |
orderStatus | string | request status(PROCESSING, SUCCESS, FAILED) |
errorMsg | string | transaction failure information |
clauseIndex | integer | clause index of the blockchain transaction. For clauses, please refer to blockchain Multi-Task Transaction (MTT) |
txID | string | blockchain transaction ID |
txStatus | string | blockchain transaction status, Currently, only SUCCESS is supported. If it fails, the transaction failure information will be returned in the errorMsg field. |
tokenId | string | here tokenId returns null |
amount | string | here amount returns null |
-
Query token url
POST vip210/v1/query/tokenURI
Query token url
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"tokenId":"2"
}
Response Example
{
"data": {
"uri": "https://www.vechain.com/2",
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210TokenURIResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
uri | string | token url |
-
Query token information
POST vip210/v1/query/tokens
Query token information
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
tokenContractAddress | string | Y | smart contract address, start with '0x',20 bytes |
tokenId | string | Y | tokenId, returned by the create token interface. |
Request Example
{
"tokenContractAddress":"0xba11118e4c0fb629c6c1b0d3ac309f1ccaea11d0",
"tokenId":"3"
}
Response Example
{
"data": {
"name": "charlietoken03",
"symbol": "charlie03",
"decimals": 18,
"@clazz": "com.vechain.tconchain.model.vip210.response.QVIP210TokensResponse"
},
"code": 1,
"message": "success",
"codeString": "success"
}
Response Params
Name | Type | Description |
---|---|---|
name | string | token name |
symbol | string | token symbol |
decimals | integer | the decimal precision of token, the value range is [0,255] |
Appendix
Q: How to get the appid and appkey of the project
A: Log in to the system with an administrator account, click Developer Center -> Server Application, and copy APPID and APPIKEY. Each account can support up to 10 pairs of appid and appkey
Q: How to get the UID of the administrator account
A: Log in to the system with an administrator account, click Console -> Business Contract , Owner UID is what you want to get.
Comments
0 comments
Please sign in to leave a comment.