btcapi

package
v0.0.0-...-c2e5dec Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// This will calculate and include appropriate fees for your transaction to be included in the next 1-2 blocks
	PreferenceHigh = "high"
	// This will calculate and include appropriate fees for your transaction to be included in the next 3-6 blocks
	PreferenceMedium = "medium"
	// This will calculate and include appropriate fees for your transaction to be included in the next 7 or more blocks
	PreferenceLow = "low"
	// No fee
	PreferenceZero = "zero"
)
View Source
const MinSat = 546

Variables

View Source
var BitcoinParamsMaintest = &BitcoinParams{
	FirstScannedBTCBlkHeight: uint64(787496),
	MasterPubKeys: [][]byte{
		[]byte{0x2, 0xe, 0x8, 0xa, 0xe3, 0xcf, 0xf5, 0x1d, 0xc3, 0xc0, 0x83, 0xaf, 0xa9, 0x24, 0x71, 0x9c, 0x2f, 0xca, 0x62, 0x89, 0x74, 0x70, 0xb4, 0x8b, 0x9, 0x51, 0x3, 0x6f, 0x32, 0x9e, 0xdb, 0x5f, 0xe7},
		[]byte{0x3, 0xc2, 0x3c, 0x3d, 0x6f, 0x83, 0xbe, 0xc9, 0x56, 0xde, 0x6a, 0x54, 0x90, 0xac, 0x2d, 0xe7, 0xee, 0x5c, 0xf8, 0x63, 0x22, 0x84, 0x9c, 0x61, 0xed, 0x62, 0x5b, 0x69, 0x8f, 0x4a, 0x4a, 0xee, 0x49},
		[]byte{0x3, 0x3b, 0x75, 0x80, 0x77, 0x8f, 0x4d, 0x2e, 0x46, 0x20, 0x6a, 0xd5, 0x32, 0x66, 0x18, 0xb6, 0xd6, 0x4c, 0x46, 0x1a, 0xe, 0x47, 0xb2, 0x5a, 0x77, 0xad, 0x72, 0xdc, 0x56, 0x4e, 0xa6, 0xca, 0xdb},
		[]byte{0x2, 0xfc, 0x81, 0x32, 0xba, 0xb2, 0x85, 0x71, 0x82, 0x3f, 0x82, 0x3d, 0x74, 0xe5, 0xd4, 0xa2, 0xff, 0xcb, 0xb, 0xe7, 0x2c, 0x49, 0x63, 0xb3, 0x73, 0x75, 0xf7, 0xc4, 0x41, 0xf9, 0x3e, 0xda, 0x96},
		[]byte{0x2, 0xb2, 0x14, 0xd8, 0x19, 0x77, 0x31, 0x59, 0xa3, 0xae, 0x9c, 0x30, 0xf9, 0x85, 0xa4, 0xe0, 0x56, 0x1d, 0x98, 0x9d, 0xf6, 0x27, 0xfb, 0xbd, 0xd6, 0x9d, 0x33, 0xdd, 0xa7, 0x25, 0x38, 0x35, 0xb5},
		[]byte{0x3, 0xb8, 0xc6, 0xf2, 0x80, 0x9d, 0xe5, 0xd, 0x6a, 0x43, 0x57, 0xb9, 0xac, 0xce, 0xaa, 0xd, 0x8, 0xda, 0xd4, 0x75, 0xd9, 0x6a, 0xbf, 0x70, 0x14, 0xe7, 0x2a, 0xeb, 0x68, 0xe0, 0xb1, 0xa4, 0xb4},
		[]byte{0x2, 0xee, 0x76, 0x26, 0xa3, 0x4f, 0xd, 0xb7, 0x57, 0x21, 0xa4, 0x44, 0x8c, 0xa8, 0x6e, 0x59, 0xa1, 0x32, 0x2d, 0xa6, 0xbe, 0xf8, 0x86, 0xbf, 0x64, 0xa5, 0x94, 0xa7, 0xed, 0x20, 0xfd, 0xc2, 0x52},
	},
	GeneralMultisigWallet: "bc1qajyp9ekpepmhftxq8aeps4cv8gjkat00nfk9lplqec7mevhv4z6qxy37z8",
	NumRequiredSigs:       5,
	TotalSigs:             7,
	MinDepositAmount:      uint64(0),
	MinWithdrawAmount:     uint64(0),
	DepositFee:            uint64(10000),

	ChainParam:       &chaincfg.MainNetParams,
	InputSize:        192,
	OutputSize:       43,
	MaxTxSize:        51200,
	TaprootInputSize: 68,
}

