UNPKG

@samouraiwallet/auth47

Version:
24 lines 936 B
import { TinySecp256k1Interface } from '@samouraiwallet/bip47'; import * as utils from '@samouraiwallet/bip47/utils'; import { bitcoinMessageFactory } from '@samouraiwallet/bitcoinjs-message'; import { type Proof, type GenerateURIArgs } from './decoders.js'; type TinySecp256k1InterfaceJoined = TinySecp256k1Interface & Parameters<typeof bitcoinMessageFactory>[0]; type OkResult = { result: 'ok'; data: Proof; }; type ErrorResult = { result: 'error'; error: string; }; export type VerifyResult = OkResult | ErrorResult; export declare class Auth47Verifier { private readonly bip47; private readonly bitcoinjsMessage; private readonly callbackUri; constructor(ecc: TinySecp256k1InterfaceJoined, callbackUri: string); generateURI(args: GenerateURIArgs): string; verifyProof(proof: unknown, networkString?: keyof typeof utils.networks): VerifyResult; } export {}; //# sourceMappingURL=index.d.ts.map