2

To send ada with cardano-wallet cli, you can do

cardano-wallet transaction create <WALLET_ID> --payment <AMOUNT>@<ADDRESS>

But there is no documentation on how to send native assets.

1 Answer 1

0

Please refere this API documentation for cardano-wallet https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/constructTransaction The

{
  "transaction": "string",
  "coin_selection": {
    "inputs": [
      {
        "address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
        "amount": {
          "quantity": 42000000,
          "unit": "lovelace"
        },
        "assets": [
          {
            "policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
            "asset_name": "",
            "quantity": 0
          }
        ],
        "id": "1423856bc91c49e928f6f30f4e8d665d53eb4ab6028bd0ac971809d514c92db1",
        "derivation_path": [
          "1852H"
        ],
        "index": 0
      }
    ],
    "outputs": [
      {
        "address": "addr1sjck9mdmfyhzvjhydcjllgj9vjvl522w0573ncustrrr2rg7h9azg4cyqd36yyd48t5ut72hgld0fg2xfvz82xgwh7wal6g2xt8n996s3xvu5g",
        "amount": {
          "quantity": 42000000,
          "unit": "lovelace"
        },
        "assets": [
          {
            "policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
            "asset_name": "",
            "quantity": 0
          }
        ]
      }
    ],...

In the above example given on the page, the native assets are included in the transactions.

1
  • it is for the REST api, right? As far as I understand, cli is a wrapper on top of the api. But it is unclear how to do the same from cardano-wallet cli with cardano-cli, you can do cardano-cli transaction build --tx-out <ADDRESS>+<AMOUNT>+"<TOKEN_AMOUNT> <POLICY_ID>.<TOKEN_NAME>" Oct 22, 2021 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.