CRUD Operations, List of assets, and minting operations.

https://bakrypt.io/v1/assets/ || https://testnet.bakrypt.io/v1/assets/

GET - /v1/assets/ - List of assets.

Use this endpoint to load a list of assets. The result is paginated and filtered by passing specific arguments in the URL.

URL params.

$policy:f3a8c4e9e66565c5966356d5e9d829a63fea85e54d1a0ce5eb2d082b

/v1/assets/?status=confirmed&sort=-created_on&search=$policy. Use “-” for DESC ordering

  • status: preauth, waiting, processing, royalties, burning, rejected, error, refund,
  • canceled, stand-by, confirmed
  • is_auto: 0 or 1 || true or false
  • has_royalties: 0 or 1 || true or false
  • search: Search term to lookup by asset UUID, name, asset_name, image,
  • transaction's UUID, deposit address, policy id, and collection UUID
  • sort: created_on, updated_on or name
  • page: page number of the paginated results

POST - /v1/assets/ - Create Asset or Collection.

The endpoint is used to create assets and collections. You will be making an individual asset if you only send one asset. Individual assets include the entire transaction object in the response. Also, by sending a list of assets, you will create a collection and multiple assets under the same policy; the response will be a list of assets in which each asset includes the UUID of the transaction. The transaction for a collection is retrieved later on using the Transactions API.

  asset -> asset : Asset
     
  List[asset] -> List[asset] : Collection

When creating collections of assets, use the primary asset (the first one from the list) to set minting configurations like royalties and auto processing

PreAuth: Set the parameter "is_auto: false" to create the asset without minting

Single Asset

Collection of Assets

GET - /v1/assets/$uuid/ - Asset Detail

Use this endpoint to return all the information for an asset. This includes properties like name, image, and status of its transaction.

PUT - /v1/assets/$uuid/ - Update a preauth asset

Only preauthorized assets can be updated since these don't initiate the minting process.

PATCH - /v1/assets/$uuid/ - Partial Update a preauth asset.

Only preauthorized assets are allowed to be partially updated.

DELETE - /v1/assets/$uuid/ - Delete non-confirmed asset.

Non-confirmed assets can be deleted. This will trigger a refund before canceling the transaction.

POST - /v1/assets/$uuid/mint/ - Mint Operation

Mint on-demand non-confirmed transaction associated with the asset. Use this endpoint to "manually" mint the transaction for the asset or collection.

URL params.

Transaction can be forced to be minted. This will generate a new policy and set a new invalid_slot. Mint operation can only be forced once.

/v1/assets/?force=true

  • force: true or false

POST - /v1/assets/$uuid/refund/ - Refund Operation

Refund non-confirmed transactions associated with the asset. The transaction will be refunded and later canceled.