UNPKG

calimero-wallet-utils

Version:
25 lines (24 loc) 930 B
import { keyStores, Near } from 'near-api-js'; import * as NearAPI from 'near-api-js'; export interface ICalimeroConfig { shardId: string; calimeroUrl: string; rpcEndpoint: string; walletNetworkId: string; } export declare class CalimeroWalletUtils { static init(config: ICalimeroConfig): CalimeroWalletUtils; private config; private constructor(); fetchChallenge(): Promise<any>; signatureForChallenge(accountId: string, signer: NearAPI.Signer, challenge: string): Promise<{ challenge: string; signature: string; publicKey: string; accountId: string; }>; generatePrivateShardXSignature(accountId: string, signer: NearAPI.Signer): Promise<string>; syncPrivateShardAccount(accountId: string, signer: NearAPI.Signer): Promise<void>; getCalimeroConnection(keyStore: keyStores.KeyStore, xSignature: string): Promise<Near>; private syncAccount; }