sui-svelte-wallet-kit
Version:
Svelte 5 wallet kit for Sui: connect wallets, manage accounts, SuiNS, balance, sign transactions/messages
44 lines (43 loc) • 3.64 kB
TypeScript
import { PasskeyWalletAdapter } from '../../adapters/PasskeyWalletAdapter.js';
import { MultisigWalletAdapter } from '../../adapters/MultisigWalletAdapter.js';
import { type MultisigConfig, type ResolverContext } from '../../MultisigService/index.js';
import type { ZkLoginGoogleConfig, PasskeyConfig, MultisigModuleConfig, SuiModuleMultisigConfig, SuiAccount, SuiWalletAdapter, WalletWithStatus } from '../types.js';
import type { ConnectionStatus } from '@suiet/wallet-sdk';
export declare const isSuspiciousEnokiConfig: (apiKey: unknown, googleId: unknown) => boolean;
export declare const isMultisigConfig: (config: SuiModuleMultisigConfig | null) => boolean;
export declare const isLegacyMultisigConfig: (config: SuiModuleMultisigConfig | null) => config is MultisigModuleConfig;
export declare const registerEnokiWalletsCallback: (client: any, network: string, zkLoginGoogle: ZkLoginGoogleConfig) => void;
export declare const probeEnokiApiKey: (apiKey: string, network: string) => Promise<boolean | undefined>;
export declare const registerPasskeyWallet: (passkeyConfig: PasskeyConfig, zkLoginGoogle: ZkLoginGoogleConfig | null | undefined, onDiscoveryRefresh: () => void) => PasskeyWalletAdapter | null;
export declare const buildResolverContext: (passkeyAdapter: PasskeyWalletAdapter | null, wallet: WalletWithStatus | undefined, account: SuiAccount | undefined, walletAdapter: SuiWalletAdapter | undefined) => ResolverContext;
export declare const getMultisigConfigKey: (cfg: MultisigModuleConfig) => string;
export declare const registerLegacyMultisigAdapter: (legacyConfig: MultisigModuleConfig, zkLoginGoogle: ZkLoginGoogleConfig | null | undefined, onDiscoveryRefresh: () => void, onAccountUpdate: (account: SuiAccount) => void, onStatusUpdate: (status: ConnectionStatus) => void, onWalletAdapterUpdate: (adapter: SuiWalletAdapter) => void, onConnectionDataUpdate: (data: any) => void, existingAdapter: MultisigWalletAdapter | null) => MultisigWalletAdapter | null;
export declare const initializeNewMultisigConfig: (multisigConfig: MultisigConfig, zkLoginGoogle: ZkLoginGoogleConfig | null | undefined, buildResolverContextFn: () => ResolverContext, signTransactionFn: (tx: any, options?: any) => Promise<{
signature: string;
bytes: Uint8Array;
}>, getCurrentWalletPublicKeyFn: () => Promise<{
publicKey: any;
type: string;
} | null>) => void;
export declare const isPasskeyWallet: (wallet: WalletWithStatus | undefined, passkeyAdapter: PasskeyWalletAdapter | null) => boolean;
export declare const usePasskeyAccount: (wallet: WalletWithStatus | undefined, passkeyAdapter: PasskeyWalletAdapter | null) => {
readonly isPasskey: boolean;
readonly address: string | null;
readonly publicKey: Uint8Array<ArrayBufferLike> | null;
readonly credentialId: any;
getCredential(): Promise<import("../../index.js").PasskeyCredential | null>;
};
export declare const isMultisigWallet: (wallet: WalletWithStatus | undefined, multisigAdapter: MultisigWalletAdapter | null) => boolean;
export declare const useMultisigAccount: (wallet: WalletWithStatus | undefined, multisigAdapter: MultisigWalletAdapter | null) => {
readonly isMultisig: boolean;
readonly address: string | null;
readonly threshold: any;
readonly totalWeight: any;
getConfig(): MultisigConfig | null;
getAvailableSigners(): Promise<import("../../index.js").SignerStatus[]>;
};
export declare const isZkLoginWallet: (walletAdapter: SuiWalletAdapter | undefined) => boolean;
export declare const getZkLoginInfo: (walletAdapter: SuiWalletAdapter | undefined) => Promise<{
session: any;
metadata: any;
} | null>;