bitcoinjs-lib/ts_src/payments/index.ts

43 lines
938 B
TypeScript
Raw Normal View History

2019-03-05 15:11:20 +09:00
import { Network } from '../networks';
2019-03-03 23:07:49 +09:00
import { p2data as embed } from './embed';
import { p2ms } from './p2ms';
import { p2pk } from './p2pk';
import { p2pkh } from './p2pkh';
import { p2sh } from './p2sh';
import { p2wpkh } from './p2wpkh';
import { p2wsh } from './p2wsh';
2018-12-29 00:00:52 +09:00
export interface Payment {
2019-07-11 14:49:26 +09:00
name?: string;
2019-03-03 23:07:49 +09:00
network?: Network;
output?: Buffer;
data?: Buffer[];
2019-03-03 23:07:49 +09:00
m?: number;
n?: number;
pubkeys?: Buffer[];
2019-03-03 23:07:49 +09:00
input?: Buffer;
signatures?: Buffer[];
2019-03-03 23:07:49 +09:00
pubkey?: Buffer;
signature?: Buffer;
address?: string;
hash?: Buffer;
redeem?: Payment;
witness?: Buffer[];
2018-12-29 00:00:52 +09:00
}
2019-03-07 12:59:52 +09:00
export type PaymentFunction = () => Payment;
2018-12-29 00:00:52 +09:00
export interface PaymentOpts {
2019-03-03 23:07:49 +09:00
validate?: boolean;
allowIncomplete?: boolean;
2018-12-29 00:00:52 +09:00
}
export type StackElement = Buffer | number;
export type Stack = StackElement[];
2019-03-07 12:47:26 +09:00
export type StackFunction = () => Stack;
2019-03-03 23:07:49 +09:00
export { embed, p2ms, p2pk, p2pkh, p2sh, p2wpkh, p2wsh };
// TODO
// witness commitment