Functions

func GenerateAddressTaproot

func GenerateAddressTaproot(chainParam *chaincfg.Params, seed ...string) (privKey, pubKey, addressTaproot string, err error)

func GenerateAddressTaprootFromPrivateKey

func GenerateAddressTaprootFromPrivateKey(chainParam *chaincfg.Params, privateKey string) (addressTaproot string, err error)

Types

type BTCFullnodeConfig

type BTCFullnodeConfig struct {
	Host     string `json:"host"`
	Username string `json:"username"`
	Password string `json:"password"`
	IsHttps  string `json:"is_https"`
}

type BitcoinParams

type BitcoinParams struct {
	FirstScannedBTCBlkHeight uint64

	MasterPubKeys         [][]byte
	GeneralMultisigWallet string
	NumRequiredSigs       int
	TotalSigs             int
	MinDepositAmount      uint64
	MinWithdrawAmount     uint64
	DepositFee            uint64

	ChainParam *chaincfg.Params
	InputSize  int // for multisig
	OutputSize int
	MaxTxSize  int
	MaxFeeRate int

	TaprootInputSize int
}

type BlockAuditScoreResp

type BlockAuditScoreResp struct {
	Hash           string           `json:"hash"`
	MatchRate      numeric.BigFloat `json:"matchRate"`
	ExpectedFees   int64            `json:"expectedFees"`
	ExpectedWeight int64            `json:"expectedWeight"`
}

type BlockCypherWalletInfo

type BlockCypherWalletInfo struct {
	Address            string  `json:"address"`
	TotalReceived      int     `json:"total_received"`
	TotalSent          int     `json:"total_sent"`
	Balance            int     `json:"balance"`
	UnconfirmedBalance int     `json:"unconfirmed_balance"`
	FinalBalance       int     `json:"final_balance"`
	NTx                int     `json:"n_tx"`
	UnconfirmedNTx     int     `json:"unconfirmed_n_tx"`
	FinalNTx           int     `json:"final_n_tx"`
	Txrefs             []TxRef `json:"txrefs"`
	TxURL              string  `json:"tx_url"`
	Error              string  `json:"error"`
}

type BlockInfoResp

type BlockInfoResp struct {
	Hash string `json:"hash"`
	Tx   []*struct {
		Hash   string `json:"hash"`
		Inputs []*struct {
			PrevOut *struct {
				Spent bool   `json:"spent"`
				Value uint64 `json:"value"`
				Addr  string `json:"addr"`
			} `json:"prev_out"`
		} `json:"inputs"`
		Out []*struct {
			Spent bool   `json:"spent"`
			Value uint64 `json:"value"`
			Addr  string `json:"addr"`
		} `json:"out"`
	} `json:"tx"`
}

type BlockResp

type BlockResp struct {
	Id     string `json:"id"`
	Extras struct {
		MatchRate      numeric.BigFloat `json:"matchRate"`
		ExpectedFees   int64            `json:"expectedFees"`
		ExpectedWeight int64            `json:"expectedWeight"`
		Pool           struct {
			ID   uint   `json:"id"`
			Name string `json:"name"`
			Slug string `json:"slug"`
		} `json:"pool"`
	} `json:"extras"`
}

type Client

type Client struct {
	Chain   string
	Network string
	Token   string

	QNUrl             string
	SdkUrl            string
	BlockstreamUrl    string
	MempoolUrl        string
	HirosoUrl         string
	BlockchainInfoUrl string
	// contains filtered or unexported fields
}

func (*Client) Address

func (c *Client) Address() (string, string, error)

func (*Client) Balance

func (c *Client) Balance(addr string) (uint64, error)

func (*Client) BroadcastBTCTxByMempool

func (u *Client) BroadcastBTCTxByMempool(hexTx string) (string, error)

func (*Client) BuildBTCClient

func (u *Client) BuildBTCClient(cfg *BTCFullnodeConfig) (*rpcclient.Client, error)

func (*Client) CheckBVMInscs

func (u *Client) CheckBVMInscs(txIDs []string) ([]bool, error)

func (*Client) CheckTXHash

func (c *Client) CheckTXHash(hash string, confirmedBlock int) (bool, error)

