Transaction Types
Last updated
Was this helpful?
Last updated
Was this helpful?
The following global transaction types are supported across the network.
A standard currency transaction that transfers DAG tokens between two addresses.
Receiving Layer
DAG L1
Signed By
Source wallet
Fee
Paid in DAG
source
The wallet address initiating the transaction.
destination
The wallet address receiving DAG.
amount
The number of DAG tokens being transferred.
fee
The transaction fee in DAG.
salt
A random value to guarantee uniqueness on the network.
parent
A reference to the previous transaction hash and network accepted ordinal. Creates a transaction chain for each address, preventing replay attacks.
A standard transaction for transferring L0 tokens within a metagraph’s currency layer.
Receiving Layer
Metagraph Currency L1
Signed By
Source wallet
Fee
Paid in L0 Token
Same as DAG Transaction, but amount and fee are denominated in L0 tokens.
A delegation transaction that pre-approves spending on behalf of the sender.
Receiving Layer
DAG L1 or Metagraph Currency L1
Signed By
Source wallet
Fee
Paid in DAG or L0 Token (based on receiving layer)
Expiration
Maximum 1 hour (83 epochs)
source
The address granting permission to spend up to the amount.
destination
The wallet address receiving the funds.
currency
The metagraph ID for an L0 token or null for DAG.
amount
Maximum amount that can be spent with an associated SpendTransaction
in datum.
fee
Optional fee for the transaction.
lastValidEpochProgress
The expiration of the AllowSpend
in terms of network epochProgress value.
approvers
A list of addresses that must approve the transaction in order to issue an AllowSpend
against it. Currently limited to a single approver per transaction.
parent
A reference to the previous AllowSpend
hash and network accepted ordinal for the source address. Prevents replay attacks.
A metagraph-generated transaction that either:
Uses an AllowSpend to execute a transfer, or
Moves funds from a metagraph-owned wallet.
If an AllowSpend is referenced, the SpendTransaction can spend up to the amount
of the AllowSpend, or less. Once an AllowSpend is referenced in an accepted SpendTransaction, the AllowSpend lock is released and the transaction cannot be used again for a future SpendTransaction.
Receiving Layer
Submitted by metagraph to Global L0
Signed By
Included in metagraph's currency snapshot
Fee
None
allowSpendRef
(Optional) The hash of the AllowSpend
being used.
source
The executing wallet matching AllowSpend
source or metagraph ID.
destination
The destination wallet for the funds.
currency
The metagraph ID for an L0 token or null for DAG.
amount
The amount being transferred.
A transaction associated with submitting data to a metagraph’s Data L1.
Receiving Layer
Metagraph Data L1
Signed By
Source wallet
Fee
There is no fee for the transaction since it represents a fee itself.
source
The wallet address initiating the transaction.
destination
The wallet address receiving the transaction.
amount
The amount of the transaction, denoted in the L0 token of the receiving metagraph.
dataUpdateRef
The hash of the associated data update.
Locks funds for a specified duration or indefinitely. Locked funds are deducted from a wallet's balance for the duration of the lock but are never transferred from the wallet.
Layer
DAG L1 or Metagraph Currency L1
Signed By
Source wallet
Fee
Paid in DAG or L0 Token
source
The wallet address initiating the transaction
amount
The balance to lock
fee
Optional fee for the transaction.
currencyId
The metagraph ID for an L0 token or null for DAG.
unlockEpoch
The global epochProgress value that this lock will be released by the network. This field is null for indefinite locks.
parent
A reference to the previous TokenLock
hash and network accepted ordinal for the source address. Prevents replay attacks.
A system-generated transaction that unlocks previously locked tokens. TokenUnlock transactions can be created by metagraphs (L0 tokens) and the global L0 (DAG) to unlock a TokenLock before its unlockEpoch
, or to unlock a TokenLock with no unlockEpoch
. This transaction type is also emitted when a TokenLock has reached its unlockEpoch
.
Receiving Layer
Global L0 or Metagraph L0
Signed By
Included in a signed metagraph snapshot (L0 tokens) or global snapshot (DAG).
Fee
None
source
The wallet address initiating the transaction
amount
The balance to lock
currencyId
The metagraph ID for an L0 token or null for DAG.
A system-generated transaction that marks an expired AllowSpend.
Receiving Layer
Global L0 or Metagraph L0
Signed By
Included in a metagraph snapshot (L0 tokens) or global snapshot (DAG).
Fee
None
allowSpendRef
The hash of the associated AllowSpend
A user-generated transaction to create or update a delegated stake position. A delegated staking position is comprised of two parts:
A TokenLock with an indefinite expiration
An UpdateDelegatedStake transaction referencing the TokenLock
This transaction can be used to update an existing delegated stake position without requiring a withdrawal first. The updated delegated stake transaction will have all the same details as the original, except with a different nodeId referenced.
Layer
Global L0
Signed By
Source wallet
Fee
Paid in DAG
nodeID
The node ID (pub key) of the node to delegate to.
amount
The amount to delegate. This must match the TokenLock
amount.
fee
An optional fee for the transaction.
tokenLockRef
The hash of the TokenLock
transaction that is being delegated.
parent
A reference to the previous UpdateDelegatedStake
hash and network accepted ordinal for the source address. Prevents replay attacks.
A user-generated transaction to unwind a delegated staking position. After the WithdrawDelegatedStake transaction is accepted, the associated TokenLock will be unlocked by the network after 21 days (measured by epochProgress).
Layer
Global L0
Signed By
Source wallet
Fee
None
stakeRef
The hash of the UpdateDelegatedStake
transaction to unlock.
A user-generated transaction to create a node collateral position. A node collateral position is comprised of two parts:
A TokenLock with an indefinite expiration
An UpdateNodeCollateral transaction referencing the TokenLock
This transaction can be used to update an existing delegated stake position without requiring a withdrawal first. The updated delegated stake transaction will have all the same details as the original, except with a different nodeId referenced.
Layer
Global L0
Signed By
Source wallet
Fee
Paid in DAG
nodeID
The node ID (pub key) of the node to delegate to.
amount
The amount to delegate. This must match the TokenLock
amount.
fee
An optional fee for the transaction.
tokenLockRef
The hash of the TokenLock
transaction that is being delegated.
parent
A reference to the previous Update hash and network accepted ordinal for the source address. Prevents replay attacks.
A user-generated transaction to unwind a node collateral position. After the WithdrawNodeCollateral transaction is accepted, the associated TokenLock will be unlocked by the network after 21 days (measured by epochProgress).
Layer
Global L0
Signed By
Source wallet
Fee
None
collateralRef
The hash of the UpdateNodeCollateral
transaction to unlock.