Treasury Pays for Minting (TS/JS + Fetch)

An example of a CIP-68 mint where a central treasury wallet pays the transaction fees, using TypeScript or JavaScript.

This example requires several utility and configuration files. Create the following files in the same directory as your main script.

circle-info

Need to create wallets?

You can use the Anvil Wallet CLI to generate the required wallet JSON files for these examples.

https://github.com/Cardano-Forge/anvil-api-examples/blob/main/utils/constant.ts

You will also need the shared utility functions, which you can find in the utils/shared.tsarrow-up-right file in the examples repository.

This example uses the Wallet Endpoints to fetch UTXOs from the treasury wallet.

Now, you can run the main script:

https://github.com/Cardano-Forge/anvil-api-examples/blob/main/documentation-references/cip68-treasury-pays.ts
circle-check

Last updated

Was this helpful?