@kanalabs/mirai
Version:
Mirai - Account Abstraction SDK (EVM + non-EVM)
61 lines (60 loc) • 2.24 kB
TypeScript
import { PrimeSdk, WalletProviderLike } from '@etherspot/prime-sdk';
import { NetworkNames } from './network';
import { providers } from 'ethers';
import { ERC20Helper } from '../utils/erc20-helper';
import { ERC721Helper } from '../utils/erc721-helper';
import { ERC1155Helper } from '../utils/erc1155-helper';
import { AptosWallet } from '@kanalabs/aptos-smart-wallet';
import { GatewayOptions } from './Interfaces';
export declare const initializeSdkGateway: (walletProvider: WalletProviderLike, options: GatewayOptions) => Promise<SDKGateway>;
export declare class SDKGateway {
instances: {
[network: string]: PrimeSdk | AptosWallet;
};
contractAddress: {
[network: string]: string;
};
private rpcUrl;
walletProvider: WalletProviderLike;
activeNetworks: {
name: NetworkNames;
active: any;
}[];
sponsor?: any;
paymasterApi?: {
url: string;
context: any;
api_key: string;
} | any;
currentInstance?: PrimeSdk | AptosWallet;
currentNetwork?: NetworkNames;
chainId: any;
accountAddress?: string;
bundlerApiKey?: any;
static getBalances: any;
constructor(walletProvider: WalletProviderLike, options: GatewayOptions);
setCurrentInstance(network: NetworkNames): PrimeSdk;
getAptosInstance(network: NetworkNames): AptosWallet;
initialize(network?: NetworkNames): Promise<{
[network: string]: string;
}>;
destroy(network?: NetworkNames): Promise<void>;
getNativeBalance(network?: NetworkNames): Promise<string | {
[key: string]: string;
}>;
erc20(tokenAddress: string, network?: NetworkNames): ERC20Helper;
erc721(collectionAddress: string, network?: NetworkNames): ERC721Helper;
erc1155(collectionAddress: string, network?: NetworkNames): ERC1155Helper;
getProvider(network: NetworkNames): providers.JsonRpcProvider;
private initializeOne;
private initializeAll;
private destroyOne;
private destroyAll;
private getAccountNativBalOne;
private getAccountNativeBalAll;
isNetworkActive(networkName: string): boolean;
private isAptosNetwork;
private isKanaNetwork;
private isMainnetNetwork;
private isTestnetNetwork;
}