func (*Client) CreateOrdInscImg

func (u *Client) CreateOrdInscImg(btcAddress string, privateKey string, feeRate int, receiverAddress string, data []byte) (string, string, error)

func (*Client) CreateOrdInscImgParam

func (c *Client) CreateOrdInscImgParam(req CreateOrdInscImgDtoRequest) (CreateOrdInscImgResp, error)

func (*Client) CreateSendTxSendMultiInsc

func (c *Client) CreateSendTxSendMultiInsc(req CreateSendTxMultiInscRequest) (CreateSendTxResponse, error)

func (*Client) GenerateAddressSegwit

func (c *Client) GenerateAddressSegwit(networkParams *chaincfg.Params, privateKey ...string) (privKey, pubKey, addressSegwit string, err error)

func (*Client) GenerateAddressTaproot

func (c *Client) GenerateAddressTaproot() (string, string, error)

func (*Client) GetBTCAddressAllTxs

func (c *Client) GetBTCAddressAllTxs(address string) ([]*RawaddrTXResp, error)

func (*Client) GetBTCAddressInscriptions

func (c *Client) GetBTCAddressInscriptions(address string, offset uint, limit uint) ([]*WalletInscription, error)

func (*Client) GetBTCAddressInscriptionsAll

func (c *Client) GetBTCAddressInscriptionsAll(address string) ([]*WalletInscription, error)

func (*Client) GetBTCAddressTxs

func (c *Client) GetBTCAddressTxs(address string, offset int, limit int) ([]*RawaddrTXResp, error)

func (*Client) GetBTCAddressTxsV2

func (c *Client) GetBTCAddressTxsV2(address string, lastTxID string) ([]*MempoolTXResp, error)

func (*Client) GetBalanceFromBlockcypler

func (c *Client) GetBalanceFromBlockcypler(addr string) (uint64, error)

func (*Client) GetBalanceFromQuickNode

func (c *Client) GetBalanceFromQuickNode(address string) (*BlockCypherWalletInfo, error)

func (*Client) GetBlock

func (c *Client) GetBlock(hash string) (*BlockResp, error)

func (*Client) GetBlockAuditScore

func (c *Client) GetBlockAuditScore(hash string) (*BlockAuditScoreResp, error)

func (*Client) GetBlockCountFromService

func (u *Client) GetBlockCountFromService() (uint64, error)

func (*Client) GetBlocksAuditScore

func (c *Client) GetBlocksAuditScore(startHeight uint64) ([]*BlockAuditScoreResp, error)

func (*Client) GetFeeRate

func (u *Client) GetFeeRate() (int, error)

func (*Client) GetLatestBlockHash

func (c *Client) GetLatestBlockHash() (string, int64, error)

func (*Client) GetListUnspentBVMInscsForMint

func (u *Client) GetListUnspentBVMInscsForMint(btcAddress string) ([]InscriptionT1, []Utxo, map[string][]InscriptionT2, error)

func (*Client) GetListUnspentBVMInscsForSend

func (u *Client) GetListUnspentBVMInscsForSend(btcAddress string, inscUTXOs []*UTXOIns) ([]InscriptionT1, []Utxo, map[string][]InscriptionT2, error)

func (*Client) GetMiningPoolBlocks

func (c *Client) GetMiningPoolBlocks(slug string) ([]*MiningBlockResp, error)

func (*Client) GetMiningPools

func (c *Client) GetMiningPools() ([]*MiningPoolResp, error)

func (*Client) GetOutAddrsByHeight

func (c *Client) GetOutAddrsByHeight(height int64) ([]string, []*OutResp, error)

func (*Client) GetUTXOs

func (u *Client) GetUTXOs(btcClient *rpcclient.Client, addresses []string, chainCfg *chaincfg.Params, minConfirmation, maxConfirmation int) ([]btcjson.ListUnspentResult, error)

func (*Client) ParseTx

func (u *Client) ParseTx(data string) (*wire.MsgTx, error)

func (*Client) SendBVMInscs

func (u *Client) SendBVMInscs(btcAddress string, privateKey string, inscIDs []string, addresses []string, inscUTXOs []*UTXOIns, feeRate int) (string, string, error)

func (*Client) Transfer

func (bs *Client) Transfer(secret string, from string, destination string, amount int) (string, error)

type CreateOrdInscImgDtoRequest

