BSV.Tokens.Factory.Contract (bsv_sdk v1.1.0)

Copy Markdown View Source

Contract transaction builder.

Builds the initial contract transaction that establishes the token scheme on-chain.

Summary

Functions

Build a contract transaction.

Types

config()

@type config() :: %{
  scheme: BSV.Tokens.Scheme.t(),
  funding_txid: binary(),
  funding_vout: non_neg_integer(),
  funding_satoshis: non_neg_integer(),
  funding_locking_script: BSV.Script.t(),
  funding_private_key: BSV.PrivateKey.t(),
  contract_satoshis: non_neg_integer(),
  fee_rate: non_neg_integer()
}

Functions

build_contract_tx(config)

@spec build_contract_tx(config()) :: {:ok, BSV.Transaction.t()} | {:error, term()}

Build a contract transaction.