@vbyte/btc-dev
Version:
Batteries-included toolset for plebian bitcoin development
42 lines (35 loc) • 728 B
text/typescript
type Bytes = string | Uint8Array
export type TapTree = Array<Bytes | Bytes[]>
export type MerkleProof = [
root : string,
target : string | undefined,
path : string[]
]
export interface TaprootConfig {
pubkey : Bytes
leaves ?: TapTree
target ?: Bytes
version ?: number
}
export interface TaprootContext {
cblock : string
int_key : string
path : string[]
parity : number
taproot : string | null
tapkey : string
taptweak : string
}
export interface ControlBlock {
int_key : string
parity : number
path : string[]
version : number
}
export interface ProofData {
cblock : ControlBlock
params : string[]
script : string
tapkey : string
tweak : string
}