Developers
  • SWT PROTOCOL
    • Introduction
    • Accounts
    • Transactions
    • Fees
    • Smart Contracts
  • GETTING STARTED
    • Network Node
      • Introduction
      • STEP 1:RENTING A LINUX VPS
      • STEP 2:INSTALLATION OF PUTTY
      • STEP 3:INSTALLATION OF FILEZILLA
      • STEP 4:VPS CONNECTION AND LINUX CONFIGURATION WITH PUTTY (SSH)
      • STEP 5:HOW TO SECURE YOUR VPS
      • STEP 6:USING TMUX THROUGH PUTTY
      • STEP 7:UPLOAD OF THE SWT SOFTWARE WITH FILEZILLA
      • STEP 8:EXTRACT THE SWT SOFTWARE FOLDER
      • STEP 9:RUNNING THE SWT NODE THROUGH TMUX
      • STEP 10:RUNNING THE MONITORING TOOLS
  • API REFERENCE
    • Apache Thrift API
      • Transactions
      • Blocks
      • Smart contract
      • Tokens
      • Wallets
      • Sync info
      • Data structures
    • REST API
      • GetBlocks()
      • GetNodeInfo()
      • GetBalance()
      • GetWalletInfo()
      • GetTokenBalance()
      • GetTransactionsByWallet()
      • GetTransactionInfo()
      • GetEstimatedFee()
      • GetContractByAddress()
      • GetContractFromTransaction()
      • GetContractMethods()
      • ContractValidation()
      • ContractCall()
      • TransactionPack()
      • TransactionExec()
  • SMART CONTRACTS
    • Creating "Hello-world" Smart Contract
    • Smart Contract Methods
    • Smart Contract Standarts
      • Token Smart Contract
      • Escrow Smart Contract
      • Stable coin Token
  • HOW TO REST API
    • Introduction
    • Retrieve a balance from the blockchain
    • Request a specific transaction from the blockchain
    • Sending Transactions to the SWT Blockchain
    • Validating and deploying a Smart Contract with REST API
Powered by GitBook
On this page
  • TokenBalancesGet()
  • TokenTransfersGet()
  • TokenTransferGet()
  • TokenTransfersListGet()
  • TokenWalletTransfersGet()
  • TokenTransactionsGet()
  • TokenInfoGet()
  • TokenHoldersGet()
  • TokensListGet()
  1. API REFERENCE
  2. Apache Thrift API

Tokens

Tokens are a special type of smart contracts that implement certain methods that allow them to be used as digital coins. This section contains a description of the methods of tokens of the SWT standar

TokenBalancesGet()

returns the balance of tokens for an account with a public key address

TokenBalancesResult TokenBalancesGet(1:general.Address address)

TokenTransfersGet()

returns translations for a given token address offset - offset from the end of the transfer list to the beginning, limit - the number of transfers to be returned

TokenTransfersResult TokenTransfersGet(1:general.Address token, 2:i64 offset, 3:i64 limit)

TokenTransferGet()

returns transfers for the given TransactionId and Address token

TokenTransfersResult TokenTransferGet(1:general.Address token, 2:TransactionId id)

TokenTransfersListGet()

Returns a list of token transfers, starting at offset offset in the amount of limit. The countdown goes from the end of the blockchain to the beginning

TokenTransfersResult TokenTransfersListGet(1:i64 offset, 2:i64 limit)

TokenWalletTransfersGet()

Returns a list of token transfers for the address wallet, starting at offset offset in the amount of limit. The countdown goes from the end of the blockchain to the beginning.

TokenTransfersResult TokenWalletTransfersGet(1:general.Address token, 2:general.Address address, 3:i64 offset, 4:i64 limit)

TokenTransactionsGet()

Returns a list of transactions for the token starting at offset offset in the amount of limit. The countdown goes from the end of the blockchain to the beginning.

TokenTransactionsResult TokenTransactionsGet(1:general.Address token, 2:i64 offset, 3:i64 limit)

TokenInfoGet()

returns extended token information

TokenInfoResult TokenInfoGet(1:general.Address token)

TokenHoldersGet()

returns a list of holders for a given token

TokenHoldersResult TokenHoldersGet(1:general.Address token, 2:i64 offset, 3:i64 limit, 4:TokenHoldersSortField order, 5:bool desc)

TokensListGet()

returns a list of tokens in the system starting from offset in the amount of limit

TokensListResult TokensListGet(1:i64 offset, 2:i64 limit, 3:TokensListSortField order, 4:bool desc, 5: TokenFilters filters)

PreviousSmart contractNextWallets

Last updated 1 year ago