Get

GET /shared-wallets/{walletId}/transactions/{transactionId}

status: stable

Get transaction by id.

Path parameters

  • walletId string(hex) Required

    Minimum length is 40, maximum length is 40.

  • transactionId string(hex) Required

    Minimum length is 64, maximum length is 64.

Query parameters

  • When present (or equal to true) in the query, the metadata format for the transaction(s) in the output will be untyped plain json as specified in CIP 25

Responses

  • 404 application/json

    Not Found

    One of:
  • 406 application/json

    Not Acceptable

    Hide response attributes Show response attributes object
    • message string Required

      May occur when providing an invalid 'Accept' header.

    • code string Required

      Value is not_acceptable.

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string(hex) Required

      A unique identifier for this transaction

      Minimum length is 64, maximum length is 64.

    • amount object Required

      An amount of Ada spent or received, from the perspective of the wallet.

      That is, for outgoing transaction, it represents the amount of Ada consumed as inputs including the amount of Ada spent as fees or deposits.

      For incoming transaction, it represents the total amount of Ada received to addresses that belong to the wallet.

      Hide amount attributes Show amount attributes object
      • quantity integer Required

        Minimum value is 0.

      • unit string Required

        Value is lovelace.

    • fee object Required

      Coins, in Lovelace. Only relates to 'Ada'. Refer to assets for multi-assets wallets instead.

      Hide fee attributes Show fee attributes object
      • quantity integer Required

        Minimum value is 0.

      • unit string Required

        Value is lovelace.

    • deposit_taken object Required

      Coins, in Lovelace. Only relates to 'Ada'. Refer to assets for multi-assets wallets instead.

      Hide deposit_taken attributes Show deposit_taken attributes object
      • quantity integer Required

        Minimum value is 0.

      • unit string Required

        Value is lovelace.

    • deposit_returned object Required

      Coins, in Lovelace. Only relates to 'Ada'. Refer to assets for multi-assets wallets instead.

      Hide deposit_returned attributes Show deposit_returned attributes object
      • quantity integer Required

        Minimum value is 0.

      • unit string Required

        Value is lovelace.

    • A reference to a particular time slot, and the block height at that point.

      Hide inserted_at attributes Show inserted_at attributes object
      • absolute_slot_number integer Required

        The 0-based slot index starting from genesis of the blockchain.

        Minimum value is 0.

      • slot_number integer Required

        The zero-based slot index within an epoch.

        Minimum value is 0.

      • epoch_number integer Required

        An epoch is a time period which is divided into slots.

        Minimum value is 0.

      • time string(iso-8601-date-and-time) Required
      • height object Required
        Hide height attributes Show height attributes object
        • quantity integer Required

          Minimum value is 0.

        • unit string Required

          Value is block.

    • A reference to a particular time slot.

      Hide expires_at attributes Show expires_at attributes object
      • absolute_slot_number integer Required

        The 0-based slot index starting from genesis of the blockchain.

        Minimum value is 0.

      • epoch_number integer Required

        An epoch is a time period which is divided into slots.

        Minimum value is 0.

      • slot_number integer Required

        The zero-based slot index within an epoch.

        Minimum value is 0.

      • time string(iso-8601-date-and-time) Required
    • A reference to a particular time slot, and the block height at that point.

      Hide pending_since attributes Show pending_since attributes object
      • absolute_slot_number integer Required

        The 0-based slot index starting from genesis of the blockchain.

        Minimum value is 0.

      • slot_number integer Required

        The zero-based slot index within an epoch.

        Minimum value is 0.

      • epoch_number integer Required

        An epoch is a time period which is divided into slots.

        Minimum value is 0.

      • time string(iso-8601-date-and-time) Required
      • height object Required
        Hide height attributes Show height attributes object
        • quantity integer Required

          Minimum value is 0.

        • unit string Required

          Value is block.

    • depth object

      if: status == in_ledger
      Current depth of the transaction in the local chain

      Hide depth attributes Show depth attributes object
      • quantity integer Required

        Minimum value is 0.

      • unit string Required

        Value is block.

    • direction string Required

      Values are outgoing or incoming.

    • inputs array[object] Required

      A list of transaction inputs.

      assets and address are always present for outgoing transactions but generally absent for incoming transactions. This information is present on the Cardano explorer, but is not tracked by the wallet.

      At least 0 elements.

      Hide inputs attributes Show inputs attributes object
      • address string(base58|bech32)

        A sequence of characters that encodes (in Base58 or Bech32) a sequence of bytes which represents an address on the Cardano blockchain. Sequences in Base58 encoding are expected to be legacy Byron addresses, whereas sequences in Bech32 encoding correspond to current Shelley addresses.

        For more details, see CIP-0019 — Cardano addresses .

      • amount object

        Coins, in Lovelace. Only relates to 'Ada'. Refer to assets for multi-assets wallets instead.

        Hide amount attributes Show amount attributes object
        • quantity integer Required

          Minimum value is 0.

        • unit string Required

          Value is lovelace.

      • assets array[object]

        A flat list of assets (possibly empty).

        Hide assets attributes Show assets attributes object
        • policy_id string(hex) Required

          A unique identifier of the asset's monetary policy. The policy controls how assets of this kind are created and destroyed.

          The contents are the blake2b-224 hash of the monetary policy script, encoded in hexadecimal.

          Minimum length is 56, maximum length is 56.

        • asset_name string(hex) Required

          The asset on-chain type which acts as a sub-identifier within a policy. Although we call it "asset name", the value needn't be text, and it could even be empty.

          For policies with a single fungible asset item, asset name is typically an empty string.

          This value can be up to 32 bytes of arbitrary data (which is 64 hexadecimal digits).

          Maximum length is 64.

        • quantity integer Required

          Number of assets for the given policy_id and asset_name.

          Minimum value is 0.

      • id string(hex) Required

        A unique identifier for this transaction

        Minimum length is 64, maximum length is 64.

      • index integer Required

        Minimum value is 0.

    • outputs array[object] Required

      A list of target outputs with amounts specified.

      When creating a new transaction, the wallet software ensures that all user-specified transaction outputs have ada amounts that satisfy the ledger minimum UTxO rule:

      • If a user-specified transaction output has an ada amount that is zero, the wallet software will automatically assign a minimal amount of ada to the output so that it satisfies the ledger minimum UTxO rule.

      • If a user-specified transaction output has an ada amount that is non-zero, the wallet software will verify that the specified amount is large enough to satisfy the ledger minimum UTxO rule. If the amount is not large enough, the wallet software will return a utxo_too_small error, together with a revised ada amount that does satisfy the minimum UTxO rule.

      At least 0 elements.

      Hide outputs attributes Show outputs attributes object
      • address string(base58|bech32) Required

        A sequence of characters that encodes (in Base58 or Bech32) a sequence of bytes which represents an address on the Cardano blockchain. Sequences in Base58 encoding are expected to be legacy Byron addresses, whereas sequences in Bech32 encoding correspond to current Shelley addresses.

        For more details, see CIP-0019 — Cardano addresses .

      • amount object Required

        Coins, in Lovelace. Only relates to 'Ada'. Refer to assets for multi-assets wallets instead.

        Hide amount attributes Show amount attributes object
        • quantity integer Required

          Minimum value is 0.

        • unit string Required

          Value is lovelace.

      • assets array[object]

        A flat list of assets (possibly empty).

        Hide assets attributes Show assets attributes object
        • policy_id string(hex) Required

          A unique identifier of the asset's monetary policy. The policy controls how assets of this kind are created and destroyed.

          The contents are the blake2b-224 hash of the monetary policy script, encoded in hexadecimal.

          Minimum length is 56, maximum length is 56.

        • asset_name string(hex) Required

          The asset on-chain type which acts as a sub-identifier within a policy. Although we call it "asset name", the value needn't be text, and it could even be empty.

          For policies with a single fungible asset item, asset name is typically an empty string.

          This value can be up to 32 bytes of arbitrary data (which is 64 hexadecimal digits).

          Maximum length is 64.

        • quantity integer Required

          Number of assets for the given policy_id and asset_name.

          Minimum value is 0.

    • collateral array[object]

      A list of transaction inputs used for collateral.

      At least 0 elements.

      Hide collateral attributes Show collateral attributes object
      • address string(base58|bech32)

        A sequence of characters that encodes (in Base58 or Bech32) a sequence of bytes which represents an address on the Cardano blockchain. Sequences in Base58 encoding are expected to be legacy Byron addresses, whereas sequences in Bech32 encoding correspond to current Shelley addresses.

        For more details, see CIP-0019 — Cardano addresses .

      • amount object

        Coins, in Lovelace. Only relates to 'Ada'. Refer to assets for multi-assets wallets instead.

        Hide amount attributes Show amount attributes object
        • quantity integer Required

          Minimum value is 0.

        • unit string Required

          Value is lovelace.

      • id string(hex) Required

        A unique identifier for this transaction

        Minimum length is 64, maximum length is 64.

      • index integer Required

        Minimum value is 0.

    • collateral_outputs array[object]

      A list of collateral return outputs with amounts specified.

      At least 0 but not more than 1 element.

      Hide collateral_outputs attributes Show collateral_outputs attributes object
      • address string(base58|bech32) Required

        A sequence of characters that encodes (in Base58 or Bech32) a sequence of bytes which represents an address on the Cardano blockchain. Sequences in Base58 encoding are expected to be legacy Byron addresses, whereas sequences in Bech32 encoding correspond to current Shelley addresses.

        For more details, see CIP-0019 — Cardano addresses .

      • amount object Required

        Coins, in Lovelace. Only relates to 'Ada'. Refer to assets for multi-assets wallets instead.

        Hide amount attributes Show amount attributes object
        • quantity integer Required

          Minimum value is 0.

        • unit string Required

          Value is lovelace.

      • assets array[object]

        A flat list of assets (possibly empty).

        Hide assets attributes Show assets attributes object
        • policy_id string(hex) Required

          A unique identifier of the asset's monetary policy. The policy controls how assets of this kind are created and destroyed.

          The contents are the blake2b-224 hash of the monetary policy script, encoded in hexadecimal.

          Minimum length is 56, maximum length is 56.

        • asset_name string(hex) Required

          The asset on-chain type which acts as a sub-identifier within a policy. Although we call it "asset name", the value needn't be text, and it could even be empty.

          For policies with a single fungible asset item, asset name is typically an empty string.

          This value can be up to 32 bytes of arbitrary data (which is 64 hexadecimal digits).

          Maximum length is 64.

        • quantity integer Required

          Number of assets for the given policy_id and asset_name.

          Minimum value is 0.

    • withdrawals array[object] Required

      A list of withdrawals from stake addresses.

      At least 0 elements.

      Hide withdrawals attributes Show withdrawals attributes object
    • status string Required

      Current transaction status.

             *-----------*
        ---> |  PENDING  |----------------*
             *-----------*                |
                   |                      |
                   V                      V
             *-----------*          *-----------*
             |           |---------->  EXPIRED  |
             |           |  (ttl)   *-----------*
             | SUBMITTED |
             |           <----------------*
             |           |                |
             *-----------*           (rollback)
                    |                     |
               (in ledger)          *-----------*
                    |               |           |
                    *---------------> IN_LEDGER |
                                    |           |
                                    *-----------*
      

      Values are pending, submitted, in_ledger, or expired.

    • metadata object | null

      ⚠️ WARNING ⚠️

      Please note that metadata provided in a transaction will be stored on the blockchain forever. Make sure not to include any sensitive data, in particular personally identifiable information (PII).

      Extra application data attached to the transaction.

      Cardano allows users and developers to embed their own authenticated metadata when submitting transactions. Metadata can be expressed as a JSON object with some restrictions:

      1. All top-level keys must be integers between 0 and 2^64 - 1.

      2. Each metadata value is tagged with its type.

      3. Strings must be at most 64 bytes when UTF-8 encoded.

      4. Bytestrings are hex-encoded, with a maximum length of 64 bytes.

      Metadata aren't stored as JSON on the Cardano blockchain but are instead stored using a compact binary encoding (CBOR).

      The binary encoding of metadata values supports three simple types:

      • Integers in the range -(2^64 - 1) to 2^64 - 1
      • Strings (UTF-8 encoded)
      • Bytestrings

      And two compound types:

      • Lists of metadata values
      • Mappings from metadata values to metadata values

      It is possible to transform any JSON object into this schema.

      However, if your application uses floating point values, they will need to be converted somehow, according to your requirements. Likewise for null or bool values. When reading metadata from chain, be aware that integers may exceed the javascript numeric range, and may need special "bigint" parsing.

    • script_validity string | null

      Indicates whether the phase-2 monetary policy script (e.g. Plutus script) used in the transaction validated or not. Validity may be null if this transaction was from an era that doesn't support phase-2 monetary policy scripts, or is a pending transaction (we don't know if validation passed or failed until the transaction hits the ledger).

      Values are valid or invalid.

    • certificates array[object]

      At least 0 elements.

      Any certificate that could occur in an arbitrary transaction: might be related to delegation, pool activities, genesis or MIR.

      One of:
    • mint object
      Hide mint attributes Show mint attributes object
      • tokens array[object] Required

        At least 0 elements.

        Hide tokens attributes Show tokens attributes object
        • policy_id string(hex) Required

          A unique identifier of the asset's monetary policy. The policy controls how assets of this kind are created and destroyed.

          The contents are the blake2b-224 hash of the monetary policy script, encoded in hexadecimal.

          Minimum length is 56, maximum length is 56.

        • policy_script object Required

          One of:
        • assets array[object] Required

          At least 1 element.

          Hide assets attributes Show assets attributes object
          • asset_name string(hex) Required

            The asset on-chain type which acts as a sub-identifier within a policy. Although we call it "asset name", the value needn't be text, and it could even be empty.

            For policies with a single fungible asset item, asset name is typically an empty string.

            This value can be up to 32 bytes of arbitrary data (which is 64 hexadecimal digits).

            Maximum length is 64.

          • quantity integer Required

            Number of assets for the given policy_id and asset_name.

            Minimum value is 0.

          • fingerprint string Required

            A user-facing short fingerprint which combines the policy_id and asset_name to allow for an easier human comparison of assets. Note that it is generally not okay to use this fingerprint as a unique identifier for it is not collision resistant. Yet within the context of a single wallet, it makes for a (rather) short user-facing comparison mean.

            Minimum length is 44, maximum length is 44. Format should match the following pattern: ^(asset)1[0-9a-z]*$.

      • Format should match the following pattern: ^((policy_vk)|(policy_vkh))1[0-9a-z]*$.

      • An individual segment within a derivation path.

        The H suffix indicates a Hardened child private key, which means that children of this key cannot be derived from the public key. Indices without a H suffix are called Soft.

    • burn object
      Hide burn attributes Show burn attributes object
      • tokens array[object] Required

        At least 0 elements.

        Hide tokens attributes Show tokens attributes object
        • policy_id string(hex) Required

          A unique identifier of the asset's monetary policy. The policy controls how assets of this kind are created and destroyed.

          The contents are the blake2b-224 hash of the monetary policy script, encoded in hexadecimal.

          Minimum length is 56, maximum length is 56.

        • policy_script object Required

          One of:
        • assets array[object] Required

          At least 1 element.

          Hide assets attributes Show assets attributes object
          • asset_name string(hex) Required

            The asset on-chain type which acts as a sub-identifier within a policy. Although we call it "asset name", the value needn't be text, and it could even be empty.

            For policies with a single fungible asset item, asset name is typically an empty string.

            This value can be up to 32 bytes of arbitrary data (which is 64 hexadecimal digits).

            Maximum length is 64.

          • quantity integer Required

            Number of assets for the given policy_id and asset_name.

            Minimum value is 0.

          • fingerprint string Required

            A user-facing short fingerprint which combines the policy_id and asset_name to allow for an easier human comparison of assets. Note that it is generally not okay to use this fingerprint as a unique identifier for it is not collision resistant. Yet within the context of a single wallet, it makes for a (rather) short user-facing comparison mean.

            Minimum length is 44, maximum length is 44. Format should match the following pattern: ^(asset)1[0-9a-z]*$.

      • Format should match the following pattern: ^((policy_vk)|(policy_vkh))1[0-9a-z]*$.

      • An individual segment within a derivation path.

        The H suffix indicates a Hardened child private key, which means that children of this key cannot be derived from the public key. Indices without a H suffix are called Soft.

    • Hide validity_interval attributes Show validity_interval attributes object
      • invalid_before object Required
        Hide invalid_before attributes Show invalid_before attributes object
        • quantity integer Required

          Minimum value is 0.

        • unit string Required

          Value is slot.

      • invalid_hereafter object Required
        Hide invalid_hereafter attributes Show invalid_hereafter attributes object
        • quantity integer Required

          Minimum value is 0.

        • unit string Required

          Value is slot.

    • script_integrity string(bech32)

      A script data integrity hash - 32 bytes

      Format should match the following pattern: ^(script_data)1[0-9a-z]*$.

    • extra_signatures array[string(bech32)]

      An extra signature hash - 28 bytes

      At least 0 elements. Format of each should match the following pattern: ^(req_signer_vkh)1[0-9a-z]*$.

