-
Notifications
You must be signed in to change notification settings - Fork 1
/
tx-in.d.ts
53 lines (53 loc) · 1.89 KB
/
tx-in.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/// <reference types="node" />
import { Br } from './br';
import { Bw } from './bw';
import { PubKey } from './pub-key';
import { Script } from './script';
import { Struct } from './struct';
import { TxOut } from './tx-out';
import { VarInt } from './var-int';
export interface TxInLike {
txHashBuf: string;
txOutNum: number;
scriptVi: string;
script: string;
nSequence: number;
}
export declare class TxIn extends Struct {
static readonly LOCKTIME_VERIFY_SEQUENCE: number;
static readonly SEQUENCE_FINAL = 4294967295;
static readonly SEQUENCE_LOCKTIME_DISABLE_FLAG: number;
static readonly SEQUENCE_LOCKTIME_TYPE_FLAG: number;
static readonly SEQUENCE_LOCKTIME_MASK = 65535;
static readonly SEQUENCE_LOCKTIME_GRANULARITY = 9;
txHashBuf: Buffer;
txOutNum: number;
scriptVi: VarInt;
script: Script;
nSequence: number;
constructor(txHashBuf?: Buffer, txOutNum?: number, scriptVi?: VarInt, script?: Script, nSequence?: number);
setScript(script: Script): this;
fromProperties(txHashBuf: Buffer, txOutNum: number, script: Script, nSequence: number): this;
static fromProperties(txHashBuf: Buffer, txOutNum: number, script: Script, nSequence?: number): TxIn;
fromJSON(json: TxInLike): this;
toJSON(): TxInLike;
fromBr(br: Br): this;
toBw(bw?: Bw): Bw;
/**
* Generate txIn with blank signatures from a txOut and its
* txHashBuf+txOutNum. A "blank" signature is just an OP_0. The pubKey also
* defaults to blank but can be substituted with the real public key if you
* know what it is.
*/
fromPubKeyHashTxOut(txHashBuf: Buffer, txOutNum: number, txOut: TxOut, pubKey: PubKey): this;
hasNullInput(): boolean;
/**
* Analagous to bitcoind's SetNull in COutPoint
*/
setNullInput(): void;
/**
* Get little-endian tx hash.
*/
txid(): string;
}
//# sourceMappingURL=tx-in.d.ts.map