import { Address, AddressCursor, AddressWithCursor } from '../types/address'; import { AirGapInterface, ApplicableProtocolExtension } from '../types/airgap'; import { Amount } from '../types/amount'; import { Balance } from '../types/balance'; import { CryptoConfiguration, CryptoDerivative } from '../types/crypto'; import { FeeEstimation } from '../types/fee'; import { ExtendedKeyPair, ExtendedPublicKey, ExtendedSecretKey, KeyPair, PublicKey, SecretKey } from '../types/key'; import { Complement } from '../types/meta/utility-types'; import { ProtocolMetadata, ProtocolNetwork } from '../types/protocol'; import { AirGapTransaction, AirGapTransactionsWithCursor, SignedTransaction, TransactionSimpleConfiguration, TransactionCursor, TransactionDetails, UnsignedTransaction, TransactionFullConfiguration } from '../types/transaction'; export interface BaseGeneric<_AddressCursor extends AddressCursor = AddressCursor, _AddressResult extends Address | AddressWithCursor<_AddressCursor> = Address | AddressWithCursor<_AddressCursor>, _Units extends string = string, _FeeUnits extends string = _Units, _SignedTransaction extends SignedTransaction = SignedTransaction, _UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction> { AddressCursor: _AddressCursor; AddressResult: _AddressResult; Units: _Units; FeeUnits: _FeeUnits; SignedTransaction: _SignedTransaction; UnsignedTransaction: _UnsignedTransaction; } export interface OfflineGeneric<_AddressCursor extends AddressCursor = AddressCursor, _AddressResult extends Address | AddressWithCursor<_AddressCursor> = Address | AddressWithCursor<_AddressCursor>, _CryptoConfiguration extends CryptoConfiguration = CryptoConfiguration, _Units extends string = string, _FeeUnits extends string = _Units, _SignedTransaction extends SignedTransaction = SignedTransaction, _UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction> extends BaseGeneric<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction> { CryptoConfiguration: _CryptoConfiguration; } export interface OnlineGeneric<_AddressCursor extends AddressCursor = AddressCursor, _AddressResult extends Address | AddressWithCursor<_AddressCursor> = Address | AddressWithCursor<_AddressCursor>, _ProtocolNetwork extends ProtocolNetwork = ProtocolNetwork, _Units extends string = string, _FeeUnits extends string = _Units, _FeeEstimation extends FeeEstimation<_FeeUnits> | undefined = FeeEstimation<_FeeUnits> | undefined, _SignedTransaction extends SignedTransaction = SignedTransaction, _UnsignedTransaction extends UnsignedTransaction = UnsignedTransaction, _TransactionCursor extends TransactionCursor = TransactionCursor> extends BaseGeneric<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction> { ProtocolNetwork: _ProtocolNetwork; FeeEstimation: _FeeEstimation; TransactionCursor: _TransactionCursor; } declare type TypedAddressCursor> = Complement['AddressCursor']; declare type TypedAddressResult> = Complement>, G>['AddressResult']; declare type TypedProtocolNetwork> = Complement['ProtocolNetwork']; declare type TypedCryptoConfiguration> = Complement['CryptoConfiguration']; declare type TypedUnits> = Complement['Units']; declare type TypedFeeUnits> = Complement>, G>['FeeUnits']; declare type TypedFeeEstimation> = Complement>, G>['FeeEstimation']; declare type TypedSignedTransaction> = Complement['SignedTransaction']; declare type TypedUnsignedTransaction> = Complement['UnsignedTransaction']; declare type TypedTransactionCursor> = Complement['TransactionCursor']; export interface _BaseProtocol<_AddressCursor extends BaseGeneric['AddressCursor'] = any, _AddressResult extends BaseGeneric['AddressResult'] = any, _Units extends BaseGeneric['Units'] = any, _FeeUnits extends BaseGeneric['FeeUnits'] = any, _SignedTransaction extends BaseGeneric['SignedTransaction'] = any, _UnsignedTransaction extends BaseGeneric['UnsignedTransaction'] = any, _PublicKey extends PublicKey | ExtendedPublicKey = any> { getMetadata(): Promise>; getAddressFromPublicKey(publicKey: _PublicKey): Promise<_AddressResult>; getDetailsFromTransaction(transaction: _UnsignedTransaction | _SignedTransaction, publicKey: _PublicKey): Promise[]>; } export declare type BaseProtocol = {}> = _BaseProtocol, TypedAddressResult, TypedUnits, TypedFeeUnits, TypedSignedTransaction, TypedUnsignedTransaction, PublicKey>; export interface _OfflineProtocol<_AddressCursor extends OfflineGeneric['AddressCursor'] = any, _AddressResult extends OfflineGeneric['AddressResult'] = any, _CryptoConfiguration extends OfflineGeneric['CryptoConfiguration'] = any, _Units extends BaseGeneric['Units'] = any, _FeeUnits extends BaseGeneric['FeeUnits'] = any, _SignedTransaction extends BaseGeneric['SignedTransaction'] = any, _UnsignedTransaction extends BaseGeneric['UnsignedTransaction'] = any, _PublicKey extends PublicKey | ExtendedPublicKey = any, _SecretKey extends SecretKey | ExtendedSecretKey = any, _KeyPair extends KeyPair | ExtendedKeyPair = any> extends _BaseProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, _PublicKey> { getCryptoConfiguration(): Promise<_CryptoConfiguration>; getKeyPairFromDerivative(derivative: CryptoDerivative): Promise; signTransactionWithSecretKey(transaction: _UnsignedTransaction, secretKey: _SecretKey): Promise<_SignedTransaction>; } export declare type OfflineProtocol = {}> = _OfflineProtocol, TypedAddressResult, TypedCryptoConfiguration, TypedUnits, TypedFeeUnits, TypedSignedTransaction, TypedUnsignedTransaction, PublicKey, SecretKey, KeyPair>; export interface _OnlineProtocol<_AddressCursor extends OnlineGeneric['AddressCursor'] = any, _AddressResult extends OnlineGeneric['AddressResult'] = any, _ProtocolNetwork extends OnlineGeneric['ProtocolNetwork'] = any, _Units extends OnlineGeneric['Units'] = any, _FeeUnits extends OnlineGeneric['FeeUnits'] = any, _FeeEstimation extends OnlineGeneric['FeeEstimation'] = any, _SignedTransaction extends OnlineGeneric['SignedTransaction'] = any, _UnsignedTransaction extends OnlineGeneric['UnsignedTransaction'] = any, _TransactionCursor extends OnlineGeneric['TransactionCursor'] = any, _PublicKey extends PublicKey | ExtendedPublicKey = any, _BalanceConfiguration extends Object | undefined = any> extends _BaseProtocol<_AddressCursor, _AddressResult, _Units, _FeeUnits, _SignedTransaction, _UnsignedTransaction, _PublicKey> { getNetwork(): Promise<_ProtocolNetwork>; getTransactionsForPublicKey(publicKey: _PublicKey, limit: number, cursor?: _TransactionCursor): Promise>; getBalanceOfPublicKey(publicKey: _PublicKey, configuration?: _BalanceConfiguration): Promise>; getTransactionMaxAmountWithPublicKey(publicKey: _PublicKey, to: Address[], configuration?: TransactionFullConfiguration<_FeeUnits>): Promise>; getTransactionFeeWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionSimpleConfiguration): Promise<_FeeEstimation>; prepareTransactionWithPublicKey(publicKey: _PublicKey, details: TransactionDetails<_Units>[], configuration?: TransactionFullConfiguration<_FeeUnits>): Promise<_UnsignedTransaction>; broadcastTransaction(transaction: _SignedTransaction): Promise; } export declare type OnlineProtocol = {}> = _OnlineProtocol, TypedAddressResult, TypedProtocolNetwork, TypedUnits, TypedFeeUnits, TypedFeeEstimation, TypedSignedTransaction, TypedUnsignedTransaction, TypedTransactionCursor, PublicKey, undefined>; export declare type _Protocol = _OfflineProtocol & _OnlineProtocol; export interface Protocol = {}> extends OfflineProtocol, OnlineProtocol { } export declare type _AnyProtocol = _OfflineProtocol | _OnlineProtocol; export declare type AnyProtocol = {}> = OfflineProtocol | OnlineProtocol; export declare type AirGapOfflineProtocol = {}, E0 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E1 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E2 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E3 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E4 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E5 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E6 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E7 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E8 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined, E9 extends ApplicableProtocolExtension<_OfflineProtocol> = undefined> = AirGapInterface, E0, E1, E2, E3, E4, E5, E6, E7, E8, E9>; export declare type AirGapOnlineProtocol = {}, E0 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E1 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E2 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E3 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E4 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E5 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E6 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E7 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E8 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined, E9 extends ApplicableProtocolExtension<_OnlineProtocol> = undefined> = AirGapInterface, E0, E1, E2, E3, E4, E5, E6, E7, E8, E9>; export declare type AirGapProtocol = {}, E0 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E1 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E2 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E3 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E4 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E5 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E6 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E7 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E8 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined, E9 extends ApplicableProtocolExtension<_OfflineProtocol & _OnlineProtocol> = undefined> = AirGapInterface, E0, E1, E2, E3, E4, E5, E6, E7, E8, E9>; export declare type AirGapAnyProtocol = {}, E0 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E1 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E2 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E3 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E4 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E5 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E6 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E7 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E8 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined, E9 extends ApplicableProtocolExtension<_OfflineProtocol | _OnlineProtocol> = undefined> = AirGapInterface, E0, E1, E2, E3, E4, E5, E6, E7, E8, E9>; export {};