@avalanche-sdk/client
Version:
A TypeScript SDK for interacting with the Avalanche network through JSON-RPC APIs. This SDK provides a comprehensive set of tools to interact with all Avalanche chains (P-Chain, X-Chain, C-Chain) and various APIs, including wallet functionality for transa
27 lines • 1.26 kB
TypeScript
/**
* Builds UTXO bytes from the given UTXO parameters.
* @param txHash - The transaction hash of the transaction which created this output.
* @param outputIndex - The index of the output in the transaction which created this output.
* @param assetId - The asset ID of the created output.
* @param amount - The amount of the asset held in this output.
* @param addresses - The addresses who can sign the transaction for consuming this output.
* @param locktime - The UNIX timestamp in seconds after which this output can be consumed.
* @param threshold - The threshold of the addresses who can sign the transaction for consuming this output.
* @returns The UTXO hex string.
*
* @example
* ```ts
* import { buildUtxoBytes } from "@avalanche-sdk/client/utils";
* const utxoBytes = buildUtxoBytes(
* "mYxFK3CWs6iMFFaRx4wmVLDUtnktzm2o9Mhg9AG6JSzRijy5V",
* 0,
* "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK",
* "111947",
* ["P-fuji1nv6w7m6egkwhkcvz96ze3qmzyk5gt6csqz7ejq"],
* "0",
* 1
* );
* ```
*/
export declare function buildUtxoBytes(txHash: string, outputIndex: number, assetId: string, amount: string, addresses: string[], locktime: string, threshold: number): `0x${string}`;
//# sourceMappingURL=buildUtxoBytes.d.ts.map