cfdgo

package module
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 9 Imported by: 1

README

Crypto Finance Development Kit for Go (CFD-GO)

CFD library for Go.

Overview

This library is development kit for crypto finance application. Useful when developing applications for cryptocurrencies.

Target Network
  • Bitcoin
  • Liquid Network
Support function by cfd
  • Bitcoin
    • Bitcoin Script (builder, viewer)
    • Transaction
      • Create, Parse, Decode
      • Simple pubkey-hash sign / verify
      • Estimate Fee
      • Coin Selection (FundRawTransaction)
    • PSBT (v0. v2 & taproot is not yet.)
      • Create, Parse, Decode
      • Simple pubkey-hash sign / verify
      • Estimate Fee
      • Coin Selection (FundRawTransaction)
    • ECDSA Pubkey/Privkey (TweakAdd/Mul, Negate, Sign, Verify)
    • BIP32, BIP39
    • Output Descriptor (contains miniscript parser)
    • Schnorr/Taproot
    • Bitcoin Address (Segwit-v0, Segwit-v1, P2PKH/P2SH)
  • Liquid Network
    • Confidential Transaction
      • Blind, Unblind
      • Reissuance
    • Confidential Address
Libraries for each language
  • Go : cfd-go
    • C/C++ : cfd
      • Extend the cfd-core library. Defines the C language API and extension classes.
    • C++ : cfd-core
      • Core library. Definition base class.
  • other language:
    • JavaScript : cfd-js
    • WebAssembly : cfd-js-wasm
    • Python : cfd-python
    • C# : cfd-csharp
    • Rust : cfd-rust

Dependencies

  • Go (1.17 or higher)
  • C/C++ Compiler   - can compile c++11
  • CMake (3.14.3 or higher)
Windows (MinGW)

attention: Cgo can only be used on the make platform.

(Recommended to use wsl(Windows Subsystem for Linux), because it can be cumbersome.)

download and install files.

  • go (1.17 or higher)
  • CMake (3.14.3 or higher)
  • MinGW (Add to PATH after install)
MacOS
# xcode cli tools
xcode-select --install

# install dependencies using Homebrew
brew install cmake go
Linux(Ubuntu)
# install dependencies using APT package Manager
apt-get install -y build-essential golang cmake

cmake version 3.14.2 or lower, download from website and install cmake.

go version 1.11 or lower, get golang.org/dl/go1.12 or higher.


Build

Using CMake
# recommend out of source build
mkdir build && cd $_
# configure & build
cmake .. -DENABLE_SHARED=on -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DENABLE_CAPI=on -DTARGET_RPATH=/usr/local/lib/
make
cd ..
go mod download
go build
CMake options

cmake .. (CMake options) -DENABLE_JS_WRAPPER=off

  • -DENABLE_ELEMENTS: Enable functionalies for elements sidechain. [ON/OFF] (default:ON)
  • -DENABLE_SHARED: Enable building a shared library. [ON/OFF] (default:OFF)
  • -DENABLE_TESTS: Enable building a testing codes. If enables this option, builds testing framework submodules(google test) automatically. [ON/OFF] (default:ON)
  • -DCMAKE_BUILD_TYPE=Release: Enable release build.
  • -DCMAKE_BUILD_TYPE=Debug: Enable debug build.
  • -DCFDCORE_DEBUG=on: Enable cfd debug mode and loggings log files. [ON/OFF] (default:OFF)

install / uninstall

On Linux or MacOS, can use install / uninstall.

On Windows, can use releases asset.

Using releases asset

The fastest and easiest way. Target is amd64(x86_64) only.

  • macos / linux(ubuntu)
(cleanup)
./tools/cmake_cleanup.sh
sudo ./tools/cleanup_install_files.sh

(download)
wget https://github.com/cryptogarageinc/cfd-go/releases/download/v0.3.2/cfdgo-v0.3.2-ubuntu2004-gcc-x86_64.zip

(unzip)
sudo unzip -q cfdgo-v0.3.2-ubuntu2004-gcc-x86_64.zip -d /
  • windows
    1. cleanup: c:/usr/local directory.
    2. download asset.
    3. Unzip and extract to c:/usr/local directory.
install (after build)

install for /usr/local/lib.

Using CMake install

Attention: Currently, there is a problem with ExternalProject, so a problem occurs when performing update processing. Please perform cleanup when building before installation.

(cleanup)
./tools/cmake_cleanup.sh
sudo ./tools/cleanup_install_files.sh

(build)
mkdir build && cd build && cmake .. -DENABLE_SHARED=on -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DENABLE_CAPI=on -DTARGET_RPATH=/usr/local/lib && make

(install by using makefile)
cd build && sudo make install

(install by using ninja)
cd build && sudo ninja install

cmake version is 3.15 or higher: cmake --install build

Using releases asset (for install)

Target is amd64(x86_64) only.

  • Ubuntu / MacOS
(cleanup)
./tools/cmake_cleanup.sh
sudo ./tools/cleanup_install_files.sh

(download)
wget https://github.com/cryptogarageinc/cfd-go/releases/download/v0.3.2/cfdgo-v0.3.2-ubuntu2004-gcc-x86_64.zip

(unzip)
sudo unzip -q cfdgo-v0.3.2-ubuntu2004-gcc-x86_64.zip -d /
uninstall
(uninstall by using makefile)
cd build && sudo make uninstall

(uninstall by using ninja)
cd build && sudo ninja uninstall

(uninstall by using script)
sudo ./tools/cleanup_install_files.sh

How to use cfd-go as go module

  1. Once, clone this repository.

  2. Build & install cfd-go(and dependencies).

  3. Modify go.mod file adding cfd-go as go moudle

    go.mod

    require (
      github.com/cryptogarageinc/cfd-go v0.3.2
      ...
    )
    

    Reference github commit:

    require (
      github.com/cryptogarageinc/cfd-go v1.0.0-0.20191205091101-a48a6a8b1a24
      ...
    )
    

    (version format: UnknownVersionTag-UtcDate-CommitHash)

  4. Download cfd-go module

    go mod download
    

Test and Example

Test

test file is cfdgo_test.go . Execute by the following method.

  • shell script or bat file

    (linux/macos)
    ./go_test.sh
    
    (Windows)
    .\go_test.bat
    
  • go command (linux/macos)

    LD_LIBRARY_PATH=./build/Release go test
    
Example
  • cfdgo_test.go

Information for developers

managed files
  • cfdgo.go, cfdgo.cxx: generated from swig.
  • swig.i: swig file.
using library
develop tools
generate from swig.i

attention: At first, install swig and set PATH.

(linux/macos)
./tools/gen_swig.sh

(Windows)
.\tools\gen_swig.bat
formatter
  • go fmt
  • goimports

use by makefile:

make

(windows)
mingw32-make
mockgen
make generate

(windows)
mingw32-make generate
develop tools by docker compose
generate from swig.i by docker compose
docker-compose run swig
formatter and mockgen by docker compose
docker-compose run formatter
support compilers
  • GCC (contains MinGW) (5.x or higher)
  • Clang (7.x or higher)
code coverage
(Windows)
.\go_coverage.bat

(Ubuntu / MacOS)
./go_coverage.sh

Note

Git connection

Git repository connections default to HTTPS. However, depending on the connection settings of GitHub, you may only be able to connect via SSH. As a countermeasure, forcibly establish SSH connection by setting CFD_CMAKE_GIT_SSH=1 in the environment variable.

  • Windows: (On the command line. Or set from the system setting screen.)

    set CFD_CMAKE_GIT_SSH=1
    
  • MacOS & Linux(Ubuntu):

    export CFD_CMAKE_GIT_SSH=1
    
Ignore git update for CMake External Project

Depending on your git environment, you may get the following error when checking out external:

  Performing update step for 'libwally-core-download'
  Current branch cmake_build is up to date.
  No stash entries found.
  No stash entries found.
  No stash entries found.
  CMake Error at /workspace/cfd-core/build/external/libwally-core/download/libwally-core-download-prefix/tmp/libwally-core-download-gitupdate.cmake:133 (message):


    Failed to unstash changes in:
    '/workspace/cfd-core/external/libwally-core/'.

    You will have to resolve the conflicts manually

This phenomenon is due to the git update related command. Please set an environment variable that skips update processing.

  • Windows: (On the command line. Or set from the system setting screen.)

    set CFD_CMAKE_GIT_SKIP_UPDATE=1
    
  • MacOS & Linux(Ubuntu):

    export CFD_CMAKE_GIT_SKIP_UPDATE=1
    

Documentation

Index

Constants

View Source
const (
	ExtkeyFormatTypeBip32 int = 0
	ExtkeyFormatTypeBip49 int = 1
	ExtkeyFormatTypeBip84 int = 2
)

Variables

View Source
var Swig_escape_always_false bool
View Source
var Swig_escape_val interface{}

Functions

func AddPeginInput added in v0.3.2

func AddPeginInput(createTxHandle uintptr, txid string, vout uint32, amount int64, asset, mainchainGenesisBlockHash, claimScript, mainchainTxHex, txoutProof string) error

AddPeginInput This function add a pegin input.

func AddPegoutOutput added in v0.3.2

func AddPegoutOutput(createTxHandle uintptr, asset string, amount int64, mainchainNetworkType, elementsNetworkType int, mainchainGenesisBlockHash, onlinePubkey, masterOnlineKey, mainchainOutputDescriptor string, bip32Counter uint32, whitelist string) (mainchainAddress string, err error)

AddPegoutOutput This function add a pegout output.

func AddTapScriptSign added in v0.3.1

func AddTapScriptSign(createTxHandle uintptr, txid string, vout uint32, signDataList []ByteData, tapscript *Script, controlBlock *ByteData, annex *ByteData) error

AddTapScriptSign This function add a tapscript sign.

func AddTaprootSchnorrSign added in v0.3.1

func AddTaprootSchnorrSign(createTxHandle uintptr, txid string, vout uint32, signature *ByteData, annex *ByteData) error

AddTaprootSchnorrSign This function add a taproot schnorr sign.

func AddTransactionInput added in v0.0.19

func AddTransactionInput(createTxHandle uintptr, txid string, vout uint32, sequence uint32) (err error)

AddTransactionInput : add createrawtransaction input data. (bitcoin, elements) param: createTxHandle handle of createrawtransaction. param: txid txid of utxo. param: vout vout of utxo. param: sequence sequence number. return: err error

func AddTransactionOutput added in v0.0.19

func AddTransactionOutput(createTxHandle uintptr, amount int64, address string, lockingScript string, asset string) (err error)

AddTransactionInput : add createrawtransaction output data. (bitcoin, elements) param: createTxHandle handle of createrawtransaction. param: amount satoshi amount. param: address address. param: lockingScript locking script. (ignore address) param: asset target asset. (only elements) return: err error

func AppendConfidentialTx added in v0.0.19

func AppendConfidentialTx(txHex string, txinList []ConfidentialTxIn, txoutList []ConfidentialTxOut) (outputTxHex string, err error)

AppendConfidentialTx : append confidential transaction. param: txHex transaction hex. param: txinList transaction input list. param: txoutList transaction output list. return: outputTxHex transaction hex. return: err error

func CfdAddBlindTxInData

func CfdAddBlindTxInData(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 string, arg6 string, arg7 string, arg8 Int64_t, arg9 string, arg10 string) (_swig_ret int)

func CfdAddBlindTxOutByAddress added in v0.0.20

func CfdAddBlindTxOutByAddress(arg1 uintptr, arg2 uintptr, arg3 string) (_swig_ret int)

func CfdAddBlindTxOutData

func CfdAddBlindTxOutData(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 string) (_swig_ret int)

func CfdAddCoinSelectionAmount added in v0.0.8

func CfdAddCoinSelectionAmount(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 Int64_t, arg5 string) (_swig_ret int)

func CfdAddCoinSelectionUtxo added in v0.0.8

func CfdAddCoinSelectionUtxo(arg1 uintptr, arg2 uintptr, arg3 Int32_t, arg4 string, arg5 Uint32_t, arg6 Int64_t, arg7 string, arg8 string) (_swig_ret int)

func CfdAddCoinSelectionUtxoTemplate added in v0.1.24

func CfdAddCoinSelectionUtxoTemplate(arg1 uintptr, arg2 uintptr, arg3 Int32_t, arg4 string, arg5 Uint32_t, arg6 Int64_t, arg7 string, arg8 string, arg9 string) (_swig_ret int)

func CfdAddCombinePubkey added in v0.1.21

func CfdAddCombinePubkey(arg1 uintptr, arg2 uintptr, arg3 string) (_swig_ret int)

func CfdAddConfidentialTxDerSign

func CfdAddConfidentialTxDerSign(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 bool, arg6 string, arg7 int, arg8 bool, arg9 bool, arg10 *string) (_swig_ret int)

func CfdAddConfidentialTxIn

func CfdAddConfidentialTxIn(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 Uint32_t, arg6 *string) (_swig_ret int)

func CfdAddConfidentialTxOut

func CfdAddConfidentialTxOut(arg1 uintptr, arg2 string, arg3 string, arg4 Int64_t, arg5 string, arg6 string, arg7 string, arg8 string, arg9 *string) (_swig_ret int)

func CfdAddConfidentialTxOutput added in v0.1.39

func CfdAddConfidentialTxOutput(arg1 uintptr, arg2 uintptr, arg3 Int64_t, arg4 string, arg5 string, arg6 string, arg7 string) (_swig_ret int)

func CfdAddConfidentialTxSign

func CfdAddConfidentialTxSign(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 bool, arg6 string, arg7 bool, arg8 *string) (_swig_ret int)

func CfdAddConfidentialTxSignWithPrivkeySimple added in v0.0.18

func CfdAddConfidentialTxSignWithPrivkeySimple(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 int, arg6 string, arg7 string, arg8 Int64_t, arg9 string, arg10 int, arg11 bool, arg12 bool, arg13 *string) (_swig_ret int)

func CfdAddMultisigScriptData

func CfdAddMultisigScriptData(arg1 uintptr, arg2 uintptr, arg3 string) (_swig_ret int)

func CfdAddMultisigScriptSigData added in v0.0.6

func CfdAddMultisigScriptSigData(arg1 uintptr, arg2 uintptr, arg3 string, arg4 string) (_swig_ret int)

func CfdAddMultisigScriptSigDataToDer added in v0.0.6

func CfdAddMultisigScriptSigDataToDer(arg1 uintptr, arg2 uintptr, arg3 string, arg4 int, arg5 bool, arg6 string) (_swig_ret int)

func CfdAddMultisigSignData

func CfdAddMultisigSignData(arg1 uintptr, arg2 uintptr, arg3 string, arg4 string) (_swig_ret int)

func CfdAddMultisigSignDataToDer

func CfdAddMultisigSignDataToDer(arg1 uintptr, arg2 uintptr, arg3 string, arg4 int, arg5 bool, arg6 string) (_swig_ret int)

func CfdAddPubkeyHashSign added in v0.0.18

func CfdAddPubkeyHashSign(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 Uint32_t, arg6 int, arg7 string, arg8 string, arg9 bool, arg10 int, arg11 bool, arg12 *string) (_swig_ret int)

func CfdAddPubkeyHashSignByHandle added in v0.3.1

func CfdAddPubkeyHashSignByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 int, arg6 string, arg7 string, arg8 bool, arg9 int, arg10 bool) (_swig_ret int)

func CfdAddScriptHashLastSignByHandle added in v0.3.1

func CfdAddScriptHashLastSignByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 int, arg6 string) (_swig_ret int)

func CfdAddScriptHashSign added in v0.0.18

func CfdAddScriptHashSign(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 Uint32_t, arg6 int, arg7 string, arg8 bool, arg9 *string) (_swig_ret int)

func CfdAddSighashTypeInSchnorrSignature added in v0.3.1

func CfdAddSighashTypeInSchnorrSignature(arg1 uintptr, arg2 string, arg3 int, arg4 bool, arg5 *string) (_swig_ret int)

func CfdAddSignWithPrivkeyByHandle added in v0.3.1

func CfdAddSignWithPrivkeyByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 string, arg6 int, arg7 bool, arg8 bool, arg9 string, arg10 string) (_swig_ret int)

func CfdAddSignWithPrivkeySimple added in v0.0.19

func CfdAddSignWithPrivkeySimple(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 Uint32_t, arg6 int, arg7 string, arg8 string, arg9 Int64_t, arg10 int, arg11 bool, arg12 bool, arg13 *string) (_swig_ret int)

func CfdAddSplitTxOutData added in v0.3.2

func CfdAddSplitTxOutData(arg1 uintptr, arg2 uintptr, arg3 Int64_t, arg4 string, arg5 string, arg6 string) (_swig_ret int)

func CfdAddTapBranchByHash added in v0.3.1

func CfdAddTapBranchByHash(arg1 uintptr, arg2 uintptr, arg3 string) (_swig_ret int)

func CfdAddTapBranchByScriptTree added in v0.3.1

func CfdAddTapBranchByScriptTree(arg1 uintptr, arg2 uintptr, arg3 uintptr) (_swig_ret int)

func CfdAddTapBranchByScriptTreeString added in v0.3.1

func CfdAddTapBranchByScriptTreeString(arg1 uintptr, arg2 uintptr, arg3 string) (_swig_ret int)

func CfdAddTapBranchByTapLeaf added in v0.3.1

func CfdAddTapBranchByTapLeaf(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint8_t) (_swig_ret int)

func CfdAddTaprootSignByHandle added in v0.3.1

func CfdAddTaprootSignByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 string, arg6 string, arg7 string, arg8 string) (_swig_ret int)

func CfdAddTargetAmountForFundRawTx added in v0.1.21

func CfdAddTargetAmountForFundRawTx(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 Int64_t, arg5 string, arg6 string) (_swig_ret int)

func CfdAddTransactionInput added in v0.0.19

func CfdAddTransactionInput(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Uint32_t) (_swig_ret int)

func CfdAddTransactionOutput added in v0.0.19

func CfdAddTransactionOutput(arg1 uintptr, arg2 uintptr, arg3 Int64_t, arg4 string, arg5 string, arg6 string) (_swig_ret int)

func CfdAddTxInForEstimateFee added in v0.0.8

func CfdAddTxInForEstimateFee(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 string, arg6 string, arg7 bool, arg8 bool, arg9 bool, arg10 Uint32_t, arg11 string) (_swig_ret int)

func CfdAddTxInForFundRawTx added in v0.1.21

func CfdAddTxInForFundRawTx(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 bool, arg9 bool, arg10 bool, arg11 Uint32_t, arg12 string) (_swig_ret int)

func CfdAddTxInTemplateForEstimateFee added in v0.1.24

func CfdAddTxInTemplateForEstimateFee(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 string, arg6 string, arg7 bool, arg8 bool, arg9 bool, arg10 Uint32_t, arg11 string, arg12 string) (_swig_ret int)

func CfdAddTxInTemplateForFundRawTx added in v0.1.24

func CfdAddTxInTemplateForFundRawTx(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 bool, arg9 bool, arg10 bool, arg11 Uint32_t, arg12 string, arg13 string) (_swig_ret int)

func CfdAddTxInputForEstimateFee added in v0.3.9

func CfdAddTxInputForEstimateFee(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 string, arg6 string, arg7 bool, arg8 bool, arg9 bool, arg10 string, arg11 Uint32_t, arg12 Uint32_t, arg13 string) (_swig_ret int)

func CfdAddTxInputForFundRawTx added in v0.3.9

func CfdAddTxInputForFundRawTx(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 bool, arg9 bool, arg10 bool, arg11 string, arg12 Uint32_t, arg13 Uint32_t, arg14 string) (_swig_ret int)

func CfdAddTxOutMetaDataForLedger added in v0.0.18

func CfdAddTxOutMetaDataForLedger(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 string, arg5 string, arg6 string) (_swig_ret int)

func CfdAddTxPeginInput added in v0.3.2

func CfdAddTxPeginInput(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 string, arg9 string, arg10 string) (_swig_ret int)

func CfdAddTxPegoutOutput added in v0.3.2

func CfdAddTxPegoutOutput(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Int64_t, arg5 int, arg6 int, arg7 string, arg8 string, arg9 string, arg10 string, arg11 Uint32_t, arg12 string, arg13 *string) (_swig_ret int)

func CfdAddTxSign added in v0.0.18

func CfdAddTxSign(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 Uint32_t, arg6 int, arg7 string, arg8 bool, arg9 int, arg10 bool, arg11 bool, arg12 *string) (_swig_ret int)

func CfdAddTxSignByHandle added in v0.3.1

func CfdAddTxSignByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 int, arg6 string, arg7 bool, arg8 int, arg9 bool, arg10 bool) (_swig_ret int)

func CfdAddUtxoForFundRawTx added in v0.1.21

func CfdAddUtxoForFundRawTx(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string) (_swig_ret int)

func CfdAddUtxoTemplateForFundRawTx added in v0.1.24

func CfdAddUtxoTemplateForFundRawTx(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 string) (_swig_ret int)

func CfdCalculateEcSignature

func CfdCalculateEcSignature(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 int, arg6 bool, arg7 *string) (_swig_ret int)

func CfdCheckTweakAddFromSchnorrPubkey added in v0.2.4

func CfdCheckTweakAddFromSchnorrPubkey(arg1 uintptr, arg2 string, arg3 bool, arg4 string, arg5 string) (_swig_ret int)

func CfdClearWitnessStack added in v0.3.1

func CfdClearWitnessStack(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t) (_swig_ret int)

func CfdCloneHandle added in v0.0.7

func CfdCloneHandle(arg1 uintptr, arg2 *uintptr) (_swig_ret int)

func CfdCompressPubkey added in v0.1.21

