Dev:API - Finance: Difference between revisions

From Nexus Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 58: Line 58:
| transactions || List all transactions that modified specified object || account, trust, token
| transactions || List all transactions that modified specified object || account, trust, token
|}
|}
== Verbs ==
=== burn ===
This method can be used to take tokens permanently out of the current supply in a process commonly known as "burning". The method will debit a token account and send the tokens back to the token address. However the transaction contains a condition that will always evaluate to false, guaranteeing that the debit cannot be credited by the token issuer nor the sender. The result is that the amount burned will always appear in the "pending" balance of the token.
finance/burn/account
This command only supports the account noun.

Revision as of 18:00, 6 October 2024

The Finance API provides methods for sending and receiving NXS or other tokens between users / accounts, creating accounts, and managing staking. The full supported endpoint of the finance URI is as follows:

finance/verb/noun/filter/operator

Minimum required components of the URI:

finance/verb/noun

Direct Endpoints

The following commands are direct endpoints not using the supported nouns and verbs:

finance/get/balances
finance/get/stakeinfo
finance/set/stake
finance/void/transaction
finance/migrate/accounts

Supported Nouns

The following nouns are supported for this API command-set:

Noun Description
account An object register containing a token-id and balance
any An object selection noun allowing mixed accounts of different tokens
all An object selection noun to collect all accounts for given token type
token An object register containing a token-id, balance, supply, and decimals
trust An object register containing a token-id, balance, and trust

Supported Verbs

The following verbs are currently supported by this command-set:

Verb Description Nouns
burn Remove a given token from circulation account
create Generate a new object of supported type account, token
credit Claim funds issued to account from debit account, any, token
debit Issue funds from a supported type account, any, token
get Get object of a supported type account, trust, token
history Generate the history of all last states account, trust, token
list List all objects owned by a given user account, trust, token
transactions List all transactions that modified specified object account, trust, token

Verbs

burn

This method can be used to take tokens permanently out of the current supply in a process commonly known as "burning". The method will debit a token account and send the tokens back to the token address. However the transaction contains a condition that will always evaluate to false, guaranteeing that the debit cannot be credited by the token issuer nor the sender. The result is that the amount burned will always appear in the "pending" balance of the token.

finance/burn/account

This command only supports the account noun.