mirror of
https://github.com/bitbaum/paykit.git
synced 2026-12-04 05:30:36 +01:00
16 lines
475 B
TypeScript
16 lines
475 B
TypeScript
/** What a pasted Bitcoin receive string looks like. Not a checksum verdict. */
|
|
export type PasteKind = 'onchain' | 'xpub' | 'lightning' | 'nwc' | 'unknown';
|
|
/**
|
|
* Settled: the host can ask this rail for a payment.
|
|
* Shown: display the code. The visitor pays in their own app. The website does not.
|
|
*/
|
|
export type Rail = {
|
|
mode: 'settled';
|
|
kind: Exclude<PasteKind, 'unknown'>;
|
|
value: string;
|
|
} | {
|
|
mode: 'shown';
|
|
network: string;
|
|
value: string;
|
|
};
|