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
  • GetLastHash()
  • PoolListGetStable()
  • PoolListGet()
  • PoolInfoGet()
  • PoolTransactionsGet()
  • StatsGet()
  1. API REFERENCE
  2. Apache Thrift API

Blocks

Below are the SWT Thrift API methods that allow you to extract information about blocks from the SWT blockchain

GetLastHash()

returns the hash of the last block.

PoolHash GetLastHash()

PoolListGetStable()

returns a list of blocks starting with sequence in the amount of limit.

PoolListGetResult PoolListGetStable(1:i64 sequence, 2:i64 limit)

PoolListGet()

returns a list of blocks starting from the last-offset in the amount of limit

PoolListGetResult PoolListGet(1:i64 offset, 2:i64 limit)

PoolInfoGet()

returns information about a block

PoolInfoGetResult PoolInfoGet(1:i64 sequence, 2:i64 index)

PoolTransactionsGet()

Get transactions from exactly hash pool, skipping offset and retrieving at most limit

PoolTransactionsGetResult PoolTransactionsGet(1:i64 sequence, 2:i64 offset, 3:i64 limit)

StatsGet()

returns statistics on the blockchain

StatsGetResult StatsGet()

PreviousTransactionsNextSmart contract

Last updated 1 year ago