func CfdCompressPubkey(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdComputeSchnorrSigPoint added in v0.2.0

func CfdComputeSchnorrSigPoint(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdConvertEntropyToMnemonic added in v0.1.21

func CfdConvertEntropyToMnemonic(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdConvertMnemonicToSeed added in v0.1.21

func CfdConvertMnemonicToSeed(arg1 uintptr, arg2 string, arg3 string, arg4 bool, arg5 string, arg6 bool, arg7 *string, arg8 *string) (_swig_ret int)

func CfdConvertScriptAsmToHex added in v0.0.6

func CfdConvertScriptAsmToHex(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdCopyErrorState added in v0.0.7

func CfdCopyErrorState(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdCreateAddress

func CfdCreateAddress(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 int, arg6 *string, arg7 *string, arg8 *string) (_swig_ret int)

func CfdCreateConfidentialAddress

func CfdCreateConfidentialAddress(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdCreateConfidentialSighash

func CfdCreateConfidentialSighash(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 int, arg6 string, arg7 string, arg8 Int64_t, arg9 string, arg10 int, arg11 bool, arg12 *string) (_swig_ret int)

func CfdCreateExtPubkey

func CfdCreateExtPubkey(arg1 uintptr, arg2 string, arg3 int, arg4 *string) (_swig_ret int)

func CfdCreateExtkey added in v0.1.21

func CfdCreateExtkey(arg1 uintptr, arg2 int, arg3 int, arg4 string, arg5 string, arg6 string, arg7 string, arg8 byte, arg9 Uint32_t, arg10 *string) (_swig_ret int)

func CfdCreateExtkeyByFormat added in v0.4.0

func CfdCreateExtkeyByFormat(arg1 uintptr, arg2 int, arg3 int, arg4 string, arg5 string, arg6 string, arg7 string, arg8 byte, arg9 Uint32_t, arg10 int, arg11 *string) (_swig_ret int)

func CfdCreateExtkeyByFormatFromSeed added in v0.4.0

func CfdCreateExtkeyByFormatFromSeed(arg1 uintptr, arg2 string, arg3 int, arg4 int, arg5 int, arg6 *string) (_swig_ret int)

func CfdCreateExtkeyFromParent added in v0.1.21

func CfdCreateExtkeyFromParent(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 bool, arg5 int, arg6 int, arg7 *string) (_swig_ret int)

func CfdCreateExtkeyFromParentPath

func CfdCreateExtkeyFromParentPath(arg1 uintptr, arg2 string, arg3 string, arg4 int, arg5 int, arg6 *string) (_swig_ret int)

func CfdCreateExtkeyFromSeed

func CfdCreateExtkeyFromSeed(arg1 uintptr, arg2 string, arg3 int, arg4 int, arg5 *string) (_swig_ret int)

func CfdCreateHandle

func CfdCreateHandle(arg1 *uintptr) (_swig_ret int)

func CfdCreateKeyPair

func CfdCreateKeyPair(arg1 uintptr, arg2 bool, arg3 int, arg4 *string, arg5 *string, arg6 *string) (_swig_ret int)

func CfdCreateSighash added in v0.0.19

func CfdCreateSighash(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 Uint32_t, arg6 int, arg7 string, arg8 string, arg9 Int64_t, arg10 int, arg11 bool, arg12 *string) (_swig_ret int)

func CfdCreateSighashByHandle added in v0.3.1

func CfdCreateSighashByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 int, arg6 bool, arg7 string, arg8 string, arg9 string, arg10 Uint32_t, arg11 string, arg12 *string) (_swig_ret int)

func CfdCreateSimpleHandle added in v0.0.6

func CfdCreateSimpleHandle(arg1 *uintptr) (_swig_ret int)

func CfdCreateSplitTxOutHandle added in v0.3.2

func CfdCreateSplitTxOutHandle(arg1 uintptr, arg2 uintptr, arg3 *uintptr) (_swig_ret int)

func CfdDecodeBase58 added in v0.3.0

func CfdDecodeBase58(arg1 uintptr, arg2 string, arg3 bool, arg4 *string) (_swig_ret int)

func CfdDecodeBase64 added in v0.3.0

func CfdDecodeBase64(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdDecodeSignatureFromDer added in v0.0.18

func CfdDecodeSignatureFromDer(arg1 uintptr, arg2 string, arg3 *string, arg4 *int, arg5 *bool) (_swig_ret int)

func CfdDecryptAES added in v0.3.0

func CfdDecryptAES(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdDecryptEcdsaAdaptor added in v0.4.0

func CfdDecryptEcdsaAdaptor(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdEncodeBase58 added in v0.3.0

func CfdEncodeBase58(arg1 uintptr, arg2 string, arg3 bool, arg4 *string) (_swig_ret int)

func CfdEncodeBase64 added in v0.3.0

func CfdEncodeBase64(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdEncodeSignatureByDer added in v0.0.6

func CfdEncodeSignatureByDer(arg1 uintptr, arg2 string, arg3 int, arg4 bool, arg5 *string) (_swig_ret int)

func CfdEncryptAES added in v0.3.0

func CfdEncryptAES(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdEncryptEcdsaAdaptor added in v0.4.0

func CfdEncryptEcdsaAdaptor(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdExistTxidInBlock added in v0.3.3

func CfdExistTxidInBlock(arg1 uintptr, arg2 uintptr, arg3 string) (_swig_ret int)

func CfdFinalize

func CfdFinalize(arg1 bool) (_swig_ret int)

func CfdFinalizeBlindTx

func CfdFinalizeBlindTx(arg1 uintptr, arg2 uintptr, arg3 string, arg4 *string) (_swig_ret int)

func CfdFinalizeCoinSelection added in v0.0.8

func CfdFinalizeCoinSelection(arg1 uintptr, arg2 uintptr, arg3 Int64_t) (_swig_ret int)

func CfdFinalizeCombinePubkey added in v0.1.21

func CfdFinalizeCombinePubkey(arg1 uintptr, arg2 uintptr, arg3 *string) (_swig_ret int)

func CfdFinalizeElementsMultisigSign

func CfdFinalizeElementsMultisigSign(arg1 uintptr, arg2 uintptr, arg3 string, arg4 string, arg5 Uint32_t, arg6 int, arg7 string, arg8 string, arg9 bool, arg10 *string) (_swig_ret int)

func CfdFinalizeEstimateFee added in v0.0.8

func CfdFinalizeEstimateFee(arg1 uintptr, arg2 uintptr, arg3 string, arg4 string, arg5 Int64_t, arg6 Int64_t, arg7 bool, arg8 float64) (_swig_ret int)

func CfdFinalizeFundRawTx added in v0.1.21

func CfdFinalizeFundRawTx(arg1 uintptr, arg2 uintptr, arg3 string, arg4 float64, arg5 Int64_t, arg6 Uint32_t, arg7 *string) (_swig_ret int)

func CfdFinalizeMultisigScript

func CfdFinalizeMultisigScript(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string, arg5 *string, arg6 *string) (_swig_ret int)

func CfdFinalizeMultisigScriptSig added in v0.0.6

func CfdFinalizeMultisigScriptSig(arg1 uintptr, arg2 uintptr, arg3 string, arg4 *string) (_swig_ret int)

func CfdFinalizeMultisigSign added in v0.0.18

func CfdFinalizeMultisigSign(arg1 uintptr, arg2 uintptr, arg3 int, arg4 string, arg5 string, arg6 Uint32_t, arg7 int, arg8 string, arg9 *string) (_swig_ret int)

func CfdFinalizeTransaction added in v0.0.19

func CfdFinalizeTransaction(arg1 uintptr, arg2 uintptr, arg3 *string) (_swig_ret int)

func CfdFinalizeTxSerializeForLedger added in v0.0.18

func CfdFinalizeTxSerializeForLedger(arg1 uintptr, arg2 uintptr, arg3 int, arg4 string, arg5 bool, arg6 bool, arg7 *string) (_swig_ret int)

func CfdFinalizeTxSerializeHashForLedger added in v0.0.20

func CfdFinalizeTxSerializeHashForLedger(arg1 uintptr, arg2 uintptr, arg3 int, arg4 string, arg5 bool, arg6 bool, arg7 bool, arg8 *string) (_swig_ret int)

func CfdFreeAddressesMultisigHandle

func CfdFreeAddressesMultisigHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeBlindHandle

func CfdFreeBlindHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeBlockHandle added in v0.3.3

func CfdFreeBlockHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeBuffer

func CfdFreeBuffer(arg1 uintptr) (_swig_ret int)

func CfdFreeCoinSelectionHandle added in v0.0.8

func CfdFreeCoinSelectionHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeCombinePubkeyHandle added in v0.1.21

func CfdFreeCombinePubkeyHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeDescriptorHandle

func CfdFreeDescriptorHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeEstimateFeeHandle added in v0.0.8

func CfdFreeEstimateFeeHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeFundRawTxHandle added in v0.1.21

func CfdFreeFundRawTxHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeHandle

func CfdFreeHandle(arg1 uintptr) (_swig_ret int)

func CfdFreeMnemonicWordList added in v0.1.21

func CfdFreeMnemonicWordList(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeMultisigScriptHandle

func CfdFreeMultisigScriptHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeMultisigScriptSigHandle added in v0.0.6

func CfdFreeMultisigScriptSigHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeMultisigSignHandle

func CfdFreeMultisigSignHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeScriptItemHandle

func CfdFreeScriptItemHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeSplitTxOutHandle added in v0.3.2

func CfdFreeSplitTxOutHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeTaprootScriptTreeHandle added in v0.3.1

func CfdFreeTaprootScriptTreeHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeTransactionHandle added in v0.0.19

func CfdFreeTransactionHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeTxDataHandle added in v0.1.35

func CfdFreeTxDataHandle(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdFreeTxSerializeForLedger added in v0.0.18

func CfdFreeTxSerializeForLedger(arg1 uintptr, arg2 uintptr) (_swig_ret int)

func CfdGetAddressFromLockingScript added in v0.0.6

func CfdGetAddressFromLockingScript(arg1 uintptr, arg2 string, arg3 int, arg4 *string) (_swig_ret int)

func CfdGetAddressFromMultisigKey

func CfdGetAddressFromMultisigKey(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string, arg5 *string) (_swig_ret int)

func CfdGetAddressInfo added in v0.0.16

func CfdGetAddressInfo(arg1 uintptr, arg2 string, arg3 *int, arg4 *int, arg5 *int, arg6 *string, arg7 *string) (_swig_ret int)

func CfdGetAddressesFromMultisig

func CfdGetAddressesFromMultisig(arg1 uintptr, arg2 string, arg3 int, arg4 int, arg5 *uintptr, arg6 Uint32_t) (_swig_ret int)

func CfdGetAppendTxOutFundRawTx added in v0.1.21

func CfdGetAppendTxOutFundRawTx(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string) (_swig_ret int)

func CfdGetAssetCommitment added in v0.1.27

func CfdGetAssetCommitment(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdGetBaseTapLeaf added in v0.3.1

func CfdGetBaseTapLeaf(arg1 uintptr, arg2 uintptr, arg3 Uint8_t, arg4 *string, arg5 *string) (_swig_ret int)

func CfdGetBlindTxBlindData added in v0.2.5

func CfdGetBlindTxBlindData(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 Uint32_t, arg5 *string, arg6 Int64_t, arg7 *string, arg8 *string, arg9 *string, arg10 Uint32_t, arg11 *bool, arg12 *bool) (_swig_ret int)

func CfdGetBlockHash added in v0.3.3

func CfdGetBlockHash(arg1 uintptr, arg2 uintptr, arg3 *string) (_swig_ret int)

func CfdGetBlockHeaderData added in v0.3.3

func CfdGetBlockHeaderData(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string, arg5 *string, arg6 Uint32_t, arg7 Uint32_t, arg8 Uint32_t) (_swig_ret int)

func CfdGetCalculateFeeFundRawTx added in v0.3.16

func CfdGetCalculateFeeFundRawTx(arg1 uintptr, arg2 uintptr, arg3 Int64_t) (_swig_ret int)

func CfdGetConfidentialTxIn

func CfdGetConfidentialTxIn(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 *string, arg5 Uint32_t, arg6 Uint32_t, arg7 *string) (_swig_ret int)

func CfdGetConfidentialTxInCount

func CfdGetConfidentialTxInCount(arg1 uintptr, arg2 string, arg3 Uint32_t) (_swig_ret int)

func CfdGetConfidentialTxInIndex added in v0.0.18

func CfdGetConfidentialTxInIndex(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 Uint32_t) (_swig_ret int)

func CfdGetConfidentialTxInPeginWitness added in v0.0.18

func CfdGetConfidentialTxInPeginWitness(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 Uint32_t, arg5 *string) (_swig_ret int)

func CfdGetConfidentialTxInPeginWitnessCount added in v0.0.18

func CfdGetConfidentialTxInPeginWitnessCount(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 Uint32_t) (_swig_ret int)

func CfdGetConfidentialTxInWitness

func CfdGetConfidentialTxInWitness(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 Uint32_t, arg5 *string) (_swig_ret int)

func CfdGetConfidentialTxInWitnessCount

func CfdGetConfidentialTxInWitnessCount(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 Uint32_t) (_swig_ret int)

func CfdGetConfidentialTxInfo added in v0.0.6

func CfdGetConfidentialTxInfo(arg1 uintptr, arg2 string, arg3 *string, arg4 *string, arg5 *string, arg6 Uint32_t, arg7 Uint32_t, arg8 Uint32_t, arg9 Uint32_t, arg10 Uint32_t) (_swig_ret int)

func CfdGetConfidentialTxInfoByHandle added in v0.1.35

func CfdGetConfidentialTxInfoByHandle(arg1 uintptr, arg2 uintptr, arg3 *string, arg4 *string, arg5 *string, arg6 Uint32_t, arg7 Uint32_t, arg8 Uint32_t, arg9 Uint32_t, arg10 Uint32_t) (_swig_ret int)

func CfdGetConfidentialTxOut

func CfdGetConfidentialTxOut(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 *string, arg5 Int64_t, arg6 *string, arg7 *string, arg8 *string, arg9 *string, arg10 *string) (_swig_ret int)

func CfdGetConfidentialTxOutByHandle added in v0.1.35

func CfdGetConfidentialTxOutByHandle(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string, arg5 Int64_t, arg6 *string, arg7 *string, arg8 *string, arg9 *string, arg10 *string) (_swig_ret int)

func CfdGetConfidentialTxOutCount

func CfdGetConfidentialTxOutCount(arg1 uintptr, arg2 string, arg3 Uint32_t) (_swig_ret int)

func CfdGetConfidentialTxOutIndex added in v0.0.18

func CfdGetConfidentialTxOutIndex(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 Uint32_t) (_swig_ret int)

func CfdGetConfidentialTxOutSimpleByHandle added in v0.1.35

func CfdGetConfidentialTxOutSimpleByHandle(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string, arg5 Int64_t, arg6 *string, arg7 *string, arg8 *string) (_swig_ret int)

func CfdGetConfidentialValueHex added in v0.0.18

func CfdGetConfidentialValueHex(arg1 uintptr, arg2 Int64_t, arg3 bool, arg4 *string) (_swig_ret int)

func CfdGetDefaultBlindingKey added in v0.1.24

func CfdGetDefaultBlindingKey(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdGetDescriptorChecksum added in v0.0.16

func CfdGetDescriptorChecksum(arg1 uintptr, arg2 int, arg3 string, arg4 *string) (_swig_ret int)

func CfdGetDescriptorData

func CfdGetDescriptorData(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 Uint32_t, arg5 Uint32_t, arg6 *int, arg7 *string, arg8 *string, arg9 *int, arg10 *string, arg11 *int, arg12 *string, arg13 *string, arg14 *string, arg15 *bool, arg16 Uint32_t, arg17 Uint32_t) (_swig_ret int)

func CfdGetDescriptorMultisigKey

func CfdGetDescriptorMultisigKey(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *int, arg5 *string, arg6 *string, arg7 *string) (_swig_ret int)

func CfdGetDescriptorRootData added in v0.3.2

func CfdGetDescriptorRootData(arg1 uintptr, arg2 uintptr, arg3 *int, arg4 *string, arg5 *string, arg6 *int, arg7 *string, arg8 *int, arg9 *string, arg10 *string, arg11 *string, arg12 *string, arg13 *string, arg14 *bool, arg15 Uint32_t, arg16 Uint32_t) (_swig_ret int)

func CfdGetExtkeyInfo added in v0.3.6

func CfdGetExtkeyInfo(arg1 uintptr, arg2 string, arg3 *string, arg4 *string, arg5 *string, arg6 Uint32_t, arg7 Uint32_t, arg8 *int, arg9 *int) (_swig_ret int)

func CfdGetExtkeyInformation added in v0.0.16

func CfdGetExtkeyInformation(arg1 uintptr, arg2 string, arg3 *string, arg4 *string, arg5 *string, arg6 Uint32_t, arg7 Uint32_t) (_swig_ret int)

func CfdGetIssuanceBlindingKey

func CfdGetIssuanceBlindingKey(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 *string) (_swig_ret int)

func CfdGetLastErrorCode

func CfdGetLastErrorCode(arg1 uintptr) (_swig_ret int)

func CfdGetLastErrorMessage

func CfdGetLastErrorMessage(arg1 uintptr, arg2 *string) (_swig_ret int)

func CfdGetMnemonicWord added in v0.1.21

func CfdGetMnemonicWord(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string) (_swig_ret int)

func CfdGetMnemonicWords added in v0.3.16

func CfdGetMnemonicWords(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdGetModifiedTxByHandle added in v0.1.39

func CfdGetModifiedTxByHandle(arg1 uintptr, arg2 uintptr, arg3 *string) (_swig_ret int)

func CfdGetParentExtkeyPathData added in v0.0.16

func CfdGetParentExtkeyPathData(arg1 uintptr, arg2 string, arg3 string, arg4 int, arg5 *string, arg6 *string) (_swig_ret int)

func CfdGetPeginAddress added in v0.3.2

func CfdGetPeginAddress(arg1 uintptr, arg2 int, arg3 string, arg4 int, arg5 string, arg6 string, arg7 *string, arg8 *string, arg9 *string) (_swig_ret int)

func CfdGetPegoutAddress added in v0.3.4

func CfdGetPegoutAddress(arg1 uintptr, arg2 int, arg3 int, arg4 string, arg5 Uint32_t, arg6 int, arg7 *string, arg8 *string) (_swig_ret int)

func CfdGetPegoutMainchainAddress added in v0.3.4

func CfdGetPegoutMainchainAddress(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 int, arg5 *string) (_swig_ret int)

func CfdGetPrivkeyFromExtkey

func CfdGetPrivkeyFromExtkey(arg1 uintptr, arg2 string, arg3 int, arg4 *string, arg5 *string) (_swig_ret int)

func CfdGetPrivkeyFromWif

func CfdGetPrivkeyFromWif(arg1 uintptr, arg2 string, arg3 int, arg4 *string) (_swig_ret int)

func CfdGetPrivkeyWif added in v0.0.16

func CfdGetPrivkeyWif(arg1 uintptr, arg2 string, arg3 int, arg4 bool, arg5 *string) (_swig_ret int)

func CfdGetPubkeyFingerprint added in v0.3.0

func CfdGetPubkeyFingerprint(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdGetPubkeyFromExtkey

func CfdGetPubkeyFromExtkey(arg1 uintptr, arg2 string, arg3 int, arg4 *string) (_swig_ret int)

func CfdGetPubkeyFromPrivkey

func CfdGetPubkeyFromPrivkey(arg1 uintptr, arg2 string, arg3 string, arg4 bool, arg5 *string) (_swig_ret int)

func CfdGetSchnorrPubkeyFromPrivkey added in v0.2.3

func CfdGetSchnorrPubkeyFromPrivkey(arg1 uintptr, arg2 string, arg3 *string, arg4 *bool) (_swig_ret int)

func CfdGetSchnorrPubkeyFromPubkey added in v0.2.4

func CfdGetSchnorrPubkeyFromPubkey(arg1 uintptr, arg2 string, arg3 *string, arg4 *bool) (_swig_ret int)

func CfdGetScriptItem

func CfdGetScriptItem(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string) (_swig_ret int)

func CfdGetSelectedCoinAssetAmount added in v0.0.8

func CfdGetSelectedCoinAssetAmount(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 Int64_t) (_swig_ret int)

func CfdGetSelectedCoinIndex added in v0.0.8

func CfdGetSelectedCoinIndex(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 Int32_t) (_swig_ret int)

func CfdGetSighashTypeFromSchnorrSignature added in v0.3.1

func CfdGetSighashTypeFromSchnorrSignature(arg1 uintptr, arg2 string, arg3 *int, arg4 *bool) (_swig_ret int)

func CfdGetSupportedFunction

func CfdGetSupportedFunction(arg1 Uint64_t) (_swig_ret int)

func CfdGetTapBranchCount added in v0.3.1

func CfdGetTapBranchCount(arg1 uintptr, arg2 uintptr, arg3 Uint32_t) (_swig_ret int)

func CfdGetTapBranchData added in v0.3.1

func CfdGetTapBranchData(arg1 uintptr, arg2 uintptr, arg3 Uint8_t, arg4 bool, arg5 *string, arg6 Uint8_t, arg7 *string, arg8 Uint8_t) (_swig_ret int)

func CfdGetTapBranchHandle added in v0.3.1

func CfdGetTapBranchHandle(arg1 uintptr, arg2 uintptr, arg3 Uint8_t, arg4 *string, arg5 *uintptr) (_swig_ret int)

func CfdGetTaprootScriptTreeHash added in v0.3.1

func CfdGetTaprootScriptTreeHash(arg1 uintptr, arg2 uintptr, arg3 string, arg4 *string, arg5 *string, arg6 *string) (_swig_ret int)

func CfdGetTaprootScriptTreeSrting added in v0.3.1

func CfdGetTaprootScriptTreeSrting(arg1 uintptr, arg2 uintptr, arg3 *string) (_swig_ret int)

func CfdGetTaprootScriptTreeString added in v0.4.0

func CfdGetTaprootScriptTreeString(arg1 uintptr, arg2 uintptr, arg3 *string) (_swig_ret int)

func CfdGetTaprootTweakedPrivkey added in v0.3.1

func CfdGetTaprootTweakedPrivkey(arg1 uintptr, arg2 uintptr, arg3 string, arg4 *string) (_swig_ret int)

func CfdGetTransactionFromBlock added in v0.3.3

func CfdGetTransactionFromBlock(arg1 uintptr, arg2 uintptr, arg3 string, arg4 *string) (_swig_ret int)

func CfdGetTxCountInBlock added in v0.3.3

func CfdGetTxCountInBlock(arg1 uintptr, arg2 uintptr, arg3 Uint32_t) (_swig_ret int)

func CfdGetTxIn added in v0.0.19

func CfdGetTxIn(arg1 uintptr, arg2 int, arg3 string, arg4 Uint32_t, arg5 *string, arg6 Uint32_t, arg7 Uint32_t, arg8 *string) (_swig_ret int)

func CfdGetTxInByHandle added in v0.1.35

func CfdGetTxInByHandle(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string, arg5 Uint32_t, arg6 Uint32_t, arg7 *string) (_swig_ret int)

func CfdGetTxInCount added in v0.0.19

func CfdGetTxInCount(arg1 uintptr, arg2 int, arg3 string, arg4 Uint32_t) (_swig_ret int)

func CfdGetTxInCountByHandle added in v0.1.35

func CfdGetTxInCountByHandle(arg1 uintptr, arg2 uintptr, arg3 Uint32_t) (_swig_ret int)

func CfdGetTxInIndex added in v0.0.19

func CfdGetTxInIndex(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 Uint32_t, arg6 Uint32_t) (_swig_ret int)

func CfdGetTxInIndexByHandle added in v0.1.35

func CfdGetTxInIndexByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Uint32_t) (_swig_ret int)

func CfdGetTxInIssuanceInfo

func CfdGetTxInIssuanceInfo(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 *string, arg5 *string, arg6 Int64_t, arg7 *string, arg8 Int64_t, arg9 *string, arg10 *string, arg11 *string) (_swig_ret int)

func CfdGetTxInIssuanceInfoByHandle added in v0.1.35

func CfdGetTxInIssuanceInfoByHandle(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string, arg5 *string, arg6 Int64_t, arg7 *string, arg8 Int64_t, arg9 *string, arg10 *string, arg11 *string) (_swig_ret int)

func CfdGetTxInWitness added in v0.0.19

func CfdGetTxInWitness(arg1 uintptr, arg2 int, arg3 string, arg4 Uint32_t, arg5 Uint32_t, arg6 *string) (_swig_ret int)

func CfdGetTxInWitnessByHandle added in v0.1.35

func CfdGetTxInWitnessByHandle(arg1 uintptr, arg2 uintptr, arg3 int, arg4 Uint32_t, arg5 Uint32_t, arg6 *string) (_swig_ret int)

func CfdGetTxInWitnessCount added in v0.0.19

func CfdGetTxInWitnessCount(arg1 uintptr, arg2 int, arg3 string, arg4 Uint32_t, arg5 Uint32_t) (_swig_ret int)

func CfdGetTxInWitnessCountByHandle added in v0.1.35

func CfdGetTxInWitnessCountByHandle(arg1 uintptr, arg2 uintptr, arg3 int, arg4 Uint32_t, arg5 Uint32_t) (_swig_ret int)

func CfdGetTxInfo added in v0.0.19

func CfdGetTxInfo(arg1 uintptr, arg2 int, arg3 string, arg4 *string, arg5 *string, arg6 Uint32_t, arg7 Uint32_t, arg8 Uint32_t, arg9 Uint32_t, arg10 Uint32_t) (_swig_ret int)

func CfdGetTxInfoByHandle added in v0.1.35

func CfdGetTxInfoByHandle(arg1 uintptr, arg2 uintptr, arg3 *string, arg4 *string, arg5 Uint32_t, arg6 Uint32_t, arg7 Uint32_t, arg8 Uint32_t, arg9 Uint32_t) (_swig_ret int)

func CfdGetTxOut added in v0.0.19

func CfdGetTxOut(arg1 uintptr, arg2 int, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 *string) (_swig_ret int)

func CfdGetTxOutByHandle added in v0.1.35

func CfdGetTxOutByHandle(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 Int64_t, arg5 *string, arg6 *string) (_swig_ret int)

func CfdGetTxOutCount added in v0.0.19

func CfdGetTxOutCount(arg1 uintptr, arg2 int, arg3 string, arg4 Uint32_t) (_swig_ret int)

func CfdGetTxOutCountByHandle added in v0.1.35

func CfdGetTxOutCountByHandle(arg1 uintptr, arg2 uintptr, arg3 Uint32_t) (_swig_ret int)

func CfdGetTxOutIndex added in v0.0.19

func CfdGetTxOutIndex(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 string, arg6 Uint32_t) (_swig_ret int)

func CfdGetTxOutIndexByHandle added in v0.1.35

func CfdGetTxOutIndexByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 string, arg5 Uint32_t) (_swig_ret int)

func CfdGetTxOutIndexWithOffsetByHandle added in v0.3.2

func CfdGetTxOutIndexWithOffsetByHandle(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 string, arg5 string, arg6 Uint32_t) (_swig_ret int)

func CfdGetTxOutProof added in v0.3.3

func CfdGetTxOutProof(arg1 uintptr, arg2 uintptr, arg3 string, arg4 *string) (_swig_ret int)

func CfdGetTxidFromBlock added in v0.3.3

func CfdGetTxidFromBlock(arg1 uintptr, arg2 uintptr, arg3 Uint32_t, arg4 *string) (_swig_ret int)

func CfdGetValueCommitment added in v0.1.27

func CfdGetValueCommitment(arg1 uintptr, arg2 Int64_t, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdGoAddBlindTxInData

func CfdGoAddBlindTxInData(blindHandle uintptr, txid string, vout uint32, asset string, assetBlindFactor string, valueBlindFactor string, satoshiAmount int64, assetKey string, tokenKey string) (err error)

*

  • Add blind transaction txin data.
  • param: blindHandle blindTx handle
  • param: txid txin txid
  • param: vout txin vout
  • param: asset utxo asset
  • param: assetBlindFactor utxo asset blind factor
  • param: valueBlindFactor utxo amount blind factor
  • param: satoshiAmount utxo amount
  • param: assetKey issuance asset blinding key
  • param: tokenKey issuance token blinding key
  • return: err error

func CfdGoAddBlindTxOutData

func CfdGoAddBlindTxOutData(blindHandle uintptr, index uint32, confidentialKey string) (err error)

*

  • Add blind transaction txout data.
  • param: blindHandle blindTx handle
  • param: index txout index
  • param: confidentialKey confidential key
  • return: err error

func CfdGoAddConfidentialTxDerSign

func CfdGoAddConfidentialTxDerSign(txHex string, txid string, vout uint32, isWitness bool, signDataHex string, sighashType int, sighashAnyoneCanPay bool, clearStack bool) (outputTxHex string, err error)

*

  • Convert to der encode, and add sign data to confidential transaction.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: isWitness insert sign data to witness stack
  • param: signDataHex sign data hex
  • param: sighashType sighash type
  • param: sighashAnyoneCanPay sighash anyone can pay flag
  • param: clearStack cleanup stack
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxIn

func CfdGoAddConfidentialTxIn(txHex string, txid string, vout uint32, sequence uint32) (outputTxHex string, err error)

*

  • Add txin to confidential transaction.
  • param: txHex transaction hex
  • param: txid txid
  • param: vout vout
  • param: sequence sequence
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxMultisigSign added in v0.0.19

func CfdGoAddConfidentialTxMultisigSign(txHex string, txid string, vout uint32, hashType int, signDataList []CfdMultisigSignData, redeemScript string) (outputTxHex string, err error)

*

  • Add multisig sign to confidential transaction.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: signDataList multisig sign data list.
  • param: redeemScript multisig redeem script.
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxOut

func CfdGoAddConfidentialTxOut(txHex string, asset string, satoshiAmount int64, valueCommitment string, address string, directLockingScript string, nonce string) (outputTxHex string, err error)

*

  • Add txout to confidential transaction.
  • param: txHex transaction hex
  • param: asset asset
  • param: satoshiAmount amount by satoshi
  • param: valueCommitment amount by commitment bytes.
  • param: address destination address
  • param: directLockingScript locking script for direct insert.
  • param: nonce confidential nonce
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxOutput added in v0.0.19

func CfdGoAddConfidentialTxOutput(createTxHandle uintptr, asset string, amount int64, address string) (err error)

*

  • add transaction output for elements.
  • param: createTxHandle handle of createrawtransaction.
  • param: asset target asset.
  • param: amount amount by satoshi.
  • param: address sending address.
  • return: err error

func CfdGoAddConfidentialTxOutputByScript added in v0.0.19

func CfdGoAddConfidentialTxOutputByScript(createTxHandle uintptr, asset string, amount int64, lockingScript string) (err error)

*

  • add transaction output by locking script for elements.
  • param: createTxHandle handle of createrawtransaction.
  • param: asset target asset.
  • param: amount amount by satoshi.
  • param: lockingScript locking script.
  • return: err error

func CfdGoAddConfidentialTxOutputDestroyAmount added in v0.0.19

func CfdGoAddConfidentialTxOutputDestroyAmount(createTxHandle uintptr, asset string, amount int64) (err error)

*

  • add transaction output for destroy amount.
  • param: createTxHandle handle of createrawtransaction.
  • param: asset target asset.
  • param: amount amount by satoshi.
  • return: err error

func CfdGoAddConfidentialTxOutputFee added in v0.0.19

func CfdGoAddConfidentialTxOutputFee(createTxHandle uintptr, asset string, amount int64) (err error)

*

  • add transaction output by fee for elements.
  • param: createTxHandle handle of createrawtransaction.
  • param: asset target asset.
  • param: amount amount by satoshi.
  • return: err error

func CfdGoAddConfidentialTxPubkeyHashSign added in v0.0.19

func CfdGoAddConfidentialTxPubkeyHashSign(txHex string, txid string, vout uint32, hashType int, pubkey string, signatureData CfdSignParameter) (outputTxHex string, err error)

*

  • Add pubkey hash sign data to confidential transaction.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: pubkey public key.
  • param: CfdSignatureData signature data.
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxScriptHashSign added in v0.0.19

func CfdGoAddConfidentialTxScriptHashSign(txHex string, txid string, vout uint32, hashType int, signDataList []CfdSignParameter, redeemScript string) (outputTxHex string, err error)

*

  • Add script hash sign data to confidential transaction.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: signDataList sign data list.
  • param: redeemScript redeem script.
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxSign

func CfdGoAddConfidentialTxSign(txHex string, txid string, vout uint32, isWitness bool, signDataHex string, clearStack bool) (outputTxHex string, err error)

*

  • Add sign data to confidential transaction.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: isWitness insert sign data to witness stack
  • param: signDataHex sign data hex
  • param: clearStack cleanup stack
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxSignWithPrivkey added in v0.0.19

func CfdGoAddConfidentialTxSignWithPrivkey(txHex string, txid string, vout uint32, hashType int, pubkey string, privkey string, satoshiAmount int64, valueCommitment string, sighashType int, sighashAnyoneCanPay bool, hasGrindR bool) (outputTxHex string, err error)

*

  • Generate sign with privkey, and add sign data to confidential transaction.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: pubkey public key.
  • param: privkey private key.
  • param: satoshiAmount input satoshi amount.
  • (used only for exist valueCommitment.)
  • param: valueCommitment input value commitment.
  • param: sighashType sighash type
  • param: sighashAnyoneCanPay sighash anyone can pay flag
  • param: hasGrindR grind-r option for ec-signature.
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxUnlockingScript added in v0.0.7

func CfdGoAddConfidentialTxUnlockingScript(txHex, txid string, vout uint32, isWitness bool, unlockingScript string, clearStack bool) (outputTxHex string, err error)

*

  • Add unlocking script to confidential transaction input.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: isWitness insert sign data to witness stack
  • param: unlockingScript unlocking script hex
  • param: clearStack cleanup stack
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddConfidentialTxUnlockingScriptByIndex added in v0.0.7

func CfdGoAddConfidentialTxUnlockingScriptByIndex(txHex string, index uint32, isWitness bool, unlockingScript string, clearStack bool) (outputTxHex string, err error)

*

  • Add unlocking script to confidential transaction input by index.
  • (prototype interface)
  • param: txHex transaction hex
  • param: index input index
  • param: isWitness insert sign data to witness stack
  • param: unlockingScript unlocking script hex
  • param: clearStack cleanup stack
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddDestoryConfidentialTxOut added in v0.0.9

func CfdGoAddDestoryConfidentialTxOut(txHex string, asset string, satoshiAmount int64) (outputTxHex string, err error)

*

  • Add output for destroying the specified amount of the specified asset.
  • This function is deprecated.
  • param: txHex transaction hex
  • param: asset asset
  • param: satoshiAmount amount by satoshi
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddDestroyConfidentialTxOut added in v0.0.19

func CfdGoAddDestroyConfidentialTxOut(txHex string, asset string, satoshiAmount int64) (outputTxHex string, err error)

*

  • Add output for destroying the specified amount of the specified asset.
  • param: txHex transaction hex
  • param: asset asset
  • param: satoshiAmount amount by satoshi
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddMultisigSignData

func CfdGoAddMultisigSignData(multisigSignHandle uintptr, signature string, relatedPubkey string) (err error)

*

  • Add multisig sign data.
  • param: multisigSignHandle multisig sign handle
  • param: signature signature
  • param: relatedPubkey signature related pubkey
  • return: err error

func CfdGoAddMultisigSignDataToDer

func CfdGoAddMultisigSignDataToDer(multisigSignHandle uintptr, signature string, sighashType int, sighashAnyoneCanPay bool, relatedPubkey string) (err error)

*

  • Convert to der encode, and add multisig sign data.
  • param: multisigSignHandle multisig sign handle
  • param: signature signature
  • param: sighashType sighash type
  • param: sighashAnyoneCanPay sighash anyone can pay flag
  • param: relatedPubkey signature related pubkey
  • return: err error

func CfdGoAddPeginInput added in v0.3.2

func CfdGoAddPeginInput(txHex string, txid string, vout uint32, amount int64, asset, mainchainGenesisBlockHash, claimScript, mainchainTxHex, txoutProof string) (outputTxHex string, err error)

CfdGoAddPeginInput This function add a pegin input.

func CfdGoAddPegoutOutput added in v0.3.2

func CfdGoAddPegoutOutput(txHex string, asset string, amount int64, mainchainNetworkType, elementsNetworkType int, mainchainGenesisBlockHash, onlinePubkey, masterOnlineKey, mainchainOutputDescriptor string, bip32Counter uint32, whitelist string) (outputTxHex string, mainchainAddress string, err error)

CfdGoAddPegoutOutput This function add a pegout output.

func CfdGoAddTapScriptSign added in v0.3.1

func CfdGoAddTapScriptSign(networkType int, txHex string, txid string, vout uint32, signDataList []ByteData, tapscript *Script, controlBlock *ByteData, annex *ByteData) (outputTxHex string, err error)

CfdGoAddTapScriptSign This function add a tapscript sign.

func CfdGoAddTaprootSchnorrSign added in v0.3.1

func CfdGoAddTaprootSchnorrSign(networkType int, txHex string, txid string, vout uint32, signature *ByteData, annex *ByteData) (outputTxHex string, err error)

CfdGoAddTaprootSchnorrSign This function add a taproot schnorr sign.

func CfdGoAddTxInput added in v0.0.19

func CfdGoAddTxInput(createTxHandle uintptr, txid string, vout uint32, sequence uint32) (err error)

*

  • add transaction input. (bitcoin and elements)
  • param: createTxHandle handle of createrawtransaction.
  • param: txid txid of utxo.
  • param: vout vout of utxo.
  • param: sequence sequence number.
  • return: err error

func CfdGoAddTxMultisigSign added in v0.1.26

func CfdGoAddTxMultisigSign(networkType int, txHex string, txid string, vout uint32, hashType int, signDataList []CfdMultisigSignData, redeemScript string) (outputTxHex string, err error)

*

  • Add multisig sign to transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: signDataList multisig sign data list.
  • param: redeemScript multisig redeem script.
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddTxOutput added in v0.0.19

func CfdGoAddTxOutput(createTxHandle uintptr, amount int64, address string) (err error)

*

  • add transaction output for bitcoin.
  • param: createTxHandle handle of createrawtransaction.
  • param: amount amount by satoshi.
  • param: address sending address.
  • return: err error

func CfdGoAddTxOutputByScript added in v0.0.19

func CfdGoAddTxOutputByScript(createTxHandle uintptr, amount int64, lockingScript string) (err error)

*

  • add transaction output by locking script for bitcoin.
  • param: createTxHandle handle of createrawtransaction.
  • param: amount amount by satoshi.
  • param: lockingScript locking script.
  • return: err error

func CfdGoAddTxPubkeyHashSign added in v0.1.26

func CfdGoAddTxPubkeyHashSign(networkType int, txHex string, txid string, vout uint32, hashType int, pubkey string, signatureData CfdSignParameter) (outputTxHex string, err error)

*

  • Add pubkey hash sign data to transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: pubkey public key.
  • param: signatureData signature data.
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddTxScriptHashSign added in v0.1.26

func CfdGoAddTxScriptHashSign(networkType int, txHex string, txid string, vout uint32, hashType int, signDataList []CfdSignParameter, redeemScript string) (outputTxHex string, err error)

*

  • Add script hash sign data to transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: signDataList sign data list.
  • param: redeemScript redeem script.
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddTxSignWithPrivkey added in v0.1.21

func CfdGoAddTxSignWithPrivkey(networkType int, txHex string, txid string, vout uint32, hashType int, pubkey string, privkey string, satoshiAmount int64, sighashType int, sighashAnyoneCanPay bool, hasGrindR bool) (outputTxHex string, err error)

*

  • Generate sign with privkey, and add sign data to confidential transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: pubkey public key.
  • param: privkey private key.
  • param: satoshiAmount input satoshi amount.
  • (used only for exist valueCommitment.)
  • param: sighashType sighash type
  • param: sighashAnyoneCanPay sighash anyone can pay flag
  • param: hasGrindR grind-r option for ec-signature.
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoAddTxSignWithPrivkeyByUtxoList added in v0.3.1

func CfdGoAddTxSignWithPrivkeyByUtxoList(networkType int, txHex string, txinUtxoList []CfdUtxo, txid string, vout uint32, privkey string, sighashType *SigHashType, hasGrindR bool, auxRand, annex *ByteData) (outputTxHex string, err error)

CfdGoAddTxSignWithPrivkeyByUtxoList This function add sign with prikey.

func CfdGoBlindRawTransaction added in v0.1.24

func CfdGoBlindRawTransaction(txHex string, txinList []CfdBlindInputData, txoutList []CfdBlindOutputData, option *CfdBlindTxOption) (outputTx string, err error)

* CfdGoBlindRawTransaction

  • Execute blindrawtransaction.
  • param: txHex transaction hex.
  • param: txinList txin utxo list.
  • param: txoutList txout target list. (need nonce empty txout)
  • param: option blindrawtransaction option.
  • return: outputTx blindrawtransaction tx.
  • return: err error

func CfdGoCalculateEcSignature

func CfdGoCalculateEcSignature(sighash string, privkeyHex string, privkeyWif string, wifNetworkType int, hasGrindR bool) (signature string, err error)

*

  • Calculate ec-signature from privkey.
  • param: sighash signature hash
  • param: privkeyHex privkey hex (Specify either privkeyHex or privkeyWif)
  • param: privkeyWif privkey WIF (Specify either privkeyHex or privkeyWif)
  • param: wifNetworkType network type (for privkey WIF)
  • param: hasGrindR grind-r flag
  • return: signature signature
  • return: err error

func CfdGoClearCustomPrefix added in v0.4.0

func CfdGoClearCustomPrefix() error

CfdGoClearCustomPrefix clear custom prefix.

func CfdGoCoinSelection added in v0.0.8

func CfdGoCoinSelection(utxos []CfdUtxo, targetAmounts []CfdTargetAmount, option CfdCoinSelectOption) (selectUtxos []CfdUtxo, totalAmounts []CfdTargetAmount, utxoFee int64, err error)

*

  • Select coins.
  • param: utxos utxo array
  • param: targetAmounts target amount array
  • param: option option for coinSelection
  • return: selectUtxos select coins
  • return: totalAmounts select amount by asset
  • return: utxoFee fee by utxo
  • return: err error

func CfdGoCombinePubkey added in v0.1.21

func CfdGoCombinePubkey(pubkeyList []string) (combinedPubkey string, err error)

* CfdGoCombinePubkey

  • Combine pubkey.
  • param: pubkeyList pubkey list.
  • return: combinedPubkey combined pubkey.
  • return: err error

func CfdGoCombinePubkeyPair added in v0.1.21

func CfdGoCombinePubkeyPair(sourcePubkey string, destPubkey string) (combinedPubkey string, err error)

* CfdGoCombinePubkeyPair

  • Compress pubkey.
  • param: sourcePubkey source pubkey.
  • param: destPubkey destination pubkey.
  • return: combinedPubkey combined pubkey.
  • return: err error

func CfdGoCompressPubkey added in v0.1.21

func CfdGoCompressPubkey(pubkey string) (compressedPubkey string, err error)

* CfdGoCompressPubkey

  • Compress pubkey.
  • param: pubkey pubkey.
  • return: compressedPubkey compressed pubkey.
  • return: err error

func CfdGoConvertEntropyToMnemonic added in v0.1.23

func CfdGoConvertEntropyToMnemonic(entropy string, language string) (mnemonic string, err error)

* CfdGoConvertEntropyToMnemonic

  • Convert entropy to mnemonic.
  • param: entropy entropy hex.
  • param: language language. (default: en)
  • return: mnemonic mnemonic string. (split space)
  • return: err error

func CfdGoConvertMnemonicToSeed added in v0.1.23

func CfdGoConvertMnemonicToSeed(mnemonic string, passphrase string, language string) (seed string, entropy string, err error)

* CfdGoConvertMnemonicToSeed

  • Convert mnemonic to seed.
  • param: mnemonic mnemonic string. (split space)
  • param: passphrase passphrase
  • param: language language. (default: en)
  • return: seed seed hex.
  • return: entropy mnemonic's entropy hex.
  • return: err error

func CfdGoConvertMnemonicWordsToSeed added in v0.1.23

func CfdGoConvertMnemonicWordsToSeed(mnemonicWords []string, passphrase string, language string) (seed string, entropy string, err error)

* CfdGoConvertMnemonicWordsToSeed

  • Convert mnemonic to seed.
  • param: mnemonicWords mnemonic word array.
  • param: passphrase passphrase
  • param: language language. (default: en)
  • return: seed seed hex.
  • return: entropy entropy hex.
  • return: err error

func CfdGoConvertScriptAsmToHex added in v0.0.6

func CfdGoConvertScriptAsmToHex(scriptAsm string) (script string, err error)

*

  • Convert script asm to hex.
  • param: scriptAsm script assembly string.
  • return: script hex encoded script.
  • return: err error

func CfdGoCreateAddress

func CfdGoCreateAddress(hashType int, pubkey string, redeemScript string, networkType int) (address string, lockingScript string, p2shSegwitLockingScript string, err error)

*

  • Create Address.
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • param: pubkey pubkey (pubkey hash only)
  • param: redeemScript redeem script (script hash only)
  • param: networkType network type
  • return: address address string
  • return: lockingScript locking script
  • return: p2shSegwitLockingScript p2sh-segwit witness program
  • return: err error

func CfdGoCreateConfidentialAddress

func CfdGoCreateConfidentialAddress(address string, confidentialKey string) (confidentialAddress string, err error)

*

  • Create confidential address.
  • param: address address
  • param: confidentialKey confidential key
  • return: confidentialAddress confidential address
  • return: err error

func CfdGoCreateConfidentialSighash

func CfdGoCreateConfidentialSighash(txHex string, txid string, vout uint32, hashType int, pubkey string, redeemScript string, satoshiAmount int64, valueCommitment string, sighashType int, sighashAnyoneCanPay bool) (sighash string, err error)

*

  • Create sighash from confidential transaction.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type
  • param: pubkey pubkey (p2pkh, p2wpkh, p2sh-p2wpkh)
  • param: redeemScript redeem script (p2Sh, p2wsh, p2sh-p2wsh)
  • param: satoshiAmount amount by satoshi
  • param: valueCommitment amount by commitment bytes.
  • param: sighashType sighash type
  • param: sighashAnyoneCanPay sighash anyone can pay flag
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoCreateExtPubkey

func CfdGoCreateExtPubkey(extkey string, networkType int) (extPubkey string, err error)

*

  • Create extpubkey from extprivkey.
  • param: extkey ext privkey.
  • param: networkType network type.
  • return: extPubkey ext pubkey.
  • return: err error

func CfdGoCreateExtkey added in v0.1.23

func CfdGoCreateExtkey(networkType int, extkeyType int, fingerprint string, key string, chainCode string, depth byte, childNumber uint32) (extkey string, err error)

* CfdGoCreateExtkey

  • Create extkey.
  • param: networkType network type.
  • param: extkeyType extkey type. (0: privkey, 1: pubkey)
  • param: fingerprint fingerprint.
  • param: key key.
  • param: chainCode chain code.
  • param: depth depth.
  • param: childNumber child number. (0x80000000 over is hardened.)
  • return: extkey extkey.
  • return: err error

func CfdGoCreateExtkeyByFormat added in v0.4.0

func CfdGoCreateExtkeyByFormat(networkType int, extkeyType int, fingerprint string, key string, chainCode string, depth byte, childNumber uint32, formatType int) (extkey string, err error)

CfdGoCreateExtkeyByFormat create extended key by format.

func CfdGoCreateExtkeyByFormatFromParent added in v0.4.0

func CfdGoCreateExtkeyByFormatFromParent(networkType int, extkeyType int, parentKey string, key string, chainCode string, depth byte, childNumber uint32, formatType int) (extkey string, err error)

CfdGoCreateExtkeyByFormatFromParent create extended key by format.

func CfdGoCreateExtkeyByFormatFromSeed added in v0.4.0

func CfdGoCreateExtkeyByFormatFromSeed(seed string, networkType int, keyType int, formatType int) (extkey string, err error)

CfdGoCreateExtkeyByFormatFromSeed create extended key by format.

func CfdGoCreateExtkeyFromParent added in v0.1.23

func CfdGoCreateExtkeyFromParent(networkType int, extkeyType int, parentKey string, key string, chainCode string, depth byte, childNumber uint32) (extkey string, err error)

* CfdGoCreateExtkeyFromParent

  • Create extkey from parent key.
  • param: networkType network type.
  • param: extkeyType extkey type. (0: privkey, 1: pubkey)
  • param: parentKey parent key. (pubkey or privkey)
  • param: key key. (pubkey or privkey)
  • param: chainCode chain code.
  • param: depth depth.
  • param: childNumber child number. (0x80000000 over is hardened.)
  • return: extkey extkey.
  • return: err error

func CfdGoCreateExtkeyFromParentPath

func CfdGoCreateExtkeyFromParentPath(extkey string, path string, networkType int, keyType int) (childExtkey string, err error)

*

  • Create extkey from parent path.
  • param: extkey parent extkey.
  • param: path bip32 key path.(ex: 0/0h/0'/0)
  • param: networkType network type.
  • param: keyType extkey type. (0: privkey, 1: pubkey)
  • return: childExtkey child extkey.
  • return: err error

func CfdGoCreateExtkeyFromSeed

func CfdGoCreateExtkeyFromSeed(seed string, networkType int, keyType int) (extkey string, err error)

*

  • Create extkey from seed.
  • param: seed seed data(hex).
  • param: networkType network type.
  • param: keyType extkey type. (0: privkey, 1: pubkey)
  • return: extkey extkey.
  • return: err error

func CfdGoCreateHandle

func CfdGoCreateHandle() (handle uintptr, err error)

*

  • Create cfd handle.
  • return: handle cfd handle. release: CfdGoFreeHandle
  • return: err error struct

func CfdGoCreateKeyPair

func CfdGoCreateKeyPair(isCompress bool, networkType int) (pubkey string, privkeyHex string, privkeyWif string, err error)

*

  • Create key pair.
  • param: isCompress pubkey compressed.
  • param: networkType privkey wif network type.
  • return: pubkey pubkey.
  • return: privkeyHex privkey hex.
  • return: privkeyWif privkey wif.
  • return: err error

func CfdGoCreateMultisigScript

func CfdGoCreateMultisigScript(networkType int, hashType int, pubkeys []string, requireNum uint32) (address string, redeemScript string, witnessScript string, err error)

*

  • Create multisig script and address.
  • param: networkType network type
  • param: hashType hash type (p2sh, p2wsh, etc...)
  • param: pubkeys pubkey list (max 15 key)
  • param: requireNum pubkey require signature
  • return: address address string
  • return: redeemScript redeem script
  • return: witnessScript witness script
  • return: err error

func CfdGoCreateMultisigScriptSig added in v0.0.6

func CfdGoCreateMultisigScriptSig(signItems []CfdMultisigSignData, redeemScript string) (scriptsig string, err error)

*

  • Create multisig scriptsig.
  • param: signItems array of multisig sign data struct.
  • param: redeemScript hex encoded multisig script.
  • return: scriptsig hex encoded script.
  • return: err error

func CfdGoCreateScript added in v0.0.6

func CfdGoCreateScript(scriptItems []string) (script string, err error)

*

  • Create script from script items.
  • param: scriptItems array of script element string.
  • return: script hex encoded script.
  • return: err error

func CfdGoCreateScriptTreeElementsHandle added in v0.4.0

func CfdGoCreateScriptTreeElementsHandle(handle uintptr) (treeHandle uintptr, err error)

CfdGoCreateScriptTreeElementsHandle This function is create a script tree handle.

func CfdGoCreateScriptTreeHandle added in v0.3.1

func CfdGoCreateScriptTreeHandle(handle uintptr) (treeHandle uintptr, err error)

CfdGoCreateScriptTreeHandle This function is create a script tree handle.

func CfdGoCreateSighash added in v0.1.21

func CfdGoCreateSighash(networkType int, txHex string, txid string, vout uint32, hashType int, pubkey string, redeemScript string, satoshiAmount int64, sighashType int, sighashAnyoneCanPay bool) (sighash string, err error)

*

  • Create sighash from transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type
  • param: pubkey pubkey (p2pkh, p2wpkh, p2sh-p2wpkh)
  • param: redeemScript redeem script (p2Sh, p2wsh, p2sh-p2wsh)
  • param: satoshiAmount amount by satoshi
  • param: sighashType sighash type
  • param: sighashAnyoneCanPay sighash anyone can pay flag
  • return: sighash signature hash
  • return: err error

func CfdGoDecodeBase58 added in v0.3.14

func CfdGoDecodeBase58(base58 string, useChecksum bool) (output string, err error)

CfdGoDecodeBase58 ...

func CfdGoDecodeBase64 added in v0.3.14

func CfdGoDecodeBase64(base64 string) (output string, err error)

CfdGoDecodeBase64 ...

func CfdGoDecodeRawTransactionJson added in v0.0.19

func CfdGoDecodeRawTransactionJson(txHex string, netType string, isElements bool) (jsonString string, err error)

*

  • Decode transaction hex.
  • param: txHex transaction hex.
  • param: nettype nettype string. (mainnet/testnet/regtest)
  • param: isElements elements mode flag.
  • return: jsonString response json string.
  • return: err error

func CfdGoDecodeSignatureFromDer added in v0.0.19

func CfdGoDecodeSignatureFromDer(derEncodedSignature string) (signature string, sighashType int, sighashAnyoneCanPay bool, err error)

*

  • Decode der encoded signature.
  • param: derEncodedSignature signature encoded by der encodeing.
  • return: signature compact format signature.
  • return: sighashType sighash type.
  • return: sighashAnyoneCanPay flag of signing only the current input.
  • return: err error

func CfdGoDecryptAES added in v0.3.14

func CfdGoDecryptAES(key, cbcIv, buffer string) (output string, err error)

CfdGoDecryptAES ...

func CfdGoEncodeBase58 added in v0.3.14

func CfdGoEncodeBase58(buffer string, useChecksum bool) (output string, err error)

CfdGoEncodeBase58 ...

func CfdGoEncodeBase64 added in v0.3.14

func CfdGoEncodeBase64(buffer string) (output string, err error)

CfdGoEncodeBase64 ...

func CfdGoEncodeSignatureByDer added in v0.0.6

func CfdGoEncodeSignatureByDer(signature string, sighashType int, sighash_anyone_can_pay bool) (derSignature string, err error)

*

  • Encode ec signature by der encoding.
  • param: signature compact format signature.
  • param: sighashType sighash type.
  • param: sighash_anyone_can_pay flag of signing only the current input.
  • return: derSignature signature encoded by der encodeing.
  • return: err error

func CfdGoEncryptAES added in v0.3.14

func CfdGoEncryptAES(key, cbcIv, buffer string) (output string, err error)

CfdGoEncryptAES ...

func CfdGoEstimateFee added in v0.0.8

func CfdGoEstimateFee(txHex string, inputs []CfdEstimateFeeInput, option CfdFeeEstimateOption) (totalFee, txoutFee, utxoFee int64, err error)

*

  • Estimate fee amount.
  • param: txHex transaction hex
  • param: inputs inputs to set in the transaction
  • param: option options for fee estimation
  • return: totalFee total fee value when all utxos set to input.
  • (totalFee = txoutFee + utxoFee)
  • return: txoutFee base transaction fee value.
  • return: utxoFee fee value all of input set utxo.

func CfdGoEstimateFeeUsingUtxo added in v0.3.1

func CfdGoEstimateFeeUsingUtxo(txHex string, inputs []CfdUtxo, option CfdFeeEstimateOption) (totalFee, txoutFee, utxoFee int64, err error)

*

  • Estimate fee amount.
  • param: txHex transaction hex
  • param: inputs inputs to set in the transaction
  • param: option options for fee estimation
  • return: totalFee total fee value when all utxos set to input.
  • (totalFee = txoutFee + utxoFee)
  • return: txoutFee base transaction fee value.
  • return: utxoFee fee value all of input set utxo.

func CfdGoExistTxidInBlock added in v0.3.3

func CfdGoExistTxidInBlock(networkType int, block, txid string) (exist bool, err error)

CfdGoExistTxidInBlock This function get a exist tx in a block.

func CfdGoFinalizeBlindTx

func CfdGoFinalizeBlindTx(blindHandle uintptr, txHex string) (outputTxHex string, err error)

*

  • Generate blind transaction.
  • param: blindHandle blindTx handle
  • param: txHex transaction hex
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoFinalizeElementsMultisigSign

func CfdGoFinalizeElementsMultisigSign(multiSignHandle uintptr, txHex string, txid string, vout uint32, hashType int, witnessScript string, redeemScript string, clearStack bool) (outputTxHex string, err error)

*

  • Add multisig sign data to confidential transaction.
  • param: multiSignHandle multisig sign handle
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: hashType hash type
  • param: witnessScript witness script (p2wsh, p2sh-p2wsh)
  • param: redeemScript redeem script (p2sh, p2sh-p2wsh)
  • param: clearStack cleanup stack
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoFinalizeTransaction added in v0.0.19

func CfdGoFinalizeTransaction(createTxHandle uintptr) (txHex string, err error)

*

  • finalize transaction.
  • param: createTxHandle handle of createrawtransaction.
  • return: txHex transaction hex.
  • return: err error

func CfdGoFreeBlindHandle

func CfdGoFreeBlindHandle(blindHandle uintptr) (err error)

*

  • Free blind handle.
  • param: blindHandle blindTx handle
  • return: err error

func CfdGoFreeHandle

func CfdGoFreeHandle(handle uintptr) (err error)

*

  • Free cfd handle.
  • param: handle cfd handle
  • return: err error struct

func CfdGoFreeMultisigSignHandle

func CfdGoFreeMultisigSignHandle(multisigSignHandle uintptr) (err error)

*

  • Free multisig sign handle.
  • param: multisigSignHandle multisig sign handle
  • return: err error

func CfdGoFreeScriptTreeHandle added in v0.3.1

func CfdGoFreeScriptTreeHandle(handle uintptr, treeHandle uintptr) error

CfdGoFreeScriptTreeHandle This function is free a script tree handle.

func CfdGoFreeTransactionHandle added in v0.0.19

func CfdGoFreeTransactionHandle(createTxHandle uintptr)

*

  • free transaction handle.
  • param: createTxHandle handle of createrawtransaction.

func CfdGoFreeTxDataHandle added in v0.1.35

func CfdGoFreeTxDataHandle(txDataHandle uintptr) (err error)

func CfdGoFundRawTransaction added in v0.1.23

func CfdGoFundRawTransaction(networkType int, txHex string, txinList []CfdUtxo, utxoList []CfdUtxo, targetAmountList []CfdFundRawTxTargetAmount, option *CfdFundRawTxOption) (outputTx string, fee int64, usedAddressList []string, err error)

* CfdGoFundRawTransaction

  • Execute fundrawtransacdtion.
  • param: networkType network type.
  • param: txHex transaction hex.
  • param: txinList txin utxo list.
  • param: utxoList utxo list.
  • param: targetAmountList selection target amount list.
  • param: option fundrawtransaction option.
  • return: outputTx fundrawtransaction tx.
  • return: fee fee amount.
  • return: usedAddressList used address list.
  • return: err error

func CfdGoFundRawTransactionAndCalcFee added in v0.3.16

func CfdGoFundRawTransactionAndCalcFee(networkType int, txHex string, txinList []CfdUtxo, utxoList []CfdUtxo, targetAmountList []CfdFundRawTxTargetAmount, option *CfdFundRawTxOption) (outputTx string, fee int64, usedAddressList []string, calcFee int64, err error)

func CfdGoFundRawTransactionBtc added in v0.1.23

func CfdGoFundRawTransactionBtc(txHex string, txinList []CfdUtxo, utxoList []CfdUtxo, targetAmount int64, reservedAddress string, option *CfdFundRawTxOption) (outputTx string, fee int64, usedAddressList []string, err error)

* CfdGoFundRawTransactionBtc

  • Execute fundrawtransacdtion on bitcoin.
  • param: networkType network type.
  • param: txHex transaction hex.
  • param: txinList txin utxo list.
  • param: utxoList utxo list.
  • param: targetAmount target amount. see: CfdFundRawTxTargetAmount.Amount
  • param: reservedAddress address for adding txout. Also serves as a change address.
  • param: option fundrawtransaction option.
  • return: outputTx fundrawtransaction tx.
  • return: fee fee amount.
  • return: usedAddressList used address list.
  • return: err error

func CfdGoGetAddressFromLockingScript added in v0.0.6

func CfdGoGetAddressFromLockingScript(lockingScript string, networkType int) (address string, err error)

*

  • Get address from locking script.
  • param: lockingScript locking script
  • param: networkType network type
  • param: hashType hash type (p2sh, p2wsh, etc...)
  • return: address address
  • return: err error

func CfdGoGetAddressesFromMultisig

func CfdGoGetAddressesFromMultisig(redeemScript string, networkType int, hashType int) (addressList []string, pubkeyList []string, err error)

*

  • Get multisig pubkeys address.
  • param: redeemScript multisig script
  • param: networkType network type
  • param: hashType hash type (p2sh, p2wsh, etc...)
  • return: addressList address list
  • return: pubkeyList pubkey list
  • return: err error

func CfdGoGetAmountCommitment added in v0.1.27

func CfdGoGetAmountCommitment(amount int64, assetCommitment, blinder string) (commitment string, err error)

CfdGoGetAmountCommitment get amount commitment.

func CfdGoGetAssetCommitment added in v0.1.27

func CfdGoGetAssetCommitment(asset, assetBlinder string) (assetCommitment string, err error)

CfdGoGetAssetCommitment get asset commitment.

func CfdGoGetConfidentialTxIn

func CfdGoGetConfidentialTxIn(txHex string, index uint32) (txid string, vout uint32, sequence uint32, scriptSig string, err error)

*

  • Get txin on confidential transaction.
  • param: txHex transaction hex
  • param: index txin index
  • return: txid txid
  • return: vout vout
  • return: sequence sequence
  • return: scriptSig unlockingScript
  • return: err error

func CfdGoGetConfidentialTxInCount

func CfdGoGetConfidentialTxInCount(txHex string) (count uint32, err error)

*

  • Get txin count on confidential transaction.
  • param: txHex transaction hex
  • return: count txin count
  • return: err error

func CfdGoGetConfidentialTxInIndex added in v0.0.18

func CfdGoGetConfidentialTxInIndex(txHex string, txid string, vout uint32) (index uint32, err error)

*

  • Get txin index on confidential transaction.
  • param: txHex transaction hex
  • param: txid transaction id
  • param: vout transaction vout
  • return: index txin index
  • return: err error

func CfdGoGetConfidentialTxInPeginWitness added in v0.0.19

func CfdGoGetConfidentialTxInPeginWitness(txHex string, txinIndex uint32, stackIndex uint32) (stackData string, err error)

*

  • Get pegin witness stack on confidential transaction input.
  • param: txHex transaction hex
  • param: txinIndex txin index
  • param: stackIndex witness stack index
  • return: stackData witness stack data
  • return: err error

func CfdGoGetConfidentialTxInPeginWitnessCount added in v0.0.19

func CfdGoGetConfidentialTxInPeginWitnessCount(txHex string, txinIndex uint32) (count uint32, err error)

*

  • Get witness stack count on confidential transaction input.
  • param: txHex transaction hex
  • param: txinIndex txin index
  • return: count witness stack count
  • return: err error

func CfdGoGetConfidentialTxInWitness

func CfdGoGetConfidentialTxInWitness(txHex string, txinIndex uint32, stackIndex uint32) (stackData string, err error)

*

  • Get witness stack on confidential transaction input.
  • param: txHex transaction hex
  • param: txinIndex txin index
  • param: stackIndex witness stack index
  • return: stackData witness stack data
  • return: err error

func CfdGoGetConfidentialTxInWitnessCount

func CfdGoGetConfidentialTxInWitnessCount(txHex string, txinIndex uint32) (count uint32, err error)

*

  • Get witness stack count on confidential transaction input.
  • param: txHex transaction hex
  • param: txinIndex txin index
  • return: count witness stack count
  • return: err error

func CfdGoGetConfidentialTxOut

func CfdGoGetConfidentialTxOut(txHex string, index uint32) (asset string, satoshiAmount int64, valueCommitment string, nonce string, lockingScript string, surjectionProof string, rangeproof string, err error)

*

  • Get txout on confidential transaction.
  • param: txHex transaction hex
  • param: index txin index
  • return: asset asset
  • return: satoshiAmount amount by satoshi
  • return: valueCommitment amount by commitment bytes.
  • return: nonce confidential nonce
  • return: lockingScript locking script
  • return: surjectionProof asset surjection proof.
  • return: rangeproof amount rangeproof.
  • return: err error

func CfdGoGetConfidentialTxOutByHandle added in v0.1.35

func CfdGoGetConfidentialTxOutByHandle(txDataHandle uintptr, index uint32) (asset string, satoshiAmount int64, valueCommitment string, nonce string, lockingScript string, surjectionProof string, rangeproof string, err error)

func CfdGoGetConfidentialTxOutCount

func CfdGoGetConfidentialTxOutCount(txHex string) (count uint32, err error)

*

  • Get txout count on confidential transaction.
  • param: txHex transaction hex
  • return: count txout count
  • return: err error

func CfdGoGetConfidentialTxOutIndex added in v0.0.18

func CfdGoGetConfidentialTxOutIndex(txHex string, address string, directLockingScript string) (index uint32, err error)

*

  • Get txout index on confidential transaction.
  • param: txHex transaction hex
  • param: address address string
  • param: directLockingScript lockingScript (if address is empty)
  • return: index txout index
  • return: err error

func CfdGoGetConfidentialTxOutSimpleByHandle added in v0.1.35

func CfdGoGetConfidentialTxOutSimpleByHandle(txDataHandle uintptr, index uint32) (asset string, satoshiAmount int64, valueCommitment string, nonce string, lockingScript string, err error)

func CfdGoGetDefaultBlindingKey added in v0.1.24

func CfdGoGetDefaultBlindingKey(masterBlindingKey string, lockingScript string) (blindingKey string, err error)

*

  • Get default blinding key by locking script.
  • param: masterBlindingKey master blinding key
  • param: lockingScript locking script
  • return: blindingKey blinding key
  • return: err error

func CfdGoGetDefaultBlindingKeyByAddress added in v0.1.24

func CfdGoGetDefaultBlindingKeyByAddress(masterBlindingKey string, address string) (blindingKey string, err error)

*

  • Get default blinding key by address.
  • param: masterBlindingKey master blinding key
  • param: address address
  • return: blindingKey blinding key
  • return: err error

func CfdGoGetDescriptorChecksum added in v0.0.16

func CfdGoGetDescriptorChecksum(networkType int, descriptor string) (descriptorAddedChecksum string, err error)

*

  • Get outputDescriptor's checksum.
  • param: networkType network type
  • param: descriptor descriptor.
  • return: descriptorAddedChecksum descriptor added checksum.
  • return: err error

func CfdGoGetIssuanceBlindingKey

func CfdGoGetIssuanceBlindingKey(masterBlindingKey string, txid string, vout uint32) (blindingKey string, err error)

*

  • Get issuance blinding key.
  • param: masterBlindingKey master blinding key
  • param: txid utxo txid
  • param: vout utxo vout
  • return: blindingKey issuance blinding key
  • return: err error

func CfdGoGetMnemonicWordList added in v0.1.23

func CfdGoGetMnemonicWordList(language string) (mnemonicList []string, err error)

* CfdGoGetMnemonicWordList

  • Get mnemonic word list.
  • param: language language. (default: en)
  • return: mnemonicList mnemonic word list.
  • return: err error

func CfdGoGetParentExtkeyPathData added in v0.0.16

func CfdGoGetParentExtkeyPathData(
	parentExtkey, path string, childExtkeyType int) (keyPathData, childExtkey string, err error)

*

  • Get parent key path data.
  • param: parentExtkey parent ext key string.
  • param: path child path.
  • param: childExtkeyType child key type. (see CfdDescriptorKeyType)
  • return: keyPathData key path data.
  • return: childExtkey child ext key string.
  • return: err error

func CfdGoGetPeginAddress added in v0.3.2

func CfdGoGetPeginAddress(mainchainNetworkType int, fedpegScript string, hashType int, pubkey, redeemScript string) (peginAddress, claimScript, tweakedFedpegScript string, err error)

CfdGoGetPeginAddress This function get a pegin address.

func CfdGoGetPegoutAddress added in v0.3.4

func CfdGoGetPegoutAddress(mainchainNetworkType, elementsNetworkType int, descriptorOrXpub string, bip32Counter uint32, addressType int) (pegoutAddress, baseDescriptor string, err error)

CfdGoGetPegoutAddress This function get a pegout address.

func CfdGoGetPegoutAddressFromTransaction added in v0.3.4

func CfdGoGetPegoutAddressFromTransaction(networkType int, txHex string, index uint32, mainchainNetwork int) (pegoutAddress string, isPegoutOutput bool, err error)

CfdGoGetPegoutAddressFromTransaction This function get a pegout address from transaction.

func CfdGoGetPrivkeyFromExtkey

func CfdGoGetPrivkeyFromExtkey(extkey string, networkType int) (privkeyHex string, privkeyWif string, err error)

*

  • Get privkey from extprivkey.
  • param: extkey ext privkey.
  • param: networkType network type.
  • return: privkeyHex privkey hex.
  • return: privkeyWif privkey wif.
  • return: err error

func CfdGoGetPrivkeyFromWif

func CfdGoGetPrivkeyFromWif(privkeyWif string, networkType int) (privkeyHex string, err error)

*

  • Get privkey from WIF.
  • param: privkeyWif privkey wif.
  • param: networkType privkey wif network type.
  • return: privkeyHex privkey hex.
  • return: err error

func CfdGoGetPrivkeyWif added in v0.0.16

func CfdGoGetPrivkeyWif(privkeyHex string, networkType int, isCompress bool) (privkeyWif string, err error)

*

  • Get privkey WIF from hex.
  • param: privkeyHex privkey hex.
  • param: networkType privkey wif network type.
  • param: isCompress pubkey compressed.
  • return: privkeyWif privkey wif.
  • return: err error

func CfdGoGetPubkeyFromExtkey

func CfdGoGetPubkeyFromExtkey(extkey string, networkType int) (pubkey string, err error)

*

  • Get pubkey from extkey.
  • param: extkey extkey.
  • param: networkType network type.
  • return: pubkey pubkey.
  • return: err error

func CfdGoGetPubkeyFromPrivkey

func CfdGoGetPubkeyFromPrivkey(privkeyHex string, privkeyWif string, isCompress bool) (pubkey string, err error)

*

  • Get pubkey from privkey.
  • param: privkeyHex privkey hex. (or privkeyWif)
  • param: privkeyWif privkey wif. (or privkeyHex)
  • param: isCompress pubkey compressed.
  • return: pubkey pubkey hex.
  • return: err error

func CfdGoGetSighash added in v0.3.1

func CfdGoGetSighash(networkType int, txHex string, txinUtxoList []CfdUtxo, txid string, vout uint32, sighashType *SigHashType, pubkey *ByteData, redeemScript *Script, tapLeafHash, annex *ByteData, codeSeparatorPosition *uint32) (sighash string, err error)

CfdGoGetSighash This function return a sighash.

func CfdGoGetSighashByKey added in v0.3.1

func CfdGoGetSighashByKey(networkType int, txHex string, txinUtxoList []CfdUtxo, txid string, vout uint32, sighashType *SigHashType, pubkey *ByteData, annex *ByteData) (sighash string, err error)

CfdGoGetSighashByKey This function return a sighash by pubkey.

func CfdGoGetSighashByScript added in v0.3.1

func CfdGoGetSighashByScript(networkType int, txHex string, txinUtxoList []CfdUtxo, txid string, vout uint32, sighashType *SigHashType, redeemScript *Script) (sighash string, err error)

CfdGoGetSighashByScript This function return a sighash by redeem script.

func CfdGoGetSighashByTapScript added in v0.3.1

func CfdGoGetSighashByTapScript(networkType int, txHex string, txinUtxoList []CfdUtxo, txid string, vout uint32, sighashType *SigHashType, redeemScript *Script, tapLeafHash, annex *ByteData, codeSeparatorPosition *uint32) (sighash string, err error)

CfdGoGetSighashByTapScript This function return a sighash by tapscript.

func CfdGoGetSupportedFunction

func CfdGoGetSupportedFunction() (funcFlag uint64, err error)

*

  • Get supported function.
  • return: funcFlag function flag.
  • return: err error struct

func CfdGoGetTransactionDataFromBlock added in v0.3.3

func CfdGoGetTransactionDataFromBlock(networkType int, block, txid string) (txHex, txoutProof string, err error)

CfdGoGetTransactionDataFromBlock This function get a tx data.

func CfdGoGetTxCountInBlock added in v0.3.3

func CfdGoGetTxCountInBlock(networkType int, block string) (count uint32, err error)

CfdGoGetTxCountInBlock This function get a tx count.

func CfdGoGetTxIn added in v0.1.21

func CfdGoGetTxIn(networkType int, txHex string, index uint32) (txid string, vout uint32, sequence uint32, scriptSig string, err error)

*

  • Get txin on transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: index txin index
  • return: txid txid
  • return: vout vout
  • return: sequence sequence
  • return: scriptSig unlockingScript
  • return: err error

func CfdGoGetTxInByHandle added in v0.1.35

func CfdGoGetTxInByHandle(txDataHandle uintptr, index uint32) (txid string, vout uint32, sequence uint32, scriptSig string, err error)

func CfdGoGetTxInCount added in v0.1.21

func CfdGoGetTxInCount(networkType int, txHex string) (count uint32, err error)

*

  • Get txin count on transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • return: count txin count
  • return: err error

func CfdGoGetTxInCountByHandle added in v0.1.35

func CfdGoGetTxInCountByHandle(txDataHandle uintptr) (count uint32, err error)

func CfdGoGetTxInIndex added in v0.1.21

func CfdGoGetTxInIndex(networkType int, txHex string, txid string, vout uint32) (index uint32, err error)

*

  • Get txin index on transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: txid transaction id
  • param: vout transaction vout
  • return: index txin index
  • return: err error

func CfdGoGetTxInIndexByHandle added in v0.1.35

func CfdGoGetTxInIndexByHandle(txDataHandle uintptr, txid string, vout uint32) (index uint32, err error)

func CfdGoGetTxInIssuanceInfo

func CfdGoGetTxInIssuanceInfo(txHex string, index uint32) (entropy string, nonce string, assetAmount int64, assetValue string, tokenAmount int64, tokenValue string, assetRangeproof string, tokenRangeproof string, err error)

*

  • Get txin issuance on confidential transaction.
  • param: txHex transaction hex
  • param: index txin index
  • return: entropy blinding asset entropy
  • return: nonce blinding nonce
  • return: assetAmount asset amount value
  • return: assetValue asset commitment value
  • return: tokenAmount token amount value
  • return: tokenValue token commitment value
  • return: assetRangeproof asset rangeproof
  • return: tokenRangeproof token rangeproof
  • return: err error

func CfdGoGetTxInIssuanceInfoByHandle added in v0.1.35

func CfdGoGetTxInIssuanceInfoByHandle(txDataHandle uintptr, index uint32) (entropy string, nonce string, assetAmount int64, assetValue string, tokenAmount int64, tokenValue string, assetRangeproof string, tokenRangeproof string, err error)

func CfdGoGetTxInWitness added in v0.1.21

func CfdGoGetTxInWitness(networkType int, txHex string, txinIndex uint32, stackIndex uint32) (stackData string, err error)

*

  • Get witness stack on transaction input.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: txinIndex txin index
  • param: stackIndex witness stack index
  • return: stackData witness stack data
  • return: err error

func CfdGoGetTxInWitnessByHandle added in v0.1.35

func CfdGoGetTxInWitnessByHandle(txDataHandle uintptr, witnessType int, txinIndex uint32, stackIndex uint32) (stackData string, err error)

func CfdGoGetTxInWitnessCount added in v0.1.21

func CfdGoGetTxInWitnessCount(networkType int, txHex string, txinIndex uint32) (count uint32, err error)

*

  • Get witness stack count on transaction input.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: txinIndex txin index
  • return: count witness stack count
  • return: err error

func CfdGoGetTxInWitnessCountByHandle added in v0.1.35

func CfdGoGetTxInWitnessCountByHandle(txDataHandle uintptr, witnessType int, txinIndex uint32) (count uint32, err error)

func CfdGoGetTxOut added in v0.1.21

func CfdGoGetTxOut(networkType int, txHex string, index uint32) (satoshiAmount int64, lockingScript string, err error)

*

  • Get txout on transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: index txin index
  • return: asset asset
  • return: satoshiAmount amount by satoshi
  • return: valueCommitment amount by commitment bytes.
  • return: nonce confidential nonce
  • return: lockingScript locking script
  • return: err error

func CfdGoGetTxOutByHandle added in v0.1.35

func CfdGoGetTxOutByHandle(txDataHandle uintptr, index uint32) (satoshiAmount int64, lockingScript string, asset string, err error)

func CfdGoGetTxOutCount added in v0.1.21

func CfdGoGetTxOutCount(networkType int, txHex string) (count uint32, err error)

*

  • Get txout count on transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • return: count txout count
  • return: err error

func CfdGoGetTxOutCountByHandle added in v0.1.35

func CfdGoGetTxOutCountByHandle(txDataHandle uintptr) (count uint32, err error)

func CfdGoGetTxOutIndex added in v0.1.21

func CfdGoGetTxOutIndex(networkType int, txHex string, address string, directLockingScript string) (index uint32, err error)

*

  • Get txout index on transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: address address string
  • param: directLockingScript lockingScript (if address is empty)
  • return: index txout index
  • return: err error

func CfdGoGetTxOutIndexByHandle added in v0.1.35

func CfdGoGetTxOutIndexByHandle(txDataHandle uintptr, address string, directLockingScript string) (index uint32, err error)

func CfdGoGetTxOutIndexes added in v0.3.2

func CfdGoGetTxOutIndexes(networkType int, txHex string, address, directLockingScript string) (indexes []uint32, err error)

CfdGoGetTxOutIndexes This function get txout index list.

func CfdGoGetTxidListFromBlock added in v0.3.3

func CfdGoGetTxidListFromBlock(networkType int, block string) (txidList []string, err error)

CfdGoGetTxidListFromBlock This function get txid list from block.

func CfdGoHash160 added in v0.3.14

func CfdGoHash160(message string, hasText bool) (output string, err error)

CfdGoHash160 ...

func CfdGoHash256 added in v0.3.14

func CfdGoHash256(message string, hasText bool) (output string, err error)

CfdGoHash256 ...

func CfdGoInitializeBlindTx

func CfdGoInitializeBlindTx() (blindHandle uintptr, err error)

*

  • Get blind transaction handle.
  • return: blindHandle blindTx handle. release: CfdGoFreeBlindHandle
  • return: err error

func CfdGoInitializeConfidentialTransaction added in v0.0.19

func CfdGoInitializeConfidentialTransaction(version uint32, locktime uint32) (createTxHandle uintptr, err error)

*

  • initialize elements createrawtransaction with version & locktime.
  • param: version transaction version.
  • param: locktime transaction lock time.
  • return: createTxHandle handle of createrawtransaction.
  • return: err error

func CfdGoInitializeConfidentialTransactionByHex added in v0.0.19

func CfdGoInitializeConfidentialTransactionByHex(txHex string) (createTxHandle uintptr, err error)

*

  • initialize elements createrawtransaction with hex.
  • param: txHex transaction hex.
  • return: createTxHandle handle of createrawtransaction.
  • return: err error

func CfdGoInitializeConfidentialTx

func CfdGoInitializeConfidentialTx(version uint32, locktime uint32) (txHex string, err error)

*

  • Get initialized confidential transaction.
  • param: version transaction version
  • param: locktime locktime
  • return: txHex transaction hex
  • return: err error

func CfdGoInitializeMultisigSign

func CfdGoInitializeMultisigSign() (multisigSignHandle uintptr, err error)

*

  • Generate multisig sign handle.
  • return: multisigSignHandle multisig sign handle. release: CfdGoFreeMultisigSignHandle
  • return: err error

func CfdGoInitializeTransaction added in v0.0.19

func CfdGoInitializeTransaction(version uint32, locktime uint32) (createTxHandle uintptr, err error)

*

  • initialize bitcoin createrawtransaction with version & locktime.
  • param: version transaction version.
  • param: locktime transaction lock time.
  • return: createTxHandle handle of createrawtransaction.
  • return: err error

func CfdGoInitializeTransactionByHex added in v0.0.19

func CfdGoInitializeTransactionByHex(txHex string) (createTxHandle uintptr, err error)

*

  • initialize bitcoin createrawtransaction with hex.
  • param: txHex transaction hex.
  • return: createTxHandle handle of createrawtransaction.
  • return: err error

func CfdGoInitializeTxDataHandle added in v0.1.35

func CfdGoInitializeTxDataHandle(networkType int, txHex string) (txDataHandle uintptr, err error)

func CfdGoNegatePrivkey added in v0.1.21

func CfdGoNegatePrivkey(privkey string) (negatePrivkey string, err error)

* CfdGoNegatePrivkey

  • Negate privkey.
  • param: privkey privkey.
  • return: negatePrivkey negate privkey.
  • return: err error

func CfdGoNegatePubkey added in v0.1.21

func CfdGoNegatePubkey(pubkey string) (negatePubkey string, err error)

* CfdGoNegatePubkey

  • Negate pubkey.
  • param: pubkey pubkey.
  • return: negatePubkey negate pubkey.
  • return: err error

func CfdGoNormalizeSignature added in v0.0.9

func CfdGoNormalizeSignature(signature string) (normalizedSignature string, err error)

*

  • Normalize ec signature to low-s form
  • param: signature ec signature to normalize
  • return: normalizeSignature normalized signature
  • return: err error

func CfdGoParseConfidentialAddress

func CfdGoParseConfidentialAddress(confidentialAddress string) (address string, confidentialKey string, networkType int, err error)

*

  • Get address and confidentialKey from confidentialAddress.
  • param: confidentialAddress confidential address
  • return: address address
  • return: confidentialKey confidential key
  • return: networkType network type
  • return: err error

func CfdGoParseDescriptor

func CfdGoParseDescriptor(descriptor string, networkType int, bip32DerivationPath string) (descriptorDataList []CfdDescriptorData, multisigList []CfdDescriptorKeyData, err error)

*

  • Parse Output Descriptor.
  • param: descriptor output descriptor
  • param: networkType network type
  • param: bip32DerivationPath derive path
  • return: descriptorDataList descriptor data struct list
  • return: multisigList multisig key struct list
  • return: err error

func CfdGoParseDescriptorData added in v0.3.2

func CfdGoParseDescriptorData(descriptor string, networkType int, bip32DerivationPath string) (data CfdDescriptorData, descriptorDataList []CfdDescriptorData, multisigList []CfdDescriptorKeyData, err error)

*

  • Parse Output Descriptor.
  • param: descriptor output descriptor
  • param: networkType network type
  • param: bip32DerivationPath derive path
  • return: data descriptor data
  • return: descriptorDataList descriptor data struct list
  • return: multisigList multisig key struct list
  • return: err error

func CfdGoParsePrivkeyWif added in v0.0.16

func CfdGoParsePrivkeyWif(privkeyWif string) (privkeyHex string, networkType int, isCompress bool, err error)

*

  • Parse privkey WIF data.
  • param: privkeyWif privkey wif.
  • return: privkeyHex privkey hex.
  • return: networkType privkey wif network type.
  • return: isCompress pubkey compressed.
  • return: err error

func CfdGoParseScript

func CfdGoParseScript(script string) (scriptItems []string, err error)

*

  • Parse script items from script.
  • param: script script.
  • return: scriptItems script items.
  • return: err error

func CfdGoPrivkeyTweakAdd added in v0.1.21

func CfdGoPrivkeyTweakAdd(privkey string, tweak string) (tweakedPrivkey string, err error)

* CfdGoPrivkeyTweakAdd

  • TweakAdd privkey.
  • param: privkey privkey.
  • param: tweak tweak data.
  • return: tweakedPrivkey tweaked privkey.
  • return: err error

func CfdGoPrivkeyTweakMul added in v0.1.21

func CfdGoPrivkeyTweakMul(privkey string, tweak string) (tweakedPrivkey string, err error)

* CfdGoPrivkeyTweakMul

  • TweakMul privkey.
  • param: privkey privkey.
  • param: tweak tweak data.
  • return: tweakedPrivkey tweaked privkey.
  • return: err error

func CfdGoPubkeyTweakAdd added in v0.1.21

func CfdGoPubkeyTweakAdd(pubkey string, tweak string) (tweakedPubkey string, err error)

* CfdGoPubkeyTweakAdd

  • TweakAdd pubkey.
  • param: pubkey pubkey.
  • param: tweak tweak data.
  • return: tweakedPubkey tweaked pubkey.
  • return: err error

func CfdGoPubkeyTweakMul added in v0.1.21

func CfdGoPubkeyTweakMul(pubkey string, tweak string) (tweakedPubkey string, err error)

* CfdGoPubkeyTweakMul

  • TweakMul pubkey.
  • param: pubkey pubkey.
  • param: tweak tweak data.
  • return: tweakedPubkey tweaked pubkey.
  • return: err error

func CfdGoRipemd160 added in v0.3.14

func CfdGoRipemd160(message string, hasText bool) (output string, err error)

CfdGoRipemd160 ...

func CfdGoSerializeByteData added in v0.1.21

func CfdGoSerializeByteData(buffer string) (output string, err error)

* CfdGoSerializeByteData

  • Serialize byte data.
  • param: buffer buffer
  • return: output serialized buffer.
  • return: err error

func CfdGoSerializeTxForLedger added in v0.0.18

func CfdGoSerializeTxForLedger(txHex string, isAuthorization bool, skipWitness bool) (serializeData string, err error)

*

  • Serialize transaction for ledger.
  • param: txHex transaction hex.
  • param: isAuthorization authorization flag.
  • param: skipWitness skip output witness flag.
  • return: serializeData serialize data. (sha256 hash)
  • return: err error

func CfdGoSetBlindTxOption added in v0.1.24

func CfdGoSetBlindTxOption(blindHandle uintptr, option CfdBlindTxOption) (err error)

CfdGoSetBlindTxOption is set blinding optional data.

func CfdGoSetCustomPrefix added in v0.4.0

func CfdGoSetCustomPrefix(jsonStr string) error

CfdGoSetCustomPrefix set custom prefix by json.

func CfdGoSetElementsMultisigScriptSig added in v0.0.17

func CfdGoSetElementsMultisigScriptSig(txHex string, txid string, vout uint32, scriptsig string, hashType int) (outputTxHex string, err error)

*

  • Set multisig scriptsig to locking script.
  • param: txHex transaction hex
  • param: txid txid
  • param: vout vout
  • param: scriptsig hex encoded script.
  • param: hashType hash type (p2pkh, p2sh, etc...)
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoSetGenesisBlockHashGlobal added in v0.4.0

func CfdGoSetGenesisBlockHashGlobal(genesisBlockHash string) error

CfdGoSetGenesisBlockHashGlobal ...

func CfdGoSetRawIssueAsset added in v0.3.2

func CfdGoSetRawIssueAsset(txHex string, txid string, vout uint32, contractHash string, assetSatoshiAmount int64, assetAddress, assetLockingScript string, tokenSatoshiAmount int64, tokenAddress, tokenLockingScript string, isBlindAsset bool) (entropy, asset, token, outputTxHex string, err error)

CfdGoSetRawIssueAsset This function set a issuance information.

func CfdGoSetRawReissueAsset

func CfdGoSetRawReissueAsset(txHex string, txid string, vout uint32, assetSatoshiAmount int64, blindingNonce string, entropy string, address string, directLockingScript string) (asset string, outputTxHex string, err error)

*

  • Set reissuance asset to confidential transaction.
  • param: txHex transaction hex
  • param: txid txin txid
  • param: vout txin vout
  • param: assetSatoshiAmount generate asset amount
  • param: blindingNonce blinding nonce
  • param: entropy entropy
  • param: address destination address
  • param: directLockingScript txout locking script on direct.
  • return: asset generate asset
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoSha256 added in v0.3.14

func CfdGoSha256(message string, hasText bool) (output string, err error)

CfdGoSha256 ...

func CfdGoSignMessage added in v0.4.0

func CfdGoSignMessage(privkey, message, magic string, isOutputBase64 bool) (signature string, err error)

CfdGoSignMessage sign messsage.

func CfdGoSplitConfidentialTxOut added in v0.3.2

func CfdGoSplitConfidentialTxOut(txHex string, index uint32, txouts []CfdConfidentialTxOut) (outputTxHex string, err error)

CfdGoSplitConfidentialTxOut This function set the split outputs.

func CfdGoSplitTxOut added in v0.3.2

func CfdGoSplitTxOut(txHex string, index uint32, txouts []CfdTxOut) (outputTxHex string, err error)

CfdGoSplitTxOut This function set the split outputs.

func CfdGoUnblindData added in v0.3.6

func CfdGoUnblindData(blindingKey, lockingScript, assetCommitment, valueCommitment, commitmentNonce, rangeproof string) (amount int64, asset, assetBlindFactor, valueBlindFactor string, err error)

CfdGoUnblindData This function returns unblind txout data.

func CfdGoUnblindIssuance

func CfdGoUnblindIssuance(txHex string, index uint32, assetBlindingKey string, tokenBlindingKey string) (asset string, assetAmount int64, assetBlindFactor string, assetValueBlindFactor string, token string, tokenAmount int64, tokenBlindFactor string, tokenValueBlindFactor string, err error)

*

  • Unblind txin issuance on confidential transaction.
  • param: txHex transaction hex
  • param: index txin index
  • param: assetBlindingKey asset blinding key
  • param: tokenBlindingKey token blinding key
  • return: asset asset
  • return: assetAmount asset amount
  • return: assetBlindFactor issueAsset asset blind factor
  • return: assetValueBlindFactor issueAsset value blind factor
  • return: token token
  • return: tokenAmount token amount
  • return: tokenBlindFactor issueToken asset blind factor
  • return: tokenValueBlindFactor issueToken value blind factor
  • return: err error

func CfdGoUnblindTxOut

func CfdGoUnblindTxOut(txHex string, index uint32, blindingKey string) (asset string, satoshiAmount int64, assetBlindFactor string, valueBlindFactor string, err error)

*

  • Unblind txout on confidential transaction.
  • param: txHex transaction hex
  • param: index txout index
  • param: blindingKey blinding key
  • return: asset asset
  • return: satoshiAmount satoshi amount
  • return: assetBlindFactor asset blind factor
  • return: valueBlindFactor amount blind factor
  • return: err error

func CfdGoUncompressPubkey added in v0.1.23

func CfdGoUncompressPubkey(pubkey string) (uncompressedPubkey string, err error)

* CfdGoUncompressPubkey

  • Compress pubkey.
  • param: pubkey pubkey.
  • return: uncompressedPubkey uncompressed pubkey.
  • return: err error

func CfdGoUpdateConfidentialTxOut

func CfdGoUpdateConfidentialTxOut(txHex string, index uint32, asset string, satoshiAmount int64, valueCommitment string, address string, directLockingScript string, nonce string) (outputTxHex string, err error)

*

  • Update txout of confidential transaction.
  • param: txHex transaction hex
  • param: index txout index
  • param: asset asset
  • param: satoshiAmount amount by satoshi
  • param: valueCommitment amount by commitment bytes.
  • param: address destination address
  • param: directLockingScript lockingScript for direct insert.
  • param: nonce confidential nonce
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoUpdatePeginWitnessStack added in v0.3.2

func CfdGoUpdatePeginWitnessStack(txHex string, txid string, vout uint32, witnessIndex uint32, data string) (outputTxHex string, err error)

CfdGoUpdatePeginWitnessStack This function set a witness stack item

func CfdGoUpdateTxInSequence added in v0.3.3

func CfdGoUpdateTxInSequence(networkType int, txHex string, txid string, vout uint32, sequence uint32) (outputTxHex string, err error)

CfdGoUpdateTxInSequence This function set a sequence number.

func CfdGoUpdateTxOutAmount added in v0.1.29

func CfdGoUpdateTxOutAmount(networkType int, txHex string, index uint32, amount int64) (outputTxHex string, err error)

*

  • Update txout amount on transaction.
  • param: networkType network type.
  • param: txHex transaction hex
  • param: index txout index
  • param: amount txout amount
  • return: outputTxHex output transaction hex
  • return: err error

func CfdGoUpdateWitnessStack added in v0.3.2

func CfdGoUpdateWitnessStack(networkType int, txHex string, txid string, vout uint32, witnessIndex uint32, data string) (outputTxHex string, err error)

CfdGoUpdateWitnessStack This function set a witness stack item.

func CfdGoVerifyConfidentialTxSign added in v0.0.19

func CfdGoVerifyConfidentialTxSign(txHex string, txid string, vout uint32, address string, addressType int, directLockingScript string, satoshiAmount int64, valueCommitment string) (isSuccess bool, err error)

*

  • Verify sign in transaction input.
  • param: txHex transaction hex.
  • param: txid txin txid
  • param: vout txin vout
  • param: address address string.
  • param: addressType address type.
  • param: directLockingScript locking script direct input.
  • param: satoshiAmount input satoshi amount.
  • (used only for exist valueCommitment.)
  • param: valueCommitment input value commitment.
  • return: isSuccess result of verification signature
  • return: err error

func CfdGoVerifyConfidentialTxSignReason added in v0.1.32

func CfdGoVerifyConfidentialTxSignReason(txHex string, txid string, vout uint32, address string, addressType int, directLockingScript string, satoshiAmount int64, valueCommitment string) (isSuccess bool, reason string, err error)

*

  • Verify sign in transaction input with error message.
  • param: txHex transaction hex.
  • param: txid txin txid
  • param: vout txin vout
  • param: address address string.
  • param: addressType address type.
  • param: directLockingScript locking script direct input.
  • param: satoshiAmount input satoshi amount.
  • (used only for exist valueCommitment.)
  • param: valueCommitment input value commitment.
  • return: isSuccess result of verification signature
  • return: reason output error message.
  • return: err error

func CfdGoVerifyConfidentialTxSignature added in v0.0.9

func CfdGoVerifyConfidentialTxSignature(
	txHex, signature, pubkey, script, txid string, vout uint32,
	sighashType int, sighashAnyoneCanPay bool, satoshiAmount int64,
	valueCommitment string, witnessVersion int) (result bool, err error)

*

  • Verify signature in transaction input.
  • param: txHex transaction hex.
  • param: signature signature for input.
  • param: pubkey pubkey hex.
  • param: script script hex.
  • param: txid input txid.
  • param: vout input vout.
  • param: sighashType sighash type.
  • param: sighashAnyoneCanPay sighash anyone can pay flag.
  • param: satoshiAmount input satoshi amount.
  • (used only for witness input.)
  • param: valueCommitment input value commitment.
  • (used only for witness input.)
  • param: witnessVersion witness version.
  • (used only for witness input. If not witness input used, set KCfdWitnessVersionNone or "-1".)
  • return: result result of verification signature
  • return: err error

func CfdGoVerifyConfidentialTxSignatureByIndex added in v0.0.9

func CfdGoVerifyConfidentialTxSignatureByIndex(
	txHex, signature, pubkey, script string, index uint32,
	sighashType int, sighashAnyoneCanPay bool, satoshiAmount int64,
	valueCommitment string, witnessVersion int) (result bool, err error)

*

  • Verify signature in transaction input by index.
  • (prototype interface)
  • param: txHex transaction hex.
  • param: signature signature for input.
  • param: pubkey pubkey hex.
  • param: script script hex.
  • param: index index of input for verification.
  • param: sighashType sighash type.
  • param: sighashAnyoneCanPay sighash anyone can pay flag.
  • param: satoshiAmount input satoshi amount.
  • (used only for witness input.)
  • param: valueCommitment input value commitment.
  • (used only for witness input.)
  • param: witnessVersion witness version.
  • (used only for witness input. If not used, set KCfdWitnessVersionNone or "-1".)
  • return: result result of verification signature
  • return: err error

func CfdGoVerifyEcSignature added in v0.1.21

func CfdGoVerifyEcSignature(sighash string, pubkey string, signature string) (isVerify bool, err error)

* CfdGoVerifyEcSignature

  • Verify ec signature.
  • param: sighash signature hash.
  • param: pubkey pubkey.
  • param: signature signature.
  • return: isVerify verify check.
  • return: err error

func CfdGoVerifyMessage added in v0.4.0

func CfdGoVerifyMessage(signature, pubkey, message, magic string) (recoveredPubkey string, isVerify bool, err error)

CfdGoVerifyMessage verify message.

func CfdGoVerifySign added in v0.3.1

func CfdGoVerifySign(networkType int, txHex string, txinUtxoList []CfdUtxo, txid string, vout uint32) (isVerify bool, reason string, err error)

CfdGoVerifySign This function return a verify sign results.

func CfdGoVerifySignature added in v0.1.21

func CfdGoVerifySignature(networkType int, txHex string, signature string, hashType int, pubkey string, redeemScript string, txid string, vout uint32, sighashType int, sighashAnyoneCanPay bool, satoshiValue int64, valueByteData string) (isVerify bool, err error)

* CfdGoVerifySignature

  • Verify signature.
  • param: networkType network type.
  • param: txHex transaction hex.
  • param: signature signature.
  • param: hashType hash type.
  • param: pubkey public key.
  • param: redeemScript redeem script(using script hash).
  • param: txid utxo txid.
  • param: vout utxo vout.
  • param: sighashType signature hash type.
  • param: sighashAnyoneCanPay sighash anyone can pay flag.
  • param: satoshiValue satoshi value.
  • param: valueByteData value bytedata(commitment value).
  • return: isVerify verify check.
  • return: err error

func CfdGoVerifyTxSign added in v0.1.21

func CfdGoVerifyTxSign(networkType int, txHex string, txid string, vout uint32, address string, addressType int, directLockingScript string, satoshiValue int64, valueByteData string) (isVerify bool, err error)

* CfdGoVerifyTxSign

  • Verify transaction sign.
  • param: networkType network type.
  • param: txHex transaction hex.
  • param: txid utxo txid.
  • param: vout utxo vout.
  • param: address address string.
  • param: addressType address type.
  • param: directLockingScript locking script on direct.
  • param: satoshiValue satoshi value.
  • param: valueByteData value bytedata(commitment value).
  • return: isVerify verify check.
  • return: err error

func CfdGoVerifyTxSignReason added in v0.1.32

func CfdGoVerifyTxSignReason(networkType int, txHex string, txid string, vout uint32, address string, addressType int, directLockingScript string, satoshiValue int64, valueByteData string) (isVerify bool, reason string, err error)

* CfdGoVerifyTxSignReason

  • Verify transaction sign.
  • param: networkType network type.
  • param: txHex transaction hex.
  • param: txid utxo txid.
  • param: vout utxo vout.
  • param: address address string.
  • param: addressType address type.
  • param: directLockingScript locking script on direct.
  • param: satoshiValue satoshi value.
  • param: valueByteData value bytedata(commitment value).
  • return: isVerify verify check.
  • return: reason output error message.
  • return: err error

func CfdHasPegoutConfidentialTxOut added in v0.3.4

func CfdHasPegoutConfidentialTxOut(arg1 uintptr, arg2 uintptr, arg3 Uint32_t) (_swig_ret int)

func CfdHash160 added in v0.3.0

func CfdHash160(arg1 uintptr, arg2 string, arg3 bool, arg4 *string) (_swig_ret int)

func CfdHash256 added in v0.3.0

func CfdHash256(arg1 uintptr, arg2 string, arg3 bool, arg4 *string) (_swig_ret int)

func CfdInitialize

func CfdInitialize() (_swig_ret int)

func CfdInitializeBlindTx

func CfdInitializeBlindTx(arg1 uintptr, arg2 *uintptr) (_swig_ret int)

func CfdInitializeBlockHandle added in v0.3.3

func CfdInitializeBlockHandle(arg1 uintptr, arg2 int, arg3 string, arg4 *uintptr) (_swig_ret int)

func CfdInitializeCoinSelection added in v0.0.8

func CfdInitializeCoinSelection(arg1 uintptr, arg2 Uint32_t, arg3 Uint32_t, arg4 string, arg5 Int64_t, arg6 float64, arg7 float64, arg8 float64, arg9 Int64_t, arg10 *uintptr) (_swig_ret int)

func CfdInitializeCombinePubkey added in v0.1.21

func CfdInitializeCombinePubkey(arg1 uintptr, arg2 *uintptr) (_swig_ret int)

func CfdInitializeConfidentialTx

func CfdInitializeConfidentialTx(arg1 uintptr, arg2 Uint32_t, arg3 Uint32_t, arg4 *string) (_swig_ret int)

func CfdInitializeEstimateFee added in v0.0.8

func CfdInitializeEstimateFee(arg1 uintptr, arg2 *uintptr, arg3 bool) (_swig_ret int)

func CfdInitializeFundRawTx added in v0.1.21

func CfdInitializeFundRawTx(arg1 uintptr, arg2 int, arg3 Uint32_t, arg4 string, arg5 *uintptr) (_swig_ret int)

func CfdInitializeMnemonicWordList added in v0.1.21

func CfdInitializeMnemonicWordList(arg1 uintptr, arg2 string, arg3 *uintptr, arg4 Uint32_t) (_swig_ret int)

func CfdInitializeMultisigScript

func CfdInitializeMultisigScript(arg1 uintptr, arg2 int, arg3 int, arg4 *uintptr) (_swig_ret int)

func CfdInitializeMultisigScriptSig added in v0.0.6

func CfdInitializeMultisigScriptSig(arg1 uintptr, arg2 *uintptr) (_swig_ret int)

func CfdInitializeMultisigSign

func CfdInitializeMultisigSign(arg1 uintptr, arg2 *uintptr) (_swig_ret int)

func CfdInitializeTaprootScriptTree added in v0.3.1

func CfdInitializeTaprootScriptTree(arg1 uintptr, arg2 *uintptr) (_swig_ret int)

func CfdInitializeTaprootScriptTreeWithNetwork added in v0.4.0

func CfdInitializeTaprootScriptTreeWithNetwork(arg1 uintptr, arg2 int, arg3 *uintptr) (_swig_ret int)

func CfdInitializeTransaction added in v0.0.19

func CfdInitializeTransaction(arg1 uintptr, arg2 int, arg3 Uint32_t, arg4 Uint32_t, arg5 string, arg6 *uintptr) (_swig_ret int)

func CfdInitializeTxDataHandle added in v0.1.35

func CfdInitializeTxDataHandle(arg1 uintptr, arg2 int, arg3 string, arg4 *uintptr) (_swig_ret int)

func CfdInitializeTxSerializeForLedger added in v0.0.18

func CfdInitializeTxSerializeForLedger(arg1 uintptr, arg2 *uintptr) (_swig_ret int)

func CfdNegatePrivkey added in v0.1.21

func CfdNegatePrivkey(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdNegatePubkey added in v0.1.21

func CfdNegatePubkey(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdNormalizeSignature added in v0.0.9

func CfdNormalizeSignature(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdParseConfidentialAddress

func CfdParseConfidentialAddress(arg1 uintptr, arg2 string, arg3 *string, arg4 *string, arg5 *int) (_swig_ret int)

func CfdParseDescriptor

func CfdParseDescriptor(arg1 uintptr, arg2 string, arg3 int, arg4 string, arg5 *uintptr, arg6 Uint32_t) (_swig_ret int)

func CfdParsePrivkeyWif added in v0.0.16

func CfdParsePrivkeyWif(arg1 uintptr, arg2 string, arg3 *string, arg4 *int, arg5 *bool) (_swig_ret int)

func CfdParseScript

func CfdParseScript(arg1 uintptr, arg2 string, arg3 *uintptr, arg4 Uint32_t) (_swig_ret int)

func CfdParseScriptAll added in v0.4.3

func CfdParseScriptAll(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdPrivkeyTweakAdd added in v0.1.21

func CfdPrivkeyTweakAdd(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdPrivkeyTweakMul added in v0.1.21

func CfdPrivkeyTweakMul(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdPubkeyTweakAdd added in v0.1.21

func CfdPubkeyTweakAdd(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdPubkeyTweakMul added in v0.1.21

func CfdPubkeyTweakMul(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdRecoverEcdsaAdaptor added in v0.4.0

func CfdRecoverEcdsaAdaptor(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdRequestExecuteJson added in v0.0.18

func CfdRequestExecuteJson(arg1 uintptr, arg2 string, arg3 string, arg4 *string) (_swig_ret int)

func CfdRipemd160 added in v0.3.0

func CfdRipemd160(arg1 uintptr, arg2 string, arg3 bool, arg4 *string) (_swig_ret int)

func CfdSchnorrKeyPairTweakAdd added in v0.2.4

func CfdSchnorrKeyPairTweakAdd(arg1 uintptr, arg2 string, arg3 string, arg4 *string, arg5 *bool, arg6 *string) (_swig_ret int)

func CfdSchnorrPubkeyTweakAdd added in v0.2.4

func CfdSchnorrPubkeyTweakAdd(arg1 uintptr, arg2 string, arg3 string, arg4 *string, arg5 *bool) (_swig_ret int)

func CfdSerializeByteData added in v0.1.21

func CfdSerializeByteData(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdSetBlindTxOption added in v0.0.20

func CfdSetBlindTxOption(arg1 uintptr, arg2 uintptr, arg3 int, arg4 Int64_t) (_swig_ret int)

func CfdSetConfidentialTxGenesisBlockHashByHandle added in v0.4.0

func CfdSetConfidentialTxGenesisBlockHashByHandle(arg1 uintptr, arg2 uintptr, arg3 string) (_swig_ret int)

func CfdSetConfidentialTxUtxoDataByHandle added in v0.4.0

func CfdSetConfidentialTxUtxoDataByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 string, arg9 string, arg10 string, arg11 string, arg12 string, arg13 string, arg14 bool) (_swig_ret int)

func CfdSetGenesisBlockHashGlobal added in v0.4.0

func CfdSetGenesisBlockHashGlobal(arg1 uintptr, arg2 string) (_swig_ret int)

func CfdSetInitialTapBranchByHash added in v0.3.1

func CfdSetInitialTapBranchByHash(arg1 uintptr, arg2 uintptr, arg3 string) (_swig_ret int)

func CfdSetInitialTapLeaf added in v0.3.1

func CfdSetInitialTapLeaf(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint8_t) (_swig_ret int)

func CfdSetIssueAsset added in v0.3.2

func CfdSetIssueAsset(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 string, arg6 Int64_t, arg7 string, arg8 string, arg9 Int64_t, arg10 string, arg11 string, arg12 bool, arg13 *string, arg14 *string, arg15 *string) (_swig_ret int)

func CfdSetOptionCoinSelection added in v0.1.24

func CfdSetOptionCoinSelection(arg1 uintptr, arg2 uintptr, arg3 int, arg4 Int64_t, arg5 float64, arg6 bool) (_swig_ret int)

func CfdSetOptionEstimateFee added in v0.1.24

func CfdSetOptionEstimateFee(arg1 uintptr, arg2 uintptr, arg3 int, arg4 Int64_t, arg5 float64, arg6 bool) (_swig_ret int)

func CfdSetOptionFundRawTx added in v0.1.21

func CfdSetOptionFundRawTx(arg1 uintptr, arg2 uintptr, arg3 int, arg4 Int64_t, arg5 float64, arg6 bool) (_swig_ret int)

func CfdSetRawReissueAsset

func CfdSetRawReissueAsset(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 string, arg9 string, arg10 *string, arg11 *string) (_swig_ret int)

func CfdSetReissueAsset added in v0.3.2

func CfdSetReissueAsset(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 string, arg9 string, arg10 *string) (_swig_ret int)

func CfdSetScriptTreeFromString added in v0.3.1

func CfdSetScriptTreeFromString(arg1 uintptr, arg2 uintptr, arg3 string, arg4 string, arg5 Uint8_t, arg6 string) (_swig_ret int)

func CfdSetTapScriptByWitnessStack added in v0.3.1

func CfdSetTapScriptByWitnessStack(arg1 uintptr, arg2 uintptr, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdSetTransactionUtxoData added in v0.3.1

func CfdSetTransactionUtxoData(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 string, arg7 string, arg8 string, arg9 string, arg10 string, arg11 bool) (_swig_ret int)

func CfdSha256 added in v0.3.0

func CfdSha256(arg1 uintptr, arg2 string, arg3 bool, arg4 *string) (_swig_ret int)

func CfdSignMessage added in v0.4.0

func CfdSignMessage(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 bool, arg6 *string) (_swig_ret int)

func CfdSignSchnorr added in v0.2.0

func CfdSignSchnorr(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdSignSchnorrWithNonce added in v0.2.0

func CfdSignSchnorrWithNonce(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 *string) (_swig_ret int)

func CfdSplitSchnorrSignature added in v0.2.1

func CfdSplitSchnorrSignature(arg1 uintptr, arg2 string, arg3 *string, arg4 *string) (_swig_ret int)

func CfdSplitTxOut added in v0.3.2

func CfdSplitTxOut(arg1 uintptr, arg2 uintptr, arg3 uintptr, arg4 Uint32_t) (_swig_ret int)

func CfdUnblindIssuance

func CfdUnblindIssuance(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 string, arg5 string, arg6 *string, arg7 Int64_t, arg8 *string, arg9 *string, arg10 *string, arg11 Int64_t, arg12 *string, arg13 *string) (_swig_ret int)

func CfdUnblindTxOut

func CfdUnblindTxOut(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 string, arg5 *string, arg6 Int64_t, arg7 *string, arg8 *string) (_swig_ret int)

func CfdUnblindTxOutData added in v0.3.6

func CfdUnblindTxOutData(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 string, arg6 string, arg7 string, arg8 *string, arg9 Int64_t, arg10 *string, arg11 *string) (_swig_ret int)

func CfdUncompressPubkey added in v0.1.21

func CfdUncompressPubkey(arg1 uintptr, arg2 string, arg3 *string) (_swig_ret int)

func CfdUpdateConfidentialTxOut

func CfdUpdateConfidentialTxOut(arg1 uintptr, arg2 string, arg3 Uint32_t, arg4 string, arg5 Int64_t, arg6 string, arg7 string, arg8 string, arg9 string, arg10 *string) (_swig_ret int)

func CfdUpdateTxInScriptSig added in v0.3.1

func CfdUpdateTxInScriptSig(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 string) (_swig_ret int)

func CfdUpdateTxInSequence added in v0.3.3

func CfdUpdateTxInSequence(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t, arg5 Uint32_t) (_swig_ret int)

func CfdUpdateTxOutAmount added in v0.1.29

func CfdUpdateTxOutAmount(arg1 uintptr, arg2 int, arg3 string, arg4 Uint32_t, arg5 Int64_t, arg6 *string) (_swig_ret int)

func CfdUpdateWitnessStack added in v0.3.2

func CfdUpdateWitnessStack(arg1 uintptr, arg2 uintptr, arg3 int, arg4 string, arg5 Uint32_t, arg6 Uint32_t, arg7 string) (_swig_ret int)

func CfdVerifyConfidentialTxSign added in v0.0.18

func CfdVerifyConfidentialTxSign(arg1 uintptr, arg2 string, arg3 string, arg4 Uint32_t, arg5 string, arg6 int, arg7 string, arg8 Int64_t, arg9 string) (_swig_ret int)

func CfdVerifyConfidentialTxSignature added in v0.0.9

func CfdVerifyConfidentialTxSignature(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 string, arg6 string, arg7 Uint32_t, arg8 int, arg9 bool, arg10 Int64_t, arg11 string, arg12 int) (_swig_ret int)

func CfdVerifyEcSignature added in v0.1.21

func CfdVerifyEcSignature(arg1 uintptr, arg2 string, arg3 string, arg4 string) (_swig_ret int)

func CfdVerifyEcdsaAdaptor added in v0.2.0

func CfdVerifyEcdsaAdaptor(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 string) (_swig_ret int)

func CfdVerifyMessage added in v0.4.0

func CfdVerifyMessage(arg1 uintptr, arg2 string, arg3 string, arg4 string, arg5 string, arg6 *string) (_swig_ret int)

func CfdVerifySchnorr added in v0.2.0

func CfdVerifySchnorr(arg1 uintptr, arg2 string, arg3 string, arg4 string) (_swig_ret int)

func CfdVerifySignature added in v0.1.21

func CfdVerifySignature(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 int, arg6 string, arg7 string, arg8 string, arg9 Uint32_t, arg10 int, arg11 bool, arg12 Int64_t, arg13 string) (_swig_ret int)

func CfdVerifyTxSign added in v0.1.21

func CfdVerifyTxSign(arg1 uintptr, arg2 int, arg3 string, arg4 string, arg5 Uint32_t, arg6 string, arg7 int, arg8 string, arg9 Int64_t, arg10 string) (_swig_ret int)

func CfdVerifyTxSignByHandle added in v0.3.1

func CfdVerifyTxSignByHandle(arg1 uintptr, arg2 uintptr, arg3 string, arg4 Uint32_t) (_swig_ret int)

func ConvertCfdErrorCode added in v0.3.6

func ConvertCfdErrorCode(retCode int) (err error)

*

  • Convert return code to golang built-in error struct.
  • param: retCode return code from cfd
  • return: err built-in error struct.

func CreateConfidentialTx added in v0.0.19

func CreateConfidentialTx(version uint32, locktime uint32, txinList []ConfidentialTxIn, txoutList []ConfidentialTxOut) (outputTxHex string, err error)

CreateConfidentialTx : create confidential transaction. param: version transaction version. param: locktime transaction locking time. param: txinList transaction input list. param: txoutList transaction output list. return: outputTxHex transaction hex. return: err error

func ExistTxidInBlock added in v0.3.3

func ExistTxidInBlock(blockHandle uintptr, txid string) (exist bool, err error)

ExistTxidInBlock This function get a exist tx in a block.

func FinalizeTransaction added in v0.0.19

func FinalizeTransaction(createTxHandle uintptr) (txHex string, err error)

FinalizeTransaction : finalize createrawtransaction. (bitcoin, elements) param: createTxHandle handle of createrawtransaction. return: txHex transaction hex. return: err error

func FreeBlockHandle added in v0.3.3

func FreeBlockHandle(blockHandle uintptr) error

FreeBlockHandle This function is free block handle.

func FreeTransactionHandle added in v0.0.19

func FreeTransactionHandle(createTxHandle uintptr)

FreeTransactionHandle : free createrawtransaction handle. param: createTxHandle handle of createrawtransaction.

func GetBitcoinTransactionData added in v0.1.35

func GetBitcoinTransactionData(txHex string, hasWitness bool) (data TransactionData, txinList []TxIn, txoutList []TxOut, err error)

func GetBlockHash added in v0.3.3

func GetBlockHash(blockHandle uintptr) (blockHash string, err error)

GetBlockHash This function get a block hash.

func GetConfidentialTxData added in v0.1.35

func GetConfidentialTxData(txHex string, hasWitness bool) (data TransactionData, txinList []ConfidentialTxIn, txoutList []ConfidentialTxOut, err error)

func GetConfidentialTxDataAll added in v0.1.35

func GetConfidentialTxDataAll(txHex string, hasWitness bool, hasAddress bool, networkType int) (data TransactionData, txinList []ConfidentialTxIn, txoutList []ConfidentialTxOut, err error)

func GetPeginAddress added in v0.3.2

func GetPeginAddress(mainchainNetworkType int, fedpegScript string, hashType int, pubkey, redeemScript string) (peginAddress, claimScript, tweakedFedpegScript string, err error)

GetPeginAddress This function get a pegin address.

func GetPegoutAddress added in v0.3.4

func GetPegoutAddress(mainchainNetworkType, elementsNetworkType int, descriptorOrXpub string, bip32Counter uint32, addressType int) (pegoutAddress, baseDescriptor string, err error)

GetPegoutAddress This function get a pegout address.

func GetPegoutAddressFromTransaction added in v0.3.4

func GetPegoutAddressFromTransaction(createTxHandle uintptr, index uint32, mainchainNetwork int) (pegoutAddress string, err error)

GetPegoutAddressFromTransaction This function is getting pegout address from tx.

func GetSighash added in v0.3.1

func GetSighash(createTxHandle uintptr, txid string, vout uint32, sighashType *SigHashType, pubkey *ByteData, redeemScript *Script, tapLeafHash, annex *ByteData, codeSeparatorPosition *uint32) (sighash string, err error)

GetSighash This function return a sighash.

func GetTransactionDataAll added in v0.1.35

func GetTransactionDataAll(txHex string, hasWitness bool, hasAddress bool, networkType int) (data TransactionData, txinList []TxIn, txoutList []TxOut, err error)

func GetTransactionFromBlock added in v0.3.3

func GetTransactionFromBlock(blockHandle uintptr, txid string) (txHex string, err error)

GetTransactionFromBlock This function get a transaction data.

func GetTransactionHex added in v0.3.2

func GetTransactionHex(createTxHandle uintptr) (txHex string, err error)

GetTransactionHex This function return a transacton hex.

func GetTxCountInBlock added in v0.3.3

func GetTxCountInBlock(blockHandle uintptr) (count uint32, err error)

GetTxCountInBlock This function get a transaction count in this block.

func GetTxOutIndexes added in v0.3.2

func GetTxOutIndexes(createTxHandle uintptr, address, directLockingScript string) (indexes []uint32, err error)

GetTxOutIndexes This function get txout index list.

func GetTxOutProof added in v0.3.3

func GetTxOutProof(blockHandle uintptr, txid string) (txoutProof string, err error)

GetTxOutProof This function get a txoutproof.

func GetTxidFromBlock added in v0.3.3

func GetTxidFromBlock(blockHandle uintptr, offset uint32) (txid string, err error)

GetTxidFromBlock This function get a txid from block.

func GetTxidListFromBlock added in v0.3.3

func GetTxidListFromBlock(blockHandle uintptr) (txidList []string, err error)

GetTxidListFromBlock This function get txid list from block.

func HasPegoutOutput added in v0.3.4

func HasPegoutOutput(createTxHandle uintptr, index uint32) (hasPegout bool, err error)

HasPegoutOutput This function check pegout output.

func InitializeBlockHandleByHex added in v0.3.3

func InitializeBlockHandleByHex(networkType int, block string) (blockHandle uintptr, err error)

InitializeTransactionByHex This function is open block handle.

func InitializeTransaction added in v0.0.19

func InitializeTransaction(networkType int, version uint32, locktime uint32) (createTxHandle uintptr, err error)

InitializeTransaction : initialize createrawtransaction with version & locktime. param: networkType nettype string. (mainnet/testnet/regtest) param: version transaction version. param: locktime transaction locking time. return: createTxHandle handle of createrawtransaction. return: err error

func InitializeTransactionByHex added in v0.0.19

func InitializeTransactionByHex(networkType int, txHex string) (createTxHandle uintptr, err error)

InitializeTransactionByHex : initialize createrawtransaction with hex. param: networkType nettype string. (mainnet/testnet/regtest) param: txHex transaction hex. return: createTxHandle handle of createrawtransaction. return: err error

func NewElementsTapBranchFromControlBlock added in v0.4.0

func NewElementsTapBranchFromControlBlock(controlBlock *ByteData, tapscript *Script) (branch *TapBranch, internalPubkey *ByteData, err error)

NewElementsTapBranchFromControlBlock This function return a TapBranch from control block.

func NewTapBranchFromControlBlock added in v0.3.1

func NewTapBranchFromControlBlock(controlBlock *ByteData, tapscript *Script) (branch *TapBranch, internalPubkey *ByteData, err error)

NewTapBranchFromControlBlock This function return a TapBranch from control block.

func NewTapBranchFromControlBlockWithNetwork added in v0.4.0

func NewTapBranchFromControlBlockWithNetwork(controlBlock *ByteData, tapscript *Script, networkType int) (branch *TapBranch, internalPubkey *ByteData, err error)

NewTapBranchFromControlBlockWithNetwork This function return a TapBranch from control block.

func SetConfidentialTxGenesisBlockHashByHandle added in v0.4.0

func SetConfidentialTxGenesisBlockHashByHandle(createTxHandle uintptr, genesisBlockHash string) error

SetConfidentialTxGenesisBlockHashByHandle set the genesis block hash for tx handle.

func SetElementsUtxoListByHandle added in v0.4.0

func SetElementsUtxoListByHandle(createTxHandle uintptr, txinUtxoList []CfdUtxo) error

SetElementsUtxoListByHandle This function has adding utxo list.

func SetIssueAsset added in v0.3.2

func SetIssueAsset(createTxHandle uintptr, txid string, vout uint32, contractHash string, assetSatoshiAmount int64, assetAddress, assetLockingScript string, tokenSatoshiAmount int64, tokenAddress, tokenLockingScript string, isBlindAsset bool) (entropy, asset, token string, err error)

SetIssueAsset This function set a issuance information.

func SetReissueAsset added in v0.3.2

func SetReissueAsset(createTxHandle uintptr, txid string, vout uint32, assetSatoshiAmount int64, blindingNonce string, entropy string, address string, directLockingScript string) (asset string, err error)

SetReissueAsset This function set a reissuance information.

func SetUtxoListByHandle added in v0.3.1

func SetUtxoListByHandle(createTxHandle uintptr, txinUtxoList []CfdUtxo) error

SetUtxoListByHandle This function has adding utxo list.

func SignWithPrivkeyByHandle added in v0.3.1

func SignWithPrivkeyByHandle(createTxHandle uintptr, txid string, vout uint32, privkey string, sighashType *SigHashType, hasGrindR bool, auxRand, annex *ByteData) error

SignWithPrivkeyByHandle This function has adding sign with prikey.

func SplitConfidentialTxOut added in v0.3.2

func SplitConfidentialTxOut(createTxHandle uintptr, index uint32, txouts []CfdConfidentialTxOut) error

SplitConfidentialTxOut This function set the split outputs.

func SplitTxOut added in v0.3.2

func SplitTxOut(createTxHandle uintptr, index uint32, txouts []CfdTxOut) error

SplitTxOut This function set the split outputs.

func Swig_free

func Swig_free(arg1 uintptr)

func Swig_malloc

func Swig_malloc(arg1 int) (_swig_ret uintptr)

func UpdatePeginWitnessStack added in v0.3.2

func UpdatePeginWitnessStack(createTxHandle uintptr, txid string, vout uint32, witnessIndex uint32, data string) error

UpdatePeginWitnessStack This function set a witness stack item.

func UpdateTxInSequence added in v0.3.3

func UpdateTxInSequence(createTxHandle uintptr, txid string, vout uint32, sequence uint32) error

UpdateTxInSequence This function set a sequence number.

func UpdateWitnessStack added in v0.3.2

func UpdateWitnessStack(createTxHandle uintptr, txid string, vout uint32, witnessIndex uint32, data string) error

UpdateWitnessStack This function set a witness stack item.

func VerifySign added in v0.3.1

func VerifySign(createTxHandle uintptr, txid string, vout uint32) (isVerify bool, reason string, err error)

VerifySign This function return a verify sign results.

Types

type AdaptorSignature added in v0.4.0

type AdaptorSignature struct {
	Signature string
}

AdaptorSignature This struct use for the accessing to ecdsa-adaptor function.

func EncryptEcdsaAdaptor added in v0.4.0

func EncryptEcdsaAdaptor(msg, secretKey, encryptionKey ByteData) (adaptorSignature *AdaptorSignature, err error)

EncryptEcdsaAdaptor This function return a ecdsa-adaptor's signature.

func NewAdaptorSignature added in v0.4.0

func NewAdaptorSignature(adaptorSignature ByteData) *AdaptorSignature

NewAdaptorSignature This function return a ecdsa-adaptor's signature.

func (*AdaptorSignature) Decrypt added in v0.4.0

func (obj *AdaptorSignature) Decrypt(adaptorSecret ByteData) (signature ByteData, err error)

Adapt This function return a decrypted signature.

func (*AdaptorSignature) Recover added in v0.4.0

func (obj *AdaptorSignature) Recover(signature, encryptionKey ByteData) (secret *ByteData, err error)

ExtractSecret This function return a adaptor secret.

func (*AdaptorSignature) Verify added in v0.4.0

func (obj *AdaptorSignature) Verify(msg, pubkey, encryptionKey ByteData) (isVerify bool, err error)

Verify This function verify a ecdsa-adaptor's signature.

type BlindData added in v0.2.5

type BlindData struct {
	// array index
	Vout uint32
	// asset
	Asset string
	// satoshi amount
	Amount int64
	// asset blind factor
	AssetBlindFactor string
	// value blind factor
	ValueBlindFactor string
	// issuance txid
	IssuanceTxid string
	// issuance vout
	IssuanceVout uint32
	// is issuance asset
	IsIssuanceAsset bool
	// is issuance token
	IsIssuanceToken bool
}

*

  • BlindRawTransaction option data struct.

func CfdGoBlindRawTransactionAndGetBlinder added in v0.2.5

func CfdGoBlindRawTransactionAndGetBlinder(txHex string, txinList []CfdBlindInputData, txoutList []CfdBlindOutputData, option *CfdBlindTxOption) (outputTx string, blinderList []BlindData, err error)

* CfdGoBlindRawTransactionAndGetBlinder

  • Execute blindrawtransaction.
  • param: txHex transaction hex.
  • param: txinList txin utxo list.
  • param: txoutList txout target list. (need nonce empty txout)
  • param: option blindrawtransaction option.
  • return: outputTx blindrawtransaction tx.
  • return: blinderList blinder list.
  • return: err error

func CfdGoBlindRawTransactionInternal added in v0.2.5

func CfdGoBlindRawTransactionInternal(txHex string, txinList []CfdBlindInputData, txoutList []CfdBlindOutputData, option *CfdBlindTxOption, collectBlinder bool) (outputTx string, blinderList []BlindData, err error)

* CfdGoBlindRawTransactionInternal

  • Execute blindrawtransaction.
  • param: txHex transaction hex.
  • param: txinList txin utxo list.
  • param: txoutList txout target list. (need nonce empty txout)
  • param: option blindrawtransaction option.
  • param: collectBlinder get blinder flag.
  • return: outputTx blindrawtransaction tx.
  • return: blinderList blinder list.
  • return: err error

func CfdGoGetBlinderList added in v0.2.5

func CfdGoGetBlinderList(blindHandle uintptr) (blinderList []BlindData, err error)

*

  • Get blind data.
  • param: blindHandle blindTx handle
  • return: blinderList blind data list
  • return: err error

type BlockHeader added in v0.3.3

type BlockHeader struct {
	Version       uint32 // Version
	PrevBlockHash string // previous block hash
	MerkleRoot    string // merkleroot
	Time          uint32 // block time
	Bits          uint32 // bit flag
	Nonce         uint32 // nonce
}

BlockHeader block header information.

func CfdGoGetBlockHeaderData added in v0.3.3

func CfdGoGetBlockHeaderData(networkType int, block string) (blockHash string, header *BlockHeader, err error)

CfdGoGetBlockHeaderData This function get a block header data.

func GetBlockHeaderData added in v0.3.3

func GetBlockHeaderData(blockHandle uintptr) (header *BlockHeader, err error)

GetBlockHeaderData This function get a block header data.

type ByteData added in v0.2.0

type ByteData struct {
	// contains filtered or unexported fields
}

ByteData This struct holds a byte array.

func NewByteData added in v0.2.0

func NewByteData(data []byte) ByteData

NewByteData This function create a bytedata from a byte array.

func NewByteDataFromHex added in v0.2.0

func NewByteDataFromHex(hexStr string) (ByteData, error)

NewByteDataFromHex This function create a bytedata from a hex string.

func NewByteDataFromHexIgnoreError added in v0.2.0

func NewByteDataFromHexIgnoreError(hexStr string) *ByteData

NewByteDataFromHex This function create a bytedata from a hex string. On error, it returns nil.

func (*ByteData) ToHex added in v0.2.0

func (obj *ByteData) ToHex() string

ToHex This function return a hex string.

func (*ByteData) ToSlice added in v0.2.0

func (obj *ByteData) ToSlice() []byte

ToHex This function return a byte array.

type CfdAddressInfo added in v0.0.16

type CfdAddressInfo struct {
	// address
	Address string
	// network type
	NetworkType int
	// hash type
	HashType int
	// witness version (unuse: -1)
	WitnessVersion int
	// locking script
	LockingScript string
	// hash
	Hash string
}

*

  • Address information struct.

func CfdGoGetAddressInfo added in v0.0.16

func CfdGoGetAddressInfo(address string) (data CfdAddressInfo, err error)

*

  • Get address information.
  • param: address address string
  • return: data address data (CfdAddressInfo)
  • return: err error

type CfdAddressType added in v0.0.7

type CfdAddressType int
var KCfdP2pkhAddress CfdAddressType = _swig_getkCfdP2pkhAddress()
var KCfdP2shAddress CfdAddressType = _swig_getkCfdP2shAddress()
var KCfdP2shP2wpkhAddress CfdAddressType = _swig_getkCfdP2shP2wpkhAddress()
var KCfdP2shP2wshAddress CfdAddressType = _swig_getkCfdP2shP2wshAddress()
var KCfdP2wpkhAddress CfdAddressType = _swig_getkCfdP2wpkhAddress()
var KCfdP2wshAddress CfdAddressType = _swig_getkCfdP2wshAddress()
var KCfdTaprootAddress CfdAddressType = _swig_getkCfdTaprootAddress()
var KCfdWitnessUnknownAddress CfdAddressType = _swig_getkCfdWitnessUnknownAddress()

type CfdBip32FormatType added in v0.4.0

type CfdBip32FormatType int
var KCfdBip32FormatTypeBip49 CfdBip32FormatType = _swig_getkCfdBip32FormatTypeBip49()
var KCfdBip32FormatTypeBip84 CfdBip32FormatType = _swig_getkCfdBip32FormatTypeBip84()
var KCfdBip32FormatTypeNormal CfdBip32FormatType = _swig_getkCfdBip32FormatTypeNormal()

type CfdBlindInputData added in v0.1.24

type CfdBlindInputData struct {
	// Txid
	Txid string
	// Vout
	Vout uint32
	// Asset
	Asset string
	// Asset BlindFactor
	AssetBlindFactor string
	// satoshi value
	Amount int64
	// Value BlindFactor
	ValueBlindFactor string
	// (option) Asset blinding key
	AssetBlindingKey string
	// (option) Token blinding key
	TokenBlindingKey string
}

*

  • BlindRawTransaction option data struct.

type CfdBlindOption added in v0.0.20

type CfdBlindOption int
var KCfdBlindOptionCollectBlinder CfdBlindOption = _swig_getkCfdBlindOptionCollectBlinder()
var KCfdBlindOptionExponent CfdBlindOption = _swig_getkCfdBlindOptionExponent()
var KCfdBlindOptionMinimumBits CfdBlindOption = _swig_getkCfdBlindOptionMinimumBits()
var KCfdBlindOptionMinimumRangeValue CfdBlindOption = _swig_getkCfdBlindOptionMinimumRangeValue()

type CfdBlindOutputData added in v0.1.24

type CfdBlindOutputData struct {
	// txout index (-1: auto)
	Index int
	// confidential or not address
	ConfidentialAddress string
	// (optional) confidential key
	ConfidentialKey string
}

*

  • BlindRawTransaction option data struct.

type CfdBlindTxOption added in v0.1.24

type CfdBlindTxOption struct {
	// blind minimum range value
	MinimumRangeValue int64
	// blind exponent
	Exponent int64
	// blind minimum bits
	MinimumBits int64
}

*

  • BlindRawTransaction option data struct.

func NewCfdBlindTxOption added in v0.1.24

func NewCfdBlindTxOption() CfdBlindTxOption

* NewCfdBlindTxOption

  • Create CfdBlindTxOption struct set default value.
  • return: option FundRawTx option

type CfdCoinSelectOption added in v0.1.24

type CfdCoinSelectOption struct {
	// fee asset
	FeeAsset string
	// tx-fee amount
	TxFeeAmount int64
	// effective feerate
	EffectiveFeeRate float64
	// longterm feerate
	LongTermFeeRate float64
	// dust feerate
	DustFeeRate float64
	// knapsack min change value. knapsack logic's threshold. Recommended value is 1.
	KnapsackMinChange int64
	// blind exponent. default is 0.
	Exponent int64
	// blind minimum bits. default is -1 (cfd-go auto).
	MinimumBits int64
}

*

  • CoinSelection option data struct.

func NewCfdCoinSelectionOption added in v0.0.8

func NewCfdCoinSelectionOption() CfdCoinSelectOption

*

  • Create CfdCoinSelectOption struct set default value.
  • return: option CoinSelection option

type CfdCoinSelectionOption added in v0.0.8

type CfdCoinSelectionOption int
var KCfdCoinSelectionExponent CfdCoinSelectionOption = _swig_getkCfdCoinSelectionExponent()
var KCfdCoinSelectionMinimumBits CfdCoinSelectionOption = _swig_getkCfdCoinSelectionMinimumBits()

type CfdConfidentialTxOut added in v0.3.2

type CfdConfidentialTxOut struct {
	// satoshi amount (unblind value)
	Amount int64
	// asset (or commitment asset)
	Asset string
	// locking script
	LockingScript string
	// address or confidential address. (if locking script is usual hashtype.)
	Address string
	// commitment value
	CommitmentValue string
	// commitment nonce
	CommitmentNonce string
	// surjectionprooof of asset
	Surjectionproof string
	// rangeproof of value
	Rangeproof string
}

ConfidentialTxOut : confidential transaction output.

type CfdDescriptorData

type CfdDescriptorData struct {
	// depth (0 - )
	Depth uint32
	// script type. (CfdDescriptorScriptType)
	ScriptType int
	// locking script.
	LockingScript string
	// address string. (for ScriptType not KCfdDescriptorScriptRaw)
	Address string
	// hash type. (CfdHashType)
	HashType int
	// redeem script. (for ScriptType KCfdDescriptorScriptSh or KCfdDescriptorScriptWsh)
	RedeemScript string
	// key type. (see CfdDescriptorKeyData.KeyType)
	KeyType int
	// pubkey
	Pubkey string
	// extend pubkey
	ExtPubkey string
	// extend privkey
	ExtPrivkey string
	// schnorr pubkey
	SchnorrPubkey string
	// has multisig
	IsMultisig bool
	// number of multisig require signatures
	ReqSigNum uint32
	// Taproot ScriptTree string
	TreeString string
}

*

  • Descriptor data struct.

type CfdDescriptorKeyData

type CfdDescriptorKeyData struct {
	// key type. (CfdDescriptorKeyType)
	// - KCfdDescriptorKeyNull
	// - KCfdDescriptorKeyPublic
	// - KCfdDescriptorKeyBip32
	// - KCfdDescriptorKeyBip32Priv
	// - KCfdDescriptorKeySchnorr
	KeyType int
	// pubkey
	Pubkey string
	// extend pubkey
	ExtPubkey string
	// extend privkey
	ExtPrivkey string
	// schnorr pubkey
	SchnorrPubkey string
}

*

  • Descriptor key data struct.

type CfdDescriptorKeyType added in v0.0.7

type CfdDescriptorKeyType int
var KCfdDescriptorKeyBip32 CfdDescriptorKeyType = _swig_getkCfdDescriptorKeyBip32()
var KCfdDescriptorKeyBip32Priv CfdDescriptorKeyType = _swig_getkCfdDescriptorKeyBip32Priv()
var KCfdDescriptorKeyNull CfdDescriptorKeyType = _swig_getkCfdDescriptorKeyNull()
var KCfdDescriptorKeyPublic CfdDescriptorKeyType = _swig_getkCfdDescriptorKeyPublic()
var KCfdDescriptorKeySchnorr CfdDescriptorKeyType = _swig_getkCfdDescriptorKeySchnorr()

type CfdDescriptorScriptType added in v0.0.7

type CfdDescriptorScriptType int
var KCfdDescriptorScriptAddr CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptAddr()
var KCfdDescriptorScriptCombo CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptCombo()
var KCfdDescriptorScriptMiniscript CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptMiniscript()
var KCfdDescriptorScriptMulti CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptMulti()
var KCfdDescriptorScriptNull CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptNull()
var KCfdDescriptorScriptPk CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptPk()
var KCfdDescriptorScriptPkh CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptPkh()
var KCfdDescriptorScriptRaw CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptRaw()
var KCfdDescriptorScriptSh CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptSh()
var KCfdDescriptorScriptSortedMulti CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptSortedMulti()
var KCfdDescriptorScriptTaproot CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptTaproot()
var KCfdDescriptorScriptWpkh CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptWpkh()
var KCfdDescriptorScriptWsh CfdDescriptorScriptType = _swig_getkCfdDescriptorScriptWsh()

type CfdErrorCode added in v0.0.7

type CfdErrorCode int
var KCfdConnectionError CfdErrorCode = _swig_getkCfdConnectionError()
var KCfdDiskAccessError CfdErrorCode = _swig_getkCfdDiskAccessError()
var KCfdIllegalArgumentError CfdErrorCode = _swig_getkCfdIllegalArgumentError()
var KCfdIllegalStateError CfdErrorCode = _swig_getkCfdIllegalStateError()
var KCfdInternalError CfdErrorCode = _swig_getkCfdInternalError()
var KCfdInvalidSettingError CfdErrorCode = _swig_getkCfdInvalidSettingError()
var KCfdMemoryFullError CfdErrorCode = _swig_getkCfdMemoryFullError()
var KCfdNotFoundError CfdErrorCode = _swig_getkCfdNotFoundError()
var KCfdOutOfRangeError CfdErrorCode = _swig_getkCfdOutOfRangeError()
var KCfdSignVerificationError CfdErrorCode = _swig_getkCfdSignVerificationError()
var KCfdSuccess CfdErrorCode = _swig_getkCfdSuccess()
var KCfdUnknownError CfdErrorCode = _swig_getkCfdUnknownError()

type CfdEstimateFeeInput added in v0.0.8

type CfdEstimateFeeInput struct {
	// utxo data
	Utxo CfdUtxo
	// is issuance input
	IsIssuance bool
	// is blind issuance input
	IsBlindIssuance bool
	// is peg-in input
	IsPegin bool
	// claimscript hex (require when IsPegin is true)
	ClaimScript string
	// peg-in bitcoin tx size (require when IsPegin is true)
	PeginBtcTxSize uint32
	// peg-in bitcoin txoutproof size (require when IsPegin is true)
	PeginTxOutProofSize uint32
}

*

  • EstimateFee Input data struct.
  • (deprecated) Because it is already integrated with CfdUtxo.

type CfdEstimateFeeOption added in v0.0.8

type CfdEstimateFeeOption int
var KCfdEstimateFeeExponent CfdEstimateFeeOption = _swig_getkCfdEstimateFeeExponent()
var KCfdEstimateFeeMinimumBits CfdEstimateFeeOption = _swig_getkCfdEstimateFeeMinimumBits()

type CfdExtKeyType added in v0.0.7

type CfdExtKeyType int
var KCfdExtPrivkey CfdExtKeyType = _swig_getkCfdExtPrivkey()
var KCfdExtPubkey CfdExtKeyType = _swig_getkCfdExtPubkey()

type CfdExtkeyData added in v0.0.16

type CfdExtkeyData struct {
	// version
	Version string
	// parent fingerprint
	Fingerprint string
	// chain code
	ChainCode string
	// depth
	Depth uint32
	// child number
	ChildNumber uint32
}

*

  • Extkey data struct.

func CfdGoGetExtkeyInfo added in v0.3.7

func CfdGoGetExtkeyInfo(
	extkey string) (extkeyData CfdExtkeyData, keyType, networkType int, err error)

CfdGoGetExtkeyInfo This function returns extkey info and network.

func CfdGoGetExtkeyInformation added in v0.0.16

func CfdGoGetExtkeyInformation(
	extkey string) (extkeyData CfdExtkeyData, err error)

*

  • Get extkey information.
  • param: extkey ext key string.
  • return: extkeyData CfdExtkeyData
  • return: err error

type CfdFeeEstimateOption added in v0.1.24

type CfdFeeEstimateOption struct {
	// effective feerate
	EffectiveFeeRate float64
	// use elements chain
	UseElements bool
	// fee asset
	FeeAsset string
	// Require blinding or not
	RequireBlind bool
	// blinding exponent value
	Exponent int64
	// blinding minimum bits value
	MinimumBits int64
}

*

  • EstimateFee option data struct.

func NewCfdEstimateFeeOption added in v0.0.8

func NewCfdEstimateFeeOption() CfdFeeEstimateOption

*

  • Create CfdFeeEstimateOption struct set default value.
  • return: option EstimateFeeOption

type CfdFundRawTxOption added in v0.1.23

type CfdFundRawTxOption struct {
	// fee asset
	FeeAsset string
	// use blind tx
	IsBlindTx bool
	// effective feerate
	EffectiveFeeRate float64
	// longterm feerate
	LongTermFeeRate float64
	// dust feerate
	DustFeeRate float64
	// knapsack min change value. knapsack logic's threshold. Recommended value is 1.
	KnapsackMinChange int64
	// blind exponent. default is 0.
	Exponent int64
	// blind minimum bits. default is -1 (cfd-go auto).
	MinimumBits int64
}

*

  • FundRawTransaction option data struct.

func NewCfdFundRawTxOption added in v0.1.23

func NewCfdFundRawTxOption(networkType int) CfdFundRawTxOption

* NewCfdFundRawTxOption

  • Create CfdFundRawTxOption struct set default value.
  • param: networkType network type.
  • return: option FundRawTx option

type CfdFundRawTxTargetAmount added in v0.1.23

type CfdFundRawTxTargetAmount struct {
	// Amount more than the specified amount is set in txout. default is 0 (disable).
	Amount int64
	// asset
	Asset string
	// address for adding txout. Also serves as a change address.
	ReservedAddress string
}

*

  • Selection target amount struct.

type CfdFundTxOption added in v0.1.21

type CfdFundTxOption int
var KCfdFundTxBlindExponent CfdFundTxOption = _swig_getkCfdFundTxBlindExponent()
var KCfdFundTxBlindMinimumBits CfdFundTxOption = _swig_getkCfdFundTxBlindMinimumBits()
var KCfdFundTxDustFeeRate CfdFundTxOption = _swig_getkCfdFundTxDustFeeRate()
var KCfdFundTxIsBlind CfdFundTxOption = _swig_getkCfdFundTxIsBlind()
var KCfdFundTxKnapsackMinChange CfdFundTxOption = _swig_getkCfdFundTxKnapsackMinChange()
var KCfdFundTxLongTermFeeRate CfdFundTxOption = _swig_getkCfdFundTxLongTermFeeRate()

type CfdHashType added in v0.0.7

type CfdHashType int
var KCfdP2pkh CfdHashType = _swig_getkCfdP2pkh()
var KCfdP2sh CfdHashType = _swig_getkCfdP2sh()
var KCfdP2shP2wpkh CfdHashType = _swig_getkCfdP2shP2wpkh()
var KCfdP2shP2wsh CfdHashType = _swig_getkCfdP2shP2wsh()
var KCfdP2wpkh CfdHashType = _swig_getkCfdP2wpkh()
var KCfdP2wsh CfdHashType = _swig_getkCfdP2wsh()
var KCfdTaproot CfdHashType = _swig_getkCfdTaproot()
var KCfdUnknown CfdHashType = _swig_getkCfdUnknown()

type CfdLibraryFunction added in v0.0.7

type CfdLibraryFunction int
var KCfdEnableBitcoin CfdLibraryFunction = _swig_getkCfdEnableBitcoin()
var KCfdEnableElements CfdLibraryFunction = _swig_getkCfdEnableElements()

type CfdMultisigSignData added in v0.0.6

type CfdMultisigSignData struct {
	// signature
	Signature string
	// use der encode
	IsDerEncode bool
	// sighash type. (CfdSighashType)
	SighashType int
	// sighash anyone can pay.
	SighashAnyoneCanPay bool
	// related pubkey.
	RelatedPubkey string
}

*

  • Multisig sign data struct.

type CfdNetworkType added in v0.0.7

type CfdNetworkType int
var KCfdNetworkCustomChain CfdNetworkType = _swig_getkCfdNetworkCustomChain()
var KCfdNetworkElementsRegtest CfdNetworkType = _swig_getkCfdNetworkElementsRegtest()
var KCfdNetworkLiquidv1 CfdNetworkType = _swig_getkCfdNetworkLiquidv1()
var KCfdNetworkMainnet CfdNetworkType = _swig_getkCfdNetworkMainnet()
var KCfdNetworkRegtest CfdNetworkType = _swig_getkCfdNetworkRegtest()
var KCfdNetworkTestnet CfdNetworkType = _swig_getkCfdNetworkTestnet()

type CfdOutputData added in v0.0.18

type CfdOutputData struct {
	// asset
	Asset string
	// amount
	Amount int64
	// address (not implements)
	Address string
	// locking script (not implements)
	LockingScript string
}

* Output data struct.

type CfdSequenceLockTime added in v0.0.7

type CfdSequenceLockTime int
var KCfdSequenceLockTimeDisable CfdSequenceLockTime = _swig_getkCfdSequenceLockTimeDisable()
var KCfdSequenceLockTimeEnableMax CfdSequenceLockTime = _swig_getkCfdSequenceLockTimeEnableMax()
var KCfdSequenceLockTimeFinal CfdSequenceLockTime = _swig_getkCfdSequenceLockTimeFinal()

type CfdSighashType added in v0.0.7

type CfdSighashType int
var KCfdSigHashAll CfdSighashType = _swig_getkCfdSigHashAll()
var KCfdSigHashAllPlusAnyoneCanPay CfdSighashType = _swig_getkCfdSigHashAllPlusAnyoneCanPay()
var KCfdSigHashAllPlusRangeproof CfdSighashType = _swig_getkCfdSigHashAllPlusRangeproof()
var KCfdSigHashDefault CfdSighashType = _swig_getkCfdSigHashDefault()
var KCfdSigHashNone CfdSighashType = _swig_getkCfdSigHashNone()
var KCfdSigHashNonePlusAnyoneCanPay CfdSighashType = _swig_getkCfdSigHashNonePlusAnyoneCanPay()
var KCfdSigHashNonePlusRangeproof CfdSighashType = _swig_getkCfdSigHashNonePlusRangeproof()
var KCfdSigHashSingle CfdSighashType = _swig_getkCfdSigHashSingle()
var KCfdSigHashSinglePlusAnyoneCanPay CfdSighashType = _swig_getkCfdSigHashSinglePlusAnyoneCanPay()
var KCfdSigHashSinglePlusRangeproof CfdSighashType = _swig_getkCfdSigHashSinglePlusRangeproof()

type CfdSignParameter added in v0.0.19

type CfdSignParameter struct {
	// data hex
	Data string
	// use der encode
	IsDerEncode bool
	// sighash type. (CfdSighashType)
	SighashType int
	// sighash anyone can pay.
	SighashAnyoneCanPay bool
}

*

  • Sign parameter data struct.

type CfdTargetAmount added in v0.0.8

type CfdTargetAmount struct {
	// Amount more than the specified amount is set in txout. default is 0 (disable).
	Amount int64
	// asset
	Asset string
}

*

  • Selection target amount struct.

type CfdTxData added in v0.0.6

type CfdTxData struct {
	// txid
	Txid string
	// witness txid
	Wtxid string
	// witness hash
	WitHash string
	// size
	Size uint32
	// virtual size
	Vsize uint32
	// weight
	Weight uint32
	// version
	Version uint32
	// locktime
	LockTime uint32
}

*

  • TxData data struct.

func CfdGoGetConfidentialTxData added in v0.0.6

func CfdGoGetConfidentialTxData(txHex string) (data CfdTxData, err error)

*

  • Get confidential transaction data.
  • param: txHex transaction hex
  • return: data transaction data
  • return: err error

func CfdGoGetConfidentialTxDataByHandle added in v0.1.35

func CfdGoGetConfidentialTxDataByHandle(txDataHandle uintptr) (data CfdTxData, err error)

func CfdGoGetTxInfo added in v0.1.21

func CfdGoGetTxInfo(networkType int, txHex string) (data CfdTxData, err error)

*

  • Get transaction data.
  • param: networkType network type.
  • param: txHex transaction hex
  • return: data transaction data
  • return: err error

func CfdGoGetTxInfoByHandle added in v0.1.35

func CfdGoGetTxInfoByHandle(txDataHandle uintptr) (data CfdTxData, err error)

type CfdTxOut added in v0.3.2

type CfdTxOut struct {
	// satoshi amount.
	Amount int64
	// locking script.
	LockingScript string
	// address (if locking script is usual hashtype.)
	Address string
}

TxOut : transaction output.

type CfdTxWitnessStackType added in v0.1.35

type CfdTxWitnessStackType int
var KCfdTxWitnessStackNormal CfdTxWitnessStackType = _swig_getkCfdTxWitnessStackNormal()
var KCfdTxWitnessStackPegin CfdTxWitnessStackType = _swig_getkCfdTxWitnessStackPegin()

type CfdUtxo added in v0.0.8

type CfdUtxo struct {
	// utxo txid
	Txid string
	// utxo vout
	Vout uint32
	// amount
	Amount int64
	// asset
	Asset string
	// output descriptor
	Descriptor string
	// is issuance output
	IsIssuance bool
	// is blind issuance output
	IsBlindIssuance bool
	// is peg-in output
	IsPegin bool
	// claim script hex (require when IsPegin is true)
	ClaimScript string
	// peg-in bitcoin tx size (require when IsPegin is true)
	PeginBtcTxSize uint32
	// peg-in bitcoin txoutproof size (require when IsPegin is true)
	PeginTxOutProofSize uint32
	// scriptsig template hex (require script hash estimate fee)
	ScriptSigTemplate string
	// amount commitment hex
	AmountCommitment string
	// asset commitment hex
	AssetCommitment string
	// amount blinder hex
	AmountBlinder string
	// asset blinder hex
	AssetBlinder string
	// genesis block hash
	GenesisBlockHash string
}

*

  • UTXO struct.

type CfdWitnessVersion added in v0.0.9

type CfdWitnessVersion int
var KCfdWitnessVersion0 CfdWitnessVersion = _swig_getkCfdWitnessVersion0()
var KCfdWitnessVersion1 CfdWitnessVersion = _swig_getkCfdWitnessVersion1()
var KCfdWitnessVersion10 CfdWitnessVersion = _swig_getkCfdWitnessVersion10()
var KCfdWitnessVersion11 CfdWitnessVersion = _swig_getkCfdWitnessVersion11()
var KCfdWitnessVersion12 CfdWitnessVersion = _swig_getkCfdWitnessVersion12()
var KCfdWitnessVersion13 CfdWitnessVersion = _swig_getkCfdWitnessVersion13()
var KCfdWitnessVersion14 CfdWitnessVersion = _swig_getkCfdWitnessVersion14()
var KCfdWitnessVersion15 CfdWitnessVersion = _swig_getkCfdWitnessVersion15()
var KCfdWitnessVersion16 CfdWitnessVersion = _swig_getkCfdWitnessVersion16()
var KCfdWitnessVersion2 CfdWitnessVersion = _swig_getkCfdWitnessVersion2()
var KCfdWitnessVersion3 CfdWitnessVersion = _swig_getkCfdWitnessVersion3()
var KCfdWitnessVersion4 CfdWitnessVersion = _swig_getkCfdWitnessVersion4()
var KCfdWitnessVersion5 CfdWitnessVersion = _swig_getkCfdWitnessVersion5()
var KCfdWitnessVersion6 CfdWitnessVersion = _swig_getkCfdWitnessVersion6()
var KCfdWitnessVersion7 CfdWitnessVersion = _swig_getkCfdWitnessVersion7()
var KCfdWitnessVersion8 CfdWitnessVersion = _swig_getkCfdWitnessVersion8()
var KCfdWitnessVersion9 CfdWitnessVersion = _swig_getkCfdWitnessVersion9()
var KCfdWitnessVersionNone CfdWitnessVersion = _swig_getkCfdWitnessVersionNone()

type ConfidentialTxIn added in v0.0.19

type ConfidentialTxIn struct {
	OutPoint                 OutPoint
	Sequence                 uint32
	ScriptSig                string
	Issuance                 IssuanceData
	WitnessStack             ScriptWitness
	PeginWitness             ScriptWitness
	IssuanceAmountRangeproof string
	InflationKeysRangeproof  string
}

ConfidentialTxIn : confidential transaction input.

type ConfidentialTxOut added in v0.0.19

type ConfidentialTxOut struct {
	// satoshi amount (unblind value)
	Amount int64
	// asset (or commitment asset)
	Asset string
	// locking script
	LockingScript string
	// address or confidential address. (if locking script is usual hashtype.)
	Address string
	// commitment value
	CommitmentValue string
	// commitment nonce
	CommitmentNonce string
	// surjectionprooof of asset
	Surjectionproof string
	// rangeproof of value
	Rangeproof string
}

ConfidentialTxOut : confidential transaction output.

type Descriptor added in v0.3.1

type Descriptor struct {
	// Output Descriptor
	OutputDescriptor string
	// Network Type
	Network int
}

Descriptor This struct use for the output descriptor.

func NewDescriptorFromAddress added in v0.3.1

func NewDescriptorFromAddress(address string, networkType int) *Descriptor

NewDescriptorFromAddress This function return a Descriptor from address.

func NewDescriptorFromLockingScript added in v0.3.1

func NewDescriptorFromLockingScript(lockingScript string, networkType int) *Descriptor

NewDescriptorFromLockingScript This function return a Descriptor from locking script.

func NewDescriptorFromMultisig added in v0.3.1

func NewDescriptorFromMultisig(hashType int, pubkeys []string, requireNum, networkType int) *Descriptor

NewDescriptorFromMultisig This function return a Descriptor from multisig.

func NewDescriptorFromPubkey added in v0.3.1

func NewDescriptorFromPubkey(hashType int, pubkey string, networkType int) *Descriptor

NewDescriptorFromAddress This function return a Descriptor from pubkey.

func NewDescriptorFromString added in v0.3.1

func NewDescriptorFromString(descriptor string, networkType int) *Descriptor

NewDescriptor This function return a Descriptor.

func (*Descriptor) GetChecksum added in v0.3.1

func (obj *Descriptor) GetChecksum() (descriptorAddedChecksum string, err error)

GetChecksum This function return a descriptor adding checksum.

func (*Descriptor) Parse added in v0.3.1

func (obj *Descriptor) Parse() (data CfdDescriptorData, descriptorDataList []CfdDescriptorData, multisigList []CfdDescriptorKeyData, err error)

Parse This function return a Descriptor parsing data.

func (*Descriptor) ParseWithDerivationPath added in v0.3.1

func (obj *Descriptor) ParseWithDerivationPath(bip32DerivationPath string) (data CfdDescriptorData, descriptorDataList []CfdDescriptorData, multisigList []CfdDescriptorKeyData, err error)

ParseWithDerivationPath This function return a Descriptor parsing data.

type Int32_t added in v0.0.8

type Int32_t interface {
	Swigcptr() uintptr
}

type Int64_t

type Int64_t interface {
	Swigcptr() uintptr
}

type IssuanceData added in v0.1.35

type IssuanceData struct {
	Entropy     string
	Nonce       string
	AssetAmount int64
	AssetValue  string
	TokenAmount int64
	TokenValue  string
}

IssuanceData : confidential transaction issuance input.

type OutPoint added in v0.0.19

type OutPoint struct {
	// txid
	Txid string
	// vout
	Vout uint32
}

OutPoint : utxo outpoint struct.

type SchnorrUtil added in v0.2.0

type SchnorrUtil struct {
}

SchnorrUtil This struct use for the accessing to schnorr function.

func NewSchnorrUtil added in v0.2.0

func NewSchnorrUtil() *SchnorrUtil

NewSchnorrUtil This function return a SchnorrUtil.

func (*SchnorrUtil) AddSighashTypeInSignature added in v0.3.1

func (obj *SchnorrUtil) AddSighashTypeInSignature(signature *ByteData, sighashType *SigHashType) (addedSighash *ByteData, err error)

AddSighashTypeInSignature This function return schnorr signature added sighashType.

func (*SchnorrUtil) ComputeSigPoint added in v0.2.0

func (obj *SchnorrUtil) ComputeSigPoint(msg, nonce, pubkey ByteData) (sigPoint ByteData, err error)

ComputeSigPoint This function return a sig-point.

func (*SchnorrUtil) GetPubkeyFromPrivkey added in v0.2.3

func (obj *SchnorrUtil) GetPubkeyFromPrivkey(key ByteData) (pubkey ByteData, err error)

GetPubkeyFromPrivkey (deprecated) This function return a schnorr's pubkey. Please use GetSchnorrPubkeyFromPrivkey.

func (*SchnorrUtil) GetSchnorrPubkeyFromPrivkey added in v0.2.4

func (obj *SchnorrUtil) GetSchnorrPubkeyFromPrivkey(key ByteData) (pubkey ByteData, parity bool, err error)

GetSchnorrPubkeyFromPrivkey This function return a schnorr's pubkey.

func (*SchnorrUtil) GetSchnorrPubkeyFromPubkey added in v0.2.4

func (obj *SchnorrUtil) GetSchnorrPubkeyFromPubkey(key ByteData) (pubkey ByteData, parity bool, err error)

GetSchnorrPubkeyFromPubkey This function return a schnorr's pubkey.

func (*SchnorrUtil) IsTweakedPubkey added in v0.2.4

func (obj *SchnorrUtil) IsTweakedPubkey(key ByteData, parity bool, basePubkey, tweak ByteData) (isTweaked bool, err error)

IsTweakedPubkey This function return a tweaked flag.

func (*SchnorrUtil) Sign added in v0.2.0

func (obj *SchnorrUtil) Sign(msg, secretKey, auxRand ByteData) (signature ByteData, err error)

Sign This function return a schnorr's signature.

func (*SchnorrUtil) SignWithNonce added in v0.2.0

func (obj *SchnorrUtil) SignWithNonce(msg, secretKey, nonce ByteData) (signature ByteData, err error)

SignWithNonce This function return a schnorr's signature with nonce.

func (*SchnorrUtil) SplitSignature added in v0.2.1

func (obj *SchnorrUtil) SplitSignature(signature ByteData) (nonce, key ByteData, err error)

SplitSignature This function return schnorr nonce and schnorr privkey.

func (*SchnorrUtil) TweakAddKeyPair added in v0.2.4

func (obj *SchnorrUtil) TweakAddKeyPair(key, tweak ByteData) (pubkey ByteData, parity bool, privkey ByteData, err error)

TweakAddKeyPair This function return a schnorr's pubkey.

func (*SchnorrUtil) TweakAddPubkey added in v0.2.4

func (obj *SchnorrUtil) TweakAddPubkey(key, tweak ByteData) (pubkey ByteData, parity bool, err error)

TweakAddPubkey This function return a schnorr's pubkey.

func (*SchnorrUtil) Verify added in v0.2.0

func (obj *SchnorrUtil) Verify(signature, msg, pubkey ByteData) (isVerify bool, err error)

Verify This function verify a schnorr's signature.

type Script added in v0.3.1

type Script struct {
	// contains filtered or unexported fields
}

Script This struct holds a script.

func NewScript added in v0.3.1

func NewScript(data []byte) Script

NewScript This function create a script from a byte array.

func NewScriptFromAsm added in v0.3.1

func NewScriptFromAsm(scriptAsm string) (Script, error)

NewScriptFromAsm This function create a script from an asm string.

func NewScriptFromAsmList added in v0.3.1

func NewScriptFromAsmList(scriptAsmList []string) (Script, error)

NewScriptFromAsmList This function create a script from the asm string list.

func NewScriptFromHex added in v0.3.1

func NewScriptFromHex(hexStr string) (Script, error)

NewScriptFromHex This function create a script from a hex string.

func NewScriptFromHexIgnoreError added in v0.3.1

func NewScriptFromHexIgnoreError(hexStr string) *Script

NewScriptFromHex This function create a script from a hex string. On error, it returns nil.

func (*Script) IsEmpty added in v0.3.1

func (obj *Script) IsEmpty() bool

IsEmpty This function return a empty or not.

func (*Script) Parse added in v0.3.1

func (obj *Script) Parse() (scriptItems []string, err error)

Parse This function return a parsing script.

func (*Script) ToHex added in v0.3.1

func (obj *Script) ToHex() string

ToHex This function return a hex string.

func (*Script) ToSlice added in v0.3.1

func (obj *Script) ToSlice() []byte

ToHex This function return a byte array.

type ScriptWitness added in v0.0.19

type ScriptWitness struct {
	// witness stack by hex.
	Stack []string
}

ScriptWitness : witness stack.

type SigHashType added in v0.3.1

type SigHashType struct {
	Type         int
	AnyoneCanPay bool
	Rangeproof   bool
}

SigHashType This struct use for the sighashtype utility function.

func NewSigHashType added in v0.3.1

func NewSigHashType(sighashType int) *SigHashType

NewSigHashType This function return a SigHashType.

func (*SigHashType) GetValue added in v0.3.1

func (obj *SigHashType) GetValue() int

ToHex This function return a sighashtype byte value.

type SwigcptrInt32_t added in v0.0.8

type SwigcptrInt32_t uintptr

func (SwigcptrInt32_t) Swigcptr added in v0.0.8

func (p SwigcptrInt32_t) Swigcptr() uintptr

type SwigcptrInt64_t

type SwigcptrInt64_t uintptr

func (SwigcptrInt64_t) Swigcptr

func (p SwigcptrInt64_t) Swigcptr() uintptr

type SwigcptrUint32_t

type SwigcptrUint32_t uintptr

func (SwigcptrUint32_t) Swigcptr

func (p SwigcptrUint32_t) Swigcptr() uintptr

type SwigcptrUint64_t

type SwigcptrUint64_t uintptr

func (SwigcptrUint64_t) Swigcptr

func (p SwigcptrUint64_t) Swigcptr() uintptr

type SwigcptrUint8_t added in v0.3.1

type SwigcptrUint8_t uintptr

func (SwigcptrUint8_t) Swigcptr added in v0.3.1

func (p SwigcptrUint8_t) Swigcptr() uintptr

type TapBranch added in v0.3.1

type TapBranch struct {
	// Branch Hash
	Hash ByteData
	// TapScript
	TapScript Script
	// TapLeafHash
	TapLeafHash ByteData

	// network type
	NetworkType int
	// contains filtered or unexported fields
}

TapBranch This struct use for the taproot script tree branch.

func NewElementsTapBranchFromString added in v0.4.0

func NewElementsTapBranchFromString(treeStr string, tapscript *Script) (*TapBranch, error)

NewElementsTapBranchFromString This function return a TapBranch from tree string.

func NewElementsTapBranchFromStringByNodes added in v0.4.0

func NewElementsTapBranchFromStringByNodes(treeStr string, tapscript *Script, nodes []string) (*TapBranch, error)

NewElementsTapBranchFromStringByNodes This function return a TapBranch from tree string and nodes.

func NewElementsTapBranchFromTapScript added in v0.4.0

func NewElementsTapBranchFromTapScript(tapscript *Script) (*TapBranch, error)

NewElementsTapBranchFromTapScript This function return a TapBranch from tapscript.

func NewTapBranchFromHash added in v0.3.1

func NewTapBranchFromHash(hash *ByteData) (*TapBranch, error)

NewTapBranchFromHash This function return a TapBranch.

func NewTapBranchFromHashWithNetwork added in v0.4.0

func NewTapBranchFromHashWithNetwork(hash *ByteData, networkType int) (*TapBranch, error)

NewTapBranchFromHashWithNetwork This function return a TapBranch.

func NewTapBranchFromString added in v0.3.1

func NewTapBranchFromString(treeStr string, tapscript *Script) (*TapBranch, error)

NewTapBranchFromString This function return a TapBranch from tree string.

func NewTapBranchFromStringByNodes added in v0.3.1

func NewTapBranchFromStringByNodes(treeStr string, tapscript *Script, nodes []string) (*TapBranch, error)

NewTapBranchFromStringByNodes This function return a TapBranch from tree string and nodes.

func NewTapBranchFromStringByNodesWithNetwork added in v0.4.0

func NewTapBranchFromStringByNodesWithNetwork(treeStr string, tapscript *Script, nodes []string, networkType int) (*TapBranch, error)

NewTapBranchFromStringByNodesWithNetwork This function return a TapBranch from tree string and nodes.

func NewTapBranchFromStringWithNetwork added in v0.4.0

func NewTapBranchFromStringWithNetwork(treeStr string, tapscript *Script, networkType int) (*TapBranch, error)

NewTapBranchFromStringByNodesWithNetwork This function return a TapBranch from tree string.

func NewTapBranchFromTapScript added in v0.3.1

func NewTapBranchFromTapScript(tapscript *Script) (*TapBranch, error)

NewTapBranchFromTapScript This function return a TapBranch from tapscript.

func NewTapBranchFromTapScriptWithNetwork added in v0.4.0

func NewTapBranchFromTapScriptWithNetwork(tapscript *Script, networkType int) (*TapBranch, error)

NewTapBranchFromTapScriptWithNetwork This function return a TapBranch from tapscript.

func (*TapBranch) AddBranchByBranch added in v0.3.1

func (obj *TapBranch) AddBranchByBranch(branch *TapBranch) error

AddBranchByBranch This function is adding a tapbranch.

func (*TapBranch) AddBranchByHash added in v0.3.1

func (obj *TapBranch) AddBranchByHash(hash *ByteData) error

AddBranchByHash This function is adding a tapbranch hash.

func (*TapBranch) AddBranchByString added in v0.3.1

func (obj *TapBranch) AddBranchByString(treeStr string) error

AddBranchByString This function return a tapbranch string.

func (*TapBranch) AddBranchByTapScript added in v0.3.1

func (obj *TapBranch) AddBranchByTapScript(tapscript *Script) error

AddBranchByTapScript This function is adding a tapscript.

func (*TapBranch) GetBranch added in v0.3.1

func (obj *TapBranch) GetBranch(index uint8) (branch *TapBranch, err error)

GetBranch This function return a tapbranch.

func (*TapBranch) GetControlNodeList added in v0.3.1

func (obj *TapBranch) GetControlNodeList() (nodeList []string, err error)

GetControlNodeList This function return control node list.

func (*TapBranch) GetMaxBranchCount added in v0.3.1

func (obj *TapBranch) GetMaxBranchCount() (count uint32, err error)

GetMaxBranchCount This function return a branch count.

func (*TapBranch) GetTreeString added in v0.3.1

func (obj *TapBranch) GetTreeString() string

GetTreeString This function return a tapbranch tree string.

func (*TapBranch) GetTweakedPrivkey added in v0.3.1

func (obj *TapBranch) GetTweakedPrivkey(internalPrivkey *ByteData) (privkey *ByteData, err error)

GetTweakedPrivkey This function return a tweaked privkey by tapscript tree.

func (*TapBranch) GetTweakedPubkey added in v0.3.1

func (obj *TapBranch) GetTweakedPubkey(internalPubkey *ByteData) (pubkey *ByteData, tapLeafHash *ByteData, controlBlock *ByteData, err error)

GetTweakedPubkey This function return a tweaked pubkey by tapscript tree.

type TransactionData added in v0.1.35

type TransactionData struct {
	// txid
	Txid string
	// witness txid
	Wtxid string
	// witness hash
	WitHash string
	// size
	Size uint32
	// virtual size
	Vsize uint32
	// weight
	Weight uint32
	// version
	Version uint32
	// locktime
	LockTime uint32
}

*

  • TransactionData data struct.

type TxIn added in v0.0.19

type TxIn struct {
	// utxo outpoint.
	OutPoint OutPoint
	// sequence number.
	Sequence uint32
	// script sig.
	ScriptSig string
	// witness stack.
	WitnessStack ScriptWitness
}

TxIn : transaction input.

type TxOut added in v0.0.19

type TxOut struct {
	// satoshi amount.
	Amount int64
	// locking script.
	LockingScript string
	// address (if locking script is usual hashtype.)
	Address string
}

TxOut : transaction output.

type Uint32_t

type Uint32_t interface {
	Swigcptr() uintptr
}

func GetKCfdCodeSeparatorPositionDefault added in v0.4.0

func GetKCfdCodeSeparatorPositionDefault() (_swig_ret Uint32_t)

type Uint64_t

type Uint64_t interface {
	Swigcptr() uintptr
}

type Uint8_t added in v0.3.1

type Uint8_t interface {
	Swigcptr() uintptr
}

Directories

Path Synopsis
address/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
block/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
crypto/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
descriptor/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
key
key/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
script/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
transaction/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
service
pegin/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
pegout/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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