UNPKG

@dojoengine/predeployed-connector

Version:

Dojo SDK: Build onchain and provable apps faster

31 lines (28 loc) 1.04 kB
import { InjectedConnector } from '@starknet-react/core'; import { WalletAccount } from 'starknet'; import { RequestFn } from '@starknet-io/types-js'; type PredeployedAccountsConnectorOptions = { id: string; name: string; rpc: string; }; type WithAccount<T> = T & { account: PredeployedWalletAccount; }; type PredeployedAccount = { id: string; name: string; account: PredeployedWalletAccount; }; declare class PredeployedAccountsConnector extends InjectedConnector { private options; constructor(options: WithAccount<PredeployedAccountsConnectorOptions>); available(): boolean; } declare class PredeployedWalletAccount extends WalletAccount { private _inner; constructor(base: any, rpc: string); request: RequestFn; } declare function predeployedAccounts(options: PredeployedAccountsConnectorOptions): Promise<PredeployedAccountsConnector[]>; export { type PredeployedAccount, PredeployedAccountsConnector, type PredeployedAccountsConnectorOptions, type WithAccount, predeployedAccounts };