Bundle

Register

Description:

This function registers a new bundle schema.

Previous Steps:

  1. Create a class

  2. Create an asset

  3. Mint an asset

Steps:

  1. Call the bundle/register endpoint with the following request body:

  • seed: the seed of the account that will pay for the transaction.

  • class_id: the new class identifier that the bundle will manage.

  • asset_id: the new asset identifier that the bundle will manage.

  • schema: this will represent all the classes and assets that need to be present in order to fulfill the other transactions

    • class_ids: an array of the class identifiers that will be part of the schema.

    • asset_ids: an array of asset_ids arrays that will be related to each class_id.

    • amounts: an array of amount arrays that will be related to each asset_id.

  • metadata: additional information about the bundle.

Example Input:

Expected Output:

  • who: the account address associated with the bundle.

  • bundle_id: the bundle identifier.

  • class_id: the class identifier managed by the bundle.

  • asset_id: the asset identifier managed by the bundle.

Mint

Description:

This function mints a bundle.

Previous Steps:

  1. Create an account

Steps:

  1. Call the bundle/mint endpoint with the following request body:

  • seed: the seed of the account that will pay for the transaction.

  • from: the account address of the sender.

  • to: the account address of the receiver.

  • bundle_id: the bundle identifier.

  • amount: the amount to be minted.

Example Input:

Expected Output:

  • who: the account address that paid for the transaction.

  • from: the account address of the sender.

  • to: the account address of the receiver.

  • bundle_id: the bundle identifier.

  • amount: the amount minted.

Last updated