UNPKG

sendover

Version:

Tools for creating and paying invoices privately on Bitcoin SV

37 lines 1.64 kB
/** * Protocol IDs are two element arrays: [level, name] * * level is an integer value of 0, 1, or 2 specifying the protocol's counterparty permissions policy. * * name is a string which must uniquely identify the protocol. * * Level 0: Open. Any app can use it to talk to anyone without permission. * Level 1: App-bound. Only apps with permission can use the protocol. They can use it in conjunction with any counterparty. * Level 2: Countarparty-bound: Only apps with permission can use the protocol. When permission is granted, it only applies to the specific counterparty being authorized. Other counterparties, even under the same protocol ID, will trigger new permission requests. * * For historical and convenience purposes, a protocol ID may be specified as just a name string * in which case it is promoted to the array [2, name]. * * Protocol names are normalized by the following rules. * All strings that normalize to the same value identify the same protocol. * * Protocol name normalization rules: * - only letters, numbers and spaces * - no multiple space " " * - all lower case when used * - maximum 280 characters * - must be at least 5 characters * - must not end with " protocol" * - leading and trailing spaces are removed * * @param {String} input The protocol to normalize * * @returns {String} The normalized protocol * @private */ export declare function normalizeProtocol(input: any): [number, string]; export declare function getProtocolInvoiceNumber(params: { protocolID: string | [number, string]; keyID: number | string; }): string; //# sourceMappingURL=BRC43Helpers.d.ts.map