import { Cardano } from '@cardano-sdk/core'; import { Ed25519PublicKeyHex } from '@cardano-sdk/crypto'; import { HexBlob } from '@cardano-sdk/util'; import { Runtime } from 'webextension-polyfill'; export declare type Bytes = string; export declare type Cbor = string; export declare type Paginate = { page: number; limit: number; }; declare type CoseSign1CborHex = HexBlob; declare type CoseKeyCborHex = HexBlob; export interface Cip30DataSignature { key: CoseKeyCborHex; signature: CoseSign1CborHex; } export declare type WalletApiExtension = { cip: number; }; export declare type GetNetworkId = () => Promise; export declare type GetUtxos = (amount?: Cbor, paginate?: Paginate) => Promise; export declare type GetCollateral = (params?: { amount?: Cbor; }) => Promise; export declare type GetBalance = () => Promise; export declare type GetExtensions = () => Promise; export declare type GetUsedAddresses = (paginate?: Paginate) => Promise; export declare type GetUnusedAddresses = () => Promise; export declare type GetChangeAddress = () => Promise; export declare type GetRewardAddresses = () => Promise; export declare type SignTx = (tx: Cbor, partialSign?: Boolean) => Promise; export declare type SignData = (addr: Cardano.PaymentAddress | Cardano.RewardAccount | Bytes, payload: Bytes) => Promise; export declare type SubmitTx = (tx: Cbor) => Promise; export interface Cip30WalletApi { getNetworkId: GetNetworkId; getUtxos: GetUtxos; getBalance: GetBalance; getCollateral: GetCollateral; getExtensions: GetExtensions; getUsedAddresses: GetUsedAddresses; getUnusedAddresses: GetUnusedAddresses; getChangeAddress: GetChangeAddress; getRewardAddresses: GetRewardAddresses; signTx: SignTx; signData: SignData; submitTx: SubmitTx; experimental?: any; } export interface Cip95WalletApi { getRegisteredPubStakeKeys: () => Promise; getUnregisteredPubStakeKeys: () => Promise; getPubDRepKey: () => Promise; signData: SignData; } export interface Cip142WalletApi { getNetworkMagic: () => Promise; } export declare type WalletApi = Cip30WalletApi & Cip95WalletApi & Cip142WalletApi; export declare type WalletMethod = keyof WalletApi; export interface CipExtensionApis { cip95: Cip95WalletApi; cip142: Cip142WalletApi; } export declare type Cip30WalletApiWithPossibleExtensions = Cip30WalletApi & Partial; export declare type SenderContext = { sender: Runtime.MessageSender; }; declare type FnWithSender = T extends (...args: infer Args) => infer R ? (context: SenderContext, ...args: Args) => R : T; export declare type WithSenderContext = { [K in keyof T]: FnWithSender; }; export {}; //# sourceMappingURL=types.d.ts.map