drivechain

package
v0.0.0-...-8da70b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeDepositAddress

func DecodeDepositAddress(depositAddress string) (int64, string, string, error)

DecodeDepositAddress decodes a deposit address string into its components. The deposit address format is: slot_address_checksum It returns the slot number, the Bitcoin address, the checksum, and any error encountered. The function validates the format, parses the slot, decodes the Bitcoin address, and verifies the checksum to ensure the integrity of the deposit address.

func ScriptDepositAddress

func ScriptDepositAddress(depositAddress string) ([]byte, error)

DrivechainDepositAddress creates a new script to deposit funds to a specific address on a sidechain. It's used in the same transaction as ScriptSidechainDeposit. This script tags along with BIP300-M5: https://en.bitcoin.it/wiki/BIP_0300

func ScriptSidechainDeposit

func ScriptSidechainDeposit(slot uint8) ([]byte, error)

DrivechainSidechainDeposit creates a new script used to deposit funds to a sidechain, using OP_NOP5 (OP_DRIVECHAIN) to specify which sidechain the UTXO is for. This implements BIP300-M5: https://en.bitcoin.it/wiki/BIP_0300

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL