Construct
status: stable
Create a transaction to be signed from the shared wallet.
Works for the following fields:
- payments
- metadata
- validity_interval
Path parameters
-
walletId
string(hex) Required Minimum length is
40
, maximum length is40
.
Body
Required
-
payments
array[object] 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 autxo_too_small
error, together with a revised ada amount that does satisfy the minimum UTxO rule.
At least
0
elements.Hide payments attributes Show payments 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. -
assets
array[object] An asset on the Cardano blockchain. An asset is uniquely identified by its
policy_id
andasset_name
(together, these form the asset id).Two assets with the same
asset_name
andpolicy_id
are interchangeable. Yet, different assets with a samepolicy_id
but differentasset_name
are treated as separate assets, as are two assets with the sameasset_name
but differentpolicy_id
.An asset on the Cardano blockchain. An asset is uniquely identified by its
policy_id
andasset_name
(together, these form the asset id).Two assets with the same
asset_name
andpolicy_id
are interchangeable. Yet, different assets with a samepolicy_id
but differentasset_name
are treated as separate assets, as are two assets with the sameasset_name
but differentpolicy_id
.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 is56
. -
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
andasset_name
.Minimum value is
0
.
-
-
withdrawal
string When provided, instruments the server to automatically withdraw rewards from the source wallet when they are deemed sufficient (i.e. they contribute to the balance for at least as much as they cost).
As a consequence, the resulting transaction may or may not have a withdrawal object. Summarizing:
withdrawal field reward balance result null
too small ✓ no withdrawals generated null
big enough ✓ no withdrawals generated "self"
too small ✓ no withdrawals generated "self"
big enough ✓ withdrawal generated Value is
self
. metadata
object | null Any of: ⚠️ 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:
All top-level keys must be integers between
0
and2^64 - 1
.Each metadata value is tagged with its type.
Strings must be at most 64 bytes when UTF-8 encoded.
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)
to2^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
orbool
values. When reading metadata from chain, be aware that integers may exceed the javascript numeric range, and may need special "bigint" parsing.Hide attribute Show attribute
Additional properties:
object One of: Hide attribute Show attribute
-
string
string Required Maximum length is
64
.
Hide attribute Show attribute
-
int
integer Required
Hide attribute Show attribute
-
bytes
string Required Maximum length is
128
. Format should match the following pattern:^[0-9a-fA-F]*$
.
Hide attribute Show attribute
-
list
array Required
-
⚠️ 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:
All top-level keys must be integers between
0
and2^64 - 1
.Each metadata value is tagged with its type.
Strings must be at most 64 bytes when UTF-8 encoded.
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)
to2^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
orbool
values. When reading metadata from chain, be aware that integers may exceed the javascript numeric range, and may need special "bigint" parsing.Hide attribute Show attribute
Additional properties:
string | integer | array | object One of: Hide attribute Show attribute
-
encrypt_metadata
object If used then metadata in transaction is going to be encrypted via AEAD scheme using ChaCha20 and Poly1305 (see RFC 7539). PBKDF2 password stretching is used to get a 32-byte symmetric key. PBKDF2 encryption using HMAC with the hash algorithm SHA512 is employed here. The encrypted metadata is going to be stored in blockchain as a consequence.
Hide encrypt_metadata attribute Show encrypt_metadata attribute object
-
passphrase
string Required A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)
Minimum length is
0
, maximum length is255
.
-
-
mint_burn
array[object] An entry for each unique asset to be minted and/or burned, containing helpful information.
At least
1
element.One of: Hide attributes Show attributes
policy_script_template
string | object Required One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.Hide attribute Show attribute
-
all
array[string | object] Required Script primitive for which all signing keys corresponding to all list cosigners' verification keys are expected to make the script valid.
At least
1
element.One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.Hide attribute Show attribute
-
all
array Required Script primitive for which all signing keys corresponding to all list cosigners' verification keys are expected to make the script valid.
At least
1
element.
Hide attribute Show attribute
-
any
array Required Script primitive for which a signing key corresponding to any of the list cosigners' verification keys is expected to make the script valid. It is equivalent to
some
with"at_least"=1
.At least
1
element.
Hide attribute Show attribute
-
some
object Required Script primitive for which at least a given number of signing keys corresponding to the list cosigners' verification keys are expected to make the script valid.
Hide attribute Show attribute
-
active_from
integer Required Transaction is only valid starting at the specified slot number (
≥ active_from
).Minimum value is
0
.
Hide attribute Show attribute
-
active_until
integer Required Transaction is only valid before the specified slot number (
< active_until
).Minimum value is
0
.
-
Hide attribute Show attribute
-
any
array[string | object] Required Script primitive for which a signing key corresponding to any of the list cosigners' verification keys is expected to make the script valid. It is equivalent to
some
with"at_least"=1
.At least
1
element.One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.Hide attribute Show attribute
-
all
array Required Script primitive for which all signing keys corresponding to all list cosigners' verification keys are expected to make the script valid.
At least
1
element.
Hide attribute Show attribute
-
any
array Required Script primitive for which a signing key corresponding to any of the list cosigners' verification keys is expected to make the script valid. It is equivalent to
some
with"at_least"=1
.At least
1
element.
Hide attribute Show attribute
-
some
object Required Script primitive for which at least a given number of signing keys corresponding to the list cosigners' verification keys are expected to make the script valid.
Hide attribute Show attribute
-
active_from
integer Required Transaction is only valid starting at the specified slot number (
≥ active_from
).Minimum value is
0
.
Hide attribute Show attribute
-
active_until
integer Required Transaction is only valid before the specified slot number (
< active_until
).Minimum value is
0
.
-
Hide attribute Show attribute
-
some
object Required Script primitive for which at least a given number of signing keys corresponding to the list cosigners' verification keys are expected to make the script valid.
Hide some attributes Show some attributes object
-
at_least
integer Required Minimum value is
1
, maximum value is255
. -
from
array[string | object] Required At least
1
element.One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.Hide attribute Show attribute
-
all
array Required Script primitive for which all signing keys corresponding to all list cosigners' verification keys are expected to make the script valid.
At least
1
element.
Hide attribute Show attribute
-
any
array Required Script primitive for which a signing key corresponding to any of the list cosigners' verification keys is expected to make the script valid. It is equivalent to
some
with"at_least"=1
.At least
1
element.
Hide attribute Show attribute
-
some
object Required Script primitive for which at least a given number of signing keys corresponding to the list cosigners' verification keys are expected to make the script valid.
Hide attribute Show attribute
-
active_from
integer Required Transaction is only valid starting at the specified slot number (
≥ active_from
).Minimum value is
0
.
Hide attribute Show attribute
-
active_until
integer Required Transaction is only valid before the specified slot number (
< active_until
).Minimum value is
0
.
-
-
Hide attribute Show attribute
-
active_from
integer Required Transaction is only valid starting at the specified slot number (
≥ active_from
).Minimum value is
0
.
Hide attribute Show attribute
-
active_until
integer Required Transaction is only valid before the specified slot number (
< active_until
).Minimum value is
0
.
-
-
asset_name
string(hex) 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
. operation
object Required One of: Hide attribute Show attribute
-
mint
object Hide mint attributes Show mint attributes object
-
receiving_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 .
-
quantity
integer Required Number of assets for the given
policy_id
andasset_name
.Minimum value is
0
.
-
-
Hide attributes Show attributes
-
reference_input
object Required A reference input.
-
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 is56
. -
asset_name
string(hex) 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
. operation
object Required One of: Hide attribute Show attribute
-
mint
object Hide mint attributes Show mint attributes object
-
receiving_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 .
-
quantity
integer Required Number of assets for the given
policy_id
andasset_name
.Minimum value is
0
.
-
-
vote
string | string(bech32) One of: Voting action. One can abstain, give no confidence vote or vote for a representative by specifying its key hash or script hash. Voting can be done together with delegation action.
Values are
abstain
orno_confidence
.Voting action. One can abstain, give no confidence vote or vote for a representative by specifying its key hash or script hash. Voting can be done together with delegation action.
-
delegations
array[object] A delegation action for a given stake key denoted by its soft index. Pool id is only required for "join". Stake key index are required for both actions.
At least
0
elements.One of: A delegation action for a given stake key denoted by its soft index. Pool id is only required for "join". Stake key index are required for both actions.
Hide attribute Show attribute
-
join
object Required Hide join attributes Show join attributes object
-
pool
string(hex|bech32) Required A unique identifier for the pool.
-
stake_key_index
string Required 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 aH
suffix are called Soft.
-
A delegation action for a given stake key denoted by its soft index. Pool id is only required for "join". Stake key index are required for both actions.
Hide attribute Show attribute
-
quit
object Required Hide quit attribute Show quit attribute object
-
stake_key_index
string Required 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 aH
suffix are called Soft.
-
-
-
validity_interval
object Specify only invalid_before or invalid_hereafter or both.
Please note that, if not set, the default values are:
"invalid_before": {"quantity":0, "unit":"slot"}
"invalid_hereafter":{"quantity":7200, "unit":"second"}
Which translates to 2h transaction TTL.
Hide validity_interval attributes Show validity_interval attributes object
invalid_before
object invalid_hereafter
object
reference_policy_script_template
string | object One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.Optional policy script template that could be used as a script reference in another transaction. In the current transaction, the script will be included as the first output (
index = 0
). The script is constructed by replacing the cosigner with the policy public key of the wallet. In future transactions, the reference script can be used by any wallet multiple times by referencing the current transactionid
andindex = 0
. The script template must contain a single cosigner only, but it may include time locks.Hide attribute Show attribute
-
all
array[string | object] Required Script primitive for which all signing keys corresponding to all list cosigners' verification keys are expected to make the script valid.
At least
1
element.One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.Hide attribute Show attribute
-
all
array Required Script primitive for which all signing keys corresponding to all list cosigners' verification keys are expected to make the script valid.
At least
1
element.
Hide attribute Show attribute
-
any
array Required Script primitive for which a signing key corresponding to any of the list cosigners' verification keys is expected to make the script valid. It is equivalent to
some
with"at_least"=1
.At least
1
element.
Hide attribute Show attribute
-
some
object Required Script primitive for which at least a given number of signing keys corresponding to the list cosigners' verification keys are expected to make the script valid.
Hide attribute Show attribute
-
active_from
integer Required Transaction is only valid starting at the specified slot number (
≥ active_from
).Minimum value is
0
.
Hide attribute Show attribute
-
active_until
integer Required Transaction is only valid before the specified slot number (
< active_until
).Minimum value is
0
.
-
Optional policy script template that could be used as a script reference in another transaction. In the current transaction, the script will be included as the first output (
index = 0
). The script is constructed by replacing the cosigner with the policy public key of the wallet. In future transactions, the reference script can be used by any wallet multiple times by referencing the current transactionid
andindex = 0
. The script template must contain a single cosigner only, but it may include time locks.Hide attribute Show attribute
-
any
array[string | object] Required Script primitive for which a signing key corresponding to any of the list cosigners' verification keys is expected to make the script valid. It is equivalent to
some
with"at_least"=1
.At least
1
element.One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.Hide attribute Show attribute
-
all
array Required Script primitive for which all signing keys corresponding to all list cosigners' verification keys are expected to make the script valid.
At least
1
element.
Hide attribute Show attribute
-
any
array Required Script primitive for which a signing key corresponding to any of the list cosigners' verification keys is expected to make the script valid. It is equivalent to
some
with"at_least"=1
.At least
1
element.
Hide attribute Show attribute
-
some
object Required Script primitive for which at least a given number of signing keys corresponding to the list cosigners' verification keys are expected to make the script valid.
Hide attribute Show attribute
-
active_from
integer Required Transaction is only valid starting at the specified slot number (
≥ active_from
).Minimum value is
0
.
Hide attribute Show attribute
-
active_until
integer Required Transaction is only valid before the specified slot number (
< active_until
).Minimum value is
0
.
-
Optional policy script template that could be used as a script reference in another transaction. In the current transaction, the script will be included as the first output (
index = 0
). The script is constructed by replacing the cosigner with the policy public key of the wallet. In future transactions, the reference script can be used by any wallet multiple times by referencing the current transactionid
andindex = 0
. The script template must contain a single cosigner only, but it may include time locks.Hide attribute Show attribute
-
some
object Required Script primitive for which at least a given number of signing keys corresponding to the list cosigners' verification keys are expected to make the script valid.
Hide some attributes Show some attributes object
-
at_least
integer Required Minimum value is
1
, maximum value is255
. -
from
array[string | object] Required At least
1
element.One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.Hide attribute Show attribute
-
all
array Required Script primitive for which all signing keys corresponding to all list cosigners' verification keys are expected to make the script valid.
At least
1
element.
Hide attribute Show attribute
-
any
array Required Script primitive for which a signing key corresponding to any of the list cosigners' verification keys is expected to make the script valid. It is equivalent to
some
with"at_least"=1
.At least
1
element.
Hide attribute Show attribute
-
some
object Required Script primitive for which at least a given number of signing keys corresponding to the list cosigners' verification keys are expected to make the script valid.
Hide attribute Show attribute
-
active_from
integer Required Transaction is only valid starting at the specified slot number (
≥ active_from
).Minimum value is
0
.
Hide attribute Show attribute
-
active_until
integer Required Transaction is only valid before the specified slot number (
< active_until
).Minimum value is
0
.
-
-
Optional policy script template that could be used as a script reference in another transaction. In the current transaction, the script will be included as the first output (
index = 0
). The script is constructed by replacing the cosigner with the policy public key of the wallet. In future transactions, the reference script can be used by any wallet multiple times by referencing the current transactionid
andindex = 0
. The script template must contain a single cosigner only, but it may include time locks.Hide attribute Show attribute
-
active_from
integer Required Transaction is only valid starting at the specified slot number (
≥ active_from
).Minimum value is
0
.
Optional policy script template that could be used as a script reference in another transaction. In the current transaction, the script will be included as the first output (
index = 0
). The script is constructed by replacing the cosigner with the policy public key of the wallet. In future transactions, the reference script can be used by any wallet multiple times by referencing the current transactionid
andindex = 0
. The script template must contain a single cosigner only, but it may include time locks.Hide attribute Show attribute
-
active_until
integer Required Transaction is only valid before the specified slot number (
< active_until
).Minimum value is
0
.
-
-
encoding
string Encoding of transaction CBOR returned in response (base64 by default).
Values are
base16
orbase64
.
Responses
-
400 application/json
Bad Request
Hide response attributes Show response attributes object
-
403 application/json
Forbidden
One of: invalid_wallet_typeobject already_withdrawingobject utxo_too_smallobject cannot_cover_feeobject not_enough_moneyobject insufficient_collateralobject transaction_is_too_bigobject created_multidelegation_transactionobject created_multiaccount_transactionobject created_wrong_policy_script_templateobject asset_name_too_longobject mint_or_burn_asset_quantity_out_of_boundsobject invalid_validity_boundsobject validity_interval_not_inside_script_timelockobject shared_wallet_incompleteobject staking_invalidobject Hide attributes Show attributes
-
message
string Required Occurs when a requested output has a quantity of lovelace that is below the minimum required by the ledger.
-
code
string Required Value is
utxo_too_small
. -
info
object Hide info attributes Show info attributes object
-
tx_output_index
integer Required Minimum value is
0
. -
tx_output_lovelace_specified
object Required Coins, in Lovelace. Only relates to 'Ada'. Refer to
assets
for multi-assets wallets instead. -
tx_output_lovelace_required_minimum
object Required Coins, in Lovelace. Only relates to 'Ada'. Refer to
assets
for multi-assets wallets instead.
-
Hide attributes Show attributes
-
-
404 application/json
Not Found
-
406 application/json
Not Acceptable
-
415 application/json
Unsupported Media Type
-
202 application/json
Accepted
Hide response attributes Show response attributes object
-
transaction
string(base64|base16) Required The CBOR-encoded transaction, represented in either hex or base64 encoding. This always includes the transaction body and the witness set, even if the latter is empty.
-
coin_selection
object Required Hide coin_selection attributes Show coin_selection attributes object
-
inputs
array[object] Required A list of transaction inputs
Hide inputs attributes Show inputs 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. -
assets
array[object] An asset on the Cardano blockchain. An asset is uniquely identified by its
policy_id
andasset_name
(together, these form the asset id).Two assets with the same
asset_name
andpolicy_id
are interchangeable. Yet, different assets with a samepolicy_id
but differentasset_name
are treated as separate assets, as are two assets with the sameasset_name
but differentpolicy_id
.An asset on the Cardano blockchain. An asset is uniquely identified by its
policy_id
andasset_name
(together, these form the asset id).Two assets with the same
asset_name
andpolicy_id
are interchangeable. Yet, different assets with a samepolicy_id
but differentasset_name
are treated as separate assets, as are two assets with the sameasset_name
but differentpolicy_id
.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 is56
. -
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
andasset_name
.Minimum value is
0
.
-
-
id
string(hex) Required A unique identifier for this transaction
Minimum length is
64
, maximum length is64
. -
derivation_path
array[string] Required 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 aH
suffix are called Soft.At least
1
element. -
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 autxo_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. -
assets
array[object] An asset on the Cardano blockchain. An asset is uniquely identified by its
policy_id
andasset_name
(together, these form the asset id).Two assets with the same
asset_name
andpolicy_id
are interchangeable. Yet, different assets with a samepolicy_id
but differentasset_name
are treated as separate assets, as are two assets with the sameasset_name
but differentpolicy_id
.An asset on the Cardano blockchain. An asset is uniquely identified by its
policy_id
andasset_name
(together, these form the asset id).Two assets with the same
asset_name
andpolicy_id
are interchangeable. Yet, different assets with a samepolicy_id
but differentasset_name
are treated as separate assets, as are two assets with the sameasset_name
but differentpolicy_id
.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 is56
. -
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
andasset_name
.Minimum value is
0
.
-
-
change
array[object] Required A list of transaction change outputs.
At least
0
elements.Hide change attributes Show change 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. -
assets
array[object] An asset on the Cardano blockchain. An asset is uniquely identified by its
policy_id
andasset_name
(together, these form the asset id).Two assets with the same
asset_name
andpolicy_id
are interchangeable. Yet, different assets with a samepolicy_id
but differentasset_name
are treated as separate assets, as are two assets with the sameasset_name
but differentpolicy_id
.An asset on the Cardano blockchain. An asset is uniquely identified by its
policy_id
andasset_name
(together, these form the asset id).Two assets with the same
asset_name
andpolicy_id
are interchangeable. Yet, different assets with a samepolicy_id
but differentasset_name
are treated as separate assets, as are two assets with the sameasset_name
but differentpolicy_id
.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 is56
. -
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
andasset_name
.Minimum value is
0
.
-
-
derivation_path
array[string] Required 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 aH
suffix are called Soft.At least
1
element.
-
-
collateral
array[object] A list of transaction inputs used for collateral
Hide collateral attributes Show collateral 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. -
id
string(hex) Required A unique identifier for this transaction
Minimum length is
64
, maximum length is64
. -
derivation_path
array[string] Required 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 aH
suffix are called Soft.At least
1
element. -
index
integer Required Minimum value is
0
.
-
-
withdrawals
array[object] A list of withdrawals from stake addresses.
At least
0
elements.Hide withdrawals attributes Show withdrawals attributes object
-
stake_address
string(bech32) Required -
derivation_path
array[string] Required 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 aH
suffix are called Soft.At least
1
element. -
amount
object Required Coins, in Lovelace. Only relates to 'Ada'. Refer to
assets
for multi-assets wallets instead.
-
-
certificates
array[object] A delegation certificate belonging to wallet
Only for 'join_pool' the 'pool' property is required.
A delegation certificate belonging to wallet
Only for 'join_pool' the 'pool' property is required.
Hide certificates attributes Show certificates attributes object
-
certificate_type
string Required Values are
join_pool
,quit_pool
, orregister_reward_account
. -
pool
string(hex|bech32) A unique identifier for the pool.
-
reward_account_path
array[string] Required At least
5
but not more than5
elements.
-
-
deposits_taken
array[object] Coins, in Lovelace. Only relates to 'Ada'. Refer to
assets
for multi-assets wallets instead.Coins, in Lovelace. Only relates to 'Ada'. Refer to
assets
for multi-assets wallets instead.At least
0
elements. -
deposits_returned
array[object] Coins, in Lovelace. Only relates to 'Ada'. Refer to
assets
for multi-assets wallets instead.Coins, in Lovelace. Only relates to 'Ada'. Refer to
assets
for multi-assets wallets instead.At least
0
elements. -
metadata
string(base64) Transaction metadata, serialized according to the expected on-chain binary format, base64-encoded.
-
-
fee
object Required Coins, in Lovelace. Only relates to 'Ada'. Refer to
assets
for multi-assets wallets instead.
-
curl \
-X POST https://localhost:8090/v2/shared-wallets/{walletId}/transactions-construct \
-H "Content-Type: application/json" \
-d '{"payments":[{"address":"addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g","amount":{"quantity":42000000,"unit":"lovelace"},"assets":[{"policy_id":"65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b","asset_name":"string","quantity":42}]}],"withdrawal":"self","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}}]}},"encrypt_metadata":{"passphrase":"Secure Passphrase"},"mint_burn":[{"policy_script_template":"string","asset_name":"string","operation":{"mint":{"receiving_address":"addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g","quantity":42}}}],"vote":"abstain","delegations":[{"join":{"pool":"pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm","stake_key_index":"1852H"}}],"validity_interval":{"invalid_before":{"quantity":10,"unit":"second"},"invalid_hereafter":{"quantity":10,"unit":"second"}},"reference_policy_script_template":"string","encoding":"base16"}'
{
"payments": [
{
"address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
"amount": {
"quantity": 42000000,
"unit": "lovelace"
},
"assets": [
{
"policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
"asset_name": "string",
"quantity": 42
}
]
}
],
"withdrawal": "self",
"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
}
}
]
}
},
"encrypt_metadata": {
"passphrase": "Secure Passphrase"
},
"mint_burn": [
{
"policy_script_template": "string",
"asset_name": "string",
"operation": {
"mint": {
"receiving_address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
"quantity": 42
}
}
}
],
"vote": "abstain",
"delegations": [
{
"join": {
"pool": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm",
"stake_key_index": "1852H"
}
}
],
"validity_interval": {
"invalid_before": {
"quantity": 10,
"unit": "second"
},
"invalid_hereafter": {
"quantity": 10,
"unit": "second"
}
},
"reference_policy_script_template": "string",
"encoding": "base16"
}
{
"message": "string",
"code": "bad_request"
}
- Invalid_wallet_type (generated)
- Already_withdrawing (generated)
- Utxo_too_small (generated)
- Cannot_cover_fee (generated)
- Not_enough_money (generated)
- Insufficient_collateral (generated)
- Transaction_is_too_big (generated)
- Created_multidelegation_transaction (generated)
- Created_multiaccount_transaction (generated)
- Created_wrong_policy_script_template (generated)
- Asset_name_too_long (generated)
- Mint_or_burn_asset_quantity_out_of_bounds (generated)
- Invalid_validity_bounds (generated)
- Validity_interval_not_inside_script_timelock (generated)
- Shared_wallet_incomplete (generated)
- Staking_invalid (generated)
{
"message": "string",
"code": "invalid_wallet_type"
}
{
"message": "string",
"code": "already_withdrawing"
}
{
"message": "string",
"code": "utxo_too_small",
"info": {
"tx_output_index": 42,
"tx_output_lovelace_specified": {
"quantity": 42000000,
"unit": "lovelace"
},
"tx_output_lovelace_required_minimum": {
"quantity": 42000000,
"unit": "lovelace"
}
}
}
{
"message": "string",
"code": "cannot_cover_fee"
}
{
"message": "string",
"code": "not_enough_money"
}
{
"message": "string",
"code": "insufficient_collateral"
}
{
"message": "string",
"code": "transaction_is_too_big"
}
{
"message": "string",
"code": "created_multidelegation_transaction"
}
{
"message": "string",
"code": "created_multiaccount_transaction"
}
{
"message": "string",
"code": "created_wrong_policy_script_template"
}
{
"message": "string",
"code": "asset_name_too_long"
}
{
"message": "string",
"code": "mint_or_burn_asset_quantity_out_of_bounds"
}
{
"message": "string",
"code": "invalid_validity_bounds"
}
{
"message": "string",
"code": "validity_interval_not_inside_script_timelock"
}
{
"message": "string",
"code": "shared_wallet_incomplete"
}
{
"message": "string",
"code": "staking_invalid"
}
{
"message": "string",
"code": "no_such_wallet"
}
{
"message": "string",
"code": "not_acceptable"
}
{
"message": "string",
"code": "unsupported_media_type"
}
{
"transaction": "string",
"coin_selection": {
"inputs": [
{
"address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
"amount": {
"quantity": 42000000,
"unit": "lovelace"
},
"assets": [
{
"policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
"asset_name": "string",
"quantity": 42
}
],
"id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
"derivation_path": [
"1852H"
],
"index": 42
}
],
"outputs": [
{
"address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
"amount": {
"quantity": 42000000,
"unit": "lovelace"
},
"assets": [
{
"policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
"asset_name": "string",
"quantity": 42
}
]
}
],
"change": [
{
"address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
"amount": {
"quantity": 42000000,
"unit": "lovelace"
},
"assets": [
{
"policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
"asset_name": "string",
"quantity": 42
}
],
"derivation_path": [
"1852H"
]
}
],
"collateral": [
{
"address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
"amount": {
"quantity": 42000000,
"unit": "lovelace"
},
"id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
"derivation_path": [
"1852H"
],
"index": 42
}
],
"withdrawals": [
{
"stake_address": "stake1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2x",
"derivation_path": [
"1852H"
],
"amount": {
"quantity": 42000000,
"unit": "lovelace"
}
}
],
"certificates": [
{
"certificate_type": "join_pool",
"pool": "pool1wqaz0q0zhtxlgn0ewssevn2mrtm30fgh2g7hr7z9rj5856457mm",
"reward_account_path": [
"string"
]
}
],
"deposits_taken": [
{
"quantity": 42000000,
"unit": "lovelace"
}
],
"deposits_returned": [
{
"quantity": 42000000,
"unit": "lovelace"
}
],
"metadata": "string"
},
"fee": {
"quantity": 42000000,
"unit": "lovelace"
}
}