Defined in @typemove/sui
new MoveCoder(client: SuiGrpcClient): MoveCoder;
| Parameter | Type |
|---|
client | SuiGrpcClient |
MoveCoder
AbstractMoveCoder<ModuleWithAddress, SuiEventInput | SuiMoveObjectInput>.constructor
contains(account: string, name: string): boolean;
| Parameter | Type |
|---|
account | string |
name | string |
boolean
AbstractMoveCoder.contains
decodeArray(
entries: any[],
types: TypeDescriptor<any>[],
strict?: boolean
): Promise<any[]>;
| Parameter | Type | Default value |
|---|
entries | any[] | undefined |
types | TypeDescriptor<any>[] | undefined |
strict | boolean | true |
Promise<any[]>
AbstractMoveCoder.decodeArray
decodeBCS(
type: TypeDescriptor,
data: string | Uint8Array<ArrayBufferLike>,
encoding?: Encoding
): Promise<any>;
| Parameter | Type |
|---|
type | TypeDescriptor |
data | string | Uint8Array<ArrayBufferLike> |
encoding? | Encoding |
Promise<any>
decodeCallResult(res: any[], func: string): Promise<any[]>;
| Parameter | Type |
|---|
res | any[] |
func | string |
Promise<any[]>
AbstractMoveCoder.decodeCallResult
decodeEvent<T>(event: Event): Promise<
| TypedEventInstance<T>
| undefined>;
Promise<
| TypedEventInstance<T>
| undefined>
decodeFunctionPayload(payload: MoveCall, inputs: Input[]): Promise<any>;
| Parameter | Type |
|---|
payload | MoveCall |
inputs | Input[] |
Promise<any>
decodeSimulateResult<T extends any[]>(
simulateRes: any,
returnTypeSignatures: string[],
typeArguments?: (
| string
| TypeDescriptor<any>)[]
): Promise<TypedSimulateResults<T>>;
| Type Parameter |
|---|
T extends any[] |
| Parameter | Type |
|---|
simulateRes | any |
returnTypeSignatures | string[] |
typeArguments? | ( | string | TypeDescriptor<any>)[] |
Promise<TypedSimulateResults<T>>
decodeType<T, ST>(typeStruct: ST, type: TypeDescriptor<T>): Promise<T | undefined>;
Promise<T | undefined>
AbstractMoveCoder.decodeType
any
AbstractMoveCoder.encode
encodeArray(entriesDecoded: any[]): any[];
| Parameter | Type |
|---|
entriesDecoded | any[] |
any[]
AbstractMoveCoder.encodeArray
filterAndDecodeEvents<T>(type:
| string
| TypeDescriptor<T>, resources: Event[]): Promise<TypedEventInstance<T>[]>;
Promise<TypedEventInstance<T>[]>
filterAndDecodeObjects<T>(type: TypeDescriptor<T>, objects: SuiMoveObjectInput[]): Promise<DecodedStruct<SuiMoveObjectInput, T>[]>;
Promise<DecodedStruct<SuiMoveObjectInput, T>[]>
filterAndDecodeStruct<T, ST extends Event | SuiMoveObjectInput>(typeMatcher: TypeDescriptor<T>, structsWithTags: ST[]): Promise<DecodedStruct<ST, T>[]>;
Promise<DecodedStruct<ST, T>[]>
AbstractMoveCoder.filterAndDecodeStruct
getBCSType(type: TypeDescriptor): Promise<BcsType<any, any, string>>;
Promise<BcsType<any, any, string>>
getDynamicFields<T1, T2>(
objects: SuiMoveObjectInput[],
keyType?: TypeDescriptor<T1>,
valueType?: TypeDescriptor<T2>
): Promise<Field<T1, T2>[]>;
Promise<Field<T1, T2>[]>
getMoveFunction(type: string): Promise<InternalMoveFunction>;
Promise<InternalMoveFunction>
AbstractMoveCoder.getMoveFunction
getMoveStruct(type: string): Promise<InternalMoveStruct>;
Promise<InternalMoveStruct>
AbstractMoveCoder.getMoveStruct
load(entry: ModuleWithAddress, address: string): InternalMoveModule;
InternalMoveModule
AbstractMoveCoder.load
maybeGetMoveEnum(type: string): Promise<InternalMoveEnum | undefined>;
Promise<InternalMoveEnum | undefined>
AbstractMoveCoder.maybeGetMoveEnum
registerBCSTypes(type: TypeDescriptor): Promise<void>;
Promise<void>