@samouraiwallet/auth47
Version:
A JS implementation of the Auth47 protocol
24 lines • 936 B
TypeScript
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