Deno & Fetch

Requirements

  • A Cardano wallet with sufficient ADA and assets

  • Multiple recipient Cardano wallet addresses

  • Node.js environment (v14+) or Deno runtime

  • Valid API key for authentication

Objectives

This guide demonstrates the flexibility of the Anvil API for creating complex transactions.

What You'll Accomplish:

  • Send different amounts of ADA to multiple recipients

  • Distribute different native assets to different addresses

  • Handle everything in a single transaction

API Request Structure

Payload Format

Send 10 ADA + 1 asset to address#1 and Send 5 ADA + 1 asset to address#2

Implementation

Configuration and Parameters

Request Body

Body Structure for creating a custom transaction using the previously collected values.

API Call (using Node.js and Fetch)

Basic POST call with Fetch

Deno Command

Output

Complete Example (Deno/Node.js)

chevron-rightcustom-transaction.tshashtag

Running the Example

Node.js

Deno

Last updated

Was this helpful?