-
Notifications
You must be signed in to change notification settings - Fork 66
sendTransaction
katz edited this page Aug 11, 2021
·
7 revisions
sendTransaction method allows you to send transaction to one or several addresses. Also, it allows you to use a payment_id for a transaction to a single address.
Input:
| Argument | Mandatory | Description | Format | Example |
|---|---|---|---|---|
| addresses | No | Array of strings, where each string is an address to take the funds from | array | See below |
| transfers | Yes | Array that contains: address - string; amount - int64 |
array | "amount": 10000000000, "address": "Kcpg4B4kjwefDeBHGyRdUbgeq5FSYHCof7db8uj6dkFAjkvLSQBc3J7iDSwFx75TUj6MnDYKM5Eu3UmtaAJhvEjdKw1Jkz5" |
| fee | Yes | Transaction fee. Minimal fee in Karbowanec network is .0001 KRB. This parameter should be specified in minimal available KRB units. For example, if your fee is .01 KRB, you should pass it as 10000000000 | uint64 | 1000000 |
| unlockTime | No | Height of the block until which transaction is going to be locked for spending. | uint64 | 0 |
| anonymity | Yes | Privacy level (a discrete number from 1 to infinity). Level 6 and higher is recommended. | uint64 | 6 |
| extra | No | String of variable length. Can contain A-Z, 0-9 characters. | string | |
| paymentId | No | payment_id | string | somePaymentId |
| changeAddress | No | Valid and existing in this container address. | string | KaUMDHkTqSpaDBtK2pZc4MDaveb2DhQfYiUZ2ACy7evsKYYwWefrvhy34RHNChptMPbefT387qpH7MGkWCsdQJAeGpjmhfz |
Note: if container contains only 1 address, changeAddress field can be left empty and the change is going to be sent to this address
Note: if addresses field contains only 1 address, changeAddress can be left empty and the change is going to be sent to this address
Note: in the rest of the cases, changeAddress field is mandatory and must contain an address.
Output:
| Argument | Description | Format | Example |
|---|---|---|---|
| transactionHash | Hash of the sent transaction. | string | 93faedc8b8a80a084a02dfeffd163934746c2163f23a1b6022b32423ec9ae08f |
Input Example:
{
"params":{
"anonymity":0,
"fee":1000000,
"unlockTime":0,
"paymentId":"somePaymentId",
"addresses":[
"ccx7ZR5167Z9AburnDZ3Wu8712yejVd78TCFZKWn1gTidA1hJfwsVWUYLaAhRjv4qwMBzwGakB6VeGWfV9ZZvkAu8j2ehPA3Sv"
],
"transfers":[
{
"amount":20000000,
"address":"ccx7BtV8DUGNZHxW3k9o2kSzAbwSm33sFMRiR1FRDy2wNuWh5bkFvKeYLaAhRjv4qwMBzwGakB6VeGWfV9ZZvkAu8j2ej6aF7R"
},
{
"amount":20000000,
"address":"ccx7V4GWENfe7A38kWpj9EHJ1qHpaztsNNX8x44Kgo6dHKbDwkM6DMnYLaAhRjv4qwMBzwGakB6VeGWfV9ZZvkAu8j2edna4U6"
},
{
"amount":20000000,
"address":"ccx7eDWHZTgTZy7gbNL3vPgMiv9CZ1ckaCEQRiBkQmXVGQxAXVXVPunYLaAhRjv4qwMBzwGakB6VeGWfV9ZZvkAu8j2eg6ijCG"
}
],
"changeAddress":"KbzvFzjQeWCZawinhkDZUKF6pjDv1TLU678poSAEFKWRL3kgWk48sxCN8z6tpfkzMZ82AQyfhiU4uZ66mnU942AHKokr6PG"
},
"jsonrpc":"2.0",
"id":"test",
"method":"sendTransaction"
}
Return value example:
{
"jsonrpc":"2.0",
"id":"test",
"result":{
"transactionHash":"93faedc8b8a80a084a02dfeffd163934746c2163f23a1b6022b32423ec9ae08f"
}
}
© 2018-2023 Conceal Network. All rights reserved.
- Conceal API Reference
- General Methods
- Private Key Methods
- Wallet Address Methods
- Deposit Methods
- Transaction Methods
- Delayed Transaction Methods
- Wallet Export Methods