UNPKG

@yubing744/rooch-sdk

Version:
15 lines (14 loc) 1.16 kB
import { AccountAddress, FunctionId, TypeTag, StructTag, Arg } from '../types'; import * as rooch_types from '../types/bcs'; import { bytes as Bytes, Seq, ListTuple, uint8 } from '../types/bcs'; export declare function encodeFunctionCall(functionId: FunctionId, tyArgs: TypeTag[], args: Bytes[]): rooch_types.MoveActionVariantFunction; export declare function typeTagToSCS(ty: TypeTag): rooch_types.TypeTag; export declare function structTagToSCS(data: StructTag): rooch_types.StructTag; export declare function addressToSCS(addr: AccountAddress): rooch_types.AccountAddress; export declare function encodeStructTypeTags(typeArgsString: string[]): TypeTag[]; export declare function encodeStructTypeTag(str: string): TypeTag; export declare function addressToListTuple(ethAddress: string): ListTuple<[uint8]>; export declare function addressToSeqNumber(ethAddress: string): Seq<number>; export declare function encodeArg(arg: Arg): Bytes; export declare const encodeMoveCallData: (funcId: FunctionId, tyArgs: TypeTag[], args: Arg[]) => Uint8Array; export declare const encodeMoveCallDataWithETH: (funcId: FunctionId, tyArgs: TypeTag[], args: Arg[]) => string;