Aggregated Transactions merge multiple transactions into one, allowing trustless swaps, and other advanced logic. Sirius Chain does this by generating a one-time disposable smart contract.
When all involved accounts have cosigned the aggregate transaction, all the inner transactions are executed at the same time.
An aggregate transaction is complete when all the required participants have signed it.
The cosigners can sign the transaction without using the blockchain. Once it has all the required signatures, one of them can announce it to the network. If the inner transaction setup is valid, and there is no validation error, the transactions will get executed at the same time.
Aggregate complete transactions enable adding more transactions per block by gathering multiple inner transactions.
An aggregate transaction is bonded when it requires signatures from other participants.
Before announcing an aggregate bonded transaction, an account must announce and get confirmed a hash lock transaction locking
Once an aggregate bonded is announced, it reaches partial state and notifies its status through WebSockets or HTTP API calls.
Every time a cosignatory signs the transaction and announces an aggregate bonded cosignature, the network checks if all the required cosigners have signed. When all signatures are acquired, the transaction changes to unconfirmed state until the network includes it in a block.
Dan announces an aggregate transaction that merges two transfer transactions.
As Dan is the only required signatory, the transaction is considered complete after he signed. After announcing it to the network, Alice and Bob will receive the mosaics at the same time.
Multi-Asset Escrowed Transactions
In this example, Alice is buying tickets with
currency.euro mosaic. When the ticket distributor cosigns the aggregate transaction, the swap will happen atomically.
Paying for others fees
Alice sends 10
currency.euro to Bob using an app to make payments. But Alice doesn’t own xpx to pay the transaction fee.
By creating an aggregate bonded transaction, Alice can convert EUR to
xpx to pay the fee. Now, Alice and Bob can use Sirius Chain without ever having to buy or hold
Since the app creator can put their own branding on the open source payment app, Alice and Bob may not even know they are using blockchain.
We recommend checking out setting up your workstation before going through the guides.
HOw to seend transactions to different accounts atomically using an aggregate complete transaction.
How to create an escrow with aggregate bonded transactions.
How to ask an account to send you funds using an aggregate bonded transaction.
How to sign announced aggregate bonded transaction that all required co-signers have not signed it yet.
Send a transaction involving a multisig and learn how an aggregate bonded transaction works.
Configuration parameters are editable . Public network configuration may differ.
|payloadSize||uint8||The transaction payload size in bytes. In other words, the total number of bytes was occupied by all inner transactions.|
|transactions||array(byte, payloadSize)||The array of transactions initiated by different accounts. An aggregate transaction can contain up to |
|cosignatures||array(byte, size - payloadSize)||An array of transaction cosignatures.|
Cosignature transactions are used to sign announced aggregate bonded transactions with missing cosignatures.
|parentHash||32 bytes (binary)||The aggregate bonded transaction hash to cosign.|
|signer||32 bytes (binary)||The cosigner public key.|
|signature||64 bytes (binary)||The transaction signature.|
Announce a hash lock transaction before sending a signed aggregate bonded transaction. This mechanism is required to prevent network spamming.
Once the related aggregate bonded transaction is confirmed, locked funds become available again in the account that signed the initial hash lock transaction.
If the aggregate bonded transaction duration is reached without being signed by all cosignatories, the locked amount is collected by the block Validator at the height where the lock expires.
Entity type: 0x4148
|mosaic||Mosaic||Locked mosaic, must be at least |
|duration||uint64||The lock duration.|
|hash||32 bytes (binary)||The aggregate bonded transaction hash that has to be confirmed before unlocking the mosaics.|