sendover
Version:
Tools for creating and paying invoices privately on Bitcoin SV
24 lines • 1.49 kB
TypeScript
/// <reference types="node" />
import bsv from 'babbage-bsv';
/**
* Returns a private key for use by the recipient, given the sender's public key, the recipient's private key and the invoice number.
*
* @param params All parametera ere provided in an object
* @param params.recipientPrivateKey The private key of the recipient in WIF format
* @param params.senderPublicKey The public key of the sender in hexadecimal DER format
* @param params.invoiceNumber The invoice number that was used
* @param params.revealCounterpartyLinkage=false When true, reveals the root shared secret between the two counterparties rather than performing key derivation, returning it as a hex string
* @param params.revealPaymentLinkage=false When true, reveals the secret between the two counterparties used for this specific invoice number, rather than performing key derivation. Returns the linkage as a hex string
* @param params.returnType=wif The incoming payment key return type, either `wif` or `hex`
*
* @returns The incoming payment key that can unlock the money.
*/
export declare function getPaymentPrivateKey(params: {
recipientPrivateKey: string | bsv.crypto.BN | bsv.PrivateKey;
senderPublicKey: string | bsv.PublicKey;
invoiceNumber: string;
revealCounterpartyLinkage?: boolean;
revealPaymentLinkage?: boolean;
returnType?: 'wif' | 'hex' | 'buffer' | 'babbage-bsv';
}): string | Buffer | bsv.PrivateKey;
//# sourceMappingURL=getPaymentPrivateKey.d.ts.map