Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultVtxoDescriptorTemplate = "tr(%s,{ and(pk(%s), pk(%s)), and(older(%d), pk(%s)) })"
tr(unspendable, { and(pk(user), pk(asp)), and(older(timeout), pk(user)) })
View Source
const UnspendableKey = "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"
UnspendableKey is the x-only pubkey of the secp256k1 base point G
Variables ¶
View Source
var ( ErrInvalidXOnlyKey = errors.New("invalid x only public key") ErrInvalidPkPolicy = errors.New("invalid public key policy") ErrInvalidOlderPolicy = errors.New("invalid older policy") ErrInvalidAndPolicy = errors.New("invalid and() policy") ErrNotExpectedPolicy = errors.New("not the expected policy") )
Functions ¶
func CompileDescriptor ¶
func CompileDescriptor(desc TaprootDescriptor) string
CompileDescriptor compiles a TaprootDescriptor struct back into a descriptor string
Types ¶
type And ¶
type And struct { First Expression Second Expression }
type Expression ¶
type TaprootDescriptor ¶
type TaprootDescriptor struct { InternalKey Key ScriptTree []Expression }
func ParseTaprootDescriptor ¶
func ParseTaprootDescriptor(desc string) (*TaprootDescriptor, error)
Click to show internal directories.
Click to hide internal directories.