Module Tx.Out

Transaction output

type t = {
value : Stdint.int64;
script : Script.t;
}
val parse : Bitstring.bitstring -> Bitstring.bitstring * t option

parse bdata parses an output from bdata

val parse_all : Bitstring.bitstring -> Bitstring.bitstring * t list option

parse_all bdata parses a list of outputs from bdata

val serialize : t -> string

serialize out serializes the output out

val serialize_all : t list -> string

serialize_all outs serializes a list of outputs outs

val is_spendable : t -> bool

is_spendable out returns true if the out is spendable by a known template

val spendable_by : t -> Address.prefix -> string option

spendable_by out prefix returns the address (with prefix) which is able to spend out