View Source Bitcoinex.PSBT (bitcoinex v0.1.8)

Support for Partially Signed Bitcoin Transactions (PSBT).

The format consists of key-value maps. Each map consists of a sequence of key-value records, terminated by a 0x00 byte.

Reference: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki

Link to this section Summary

Functions

Decodes a base64 encoded string into a PSBT.

Decodes a binary-encoded PSBT file.

to_file writes a PSBT to file as binary.

Link to this section Types

@type t() :: %Bitcoinex.PSBT{global: term(), inputs: term(), outputs: term()}

Link to this section Functions

@spec decode(String.t()) :: {:ok, t()} | {:error, term()}

Decodes a base64 encoded string into a PSBT.

@spec encode_b64(t()) :: String.t()
@spec from_file(String.t()) :: {:ok, t()} | {:error, term()}

Decodes a binary-encoded PSBT file.

Link to this function

to_file(packet, filename)

View Source
@spec to_file(t(), String.t()) :: :ok | {:error, File.posix()}

to_file writes a PSBT to file as binary.