Transactions

Default Blockchain transaction possible from level of GraphQL

Mint NFT

Whole minting process can be handled in single request. The structure should be similar to below:

mutation {
  mintNft(nft: {
    walletAddress: "your_wallet_address"
    assetName: "MyNFT"
    metaData: {
      name: "My NFT token"
      description: "Logosphere is great!"
      image: "ipfs://90238f093824ynf0394y5f01"
    }
  })
}

This scenario require transaction to be sign and submit by SDK. To do that, seed phrase is required to be pass as http-header

{
  "Seed-Phrase": "list of seed words here"
}

As result of this operation you should be able to see minted image in your wallet which address you provide in request param.

Generate NFT minting transaction CBOR

If you don't wish to share the seed phrase with you can still request to generate whole transaction which can be signed manually later. Request will be almost the same as previous one. Http-header is not require in this case.

query {
  mintingNftCbor(nft: {
   ...
  })
}

The query should return transaction CBOR in response.

Mint Assets

Similar like in case of NFT, Native Assets minting process can be handle by single request which should look similar like this one:

mutation {
  mintAssets(asset: {
    walletAddress: "your_wallet_address"
    assets: [
      { name: "FirstAsset", amount: 500 },
      { name: "SecondAsset", amount: 200 }
    ]
  })
} 

To reconstruct the wallet and sign transaction, Http-header contains seed phrase is required.

In result, pointed wallet should contain assets in requested quantity.

Generate Assets minting transaction CBOR

If you don't wish to share seed phrase, SDK could be requested to generate native assets transaction which can be singed by yourself. Request model looks almost the same like previous.

query {
  mintingAssetsCbor(asset: {
    ...
  })
} 

Transaction CBOR should be send as query response

Submit Transfer

If you already have asset in your wallet, SDK can be used to send bunch of them.

mutation {
   transfer(transfer: {
    walletAddress: "your_wallet_address"
    recipients: [
      {
        walletAddress: "firs_recipient_wallet_address"
        policyId: "475679888da910af3507862b33f7549eb9da7898a88b9b54b4ae310f"
        asset: {
          name: "FirstAsset"
          amount: 10
        }
      },
      {
        walletAddress: "second_recipient_wallet_address"
        asset: {
          name: "lovelace"
          amount: 10
        }
      }
    ]
  })
}

In case of send default cardano ADA currency, policyId can be committed

To create, sign and submit transaction, seed phrase will be needed

Generate Transfer transaction CBOR

Like other transactions, Transfer can be created only base of your wallet too. Request looks similar like mutation above

query {
   transferCbor(transfer: {
   ...
  })
}

Tansaction CBOR should be generated as response

Submit Transaction

When you decided either to create transaction yourself or by SDK getting CBOR, you can still use SDK to submit your signed transaction. Request should contain transaction CBOR, like below

mutation {
   submitTransaction(cbor: "your_transaction_cbor_here")
}

This request doesn't require seed phrase to be passed

Last updated