UNPKG

1.2 kBTypeScriptView Raw
1/// <reference types="node" />
2import { Network } from '../networks';
3import { Taptree } from '../types';
4import { p2data as embed } from './embed';
5import { p2ms } from './p2ms';
6import { p2pk } from './p2pk';
7import { p2pkh } from './p2pkh';
8import { p2sh } from './p2sh';
9import { p2wpkh } from './p2wpkh';
10import { p2wsh } from './p2wsh';
11import { p2tr } from './p2tr';
12export interface Payment {
13 name?: string;
14 network?: Network;
15 output?: Buffer;
16 data?: Buffer[];
17 m?: number;
18 n?: number;
19 pubkeys?: Buffer[];
20 input?: Buffer;
21 signatures?: Buffer[];
22 internalPubkey?: Buffer;
23 pubkey?: Buffer;
24 signature?: Buffer;
25 address?: string;
26 hash?: Buffer;
27 redeem?: Payment;
28 redeemVersion?: number;
29 scriptTree?: Taptree;
30 witness?: Buffer[];
31}
32export type PaymentCreator = (a: Payment, opts?: PaymentOpts) => Payment;
33export type PaymentFunction = () => Payment;
34export interface PaymentOpts {
35 validate?: boolean;
36 allowIncomplete?: boolean;
37}
38export type StackElement = Buffer | number;
39export type Stack = StackElement[];
40export type StackFunction = () => Stack;
41export { embed, p2ms, p2pk, p2pkh, p2sh, p2wpkh, p2wsh, p2tr };