UNPKG

@airgap/etherlink

Version:

The @airgap/etherlink package is an implementation of the ICoinProtocol interface from @airgap/coinlib-core.

20 lines (19 loc) 946 B
import { Amount } from '../../../types/amount'; import { ExtendedPublicKey, PublicKey } from '../../../types/key'; import { _OnlineProtocol } from '../../protocol'; export declare type GetTokenBalancesExtension<T extends _OnlineProtocol> = T extends _OnlineProtocol<any, any, any, any, any, any, any, any, any, infer _PublicKey> ? GetTokenBalances<_PublicKey> : never; interface BaseTokenDetails<_Type extends string> { type: _Type; identifier: string; contractAddress: string; } interface SingleTokenDetails extends BaseTokenDetails<'single'> { } interface MultiTokenDetails extends BaseTokenDetails<'multi'> { tokenId: string; } export declare type TokenDetails = SingleTokenDetails | MultiTokenDetails; export interface GetTokenBalances<_PublicKey extends PublicKey | ExtendedPublicKey = PublicKey> { getTokenBalancesOfPublicKey(publicKey: _PublicKey, tokens: TokenDetails[]): Promise<Record<string, Amount>>; } export {};