type CreateOrdInscImgDtoRequest struct {
	Network         int                        `json:"network"`
	PrivateString   string                     `json:"privateString"`
	SenderAddress   string                     `json:"senderAddress"`
	Utxos           []Utxo                     `json:"utxos"`
	Inscriptions    map[string][]InscriptionT2 `json:"inscriptions"`
	Data            string                     `json:"data"`
	ContentType     string                     `json:"contentType"`
	FeeRatePerByte  int                        `json:"feeRatePerByte"`
	ReceiverAddress string                     `json:"receiverAddress"`
}

type CreateOrdInscImgResp

type CreateOrdInscImgResp struct {
	ErrorCode string `json:"errorCode"`
	Error     string `json:"error"`
	Data      *struct {
		CommitTxHex string `json:"commitTxHex"`
		CommitTxID  string `json:"commitTxID"`
		RevealTxHex string `json:"revealTxHex"`
		RevealTxID  string `json:"revealTxID"`
	} `json:"data"`
}

type CreateRawTxResponse

type CreateRawTxResponse struct {
	ErrorCode string `json:"errorCode"`
	Error     string `json:"error"`
	Data      *struct {
		Base64Psbt    string `json:"base64Psbt"`
		Fee           string `json:"fee"`
		SelectedUTXOs []Utxo `json:"selectedUTXOs"`
		ChangeAmount  string `json:"changeAmount"`

		IndicesToSign []int `json:"indicesToSign"`
	} `json:"data"`
}

type CreateRawTxTransferSRC20Request

type CreateRawTxTransferSRC20Request struct {
	PublicKey       string                     `json:"publicKey"` // wif string
	SenderAddress   string                     `json:"senderAddress"`
	Utxos           []Utxo                     `json:"utxos"`
	Inscriptions    map[string][]InscriptionT2 `json:"inscriptions"`
	Data            string                     `json:"data"`
	ReceiverAddress string                     `json:"receiverAddress"`
	PaymentInfos    []PaymentInfo              `json:"paymentInfos"`
	FeeRatePerByte  int                        `json:"feeRatePerByte"`
	Network         int                        `json:"network"`
}

type CreateSendTxMultiInscRequest

type CreateSendTxMultiInscRequest struct {
	PrivateKeyStr    string                     `json:"privateString"` // wif string
	SenderAddress    string                     `json:"senderAddress"`
	Utxos            []Utxo                     `json:"utxos"`
	Inscriptions     map[string][]InscriptionT2 `json:"inscriptions"`
	InscPaymentInfos []InscPaymentInfo          `json:"inscPaymentInfos"`
	PaymentInfos     []PaymentInfo              `json:"paymentInfos"`
	FeeRatePerByte   int                        `json:"feeRatePerByte"`
	Network          int                        `json:"network"`
}

type CreateSendTxMultiRequest

type CreateSendTxMultiRequest struct {
	// PrivateKey         string                   `json:"-"`             //buffer
	PrivateKeyStr  string                     `json:"privateString"` //buffer
	SenderAddress  string                     `json:"senderAddress"`
	Utxos          []Utxo                     `json:"utxos"`
	Inscriptions   map[string][]InscriptionT2 `json:"inscriptions"`
	PaymentInfos   []PaymentInfo              `json:"paymentInfos"`
	FeeRatePerByte int                        `json:"feeRatePerByte"`
	Network        int                        `json:"network"`
}

type CreateSendTxRequest

type CreateSendTxRequest struct {
	// PrivateKey         string                   `json:"-"`             //buffer
	PrivateKeyStr      string                     `json:"privateString"` //buffer
	SenderAddress      string                     `json:"senderAddress"`
	Utxos              []Utxo                     `json:"utxos"`
	Inscriptions       map[string][]InscriptionT2 `json:"inscriptions"`
	SendInscriptionID  string                     `json:"sendInscriptionID"`
	ReceiverInsAddress string                     `json:"receiverInsAddress"`
	SendAmount         string                     `json:"sendAmount"`
	FeeRatePerByte     int                        `json:"feeRatePerByte"`
	Network            int                        `json:"network"`
}

type CreateSendTxResponse

