Working with QEDIT Assets

Nodes, wallets, and rules are essentially the infrastructure for issuing and transfering assets. The QEDIT API makes it simple to issue and transfer assets.

Issuing an asset

Issuance of new assets are done by wallets that are permitted to do so by the issuance rules. Issuance of new assets can be done publicly or privately (if permitted). Public issuance disclose to other QEDIT nodes the issuer, the asset ID and the amount being issued. It does not disclose to whom the asset is issued. Such issuance is suitable in some cases, for example the issuance of stocks or bonds, when it is expected everyone to know that total amount in circulation. Private issuance disclosed to other QEDIT nodes the issuer and which issuance rule is being invoked. It does not disclose the asset ID, the amount being issued, and to whom the asset is issued. An issuance can include a memo which will viewable by the receiving party.

Request

 POST /node/issue_asset
{
  "wallet_id": "source_wallet",
  "authorization": "PrivacyIsAwesome",
  "recipient_address": "q1dxlf6vap2566t8w3z8f5j5lxy9n036zfsaytjve7fedsw6w8c9q9ctrwfz6ryyjwkgvj6tjg70f",
  "amount": 4,
  "asset_id": "bank-a.loans.1",
  "confidential": true,
  "memo": ""
}

Response

{
  "id": "70a88558-2b8b-4b63-a5b6-2c54b24377f5"
}

Transferring an asset

An asset is transferred from a wallet to an address of another wallet. All transfers are private and do not reveal who is the sender, who is the receiver, what asset they are transferring, and what amount. A transfer can include a memo which will be visible to the receiving party. The sender can specify that the transfer requires confirming by the receiving party. In such a case, the transfer will not be final until the receipient confirms the transfer. Prior to the transfer being final, the sender can cancel the transfer by cancelling the transfer task.

Request

POST /wallet/transfer_asset
{
  "wallet_id": "source_wallet",
  "authorization": "PrivacyIsAwesome",
  "recipient_address": "q1dxlf6vap2566t8w3z8f5j5lxy9n036zfsaytjve7fedsw6w8c9q9ctrwfz6ryyjwkgvj6tjg70f",
  "asset_id": "bank-a.loans.1",
  "amount": 4,
  "memo": "",
  "require_confirmation_from": "bf45ab74bd4a46fe7a2432ba05e2f726bf4fe42a80052849e13e2541230d3204"
}

Response

{
  "id": "70a88558-2b8b-4b63-a5b6-2c54b24377f5"
}