sui-svelte-wallet-kit
Version:
Svelte 5 wallet kit for Sui: connect wallets, manage accounts, SuiNS, balance, sign transactions/messages
145 lines (144 loc) • 3.9 kB
TypeScript
export function getConnectModal(): any;
export function refreshSuiBalance(targetAddress: any, options?: {}): Promise<any>;
export function setSuiBalanceCacheTTL(ms: any): void;
export function setAccountLabel(name: any): void;
export namespace account {
const value: any;
function setAccount(account: any): void;
function removeAccount(): void;
}
export namespace suiNames {
const value_1: any[];
export { value_1 as value };
export function clear(): void;
}
export namespace suiNamesLoading {
const value_2: boolean;
export { value_2 as value };
}
export namespace suiBalance {
const value_3: any;
export { value_3 as value };
}
export namespace suiBalanceLoading {
const value_4: boolean;
export { value_4 as value };
}
export namespace suiBalanceByAddress {
const value_5: {};
export { value_5 as value };
}
export namespace suiNamesByAddress {
const value_6: {};
export { value_6 as value };
}
export namespace accounts {
const value_7: any[];
export { value_7 as value };
}
export namespace accountsCount {
const value_8: number;
export { value_8 as value };
}
export namespace activeAccountIndex {
const value_9: number;
export { value_9 as value };
}
export function switchAccount(selector: any): boolean;
export namespace wallet {
const value_10: any;
export { value_10 as value };
}
export namespace walletName {
const value_11: any;
export { value_11 as value };
}
export namespace walletIconUrl {
const value_12: any;
export { value_12 as value };
}
export namespace lastWalletSelection {
const value_13: any;
export { value_13 as value };
export function clear(): void;
}
export function connectWithModal(onSelection: any): Promise<{
connected: boolean;
alreadyConnected: boolean;
wallet?: undefined;
installed?: undefined;
cancelled?: undefined;
} | {
wallet: undefined;
installed: boolean;
connected: boolean;
cancelled: boolean;
alreadyConnected?: undefined;
} | {
wallet: any;
installed: boolean;
connected: boolean;
alreadyConnected?: undefined;
cancelled?: undefined;
}>;
export function connect(wallet: any): Promise<void>;
export function disconnect(): void;
export function switchWallet(options?: {}): Promise<{
connected: boolean;
cancelled: boolean;
wallet?: undefined;
installed?: undefined;
skipped?: undefined;
error?: undefined;
} | {
wallet: any;
installed: boolean;
connected: boolean;
skipped: boolean;
cancelled?: undefined;
error?: undefined;
} | {
wallet: any;
installed: boolean;
connected: boolean;
cancelled?: undefined;
skipped?: undefined;
error?: undefined;
} | {
connected: boolean;
error: string;
cancelled?: undefined;
wallet?: undefined;
installed?: undefined;
skipped?: undefined;
}>;
export function signAndExecuteTransaction(transaction: any): Promise<any>;
export function signMessage(message: any): Promise<{
signature: any;
messageBytes: string;
}>;
export function canSignMessage(): boolean;
export const walletAdapters: any[];
export const availableWallets: any[];
export function setModuleWalletDiscovery(adapters: any, wallets: any): void;
export function subscribeWalletDiscovery(callback: any): () => void;
export function initWalletDiscovery(): void;
export default SuiModule;
type SuiModule = {
$on?(type: string, callback: (e: any) => void): () => void;
$set?(props: Partial<$$ComponentProps>): void;
};
declare const SuiModule: import("svelte").Component<{
onConnect: any;
autoConnect?: boolean;
autoSuiNS?: boolean;
autoSuiBalance?: boolean;
children: any;
}, {}, "">;
type $$ComponentProps = {
onConnect: any;
autoConnect?: boolean;
autoSuiNS?: boolean;
autoSuiBalance?: boolean;
children: any;
};