type CreateSendTxResponse struct {
	ErrorCode string `json:"errorCode"`
	Error     string `json:"error"`
	Data      *struct {
		TxID          string `json:"txID"`
		TxHex         string `json:"txHex"`
		Fee           string `json:"fee"`
		ChangeAmount  string `json:"changeAmount"`
		SelectedUTXOs []Utxo `json:"selectedUTXOs"`
	} `json:"data"`
}

type CreateTransferSRC20ScriptRequest

type CreateTransferSRC20ScriptRequest struct {
	Data      string `json:"data"`
	SecretKey string `json:"secretKey"`
}

type CreateTransferSRC20ScriptResponse

type CreateTransferSRC20ScriptResponse struct {
	ErrorCode string   `json:"errorCode"`
	Error     string   `json:"error"`
	Data      []string `json:"data"`
}

type ExecRequest

type ExecRequest struct {
	Args []string `json:"args"`
}

type FeeRates

type FeeRates struct {
	FastestFee  int `json:"fastestFee"`
	HalfHourFee int `json:"halfHourFee"`
	HourFee     int `json:"hourFee"`
	EconomyFee  int `json:"economyFee"`
	MinimumFee  int `json:"minimumFee"`
}

type GetTxInfoFromBlockStream

type GetTxInfoFromBlockStream struct {
	Txid     string `json:"txid"`
	Version  int    `json:"version"`
	Locktime int    `json:"locktime"`
	Vin      []struct {
		Txid    string `json:"txid"`
		Vout    int    `json:"vout"`
		Prevout struct {
			Scriptpubkey        string `json:"scriptpubkey"`
			ScriptpubkeyAsm     string `json:"scriptpubkey_asm"`
			ScriptpubkeyType    string `json:"scriptpubkey_type"`
			ScriptpubkeyAddress string `json:"scriptpubkey_address"`
			Value               int    `json:"value"`
		} `json:"prevout"`
		Scriptsig             string   `json:"scriptsig"`
		ScriptsigAsm          string   `json:"scriptsig_asm"`
		Witness               []string `json:"witness"`
		IsCoinbase            bool     `json:"is_coinbase"`
		Sequence              int      `json:"sequence"`
		InnerWitnessscriptAsm string   `json:"inner_witnessscript_asm"`
	} `json:"vin"`
	Vout []struct {
		Scriptpubkey        string `json:"scriptpubkey"`
		ScriptpubkeyAsm     string `json:"scriptpubkey_asm"`
		ScriptpubkeyType    string `json:"scriptpubkey_type"`
		ScriptpubkeyAddress string `json:"scriptpubkey_address"`
		Value               int    `json:"value"`
	} `json:"vout"`
	Size   int `json:"size"`
	Weight int `json:"weight"`
	Fee    int `json:"fee"`
	Status struct {
		Confirmed   bool   `json:"confirmed"`
		BlockHeight int    `json:"block_height"`
		BlockHash   string `json:"block_hash"`
		BlockTime   int    `json:"block_time"`
	} `json:"status"`
}

type InscPaymentInfo

type InscPaymentInfo struct {
	Address string `json:"address"`
	InscID  string `json:"inscID"`
}

type InscribeTxRequest

type InscribeTxRequest struct {
	// PrivateKey         string                   `json:"-"`             //buffer
	PrivateKeyStr  string                     `json:"privateString"` //buffer
	SenderAddress  string                     `json:"senderAddress"`
	Utxos          []Utxo                     `json:"utxos"`
	Inscriptions   map[string][]InscriptionT2 `json:"inscriptions"`
	Data           string                     `json:"data"`
	FeeRatePerByte int                        `json:"feeRatePerByte"`
	Network        int                        `json:"network"`
}

type InscribeTxResponse

type InscribeTxResponse struct {
	ErrorCode string `json:"errorCode"`
	Error     string `json:"error"`
	Data      *struct {
		CommitTxID    string `json:"commitTxID"`
		CommitTxHex   string `json:"commitTxHex"`
		RevealTxID    string `json:"revealTxID"`
		RevealTxHex   string `json:"revealTxHex"`
		Fee           string `json:"totalFee"`
		SelectedUTXOs []Utxo `json:"selectedUTXOs"`
		NewUTXOs      []Utxo `json:"newUTXOs"`
	} `json:"data"`
}

type InscriptionT1

type InscriptionT1 struct {
	InscID      string
	BlockHeight uint64
}

type InscriptionT2

type InscriptionT2 struct {
	Offset int64  `json:"offset"` //BigNumber
	ID     string `json:"id"`
}

