Sending Transactions

This page goes over how to build an inbound MAYAChain transaction for each chain type.

Confirm you have:

You are ready to make the transaction and swap via MAYAChain.

UTXO Chains

circle-exclamation
circle-exclamation
circle-info

Memo limited to 80 bytes on BTC. Use abbreviated options and MAYANames where possible.

circle-exclamation
triangle-exclamation

EVM Chains

circle-info

ETH is 0x0000000000000000000000000000000000000000

triangle-exclamation

COSMOS Chains

MAYAChain

To initiate a $CACAO-> $ASSET swap a MsgDeposit must be broadcasted to the MAYAChain blockchain. The MsgDeposit does not have a destination address, and has the following properties. The full definition can be found herearrow-up-right.

If you are using Javascript, CosmJSarrow-up-right is the recommended package to build and broadcast custom message types. Here is a walkthrougharrow-up-right.

circle-exclamation

Code Examples (Javascript)

  1. Generate codec files. To build/broadcast native transactions in Javascript/Typescript, the protobuf files need to be generated into js types. The below script uses pbjs and pbts to generate the types using the relevant files from the MAYANode repo. Alternatively, the .js and .d.ts files can be downloaded directly from the XChainJS repoarrow-up-right.

  1. Using @cosmjs build/broadcast the TX.

Last updated

Was this helpful?