Function createSpyreClient
- createSpyreClient(options, thirdweb, connectionManager): ISpyreClient
Parameters
- options: CreateSpyreClientOptions
- thirdweb: ThirdwebClient
- connectionManager: {
activeAccountStore: Store<undefined | Account>;
activeWalletChainStore: Store<undefined | Readonly<ChainOptions & {
rpc: string;
}>>;
activeWalletConnectionStatusStore: Store<ConnectionStatus>;
activeWalletStore: Store<undefined | Wallet>;
addConnectedWallet: ((wallet: Wallet) => void);
connect: ((wallet: Wallet, options?: ConnectManagerOptions) => Promise<Wallet>);
connectedWallets: ReadonlyStore<Wallet[]>;
disconnectWallet: ((wallet: Wallet) => void);
handleConnection: ((wallet: Wallet, options?: ConnectManagerOptions) => Promise<Wallet>);
isAutoConnecting: Store<boolean>;
removeConnectedWallet: ((wallet: Wallet) => void);
setActiveWallet: ((activeWallet: Wallet) => Promise<void>);
switchActiveWalletChain: ((chain: Readonly<ChainOptions & {
rpc: string;
}>) => Promise<void>);
}activeAccountStore: Store<undefined | Account>
activeWalletChainStore: Store<undefined | Readonly<ChainOptions & {
rpc: string;
}>>
activeWalletConnectionStatusStore: Store<ConnectionStatus>
activeWalletStore: Store<undefined | Wallet>
addConnectedWallet: ((wallet: Wallet) => void)
- (wallet): void
Returns void
connect: ((wallet: Wallet, options?: ConnectManagerOptions) => Promise<Wallet>)
- (wallet, options?): Promise<Wallet>
Parameters
- wallet: Wallet
Optional
options: ConnectManagerOptions
Returns Promise<Wallet>
connectedWallets: ReadonlyStore<Wallet[]>
disconnectWallet: ((wallet: Wallet) => void)
- (wallet): void
Returns void
handleConnection: ((wallet: Wallet, options?: ConnectManagerOptions) => Promise<Wallet>)
- (wallet, options?): Promise<Wallet>
Parameters
- wallet: Wallet
Optional
options: ConnectManagerOptions
Returns Promise<Wallet>
isAutoConnecting: Store<boolean>
removeConnectedWallet: ((wallet: Wallet) => void)
- (wallet): void
Returns void
setActiveWallet: ((activeWallet: Wallet) => Promise<void>)
- (activeWallet): Promise<void>
Returns Promise<void>
switchActiveWalletChain: ((chain: Readonly<ChainOptions & {
rpc: string;
}>) => Promise<void>)
- (chain): Promise<void>
Parameters
- chain: Readonly<ChainOptions & {
rpc: string;
}>
Returns Promise<void>
Creates an ISpyreClient instance.