- Home
- Skills
- Multiversx
- Mx Ai Skills
- Mvx Sdk Go Builders
mvx_sdk_go_builders_skill
10
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill multiversx/mx-ai-skills --skill mvx_sdk_go_builders- SKILL.md2.2 KB
Overview
This skill demonstrates how to construct, sign, and prepare transactions using the MultiversX Go SDK builders. It focuses on the TxBuilder pattern, manual transaction creation, contract interaction payloads, token transfers (native and ESDT), relayed transactions, and serialization. The goal is to get developers from raw fields to a signed transaction ready for broadcast.
How this skill works
You create a data.Transaction object, populate canonical fields (Nonce, Value, Sender, Receiver, GasPrice, GasLimit, Data, ChainID, Version), then use TxBuilder.ApplySignature to attach the sender signature and derived sender metadata. For contract calls and ESDT transfers the Data field encodes function name and hex-encoded args (e.g., "ESDTTransfer@<tokenHex>@<amountHex>"). For relayed flows you sign an inner user transaction, embed its bytes and signature into a relayer transaction Data payload, then the relayer publishes it.
When to use it
- When manually constructing simple EGLD or ESDT transfers from backend services.
- When invoking smart contract functions that require encoded arguments.
- When building relayed transactions where a relayer submits an inner signed tx.
- When serializing transactions for storage, inspection, or cross-service transfer.
- When you need programmatic signing flow integrated into server-side key management.
Best practices
- Validate all transaction fields before signing: addresses, nonces, chain ID and version.
- Keep monetary values as decimal strings or hex when required; avoid native int overflow.
- Use the correct ChainID (e.g., '1', 'D', 'T') and consistent Version for the network.
- Estimate GasLimit via simulation if possible; otherwise add safe headroom to avoid failure.
- Always marshal and inspect the transaction bytes you sign to ensure payload correctness.
Example use cases
- Server constructs and signs a 1 EGLD payment, then broadcasts the signed tx to a gateway.
- Backend prepares an ESDT transfer by building Data = "ESDTTransfer@tokenHex@amountHex" and signs it.
- A relayer service embeds a user-signed inner transaction and signature into a relayer tx for gas sponsorship.
- CLI tooling that serializes transactions to JSON for offline signing and later submission.
- Automated contract deployment or interaction scripts using generated contract builders that follow the same TxBuilder flow.
FAQ
Represent large amounts as decimal strings in Value or hex-encoded strings for ESDT arguments to avoid integer overflow.
How do I sign a relayed transaction?
Sign the inner user transaction bytes to get a signature, then embed innerTxBytesHex and signatureHex into relayerTx.Data as the relayed payload before the relayer signs.