@bitgo-beta/unspents
Version:
Defines the chain codes used for different unspent types and methods to calculate bitcoin transaction sizes
26 lines (25 loc) • 1.03 kB
TypeScript
/**
* Defines input sizes for BitGo signature scripts.
*/
export declare function varSliceSize(someScript: Sized): number;
export declare type Sized = {
length: number;
};
export declare type Input = {
script: Sized;
witness: Sized[];
};
export declare function getInputByteLength(input: Input, allowWitness: boolean): number;
export declare function getInputWeight(input: Input): number;
export declare type InputComponents = {
script: number[];
witness: number[];
};
export declare function getInputComponentsWeight(c: InputComponents): number;
export declare const inputComponentsP2sh: InputComponents;
export declare const inputComponentsP2shP2wsh: InputComponents;
export declare const inputComponentsP2wsh: InputComponents;
export declare const inputComponentsP2trKeySpend: InputComponents;
export declare const inputComponentsP2trScriptSpendLevel1: InputComponents;
export declare const inputComponentsP2trScriptSpendLevel2: InputComponents;
export declare const inputComponentsP2shP2pk: InputComponents;