Skip to content

Commit

Permalink
docs: Merge #2712
Browse files Browse the repository at this point in the history
  • Loading branch information
William King Noel Bot committed Jul 19, 2021
1 parent 642b723 commit 55d1075
Showing 1 changed file with 158 additions and 0 deletions.
158 changes: 158 additions & 0 deletions api/edge/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2909,6 +2909,107 @@ components:
"none": *ApiNullStakeKey

ApiMintedBurnedInfo: &ApiMintedBurnedInfo
type: object
required:
- monetary_policy_index
- policy_id
- asset_name
- subject
- script
properties:
monetary_policy_index: *derivationSegment
policy_id: *assetPolicyId
asset_name: *assetName
subject: *assetFingerprint
script:
<<: *ScriptValue
description: The script under which this asset was minted or burned.

ApiMintedBurnedTransaction: &ApiMintedBurnedTransaction
type: object
required:
- transaction
- minted_burned
properties:
transaction:
<<: *ApiTransaction
description: Information about the mint/burn transaction submitted.
minted_burned:
type: array
items: *ApiMintedBurnedInfo
minItems: 1
description: An entry for each unique asset minted and/or burned, containing helpful information.

ApiAssetQuantity: &ApiAssetQuantity
type: object
required:
- quantity
- unit
properties:
quantity:
type: integer
example: 14
unit:
type: string
enum:
- assets

ApiMintData: &ApiMintData
type: object
required:
- receiving_address
- amount
properties:
receiving_address: *addressId
amount: *ApiAssetQuantity

ApiBurnData: &ApiBurnData
allOf:
- *ApiAssetQuantity

ApiMintBurnOperation: &ApiMintBurnOperation
type: object
oneOf:
- title: "mint"
properties:
mint: *ApiMintData
- title: "burn"
properties:
burn: *ApiBurnData

ApiMintBurnData: &ApiMintBurnData
type: object
required:
- asset_name
- operation
properties:
monetary_policy_index:
allOf:
- *derivationSegment
- type: string
default: 0
asset_name: *assetName
operation: *ApiMintBurnOperation

ApiPostMintBurnAssetData: &ApiPostMintBurnAssetData
type: object
required:
- mint_burn
- passphrase
properties:
mint_burn:
type: array
items: *ApiMintBurnData
minItems: 1
passphrase:
<<: *lenientPassphrase
description: The wallet's master passphrase.
metadata: *transactionMetadata
time_to_live: *transactionTTL




#############################################################################
# #
Expand Down Expand Up @@ -3930,6 +4031,30 @@ x-responsesPostSharedWallet: &responsesPostSharedWallet
application/json:
schema: *ApiSharedWallet

x-responsesMintToken: &responsesMintToken
403:
description: Forbidden
content:
application/json:
schema:
oneOf:
- <<: *errInvalidWalletType
- <<: *errAlreadyWithdrawing
- <<: *errUtxoTooSmall
- <<: *errCannotCoverFee
- <<: *errNotEnoughMoney
- <<: *errTransactionIsTooBig
- <<: *errNoRootKey
- <<: *errWrongEncryptionPassphrase
<<: *responsesErr404WalletNotFound
<<: *responsesErr406
<<: *responsesErr415UnsupportedMediaType
202:
description: Accepted
content:
application/json:
schema: *ApiMintedBurnedTransaction

x-responsesPostByronWallet: &responsesPostByronWallet
<<: *responsesErr400
<<: *responsesErr406
Expand Down Expand Up @@ -4662,6 +4787,39 @@ paths:
- *parametersWalletId
responses: *responsesListAssets

post:
operationId: mintBurnAssets
tags: ["Assets"]
summary: Mint/Burn
description: |
<p align="right">status: <strong>under development</strong></p>
Mint and burn assets from the wallet.
We only support the simplest of scripts: those which require a signature
from a single key (known as the policy key). The policy key is generated
from the HD wallet according to to draft CIP-1855
(https://github.com/cardano-foundation/CIPs/blob/b2e9d02cb9a71ba9e754a432c78197428abf7e4c/CIP-1855/CIP-1855.md).
Once the policy key is generated, cardano-wallet creates a script from
that key, which we then mint or burn assets under.
**⚠️ WARNING ⚠️**
Please note that due to the fact that there is no physical access to
policy keys under which assets are minted from the wallet it is
currently not possible to add metadata of such assets into [Cardano Token Registry](https://github.com/cardano-foundation/cardano-token-registry).
parameters:
- *parametersWalletId
requestBody:
required: true
content:
application/json:
schema:
<<: *ApiPostMintBurnAssetData
responses: *responsesMintToken

/wallets/{walletId}/assets/{policyId}/{assetName}:
get:
operationId: getAsset
Expand Down

0 comments on commit 55d1075

Please sign in to comment.