Get transaction - Bytecoin RPC Wallet API

From Bytecoin Wiki
Jump to: navigation, search

getTransaction() method returns information about a particular transaction.

Transaction consists of transfers. Transfer is an amount-address pair. There could be several transfers in a single transaction.


Input:

Argument Mandatory Description Format Example
transactionHash Yes Hash of the requested transaction string example


Output:

Argument Description Format Example
transaction Contains:
  • transactionHash - string - hash of the transaction
  • blockIndex - uint32 - number of the block that contains a transaction (optional)
  • timestamp - uint64 - timestamp of the transaction (optional)
  • isBase - boolean - shows if the transaction is a coinbase transaction or not
  • unlockTime - uint64 - height of the block when transaction is going to be available for spending
  • amount - int64 - amount of the transaction
  • fee - uint64- transaction fee
  • extra - string - ?
  • paymentId - string - payment_id of the transaction (optional)
  • transfers - array - contains
    • address - string
    • amount - int64
array See below


Input example:

{  
  'params':{  
     'transactionHash':'92423b0857d36bd172b3f2effbd47ea477bfe0618a50c29d475542c6d5d1b835'
  },
  'jsonrpc':'2.0',
  'id':'test',
  'method':'getTransaction'
}

Output example:

{  
  'jsonrpc':'2.0',
  'id':'test',
  'result':{  
     'transaction':{  
        'fee':1000000,
        'extra':'0130b4472974f2deb9fae7d8fd6602b26396379f3fa05cca2430e10e9e60179f42',
        'timestamp':0,
        'blockIndex':4294967295,
        'state':0,
        'transactionHash':'92423b0857d36bd172b3f2effbd47ea477bfe0618a50c29d475542c6d5d1b835',
        'amount':-1703701,
        'unlockTime':0,
        'transfers':[  
           {  
              'amount':123456,
              'type':0,
              'address':'25AqTidmdu1awhLZPEUkumZEnM8Rt1fNsbpdRwEGNeLpDDfc1WW9RP6QsdENfxafTz4qE8vThbv413nXhs6WAzYeKBtgA98'
           },
           {  
              'amount':234567,
              'type':0,
              'address':'278g3wNw5W48DeGbjwxkW3XauBip64uYKS9eFveUHBfdRAG3dYHPZvqXy5BWbfuKEtWZ86PJZdRacAgr1x3gtP5nLyGcVt8'
           },
           {  
              'amount':345678,
              'type':0,
              'address':'2AtjUXGmhP6CmbRxCtBESR4MjSGiWCQUTPCdsDpw72Co2pwzZT7rjnaBNRCSFCEygjNo5oe8mHyXU4Eip8szu4ZnAFyPW1a'
           }
        ],
        'paymentId':,
        'isBase':False
     }
  }
}
Personal tools
Namespaces

Variants
Actions
Navigation
Tools