Constellation Network
IntroductionFundamentalsFor DevelopersNode Validators
  • Index
  • Guide
    • Introduction
    • Provider Activation
    • Sending RPC Requests
    • Signing Data
    • Supported Connectors
    • Using External Libraries
  • API Reference
    • Overview
    • Wallet provider API
      • Overview
      • errorTypes
      • version
      • getProvider()
  • Chain Provider API
    • Overview
    • activated
    • chain
    • version
    • on()
    • removeListener()
    • async activate()
    • async onAsync()
    • async removeListenerAsync()
    • async request()
  • Constellation RPC API
    • Overview
    • dag_accounts
    • dag_chainId
    • dag_getBalance
    • dag_getMetagraphBalance
    • dag_getMetagraphPendingTransaction
    • dag_getMetagraphTransaction
    • dag_getPendingTransaction
    • dag_getPublicKey
    • dag_getTransaction
    • dag_requestAccounts
    • dag_sendMetagraphTransaction
    • dag_sendMetagraphDataTransaction
    • dag_signMetagraphDataTransaction
    • dag_sendTransaction
    • dag_signData
    • dag_signMessage
    • wallet_watchAsset
    • dag_delegatedStake
    • dag_withdrawDelegatedStake
    • dag_allowSpend
    • dag_tokenLock
  • Ethereum RPC API
    • Overview
    • eth_accounts
    • eth_blockNumber
    • eth_call
    • eth_chainId
    • eth_estimateGas
    • eth_gasPrice
    • eth_getBalance
    • eth_getBlockByHash
    • eth_getBlockByNumber
    • eth_getBlockTransactionCountByHash
    • eth_getBlockTransactionCountByNumber
    • eth_getCode
    • eth_getFilterChanges
    • eth_getFilterLogs
    • eth_getLogs
    • eth_getStorageAt
    • eth_getTransactionByBlockHashAndIndex
    • eth_getTransactionByBlockNumberAndIndex
    • eth_getTransactionByHash
    • eth_getTransactionCount
    • eth_getTransactionReceipt
    • eth_getUncleByBlockHashAndIndex
    • eth_getUncleByBlockNumberAndIndex
    • eth_getUncleCountByBlockHash
    • eth_getUncleCountByBlockNumber
    • eth_newBlockFilter
    • eth_newFilter
    • eth_protocolVersion
    • eth_requestAccounts
    • eth_sendTransaction
    • eth_signTypedData
    • eth_signTypedData_v4
    • eth_uninstallFilter
    • net_version
    • personal_sign
    • web3_sha3
  • Resources
    • Stargazer Github
    • Stargazer Connector Github
    • Stargazer Demos Github
    • Stargazer Chrome
    • Stargazer Android
    • Stargazer IOS
    • EIP-1193
Powered by GitBook

Main

  • Website
  • Get DAG
  • Explore Projects
  • Partners

Socials

  • Telegram
  • Discord
  • X (Twitter)

Tools

  • Wallet
  • DAG Explorer
  • Coingecko

© 2025 CONSTELLATION NETWORK

On this page

Was this helpful?

Export as PDF
  1. Constellation RPC API

dag_getTransaction

Previousdag_getPublicKeyNextdag_requestAccounts

Last updated 2 months ago

Was this helpful?

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

Parameters

Name
Type
Description

TransactionHash

String<Hash>

Hash of the selected 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 in DATUM
  source: Address // Address of the sender
  destination: Address // Address of the receiver
  fee: Number // Fee sent in DATUM
  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 in DATUM
      fee: Number // Fee sent in DATUM
      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

type Proof = {
  id: String // Id of the signature
  signature: String // Signature
}
await provider.request({
  method: "dag_getTransaction",
  params: [
    "5659d17c234d57c57a7335792889fe50cf66ec3d717b5d28d9bfa943e4275d27"
  ],
});

// {
//   "hash": "5659d17c234d57c57a7335792889fe50cf66ec3d717b5d28d9bfa943e4275d27",
//   "amount": 100000000,
//   "source": "DAG77zerQ2BUVhtVgkmseihkEfLXieBBm57vqA4J",
//   "destination": "DAG2fMnbEmsWhgYGhvdREVELyESKUqGNTEWf4B61",
//   "fee": 0,
//   "parent": {
//       "hash": "3826c2848a477ff40e3ae27d5b9f99bd2d4a30cd2702873a740dc7c77792310a",
//       "ordinal": 32
//   },
//   "blockHash": "f2df30d776dbf05240b14654d2e156099b25ff6e45084eac9ab89c37689a2007",
//   "snapshotHash": "f41437fc5fc01483069e8d11ff3597f4c2715f44a859432d3f0041838ff270d2",
//   "snapshotOrdinal": 509453,
//   "transactionOriginal": {
//       "value": {
//           "source": "DAG77zerQ2BUVhtVgkmseihkEfLXieBBm57vqA4J",
//           "destination": "DAG2fMnbEmsWhgYGhvdREVELyESKUqGNTEWf4B61",
//           "amount": 100000000,
//           "fee": 0,
//           "parent": {
//               "ordinal": 32,
//               "hash": "3826c2848a477ff40e3ae27d5b9f99bd2d4a30cd2702873a740dc7c77792310a"
//           },
//           "salt": 8888012531929986
//       },
//       "proofs": [
//           {
//               "id": "b85cbc0d210bfb98de58b9b1c6d195f6ee09e254e489f284756e3ebae82054823b04e64bcc62bb6b20ee8016b819419389037d8d09e278e47fe79645cfd8b166",
//               "signature": "3045022100e597cb6ac5e05e00c03998c11ed4ee0c3d8e42aedd37c19f4968ad494d5357e202205f754fe64410e2d8770b3976eb458c4bd3b22aa8f48609c2577dab88e23ef3fd"
//           }
//       ]
//   },
//   "timestamp": "2023-01-26T15:42:21.970Z"
// }

Example

​
​
​