@orbs-network/contracts-js
Version:
Provides easy to use JS (TS) interfaces to interact with the Orbs Ethereum contracts
19 lines (15 loc) • 642 B
text/typescript
export interface ICryptoWalletConnectionService {
readonly hasEthereumProvider: boolean;
readonly hasEventsSupport: boolean;
readonly isMetamaskInstalled: boolean;
readonly isSemiCompliantEthereumProviderInstalled: boolean;
// Getters
readEthereumBalance: (address: string) => Promise<number>;
didUserApproveDappInThePast: boolean;
readMainAddress: () => Promise<string>;
readCurrentBlockNumber: () => Promise<number>;
getIsMainNetwork: () => Promise<boolean>;
requestConnectionPermission: () => Promise<boolean>;
// Event listeners
onMainAddressChange: (onChange: (mainAddress: string) => void) => () => void;
}