import { z } from "zod"; import { type CounterPartyDataOptions } from "./CounterPartyData.js"; import { Currency } from "./Currency.js"; import { KycStatus } from "./KycStatus.js"; import { type SettlementOption } from "./Settlement.js"; /** The response to the LnurlpRequest. It is sent by the VASP that is receiving the payment to provide information to the sender about the receiver. */ export declare class LnurlpResponse { /** The URL that the sender will call for the payreq request. */ callback: string; /** The minimum amount that the sender can send in millisatoshis. */ minSendable: number; /** The maximum amount that the sender can send in millisatoshis. */ maxSendable: number; /** JSON-encoded metadata that the sender can use to display information to the user. */ metadata: string; /** Compliance-related data from the receiving VASP. Required for UMA. */ compliance?: LnurlComplianceResponse | undefined; /** * The version of the UMA protocol that VASP2 has chosen for this transaction based on its own support and VASP1's specified preference in the LnurlpRequest. * For the version negotiation flow, see https://static.swimlanes.io/87f5d188e080cb8e0494e46f80f2ae74.png */ umaVersion?: string | undefined; /** The list of currencies that the receiver accepts in order of preference. */ currencies?: Currency[] | undefined; /** The data about the payer that the sending VASP must provide in order to send a payment. */ payerData?: CounterPartyDataOptions | undefined; /** * The number of characters that the sender can include in the comment field of the pay request. */ commentAllowed?: number | undefined; /** * An optional nostr pubkey used for nostr zaps (NIP-57). If set, it should be a valid * BIP-340 public key in hex format. */ nostrPubkey?: string | undefined; /** * Should be set to true if the receiving VASP allows nostr zaps (NIP-57). */ allowsNostr?: boolean | undefined; /** * The list of settlement options that the receiver supports. If not specified, * the payment will be settled on Lightning using BTC as the settlement asset. */ settlementOptions?: SettlementOption[] | undefined; tag: string; constructor( /** The URL that the sender will call for the payreq request. */ callback: string, /** The minimum amount that the sender can send in millisatoshis. */ minSendable: number, /** The maximum amount that the sender can send in millisatoshis. */ maxSendable: number, /** JSON-encoded metadata that the sender can use to display information to the user. */ metadata: string, /** Compliance-related data from the receiving VASP. Required for UMA. */ compliance?: LnurlComplianceResponse | undefined, /** * The version of the UMA protocol that VASP2 has chosen for this transaction based on its own support and VASP1's specified preference in the LnurlpRequest. * For the version negotiation flow, see https://static.swimlanes.io/87f5d188e080cb8e0494e46f80f2ae74.png */ umaVersion?: string | undefined, /** The list of currencies that the receiver accepts in order of preference. */ currencies?: Currency[] | undefined, /** The data about the payer that the sending VASP must provide in order to send a payment. */ payerData?: CounterPartyDataOptions | undefined, /** * The number of characters that the sender can include in the comment field of the pay request. */ commentAllowed?: number | undefined, /** * An optional nostr pubkey used for nostr zaps (NIP-57). If set, it should be a valid * BIP-340 public key in hex format. */ nostrPubkey?: string | undefined, /** * Should be set to true if the receiving VASP allows nostr zaps (NIP-57). */ allowsNostr?: boolean | undefined, /** * The list of settlement options that the receiver supports. If not specified, * the payment will be settled on Lightning using BTC as the settlement asset. */ settlementOptions?: SettlementOption[] | undefined); isUma(): this is { compliance: LnurlComplianceResponse; umaVersion: string; currencies: Currency[]; payerData: CounterPartyDataOptions; }; signablePayload(): string; toJsonSchemaObject(): z.infer; toJsonString(): string; /** * Appends a backing signature to the LnurlpResponse. * * @param signingPrivateKey The private key used to sign the payload * @param domain The domain of the VASP that is signing the payload. The associated public key will be fetched from * /.well-known/lnurlpubkey on this domain to verify the signature. * @returns A new LnurlpResponse with the additional backing signature */ appendBackingSignature(signingPrivateKey: Uint8Array, domain: string): Promise; static fromJson(jsonStr: string): LnurlpResponse; static parse(data: any): LnurlpResponse; } /** LnurlComplianceResponse is the `compliance` field of the LnurlpResponse. */ declare const LnurlpComplianceResponseSchema: z.ZodObject<{ /** KycStatus indicates whether VASP2 has KYC information about the receiver. */ kycStatus: z.ZodNativeEnum; /** Signature is the base64-encoded signature of sha256(ReceiverAddress|Nonce|Timestamp). */ signature: z.ZodString; /** Nonce is a random string that is used to prevent replay attacks. */ signatureNonce: z.ZodString; /** Timestamp is the unix timestamp of when the request was sent. Used in the signature. */ signatureTimestamp: z.ZodNumber; /** IsSubjectToTravelRule indicates whether VASP2 is a financial institution that requires travel rule information. */ isSubjectToTravelRule: z.ZodBoolean; /** ReceiverIdentifier is the identifier of the receiver at VASP2. */ receiverIdentifier: z.ZodString; /** BackingSignatures is a list of backing signatures from VASPs that can attest to the authenticity of the message. */ backingSignatures: z.ZodOptional>, { signature: string; domain: string; }[] | undefined, { signature: string; domain: string; }[] | null>>; }, "strip", z.ZodTypeAny, { isSubjectToTravelRule: boolean; kycStatus: KycStatus; signature: string; signatureNonce: string; signatureTimestamp: number; receiverIdentifier: string; backingSignatures?: { signature: string; domain: string; }[] | undefined; }, { isSubjectToTravelRule: boolean; kycStatus: KycStatus; signature: string; signatureNonce: string; signatureTimestamp: number; receiverIdentifier: string; backingSignatures?: { signature: string; domain: string; }[] | null | undefined; }>; export type LnurlComplianceResponse = z.infer; declare const LnurlpResponseSchema: z.ZodObject<{ tag: z.ZodString; callback: z.ZodString; minSendable: z.ZodNumber; maxSendable: z.ZodNumber; metadata: z.ZodString; currencies: z.ZodOptional>, ({ symbol: string; name: string; code: string; multiplier: number; decimals: number; convertible: { min: number; max: number; }; } | { symbol: string; name: string; code: string; multiplier: number; decimals: number; minSendable: number; maxSendable: number; })[] | undefined, ({ symbol: string; name: string; code: string; multiplier: number; decimals: number; convertible: { min: number; max: number; }; } | { symbol: string; name: string; code: string; multiplier: number; decimals: number; minSendable: number; maxSendable: number; })[] | null>>; payerData: z.ZodOptional, z.ZodTypeDef, Record>>, Record | undefined, Record | null>>; compliance: z.ZodOptional>, { isSubjectToTravelRule: boolean; kycStatus: KycStatus; signature: string; signatureNonce: string; signatureTimestamp: number; receiverIdentifier: string; backingSignatures?: { signature: string; domain: string; }[] | null | undefined; } | undefined, { isSubjectToTravelRule: boolean; kycStatus: KycStatus; signature: string; signatureNonce: string; signatureTimestamp: number; receiverIdentifier: string; backingSignatures?: { signature: string; domain: string; }[] | null | undefined; } | null>>; umaVersion: z.ZodOptional>, string | undefined, string | null>>; commentAllowed: z.ZodOptional>, number | undefined, number | null>>; nostrPubkey: z.ZodOptional>, string | undefined, string | null>>; allowsNostr: z.ZodOptional>, boolean | undefined, boolean | null>>; settlementOptions: z.ZodOptional; }[]; }[], z.ZodTypeDef, { settlementLayer: string; assets: { identifier: string; multipliers: Record; }[]; }[]>>, { settlementLayer: string; assets: { identifier: string; multipliers: Record; }[]; }[] | undefined, { settlementLayer: string; assets: { identifier: string; multipliers: Record; }[]; }[] | null>>; }, "strip", z.ZodTypeAny, { minSendable: number; maxSendable: number; callback: string; tag: string; metadata: string; compliance?: { isSubjectToTravelRule: boolean; kycStatus: KycStatus; signature: string; signatureNonce: string; signatureTimestamp: number; receiverIdentifier: string; backingSignatures?: { signature: string; domain: string; }[] | null | undefined; } | undefined; umaVersion?: string | undefined; currencies?: ({ symbol: string; name: string; code: string; multiplier: number; decimals: number; convertible: { min: number; max: number; }; } | { symbol: string; name: string; code: string; multiplier: number; decimals: number; minSendable: number; maxSendable: number; })[] | undefined; payerData?: Record | undefined; commentAllowed?: number | undefined; nostrPubkey?: string | undefined; allowsNostr?: boolean | undefined; settlementOptions?: { settlementLayer: string; assets: { identifier: string; multipliers: Record; }[]; }[] | undefined; }, { minSendable: number; maxSendable: number; callback: string; tag: string; metadata: string; compliance?: { isSubjectToTravelRule: boolean; kycStatus: KycStatus; signature: string; signatureNonce: string; signatureTimestamp: number; receiverIdentifier: string; backingSignatures?: { signature: string; domain: string; }[] | null | undefined; } | null | undefined; umaVersion?: string | null | undefined; currencies?: ({ symbol: string; name: string; code: string; multiplier: number; decimals: number; convertible: { min: number; max: number; }; } | { symbol: string; name: string; code: string; multiplier: number; decimals: number; minSendable: number; maxSendable: number; })[] | null | undefined; payerData?: Record | null | undefined; commentAllowed?: number | null | undefined; nostrPubkey?: string | null | undefined; allowsNostr?: boolean | null | undefined; settlementOptions?: { settlementLayer: string; assets: { identifier: string; multipliers: Record; }[]; }[] | null | undefined; }>; export {};