Prizm Space
  • Prizm GitBook
  • Whitepaper
    • Introduction
    • Review
    • Core Technologies
    • POS in Prizm
    • Comparsion with Peercoin
    • Tokens
    • Network node
    • Blocks
    • Forging
    • Forging Algorithm
    • Paramining
    • Paramining options
    • Prizm Accounts
    • WALLET.DAT
    • Basics of Prizm Cryptography
    • Key Features
    • Problems
    • Application
    • Prizm Solutions
  • Prizm API
    • Description
    • General Notes
    • Create Transaction
    • Account Operations
    • Arbitrary Message System Operations
    • Block Operations
    • Forging Operations
    • Hallmark Operations
    • Networking Operations
    • Server Information Operations
    • Token Operations
    • Transaction Operations
    • Utilities
    • Debug Operations
    • Prizm API Examples
  • Roadmap
  • Prizm Devs
  • Latest News
  • Community
  • Downloads
  • Guidelines
    • Video
    • Articles
      • How can I connect to my node from another device?
      • How to create Prizm Wallet
      • How to install Prizm Core
      • Prizm Integration
  • F.A.Q
Powered by GitBook
On this page
  • Broadcast Transaction
  • Calculate Full Hash
  • Get Expected Transactions
  • Get Referencing Transactions
  • Get Transaction
  • Get Transaction Bytes
  • Parse Transaction
  • Retrieve Pruned Transaction
  • Send Transaction
  • Sign Transaction

Was this helpful?

  1. Prizm API

Transaction Operations

PreviousToken OperationsNextUtilities

Last updated 4 years ago

Was this helpful?

Broadcast Transaction

Broadcast a transaction to the network. POST only.

Request:

  • requestType is broadcastTransaction

  • transactionBytes is the bytecode of a signed transaction (optional)

  • transactionJSON is the transaction object (optional if transactionBytes provided)

  • prunableAttachmentJSON is the attachment object embedded in transactionJSON containing a prunable message (required if transactionJSON not provided because transactionBytes never includes prunable data)

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)

  • fullHash (S) is the full hash of the signed transaction

  • transaction (S) is the transaction ID

Example: Refer to example.

Calculate Full Hash

Calculate the full hash of a transaction.

Request:

  • requestType is calculateFullHash

  • unsignedTransactionJSON is the unsigned transaction JSON object (optional)

  • unsignedTransactionBytes are the unsigned bytes of a transaction (optional if unsignedTransactionJSON is provided)

  • signatureHash is a SHA-256 hash of the transaction signature

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)

  • fullHash (S) is the full hash of the signed transaction

Get Expected Transactions

Returns the non-phased unconfirmed transactions expected to be included in the next block (only).

Request:

  • requestType is getExpectedTransactions

  • account is one account ID (optional)

  • account is one account ID (optional)

  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)

  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)

Get Referencing Transactions

Gets the transactions referencing a given transaction id.

Request:

  • requestType is getReferencingTransactions

  • transaction is one transaction ID

  • firstIndex is a zero-based index to the first block ID to retrieve (optional)

  • lastIndex is a zero-based index to the last block ID to retrieve (optional)

  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)

  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)

Get Transaction

Get a transaction object given a transaction ID.

Request:

  • requestType is getTransaction

  • transaction is the transaction ID (optional)

  • fullHash is the full hash of the transaction (optional if transaction ID is provided)

  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)

  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • sender (S) is the account ID of the sender

  • senderRS (S) is the Reed-Solomon address of the sender

  • feeNQT (S) is the fee (in NQT) of the transaction

  • amountNQT (S) is the amount (in NQT) of the transaction

  • transactionIndex (N) is a zero-based index giving the order of the transaction in its block

  • timestamp (N) is the time (in seconds since the genesis block) of the transaction

  • referencedTransactionFullHash (S) is the full hash of a transaction referenced by this one, omitted if no previous transaction is referenced

  • confirmations (N) is the number of transaction confirmations

  • block (S) is the ID of the block containing the transaction

  • blockTimestamp (N) is the timestamp (in seconds since the genesis block) of the block

  • height (N) is the height of the block in the blockchain

  • senderPublicKey (S) is the public key of the sending account for the transaction

  • deadline (N) is the deadline (in minutes) for the transaction to be confirmed

  • signature (S) is the digital signature of the transaction

  • recipient (S) is the account number of the recipient, if applicable

  • recipientRS (S) is the Reed-Solomon address of the recipient, if applicable

  • fullHash (S) is the full hash of the signed transaction

  • signatureHash (S) is a SHA-256 hash of the transaction signature

  • transaction (S) is the transaction ID

  • version (N) is the transaction version number

  • ecBlockId (N) is the economic clustering block ID

  • ecBlockHeight (N) is the economic clustering block height

  • attachment (O) is an object containing any additional data needed for the transaction, if applicable

  • lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)

  • requestProcessingTime (N) is the API request processing time (in millisec)

