UNPKG

@wormhole-foundation/sdk-sui

Version:

SDK for Sui chains, used in conjunction with @wormhole-foundation/sdk

33 lines 1.5 kB
import type { MoveValue, SuiObjectResponse } from "@mysten/sui/client"; import type { PlatformToChains, UniversalOrNative } from "@wormhole-foundation/sdk-connect"; export declare const _platform: "Sui"; export type SuiPlatformType = typeof _platform; export type SuiChains = PlatformToChains<SuiPlatformType>; export type UniversalOrSui = UniversalOrNative<SuiChains>; export type AnySuiAddress = UniversalOrSui | string | Uint8Array; export type SuiBuildOutput = { modules: string[]; dependencies: string[]; }; export declare const getFieldsFromObjectResponse: (object: SuiObjectResponse) => import("@mysten/sui/client").MoveStruct | null; export declare const isSameType: (a: string, b: string) => boolean; export declare const isSuiCreateEvent: <T extends import("@mysten/sui/client").SuiObjectChange, K extends Extract<T, { type: "created"; }>>(event: T) => event is K; export declare const isSuiPublishEvent: <T extends import("@mysten/sui/client").SuiObjectChange, K extends Extract<T, { type: "published"; }>>(event: T) => event is K; export declare function isMoveStructArray(value: any): value is MoveValue[]; export declare function isMoveStructStruct(value: any): value is { fields: { [key: string]: MoveValue; }; type: string; }; export declare function isMoveStructObject(value: any): value is { [key: string]: MoveValue; }; export declare function isMoveStructId(value: any): value is { id: string; }; //# sourceMappingURL=types.d.ts.map