UNPKG

@planetarium/tx

Version:

Creating Libplanet transactions from JavaScript/TypeScript

21 lines (20 loc) 675 B
import { Dictionary } from "@planetarium/bencodex"; import { Address } from "../address.js"; import { FungibleAssetValue } from "../assets.js"; import { BlockHash } from "../blockhash.js"; import { PublicKey } from "../key.js"; /** * Represents an unsigned transaction without actions. Corresponds to * Libplanet's `TxMetadata`. */ export interface TxMetadata { nonce: bigint; publicKey: PublicKey; signer: Address; timestamp: Date; updatedAddresses: Set<Address>; genesisHash: BlockHash | null; gasLimit: bigint | null; maxGasPrice: FungibleAssetValue | null; } export declare function encodeTxMetadata(metadata: TxMetadata): Dictionary;