dag_getMetagraphTransaction

Returns information about a transaction by hash and metagraph address. If the transaction object is returned, the transaction was included in a block and lives in the metagraph.

Parameters

Name
Type
Description

Data

Object<TransactionParams>

Transaction info object

TransactionParams

type TransactionParams = {
  metagraphAddress: String; // Metagraph address
  hash: String; // Hash of the transaction
};

Return Type

Transaction | null - Transaction object or null if not found.

Transaction

type Transaction = {
  hash: String<Hash>; // Hash of the transaction
  amount: Number; // Amount sent
  source: Address; // Address of the sender
  destination: Address; // Address of the receiver
  fee: Number; // Fee sent
  parent: {
    hash: String<Hash>; // Hash of the parent transaction
    ordinal: Number; // Ordinal of the parent transaction
  };
  blockHash: String<Hash>; // Hash of the block
  snapshotHash: String<Hash>; // Hash of the snapshot
  snapshotOrdinal: Number; // Ordinal of the snapshot
  transactionOriginal: {
    value: {
      source: Address; // Address of the sender
      destination: Address; // Address of the receiver
      amount: Number; // Amount sent
      fee: Number; // Fee sent
      parent: {
        hash: String<Hash>; // Hash of the parent transaction
        ordinal: Number; // Ordinal of the parent transaction
      };
      salt: BigNumber | String; // Salt
    };
    proofs: Proof[]; // Proofs
  };
  timestamp: String; // Timestamp
};

Proof

Example

Last updated

Was this helpful?