Execute a nano contract method.
POSThttps://localhost:8000/wallet/nano-contracts/execute
Execute a nano contract method.
Request
Header Parameters
x-wallet-id stringrequired
Define the key of the corresponding wallet it will be executed the request.
- application/json
Body
required
Data to execute the nano contract method.
nc_id stringrequired
ID of the nano contract that will have the method executed.
method stringrequired
Method to execute in the nano contract object.
address stringrequired
Address caller that will sign the nano contract transaction.
data
object
required
Responses
- 200
Transaction for the nano contract method.
- application/json
- Schema
- success
- wallet-not-ready
- no-wallet-id
- invalid-wallet-id
Schema
any
Success
{
"success": true,
"count": 100,
"history": {
"hash": "5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a",
"nonce": 0,
"timestamp": 1572636346,
"version": 4,
"weight": 1,
"signal_bits": 0,
"parents": [
"1234",
"5678"
],
"inputs": [],
"outputs": [],
"metadata": {
"hash": "5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a",
"spent_outputs": [],
"received_by": [],
"children": [],
"conflict_with": [],
"voided_by": [],
"twins": [],
"accumulated_weight": 1,
"score": 0,
"height": 0,
"min_height": 0,
"feature_activation_bit_counts": null,
"first_block": null,
"validation": "full"
},
"tokens": [],
"nc_id": "5c02adea056d7b43e83171a0e2d226d564c791d583b32e9a404ef53a2e1b363a",
"nc_method": "method_name",
"nc_args": "0004313233340001000004654d8749",
"nc_pubkey": "033f5d238afaa9e2218d05dd7fa50eb6f9e55431e6359e04b861cd991ae24dc655"
}
}
Wallet is not ready yet
{
"success": false,
"message": "Wallet is not ready.",
"state": 1
}
No wallet id parameter
{
"success": false,
"message": "Parameter 'wallet-id' is required."
}
Wallet id parameter is invalid
{
"success": false,
"message": "Invalid wallet-id parameter."
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
ResponseClear