type MempoolTXResp

type MempoolTXResp struct {
	Txid string `json:"txid"`
	Fee  uint64 `json:"fee"`
	Vin  []*struct {
		Prevout *struct {
			ScriptpubkeyAddress string `json:"scriptpubkey_address"`
			Value               uint64 `json:"value"`
		} `json:"prevout"`
	} `json:"vin"`
}

type MiningBlockResp

type MiningBlockResp struct {
	Id string `json:"id"`
}

type MiningPoolResp

type MiningPoolResp struct {
	PoolID       uint             `json:"poolId"`
	Name         string           `json:"name"`
	Link         string           `json:"link"`
	BlockCount   int              `json:"blockCount"`
	Rank         int              `json:"rank"`
	EmptyBlocks  int              `json:"emptyBlocks"`
	Slug         string           `json:"slug"`
	AvgMatchRate numeric.BigFloat `json:"avgMatchRate"`
	AvgFeeDelta  numeric.BigFloat `json:"avgFeeDelta"`
	PoolUniqueID uint             `json:"poolUniqueId"`
}

type OutResp

type OutResp struct {
	TxHash      string
	Index       uint
	FromAddress string
	ToAddrress  string
	Amount      uint64
}

type PaymentInfo

type PaymentInfo struct {
	Address string `json:"address"`
	Amount  string `json:"amount"`
}

type QuickNodeUTXO

type QuickNodeUTXO struct {
	Txid          string `json:"txid"`
	Vout          int    `json:"vout"`
	Value         string `json:"value"`
	Height        int    `json:"height"`
	Confirmations int    `json:"confirmations"`
}

type QuickNodeUTXO_Resp

type QuickNodeUTXO_Resp struct {
	ID      int             `json:"id"`
	Result  []QuickNodeUTXO `json:"result"`
	Jsonrpc string          `json:"jsonrpc"`
}

type RawaddrResp

type RawaddrResp struct {
	NTx uint64           `json:"n_tx"`
	Txs []*RawaddrTXResp `json:"txs"`
}

type RawaddrTXResp

type RawaddrTXResp struct {
	Hash   string `json:"hash"`
	Result int64  `json:"result"`
	Fee    uint64 `json:"fee"`
}

type TCInscription

type TCInscription struct {
	Offset int64  `json:"offset"` //BigNumber
	ID     string `json:"id"`
}

type TxRef

type TxRef struct {
	TxHash        string    `json:"tx_hash"`
	BlockHeight   int       `json:"block_height"`
	TxInputN      int       `json:"tx_input_n"`
	TxOutputN     int       `json:"tx_output_n"`
	Value         int       `json:"value"`
	RefBalance    int       `json:"ref_balance"`
	Spent         bool      `json:"spent"`
	Confirmations int       `json:"confirmations"`
	Confirmed     time.Time `json:"confirmed"`
	DoubleSpend   bool      `json:"double_spend"`
}

type UTXO

type UTXO struct {
	TxHash    string `json:"tx_hash"`
	TxOutputN int    `json:"tx_output_n"`
	Value     uint64 `json:"value"`
}

type UTXOFromBlockStream

type UTXOFromBlockStream struct {
	Txid   string `json:"txid"`
	Vout   int    `json:"vout"`
	Status struct {
		Confirmed   bool   `json:"confirmed"`
		BlockHeight int    `json:"block_height"`
		BlockHash   string `json:"block_hash"`
		BlockTime   int    `json:"block_time"`
	} `json:"status"`
	Value int `json:"value"`
}

type UTXOIns

type UTXOIns struct {
	InscID    string `json:"inscID"`
	TxHash    string `json:"tx_hash"`
	TxOutputN int    `json:"tx_output_n"`
	Value     uint64 `json:"value"`
	Offset    uint64 `json:"offset"`
}

type Utxo

type Utxo struct {
	TxHash    string `json:"tx_hash"`
	TxOutputN int64  `json:"tx_output_n"`
	Value     string `json:"value"`
}

type WalletBalance

type WalletBalance struct {
	Results []*WalletInscription `json:"results"`
}

type WalletInscription

type WalletInscription struct {
	ID     string `json:"id"`
	TxId   string `json:"tx_id"`
	Output string `json:"output"`
	Value  string `json:"value"`
	Offset string `json:"offset"`
}

Jump to

Keyboard shortcuts

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