Methods
# static claimTextcoin(mnemonic, addressopt) → {claimtextcoinResponse}
Claim the textcoin.
If address is invalid, then returns "invalid address".
If address is invalid, then returns "invalid address".
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
mnemonic |
string
|
textcoin words | |
address |
string
|
<optional> |
wallet address to receive funds |
unit ID and asset
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"claimtextcoin", "params":{mnemonic: "gym-cruise-upset-license-scan-viable-diary-release-corn-legal-bronze-mosquito"} }' http://127.0.0.1:6332 | json_pp
# static getAddresses(typeopt, reverseopt, limitopt, verboseopt) → {Array.<getaddressesResponse>}
Returns the list of addresses for the whole wallet.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string
|
<optional> |
must be: "deposit", "change", "shared", "textcoin", null - shows both deposit and change by default |
reverse |
string
|
boolean
|
<optional> |
"reverse" by default |
limit |
number
|
string
|
<optional> |
100 by default |
verbose |
string
|
boolean
|
<optional> |
off by default, includes is_definition_public info when "verbose" |
list of addresses
Array.<getaddressesResponse>
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"getaddresses", "params":{} }' http://127.0.0.1:6332 | json_pp
# static getBalance(addressopt, assetopt) → {balanceResponse}
Returns address balance(stable and pending).
If address is invalid, then returns "invalid address".
If your wallet doesn`t own the address, then returns "address not found".
If no address supplied, returns wallet balance(stable and pending).
If address is invalid, then returns "invalid address".
If your wallet doesn`t own the address, then returns "address not found".
If no address supplied, returns wallet balance(stable and pending).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
address |
string
|
<optional> |
|
asset |
string
|
<optional> |
balance
Examples
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"getbalance", "params":{} }' http://127.0.0.1:6332 | json_pp
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"getbalance", "params":["QZEM3UWTG5MPKYZYRMUZLNLX5AL437O3"] }' http://127.0.0.1:6332 | json_pp
# static getConnectionCount() → {number}
Returns the number of connections to other nodes.
response
number
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"getconnectioncount", "params":{} }' http://127.0.0.1:6332 | json_pp
# static getInfo() → {getInfoResponse}
Returns information about the current state.
Response
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"getinfo", "params":{} }' http://127.0.0.1:6332 | json_pp
# static getMainBalance() → {balanceResponse}
Returns wallet balance(stable and pending) without commissions earned from headers and witnessing.
balance
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"getmainbalance", "params":{} }' http://127.0.0.1:6332 | json_pp
# static getNetworkInfo() → {getNetworkInfoResponse}
Returns information about the node's connection to the network.
Response
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"getnetworkinfo", "params":{} }' http://127.0.0.1:6332 | json_pp
# static getNewAddress() → {string}
Creates and returns new wallet address.
address
string
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"getnewaddress", "params":{} }' http://127.0.0.1:6332 | json_pp
# static getTransaction(unit, verboseopt, assetopt) → {gettransactionResponse}
Returns transaction by unit ID.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
unit |
string
|
transaction unit ID | |
verbose |
boolean
|
string
|
<optional> |
includes unit definition if "verbose" is second parameter |
asset |
string
|
<optional> |
asset ID |
Response
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"gettransaction", "params":["vuudtbL5ASwr0LJZ9tuV4S0j/lIsotJCKifphvGATmU=", true] }' http://127.0.0.1:6332 | json_pp
# static listTransactions(addressopt, since_mciopt, unitopt, assetopt) → {Array.<gettransactionResponse>}
Returns transaction list.
If address is invalid, then returns "invalid address".
If no address supplied, returns wallet transaction list.
If address is invalid, then returns "invalid address".
If no address supplied, returns wallet transaction list.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
address |
string
|
<optional> |
optional |
since_mci |
string
|
<optional> |
optional, counts only if no address |
unit |
string
|
<optional> |
optional, counts only if no address |
asset |
string
|
<optional> |
optional, counts only if no address |
Response
Array.<gettransactionResponse>
Examples
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"listtransactions", "params":{"since_mci": 1234} }' http://127.0.0.1:6332 | json_pp
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"listtransactions", "params":["QZEM3UWTG5MPKYZYRMUZLNLX5AL437O3"] }' http://127.0.0.1:6332 | json_pp
# static sendFrom(from_address, to_address, amount, assetopt) → {string}
Send funds from address to address, keeping change to sending address.
If eiher addresses are invalid, then returns "invalid address" error.
If your wallet doesn`t own the address, then returns "address not found".
Bytes payment can have amount as 'all', other assets must specify exact amount.
If eiher addresses are invalid, then returns "invalid address" error.
If your wallet doesn`t own the address, then returns "address not found".
Bytes payment can have amount as 'all', other assets must specify exact amount.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
from_address |
string
|
wallet address | |
to_address |
string
|
wallet address | |
amount |
number
|
string
|
positive integer or 'all' (for Bytes only) | |
asset |
string
|
<optional> |
asset ID |
unit ID
string
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"sendfrom", "params":{"from_address":"BVVJ2K7ENPZZ3VYZFWQWK7ISPCATFIW3", "to_address":"SNYRRHTIWDVJHSKE5BUIS3HWXKBN57JJ", "amount:"1000} }' http://127.0.0.1:6332 | json_pp
# static sendToAddress(address, amount, assetopt) → {string}
Send funds to address.
If address is invalid, then returns "invalid address".
If address is invalid, then returns "invalid address".
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
address |
string
|
wallet address | |
amount |
number
|
string
|
positive integer | |
asset |
string
|
<optional> |
asset ID |
unit ID
string
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"sendtoaddress", "params":["BVVJ2K7ENPZZ3VYZFWQWK7ISPCATFIW3", 1000] }' http://127.0.0.1:6332 | json_pp
# static signMessage(address, message) → {string}
Signs a message with address.
If address is invalid, then returns "invalid address".
If your wallet doesn`t own the address, then returns "address not found".
If address is invalid, then returns "invalid address".
If your wallet doesn`t own the address, then returns "address not found".
Parameters:
Name | Type | Description |
---|---|---|
address |
string
|
wallet that signs the message |
message |
string
|
object
|
message to be signed |
base64 encoded signature
string
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"signmessage", "params":["QZEM3UWTG5MPKYZYRMUZLNLX5AL437O3", "Let there be light!"] }' http://127.0.0.1:6332 | json_pp
# static validateAddress(address) → {boolean}
Validates address.
Parameters:
Name | Type | Description |
---|---|---|
address |
string
|
is_valid
boolean
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"validateaddress", "params":["QZEM3UWTG5MPKYZYRMUZLNLX5AL437O3"] }' http://127.0.0.1:6332 | json_pp
# static verifyMessage(addressopt, signature, messageopt) → {verifymessageResponse}
Verifies signed message.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
address |
string
|
<optional> |
wallet that signed the message (first param can be null) |
signature |
string
|
base64 encoded signature | |
message |
string
|
object
|
<optional> |
the message that was signed |
objSignedMessage
Example
$ curl -s --data '{"jsonrpc":"2.0", "id":1, "method":"verifymessage", "params":["QZEM3UWTG5MPKYZYRMUZLNLX5AL437O3", "TGV0IHRoZXJlIGJlIGxpZ2h0IQ==", "Let there be light!"] }' http://127.0.0.1:6332 | json_pp