Note: The block, blockTimestamp and confirmations fields are omitted for unconfirmed transactions. Double-spending transactions are not retrieved.

Get Transaction Bytes

Get the bytecode of a transaction.

Request:

  • requestType is getTransactionBytes

  • transaction is a transaction ID

  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)

  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • confirmations (N) is the number of transaction confirmations

  • transactionBytes (S) are the bytes contained in the transaction

  • unsignedTransactionBytes (S) are the unsigned bytes contained in the transaction

  • prunableAttachmentJSON (O) is the prunable attachment JSON object, if applicable, because transactionBytes never includes prunable data

  • lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)

  • requestProcessingTime (N) is the API request processing time (in millisec)

Parse Transaction

Get a transaction object given a (signed or unsigned) transaction bytecode, or re-parse a transaction object. Verify the signature.

Request:

  • requestType is parseTransaction

  • transactionBytes is the signed or unsigned bytecode of the transaction (optional)

  • transactionJSON is the transaction object (optional if transactionBytes is included)

  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)

  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

  • verify (B) is true if the signature is verified, false otherwise

Retrieve Pruned Transaction

Force retrieval of the prunable data for a given transaction, even if past the configured PRIZM.maxPrunableLifetime.

Request:

  • requestType is retrievePrunedTransaction

  • transaction is transaction ID

Send Transaction

It broadcasts a transaction to the network without validating it, without re-broadcasting it and without adding it locally as unconfirmed transaction. Specially intended for roaming or light clients to send transactions to remote peers. POST only.

Request:

  • requestType is sendTransaction

  • transactionBytes is the bytecode of a signed transaction (optional)

  • transactionJSON is the transaction object (optional if transactionBytes provided)

  • prunableAttachmentJSON is the attachment object embedded in transactionJSON containing a prunable message (required if transactionJSON not provided because transactionBytes never includes prunable data)

  • adminPassword is a string with the admin password (optional)

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)

  • fullHash (S) is the full hash of the signed transaction

  • transaction (S) is the transaction ID

Sign Transaction

Calculates the full hash, signature hash, and transaction ID of an unsigned transaction.

Request:

  • requestType is signTransaction

  • unsignedTransactionJSON is the transactionJSON field of the transaction, without a signature subfield

  • unsignedTransactionBytes is the unsignedTransactionBytes field of the transaction (optional, if unsignedTransactionJSON provided)

  • prunableAttachmentJSON is a prunable attachment JSON object, if applicable, because unsignedTransactionBytes never includes prunable data (optional if the transaction has already been broadcast and the prunable message can still be retrieved from the database)

  • secretPhrase is the secret passphrase of the signing account

  • validate is false to skip validation of the transaction bytes being signed (useful on nodes where the full blockchain is not downloaded)

  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)

  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • signatureHash (S) is a SHA-256 hash of the transaction signature, used in escrow transactions

  • verify (B) is true the signature is verified, false if not

  • transactionJSON (O) is the signed transaction JSON object

  • transactionBytes (S) are the signed transaction bytes

  • fullHash (S) is the full hash of the signed transaction

  • prunableAttachmentJSON (O) is the prunable attachment JSON object, if applicable, because transactionBytes never includes prunable data

  • transaction (S) is the transaction ID, derived from the fullHash

  • lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)

  • requestProcessingTime (N) is the API request processing time (in millisec)

Example: Refer to example.

expectedTransactions (A) is an array of expected transactions (refer to for details)

Example: Refer to example.

transactions (A) is an array of transactions (refer to for details)

Example: Refer to example.

subtype (N) is the transaction subtype (refer to for a current list of subtypes)

type (N) is the transaction type (refer to for a current list of types)

Example: Refer to example.

Example: Refer to example.

Response: Refer to for additional fields.

Example: Refer to example.

Response: Refer to for fields.

Example: Refer to example.

Example: Refer to example.

Example: Refer to example.

Retrieve Pruned Transaction
Broadcast Transaction
Calculate Full Hash
Get Transaction
Get Expected Transactions
Get Transaction
Get Referencing Transactions
Get Constants
Get Constants
Get Transaction
Get Transaction Bytes
Get Transaction
Parse Transaction
Get Transaction
Send Transaction
Sign Transaction