GET /shared-wallets/{walletId}/transactions/{transactionId}
curl \
 --request GET https://localhost:8090/v2/shared-wallets/{walletId}/transactions/{transactionId}
{
  "message": "string",
  "code": "no_such_wallet",
  "info": {
    "wallet_id": "2512a00e9653fe49a44a5886202e24d77eeb998f"
  }
}
{
  "message": "string",
  "code": "wallet_not_initialized"
}
{
  "message": "string",
  "code": "no_such_transaction",
  "info": {
    "transaction_id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1"
  }
}
Response examples (406)
{
  "message": "string",
  "code": "not_acceptable"
}
Response examples (200)
{
  "id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
  "amount": {
    "quantity": 42000000,
    "unit": "lovelace"
  },
  "fee": {
    "quantity": 42000000,
    "unit": "lovelace"
  },
  "deposit_taken": {
    "quantity": 42000000,
    "unit": "lovelace"
  },
  "deposit_returned": {
    "quantity": 42000000,
    "unit": "lovelace"
  },
  "inserted_at": {
    "absolute_slot_number": 8086,
    "slot_number": 1337,
    "epoch_number": 14,
    "time": "2019-02-27T14:46:45Z",
    "height": {
      "quantity": 1337,
      "unit": "block"
    }
  },
  "expires_at": {
    "absolute_slot_number": 8086,
    "epoch_number": 14,
    "slot_number": 1337,
    "time": "2019-02-27T14:46:45Z"
  },
  "pending_since": {
    "absolute_slot_number": 8086,
    "slot_number": 1337,
    "epoch_number": 14,
    "time": "2019-02-27T14:46:45Z",
    "height": {
      "quantity": 1337,
      "unit": "block"
    }
  },
  "depth": {
    "quantity": 1337,
    "unit": "block"
  },
  "direction": "outgoing",
  "inputs": [
    {
      "address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
      "amount": {
        "quantity": 42000000,
        "unit": "lovelace"
      },
      "assets": [
        {
          "policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
          "asset_name": "string",
          "quantity": 42
        }
      ],
      "id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
      "index": 42
    }
  ],
  "outputs": [
    {
      "address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
      "amount": {
        "quantity": 42000000,
        "unit": "lovelace"
      },
      "assets": [
        {
          "policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
          "asset_name": "string",
          "quantity": 42
        }
      ]
    }
  ],
  "collateral": [
    {
      "address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
      "amount": {
        "quantity": 42000000,
        "unit": "lovelace"
      },
      "id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
      "index": 42
    }
  ],
  "collateral_outputs": [
    {
      "address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
      "amount": {
        "quantity": 42000000,
        "unit": "lovelace"
      },
      "assets": [
        {
          "policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
          "asset_name": "string",
          "quantity": 42
        }
      ]
    }
  ],
  "withdrawals": [
    {
      "stake_address": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x",
      "amount": {
        "quantity": 42000000,
        "unit": "lovelace"
      }
    }
  ],
  "status": "pending",
  "metadata": {
    "0": {
      "string": "cardano"
    },
    "1": {
      "int": 14
    },
    "2": {
      "bytes": "2512a00e9653fe49a44a5886202e24d77eeb998f"
    },
    "3": {
      "list": [
        {
          "int": 14
        },
        {
          "int": 42
        },
        {
          "string": "1337"
        }
      ]
    },
    "4": {
      "map": [
        {
          "k": {
            "string": "key"
          },
          "v": {
            "string": "value"
          }
        },
        {
          "k": {
            "int": 14
          },
          "v": {
            "int": 42
          }
        }
      ]
    }
  },
  "script_validity": "valid",
  "certificates": [
    {
      "certificate_type": "join_pool",
      "pool": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm",
      "reward_account_path": [
        "string"
      ]
    }
  ],
  "mint": {
    "tokens": [
      {
        "policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
        "policy_script": {
          "script_type": "native",
          "script": "string",
          "reference": {
            "id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
            "index": 42
          }
        },
        "assets": [
          {
            "asset_name": "string",
            "quantity": 42,
            "fingerprint": "asset1rjklcrnsdzqp65wjgrg55sy9723kw09mlgvlc3"
          }
        ]
      }
    ],
    "wallet_policy_key_hash": "string",
    "wallet_policy_key_index": "1852H"
  },
  "burn": {
    "tokens": [
      {
        "policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
        "policy_script": {
          "script_type": "native",
          "script": "string",
          "reference": {
            "id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
            "index": 42
          }
        },
        "assets": [
          {
            "asset_name": "string",
            "quantity": 42,
            "fingerprint": "asset1rjklcrnsdzqp65wjgrg55sy9723kw09mlgvlc3"
          }
        ]
      }
    ],
    "wallet_policy_key_hash": "string",
    "wallet_policy_key_index": "1852H"
  },
  "validity_interval": {
    "invalid_before": {
      "quantity": 42000,
      "unit": "slot"
    },
    "invalid_hereafter": {
      "quantity": 42000,
      "unit": "slot"
    }
  },
  "script_integrity": [
    "script_data16apaenn9ut6s40lcw3l8v68xawlrlq20z2966uzcx8jmv2q9uy7qau558d"
  ],
  "extra_signatures": [
    "addr_keyhash1gr69m385thgvkrtspk73zmkwk537wxyxuevs2u9cukglvtlkz4k"
  ]
}