UNPKG

@wormhole-foundation/sdk-sui

Version:

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

35 lines 1.48 kB
import type { Address } from "@wormhole-foundation/sdk-connect"; import { UniversalAddress } from "@wormhole-foundation/sdk-connect"; import type { AnySuiAddress } from "./types.js"; export declare const SuiZeroAddress = "0x"; export declare const isValidSuiType: (str: string) => boolean; export declare const trimSuiType: (type: string) => string; export declare function zpadSuiAddress(address: string): string; export declare const normalizeSuiType: (type: string) => string; export declare const getCoinTypeFromPackageId: (packageId: string) => string; export declare const getPackageIdFromType: (type: string) => string; export declare const getTableKeyType: (tableType: string) => string; export declare class SuiAddress implements Address { static readonly byteSize = 32; static readonly platform = "Sui"; readonly address: Uint8Array; readonly module: string | undefined; constructor(address: AnySuiAddress); unwrap(): string; toString(): string; toNative(): this; toUint8Array(): Uint8Array; toUniversalAddress(): UniversalAddress; getPackageId(): string; getCoinType(): string; static instanceof(address: any): address is SuiAddress; equals(other: SuiAddress | UniversalAddress): boolean; } declare module "@wormhole-foundation/sdk-connect" { namespace WormholeRegistry { interface PlatformToNativeAddressMapping { Sui: SuiAddress; } } } //# sourceMappingURL=address.d.ts.map