Documentation ¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type AddressBrc20Service
- type AddressRuneGetParams
- type AddressRuneGetParamsOrder
- type AddressRuneService
- func (r *AddressRuneService) Get(ctx context.Context, address string, rune string, query AddressRuneGetParams, ...) (res *PaginatedAddressRuneUtxo, err error)
- func (r *AddressRuneService) List(ctx context.Context, address string, opts ...option.RequestOption) (res *TimestampedRuneQuantities, err error)
- type AddressService
- type AddressTxListParams
- type AddressTxListParamsOrder
- type AddressTxService
- type AddressUtxoListParams
- type AddressUtxoListParamsOrder
- type AddressUtxoService
- type AssetBrc20HolderListParams
- type AssetBrc20HolderService
- type AssetBrc20ListParams
- type AssetBrc20Service
- type AssetRuneHolderListParams
- type AssetRuneHolderService
- type AssetRuneListParams
- type AssetRuneService
- type AssetRuneUtxoListParams
- type AssetRuneUtxoListParamsOrder
- type AssetRuneUtxoService
- type AssetService
- type BlockLatestService
- type BlockService
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type Error
- type GeneralInfoService
- type GeneralService
- type PaginatedAddressRuneUtxo
- type PaginatedAddressRuneUtxoData
- type PaginatedAddressRuneUtxoLastUpdated
- type PaginatedBrc20Holder
- type PaginatedBrc20HolderData
- type PaginatedBrc20HolderLastUpdated
- type PaginatedBrc20Ticker
- type PaginatedBrc20TickerLastUpdated
- type PaginatedInvolvedTransaction
- type PaginatedInvolvedTransactionData
- type PaginatedInvolvedTransactionLastUpdated
- type PaginatedRuneHolder
- type PaginatedRuneHolderData
- type PaginatedRuneHolderLastUpdated
- type PaginatedRuneIDAndName
- type PaginatedRuneIDAndNameData
- type PaginatedRuneIDAndNameLastUpdated
- type PaginatedRuneUtxo
- type PaginatedRuneUtxoData
- type PaginatedRuneUtxoLastUpdated
- type PaginatedUtxo
- type PaginatedUtxoData
- type PaginatedUtxoDataInscription
- type PaginatedUtxoDataRune
- type PaginatedUtxoLastUpdated
- type RpcMempoolInfoService
- type RpcMempoolService
- type RpcMempoolTransactionAncestorService
- type RpcMempoolTransactionDescendantService
- type RpcMempoolTransactionService
- func (r *RpcMempoolTransactionService) Get(ctx context.Context, txHash string, opts ...option.RequestOption) (res *TimestampedMempoolTransactionDetails, err error)
- func (r *RpcMempoolTransactionService) List(ctx context.Context, opts ...option.RequestOption) (res *TimestampedMempoolTransactions, err error)
- type RpcService
- type RpcTransactionService
- type TimestampedBlock
- type TimestampedBlockData
- type TimestampedBlockDataHeader
- type TimestampedBlockDataTxdata
- type TimestampedBlockDataTxdataInput
- type TimestampedBlockDataTxdataInputPreviousOutput
- type TimestampedBlockDataTxdataOutput
- type TimestampedBlockLastUpdated
- type TimestampedBlockchainInfo
- type TimestampedBlockchainInfoData
- type TimestampedBlockchainInfoDataSoftfork
- type TimestampedBlockchainInfoDataSoftforksBip9
- type TimestampedBlockchainInfoDataSoftforksBip9Statistics
- type TimestampedBlockchainInfoDataSoftforksBip9Status
- type TimestampedBlockchainInfoDataSoftforksType
- type TimestampedBlockchainInfoLastUpdated
- type TimestampedBrc20Info
- type TimestampedBrc20InfoData
- type TimestampedBrc20InfoDataTerms
- type TimestampedBrc20InfoLastUpdated
- type TimestampedBrc20Quantities
- type TimestampedBrc20QuantitiesLastUpdated
- type TimestampedMempoolInfo
- type TimestampedMempoolInfoData
- type TimestampedMempoolInfoLastUpdated
- type TimestampedMempoolTransactionAncestors
- type TimestampedMempoolTransactionAncestorsLastUpdated
- type TimestampedMempoolTransactionDescendants
- type TimestampedMempoolTransactionDescendantsLastUpdated
- type TimestampedMempoolTransactionDetails
- type TimestampedMempoolTransactionDetailsData
- type TimestampedMempoolTransactionDetailsDataFees
- type TimestampedMempoolTransactionDetailsLastUpdated
- type TimestampedMempoolTransactions
- type TimestampedMempoolTransactionsData
- type TimestampedMempoolTransactionsLastUpdated
- type TimestampedRuneInfo
- type TimestampedRuneInfoData
- type TimestampedRuneInfoDataTerms
- type TimestampedRuneInfoLastUpdated
- type TimestampedRuneQuantities
- type TimestampedRuneQuantitiesLastUpdated
- type TimestampedTransactionDetails
- type TimestampedTransactionDetailsData
- type TimestampedTransactionDetailsDataVin
- type TimestampedTransactionDetailsDataVout
- type TimestampedTransactionDetailsDataVoutScriptPubKey
- type TimestampedTransactionDetailsLastUpdated
- type TransactionPsbtDecodeParams
- type TransactionPsbtService
- type TransactionService
- type TransactionSubmitParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type AddressBrc20Service ¶
type AddressBrc20Service struct {
Options []option.RequestOption
}
AddressBrc20Service contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAddressBrc20Service method instead.
func NewAddressBrc20Service ¶
func NewAddressBrc20Service(opts ...option.RequestOption) (r *AddressBrc20Service)
NewAddressBrc20Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AddressBrc20Service) List ¶
func (r *AddressBrc20Service) List(ctx context.Context, address string, opts ...option.RequestOption) (res *TimestampedBrc20Quantities, err error)
Map of all BRC20 assets and corresponding total and available balances controlled by the specified address or script pubkey.
type AddressRuneGetParams ¶
type AddressRuneGetParams struct { // The max number of results per page Count param.Field[int64] `query:"count"` // Pagination cursor string, use the cursor included in a page of results to fetch // the next page Cursor param.Field[string] `query:"cursor"` // Return only UTxOs created on or after a specific height From param.Field[int64] `query:"from"` // The order in which the results are sorted (by height at which UTxO was produced) Order param.Field[AddressRuneGetParamsOrder] `query:"order"` // Return only UTxOs created on or before a specific height To param.Field[int64] `query:"to"` }
func (AddressRuneGetParams) URLQuery ¶
func (r AddressRuneGetParams) URLQuery() (v url.Values)
URLQuery serializes AddressRuneGetParams's query parameters as `url.Values`.
type AddressRuneGetParamsOrder ¶
type AddressRuneGetParamsOrder string
The order in which the results are sorted (by height at which UTxO was produced)
const ( AddressRuneGetParamsOrderAsc AddressRuneGetParamsOrder = "asc" AddressRuneGetParamsOrderDesc AddressRuneGetParamsOrder = "desc" )
func (AddressRuneGetParamsOrder) IsKnown ¶
func (r AddressRuneGetParamsOrder) IsKnown() bool
type AddressRuneService ¶
type AddressRuneService struct {
Options []option.RequestOption
}
AddressRuneService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAddressRuneService method instead.
func NewAddressRuneService ¶
func NewAddressRuneService(opts ...option.RequestOption) (r *AddressRuneService)
NewAddressRuneService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AddressRuneService) Get ¶
func (r *AddressRuneService) Get(ctx context.Context, address string, rune string, query AddressRuneGetParams, opts ...option.RequestOption) (res *PaginatedAddressRuneUtxo, err error)
Return all UTxOs controlled by the specified address or script pubkey which contain some of a specific kind of rune.
func (*AddressRuneService) List ¶
func (r *AddressRuneService) List(ctx context.Context, address string, opts ...option.RequestOption) (res *TimestampedRuneQuantities, err error)
Map of all Runes tokens and corresponding amounts in UTxOs controlled by the specified address or script pubkey.
type AddressService ¶
type AddressService struct { Options []option.RequestOption Brc20 *AddressBrc20Service Runes *AddressRuneService Txs *AddressTxService Utxos *AddressUtxoService }
AddressService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAddressService method instead.
func NewAddressService ¶
func NewAddressService(opts ...option.RequestOption) (r *AddressService)
NewAddressService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type AddressTxListParams ¶
type AddressTxListParams struct { // The max number of results per page Count param.Field[int64] `query:"count"` // Pagination cursor string, use the cursor included in a page of results to fetch // the next page Cursor param.Field[string] `query:"cursor"` // Return only transactions included on or after a specific height From param.Field[int64] `query:"from"` // The order in which the results are sorted (by height at which transaction was // included in a block) Order param.Field[AddressTxListParamsOrder] `query:"order"` // Return only transactions included on or before a specific height To param.Field[int64] `query:"to"` }
func (AddressTxListParams) URLQuery ¶
func (r AddressTxListParams) URLQuery() (v url.Values)
URLQuery serializes AddressTxListParams's query parameters as `url.Values`.
type AddressTxListParamsOrder ¶
type AddressTxListParamsOrder string
The order in which the results are sorted (by height at which transaction was included in a block)
const ( AddressTxListParamsOrderAsc AddressTxListParamsOrder = "asc" AddressTxListParamsOrderDesc AddressTxListParamsOrder = "desc" )
func (AddressTxListParamsOrder) IsKnown ¶
func (r AddressTxListParamsOrder) IsKnown() bool
type AddressTxService ¶
type AddressTxService struct {
Options []option.RequestOption
}
AddressTxService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAddressTxService method instead.
func NewAddressTxService ¶
func NewAddressTxService(opts ...option.RequestOption) (r *AddressTxService)
NewAddressTxService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AddressTxService) List ¶
func (r *AddressTxService) List(ctx context.Context, address string, query AddressTxListParams, opts ...option.RequestOption) (res *PaginatedInvolvedTransaction, err error)
List of all transactions which consumed or produced a UTxO controlled by the specified address or script pubkey.
type AddressUtxoListParams ¶
type AddressUtxoListParams struct { // The max number of results per page Count param.Field[int64] `query:"count"` // Pagination cursor string, use the cursor included in a page of results to fetch // the next page Cursor param.Field[string] `query:"cursor"` // Exclude UTxOs involved in metaprotocols (currently only runes and inscriptions // will be discovered, more metaprotocols may be supported in future) ExcludeMetaprotocols param.Field[bool] `query:"exclude_metaprotocols"` // Ignore UTxOs containing less than 100000 sats FilterDust param.Field[bool] `query:"filter_dust"` // Ignore UTxOs containing less than specified satoshis FilterDustThreshold param.Field[int64] `query:"filter_dust_threshold"` // Return only UTxOs created on or after a specific height From param.Field[int64] `query:"from"` // The order in which the results are sorted (by height at which UTxO was produced) Order param.Field[AddressUtxoListParamsOrder] `query:"order"` // Return only UTxOs created on or before a specific height To param.Field[int64] `query:"to"` }
func (AddressUtxoListParams) URLQuery ¶
func (r AddressUtxoListParams) URLQuery() (v url.Values)
URLQuery serializes AddressUtxoListParams's query parameters as `url.Values`.
type AddressUtxoListParamsOrder ¶
type AddressUtxoListParamsOrder string
The order in which the results are sorted (by height at which UTxO was produced)
const ( AddressUtxoListParamsOrderAsc AddressUtxoListParamsOrder = "asc" AddressUtxoListParamsOrderDesc AddressUtxoListParamsOrder = "desc" )
func (AddressUtxoListParamsOrder) IsKnown ¶
func (r AddressUtxoListParamsOrder) IsKnown() bool
type AddressUtxoService ¶
type AddressUtxoService struct {
Options []option.RequestOption
}
AddressUtxoService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAddressUtxoService method instead.
func NewAddressUtxoService ¶
func NewAddressUtxoService(opts ...option.RequestOption) (r *AddressUtxoService)
NewAddressUtxoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AddressUtxoService) List ¶
func (r *AddressUtxoService) List(ctx context.Context, address string, query AddressUtxoListParams, opts ...option.RequestOption) (res *PaginatedUtxo, err error)
List of all UTxOs which reside at the specified address or script pubkey.
type AssetBrc20HolderListParams ¶
type AssetBrc20HolderListParams struct { // The max number of results per page Count param.Field[int64] `query:"count"` // Pagination cursor string, use the cursor included in a page of results to fetch // the next page Cursor param.Field[string] `query:"cursor"` }
func (AssetBrc20HolderListParams) URLQuery ¶
func (r AssetBrc20HolderListParams) URLQuery() (v url.Values)
URLQuery serializes AssetBrc20HolderListParams's query parameters as `url.Values`.
type AssetBrc20HolderService ¶
type AssetBrc20HolderService struct {
Options []option.RequestOption
}
AssetBrc20HolderService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetBrc20HolderService method instead.
func NewAssetBrc20HolderService ¶
func NewAssetBrc20HolderService(opts ...option.RequestOption) (r *AssetBrc20HolderService)
NewAssetBrc20HolderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssetBrc20HolderService) List ¶
func (r *AssetBrc20HolderService) List(ctx context.Context, ticker string, query AssetBrc20HolderListParams, opts ...option.RequestOption) (res *PaginatedBrc20Holder, err error)
Script pubkeys or addresses that hold the specified BRC20 asset and corresponding total balances.
type AssetBrc20ListParams ¶
type AssetBrc20ListParams struct { // The max number of results per page Count param.Field[int64] `query:"count"` // Pagination cursor string, use the cursor included in a page of results to fetch // the next page Cursor param.Field[string] `query:"cursor"` }
func (AssetBrc20ListParams) URLQuery ¶
func (r AssetBrc20ListParams) URLQuery() (v url.Values)
URLQuery serializes AssetBrc20ListParams's query parameters as `url.Values`.
type AssetBrc20Service ¶
type AssetBrc20Service struct { Options []option.RequestOption Holders *AssetBrc20HolderService }
AssetBrc20Service contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetBrc20Service method instead.
func NewAssetBrc20Service ¶
func NewAssetBrc20Service(opts ...option.RequestOption) (r *AssetBrc20Service)
NewAssetBrc20Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssetBrc20Service) Get ¶
func (r *AssetBrc20Service) Get(ctx context.Context, ticker string, opts ...option.RequestOption) (res *TimestampedBrc20Info, err error)
Information about the specified BRC20 asset.
func (*AssetBrc20Service) List ¶
func (r *AssetBrc20Service) List(ctx context.Context, query AssetBrc20ListParams, opts ...option.RequestOption) (res *PaginatedBrc20Ticker, err error)
List of tickers of all deployed BRC20 assets.
type AssetRuneHolderListParams ¶
type AssetRuneHolderListParams struct { // The max number of results per page Count param.Field[int64] `query:"count"` // Pagination cursor string, use the cursor included in a page of results to fetch // the next page Cursor param.Field[string] `query:"cursor"` }
func (AssetRuneHolderListParams) URLQuery ¶
func (r AssetRuneHolderListParams) URLQuery() (v url.Values)
URLQuery serializes AssetRuneHolderListParams's query parameters as `url.Values`.
type AssetRuneHolderService ¶
type AssetRuneHolderService struct {
Options []option.RequestOption
}
AssetRuneHolderService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetRuneHolderService method instead.
func NewAssetRuneHolderService ¶
func NewAssetRuneHolderService(opts ...option.RequestOption) (r *AssetRuneHolderService)
NewAssetRuneHolderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssetRuneHolderService) List ¶
func (r *AssetRuneHolderService) List(ctx context.Context, rune string, query AssetRuneHolderListParams, opts ...option.RequestOption) (res *PaginatedRuneHolder, err error)
List of all addresses that hold the specified Rune, together with the respective amount of that rune.
type AssetRuneListParams ¶
type AssetRuneListParams struct { // The max number of results per page Count param.Field[int64] `query:"count"` // Pagination cursor string, use the cursor included in a page of results to fetch // the next page Cursor param.Field[string] `query:"cursor"` }
func (AssetRuneListParams) URLQuery ¶
func (r AssetRuneListParams) URLQuery() (v url.Values)
URLQuery serializes AssetRuneListParams's query parameters as `url.Values`.
type AssetRuneService ¶
type AssetRuneService struct { Options []option.RequestOption Holders *AssetRuneHolderService Utxos *AssetRuneUtxoService }
AssetRuneService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetRuneService method instead.
func NewAssetRuneService ¶
func NewAssetRuneService(opts ...option.RequestOption) (r *AssetRuneService)
NewAssetRuneService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssetRuneService) Get ¶
func (r *AssetRuneService) Get(ctx context.Context, rune string, opts ...option.RequestOption) (res *TimestampedRuneInfo, err error)
Information about the specified Rune, including etching, current supply and number of holders.
func (*AssetRuneService) List ¶
func (r *AssetRuneService) List(ctx context.Context, query AssetRuneListParams, opts ...option.RequestOption) (res *PaginatedRuneIDAndName, err error)
List of ID and names of all deployed Rune assets.
type AssetRuneUtxoListParams ¶
type AssetRuneUtxoListParams struct { // The max number of results per page Count param.Field[int64] `query:"count"` // Pagination cursor string, use the cursor included in a page of results to fetch // the next page Cursor param.Field[string] `query:"cursor"` // Return only UTxOs created on or after a specific height From param.Field[int64] `query:"from"` // The order in which the results are sorted (by height at which UTxO was produced) Order param.Field[AssetRuneUtxoListParamsOrder] `query:"order"` // Return only UTxOs created on or before a specific height To param.Field[int64] `query:"to"` }
func (AssetRuneUtxoListParams) URLQuery ¶
func (r AssetRuneUtxoListParams) URLQuery() (v url.Values)
URLQuery serializes AssetRuneUtxoListParams's query parameters as `url.Values`.
type AssetRuneUtxoListParamsOrder ¶
type AssetRuneUtxoListParamsOrder string
The order in which the results are sorted (by height at which UTxO was produced)
const ( AssetRuneUtxoListParamsOrderAsc AssetRuneUtxoListParamsOrder = "asc" AssetRuneUtxoListParamsOrderDesc AssetRuneUtxoListParamsOrder = "desc" )
func (AssetRuneUtxoListParamsOrder) IsKnown ¶
func (r AssetRuneUtxoListParamsOrder) IsKnown() bool
type AssetRuneUtxoService ¶
type AssetRuneUtxoService struct {
Options []option.RequestOption
}
AssetRuneUtxoService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetRuneUtxoService method instead.
func NewAssetRuneUtxoService ¶
func NewAssetRuneUtxoService(opts ...option.RequestOption) (r *AssetRuneUtxoService)
NewAssetRuneUtxoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssetRuneUtxoService) List ¶
func (r *AssetRuneUtxoService) List(ctx context.Context, rune string, query AssetRuneUtxoListParams, opts ...option.RequestOption) (res *PaginatedRuneUtxo, err error)
List of all UTxOs which contain the specified Rune.
type AssetService ¶
type AssetService struct { Options []option.RequestOption Brc20 *AssetBrc20Service Runes *AssetRuneService }
AssetService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetService method instead.
func NewAssetService ¶
func NewAssetService(opts ...option.RequestOption) (r *AssetService)
NewAssetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type BlockLatestService ¶
type BlockLatestService struct {
Options []option.RequestOption
}
BlockLatestService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockLatestService method instead.
func NewBlockLatestService ¶
func NewBlockLatestService(opts ...option.RequestOption) (r *BlockLatestService)
NewBlockLatestService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockLatestService) Get ¶
func (r *BlockLatestService) Get(ctx context.Context, opts ...option.RequestOption) (res *TimestampedBlock, err error)
Information about the latest block on the chain.
type BlockService ¶
type BlockService struct { Options []option.RequestOption Latest *BlockLatestService }
BlockService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBlockService method instead.
func NewBlockService ¶
func NewBlockService(opts ...option.RequestOption) (r *BlockService)
NewBlockService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BlockService) Get ¶
func (r *BlockService) Get(ctx context.Context, blockHash string, opts ...option.RequestOption) (res *TimestampedBlock, err error)
Provides detailed information about a specific block by hash.
type Client ¶
type Client struct { Options []option.RequestOption Addresses *AddressService Assets *AssetService Blocks *BlockService General *GeneralService Rpc *RpcService RpcTransactions *RpcTransactionService Transactions *TransactionService }
Client creates a struct with services and top level methods that help with interacting with the maestro API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (API_KEY). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type GeneralInfoService ¶
type GeneralInfoService struct {
Options []option.RequestOption
}
GeneralInfoService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeneralInfoService method instead.
func NewGeneralInfoService ¶
func NewGeneralInfoService(opts ...option.RequestOption) (r *GeneralInfoService)
NewGeneralInfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeneralInfoService) Get ¶
func (r *GeneralInfoService) Get(ctx context.Context, opts ...option.RequestOption) (res *TimestampedBlockchainInfo, err error)
Information about the state of the blockchain.
type GeneralService ¶
type GeneralService struct { Options []option.RequestOption Info *GeneralInfoService }
GeneralService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeneralService method instead.
func NewGeneralService ¶
func NewGeneralService(opts ...option.RequestOption) (r *GeneralService)
NewGeneralService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type PaginatedAddressRuneUtxo ¶
type PaginatedAddressRuneUtxo struct { Data []PaginatedAddressRuneUtxoData `json:"data,required"` LastUpdated PaginatedAddressRuneUtxoLastUpdated `json:"last_updated,required"` NextCursor string `json:"next_cursor,nullable"` JSON paginatedAddressRuneUtxoJSON `json:"-"` }
func (*PaginatedAddressRuneUtxo) UnmarshalJSON ¶
func (r *PaginatedAddressRuneUtxo) UnmarshalJSON(data []byte) (err error)
type PaginatedAddressRuneUtxoData ¶
type PaginatedAddressRuneUtxoData struct { Confirmations int64 `json:"confirmations,required"` Height int64 `json:"height,required"` RuneAmount string `json:"rune_amount,required"` Satoshis string `json:"satoshis,required"` Txid string `json:"txid,required"` Vout int64 `json:"vout,required"` JSON paginatedAddressRuneUtxoDataJSON `json:"-"` }
func (*PaginatedAddressRuneUtxoData) UnmarshalJSON ¶
func (r *PaginatedAddressRuneUtxoData) UnmarshalJSON(data []byte) (err error)
type PaginatedAddressRuneUtxoLastUpdated ¶
type PaginatedAddressRuneUtxoLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON paginatedAddressRuneUtxoLastUpdatedJSON `json:"-"` }
func (*PaginatedAddressRuneUtxoLastUpdated) UnmarshalJSON ¶
func (r *PaginatedAddressRuneUtxoLastUpdated) UnmarshalJSON(data []byte) (err error)
type PaginatedBrc20Holder ¶
type PaginatedBrc20Holder struct { Data []PaginatedBrc20HolderData `json:"data,required"` LastUpdated PaginatedBrc20HolderLastUpdated `json:"last_updated,required"` NextCursor string `json:"next_cursor,nullable"` JSON paginatedBrc20HolderJSON `json:"-"` }
func (*PaginatedBrc20Holder) UnmarshalJSON ¶
func (r *PaginatedBrc20Holder) UnmarshalJSON(data []byte) (err error)
type PaginatedBrc20HolderData ¶
type PaginatedBrc20HolderData struct { Balance string `json:"balance,required"` ScriptPubkey string `json:"script_pubkey,required"` Address string `json:"address,nullable"` JSON paginatedBrc20HolderDataJSON `json:"-"` }
func (*PaginatedBrc20HolderData) UnmarshalJSON ¶
func (r *PaginatedBrc20HolderData) UnmarshalJSON(data []byte) (err error)
type PaginatedBrc20HolderLastUpdated ¶
type PaginatedBrc20HolderLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON paginatedBrc20HolderLastUpdatedJSON `json:"-"` }
func (*PaginatedBrc20HolderLastUpdated) UnmarshalJSON ¶
func (r *PaginatedBrc20HolderLastUpdated) UnmarshalJSON(data []byte) (err error)
type PaginatedBrc20Ticker ¶
type PaginatedBrc20Ticker struct { Data []string `json:"data,required"` LastUpdated PaginatedBrc20TickerLastUpdated `json:"last_updated,required"` NextCursor string `json:"next_cursor,nullable"` JSON paginatedBrc20TickerJSON `json:"-"` }
func (*PaginatedBrc20Ticker) UnmarshalJSON ¶
func (r *PaginatedBrc20Ticker) UnmarshalJSON(data []byte) (err error)
type PaginatedBrc20TickerLastUpdated ¶
type PaginatedBrc20TickerLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON paginatedBrc20TickerLastUpdatedJSON `json:"-"` }
func (*PaginatedBrc20TickerLastUpdated) UnmarshalJSON ¶
func (r *PaginatedBrc20TickerLastUpdated) UnmarshalJSON(data []byte) (err error)
type PaginatedInvolvedTransaction ¶
type PaginatedInvolvedTransaction struct { Data []PaginatedInvolvedTransactionData `json:"data,required"` LastUpdated PaginatedInvolvedTransactionLastUpdated `json:"last_updated,required"` NextCursor string `json:"next_cursor,nullable"` JSON paginatedInvolvedTransactionJSON `json:"-"` }
func (*PaginatedInvolvedTransaction) UnmarshalJSON ¶
func (r *PaginatedInvolvedTransaction) UnmarshalJSON(data []byte) (err error)
type PaginatedInvolvedTransactionData ¶
type PaginatedInvolvedTransactionData struct { // Height of the block which included the transaction Height int64 `json:"height,required"` // Address/pubkey controlled an input UTxO Input bool `json:"input,required"` // Address/pubkey controlled an output UTxO Output bool `json:"output,required"` // The transaction's txid TxHash string `json:"tx_hash,required"` JSON paginatedInvolvedTransactionDataJSON `json:"-"` }
func (*PaginatedInvolvedTransactionData) UnmarshalJSON ¶
func (r *PaginatedInvolvedTransactionData) UnmarshalJSON(data []byte) (err error)
type PaginatedInvolvedTransactionLastUpdated ¶
type PaginatedInvolvedTransactionLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON paginatedInvolvedTransactionLastUpdatedJSON `json:"-"` }
func (*PaginatedInvolvedTransactionLastUpdated) UnmarshalJSON ¶
func (r *PaginatedInvolvedTransactionLastUpdated) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneHolder ¶
type PaginatedRuneHolder struct { Data []PaginatedRuneHolderData `json:"data,required"` LastUpdated PaginatedRuneHolderLastUpdated `json:"last_updated,required"` NextCursor string `json:"next_cursor,nullable"` JSON paginatedRuneHolderJSON `json:"-"` }
func (*PaginatedRuneHolder) UnmarshalJSON ¶
func (r *PaginatedRuneHolder) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneHolderData ¶
type PaginatedRuneHolderData struct { Balance string `json:"balance,required"` ScriptPubkey string `json:"script_pubkey,required"` Address string `json:"address,nullable"` JSON paginatedRuneHolderDataJSON `json:"-"` }
func (*PaginatedRuneHolderData) UnmarshalJSON ¶
func (r *PaginatedRuneHolderData) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneHolderLastUpdated ¶
type PaginatedRuneHolderLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON paginatedRuneHolderLastUpdatedJSON `json:"-"` }
func (*PaginatedRuneHolderLastUpdated) UnmarshalJSON ¶
func (r *PaginatedRuneHolderLastUpdated) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneIDAndName ¶
type PaginatedRuneIDAndName struct { Data []PaginatedRuneIDAndNameData `json:"data,required"` LastUpdated PaginatedRuneIDAndNameLastUpdated `json:"last_updated,required"` NextCursor string `json:"next_cursor,nullable"` JSON paginatedRuneIDAndNameJSON `json:"-"` }
func (*PaginatedRuneIDAndName) UnmarshalJSON ¶
func (r *PaginatedRuneIDAndName) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneIDAndNameData ¶
type PaginatedRuneIDAndNameData struct { ID string `json:"id,required"` SpacedName string `json:"spaced_name,required"` JSON paginatedRuneIDAndNameDataJSON `json:"-"` }
func (*PaginatedRuneIDAndNameData) UnmarshalJSON ¶
func (r *PaginatedRuneIDAndNameData) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneIDAndNameLastUpdated ¶
type PaginatedRuneIDAndNameLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON paginatedRuneIDAndNameLastUpdatedJSON `json:"-"` }
func (*PaginatedRuneIDAndNameLastUpdated) UnmarshalJSON ¶
func (r *PaginatedRuneIDAndNameLastUpdated) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneUtxo ¶
type PaginatedRuneUtxo struct { Data []PaginatedRuneUtxoData `json:"data,required"` LastUpdated PaginatedRuneUtxoLastUpdated `json:"last_updated,required"` NextCursor string `json:"next_cursor,nullable"` JSON paginatedRuneUtxoJSON `json:"-"` }
func (*PaginatedRuneUtxo) UnmarshalJSON ¶
func (r *PaginatedRuneUtxo) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneUtxoData ¶
type PaginatedRuneUtxoData struct { Confirmations int64 `json:"confirmations,required"` Height int64 `json:"height,required"` RuneAmount string `json:"rune_amount,required"` Satoshis string `json:"satoshis,required"` ScriptPubkey string `json:"script_pubkey,required"` Txid string `json:"txid,required"` Vout int64 `json:"vout,required"` Address string `json:"address,nullable"` JSON paginatedRuneUtxoDataJSON `json:"-"` }
func (*PaginatedRuneUtxoData) UnmarshalJSON ¶
func (r *PaginatedRuneUtxoData) UnmarshalJSON(data []byte) (err error)
type PaginatedRuneUtxoLastUpdated ¶
type PaginatedRuneUtxoLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON paginatedRuneUtxoLastUpdatedJSON `json:"-"` }
func (*PaginatedRuneUtxoLastUpdated) UnmarshalJSON ¶
func (r *PaginatedRuneUtxoLastUpdated) UnmarshalJSON(data []byte) (err error)
type PaginatedUtxo ¶
type PaginatedUtxo struct { Data []PaginatedUtxoData `json:"data,required"` LastUpdated PaginatedUtxoLastUpdated `json:"last_updated,required"` NextCursor string `json:"next_cursor,nullable"` JSON paginatedUtxoJSON `json:"-"` }
func (*PaginatedUtxo) UnmarshalJSON ¶
func (r *PaginatedUtxo) UnmarshalJSON(data []byte) (err error)
type PaginatedUtxoData ¶
type PaginatedUtxoData struct { Confirmations int64 `json:"confirmations,required"` Height int64 `json:"height,required"` Inscriptions []PaginatedUtxoDataInscription `json:"inscriptions,required"` Runes []PaginatedUtxoDataRune `json:"runes,required"` Satoshis string `json:"satoshis,required"` ScriptPubkey string `json:"script_pubkey,required"` Txid string `json:"txid,required"` Vout int64 `json:"vout,required"` Address string `json:"address,nullable"` JSON paginatedUtxoDataJSON `json:"-"` }
func (*PaginatedUtxoData) UnmarshalJSON ¶
func (r *PaginatedUtxoData) UnmarshalJSON(data []byte) (err error)
type PaginatedUtxoDataInscription ¶
type PaginatedUtxoDataInscription struct { InscriptionID string `json:"inscription_id,required"` Offset int64 `json:"offset,required"` JSON paginatedUtxoDataInscriptionJSON `json:"-"` }
func (*PaginatedUtxoDataInscription) UnmarshalJSON ¶
func (r *PaginatedUtxoDataInscription) UnmarshalJSON(data []byte) (err error)
type PaginatedUtxoDataRune ¶
type PaginatedUtxoDataRune struct { Amount string `json:"amount,required"` RuneID string `json:"rune_id,required"` JSON paginatedUtxoDataRuneJSON `json:"-"` }
func (*PaginatedUtxoDataRune) UnmarshalJSON ¶
func (r *PaginatedUtxoDataRune) UnmarshalJSON(data []byte) (err error)
type PaginatedUtxoLastUpdated ¶
type PaginatedUtxoLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON paginatedUtxoLastUpdatedJSON `json:"-"` }
func (*PaginatedUtxoLastUpdated) UnmarshalJSON ¶
func (r *PaginatedUtxoLastUpdated) UnmarshalJSON(data []byte) (err error)
type RpcMempoolInfoService ¶
type RpcMempoolInfoService struct {
Options []option.RequestOption
}
RpcMempoolInfoService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRpcMempoolInfoService method instead.
func NewRpcMempoolInfoService ¶
func NewRpcMempoolInfoService(opts ...option.RequestOption) (r *RpcMempoolInfoService)
NewRpcMempoolInfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RpcMempoolInfoService) Get ¶
func (r *RpcMempoolInfoService) Get(ctx context.Context, opts ...option.RequestOption) (res *TimestampedMempoolInfo, err error)
Mempool Info
type RpcMempoolService ¶
type RpcMempoolService struct { Options []option.RequestOption Info *RpcMempoolInfoService Transactions *RpcMempoolTransactionService }
RpcMempoolService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRpcMempoolService method instead.
func NewRpcMempoolService ¶
func NewRpcMempoolService(opts ...option.RequestOption) (r *RpcMempoolService)
NewRpcMempoolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type RpcMempoolTransactionAncestorService ¶
type RpcMempoolTransactionAncestorService struct {
Options []option.RequestOption
}
RpcMempoolTransactionAncestorService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRpcMempoolTransactionAncestorService method instead.
func NewRpcMempoolTransactionAncestorService ¶
func NewRpcMempoolTransactionAncestorService(opts ...option.RequestOption) (r *RpcMempoolTransactionAncestorService)
NewRpcMempoolTransactionAncestorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RpcMempoolTransactionAncestorService) List ¶
func (r *RpcMempoolTransactionAncestorService) List(ctx context.Context, txHash string, opts ...option.RequestOption) (res *TimestampedMempoolTransactionAncestors, err error)
List Mempool Transaction Ancestors
type RpcMempoolTransactionDescendantService ¶
type RpcMempoolTransactionDescendantService struct {
Options []option.RequestOption
}
RpcMempoolTransactionDescendantService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRpcMempoolTransactionDescendantService method instead.
func NewRpcMempoolTransactionDescendantService ¶
func NewRpcMempoolTransactionDescendantService(opts ...option.RequestOption) (r *RpcMempoolTransactionDescendantService)
NewRpcMempoolTransactionDescendantService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RpcMempoolTransactionDescendantService) List ¶
func (r *RpcMempoolTransactionDescendantService) List(ctx context.Context, txHash string, opts ...option.RequestOption) (res *TimestampedMempoolTransactionDescendants, err error)
List Mempool Transaction Descendants
type RpcMempoolTransactionService ¶
type RpcMempoolTransactionService struct { Options []option.RequestOption Ancestors *RpcMempoolTransactionAncestorService Descendants *RpcMempoolTransactionDescendantService }
RpcMempoolTransactionService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRpcMempoolTransactionService method instead.
func NewRpcMempoolTransactionService ¶
func NewRpcMempoolTransactionService(opts ...option.RequestOption) (r *RpcMempoolTransactionService)
NewRpcMempoolTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RpcMempoolTransactionService) Get ¶
func (r *RpcMempoolTransactionService) Get(ctx context.Context, txHash string, opts ...option.RequestOption) (res *TimestampedMempoolTransactionDetails, err error)
Mempool Transaction Details
func (*RpcMempoolTransactionService) List ¶
func (r *RpcMempoolTransactionService) List(ctx context.Context, opts ...option.RequestOption) (res *TimestampedMempoolTransactions, err error)
List Mempool Transactions
type RpcService ¶
type RpcService struct { Options []option.RequestOption Mempool *RpcMempoolService }
RpcService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRpcService method instead.
func NewRpcService ¶
func NewRpcService(opts ...option.RequestOption) (r *RpcService)
NewRpcService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type RpcTransactionService ¶
type RpcTransactionService struct {
Options []option.RequestOption
}
RpcTransactionService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRpcTransactionService method instead.
func NewRpcTransactionService ¶
func NewRpcTransactionService(opts ...option.RequestOption) (r *RpcTransactionService)
NewRpcTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RpcTransactionService) Get ¶
func (r *RpcTransactionService) Get(ctx context.Context, txHash string, opts ...option.RequestOption) (res *TimestampedTransactionDetails, err error)
Transaction Details
type TimestampedBlock ¶
type TimestampedBlock struct { Data TimestampedBlockData `json:"data,required"` LastUpdated TimestampedBlockLastUpdated `json:"last_updated,required"` JSON timestampedBlockJSON `json:"-"` }
func (*TimestampedBlock) UnmarshalJSON ¶
func (r *TimestampedBlock) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockData ¶
type TimestampedBlockData struct { Header TimestampedBlockDataHeader `json:"header,required"` // List of transactions contained in the block Txdata []TimestampedBlockDataTxdata `json:"txdata,required"` JSON timestampedBlockDataJSON `json:"-"` }
func (*TimestampedBlockData) UnmarshalJSON ¶
func (r *TimestampedBlockData) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockDataHeader ¶
type TimestampedBlockDataHeader struct { // The target value below which the blockhash must lie, encoded as a a float (with // well-defined rounding, of course) Bits int64 `json:"bits,required"` // The root hash of the merkle tree of transactions in the block MerkleRoot io.Reader `json:"merkle_root,required" format:"binary"` // The nonce, selected to obtain a low enough blockhash Nonce int64 `json:"nonce,required"` // Reference to the previous block in the chain PrevBlockhash io.Reader `json:"prev_blockhash,required" format:"binary"` // The timestamp of the block, as claimed by the miner Time int64 `json:"time,required"` // The protocol version. Should always be 1. Version int64 `json:"version,required"` JSON timestampedBlockDataHeaderJSON `json:"-"` }
func (*TimestampedBlockDataHeader) UnmarshalJSON ¶
func (r *TimestampedBlockDataHeader) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockDataTxdata ¶
type TimestampedBlockDataTxdata struct { // List of inputs Input []TimestampedBlockDataTxdataInput `json:"input,required"` // Block number before which this transaction is valid, or 0 for valid immediately. LockTime int64 `json:"lock_time,required"` // List of outputs Output []TimestampedBlockDataTxdataOutput `json:"output,required"` // The protocol version, is currently expected to be 1 or 2 (BIP 68). Version int64 `json:"version,required"` JSON timestampedBlockDataTxdataJSON `json:"-"` }
func (*TimestampedBlockDataTxdata) UnmarshalJSON ¶
func (r *TimestampedBlockDataTxdata) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockDataTxdataInput ¶
type TimestampedBlockDataTxdataInput struct { PreviousOutput TimestampedBlockDataTxdataInputPreviousOutput `json:"previous_output,required"` ScriptSig io.Reader `json:"script_sig,required" format:"binary"` // The sequence number, which suggests to miners which of two conflicting // transactions should be preferred, or 0xFFFFFFFF to ignore this feature. This is // generally never used since the miner behaviour cannot be enforced. Sequence int64 `json:"sequence,required"` // Witness data: an array of byte-arrays. Note that this field is _not_ // (de)serialized with the rest of the TxIn in Encodable/Decodable, as it is // (de)serialized at the end of the full Transaction. It _is_ (de)serialized with // the rest of the TxIn in other (de)serialization routines. Witness []io.Reader `json:"witness,required" format:"binary"` JSON timestampedBlockDataTxdataInputJSON `json:"-"` }
func (*TimestampedBlockDataTxdataInput) UnmarshalJSON ¶
func (r *TimestampedBlockDataTxdataInput) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockDataTxdataInputPreviousOutput ¶
type TimestampedBlockDataTxdataInputPreviousOutput struct { Txid string `json:"txid,required"` // The index of the referenced output in its transaction's vout Vout int64 `json:"vout,required"` JSON timestampedBlockDataTxdataInputPreviousOutputJSON `json:"-"` }
func (*TimestampedBlockDataTxdataInputPreviousOutput) UnmarshalJSON ¶
func (r *TimestampedBlockDataTxdataInputPreviousOutput) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockDataTxdataOutput ¶
type TimestampedBlockDataTxdataOutput struct { ScriptPubkey io.Reader `json:"script_pubkey,required" format:"binary"` // The value of the output, in satoshis Value int64 `json:"value,required"` JSON timestampedBlockDataTxdataOutputJSON `json:"-"` }
func (*TimestampedBlockDataTxdataOutput) UnmarshalJSON ¶
func (r *TimestampedBlockDataTxdataOutput) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockLastUpdated ¶
type TimestampedBlockLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedBlockLastUpdatedJSON `json:"-"` }
func (*TimestampedBlockLastUpdated) UnmarshalJSON ¶
func (r *TimestampedBlockLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockchainInfo ¶
type TimestampedBlockchainInfo struct { Data TimestampedBlockchainInfoData `json:"data,required"` LastUpdated TimestampedBlockchainInfoLastUpdated `json:"last_updated,required"` JSON timestampedBlockchainInfoJSON `json:"-"` }
func (*TimestampedBlockchainInfo) UnmarshalJSON ¶
func (r *TimestampedBlockchainInfo) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockchainInfoData ¶
type TimestampedBlockchainInfoData struct { // The hash of the currently best block Bestblockhash string `json:"bestblockhash,required"` // The current number of blocks processed in the server Blocks int64 `json:"blocks,required"` // Current network name as defined in BIP70 (main, test, regtest) Chain string `json:"chain,required"` // Total amount of work in active chain, in hexadecimal Chainwork string `json:"chainwork,required"` // The current difficulty Difficulty float64 `json:"difficulty,required"` // The current number of headers we have validated Headers int64 `json:"headers,required"` // Estimate of whether this node is in Initial Block Download mode Initialblockdownload bool `json:"initialblockdownload,required"` // Median time for the current best block Mediantime int64 `json:"mediantime,required"` // If the blocks are subject to pruning Pruned bool `json:"pruned,required"` // The estimated size of the block and undo files on disk SizeOnDisk int64 `json:"size_on_disk,required"` // Status of softforks in progress Softforks map[string]TimestampedBlockchainInfoDataSoftfork `json:"softforks,required"` // Estimate of verification progress [0..1] Verificationprogress float64 `json:"verificationprogress,required"` // Any network and blockchain warnings. Warnings string `json:"warnings,required"` // Whether automatic pruning is enabled (only present if pruning is enabled) AutomaticPruning bool `json:"automatic_pruning,nullable"` // Lowest-height complete block stored (only present if pruning is enabled) PruneHeight int64 `json:"prune_height,nullable"` // The target size used by pruning (only present if automatic pruning is enabled) PruneTargetSize int64 `json:"prune_target_size,nullable"` JSON timestampedBlockchainInfoDataJSON `json:"-"` }
func (*TimestampedBlockchainInfoData) UnmarshalJSON ¶
func (r *TimestampedBlockchainInfoData) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockchainInfoDataSoftfork ¶
type TimestampedBlockchainInfoDataSoftfork struct { Active bool `json:"active"` Bip9 TimestampedBlockchainInfoDataSoftforksBip9 `json:"bip9,nullable"` Height int64 `json:"height,nullable"` Type TimestampedBlockchainInfoDataSoftforksType `json:"type,nullable"` JSON timestampedBlockchainInfoDataSoftforkJSON `json:"-"` }
func (*TimestampedBlockchainInfoDataSoftfork) UnmarshalJSON ¶
func (r *TimestampedBlockchainInfoDataSoftfork) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockchainInfoDataSoftforksBip9 ¶
type TimestampedBlockchainInfoDataSoftforksBip9 struct { Since int64 `json:"since,required"` StartTime int64 `json:"start_time,required"` Status TimestampedBlockchainInfoDataSoftforksBip9Status `json:"status,required"` Timeout int64 `json:"timeout,required"` Bit int64 `json:"bit,nullable"` Statistics TimestampedBlockchainInfoDataSoftforksBip9Statistics `json:"statistics,nullable"` JSON timestampedBlockchainInfoDataSoftforksBip9JSON `json:"-"` }
func (*TimestampedBlockchainInfoDataSoftforksBip9) UnmarshalJSON ¶
func (r *TimestampedBlockchainInfoDataSoftforksBip9) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockchainInfoDataSoftforksBip9Statistics ¶
type TimestampedBlockchainInfoDataSoftforksBip9Statistics struct { Count int64 `json:"count,required"` Elapsed int64 `json:"elapsed,required"` Period int64 `json:"period,required"` Possible bool `json:"possible,required"` Threshold int64 `json:"threshold,required"` JSON timestampedBlockchainInfoDataSoftforksBip9StatisticsJSON `json:"-"` }
func (*TimestampedBlockchainInfoDataSoftforksBip9Statistics) UnmarshalJSON ¶
func (r *TimestampedBlockchainInfoDataSoftforksBip9Statistics) UnmarshalJSON(data []byte) (err error)
type TimestampedBlockchainInfoDataSoftforksBip9Status ¶
type TimestampedBlockchainInfoDataSoftforksBip9Status string
const ( TimestampedBlockchainInfoDataSoftforksBip9StatusDefined TimestampedBlockchainInfoDataSoftforksBip9Status = "defined" TimestampedBlockchainInfoDataSoftforksBip9StatusStarted TimestampedBlockchainInfoDataSoftforksBip9Status = "started" TimestampedBlockchainInfoDataSoftforksBip9StatusLockedIn TimestampedBlockchainInfoDataSoftforksBip9Status = "locked_in" TimestampedBlockchainInfoDataSoftforksBip9StatusActive TimestampedBlockchainInfoDataSoftforksBip9Status = "active" TimestampedBlockchainInfoDataSoftforksBip9StatusFailed TimestampedBlockchainInfoDataSoftforksBip9Status = "failed" )
func (TimestampedBlockchainInfoDataSoftforksBip9Status) IsKnown ¶
func (r TimestampedBlockchainInfoDataSoftforksBip9Status) IsKnown() bool
type TimestampedBlockchainInfoDataSoftforksType ¶
type TimestampedBlockchainInfoDataSoftforksType string
const ( TimestampedBlockchainInfoDataSoftforksTypeBuried TimestampedBlockchainInfoDataSoftforksType = "buried" TimestampedBlockchainInfoDataSoftforksTypeBip9 TimestampedBlockchainInfoDataSoftforksType = "bip9" )
func (TimestampedBlockchainInfoDataSoftforksType) IsKnown ¶
func (r TimestampedBlockchainInfoDataSoftforksType) IsKnown() bool
type TimestampedBlockchainInfoLastUpdated ¶
type TimestampedBlockchainInfoLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedBlockchainInfoLastUpdatedJSON `json:"-"` }
func (*TimestampedBlockchainInfoLastUpdated) UnmarshalJSON ¶
func (r *TimestampedBlockchainInfoLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedBrc20Info ¶
type TimestampedBrc20Info struct { Data TimestampedBrc20InfoData `json:"data,required"` LastUpdated TimestampedBrc20InfoLastUpdated `json:"last_updated,required"` JSON timestampedBrc20InfoJSON `json:"-"` }
func (*TimestampedBrc20Info) UnmarshalJSON ¶
func (r *TimestampedBrc20Info) UnmarshalJSON(data []byte) (err error)
type TimestampedBrc20InfoData ¶
type TimestampedBrc20InfoData struct { DeployInscription string `json:"deploy_inscription,required"` Holders int64 `json:"holders,required"` MintedSupply string `json:"minted_supply,required"` Terms TimestampedBrc20InfoDataTerms `json:"terms,required"` Ticker string `json:"ticker,required"` TickerHex string `json:"ticker_hex,required"` JSON timestampedBrc20InfoDataJSON `json:"-"` }
func (*TimestampedBrc20InfoData) UnmarshalJSON ¶
func (r *TimestampedBrc20InfoData) UnmarshalJSON(data []byte) (err error)
type TimestampedBrc20InfoDataTerms ¶
type TimestampedBrc20InfoDataTerms struct { Dec int64 `json:"dec,required"` Limit string `json:"limit,required"` Max string `json:"max,required"` SelfMint bool `json:"self_mint,required"` JSON timestampedBrc20InfoDataTermsJSON `json:"-"` }
func (*TimestampedBrc20InfoDataTerms) UnmarshalJSON ¶
func (r *TimestampedBrc20InfoDataTerms) UnmarshalJSON(data []byte) (err error)
type TimestampedBrc20InfoLastUpdated ¶
type TimestampedBrc20InfoLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedBrc20InfoLastUpdatedJSON `json:"-"` }
func (*TimestampedBrc20InfoLastUpdated) UnmarshalJSON ¶
func (r *TimestampedBrc20InfoLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedBrc20Quantities ¶
type TimestampedBrc20Quantities struct { Data map[string]string `json:"data,required"` LastUpdated TimestampedBrc20QuantitiesLastUpdated `json:"last_updated,required"` JSON timestampedBrc20QuantitiesJSON `json:"-"` }
func (*TimestampedBrc20Quantities) UnmarshalJSON ¶
func (r *TimestampedBrc20Quantities) UnmarshalJSON(data []byte) (err error)
type TimestampedBrc20QuantitiesLastUpdated ¶
type TimestampedBrc20QuantitiesLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedBrc20QuantitiesLastUpdatedJSON `json:"-"` }
func (*TimestampedBrc20QuantitiesLastUpdated) UnmarshalJSON ¶
func (r *TimestampedBrc20QuantitiesLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolInfo ¶
type TimestampedMempoolInfo struct { Data TimestampedMempoolInfoData `json:"data,required"` LastUpdated TimestampedMempoolInfoLastUpdated `json:"last_updated,required"` JSON timestampedMempoolInfoJSON `json:"-"` }
func (*TimestampedMempoolInfo) UnmarshalJSON ¶
func (r *TimestampedMempoolInfo) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolInfoData ¶
type TimestampedMempoolInfoData struct { // Total memory usage for the mempool (in bytes) Bytes int64 `json:"bytes,required"` // Whether full replace-by-fee (RBF) is enabled FullRbf bool `json:"full_rbf,required"` // The incremental relay fee setting (in BTC) IncrementalRelayFee string `json:"incremental_relay_fee,required"` // Whether the mempool is fully loaded Loaded bool `json:"loaded,required"` // Maximum memory usage for the mempool (in bytes) MaxMempool int64 `json:"max_mempool,required"` // The minimum fee rate (in BTC/kB) for mempool transactions MempoolMinFee string `json:"mempool_min_fee,required"` // The minimum fee rate (in BTC/kB) for relaying transactions MinRelayTxFee string `json:"min_relay_tx_fee,required"` // Number of transactions in the mempool Size int64 `json:"size,required"` // The total fees (in BTC) in the mempool TotalFee string `json:"total_fee,required"` // Number of transactions that have not been broadcast UnbroadcastCount int64 `json:"unbroadcast_count,required"` // Total usage of the mempool (in bytes) Usage int64 `json:"usage,required"` JSON timestampedMempoolInfoDataJSON `json:"-"` }
func (*TimestampedMempoolInfoData) UnmarshalJSON ¶
func (r *TimestampedMempoolInfoData) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolInfoLastUpdated ¶
type TimestampedMempoolInfoLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedMempoolInfoLastUpdatedJSON `json:"-"` }
func (*TimestampedMempoolInfoLastUpdated) UnmarshalJSON ¶
func (r *TimestampedMempoolInfoLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionAncestors ¶
type TimestampedMempoolTransactionAncestors struct { Data []string `json:"data,required"` LastUpdated TimestampedMempoolTransactionAncestorsLastUpdated `json:"last_updated,required"` JSON timestampedMempoolTransactionAncestorsJSON `json:"-"` }
func (*TimestampedMempoolTransactionAncestors) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionAncestors) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionAncestorsLastUpdated ¶
type TimestampedMempoolTransactionAncestorsLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedMempoolTransactionAncestorsLastUpdatedJSON `json:"-"` }
func (*TimestampedMempoolTransactionAncestorsLastUpdated) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionAncestorsLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionDescendants ¶
type TimestampedMempoolTransactionDescendants struct { Data []string `json:"data,required"` LastUpdated TimestampedMempoolTransactionDescendantsLastUpdated `json:"last_updated,required"` JSON timestampedMempoolTransactionDescendantsJSON `json:"-"` }
func (*TimestampedMempoolTransactionDescendants) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionDescendants) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionDescendantsLastUpdated ¶
type TimestampedMempoolTransactionDescendantsLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedMempoolTransactionDescendantsLastUpdatedJSON `json:"-"` }
func (*TimestampedMempoolTransactionDescendantsLastUpdated) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionDescendantsLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionDetails ¶
type TimestampedMempoolTransactionDetails struct { Data TimestampedMempoolTransactionDetailsData `json:"data,required"` LastUpdated TimestampedMempoolTransactionDetailsLastUpdated `json:"last_updated,required"` JSON timestampedMempoolTransactionDetailsJSON `json:"-"` }
func (*TimestampedMempoolTransactionDetails) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionDetails) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionDetailsData ¶
type TimestampedMempoolTransactionDetailsData struct { // Number of ancestors AncestorCount int64 `json:"ancestor_count,required"` // Size of ancestors AncestorSize int64 `json:"ancestor_size,required"` // Whether the transaction is BIP 125 replaceable Bip125Replaceable bool `json:"bip125_replaceable,required"` // Dependencies of the transaction Depends []string `json:"depends,required"` // Number of descendants DescendantCount int64 `json:"descendant_count,required"` // Size of descendants DescendantSize int64 `json:"descendant_size,required"` Fees TimestampedMempoolTransactionDetailsDataFees `json:"fees,required"` // Block height Height int64 `json:"height,required"` // Transactions that spend this one SpentBy []string `json:"spent_by,required"` // Time of the transaction Time int64 `json:"time,required"` // Whether the transaction is unbroadcast Unbroadcast bool `json:"unbroadcast,required"` // Virtual size of the transaction Vsize int64 `json:"vsize,required"` // Weight of the transaction Weight int64 `json:"weight,required"` // Witness transaction ID WtxID string `json:"wtx_id,required"` JSON timestampedMempoolTransactionDetailsDataJSON `json:"-"` }
func (*TimestampedMempoolTransactionDetailsData) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionDetailsData) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionDetailsDataFees ¶
type TimestampedMempoolTransactionDetailsDataFees struct { // Ancestor fee Ancestor string `json:"ancestor,required"` // Base fee Base string `json:"base,required"` // Descendant fee Descendant string `json:"descendant,required"` // Modified fee Modified string `json:"modified,required"` JSON timestampedMempoolTransactionDetailsDataFeesJSON `json:"-"` }
func (*TimestampedMempoolTransactionDetailsDataFees) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionDetailsDataFees) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionDetailsLastUpdated ¶
type TimestampedMempoolTransactionDetailsLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedMempoolTransactionDetailsLastUpdatedJSON `json:"-"` }
func (*TimestampedMempoolTransactionDetailsLastUpdated) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionDetailsLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactions ¶
type TimestampedMempoolTransactions struct { Data TimestampedMempoolTransactionsData `json:"data,required"` LastUpdated TimestampedMempoolTransactionsLastUpdated `json:"last_updated,required"` JSON timestampedMempoolTransactionsJSON `json:"-"` }
func (*TimestampedMempoolTransactions) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactions) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionsData ¶
type TimestampedMempoolTransactionsData struct { // Sequence number of the mempool MempoolSequence int64 `json:"mempool_sequence,required"` // List of transaction IDs TxIDs []string `json:"tx_ids,required"` JSON timestampedMempoolTransactionsDataJSON `json:"-"` }
func (*TimestampedMempoolTransactionsData) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionsData) UnmarshalJSON(data []byte) (err error)
type TimestampedMempoolTransactionsLastUpdated ¶
type TimestampedMempoolTransactionsLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedMempoolTransactionsLastUpdatedJSON `json:"-"` }
func (*TimestampedMempoolTransactionsLastUpdated) UnmarshalJSON ¶
func (r *TimestampedMempoolTransactionsLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedRuneInfo ¶
type TimestampedRuneInfo struct { Data TimestampedRuneInfoData `json:"data,required"` LastUpdated TimestampedRuneInfoLastUpdated `json:"last_updated,required"` JSON timestampedRuneInfoJSON `json:"-"` }
func (*TimestampedRuneInfo) UnmarshalJSON ¶
func (r *TimestampedRuneInfo) UnmarshalJSON(data []byte) (err error)
type TimestampedRuneInfoData ¶
type TimestampedRuneInfoData struct { ID string `json:"id,required"` CirculatingSupply string `json:"circulating_supply,required"` EtchingCenotaph bool `json:"etching_cenotaph,required"` EtchingHeight int64 `json:"etching_height,required"` EtchingTx string `json:"etching_tx,required"` MaxSupply string `json:"max_supply,required"` Mints int64 `json:"mints,required"` Name string `json:"name,required"` SpacedName string `json:"spaced_name,required"` Terms TimestampedRuneInfoDataTerms `json:"terms,required"` TotalUtxos int64 `json:"total_utxos,required"` UniqueHolders int64 `json:"unique_holders,required"` Divisibility int64 `json:"divisibility,nullable"` Premine string `json:"premine,nullable"` Symbol string `json:"symbol,nullable"` JSON timestampedRuneInfoDataJSON `json:"-"` }
func (*TimestampedRuneInfoData) UnmarshalJSON ¶
func (r *TimestampedRuneInfoData) UnmarshalJSON(data []byte) (err error)
type TimestampedRuneInfoDataTerms ¶
type TimestampedRuneInfoDataTerms struct { AmountPerMint string `json:"amount_per_mint,nullable"` EndHeight string `json:"end_height,nullable"` EndOffset string `json:"end_offset,nullable"` MintTxsCap string `json:"mint_txs_cap,nullable"` StartHeight string `json:"start_height,nullable"` StartOffset string `json:"start_offset,nullable"` JSON timestampedRuneInfoDataTermsJSON `json:"-"` }
func (*TimestampedRuneInfoDataTerms) UnmarshalJSON ¶
func (r *TimestampedRuneInfoDataTerms) UnmarshalJSON(data []byte) (err error)
type TimestampedRuneInfoLastUpdated ¶
type TimestampedRuneInfoLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedRuneInfoLastUpdatedJSON `json:"-"` }
func (*TimestampedRuneInfoLastUpdated) UnmarshalJSON ¶
func (r *TimestampedRuneInfoLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedRuneQuantities ¶
type TimestampedRuneQuantities struct { Data map[string]string `json:"data,required"` LastUpdated TimestampedRuneQuantitiesLastUpdated `json:"last_updated,required"` JSON timestampedRuneQuantitiesJSON `json:"-"` }
func (*TimestampedRuneQuantities) UnmarshalJSON ¶
func (r *TimestampedRuneQuantities) UnmarshalJSON(data []byte) (err error)
type TimestampedRuneQuantitiesLastUpdated ¶
type TimestampedRuneQuantitiesLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedRuneQuantitiesLastUpdatedJSON `json:"-"` }
func (*TimestampedRuneQuantitiesLastUpdated) UnmarshalJSON ¶
func (r *TimestampedRuneQuantitiesLastUpdated) UnmarshalJSON(data []byte) (err error)
type TimestampedTransactionDetails ¶
type TimestampedTransactionDetails struct { // Represents the details of a Bitcoin transaction. Data TimestampedTransactionDetailsData `json:"data,required"` LastUpdated TimestampedTransactionDetailsLastUpdated `json:"last_updated,required"` JSON timestampedTransactionDetailsJSON `json:"-"` }
func (*TimestampedTransactionDetails) UnmarshalJSON ¶
func (r *TimestampedTransactionDetails) UnmarshalJSON(data []byte) (err error)
type TimestampedTransactionDetailsData ¶
type TimestampedTransactionDetailsData struct { // The hash of the block that contains this transaction. BlockHash string `json:"block_hash,required"` // The time the block containing this transaction was mined (in UNIX timestamp). BlockTime int64 `json:"block_time,required"` // The number of confirmations for this transaction. Confirmations int64 `json:"confirmations,required"` // The transaction hash (TXID). Hash string `json:"hash,required"` // The raw transaction in hexadecimal form. Hex string `json:"hex,required"` // The locktime of the transaction, which specifies the earliest time or block when // the transaction can be included in a block. LockTime int64 `json:"lock_time,required"` // The size of the transaction in bytes. Size int64 `json:"size,required"` // The timestamp when the transaction was included in the block (in UNIX // timestamp). Time int64 `json:"time,required"` // The transaction ID (TXID) of this transaction. TxID string `json:"tx_id,required"` // The virtual size of the transaction, which accounts for SegWit (witness data) // scaling rules. VSize int64 `json:"v_size,required"` // The version number of the transaction, indicating the format or type of the // transaction. Version int64 `json:"version,required"` // The transaction inputs, which refer to the previous transaction outputs that are // being spent. Vin []TimestampedTransactionDetailsDataVin `json:"vin,required"` // The transaction outputs, which specify how much Bitcoin is being sent to which // addresses. Vout []TimestampedTransactionDetailsDataVout `json:"vout,required"` // The weight of the transaction as defined by SegWit rules (v_size \* 4). Weight int64 `json:"weight,required"` JSON timestampedTransactionDetailsDataJSON `json:"-"` }
Represents the details of a Bitcoin transaction.
func (*TimestampedTransactionDetailsData) UnmarshalJSON ¶
func (r *TimestampedTransactionDetailsData) UnmarshalJSON(data []byte) (err error)
type TimestampedTransactionDetailsDataVin ¶
type TimestampedTransactionDetailsDataVin struct { // The sequence number for the input, which is used for BIP-125 replace-by-fee // (RBF). Sequence int64 `json:"sequence,required"` // The coinbase transaction data (for block rewards) if this is a coinbase // transaction. Coinbase string `json:"coinbase,nullable"` // The witness data (SegWit) for the transaction input. TxinWitness []string `json:"txin_witness,nullable"` JSON timestampedTransactionDetailsDataVinJSON `json:"-"` }
Represents the input of a Bitcoin transaction.
func (*TimestampedTransactionDetailsDataVin) UnmarshalJSON ¶
func (r *TimestampedTransactionDetailsDataVin) UnmarshalJSON(data []byte) (err error)
type TimestampedTransactionDetailsDataVout ¶
type TimestampedTransactionDetailsDataVout struct { // The index of this output in the transaction (0-based). N int64 `json:"n,required"` // Represents the script used to lock/unlock Bitcoin in an output. ScriptPubKey TimestampedTransactionDetailsDataVoutScriptPubKey `json:"script_pub_key,required"` // The amount of Bitcoin (in BTC) sent to this output. Value float64 `json:"value,required"` JSON timestampedTransactionDetailsDataVoutJSON `json:"-"` }
Represents the output of a Bitcoin transaction.
func (*TimestampedTransactionDetailsDataVout) UnmarshalJSON ¶
func (r *TimestampedTransactionDetailsDataVout) UnmarshalJSON(data []byte) (err error)
type TimestampedTransactionDetailsDataVoutScriptPubKey ¶
type TimestampedTransactionDetailsDataVoutScriptPubKey struct { // The assembly (ASM) representation of the script, showing the operation codes and // operands. Asm string `json:"asm,required"` // The detailed descriptor of the scriptPubKey, providing more information about // the address and script. Desc string `json:"desc,required"` // The raw hexadecimal representation of the script. Hex string `json:"hex,required"` // The type of the script (e.g., "scripthash", "pubkeyhash"). Type string `json:"type,required"` // The Bitcoin address to which this output belongs. Address string `json:"address,nullable"` JSON timestampedTransactionDetailsDataVoutScriptPubKeyJSON `json:"-"` }
Represents the script used to lock/unlock Bitcoin in an output.
func (*TimestampedTransactionDetailsDataVoutScriptPubKey) UnmarshalJSON ¶
func (r *TimestampedTransactionDetailsDataVoutScriptPubKey) UnmarshalJSON(data []byte) (err error)
type TimestampedTransactionDetailsLastUpdated ¶
type TimestampedTransactionDetailsLastUpdated struct { // The hash of the block BlockHash string `json:"block_hash,required"` // The height of the block in the blockchain BlockHeight int64 `json:"block_height,required"` JSON timestampedTransactionDetailsLastUpdatedJSON `json:"-"` }
func (*TimestampedTransactionDetailsLastUpdated) UnmarshalJSON ¶
func (r *TimestampedTransactionDetailsLastUpdated) UnmarshalJSON(data []byte) (err error)
type TransactionPsbtDecodeParams ¶
type TransactionPsbtDecodeParams struct {
Body interface{} `json:"body,required"`
}
func (TransactionPsbtDecodeParams) MarshalJSON ¶
func (r TransactionPsbtDecodeParams) MarshalJSON() (data []byte, err error)
type TransactionPsbtService ¶
type TransactionPsbtService struct {
Options []option.RequestOption
}
TransactionPsbtService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTransactionPsbtService method instead.
func NewTransactionPsbtService ¶
func NewTransactionPsbtService(opts ...option.RequestOption) (r *TransactionPsbtService)
NewTransactionPsbtService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TransactionPsbtService) Decode ¶
func (r *TransactionPsbtService) Decode(ctx context.Context, body TransactionPsbtDecodeParams, opts ...option.RequestOption) (err error)
Decode PSBT
type TransactionService ¶
type TransactionService struct { Options []option.RequestOption Psbt *TransactionPsbtService }
TransactionService contains methods and other services that help with interacting with the maestro API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTransactionService method instead.
func NewTransactionService ¶
func NewTransactionService(opts ...option.RequestOption) (r *TransactionService)
NewTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TransactionService) Get ¶
func (r *TransactionService) Get(ctx context.Context, txHash string, opts ...option.RequestOption) (err error)
Information about a specific transaction.
func (*TransactionService) Submit ¶
func (r *TransactionService) Submit(ctx context.Context, body TransactionSubmitParams, opts ...option.RequestOption) (res *string, err error)
Submits a signed transaction to the network.
type TransactionSubmitParams ¶
type TransactionSubmitParams struct {
Body interface{} `json:"body,required"`
}
func (TransactionSubmitParams) MarshalJSON ¶
func (r TransactionSubmitParams) MarshalJSON() (data []byte, err error)
Source Files ¶
- address.go
- addressbrc20.go
- addressrune.go
- addresstx.go
- addressutxo.go
- aliases.go
- asset.go
- assetbrc20.go
- assetbrc20holder.go
- assetrune.go
- assetruneholder.go
- assetruneutxo.go
- block.go
- blocklatest.go
- client.go
- field.go
- general.go
- generalinfo.go
- rpc.go
- rpcmempool.go
- rpcmempoolinfo.go
- rpcmempooltransaction.go
- rpcmempooltransactionancestor.go
- rpcmempooltransactiondescendant.go
- rpctransaction.go
- transaction.go
- transactionpsbt.go