Bash & cURL
Using bash & cURL to build, sign* and submit a custom transaction
Introduction
This guide will show you how to create a custom transaction using bash and cURL.
Objectives
This guide shows the robustness of the Anvil API transaction builder, by sending two assets and ADA to multiple recipients all within a single transaction.
Requirements
A Cardano wallet with 2 assets and at a minimum 20ADA
Two Cardano wallets to send assets and ADA to
A wallet extension to sign the transaction
An API key
Payload
Send 10 ADA + 1 asset to address#1 and Send 5 ADA + 1 asset to address#2
{
"changeAddress": "<sender_address>",
"outputs": [
{
"address": "<receiver_address_1>",
"lovelace": 10_000_000,
"assets": [
{
"policyId": "<policy_id>",
"assetName": "<asset_name>",
"quantity": 1
}
]
},
{
"address": "<receiver_address_2>",
"lovelace": 5_000_000,
"assets": [
{
"policyId": "<policy_id>",
"assetName": "<asset_name>",
"quantity": 1
}
]
}
]
}Usage
Using Bash/cURL
Parameters
Code
Expected Response
Last updated
Was this helpful?

