models

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package stacks

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).

Package stacks

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).

Package stacks

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).

Index

Constants

This section is empty.

Variables

View Source
var DEFAULT_DATE = utilities.DEFAULT_DATE

DEFAULT_DATE is a utility.

View Source
var GetFile = https.GetFile

GetFile retrieves a file from the given fileUrl and returns it as a FileWrapper. It makes an HTTP GET request to the fileUrl to fetch the file's content and metadata.

View Source
var TimeToStringMap = utilities.TimeToStringMap

TimeToStringMap is a utility.

View Source
var TimeToStringSlice = utilities.TimeToStringSlice

TimeToStringSlice is a utility.

View Source
var ToTimeMap = utilities.ToTimeMap

ToTimeMap is a utility.

View Source
var ToTimeSlice = utilities.ToTimeSlice

ToTimeSlice is a utility.

Functions

func ToPointer

func ToPointer[T any](value T) *T

Types

type AccountDataResponse

type AccountDataResponse struct {
	Balance      string `json:"balance"`
	Locked       string `json:"locked"`
	UnlockHeight int    `json:"unlock_height"`
	Nonce        int    `json:"nonce"`
	BalanceProof string `json:"balance_proof"`
	NonceProof   string `json:"nonce_proof"`
}

AccountDataResponse represents a AccountDataResponse struct. GET request for account data

func (*AccountDataResponse) MarshalJSON

func (a *AccountDataResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AccountDataResponse. It customizes the JSON marshaling process for AccountDataResponse objects.

func (*AccountDataResponse) UnmarshalJSON

func (a *AccountDataResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AccountDataResponse. It customizes the JSON unmarshaling process for AccountDataResponse objects.

type AddressAssetsListResponse

type AddressAssetsListResponse struct {
	Limit   int                `json:"limit"`
	Offset  int                `json:"offset"`
	Total   int                `json:"total"`
	Results []TransactionEvent `json:"results"`
}

AddressAssetsListResponse represents a AddressAssetsListResponse struct. GET request that returns address assets

func (*AddressAssetsListResponse) MarshalJSON

func (a *AddressAssetsListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressAssetsListResponse. It customizes the JSON marshaling process for AddressAssetsListResponse objects.

func (*AddressAssetsListResponse) UnmarshalJSON

func (a *AddressAssetsListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressAssetsListResponse. It customizes the JSON unmarshaling process for AddressAssetsListResponse objects.

type AddressBalanceResponse

type AddressBalanceResponse struct {
	Stx               StxBalance            `json:"stx"`
	FungibleTokens    map[string]FtBalance  `json:"fungible_tokens"`
	NonFungibleTokens map[string]NftBalance `json:"non_fungible_tokens"`
	// Token Offering Locked
	TokenOfferingLocked *AddressTokenOfferingLocked `json:"token_offering_locked,omitempty"`
}

AddressBalanceResponse represents a AddressBalanceResponse struct. GET request that returns address balances

func (*AddressBalanceResponse) MarshalJSON

func (a *AddressBalanceResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressBalanceResponse. It customizes the JSON marshaling process for AddressBalanceResponse objects.

func (*AddressBalanceResponse) UnmarshalJSON

func (a *AddressBalanceResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressBalanceResponse. It customizes the JSON unmarshaling process for AddressBalanceResponse objects.

type AddressNonces

type AddressNonces struct {
	// The latest nonce found within mempool transactions sent by this address. Will be null if there are no current mempool transactions for this address.
	LastMempoolTxNonce *int `json:"last_mempool_tx_nonce"`
	// The latest nonce found within transactions sent by this address, including unanchored microblock transactions. Will be null if there are no current transactions for this address.
	LastExecutedTxNonce *int `json:"last_executed_tx_nonce"`
	// The likely nonce required for creating the next transaction, based on the last nonces seen by the API. This can be incorrect if the API's mempool or transactions aren't fully synchronized, even by a small amount, or if a previous transaction is still propagating through the Stacks blockchain network when this endpoint is called.
	PossibleNextNonce int `json:"possible_next_nonce"`
	// Nonces that appear to be missing and likely causing a mempool transaction to be stuck.
	DetectedMissingNonces []int `json:"detected_missing_nonces"`
	// Nonces currently in mempool for this address.
	DetectedMempoolNonces []int `json:"detected_mempool_nonces,omitempty"`
}

AddressNonces represents a AddressNonces struct. The latest nonce values used by an account by inspecting the mempool, microblock transactions, and anchored transactions

func (*AddressNonces) MarshalJSON

func (a *AddressNonces) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressNonces. It customizes the JSON marshaling process for AddressNonces objects.

func (*AddressNonces) UnmarshalJSON

func (a *AddressNonces) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressNonces. It customizes the JSON unmarshaling process for AddressNonces objects.

type AddressStxBalanceResponse

type AddressStxBalanceResponse struct {
	Balance                   string `json:"balance"`
	TotalSent                 string `json:"total_sent"`
	TotalReceived             string `json:"total_received"`
	TotalFeesSent             string `json:"total_fees_sent"`
	TotalMinerRewardsReceived string `json:"total_miner_rewards_received"`
	// The transaction where the lock event occurred. Empty if no tokens are locked.
	LockTxId string `json:"lock_tx_id"`
	// The amount of locked STX, as string quoted micro-STX. Zero if no tokens are locked.
	Locked string `json:"locked"`
	// The STX chain block height of when the lock event occurred. Zero if no tokens are locked.
	LockHeight int `json:"lock_height"`
	// The burnchain block height of when the lock event occurred. Zero if no tokens are locked.
	BurnchainLockHeight int `json:"burnchain_lock_height"`
	// The burnchain block height of when the tokens unlock. Zero if no tokens are locked.
	BurnchainUnlockHeight int `json:"burnchain_unlock_height"`
	// Token Offering Locked
	TokenOfferingLocked *AddressTokenOfferingLocked `json:"token_offering_locked,omitempty"`
}

AddressStxBalanceResponse represents a AddressStxBalanceResponse struct. GET request that returns address balances

func (*AddressStxBalanceResponse) MarshalJSON

func (a *AddressStxBalanceResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressStxBalanceResponse. It customizes the JSON marshaling process for AddressStxBalanceResponse objects.

func (*AddressStxBalanceResponse) UnmarshalJSON

func (a *AddressStxBalanceResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressStxBalanceResponse. It customizes the JSON unmarshaling process for AddressStxBalanceResponse objects.

type AddressStxInboundListResponse

type AddressStxInboundListResponse struct {
	Limit   int                  `json:"limit"`
	Offset  int                  `json:"offset"`
	Total   int                  `json:"total"`
	Results []InboundStxTransfer `json:"results"`
}

AddressStxInboundListResponse represents a AddressStxInboundListResponse struct. GET request that returns a list of inbound STX transfers with a memo

func (*AddressStxInboundListResponse) MarshalJSON

func (a *AddressStxInboundListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressStxInboundListResponse. It customizes the JSON marshaling process for AddressStxInboundListResponse objects.

func (*AddressStxInboundListResponse) UnmarshalJSON

func (a *AddressStxInboundListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressStxInboundListResponse. It customizes the JSON unmarshaling process for AddressStxInboundListResponse objects.

type AddressTokenOfferingLocked

type AddressTokenOfferingLocked struct {
	// Micro-STX amount still locked at current block height.
	TotalLocked string `json:"total_locked"`
	// Micro-STX amount unlocked at current block height.
	TotalUnlocked  string                  `json:"total_unlocked"`
	UnlockSchedule []AddressUnlockSchedule `json:"unlock_schedule"`
}

AddressTokenOfferingLocked represents a AddressTokenOfferingLocked struct. Token Offering Locked

func (*AddressTokenOfferingLocked) MarshalJSON

func (a *AddressTokenOfferingLocked) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressTokenOfferingLocked. It customizes the JSON marshaling process for AddressTokenOfferingLocked objects.

func (*AddressTokenOfferingLocked) UnmarshalJSON

func (a *AddressTokenOfferingLocked) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressTokenOfferingLocked. It customizes the JSON unmarshaling process for AddressTokenOfferingLocked objects.

type AddressTransactionWithTransfers

type AddressTransactionWithTransfers struct {
	// Describes all transaction types on Stacks 2.0 blockchain
	Tx Transaction `json:"tx"`
	// Total sent from the given address, including the tx fee, in micro-STX as an integer string.
	StxSent string `json:"stx_sent"`
	// Total received by the given address in micro-STX as an integer string.
	StxReceived  string        `json:"stx_received"`
	StxTransfers []StxTransfer `json:"stx_transfers"`
	FtTransfers  []FtTransfer  `json:"ft_transfers,omitempty"`
	NftTransfers []NftTransfer `json:"nft_transfers,omitempty"`
}

AddressTransactionWithTransfers represents a AddressTransactionWithTransfers struct. Transaction with STX transfers for a given address

func (*AddressTransactionWithTransfers) MarshalJSON

func (a *AddressTransactionWithTransfers) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressTransactionWithTransfers. It customizes the JSON marshaling process for AddressTransactionWithTransfers objects.

func (*AddressTransactionWithTransfers) UnmarshalJSON

func (a *AddressTransactionWithTransfers) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressTransactionWithTransfers. It customizes the JSON unmarshaling process for AddressTransactionWithTransfers objects.

type AddressTransactionsListResponse

type AddressTransactionsListResponse struct {
	Limit   int      `json:"limit"`
	Offset  int      `json:"offset"`
	Total   int      `json:"total"`
	Results []Result `json:"results"`
}

AddressTransactionsListResponse represents a AddressTransactionsListResponse struct. GET request that returns account transactions

func (*AddressTransactionsListResponse) MarshalJSON

func (a *AddressTransactionsListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressTransactionsListResponse. It customizes the JSON marshaling process for AddressTransactionsListResponse objects.

func (*AddressTransactionsListResponse) UnmarshalJSON

func (a *AddressTransactionsListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressTransactionsListResponse. It customizes the JSON unmarshaling process for AddressTransactionsListResponse objects.

type AddressTransactionsWithTransfersListResponse

type AddressTransactionsWithTransfersListResponse struct {
	Limit   int                               `json:"limit"`
	Offset  int                               `json:"offset"`
	Total   int                               `json:"total"`
	Results []AddressTransactionWithTransfers `json:"results"`
}

AddressTransactionsWithTransfersListResponse represents a AddressTransactionsWithTransfersListResponse struct. GET request that returns account transactions

func (*AddressTransactionsWithTransfersListResponse) MarshalJSON

MarshalJSON implements the json.Marshaler interface for AddressTransactionsWithTransfersListResponse. It customizes the JSON marshaling process for AddressTransactionsWithTransfersListResponse objects.

func (*AddressTransactionsWithTransfersListResponse) UnmarshalJSON

func (a *AddressTransactionsWithTransfersListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressTransactionsWithTransfersListResponse. It customizes the JSON unmarshaling process for AddressTransactionsWithTransfersListResponse objects.

type AddressUnlockSchedule

type AddressUnlockSchedule struct {
	// Micro-STX amount locked at this block height.
	Amount      string  `json:"amount"`
	BlockHeight float64 `json:"block_height"`
}

AddressUnlockSchedule represents a AddressUnlockSchedule struct. Unlock schedule amount and block height

func (*AddressUnlockSchedule) MarshalJSON

func (a *AddressUnlockSchedule) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressUnlockSchedule. It customizes the JSON marshaling process for AddressUnlockSchedule objects.

func (*AddressUnlockSchedule) UnmarshalJSON

func (a *AddressUnlockSchedule) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressUnlockSchedule. It customizes the JSON unmarshaling process for AddressUnlockSchedule objects.

type All

type All struct {
	NoPriority     int `json:"no_priority"`
	LowPriority    int `json:"low_priority"`
	MediumPriority int `json:"medium_priority"`
	HighPriority   int `json:"high_priority"`
}

All represents a All struct.

func (*All) MarshalJSON

func (a *All) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for All. It customizes the JSON marshaling process for All objects.

func (*All) UnmarshalJSON

func (a *All) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for All. It customizes the JSON unmarshaling process for All objects.

type Allow

type Allow struct {
	// All Operation.Status this implementation supports. Any status that is returned during parsing that is not listed here will cause client validation to error.
	OperationStatuses []RosettaOperationStatus `json:"operation_statuses"`
	// All Operation.Type this implementation supports. Any type that is returned during parsing that is not listed here will cause client validation to error.
	OperationTypes []string `json:"operation_types"`
	// All Errors that this implementation could return. Any error that is returned during parsing that is not listed here will cause client validation to error.
	Errors []RosettaErrorNoDetails `json:"errors"`
	// Any Rosetta implementation that supports querying the balance of an account at any height in the past should set this to true.
	HistoricalBalanceLookup bool `json:"historical_balance_lookup"`
}

Allow represents a Allow struct. Allow specifies supported Operation status, Operation types, and all possible error statuses. This Allow object is used by clients to validate the correctness of a Rosetta Server implementation. It is expected that these clients will error if they receive some response that contains any of the above information that is not specified here.

func (*Allow) MarshalJSON

func (a *Allow) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Allow. It customizes the JSON marshaling process for Allow objects.

func (*Allow) UnmarshalJSON

func (a *Allow) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Allow. It customizes the JSON unmarshaling process for Allow objects.

type ApiResponse

type ApiResponse[T any] struct {
	https.ApiResponse[T]
}

ApiResponse is a generic struct that represents an API response containing data and the HTTP response. The `Data` field holds the data of any type `T` returned by the API. The `Response` field contains the underlying HTTP response associated with the API call.

func NewApiResponse

func NewApiResponse[T any](
	data T,
	response *http.Response) ApiResponse[T]

NewApiResponse creates a new instance of ApiResponse. It takes the `data` of type `T` and the `response` as parameters, and returns an ApiResponse[T] struct.

type Asset

type Asset struct {
	AssetName       string `json:"asset_name"`
	ContractAddress string `json:"contract_address"`
	ContractName    string `json:"contract_name"`
}

Asset represents a Asset struct.

func (*Asset) MarshalJSON

func (a *Asset) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Asset. It customizes the JSON marshaling process for Asset objects.

func (*Asset) UnmarshalJSON

func (a *Asset) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Asset. It customizes the JSON unmarshaling process for Asset objects.

type AssetValue

type AssetValue struct {
	Hex  string `json:"hex"`
	Repr string `json:"repr"`
}

AssetValue represents a AssetValue struct.

func (*AssetValue) MarshalJSON

func (a *AssetValue) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AssetValue. It customizes the JSON marshaling process for AssetValue objects.

func (*AssetValue) UnmarshalJSON

func (a *AssetValue) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AssetValue. It customizes the JSON unmarshaling process for AssetValue objects.

type Block

type Block struct {
	// Set to `true` if block corresponds to the canonical chain tip
	Canonical bool `json:"canonical"`
	// Height of the block
	Height int `json:"height"`
	// Hash representing the block
	Hash string `json:"hash"`
	// The only hash that can uniquely identify an anchored block or an unconfirmed state trie
	IndexBlockHash string `json:"index_block_hash"`
	// Hash of the parent block
	ParentBlockHash string `json:"parent_block_hash"`
	// Unix timestamp (in seconds) indicating when this block was mined.
	BurnBlockTime float64 `json:"burn_block_time"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
	BurnBlockTimeIso string `json:"burn_block_time_iso"`
	// Hash of the anchor chain block
	BurnBlockHash string `json:"burn_block_hash"`
	// Height of the anchor chain block
	BurnBlockHeight int `json:"burn_block_height"`
	// Anchor chain transaction ID
	MinerTxid string `json:"miner_txid"`
	// The hash of the last streamed block that precedes this block to which this block is to be appended. Not every anchored block will have a parent microblock stream. An anchored block that does not have a parent microblock stream has the parent microblock hash set to an empty string, and the parent microblock sequence number set to -1.
	ParentMicroblockHash string `json:"parent_microblock_hash"`
	// The hash of the last streamed block that precedes this block to which this block is to be appended. Not every anchored block will have a parent microblock stream. An anchored block that does not have a parent microblock stream has the parent microblock hash set to an empty string, and the parent microblock sequence number set to -1.
	ParentMicroblockSequence int `json:"parent_microblock_sequence"`
	// List of transactions included in the block
	Txs []string `json:"txs"`
	// List of microblocks that were accepted in this anchor block. Not every anchored block will have a accepted all (or any) of the previously streamed microblocks. Microblocks that were orphaned are not included in this list.
	MicroblocksAccepted []string `json:"microblocks_accepted"`
	// List of microblocks that were streamed/produced by this anchor block's miner. This list only includes microblocks that were accepted in the following anchor block. Microblocks that were orphaned are not included in this list.
	MicroblocksStreamed []string `json:"microblocks_streamed"`
	// Execution cost read count.
	ExecutionCostReadCount int `json:"execution_cost_read_count"`
	// Execution cost read length.
	ExecutionCostReadLength int `json:"execution_cost_read_length"`
	// Execution cost runtime.
	ExecutionCostRuntime int `json:"execution_cost_runtime"`
	// Execution cost write count.
	ExecutionCostWriteCount int `json:"execution_cost_write_count"`
	// Execution cost write length.
	ExecutionCostWriteLength int `json:"execution_cost_write_length"`
	// List of txs counts in each accepted microblock
	MicroblockTxCount map[string]float64 `json:"microblock_tx_count"`
}

Block represents a Block struct. A block

func (*Block) MarshalJSON

func (b *Block) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Block. It customizes the JSON marshaling process for Block objects.

func (*Block) UnmarshalJSON

func (b *Block) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Block. It customizes the JSON unmarshaling process for Block objects.

type Block1

type Block1 struct {
	// Set to `true` if block corresponds to the canonical chain tip
	Canonical bool `json:"canonical"`
	// Height of the block
	Height int `json:"height"`
	// Hash representing the block
	Hash string `json:"hash"`
	// The only hash that can uniquely identify an anchored block or an unconfirmed state trie
	IndexBlockHash string `json:"index_block_hash"`
	// Hash of the parent block
	ParentBlockHash string `json:"parent_block_hash"`
	// Unix timestamp (in seconds) indicating when this block was mined.
	BurnBlockTime float64 `json:"burn_block_time"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
	BurnBlockTimeIso string `json:"burn_block_time_iso"`
	// Hash of the anchor chain block
	BurnBlockHash string `json:"burn_block_hash"`
	// Height of the anchor chain block
	BurnBlockHeight int `json:"burn_block_height"`
	// Anchor chain transaction ID
	MinerTxid string `json:"miner_txid"`
	// The hash of the last streamed block that precedes this block to which this block is to be appended. Not every anchored block will have a parent microblock stream. An anchored block that does not have a parent microblock stream has the parent microblock hash set to an empty string, and the parent microblock sequence number set to -1.
	ParentMicroblockHash string `json:"parent_microblock_hash"`
	// The hash of the last streamed block that precedes this block to which this block is to be appended. Not every anchored block will have a parent microblock stream. An anchored block that does not have a parent microblock stream has the parent microblock hash set to an empty string, and the parent microblock sequence number set to -1.
	ParentMicroblockSequence int `json:"parent_microblock_sequence"`
	// List of transactions included in the block
	Txs []string `json:"txs"`
	// List of microblocks that were accepted in this anchor block. Not every anchored block will have a accepted all (or any) of the previously streamed microblocks. Microblocks that were orphaned are not included in this list.
	MicroblocksAccepted []string `json:"microblocks_accepted"`
	// List of microblocks that were streamed/produced by this anchor block's miner. This list only includes microblocks that were accepted in the following anchor block. Microblocks that were orphaned are not included in this list.
	MicroblocksStreamed []string `json:"microblocks_streamed"`
	// Execution cost read count.
	ExecutionCostReadCount int `json:"execution_cost_read_count"`
	// Execution cost read length.
	ExecutionCostReadLength int `json:"execution_cost_read_length"`
	// Execution cost runtime.
	ExecutionCostRuntime int `json:"execution_cost_runtime"`
	// Execution cost write count.
	ExecutionCostWriteCount int `json:"execution_cost_write_count"`
	// Execution cost write length.
	ExecutionCostWriteLength int `json:"execution_cost_write_length"`
	// List of txs counts in each accepted microblock
	MicroblockTxCount map[string]float64 `json:"microblock_tx_count"`
	// Transaction ID
	TxId string `json:"tx_id"`
	// Used for ordering the transactions originating from and paying from an account. The nonce ensures that a transaction is processed at most once. The nonce counts the number of times an account's owner(s) have authorized a transaction. The first transaction from an account will have a nonce value equal to 0, the second will have a nonce value equal to 1, and so on.
	Nonce int `json:"nonce"`
	// Transaction fee as Integer string (64-bit unsigned integer).
	FeeRate string `json:"fee_rate"`
	// Address of the transaction initiator
	SenderAddress string `json:"sender_address"`
	SponsorNonce  *int   `json:"sponsor_nonce,omitempty"`
	// Denotes whether the originating account is the same as the paying account
	Sponsored         bool                  `json:"sponsored"`
	SponsorAddress    *string               `json:"sponsor_address,omitempty"`
	PostConditionMode PostConditionModeEnum `json:"post_condition_mode"`
	PostConditions    []PostCondition1      `json:"post_conditions"`
	// `on_chain_only`: the transaction MUST be included in an anchored block, `off_chain_only`: the transaction MUST be included in a microblock, `any`: the leader can choose where to include the transaction.
	AnchorMode TransactionAnchorModeTypeEnum `json:"anchor_mode"`
	// Status of the transaction
	TxStatus MempoolTransactionStatusEnum `json:"tx_status"`
	// A unix timestamp (in seconds) indicating when the transaction broadcast was received by the node.
	ReceiptTime float64 `json:"receipt_time"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when the transaction broadcast was received by the node.
	ReceiptTimeIso      string               `json:"receipt_time_iso"`
	TxType              string               `json:"tx_type"`
	TokenTransfer       TokenTransfer        `json:"token_transfer"`
	SmartContract       SmartContract        `json:"smart_contract"`
	ContractCall        ContractCall         `json:"contract_call"`
	PoisonMicroblock    PoisonMicroblock     `json:"poison_microblock"`
	CoinbasePayload     CoinbasePayload      `json:"coinbase_payload"`
	TenureChangePayload *TenureChangePayload `json:"tenure_change_payload,omitempty"`
	// Hash of the blocked this transactions was associated with
	BlockHash string `json:"block_hash"`
	// Height of the block this transactions was associated with
	BlockHeight int `json:"block_height"`
	// Unix timestamp (in seconds) indicating when this parent block was mined
	ParentBurnBlockTime int `json:"parent_burn_block_time"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this parent block was mined.
	ParentBurnBlockTimeIso string `json:"parent_burn_block_time_iso"`
	// Index of the transaction, indicating the order. Starts at `0` and increases with each transaction
	TxIndex int `json:"tx_index"`
	// Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.
	TxResult TxResult `json:"tx_result"`
	// Number of transaction events
	EventCount int `json:"event_count"`
	// True if the transaction is included in a microblock that has not been confirmed by an anchor block.
	IsUnanchored bool `json:"is_unanchored"`
	// The microblock hash that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be an empty string.
	MicroblockHash string `json:"microblock_hash"`
	// The microblock sequence number that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be 2147483647 (0x7fffffff, the max int32 value), this value preserves logical transaction ordering on (block_height, microblock_sequence, tx_index).
	MicroblockSequence int `json:"microblock_sequence"`
	// Set to `true` if microblock is anchored in the canonical chain tip, `false` if the transaction was orphaned in a micro-fork.
	MicroblockCanonical bool `json:"microblock_canonical"`
	// List of transaction events
	Events []TransactionEvent1 `json:"events"`
}

Block1 represents a Block1 struct. A block

func (*Block1) MarshalJSON

func (b *Block1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Block1. It customizes the JSON marshaling process for Block1 objects.

func (*Block1) UnmarshalJSON

func (b *Block1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Block1. It customizes the JSON unmarshaling process for Block1 objects.

type BlockData

type BlockData struct {
	// If the block lies within the canonical chain
	Canonical bool `json:"canonical"`
	// Refers to the hash of the block
	Hash            string `json:"hash"`
	ParentBlockHash string `json:"parent_block_hash"`
	BurnBlockTime   int    `json:"burn_block_time"`
	Height          int    `json:"height"`
}

BlockData represents a BlockData struct. Returns basic search result information about the requested id

func (*BlockData) MarshalJSON

func (b *BlockData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BlockData. It customizes the JSON marshaling process for BlockData objects.

func (*BlockData) UnmarshalJSON

func (b *BlockData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BlockData. It customizes the JSON unmarshaling process for BlockData objects.

type BlockListResponse

type BlockListResponse struct {
	// The number of blocks to return
	Limit int `json:"limit"`
	// The number to blocks to skip (starting at `0`)
	Offset int `json:"offset"`
	// The number of blocks available
	Total   int     `json:"total"`
	Results []Block `json:"results"`
}

BlockListResponse represents a BlockListResponse struct. GET request that returns blocks

func (*BlockListResponse) MarshalJSON

func (b *BlockListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BlockListResponse. It customizes the JSON marshaling process for BlockListResponse objects.

func (*BlockListResponse) UnmarshalJSON

func (b *BlockListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BlockListResponse. It customizes the JSON unmarshaling process for BlockListResponse objects.

type BnsFetchFileZoneResponse2

type BnsFetchFileZoneResponse2 struct {
	Zonefile *string `json:"zonefile,omitempty"`
	Error    *string `json:"error,omitempty"`
}

BnsFetchFileZoneResponse2 represents a BnsFetchFileZoneResponse2 struct. Fetch a user's raw zone file. This only works for RFC-compliant zone files. This method returns an error for names that have non-standard zone files.

func (*BnsFetchFileZoneResponse2) MarshalJSON

func (b *BnsFetchFileZoneResponse2) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BnsFetchFileZoneResponse2. It customizes the JSON marshaling process for BnsFetchFileZoneResponse2 objects.

func (*BnsFetchFileZoneResponse2) UnmarshalJSON

func (b *BnsFetchFileZoneResponse2) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BnsFetchFileZoneResponse2. It customizes the JSON unmarshaling process for BnsFetchFileZoneResponse2 objects.

type BnsFetchHistoricalZoneFileResponse2

type BnsFetchHistoricalZoneFileResponse2 struct {
	Zonefile *string `json:"zonefile,omitempty"`
	Error    *string `json:"error,omitempty"`
}

BnsFetchHistoricalZoneFileResponse2 represents a BnsFetchHistoricalZoneFileResponse2 struct. Fetches the historical zonefile specified by the username and zone hash.

func (*BnsFetchHistoricalZoneFileResponse2) MarshalJSON

func (b *BnsFetchHistoricalZoneFileResponse2) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BnsFetchHistoricalZoneFileResponse2. It customizes the JSON marshaling process for BnsFetchHistoricalZoneFileResponse2 objects.

func (*BnsFetchHistoricalZoneFileResponse2) UnmarshalJSON

func (b *BnsFetchHistoricalZoneFileResponse2) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BnsFetchHistoricalZoneFileResponse2. It customizes the JSON unmarshaling process for BnsFetchHistoricalZoneFileResponse2 objects.

type BnsGetAllNamespacesResponse

type BnsGetAllNamespacesResponse struct {
	Namespaces []string `json:"namespaces"`
}

BnsGetAllNamespacesResponse represents a BnsGetAllNamespacesResponse struct. Fetch a list of all namespaces known to the node.

func (*BnsGetAllNamespacesResponse) MarshalJSON

func (b *BnsGetAllNamespacesResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BnsGetAllNamespacesResponse. It customizes the JSON marshaling process for BnsGetAllNamespacesResponse objects.

func (*BnsGetAllNamespacesResponse) UnmarshalJSON

func (b *BnsGetAllNamespacesResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BnsGetAllNamespacesResponse. It customizes the JSON unmarshaling process for BnsGetAllNamespacesResponse objects.

type BnsGetNameInfoResponse

type BnsGetNameInfoResponse struct {
	Address      string  `json:"address"`
	Blockchain   string  `json:"blockchain"`
	ExpireBlock  *int    `json:"expire_block,omitempty"`
	GracePeriod  *int    `json:"grace_period,omitempty"`
	LastTxid     string  `json:"last_txid"`
	Resolver     *string `json:"resolver,omitempty"`
	Status       string  `json:"status"`
	Zonefile     string  `json:"zonefile"`
	ZonefileHash string  `json:"zonefile_hash"`
}

BnsGetNameInfoResponse represents a BnsGetNameInfoResponse struct. Get name details

func (*BnsGetNameInfoResponse) MarshalJSON

func (b *BnsGetNameInfoResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BnsGetNameInfoResponse. It customizes the JSON marshaling process for BnsGetNameInfoResponse objects.

func (*BnsGetNameInfoResponse) UnmarshalJSON

func (b *BnsGetNameInfoResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BnsGetNameInfoResponse. It customizes the JSON unmarshaling process for BnsGetNameInfoResponse objects.

type BnsGetNamePriceResponse

type BnsGetNamePriceResponse struct {
	Units  string `json:"units"`
	Amount string `json:"amount"`
}

BnsGetNamePriceResponse represents a BnsGetNamePriceResponse struct. Fetch price for name.

func (*BnsGetNamePriceResponse) MarshalJSON

func (b *BnsGetNamePriceResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BnsGetNamePriceResponse. It customizes the JSON marshaling process for BnsGetNamePriceResponse objects.

func (*BnsGetNamePriceResponse) UnmarshalJSON

func (b *BnsGetNamePriceResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BnsGetNamePriceResponse. It customizes the JSON unmarshaling process for BnsGetNamePriceResponse objects.

type BnsGetNamespacePriceResponse

type BnsGetNamespacePriceResponse struct {
	Units  string `json:"units"`
	Amount string `json:"amount"`
}

BnsGetNamespacePriceResponse represents a BnsGetNamespacePriceResponse struct. Fetch price for namespace.

func (*BnsGetNamespacePriceResponse) MarshalJSON

func (b *BnsGetNamespacePriceResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BnsGetNamespacePriceResponse. It customizes the JSON marshaling process for BnsGetNamespacePriceResponse objects.

func (*BnsGetNamespacePriceResponse) UnmarshalJSON

func (b *BnsGetNamespacePriceResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BnsGetNamespacePriceResponse. It customizes the JSON unmarshaling process for BnsGetNamespacePriceResponse objects.

type BnsNamesOwnByAddressResponse

type BnsNamesOwnByAddressResponse struct {
	Names []string `json:"names"`
}

BnsNamesOwnByAddressResponse represents a BnsNamesOwnByAddressResponse struct. Retrieves a list of names owned by the address provided.

func (*BnsNamesOwnByAddressResponse) MarshalJSON

func (b *BnsNamesOwnByAddressResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BnsNamesOwnByAddressResponse. It customizes the JSON marshaling process for BnsNamesOwnByAddressResponse objects.

func (*BnsNamesOwnByAddressResponse) UnmarshalJSON

func (b *BnsNamesOwnByAddressResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BnsNamesOwnByAddressResponse. It customizes the JSON unmarshaling process for BnsNamesOwnByAddressResponse objects.

type BurnBlock

type BurnBlock struct {
	// Unix timestamp (in seconds) indicating when this block was mined.
	BurnBlockTime float64 `json:"burn_block_time"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
	BurnBlockTimeIso string `json:"burn_block_time_iso"`
	// Hash of the anchor chain block
	BurnBlockHash string `json:"burn_block_hash"`
	// Height of the anchor chain block
	BurnBlockHeight int `json:"burn_block_height"`
	// Hashes of the Stacks blocks included in the burn block
	StacksBlocks []string `json:"stacks_blocks"`
}

BurnBlock represents a BurnBlock struct. A burn block

func (*BurnBlock) MarshalJSON

func (b *BurnBlock) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BurnBlock. It customizes the JSON marshaling process for BurnBlock objects.

func (*BurnBlock) UnmarshalJSON

func (b *BurnBlock) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BurnBlock. It customizes the JSON unmarshaling process for BurnBlock objects.

type BurnBlockListResponse

type BurnBlockListResponse struct {
	// The number of burn blocks to return
	Limit int `json:"limit"`
	// The number to burn blocks to skip (starting at `0`)
	Offset int `json:"offset"`
	// The number of burn blocks available (regardless of filter parameters)
	Total   int         `json:"total"`
	Results []BurnBlock `json:"results"`
}

BurnBlockListResponse represents a BurnBlockListResponse struct. GET request that returns burn blocks

func (*BurnBlockListResponse) MarshalJSON

func (b *BurnBlockListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BurnBlockListResponse. It customizes the JSON marshaling process for BurnBlockListResponse objects.

func (*BurnBlockListResponse) UnmarshalJSON

func (b *BurnBlockListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BurnBlockListResponse. It customizes the JSON unmarshaling process for BurnBlockListResponse objects.

type BurnchainReward

type BurnchainReward struct {
	// Set to `true` if block corresponds to the canonical burchchain tip
	Canonical bool `json:"canonical"`
	// The hash representing the burnchain block
	BurnBlockHash string `json:"burn_block_hash"`
	// Height of the burnchain block
	BurnBlockHeight int `json:"burn_block_height"`
	// The total amount of burnchain tokens burned for this burnchain block, in the smallest unit (e.g. satoshis for Bitcoin)
	BurnAmount string `json:"burn_amount"`
	// The recipient address that received the burnchain rewards, in the format native to the burnchain (e.g. B58 encoded for Bitcoin)
	RewardRecipient string `json:"reward_recipient"`
	// The amount of burnchain tokens rewarded to the recipient, in the smallest unit (e.g. satoshis for Bitcoin)
	RewardAmount string `json:"reward_amount"`
	// The index position of the reward entry, useful for ordering when there's more than one recipient per burnchain block
	RewardIndex int `json:"reward_index"`
}

BurnchainReward represents a BurnchainReward struct. Reward payment made on the burnchain

func (*BurnchainReward) MarshalJSON

func (b *BurnchainReward) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BurnchainReward. It customizes the JSON marshaling process for BurnchainReward objects.

func (*BurnchainReward) UnmarshalJSON

func (b *BurnchainReward) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BurnchainReward. It customizes the JSON unmarshaling process for BurnchainReward objects.

type BurnchainRewardListResponse

type BurnchainRewardListResponse struct {
	// The number of burnchain rewards to return
	Limit int `json:"limit"`
	// The number to burnchain rewards to skip (starting at `0`)
	Offset  int               `json:"offset"`
	Results []BurnchainReward `json:"results"`
}

BurnchainRewardListResponse represents a BurnchainRewardListResponse struct. GET request that returns blocks

func (*BurnchainRewardListResponse) MarshalJSON

func (b *BurnchainRewardListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BurnchainRewardListResponse. It customizes the JSON marshaling process for BurnchainRewardListResponse objects.

func (*BurnchainRewardListResponse) UnmarshalJSON

func (b *BurnchainRewardListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BurnchainRewardListResponse. It customizes the JSON unmarshaling process for BurnchainRewardListResponse objects.

type BurnchainRewardSlotHolder

type BurnchainRewardSlotHolder struct {
	// Set to `true` if block corresponds to the canonical burchchain tip
	Canonical bool `json:"canonical"`
	// The hash representing the burnchain block
	BurnBlockHash string `json:"burn_block_hash"`
	// Height of the burnchain block
	BurnBlockHeight int `json:"burn_block_height"`
	// The recipient address that validly received PoX commitments, in the format native to the burnchain (e.g. B58 encoded for Bitcoin)
	Address string `json:"address"`
	// The index position of the reward entry, useful for ordering when there's more than one slot per burnchain block
	SlotIndex int `json:"slot_index"`
}

BurnchainRewardSlotHolder represents a BurnchainRewardSlotHolder struct. Reward slot holder on the burnchain

func (*BurnchainRewardSlotHolder) MarshalJSON

func (b *BurnchainRewardSlotHolder) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BurnchainRewardSlotHolder. It customizes the JSON marshaling process for BurnchainRewardSlotHolder objects.

func (*BurnchainRewardSlotHolder) UnmarshalJSON

func (b *BurnchainRewardSlotHolder) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BurnchainRewardSlotHolder. It customizes the JSON unmarshaling process for BurnchainRewardSlotHolder objects.

type BurnchainRewardSlotHolderListResponse

type BurnchainRewardSlotHolderListResponse struct {
	// The number of items to return
	Limit int `json:"limit"`
	// The number of items to skip (starting at `0`)
	Offset int `json:"offset"`
	// Total number of available items
	Total   int                         `json:"total"`
	Results []BurnchainRewardSlotHolder `json:"results"`
}

BurnchainRewardSlotHolderListResponse represents a BurnchainRewardSlotHolderListResponse struct. GET request that returns reward slot holders

func (*BurnchainRewardSlotHolderListResponse) MarshalJSON

func (b *BurnchainRewardSlotHolderListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BurnchainRewardSlotHolderListResponse. It customizes the JSON marshaling process for BurnchainRewardSlotHolderListResponse objects.

func (*BurnchainRewardSlotHolderListResponse) UnmarshalJSON

func (b *BurnchainRewardSlotHolderListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BurnchainRewardSlotHolderListResponse. It customizes the JSON unmarshaling process for BurnchainRewardSlotHolderListResponse objects.

type BurnchainRewardsTotal

type BurnchainRewardsTotal struct {
	// The recipient address that received the burnchain rewards, in the format native to the burnchain (e.g. B58 encoded for Bitcoin)
	RewardRecipient string `json:"reward_recipient"`
	// The total amount of burnchain tokens rewarded to the recipient, in the smallest unit (e.g. satoshis for Bitcoin)
	RewardAmount string `json:"reward_amount"`
}

BurnchainRewardsTotal represents a BurnchainRewardsTotal struct. Total burnchain rewards made to a recipient

func (*BurnchainRewardsTotal) MarshalJSON

func (b *BurnchainRewardsTotal) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BurnchainRewardsTotal. It customizes the JSON marshaling process for BurnchainRewardsTotal objects.

func (*BurnchainRewardsTotal) UnmarshalJSON

func (b *BurnchainRewardsTotal) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BurnchainRewardsTotal. It customizes the JSON unmarshaling process for BurnchainRewardsTotal objects.

type CauseEnum

type CauseEnum string

CauseEnum is a string enum. Cause of change in mining tenure. Depending on cause, tenure can be ended or extended.

const (
	CauseEnum_BLOCKFOUND CauseEnum = "block_found"
	CauseEnum_EXTENDED   CauseEnum = "extended"
)

type ChainTip

type ChainTip struct {
	// the current block height
	BlockHeight int `json:"block_height"`
	// the current block hash
	BlockHash string `json:"block_hash"`
	// the current index block hash
	IndexBlockHash string `json:"index_block_hash"`
	// the current microblock hash
	MicroblockHash *string `json:"microblock_hash,omitempty"`
	// the current microblock sequence number
	MicroblockSequence *int `json:"microblock_sequence,omitempty"`
	// the current burn chain block height
	BurnBlockHeight int `json:"burn_block_height"`
}

ChainTip represents a ChainTip struct. Current chain tip information

func (*ChainTip) MarshalJSON

func (c *ChainTip) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChainTip. It customizes the JSON marshaling process for ChainTip objects.

func (*ChainTip) UnmarshalJSON

func (c *ChainTip) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChainTip. It customizes the JSON unmarshaling process for ChainTip objects.

type CoinActionEnum

type CoinActionEnum string

CoinActionEnum is a string enum. CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once.

const (
	CoinActionEnum_COINCREATED CoinActionEnum = "coin_created"
	CoinActionEnum_COINSPENT   CoinActionEnum = "coin_spent"
)

type CoinIdentifier

type CoinIdentifier struct {
	// Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index.
	Identifier string `json:"identifier"`
}

CoinIdentifier represents a CoinIdentifier struct. CoinIdentifier uniquely identifies a Coin.

func (*CoinIdentifier) MarshalJSON

func (c *CoinIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CoinIdentifier. It customizes the JSON marshaling process for CoinIdentifier objects.

func (*CoinIdentifier) UnmarshalJSON

func (c *CoinIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CoinIdentifier. It customizes the JSON unmarshaling process for CoinIdentifier objects.

type CoinbasePayload

type CoinbasePayload struct {
	// Hex encoded 32-byte scratch space for block leader's use
	Data string `json:"data"`
	// A principal that will receive the miner rewards for this coinbase transaction. Can be either a standard principal or contract principal. Only specified for `coinbase-to-alt-recipient` transaction types, otherwise null.
	AltRecipient Optional[string] `json:"alt_recipient"`
	// Hex encoded 80-byte VRF proof
	VrfProof Optional[string] `json:"vrf_proof"`
}

CoinbasePayload represents a CoinbasePayload struct.

func (*CoinbasePayload) MarshalJSON

func (c *CoinbasePayload) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CoinbasePayload. It customizes the JSON marshaling process for CoinbasePayload objects.

func (*CoinbasePayload) UnmarshalJSON

func (c *CoinbasePayload) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CoinbasePayload. It customizes the JSON unmarshaling process for CoinbasePayload objects.

type ContractCall

type ContractCall struct {
	// Contract identifier formatted as `<principaladdress>.<contract_name>`
	ContractId string `json:"contract_id"`
	// Name of the Clarity function to be invoked
	FunctionName string `json:"function_name"`
	// Function definition, including function name and type as well as parameter names and types
	FunctionSignature string `json:"function_signature"`
	// List of arguments used to invoke the function
	FunctionArgs []FunctionArg `json:"function_args,omitempty"`
}

ContractCall represents a ContractCall struct.

func (*ContractCall) MarshalJSON

func (c *ContractCall) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ContractCall. It customizes the JSON marshaling process for ContractCall objects.

func (*ContractCall) UnmarshalJSON

func (c *ContractCall) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ContractCall. It customizes the JSON unmarshaling process for ContractCall objects.

type ContractCall1

type ContractCall1 struct {
	NoPriority     int `json:"no_priority"`
	LowPriority    int `json:"low_priority"`
	MediumPriority int `json:"medium_priority"`
	HighPriority   int `json:"high_priority"`
}

ContractCall1 represents a ContractCall1 struct.

func (*ContractCall1) MarshalJSON

func (c *ContractCall1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ContractCall1. It customizes the JSON marshaling process for ContractCall1 objects.

func (*ContractCall1) UnmarshalJSON

func (c *ContractCall1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ContractCall1. It customizes the JSON unmarshaling process for ContractCall1 objects.

type ContractCall2

type ContractCall2 struct {
	P25 *float64 `json:"p25"`
	P50 *float64 `json:"p50"`
	P75 *float64 `json:"p75"`
	P95 *float64 `json:"p95"`
}

ContractCall2 represents a ContractCall2 struct.

func (*ContractCall2) MarshalJSON

func (c *ContractCall2) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ContractCall2. It customizes the JSON marshaling process for ContractCall2 objects.

func (*ContractCall2) UnmarshalJSON

func (c *ContractCall2) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ContractCall2. It customizes the JSON unmarshaling process for ContractCall2 objects.

type ContractInterfaceResponse

type ContractInterfaceResponse struct {
	// List of defined methods
	Functions []interface{} `json:"functions"`
	// List of defined variables
	Variables []interface{} `json:"variables"`
	// List of defined data-maps
	Maps []interface{} `json:"maps"`
	// List of fungible tokens in the contract
	FungibleTokens []interface{} `json:"fungible_tokens"`
	// List of non-fungible tokens in the contract
	NonFungibleTokens []interface{} `json:"non_fungible_tokens"`
}

ContractInterfaceResponse represents a ContractInterfaceResponse struct. GET request to get contract interface

func (*ContractInterfaceResponse) MarshalJSON

func (c *ContractInterfaceResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ContractInterfaceResponse. It customizes the JSON marshaling process for ContractInterfaceResponse objects.

func (*ContractInterfaceResponse) UnmarshalJSON

func (c *ContractInterfaceResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ContractInterfaceResponse. It customizes the JSON unmarshaling process for ContractInterfaceResponse objects.

type ContractListResponse

type ContractListResponse struct {
	// The number of contracts to return
	Limit int `json:"limit"`
	// The number to contracts to skip (starting at `0`)
	Offset  int              `json:"offset"`
	Results []SmartContract7 `json:"results"`
}

ContractListResponse represents a ContractListResponse struct. GET list of contracts

func (*ContractListResponse) MarshalJSON

func (c *ContractListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ContractListResponse. It customizes the JSON marshaling process for ContractListResponse objects.

func (*ContractListResponse) UnmarshalJSON

func (c *ContractListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ContractListResponse. It customizes the JSON unmarshaling process for ContractListResponse objects.

type ContractLog

type ContractLog struct {
	ContractId string `json:"contract_id"`
	Topic      string `json:"topic"`
	Value      Value  `json:"value"`
}

ContractLog represents a ContractLog struct.

func (*ContractLog) MarshalJSON

func (c *ContractLog) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ContractLog. It customizes the JSON marshaling process for ContractLog objects.

func (*ContractLog) UnmarshalJSON

func (c *ContractLog) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ContractLog. It customizes the JSON unmarshaling process for ContractLog objects.

type ContractSourceResponse

type ContractSourceResponse struct {
	Source        string `json:"source"`
	PublishHeight int    `json:"publish_height"`
	Proof         string `json:"proof"`
}

ContractSourceResponse represents a ContractSourceResponse struct. GET request to get contract source

func (*ContractSourceResponse) MarshalJSON

func (c *ContractSourceResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ContractSourceResponse. It customizes the JSON marshaling process for ContractSourceResponse objects.

func (*ContractSourceResponse) UnmarshalJSON

func (c *ContractSourceResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ContractSourceResponse. It customizes the JSON unmarshaling process for ContractSourceResponse objects.

type CoreNodeInfoResponse

type CoreNodeInfoResponse struct {
	// identifies the version number for the networking communication, this should not change while a node is running, and will only change if there's an upgrade
	PeerVersion int `json:"peer_version"`
	// is a hash used to identify the burnchain view for a node. it incorporates bitcoin chain information and PoX information. nodes that disagree on this value will appear to each other as forks. this value will change after every block
	PoxConsensus string `json:"pox_consensus"`
	// latest bitcoin chain height
	BurnBlockHeight int `json:"burn_block_height"`
	// same as burn_consensus, but evaluated at stable_burn_block_height
	StablePoxConsensus string `json:"stable_pox_consensus"`
	// leftover from stacks 1.0, basically always burn_block_height - 1
	StableBurnBlockHeight int `json:"stable_burn_block_height"`
	// is a version descriptor
	ServerVersion string `json:"server_version"`
	// is similar to peer_version and will be used to differentiate between different testnets. this value will be different between mainnet and testnet. once launched, this value will not change
	NetworkId int `json:"network_id"`
	// same as network_id, but for bitcoin
	ParentNetworkId int `json:"parent_network_id"`
	// the latest Stacks chain height. Stacks forks can occur independent of the Bitcoin chain, that height doesn't increase 1-to-1 with the Bitcoin height
	StacksTipHeight int `json:"stacks_tip_height"`
	// the best known block hash for the Stack chain (not including any pending microblocks)
	StacksTip string `json:"stacks_tip"`
	// the burn chain (i.e., bitcoin) consensus hash at the time that stacks_tip was mined
	StacksTipConsensusHash string `json:"stacks_tip_consensus_hash"`
	// the latest microblock hash if any microblocks were processed. if no microblock has been processed for the current block, a 000.., hex array is returned
	UnanchoredTip string `json:"unanchored_tip"`
	// the block height at which the testnet network will be reset. not applicable for mainnet
	ExitAtBlockHeight int `json:"exit_at_block_height"`
}

CoreNodeInfoResponse represents a CoreNodeInfoResponse struct. GET request that core node information

func (*CoreNodeInfoResponse) MarshalJSON

func (c *CoreNodeInfoResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CoreNodeInfoResponse. It customizes the JSON marshaling process for CoreNodeInfoResponse objects.

func (*CoreNodeInfoResponse) UnmarshalJSON

func (c *CoreNodeInfoResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CoreNodeInfoResponse. It customizes the JSON unmarshaling process for CoreNodeInfoResponse objects.

type CoreNodePoxResponse

type CoreNodePoxResponse struct {
	ContractId                 string `json:"contract_id"`
	FirstBurnchainBlockHeight  int    `json:"first_burnchain_block_height"`
	MinAmountUstx              int    `json:"min_amount_ustx"`
	RegistrationWindowLength   int    `json:"registration_window_length"`
	RejectionFraction          int    `json:"rejection_fraction"`
	RewardCycleId              int    `json:"reward_cycle_id"`
	RewardCycleLength          int    `json:"reward_cycle_length"`
	RejectionVotesLeftRequired int    `json:"rejection_votes_left_required"`
	TotalLiquidSupplyUstx      int    `json:"total_liquid_supply_ustx"`
}

CoreNodePoxResponse represents a CoreNodePoxResponse struct. Get Proof of Transfer (PoX) information

func (*CoreNodePoxResponse) MarshalJSON

func (c *CoreNodePoxResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CoreNodePoxResponse. It customizes the JSON marshaling process for CoreNodePoxResponse objects.

func (*CoreNodePoxResponse) UnmarshalJSON

func (c *CoreNodePoxResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CoreNodePoxResponse. It customizes the JSON unmarshaling process for CoreNodePoxResponse objects.

type CurveTypeEnum

type CurveTypeEnum string

CurveTypeEnum is a string enum. CurveType is the type of cryptographic curve associated with a PublicKey.

const (
	CurveTypeEnum_SECP256K1    CurveTypeEnum = "secp256k1"
	CurveTypeEnum_EDWARDS25519 CurveTypeEnum = "edwards25519"
)

type Details

type Details struct {
	Address *string `json:"address,omitempty"`
	Error   *string `json:"error,omitempty"`
}

Details represents a Details struct. Often times it is useful to return context specific to the request that caused the error (i.e. a sample of the stack trace or impacted account) in addition to the standard error message.

func (*Details) MarshalJSON

func (d *Details) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Details. It customizes the JSON marshaling process for Details objects.

func (*Details) UnmarshalJSON

func (d *Details) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Details. It customizes the JSON unmarshaling process for Details objects.

type EntityTypeEnum

type EntityTypeEnum string

EntityTypeEnum is a string enum. Shows the currenty category of entity it is searched in.

const (
	EntityTypeEnum_STANDARDADDRESS EntityTypeEnum = "standard_address"
	EntityTypeEnum_UNKNOWNHASH     EntityTypeEnum = "unknown_hash"
	EntityTypeEnum_CONTRACTADDRESS EntityTypeEnum = "contract_address"
	EntityTypeEnum_INVALIDTERM     EntityTypeEnum = "invalid_term"
)

type EstimatedCost

type EstimatedCost struct {
	ReadCount   int `json:"read_count"`
	ReadLength  int `json:"read_length"`
	Runtime     int `json:"runtime"`
	WriteCount  int `json:"write_count"`
	WriteLength int `json:"write_length"`
}

EstimatedCost represents a EstimatedCost struct.

func (*EstimatedCost) MarshalJSON

func (e *EstimatedCost) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EstimatedCost. It customizes the JSON marshaling process for EstimatedCost objects.

func (*EstimatedCost) UnmarshalJSON

func (e *EstimatedCost) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EstimatedCost. It customizes the JSON unmarshaling process for EstimatedCost objects.

type Estimation

type Estimation struct {
	FeeRate *float64 `json:"fee_rate,omitempty"`
	Fee     *float64 `json:"fee,omitempty"`
}

Estimation represents a Estimation struct.

func (*Estimation) MarshalJSON

func (e *Estimation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Estimation. It customizes the JSON marshaling process for Estimation objects.

func (*Estimation) UnmarshalJSON

func (e *Estimation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Estimation. It customizes the JSON unmarshaling process for Estimation objects.

type EventTypeEnum

type EventTypeEnum string

EventTypeEnum is a string enum.

const (
	EventTypeEnum_SMARTCONTRACTLOG EventTypeEnum = "smart_contract_log"
)

type ExtendedV1FaucetsBtcRequest

type ExtendedV1FaucetsBtcRequest struct {
	// BTC testnet address
	Address *string `json:"address,omitempty"`
}

ExtendedV1FaucetsBtcRequest represents a ExtendedV1FaucetsBtcRequest struct.

func (*ExtendedV1FaucetsBtcRequest) MarshalJSON

func (e *ExtendedV1FaucetsBtcRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ExtendedV1FaucetsBtcRequest. It customizes the JSON marshaling process for ExtendedV1FaucetsBtcRequest objects.

func (*ExtendedV1FaucetsBtcRequest) UnmarshalJSON

func (e *ExtendedV1FaucetsBtcRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ExtendedV1FaucetsBtcRequest. It customizes the JSON unmarshaling process for ExtendedV1FaucetsBtcRequest objects.

type FeeRate

type FeeRate struct {
	FeeRate int `json:"fee_rate"`
}

FeeRate represents a FeeRate struct. Get fee rate information.

func (*FeeRate) MarshalJSON

func (f *FeeRate) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FeeRate. It customizes the JSON marshaling process for FeeRate objects.

func (*FeeRate) UnmarshalJSON

func (f *FeeRate) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FeeRate. It customizes the JSON unmarshaling process for FeeRate objects.

type FeeRateRequest

type FeeRateRequest struct {
	// A serialized transaction
	Transaction string `json:"transaction"`
}

FeeRateRequest represents a FeeRateRequest struct. Request to fetch fee for a transaction

func (*FeeRateRequest) MarshalJSON

func (f *FeeRateRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FeeRateRequest. It customizes the JSON marshaling process for FeeRateRequest objects.

func (*FeeRateRequest) UnmarshalJSON

func (f *FeeRateRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FeeRateRequest. It customizes the JSON unmarshaling process for FeeRateRequest objects.

type FileWrapper

type FileWrapper = https.FileWrapper

FileWrapper is a struct that represents a file along with its metadata such as the file content, file name, and file headers.

type FtBalance

type FtBalance struct {
	Balance       string `json:"balance"`
	TotalSent     string `json:"total_sent"`
	TotalReceived string `json:"total_received"`
}

FtBalance represents a FtBalance struct.

func (*FtBalance) MarshalJSON

func (f *FtBalance) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FtBalance. It customizes the JSON marshaling process for FtBalance objects.

func (*FtBalance) UnmarshalJSON

func (f *FtBalance) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FtBalance. It customizes the JSON unmarshaling process for FtBalance objects.

type FtTransfer

type FtTransfer struct {
	// Fungible Token asset identifier.
	AssetIdentifier string `json:"asset_identifier"`
	// Amount transferred as an integer string. This balance does not factor in possible SIP-010 decimals.
	Amount string `json:"amount"`
	// Principal that sent the asset.
	Sender *string `json:"sender,omitempty"`
	// Principal that received the asset.
	Recipient *string `json:"recipient,omitempty"`
}

FtTransfer represents a FtTransfer struct.

func (*FtTransfer) MarshalJSON

func (f *FtTransfer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FtTransfer. It customizes the JSON marshaling process for FtTransfer objects.

func (*FtTransfer) UnmarshalJSON

func (f *FtTransfer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FtTransfer. It customizes the JSON unmarshaling process for FtTransfer objects.

type FunctionArg

type FunctionArg struct {
	Hex  string `json:"hex"`
	Repr string `json:"repr"`
	Name string `json:"name"`
	Type string `json:"type"`
}

FunctionArg represents a FunctionArg struct.

func (*FunctionArg) MarshalJSON

func (f *FunctionArg) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FunctionArg. It customizes the JSON marshaling process for FunctionArg objects.

func (*FunctionArg) UnmarshalJSON

func (f *FunctionArg) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FunctionArg. It customizes the JSON unmarshaling process for FunctionArg objects.

type GetRawTransactionResult

type GetRawTransactionResult struct {
	// A hex encoded serialized transaction
	RawTx string `json:"raw_tx"`
}

GetRawTransactionResult represents a GetRawTransactionResult struct. GET raw transaction

func (*GetRawTransactionResult) MarshalJSON

func (g *GetRawTransactionResult) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GetRawTransactionResult. It customizes the JSON marshaling process for GetRawTransactionResult objects.

func (*GetRawTransactionResult) UnmarshalJSON

func (g *GetRawTransactionResult) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GetRawTransactionResult. It customizes the JSON unmarshaling process for GetRawTransactionResult objects.

type GetStxSupplyLegacyFormatResponse

type GetStxSupplyLegacyFormatResponse struct {
	// String quoted decimal number of the percentage of STX that have unlocked
	UnlockedPercent string `json:"unlockedPercent"`
	// String quoted decimal number of the total possible number of STX
	TotalStacks string `json:"totalStacks"`
	// Same as `totalStacks` but formatted with comma thousands separators
	TotalStacksFormatted string `json:"totalStacksFormatted"`
	// String quoted decimal number of the STX that have been mined or unlocked
	UnlockedSupply string `json:"unlockedSupply"`
	// Same as `unlockedSupply` but formatted with comma thousands separators
	UnlockedSupplyFormatted string `json:"unlockedSupplyFormatted"`
	// The block height at which this information was queried
	BlockHeight string `json:"blockHeight"`
}

GetStxSupplyLegacyFormatResponse represents a GetStxSupplyLegacyFormatResponse struct. GET request that returns network target block times

func (*GetStxSupplyLegacyFormatResponse) MarshalJSON

func (g *GetStxSupplyLegacyFormatResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GetStxSupplyLegacyFormatResponse. It customizes the JSON marshaling process for GetStxSupplyLegacyFormatResponse objects.

func (*GetStxSupplyLegacyFormatResponse) UnmarshalJSON

func (g *GetStxSupplyLegacyFormatResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GetStxSupplyLegacyFormatResponse. It customizes the JSON unmarshaling process for GetStxSupplyLegacyFormatResponse objects.

type GetStxSupplyResponse

type GetStxSupplyResponse struct {
	// String quoted decimal number of the percentage of STX that have unlocked
	UnlockedPercent string `json:"unlocked_percent"`
	// String quoted decimal number of the total possible number of STX
	TotalStx string `json:"total_stx"`
	// String quoted decimal number of the STX that have been mined or unlocked
	UnlockedStx string `json:"unlocked_stx"`
	// The block height at which this information was queried
	BlockHeight int `json:"block_height"`
}

GetStxSupplyResponse represents a GetStxSupplyResponse struct. GET request that returns network target block times

func (*GetStxSupplyResponse) MarshalJSON

func (g *GetStxSupplyResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GetStxSupplyResponse. It customizes the JSON marshaling process for GetStxSupplyResponse objects.

func (*GetStxSupplyResponse) UnmarshalJSON

func (g *GetStxSupplyResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GetStxSupplyResponse. It customizes the JSON unmarshaling process for GetStxSupplyResponse objects.

type InboundStxTransfer

type InboundStxTransfer struct {
	// Principal that sent this transfer
	Sender string `json:"sender"`
	// Transfer amount in micro-STX as integer string
	Amount string `json:"amount"`
	// Hex encoded memo bytes associated with the transfer
	Memo string `json:"memo"`
	// Block height at which this transfer occurred
	BlockHeight float64 `json:"block_height"`
	// The transaction ID in which this transfer occurred
	TxId string `json:"tx_id"`
	// Indicates if the transfer is from a stx-transfer transaction or a contract-call transaction
	TransferType TransferTypeEnum `json:"transfer_type"`
	// Index of the transaction within a block
	TxIndex float64 `json:"tx_index"`
}

InboundStxTransfer represents a InboundStxTransfer struct. A inbound STX transfer with a memo

func (*InboundStxTransfer) MarshalJSON

func (i *InboundStxTransfer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InboundStxTransfer. It customizes the JSON marshaling process for InboundStxTransfer objects.

func (*InboundStxTransfer) UnmarshalJSON

func (i *InboundStxTransfer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InboundStxTransfer. It customizes the JSON unmarshaling process for InboundStxTransfer objects.

type MapEntryResponse

type MapEntryResponse struct {
	// Hex-encoded string of clarity value. It is always an optional tuple.
	Data string `json:"data"`
	// Hex-encoded string of the MARF proof for the data
	Proof *string `json:"proof,omitempty"`
}

MapEntryResponse represents a MapEntryResponse struct. Response of get data map entry request

func (*MapEntryResponse) MarshalJSON

func (m *MapEntryResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MapEntryResponse. It customizes the JSON marshaling process for MapEntryResponse objects.

func (*MapEntryResponse) UnmarshalJSON

func (m *MapEntryResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MapEntryResponse. It customizes the JSON unmarshaling process for MapEntryResponse objects.

type MempoolFeePriorities

type MempoolFeePriorities struct {
	All           All             `json:"all"`
	TokenTransfer *TokenTransfer1 `json:"token_transfer,omitempty"`
	SmartContract *SmartContract1 `json:"smart_contract,omitempty"`
	ContractCall  *ContractCall1  `json:"contract_call,omitempty"`
}

MempoolFeePriorities represents a MempoolFeePriorities struct. GET request that returns fee priorities from mempool transactions

func (*MempoolFeePriorities) MarshalJSON

func (m *MempoolFeePriorities) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MempoolFeePriorities. It customizes the JSON marshaling process for MempoolFeePriorities objects.

func (*MempoolFeePriorities) UnmarshalJSON

func (m *MempoolFeePriorities) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MempoolFeePriorities. It customizes the JSON unmarshaling process for MempoolFeePriorities objects.

type MempoolTransaction

type MempoolTransaction struct {
	// Transaction ID
	TxId *string `json:"tx_id,omitempty"`
	// Used for ordering the transactions originating from and paying from an account. The nonce ensures that a transaction is processed at most once. The nonce counts the number of times an account's owner(s) have authorized a transaction. The first transaction from an account will have a nonce value equal to 0, the second will have a nonce value equal to 1, and so on.
	Nonce *int `json:"nonce,omitempty"`
	// Transaction fee as Integer string (64-bit unsigned integer).
	FeeRate *string `json:"fee_rate,omitempty"`
	// Address of the transaction initiator
	SenderAddress *string `json:"sender_address,omitempty"`
	SponsorNonce  *int    `json:"sponsor_nonce,omitempty"`
	// Denotes whether the originating account is the same as the paying account
	Sponsored         *bool                  `json:"sponsored,omitempty"`
	SponsorAddress    *string                `json:"sponsor_address,omitempty"`
	PostConditionMode *PostConditionModeEnum `json:"post_condition_mode,omitempty"`
	PostConditions    []PostCondition1       `json:"post_conditions,omitempty"`
	// `on_chain_only`: the transaction MUST be included in an anchored block, `off_chain_only`: the transaction MUST be included in a microblock, `any`: the leader can choose where to include the transaction.
	AnchorMode *TransactionAnchorModeTypeEnum `json:"anchor_mode,omitempty"`
	// Status of the transaction
	TxStatus *MempoolTransactionStatusEnum `json:"tx_status,omitempty"`
	// A unix timestamp (in seconds) indicating when the transaction broadcast was received by the node.
	ReceiptTime *float64 `json:"receipt_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when the transaction broadcast was received by the node.
	ReceiptTimeIso      *string              `json:"receipt_time_iso,omitempty"`
	TxType              *TxTypeEnum          `json:"tx_type,omitempty"`
	TokenTransfer       *TokenTransfer       `json:"token_transfer,omitempty"`
	SmartContract       *SmartContract       `json:"smart_contract,omitempty"`
	ContractCall        *ContractCall        `json:"contract_call,omitempty"`
	PoisonMicroblock    *PoisonMicroblock    `json:"poison_microblock,omitempty"`
	CoinbasePayload     *CoinbasePayload     `json:"coinbase_payload,omitempty"`
	TenureChangePayload *TenureChangePayload `json:"tenure_change_payload,omitempty"`
}

MempoolTransaction represents a MempoolTransaction struct. Describes all transaction types on Stacks 2.0 blockchain

func (*MempoolTransaction) MarshalJSON

func (m *MempoolTransaction) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MempoolTransaction. It customizes the JSON marshaling process for MempoolTransaction objects.

func (*MempoolTransaction) UnmarshalJSON

func (m *MempoolTransaction) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MempoolTransaction. It customizes the JSON unmarshaling process for MempoolTransaction objects.

type MempoolTransactionListResponse

type MempoolTransactionListResponse struct {
	Limit   int                  `json:"limit"`
	Offset  int                  `json:"offset"`
	Total   int                  `json:"total"`
	Results []MempoolTransaction `json:"results"`
}

MempoolTransactionListResponse represents a MempoolTransactionListResponse struct. GET request that returns transactions

func (*MempoolTransactionListResponse) MarshalJSON

func (m *MempoolTransactionListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MempoolTransactionListResponse. It customizes the JSON marshaling process for MempoolTransactionListResponse objects.

func (*MempoolTransactionListResponse) UnmarshalJSON

func (m *MempoolTransactionListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MempoolTransactionListResponse. It customizes the JSON unmarshaling process for MempoolTransactionListResponse objects.

type MempoolTransactionStatsResponse

type MempoolTransactionStatsResponse struct {
	// Number of tranasction in the mempool, broken down by transaction type.
	TxTypeCounts TxTypeCounts `json:"tx_type_counts"`
	// The simple mean (average) transaction fee, broken down by transaction type. Note that this does not factor in actual execution costs. The average fee is not a reliable metric for calculating a fee for a new transaction.
	TxSimpleFeeAverages TxSimpleFeeAverages `json:"tx_simple_fee_averages"`
	// The average time (in blocks) that transactions have lived in the mempool. The start block height is simply the current chain-tip of when the attached Stacks node receives the transaction. This timing can be different across Stacks nodes / API instances due to propagation timing differences in the p2p network.
	TxAges TxAges `json:"tx_ages"`
	// The average byte size of transactions in the mempool, broken down by transaction type.
	TxByteSizes TxByteSizes `json:"tx_byte_sizes"`
}

MempoolTransactionStatsResponse represents a MempoolTransactionStatsResponse struct. GET request that returns stats on mempool transactions

func (*MempoolTransactionStatsResponse) MarshalJSON

func (m *MempoolTransactionStatsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MempoolTransactionStatsResponse. It customizes the JSON marshaling process for MempoolTransactionStatsResponse objects.

func (*MempoolTransactionStatsResponse) UnmarshalJSON

func (m *MempoolTransactionStatsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MempoolTransactionStatsResponse. It customizes the JSON unmarshaling process for MempoolTransactionStatsResponse objects.

type MempoolTransactionStatusEnum

type MempoolTransactionStatusEnum string

MempoolTransactionStatusEnum is a string enum. Status of the transaction

const (
	MempoolTransactionStatusEnum_PENDING                    MempoolTransactionStatusEnum = "pending"
	MempoolTransactionStatusEnum_DROPPEDREPLACEBYFEE        MempoolTransactionStatusEnum = "dropped_replace_by_fee"
	MempoolTransactionStatusEnum_DROPPEDREPLACEACROSSFORK   MempoolTransactionStatusEnum = "dropped_replace_across_fork"
	MempoolTransactionStatusEnum_DROPPEDTOOEXPENSIVE        MempoolTransactionStatusEnum = "dropped_too_expensive"
	MempoolTransactionStatusEnum_DROPPEDSTALEGARBAGECOLLECT MempoolTransactionStatusEnum = "dropped_stale_garbage_collect"
	MempoolTransactionStatusEnum_DROPPEDPROBLEMATIC         MempoolTransactionStatusEnum = "dropped_problematic"
)

type Metadata1

type Metadata1 struct {
	// producer
	Producer string `json:"producer"`
}

Metadata1 represents a Metadata1 struct. Meta data from subnetwork identifier

func (*Metadata1) MarshalJSON

func (m *Metadata1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Metadata1. It customizes the JSON marshaling process for Metadata1 objects.

func (*Metadata1) UnmarshalJSON

func (m *Metadata1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Metadata1. It customizes the JSON unmarshaling process for Metadata1 objects.

type Metadata2

type Metadata2 struct {
	SequenceNumber int `json:"sequence_number"`
}

Metadata2 represents a Metadata2 struct. Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address.

func (*Metadata2) MarshalJSON

func (m *Metadata2) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Metadata2. It customizes the JSON marshaling process for Metadata2 objects.

func (*Metadata2) UnmarshalJSON

func (m *Metadata2) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Metadata2. It customizes the JSON unmarshaling process for Metadata2 objects.

type Metadata3

type Metadata3 struct {
	// STX token transfer memo.
	Memo *string `json:"memo,omitempty"`
	// The Size
	Size *int `json:"size,omitempty"`
	// The locktime
	LockTime *int `json:"lockTime,omitempty"`
}

Metadata3 represents a Metadata3 struct. Transactions that are related to other transactions (like a cross-shard transaction) should include the tranaction_identifier of these transactions in the metadata.

func (*Metadata3) MarshalJSON

func (m *Metadata3) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Metadata3. It customizes the JSON marshaling process for Metadata3 objects.

func (*Metadata3) UnmarshalJSON

func (m *Metadata3) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Metadata3. It customizes the JSON unmarshaling process for Metadata3 objects.

type Metadata4

type Metadata4 struct {
	TransactionsRoot string `json:"transactions_root"`
	Difficulty       string `json:"difficulty"`
}

Metadata4 represents a Metadata4 struct. meta data

func (*Metadata4) MarshalJSON

func (m *Metadata4) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Metadata4. It customizes the JSON marshaling process for Metadata4 objects.

func (*Metadata4) UnmarshalJSON

func (m *Metadata4) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Metadata4. It customizes the JSON unmarshaling process for Metadata4 objects.

type Metadata5

type Metadata5 struct {
	AccountSequence *int    `json:"account_sequence,omitempty"`
	RecentBlockHash *string `json:"recent_block_hash,omitempty"`
}

Metadata5 represents a Metadata5 struct.

func (*Metadata5) MarshalJSON

func (m *Metadata5) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Metadata5. It customizes the JSON marshaling process for Metadata5 objects.

func (*Metadata5) UnmarshalJSON

func (m *Metadata5) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Metadata5. It customizes the JSON unmarshaling process for Metadata5 objects.

type Microblock

type Microblock struct {
	// Set to `true` if the microblock corresponds to the canonical chain tip.
	Canonical bool `json:"canonical"`
	// Set to `true` if the microblock was not orphaned in a following anchor block. Defaults to `true` if the following anchor block has not yet been created.
	MicroblockCanonical bool `json:"microblock_canonical"`
	// The SHA512/256 hash of this microblock.
	MicroblockHash string `json:"microblock_hash"`
	// A hint to describe how to order a set of microblocks. Starts at 0.
	MicroblockSequence int `json:"microblock_sequence"`
	// The SHA512/256 hash of the previous signed microblock in this stream.
	MicroblockParentHash string `json:"microblock_parent_hash"`
	// The anchor block height that confirmed this microblock.
	BlockHeight int `json:"block_height"`
	// The height of the anchor block that preceded this microblock.
	ParentBlockHeight int `json:"parent_block_height"`
	// The hash of the anchor block that preceded this microblock.
	ParentBlockHash string `json:"parent_block_hash"`
	// The hash of the Bitcoin block that preceded this microblock.
	ParentBurnBlockHash string `json:"parent_burn_block_hash"`
	// The block timestamp of the Bitcoin block that preceded this microblock.
	ParentBurnBlockTime int `json:"parent_burn_block_time"`
	// The ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) formatted block time of the bitcoin block that preceded this microblock.
	ParentBurnBlockTimeIso string `json:"parent_burn_block_time_iso"`
	// The height of the Bitcoin block that preceded this microblock.
	ParentBurnBlockHeight int `json:"parent_burn_block_height"`
	// The hash of the anchor block that confirmed this microblock. This wil be empty for unanchored microblocks
	BlockHash *string `json:"block_hash"`
	// List of transactions included in the microblock
	Txs []string `json:"txs"`
}

Microblock represents a Microblock struct. A microblock

func (*Microblock) MarshalJSON

func (m *Microblock) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Microblock. It customizes the JSON marshaling process for Microblock objects.

func (*Microblock) UnmarshalJSON

func (m *Microblock) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Microblock. It customizes the JSON unmarshaling process for Microblock objects.

type MicroblockListResponse

type MicroblockListResponse struct {
	// The number of microblocks to return
	Limit int `json:"limit"`
	// The number to microblocks to skip (starting at `0`)
	Offset int `json:"offset"`
	// The number of microblocks available
	Total   int          `json:"total"`
	Results []Microblock `json:"results"`
}

MicroblockListResponse represents a MicroblockListResponse struct. GET request that returns microblocks

func (*MicroblockListResponse) MarshalJSON

func (m *MicroblockListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MicroblockListResponse. It customizes the JSON marshaling process for MicroblockListResponse objects.

func (*MicroblockListResponse) UnmarshalJSON

func (m *MicroblockListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MicroblockListResponse. It customizes the JSON unmarshaling process for MicroblockListResponse objects.

type NakamotoBlock

type NakamotoBlock struct {
	// Set to `true` if block corresponds to the canonical chain tip
	Canonical bool `json:"canonical"`
	// Height of the block
	Height int `json:"height"`
	// Hash representing the block
	Hash string `json:"hash"`
	// The only hash that can uniquely identify an anchored block or an unconfirmed state trie
	IndexBlockHash string `json:"index_block_hash"`
	// Hash of the parent block
	ParentBlockHash string `json:"parent_block_hash"`
	// Index block hash of the parent block
	ParentIndexBlockHash string `json:"parent_index_block_hash"`
	// Unix timestamp (in seconds) indicating when this block was mined.
	BurnBlockTime float64 `json:"burn_block_time"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) indicating when this block was mined.
	BurnBlockTimeIso string `json:"burn_block_time_iso"`
	// Hash of the anchor chain block
	BurnBlockHash string `json:"burn_block_hash"`
	// Height of the anchor chain block
	BurnBlockHeight int `json:"burn_block_height"`
	// Anchor chain transaction ID
	MinerTxid string `json:"miner_txid"`
	// Number of transactions included in the block
	TxCount int `json:"tx_count"`
	// Execution cost read count.
	ExecutionCostReadCount int `json:"execution_cost_read_count"`
	// Execution cost read length.
	ExecutionCostReadLength int `json:"execution_cost_read_length"`
	// Execution cost runtime.
	ExecutionCostRuntime int `json:"execution_cost_runtime"`
	// Execution cost write count.
	ExecutionCostWriteCount int `json:"execution_cost_write_count"`
	// Execution cost write length.
	ExecutionCostWriteLength int `json:"execution_cost_write_length"`
}

NakamotoBlock represents a NakamotoBlock struct. A block

func (*NakamotoBlock) MarshalJSON

func (n *NakamotoBlock) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NakamotoBlock. It customizes the JSON marshaling process for NakamotoBlock objects.

func (*NakamotoBlock) UnmarshalJSON

func (n *NakamotoBlock) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NakamotoBlock. It customizes the JSON unmarshaling process for NakamotoBlock objects.

type NakamotoBlockListResponse

type NakamotoBlockListResponse struct {
	// The number of blocks to return
	Limit int `json:"limit"`
	// The number to blocks to skip (starting at `0`)
	Offset int `json:"offset"`
	// The number of blocks available
	Total   int             `json:"total"`
	Results []NakamotoBlock `json:"results"`
}

NakamotoBlockListResponse represents a NakamotoBlockListResponse struct. GET request that returns blocks

func (*NakamotoBlockListResponse) MarshalJSON

func (n *NakamotoBlockListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NakamotoBlockListResponse. It customizes the JSON marshaling process for NakamotoBlockListResponse objects.

func (*NakamotoBlockListResponse) UnmarshalJSON

func (n *NakamotoBlockListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NakamotoBlockListResponse. It customizes the JSON unmarshaling process for NakamotoBlockListResponse objects.

type NetworkBlockTimesResponse

type NetworkBlockTimesResponse struct {
	Mainnet TargetBlockTime `json:"mainnet"`
	Testnet TargetBlockTime `json:"testnet"`
}

NetworkBlockTimesResponse represents a NetworkBlockTimesResponse struct. GET request that returns network target block times

func (*NetworkBlockTimesResponse) MarshalJSON

func (n *NetworkBlockTimesResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NetworkBlockTimesResponse. It customizes the JSON marshaling process for NetworkBlockTimesResponse objects.

func (*NetworkBlockTimesResponse) UnmarshalJSON

func (n *NetworkBlockTimesResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NetworkBlockTimesResponse. It customizes the JSON unmarshaling process for NetworkBlockTimesResponse objects.

type NetworkEnum

type NetworkEnum string

NetworkEnum is a string enum.

const (
	NetworkEnum_TESTNET NetworkEnum = "testnet"
	NetworkEnum_MAINNET NetworkEnum = "mainnet"
)

type NetworkIdentifier

type NetworkIdentifier struct {
	// Blockchain name
	Blockchain string `json:"blockchain"`
	// If a blockchain has a specific chain-id or network identifier, it should go in this field. It is up to the client to determine which network-specific identifier is mainnet or testnet.
	Network string `json:"network"`
	// In blockchains with sharded state, the SubNetworkIdentifier is required to query some object on a specific shard. This identifier is optional for all non-sharded blockchains.
	SubNetworkIdentifier *SubNetworkIdentifier `json:"sub_network_identifier,omitempty"`
}

NetworkIdentifier represents a NetworkIdentifier struct. The network_identifier specifies which network a particular object is associated with.

func (*NetworkIdentifier) MarshalJSON

func (n *NetworkIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NetworkIdentifier. It customizes the JSON marshaling process for NetworkIdentifier objects.

func (*NetworkIdentifier) UnmarshalJSON

func (n *NetworkIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NetworkIdentifier. It customizes the JSON unmarshaling process for NetworkIdentifier objects.

type NftBalance

type NftBalance struct {
	Count         string `json:"count"`
	TotalSent     string `json:"total_sent"`
	TotalReceived string `json:"total_received"`
}

NftBalance represents a NftBalance struct.

func (*NftBalance) MarshalJSON

func (n *NftBalance) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NftBalance. It customizes the JSON marshaling process for NftBalance objects.

func (*NftBalance) UnmarshalJSON

func (n *NftBalance) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NftBalance. It customizes the JSON unmarshaling process for NftBalance objects.

type NftTransfer

type NftTransfer struct {
	// Non Fungible Token asset identifier.
	AssetIdentifier string `json:"asset_identifier"`
	// Non Fungible Token asset value.
	Value Value11 `json:"value"`
	// Principal that sent the asset.
	Sender *string `json:"sender,omitempty"`
	// Principal that received the asset.
	Recipient *string `json:"recipient,omitempty"`
}

NftTransfer represents a NftTransfer struct.

func (*NftTransfer) MarshalJSON

func (n *NftTransfer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NftTransfer. It customizes the JSON marshaling process for NftTransfer objects.

func (*NftTransfer) UnmarshalJSON

func (n *NftTransfer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NftTransfer. It customizes the JSON unmarshaling process for NftTransfer objects.

type NonFungibleTokenHistoryEvent

type NonFungibleTokenHistoryEvent struct {
	Sender         Optional[string] `json:"sender"`
	Recipient      *string          `json:"recipient,omitempty"`
	EventIndex     *int             `json:"event_index,omitempty"`
	AssetEventType *string          `json:"asset_event_type,omitempty"`
	TxId           *string          `json:"tx_id,omitempty"`
	// Describes all transaction types on Stacks 2.0 blockchain
	Tx *Transaction `json:"tx,omitempty"`
}

NonFungibleTokenHistoryEvent represents a NonFungibleTokenHistoryEvent struct. Describes an event from the history of a Non-Fungible Token

func (*NonFungibleTokenHistoryEvent) MarshalJSON

func (n *NonFungibleTokenHistoryEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NonFungibleTokenHistoryEvent. It customizes the JSON marshaling process for NonFungibleTokenHistoryEvent objects.

func (*NonFungibleTokenHistoryEvent) UnmarshalJSON

func (n *NonFungibleTokenHistoryEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NonFungibleTokenHistoryEvent. It customizes the JSON unmarshaling process for NonFungibleTokenHistoryEvent objects.

type NonFungibleTokenHistoryEventList

type NonFungibleTokenHistoryEventList struct {
	// The number of events to return
	Limit int `json:"limit"`
	// The number to events to skip (starting at `0`)
	Offset int `json:"offset"`
	// The number of events available
	Total   int                            `json:"total"`
	Results []NonFungibleTokenHistoryEvent `json:"results"`
}

NonFungibleTokenHistoryEventList represents a NonFungibleTokenHistoryEventList struct. List of Non-Fungible Token history events

func (*NonFungibleTokenHistoryEventList) MarshalJSON

func (n *NonFungibleTokenHistoryEventList) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NonFungibleTokenHistoryEventList. It customizes the JSON marshaling process for NonFungibleTokenHistoryEventList objects.

func (*NonFungibleTokenHistoryEventList) UnmarshalJSON

func (n *NonFungibleTokenHistoryEventList) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NonFungibleTokenHistoryEventList. It customizes the JSON unmarshaling process for NonFungibleTokenHistoryEventList objects.

type NonFungibleTokenHolding

type NonFungibleTokenHolding struct {
	AssetIdentifier *string `json:"asset_identifier,omitempty"`
	// Non-Fungible Token value
	Value       *Value18 `json:"value,omitempty"`
	BlockHeight *float64 `json:"block_height,omitempty"`
	TxId        *string  `json:"tx_id,omitempty"`
	// Describes all transaction types on Stacks 2.0 blockchain
	Tx *Transaction `json:"tx,omitempty"`
}

NonFungibleTokenHolding represents a NonFungibleTokenHolding struct. Describes the ownership of a Non-Fungible Token

func (*NonFungibleTokenHolding) MarshalJSON

func (n *NonFungibleTokenHolding) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NonFungibleTokenHolding. It customizes the JSON marshaling process for NonFungibleTokenHolding objects.

func (*NonFungibleTokenHolding) UnmarshalJSON

func (n *NonFungibleTokenHolding) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NonFungibleTokenHolding. It customizes the JSON unmarshaling process for NonFungibleTokenHolding objects.

type NonFungibleTokenHoldingsList

type NonFungibleTokenHoldingsList struct {
	// The number of Non-Fungible Token holdings to return
	Limit int `json:"limit"`
	// The number to Non-Fungible Token holdings to skip (starting at `0`)
	Offset int `json:"offset"`
	// The number of Non-Fungible Token holdings available
	Total   int                       `json:"total"`
	Results []NonFungibleTokenHolding `json:"results"`
}

NonFungibleTokenHoldingsList represents a NonFungibleTokenHoldingsList struct. List of Non-Fungible Token holdings

func (*NonFungibleTokenHoldingsList) MarshalJSON

func (n *NonFungibleTokenHoldingsList) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NonFungibleTokenHoldingsList. It customizes the JSON marshaling process for NonFungibleTokenHoldingsList objects.

func (*NonFungibleTokenHoldingsList) UnmarshalJSON

func (n *NonFungibleTokenHoldingsList) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NonFungibleTokenHoldingsList. It customizes the JSON unmarshaling process for NonFungibleTokenHoldingsList objects.

type NonFungibleTokenMint

type NonFungibleTokenMint struct {
	Recipient  *string `json:"recipient,omitempty"`
	EventIndex *int    `json:"event_index,omitempty"`
	// Non-Fungible Token value
	Value *Value18 `json:"value,omitempty"`
	TxId  *string  `json:"tx_id,omitempty"`
	// Describes all transaction types on Stacks 2.0 blockchain
	Tx *Transaction `json:"tx,omitempty"`
}

NonFungibleTokenMint represents a NonFungibleTokenMint struct. Describes the minting of a Non-Fungible Token

func (*NonFungibleTokenMint) MarshalJSON

func (n *NonFungibleTokenMint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NonFungibleTokenMint. It customizes the JSON marshaling process for NonFungibleTokenMint objects.

func (*NonFungibleTokenMint) UnmarshalJSON

func (n *NonFungibleTokenMint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NonFungibleTokenMint. It customizes the JSON unmarshaling process for NonFungibleTokenMint objects.

type NonFungibleTokenMintList

type NonFungibleTokenMintList struct {
	// The number of mint events to return
	Limit int `json:"limit"`
	// The number to mint events to skip (starting at `0`)
	Offset int `json:"offset"`
	// The number of mint events available
	Total   int                    `json:"total"`
	Results []NonFungibleTokenMint `json:"results"`
}

NonFungibleTokenMintList represents a NonFungibleTokenMintList struct. List of Non-Fungible Token mint events for an asset identifier

func (*NonFungibleTokenMintList) MarshalJSON

func (n *NonFungibleTokenMintList) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NonFungibleTokenMintList. It customizes the JSON marshaling process for NonFungibleTokenMintList objects.

func (*NonFungibleTokenMintList) UnmarshalJSON

func (n *NonFungibleTokenMintList) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NonFungibleTokenMintList. It customizes the JSON unmarshaling process for NonFungibleTokenMintList objects.

type Optional

type Optional[T any] struct {
	types.Optional[T]
}

Optional is a generic struct that allows any type to be used as optional and nullable. Optional.set is true when Optional.value is to be used.

func NewOptional

func NewOptional[T any](value *T) Optional[T]

NewOptional creates and returns an Optional instance with the given value set.

func (*Optional[T]) IsValueSet

func (o *Optional[T]) IsValueSet() bool

IsValueSet returns true if a value is set in the Optional, false otherwise.

func (*Optional[T]) SetValue

func (o *Optional[T]) SetValue(value *T)

SetValue sets the value of the Optional.

func (*Optional[T]) ShouldSetValue

func (o *Optional[T]) ShouldSetValue(set bool)

ShouldSetValue sets whether the value should be used or not.

func (*Optional[T]) Value

func (o *Optional[T]) Value() *T

Value returns the value stored in the Optional. It returns nil if no value is set.

type OrderByEnum

type OrderByEnum string

OrderByEnum is a string enum.

const (
	OrderByEnum_AGE  OrderByEnum = "age"
	OrderByEnum_SIZE OrderByEnum = "size"
	OrderByEnum_FEE  OrderByEnum = "fee"
)

type OrderEnum

type OrderEnum string

OrderEnum is a string enum.

const (
	OrderEnum_ASC  OrderEnum = "asc"
	OrderEnum_DESC OrderEnum = "desc"
)

type OtherTransactionIdentifier

type OtherTransactionIdentifier struct {
	// Any transactions that are attributable only to a block (ex: a block event) should use the hash of the block as the identifier.
	Hash string `json:"hash"`
}

OtherTransactionIdentifier represents a OtherTransactionIdentifier struct. The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.

func (*OtherTransactionIdentifier) MarshalJSON

func (o *OtherTransactionIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OtherTransactionIdentifier. It customizes the JSON marshaling process for OtherTransactionIdentifier objects.

func (*OtherTransactionIdentifier) UnmarshalJSON

func (o *OtherTransactionIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OtherTransactionIdentifier. It customizes the JSON unmarshaling process for OtherTransactionIdentifier objects.

type PoisonMicroblock

type PoisonMicroblock struct {
	// Hex encoded microblock header
	MicroblockHeader1 string `json:"microblock_header_1"`
	// Hex encoded microblock header
	MicroblockHeader2 string `json:"microblock_header_2"`
}

PoisonMicroblock represents a PoisonMicroblock struct.

func (*PoisonMicroblock) MarshalJSON

func (p *PoisonMicroblock) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PoisonMicroblock. It customizes the JSON marshaling process for PoisonMicroblock objects.

func (*PoisonMicroblock) UnmarshalJSON

func (p *PoisonMicroblock) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PoisonMicroblock. It customizes the JSON unmarshaling process for PoisonMicroblock objects.

type PoisonMicroblock1

type PoisonMicroblock1 struct {
	P25 *float64 `json:"p25"`
	P50 *float64 `json:"p50"`
	P75 *float64 `json:"p75"`
	P95 *float64 `json:"p95"`
}

PoisonMicroblock1 represents a PoisonMicroblock1 struct.

func (*PoisonMicroblock1) MarshalJSON

func (p *PoisonMicroblock1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PoisonMicroblock1. It customizes the JSON marshaling process for PoisonMicroblock1 objects.

func (*PoisonMicroblock1) UnmarshalJSON

func (p *PoisonMicroblock1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PoisonMicroblock1. It customizes the JSON unmarshaling process for PoisonMicroblock1 objects.

type PoolDelegation

type PoolDelegation struct {
	// The principal of the pool member that issued the delegation
	Stacker string `json:"stacker"`
	// The pox-addr value specified by the stacker in the delegation operation
	PoxAddr *string `json:"pox_addr,omitempty"`
	// The amount of uSTX delegated by the stacker
	AmountUstx string `json:"amount_ustx"`
	// The optional burnchain block unlock height that the stacker may have specified
	BurnBlockUnlockHeight *int `json:"burn_block_unlock_height,omitempty"`
	// The block height at which the stacker delegation transaction was mined at
	BlockHeight int `json:"block_height"`
	// The tx_id of the stacker delegation operation
	TxId string `json:"tx_id"`
}

PoolDelegation represents a PoolDelegation struct.

func (*PoolDelegation) MarshalJSON

func (p *PoolDelegation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PoolDelegation. It customizes the JSON marshaling process for PoolDelegation objects.

func (*PoolDelegation) UnmarshalJSON

func (p *PoolDelegation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PoolDelegation. It customizes the JSON unmarshaling process for PoolDelegation objects.

type PoolDelegationsResponse

type PoolDelegationsResponse struct {
	// The number of Stackers to return
	Limit int `json:"limit"`
	// The number to Stackers to skip (starting at `0`)
	Offset int `json:"offset"`
	// The total number of Stackers
	Total   int              `json:"total"`
	Results []PoolDelegation `json:"results"`
}

PoolDelegationsResponse represents a PoolDelegationsResponse struct. GET request that returns stacking pool member details for a given pool (delegator) principal

func (*PoolDelegationsResponse) MarshalJSON

func (p *PoolDelegationsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PoolDelegationsResponse. It customizes the JSON marshaling process for PoolDelegationsResponse objects.

func (*PoolDelegationsResponse) UnmarshalJSON

func (p *PoolDelegationsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PoolDelegationsResponse. It customizes the JSON unmarshaling process for PoolDelegationsResponse objects.

type PostCondition1

type PostCondition1 struct {
	Principal PostConditionPrincipal4 `json:"principal"`
	// A fungible condition code encodes a statement being made for either STX or a fungible token, with respect to the originating account.
	ConditionCode PostConditionFungibleConditionCodeEnum `json:"condition_code"`
	Amount        string                                 `json:"amount"`
	Type          string                                 `json:"type"`
	Asset         Asset                                  `json:"asset"`
	AssetValue    AssetValue                             `json:"asset_value"`
}

PostCondition1 represents a PostCondition1 struct. Post-conditionscan limit the damage done to a user's assets

func (*PostCondition1) MarshalJSON

func (p *PostCondition1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PostCondition1. It customizes the JSON marshaling process for PostCondition1 objects.

func (*PostCondition1) UnmarshalJSON

func (p *PostCondition1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PostCondition1. It customizes the JSON unmarshaling process for PostCondition1 objects.

type PostConditionFungibleConditionCodeEnum

type PostConditionFungibleConditionCodeEnum string

PostConditionFungibleConditionCodeEnum is a string enum. A fungible condition code encodes a statement being made for either STX or a fungible token, with respect to the originating account.

const (
	PostConditionFungibleConditionCodeEnum_SENTEQUALTO              PostConditionFungibleConditionCodeEnum = "sent_equal_to"
	PostConditionFungibleConditionCodeEnum_SENTGREATERTHAN          PostConditionFungibleConditionCodeEnum = "sent_greater_than"
	PostConditionFungibleConditionCodeEnum_SENTGREATERTHANOREQUALTO PostConditionFungibleConditionCodeEnum = "sent_greater_than_or_equal_to"
	PostConditionFungibleConditionCodeEnum_SENTLESSTHAN             PostConditionFungibleConditionCodeEnum = "sent_less_than"
	PostConditionFungibleConditionCodeEnum_SENTLESSTHANOREQUALTO    PostConditionFungibleConditionCodeEnum = "sent_less_than_or_equal_to"
)

type PostConditionModeEnum

type PostConditionModeEnum string

PostConditionModeEnum is a string enum.

const (
	PostConditionModeEnum_ALLOW PostConditionModeEnum = "allow"
	PostConditionModeEnum_DENY  PostConditionModeEnum = "deny"
)

type PostConditionPrincipal4

type PostConditionPrincipal4 struct {
	// String literal of type `PostConditionPrincipalType`
	TypeId       string `json:"type_id"`
	Address      string `json:"address"`
	ContractName string `json:"contract_name"`
}

PostConditionPrincipal4 represents a PostConditionPrincipal4 struct.

func (*PostConditionPrincipal4) MarshalJSON

func (p *PostConditionPrincipal4) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PostConditionPrincipal4. It customizes the JSON marshaling process for PostConditionPrincipal4 objects.

func (*PostConditionPrincipal4) UnmarshalJSON

func (p *PostConditionPrincipal4) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PostConditionPrincipal4. It customizes the JSON unmarshaling process for PostConditionPrincipal4 objects.

type ReadOnlyFunctionArgs

type ReadOnlyFunctionArgs struct {
	// The simulated tx-sender
	Sender string `json:"sender"`
	// An array of hex serialized Clarity values
	Arguments []string `json:"arguments"`
}

ReadOnlyFunctionArgs represents a ReadOnlyFunctionArgs struct. Describes representation of a Type-0 Stacks 2.0 transaction. https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#type-0-transferring-an-asset

func (*ReadOnlyFunctionArgs) MarshalJSON

func (r *ReadOnlyFunctionArgs) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReadOnlyFunctionArgs. It customizes the JSON marshaling process for ReadOnlyFunctionArgs objects.

func (*ReadOnlyFunctionArgs) UnmarshalJSON

func (r *ReadOnlyFunctionArgs) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReadOnlyFunctionArgs. It customizes the JSON unmarshaling process for ReadOnlyFunctionArgs objects.

type ReadOnlyFunctionSuccessResponse

type ReadOnlyFunctionSuccessResponse struct {
	Okay   bool    `json:"okay"`
	Result *string `json:"result,omitempty"`
	Cause  *string `json:"cause,omitempty"`
}

ReadOnlyFunctionSuccessResponse represents a ReadOnlyFunctionSuccessResponse struct. GET request to get contract source

func (*ReadOnlyFunctionSuccessResponse) MarshalJSON

func (r *ReadOnlyFunctionSuccessResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReadOnlyFunctionSuccessResponse. It customizes the JSON marshaling process for ReadOnlyFunctionSuccessResponse objects.

func (*ReadOnlyFunctionSuccessResponse) UnmarshalJSON

func (r *ReadOnlyFunctionSuccessResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReadOnlyFunctionSuccessResponse. It customizes the JSON unmarshaling process for ReadOnlyFunctionSuccessResponse objects.

type Result

type Result struct {
	// Transaction ID
	TxId *string `json:"tx_id,omitempty"`
	// Used for ordering the transactions originating from and paying from an account. The nonce ensures that a transaction is processed at most once. The nonce counts the number of times an account's owner(s) have authorized a transaction. The first transaction from an account will have a nonce value equal to 0, the second will have a nonce value equal to 1, and so on.
	Nonce *int `json:"nonce,omitempty"`
	// Transaction fee as Integer string (64-bit unsigned integer).
	FeeRate *string `json:"fee_rate,omitempty"`
	// Address of the transaction initiator
	SenderAddress *string `json:"sender_address,omitempty"`
	SponsorNonce  *int    `json:"sponsor_nonce,omitempty"`
	// Denotes whether the originating account is the same as the paying account
	Sponsored         *bool                  `json:"sponsored,omitempty"`
	SponsorAddress    *string                `json:"sponsor_address,omitempty"`
	PostConditionMode *PostConditionModeEnum `json:"post_condition_mode,omitempty"`
	PostConditions    []PostCondition1       `json:"post_conditions,omitempty"`
	// `on_chain_only`: the transaction MUST be included in an anchored block, `off_chain_only`: the transaction MUST be included in a microblock, `any`: the leader can choose where to include the transaction.
	AnchorMode *TransactionAnchorModeTypeEnum `json:"anchor_mode,omitempty"`
	// Status of the transaction
	TxStatus *MempoolTransactionStatusEnum `json:"tx_status,omitempty"`
	// A unix timestamp (in seconds) indicating when the transaction broadcast was received by the node.
	ReceiptTime *float64 `json:"receipt_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when the transaction broadcast was received by the node.
	ReceiptTimeIso      *string              `json:"receipt_time_iso,omitempty"`
	TxType              *TxTypeEnum          `json:"tx_type,omitempty"`
	TokenTransfer       *TokenTransfer       `json:"token_transfer,omitempty"`
	SmartContract       *SmartContract       `json:"smart_contract,omitempty"`
	ContractCall        *ContractCall        `json:"contract_call,omitempty"`
	PoisonMicroblock    *PoisonMicroblock    `json:"poison_microblock,omitempty"`
	CoinbasePayload     *CoinbasePayload     `json:"coinbase_payload,omitempty"`
	TenureChangePayload *TenureChangePayload `json:"tenure_change_payload,omitempty"`
	// Hash of the blocked this transactions was associated with
	BlockHash *string `json:"block_hash,omitempty"`
	// Height of the block this transactions was associated with
	BlockHeight *int `json:"block_height,omitempty"`
	// Unix timestamp (in seconds) indicating when this block was mined
	BurnBlockTime *int `json:"burn_block_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this block was mined.
	BurnBlockTimeIso *string `json:"burn_block_time_iso,omitempty"`
	// Unix timestamp (in seconds) indicating when this parent block was mined
	ParentBurnBlockTime *int `json:"parent_burn_block_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this parent block was mined.
	ParentBurnBlockTimeIso *string `json:"parent_burn_block_time_iso,omitempty"`
	// Set to `true` if block corresponds to the canonical chain tip
	Canonical *bool `json:"canonical,omitempty"`
	// Index of the transaction, indicating the order. Starts at `0` and increases with each transaction
	TxIndex *int `json:"tx_index,omitempty"`
	// Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.
	TxResult *TxResult `json:"tx_result,omitempty"`
	// Number of transaction events
	EventCount *int `json:"event_count,omitempty"`
	// Hash of the previous block.
	ParentBlockHash *string `json:"parent_block_hash,omitempty"`
	// True if the transaction is included in a microblock that has not been confirmed by an anchor block.
	IsUnanchored *bool `json:"is_unanchored,omitempty"`
	// The microblock hash that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be an empty string.
	MicroblockHash *string `json:"microblock_hash,omitempty"`
	// The microblock sequence number that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be 2147483647 (0x7fffffff, the max int32 value), this value preserves logical transaction ordering on (block_height, microblock_sequence, tx_index).
	MicroblockSequence *int `json:"microblock_sequence,omitempty"`
	// Set to `true` if microblock is anchored in the canonical chain tip, `false` if the transaction was orphaned in a micro-fork.
	MicroblockCanonical *bool `json:"microblock_canonical,omitempty"`
	// Execution cost read count.
	ExecutionCostReadCount *int `json:"execution_cost_read_count,omitempty"`
	// Execution cost read length.
	ExecutionCostReadLength *int `json:"execution_cost_read_length,omitempty"`
	// Execution cost runtime.
	ExecutionCostRuntime *int `json:"execution_cost_runtime,omitempty"`
	// Execution cost write count.
	ExecutionCostWriteCount *int `json:"execution_cost_write_count,omitempty"`
	// Execution cost write length.
	ExecutionCostWriteLength *int `json:"execution_cost_write_length,omitempty"`
	// List of transaction events
	Events []TransactionEvent1 `json:"events,omitempty"`
}

Result represents a Result struct.

func (*Result) MarshalJSON

func (r *Result) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Result. It customizes the JSON marshaling process for Result objects.

func (*Result) UnmarshalJSON

func (r *Result) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Result. It customizes the JSON unmarshaling process for Result objects.

type Result11

type Result11 struct {
	// Shows the currenty category of entity it is searched in.
	EntityType EntityTypeEnum `json:"entity_type"`
	// The id used to search this query.
	EntityId string `json:"entity_id"`
	// A block
	Metadata *Block1 `json:"metadata,omitempty"`
	// Returns basic search result information about the requested id
	BlockData BlockData `json:"block_data"`
	// Returns basic search result information about the requested id
	TxData TxData3 `json:"tx_data"`
}

Result11 represents a Result11 struct. This object carries the search result

func (*Result11) MarshalJSON

func (r *Result11) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Result11. It customizes the JSON marshaling process for Result11 objects.

func (*Result11) UnmarshalJSON

func (r *Result11) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Result11. It customizes the JSON unmarshaling process for Result11 objects.

type Result2

type Result2 struct {
	TxId string `json:"tx_id"`
	// Used for ordering the transactions originating from and paying from an account. The nonce ensures that a transaction is processed at most once. The nonce counts the number of times an account's owner(s) have authorized a transaction. The first transaction from an account will have a nonce value equal to 0, the second will have a nonce value equal to 1, and so on.
	Nonce *int `json:"nonce,omitempty"`
	// Transaction fee as Integer string (64-bit unsigned integer).
	FeeRate *string `json:"fee_rate,omitempty"`
	// Address of the transaction initiator
	SenderAddress *string `json:"sender_address,omitempty"`
	SponsorNonce  *int    `json:"sponsor_nonce,omitempty"`
	// Denotes whether the originating account is the same as the paying account
	Sponsored         *bool                  `json:"sponsored,omitempty"`
	SponsorAddress    *string                `json:"sponsor_address,omitempty"`
	PostConditionMode *PostConditionModeEnum `json:"post_condition_mode,omitempty"`
	PostConditions    []PostCondition1       `json:"post_conditions,omitempty"`
	// `on_chain_only`: the transaction MUST be included in an anchored block, `off_chain_only`: the transaction MUST be included in a microblock, `any`: the leader can choose where to include the transaction.
	AnchorMode *TransactionAnchorModeTypeEnum `json:"anchor_mode,omitempty"`
	// Status of the transaction
	TxStatus *MempoolTransactionStatusEnum `json:"tx_status,omitempty"`
	// A unix timestamp (in seconds) indicating when the transaction broadcast was received by the node.
	ReceiptTime *float64 `json:"receipt_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when the transaction broadcast was received by the node.
	ReceiptTimeIso      *string              `json:"receipt_time_iso,omitempty"`
	TxType              *TxTypeEnum          `json:"tx_type,omitempty"`
	TokenTransfer       *TokenTransfer       `json:"token_transfer,omitempty"`
	SmartContract       *SmartContract       `json:"smart_contract,omitempty"`
	ContractCall        *ContractCall        `json:"contract_call,omitempty"`
	PoisonMicroblock    *PoisonMicroblock    `json:"poison_microblock,omitempty"`
	CoinbasePayload     *CoinbasePayload     `json:"coinbase_payload,omitempty"`
	TenureChangePayload *TenureChangePayload `json:"tenure_change_payload,omitempty"`
	// Hash of the blocked this transactions was associated with
	BlockHash *string `json:"block_hash,omitempty"`
	// Height of the block this transactions was associated with
	BlockHeight *int `json:"block_height,omitempty"`
	// Unix timestamp (in seconds) indicating when this block was mined
	BurnBlockTime *int `json:"burn_block_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this block was mined.
	BurnBlockTimeIso *string `json:"burn_block_time_iso,omitempty"`
	// Unix timestamp (in seconds) indicating when this parent block was mined
	ParentBurnBlockTime *int `json:"parent_burn_block_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this parent block was mined.
	ParentBurnBlockTimeIso *string `json:"parent_burn_block_time_iso,omitempty"`
	// Set to `true` if block corresponds to the canonical chain tip
	Canonical *bool `json:"canonical,omitempty"`
	// Index of the transaction, indicating the order. Starts at `0` and increases with each transaction
	TxIndex *int `json:"tx_index,omitempty"`
	// Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.
	TxResult *TxResult `json:"tx_result,omitempty"`
	// Number of transaction events
	EventCount *int `json:"event_count,omitempty"`
	// Hash of the previous block.
	ParentBlockHash *string `json:"parent_block_hash,omitempty"`
	// True if the transaction is included in a microblock that has not been confirmed by an anchor block.
	IsUnanchored *bool `json:"is_unanchored,omitempty"`
	// The microblock hash that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be an empty string.
	MicroblockHash *string `json:"microblock_hash,omitempty"`
	// The microblock sequence number that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be 2147483647 (0x7fffffff, the max int32 value), this value preserves logical transaction ordering on (block_height, microblock_sequence, tx_index).
	MicroblockSequence *int `json:"microblock_sequence,omitempty"`
	// Set to `true` if microblock is anchored in the canonical chain tip, `false` if the transaction was orphaned in a micro-fork.
	MicroblockCanonical *bool `json:"microblock_canonical,omitempty"`
	// Execution cost read count.
	ExecutionCostReadCount *int `json:"execution_cost_read_count,omitempty"`
	// Execution cost read length.
	ExecutionCostReadLength *int `json:"execution_cost_read_length,omitempty"`
	// Execution cost runtime.
	ExecutionCostRuntime *int `json:"execution_cost_runtime,omitempty"`
	// Execution cost write count.
	ExecutionCostWriteCount *int `json:"execution_cost_write_count,omitempty"`
	// Execution cost write length.
	ExecutionCostWriteLength *int `json:"execution_cost_write_length,omitempty"`
	// List of transaction events
	Events []TransactionEvent1 `json:"events,omitempty"`
}

Result2 represents a Result2 struct.

func (*Result2) MarshalJSON

func (r *Result2) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Result2. It customizes the JSON marshaling process for Result2 objects.

func (*Result2) UnmarshalJSON

func (r *Result2) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Result2. It customizes the JSON unmarshaling process for Result2 objects.

type RosettaAccount

type RosettaAccount struct {
	// The address may be a cryptographic public key (or some encoding of it) or a provided username.
	Address string `json:"address"`
	// An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to.
	SubAccount *RosettaSubAccount `json:"sub_account,omitempty"`
	// Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata.
	Metadata *interface{} `json:"metadata,omitempty"`
}

RosettaAccount represents a RosettaAccount struct. The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated).

func (*RosettaAccount) MarshalJSON

func (r *RosettaAccount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaAccount. It customizes the JSON marshaling process for RosettaAccount objects.

func (*RosettaAccount) UnmarshalJSON

func (r *RosettaAccount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaAccount. It customizes the JSON unmarshaling process for RosettaAccount objects.

type RosettaAccountBalanceRequest

type RosettaAccountBalanceRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated).
	AccountIdentifier RosettaAccount `json:"account_identifier"`
	// When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block.
	BlockIdentifier *RosettaPartialBlockIdentifier `json:"block_identifier,omitempty"`
}

RosettaAccountBalanceRequest represents a RosettaAccountBalanceRequest struct. An AccountBalanceRequest is utilized to make a balance request on the /account/balance endpoint. If the block_identifier is populated, a historical balance query should be performed.

func (*RosettaAccountBalanceRequest) MarshalJSON

func (r *RosettaAccountBalanceRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaAccountBalanceRequest. It customizes the JSON marshaling process for RosettaAccountBalanceRequest objects.

func (*RosettaAccountBalanceRequest) UnmarshalJSON

func (r *RosettaAccountBalanceRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaAccountBalanceRequest. It customizes the JSON unmarshaling process for RosettaAccountBalanceRequest objects.

type RosettaAccountBalanceResponse

type RosettaAccountBalanceResponse struct {
	// The block_identifier uniquely identifies a block in a particular network.
	BlockIdentifier RosettaBlockIdentifier `json:"block_identifier"`
	// A single account balance may have multiple currencies
	Balances []RosettaAmount `json:"balances"`
	// If a blockchain is UTXO-based, all unspent Coins owned by an account_identifier should be returned alongside the balance. It is highly recommended to populate this field so that users of the Rosetta API implementation don't need to maintain their own indexer to track their UTXOs.
	Coins []RosettaCoin `json:"coins,omitempty"`
	// Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address.
	Metadata *Metadata2 `json:"metadata,omitempty"`
}

RosettaAccountBalanceResponse represents a RosettaAccountBalanceResponse struct. An AccountBalanceResponse is returned on the /account/balance endpoint. If an account has a balance for each AccountIdentifier describing it (ex: an ERC-20 token balance on a few smart contracts), an account balance request must be made with each AccountIdentifier.

func (*RosettaAccountBalanceResponse) MarshalJSON

func (r *RosettaAccountBalanceResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaAccountBalanceResponse. It customizes the JSON marshaling process for RosettaAccountBalanceResponse objects.

func (*RosettaAccountBalanceResponse) UnmarshalJSON

func (r *RosettaAccountBalanceResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaAccountBalanceResponse. It customizes the JSON unmarshaling process for RosettaAccountBalanceResponse objects.

type RosettaAccountIdentifier

type RosettaAccountIdentifier struct {
	// The address may be a cryptographic public key (or some encoding of it) or a provided username.
	Address string `json:"address"`
	// An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to.
	SubAccount *RosettaSubAccount `json:"sub_account,omitempty"`
	// Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata.
	Metadata *interface{} `json:"metadata,omitempty"`
}

RosettaAccountIdentifier represents a RosettaAccountIdentifier struct. The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated).

func (*RosettaAccountIdentifier) MarshalJSON

func (r *RosettaAccountIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaAccountIdentifier. It customizes the JSON marshaling process for RosettaAccountIdentifier objects.

func (*RosettaAccountIdentifier) UnmarshalJSON

func (r *RosettaAccountIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaAccountIdentifier. It customizes the JSON unmarshaling process for RosettaAccountIdentifier objects.

type RosettaAmount

type RosettaAmount struct {
	// Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000.
	Value string `json:"value"`
	// Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).
	Currency RosettaCurrency `json:"currency"`
	Metadata *interface{}    `json:"metadata,omitempty"`
}

RosettaAmount represents a RosettaAmount struct. Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency.

func (*RosettaAmount) MarshalJSON

func (r *RosettaAmount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaAmount. It customizes the JSON marshaling process for RosettaAmount objects.

func (*RosettaAmount) UnmarshalJSON

func (r *RosettaAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaAmount. It customizes the JSON unmarshaling process for RosettaAmount objects.

type RosettaBlock

type RosettaBlock struct {
	// The block_identifier uniquely identifies a block in a particular network.
	BlockIdentifier RosettaBlockIdentifier `json:"block_identifier"`
	// The block_identifier uniquely identifies a block in a particular network.
	ParentBlockIdentifier RosettaParentBlockIdentifier `json:"parent_block_identifier"`
	// The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second.
	Timestamp int `json:"timestamp"`
	// All the transactions in the block
	Transactions []RosettaTransaction `json:"transactions"`
	// meta data
	Metadata *Metadata4 `json:"metadata,omitempty"`
}

RosettaBlock represents a RosettaBlock struct. Blocks contain an array of Transactions that occurred at a particular BlockIdentifier. A hard requirement for blocks returned by Rosetta implementations is that they MUST be inalterable: once a client has requested and received a block identified by a specific BlockIndentifier, all future calls for that same BlockIdentifier must return the same block contents.

func (*RosettaBlock) MarshalJSON

func (r *RosettaBlock) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaBlock. It customizes the JSON marshaling process for RosettaBlock objects.

func (*RosettaBlock) UnmarshalJSON

func (r *RosettaBlock) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaBlock. It customizes the JSON unmarshaling process for RosettaBlock objects.

type RosettaBlockIdentifier

type RosettaBlockIdentifier struct {
	// This is also known as the block hash.
	Hash string `json:"hash"`
	// This is also known as the block height.
	Index int `json:"index"`
}

RosettaBlockIdentifier represents a RosettaBlockIdentifier struct. The block_identifier uniquely identifies a block in a particular network.

func (*RosettaBlockIdentifier) MarshalJSON

func (r *RosettaBlockIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaBlockIdentifier. It customizes the JSON marshaling process for RosettaBlockIdentifier objects.

func (*RosettaBlockIdentifier) UnmarshalJSON

func (r *RosettaBlockIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaBlockIdentifier. It customizes the JSON unmarshaling process for RosettaBlockIdentifier objects.

type RosettaBlockRequest

type RosettaBlockRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block.
	BlockIdentifier RosettaPartialBlockIdentifier `json:"block_identifier"`
}

RosettaBlockRequest represents a RosettaBlockRequest struct. A BlockRequest is utilized to make a block request on the /block endpoint.

func (*RosettaBlockRequest) MarshalJSON

func (r *RosettaBlockRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaBlockRequest. It customizes the JSON marshaling process for RosettaBlockRequest objects.

func (*RosettaBlockRequest) UnmarshalJSON

func (r *RosettaBlockRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaBlockRequest. It customizes the JSON unmarshaling process for RosettaBlockRequest objects.

type RosettaBlockResponse

type RosettaBlockResponse struct {
	// Blocks contain an array of Transactions that occurred at a particular BlockIdentifier. A hard requirement for blocks returned by Rosetta implementations is that they MUST be inalterable: once a client has requested and received a block identified by a specific BlockIndentifier, all future calls for that same BlockIdentifier must return the same block contents.
	Block *RosettaBlock `json:"block,omitempty"`
	// Some blockchains may require additional transactions to be fetched that weren't returned in the block response (ex: block only returns transaction hashes). For blockchains with a lot of transactions in each block, this can be very useful as consumers can concurrently fetch all transactions returned.
	OtherTransactions []OtherTransactionIdentifier `json:"other_transactions,omitempty"`
}

RosettaBlockResponse represents a RosettaBlockResponse struct. A BlockResponse includes a fully-populated block or a partially-populated block with a list of other transactions to fetch (other_transactions). As a result of the consensus algorithm of some blockchains, blocks can be omitted (i.e. certain block indexes can be skipped). If a query for one of these omitted indexes is made, the response should not include a Block object. It is VERY important to note that blocks MUST still form a canonical, connected chain of blocks where each block has a unique index. In other words, the PartialBlockIdentifier of a block after an omitted block should reference the last non-omitted block.

func (*RosettaBlockResponse) MarshalJSON

func (r *RosettaBlockResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaBlockResponse. It customizes the JSON marshaling process for RosettaBlockResponse objects.

func (*RosettaBlockResponse) UnmarshalJSON

func (r *RosettaBlockResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaBlockResponse. It customizes the JSON unmarshaling process for RosettaBlockResponse objects.

type RosettaBlockTransactionRequest

type RosettaBlockTransactionRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block.
	BlockIdentifier RosettaPartialBlockIdentifier `json:"block_identifier"`
	// The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
	TransactionIdentifier TransactionIdentifier `json:"transaction_identifier"`
}

RosettaBlockTransactionRequest represents a RosettaBlockTransactionRequest struct. A BlockTransactionRequest is used to fetch a Transaction included in a block that is not returned in a BlockResponse.

func (*RosettaBlockTransactionRequest) MarshalJSON

func (r *RosettaBlockTransactionRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaBlockTransactionRequest. It customizes the JSON marshaling process for RosettaBlockTransactionRequest objects.

func (*RosettaBlockTransactionRequest) UnmarshalJSON

func (r *RosettaBlockTransactionRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaBlockTransactionRequest. It customizes the JSON unmarshaling process for RosettaBlockTransactionRequest objects.

type RosettaBlockTransactionResponse

type RosettaBlockTransactionResponse struct {
	// Transactions contain an array of Operations that are attributable to the same TransactionIdentifier.
	Transaction RosettaTransaction `json:"transaction"`
}

RosettaBlockTransactionResponse represents a RosettaBlockTransactionResponse struct. A BlockTransactionResponse contains information about a block transaction.

func (*RosettaBlockTransactionResponse) MarshalJSON

func (r *RosettaBlockTransactionResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaBlockTransactionResponse. It customizes the JSON marshaling process for RosettaBlockTransactionResponse objects.

func (*RosettaBlockTransactionResponse) UnmarshalJSON

func (r *RosettaBlockTransactionResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaBlockTransactionResponse. It customizes the JSON unmarshaling process for RosettaBlockTransactionResponse objects.

type RosettaCoin

type RosettaCoin struct {
	// CoinIdentifier uniquely identifies a Coin.
	CoinIdentifier CoinIdentifier `json:"coin_identifier"`
	// Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency.
	Amount RosettaAmount `json:"amount"`
}

RosettaCoin represents a RosettaCoin struct. If a blockchain is UTXO-based, all unspent Coins owned by an account_identifier should be returned alongside the balance. It is highly recommended to populate this field so that users of the Rosetta API implementation don't need to maintain their own indexer to track their UTXOs.

func (*RosettaCoin) MarshalJSON

func (r *RosettaCoin) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaCoin. It customizes the JSON marshaling process for RosettaCoin objects.

func (*RosettaCoin) UnmarshalJSON

func (r *RosettaCoin) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaCoin. It customizes the JSON unmarshaling process for RosettaCoin objects.

type RosettaCoinChange

type RosettaCoinChange struct {
	// CoinIdentifier uniquely identifies a Coin.
	CoinIdentifier CoinIdentifier `json:"coin_identifier"`
	// CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once.
	CoinAction CoinActionEnum `json:"coin_action"`
}

RosettaCoinChange represents a RosettaCoinChange struct. CoinChange is used to represent a change in state of a some coin identified by a coin_identifier. This object is part of the Operation model and must be populated for UTXO-based blockchains. Coincidentally, this abstraction of UTXOs allows for supporting both account-based transfers and UTXO-based transfers on the same blockchain (when a transfer is account-based, don't populate this model).

func (*RosettaCoinChange) MarshalJSON

func (r *RosettaCoinChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaCoinChange. It customizes the JSON marshaling process for RosettaCoinChange objects.

func (*RosettaCoinChange) UnmarshalJSON

func (r *RosettaCoinChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaCoinChange. It customizes the JSON unmarshaling process for RosettaCoinChange objects.

type RosettaConstructionCombineRequest

type RosettaConstructionCombineRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier   NetworkIdentifier  `json:"network_identifier"`
	UnsignedTransaction string             `json:"unsigned_transaction"`
	Signatures          []RosettaSignature `json:"signatures"`
}

RosettaConstructionCombineRequest represents a RosettaConstructionCombineRequest struct. RosettaConstructionCombineRequest is the input to the /construction/combine endpoint. It contains the unsigned transaction blob returned by /construction/payloads and all required signatures to create a network transaction.

func (*RosettaConstructionCombineRequest) MarshalJSON

func (r *RosettaConstructionCombineRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionCombineRequest. It customizes the JSON marshaling process for RosettaConstructionCombineRequest objects.

func (*RosettaConstructionCombineRequest) UnmarshalJSON

func (r *RosettaConstructionCombineRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionCombineRequest. It customizes the JSON unmarshaling process for RosettaConstructionCombineRequest objects.

type RosettaConstructionCombineResponse

type RosettaConstructionCombineResponse struct {
	// Signed transaction bytes in hex
	SignedTransaction string `json:"signed_transaction"`
}

RosettaConstructionCombineResponse represents a RosettaConstructionCombineResponse struct. RosettaConstructionCombineResponse is returned by /construction/combine. The network payload will be sent directly to the construction/submit endpoint.

func (*RosettaConstructionCombineResponse) MarshalJSON

func (r *RosettaConstructionCombineResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionCombineResponse. It customizes the JSON marshaling process for RosettaConstructionCombineResponse objects.

func (*RosettaConstructionCombineResponse) UnmarshalJSON

func (r *RosettaConstructionCombineResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionCombineResponse. It customizes the JSON unmarshaling process for RosettaConstructionCombineResponse objects.

type RosettaConstructionDeriveRequest

type RosettaConstructionDeriveRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation.
	PublicKey RosettaPublicKey `json:"public_key"`
	Metadata  *interface{}     `json:"metadata,omitempty"`
}

RosettaConstructionDeriveRequest represents a RosettaConstructionDeriveRequest struct. Network is provided in the request because some blockchains have different address formats for different networks

func (*RosettaConstructionDeriveRequest) MarshalJSON

func (r *RosettaConstructionDeriveRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionDeriveRequest. It customizes the JSON marshaling process for RosettaConstructionDeriveRequest objects.

func (*RosettaConstructionDeriveRequest) UnmarshalJSON

func (r *RosettaConstructionDeriveRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionDeriveRequest. It customizes the JSON unmarshaling process for RosettaConstructionDeriveRequest objects.

type RosettaConstructionDeriveResponse

type RosettaConstructionDeriveResponse struct {
	// [DEPRECATED by account_identifier in v1.4.4] Address in network-specific format.
	Address *string `json:"address,omitempty"`
	// The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated).
	AccountIdentifier *RosettaAccountIdentifier `json:"account_identifier,omitempty"`
	Metadata          *interface{}              `json:"metadata,omitempty"`
}

RosettaConstructionDeriveResponse represents a RosettaConstructionDeriveResponse struct. ConstructionDeriveResponse is returned by the /construction/derive endpoint.

func (*RosettaConstructionDeriveResponse) MarshalJSON

func (r *RosettaConstructionDeriveResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionDeriveResponse. It customizes the JSON marshaling process for RosettaConstructionDeriveResponse objects.

func (*RosettaConstructionDeriveResponse) UnmarshalJSON

func (r *RosettaConstructionDeriveResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionDeriveResponse. It customizes the JSON unmarshaling process for RosettaConstructionDeriveResponse objects.

type RosettaConstructionHashRequest

type RosettaConstructionHashRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// Signed transaction
	SignedTransaction string `json:"signed_transaction"`
}

RosettaConstructionHashRequest represents a RosettaConstructionHashRequest struct. TransactionHash returns the network-specific transaction hash for a signed transaction.

func (*RosettaConstructionHashRequest) MarshalJSON

func (r *RosettaConstructionHashRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionHashRequest. It customizes the JSON marshaling process for RosettaConstructionHashRequest objects.

func (*RosettaConstructionHashRequest) UnmarshalJSON

func (r *RosettaConstructionHashRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionHashRequest. It customizes the JSON unmarshaling process for RosettaConstructionHashRequest objects.

type RosettaConstructionHashResponse

type RosettaConstructionHashResponse struct {
	// The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
	TransactionIdentifier TransactionIdentifier `json:"transaction_identifier"`
	Metadata              *interface{}          `json:"metadata,omitempty"`
}

RosettaConstructionHashResponse represents a RosettaConstructionHashResponse struct. TransactionIdentifier contains the transaction_identifier of a transaction that was submitted to either /construction/hash or /construction/submit.

func (*RosettaConstructionHashResponse) MarshalJSON

func (r *RosettaConstructionHashResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionHashResponse. It customizes the JSON marshaling process for RosettaConstructionHashResponse objects.

func (*RosettaConstructionHashResponse) UnmarshalJSON

func (r *RosettaConstructionHashResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionHashResponse. It customizes the JSON unmarshaling process for RosettaConstructionHashResponse objects.

type RosettaConstructionMetadataRequest

type RosettaConstructionMetadataRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// The options that will be sent directly to /construction/metadata by the caller.
	Options    RosettaOptions     `json:"options"`
	PublicKeys []RosettaPublicKey `json:"public_keys,omitempty"`
}

RosettaConstructionMetadataRequest represents a RosettaConstructionMetadataRequest struct. A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.

func (*RosettaConstructionMetadataRequest) MarshalJSON

func (r *RosettaConstructionMetadataRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionMetadataRequest. It customizes the JSON marshaling process for RosettaConstructionMetadataRequest objects.

func (*RosettaConstructionMetadataRequest) UnmarshalJSON

func (r *RosettaConstructionMetadataRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionMetadataRequest. It customizes the JSON unmarshaling process for RosettaConstructionMetadataRequest objects.

type RosettaConstructionMetadataResponse

type RosettaConstructionMetadataResponse struct {
	Metadata     Metadata5       `json:"metadata"`
	SuggestedFee []RosettaAmount `json:"suggested_fee,omitempty"`
}

RosettaConstructionMetadataResponse represents a RosettaConstructionMetadataResponse struct. The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies.

func (*RosettaConstructionMetadataResponse) MarshalJSON

func (r *RosettaConstructionMetadataResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionMetadataResponse. It customizes the JSON marshaling process for RosettaConstructionMetadataResponse objects.

func (*RosettaConstructionMetadataResponse) UnmarshalJSON

func (r *RosettaConstructionMetadataResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionMetadataResponse. It customizes the JSON unmarshaling process for RosettaConstructionMetadataResponse objects.

type RosettaConstructionParseRequest

type RosettaConstructionParseRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// Signed is a boolean indicating whether the transaction is signed.
	Signed bool `json:"signed"`
	// This must be either the unsigned transaction blob returned by /construction/payloads or the signed transaction blob returned by /construction/combine.
	Transaction string `json:"transaction"`
}

RosettaConstructionParseRequest represents a RosettaConstructionParseRequest struct. Parse is called on both unsigned and signed transactions to understand the intent of the formulated transaction. This is run as a sanity check before signing (after /construction/payloads) and before broadcast (after /construction/combine).

func (*RosettaConstructionParseRequest) MarshalJSON

func (r *RosettaConstructionParseRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionParseRequest. It customizes the JSON marshaling process for RosettaConstructionParseRequest objects.

func (*RosettaConstructionParseRequest) UnmarshalJSON

func (r *RosettaConstructionParseRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionParseRequest. It customizes the JSON unmarshaling process for RosettaConstructionParseRequest objects.

type RosettaConstructionParseResponse

type RosettaConstructionParseResponse struct {
	Operations []RosettaOperation `json:"operations"`
	// [DEPRECATED by account_identifier_signers in v1.4.4] All signers (addresses) of a particular transaction. If the transaction is unsigned, it should be empty.
	Signers                  []string                   `json:"signers,omitempty"`
	AccountIdentifierSigners []RosettaAccountIdentifier `json:"account_identifier_signers,omitempty"`
	Metadata                 *interface{}               `json:"metadata,omitempty"`
}

RosettaConstructionParseResponse represents a RosettaConstructionParseResponse struct. RosettaConstructionParseResponse contains an array of operations that occur in a transaction blob. This should match the array of operations provided to /construction/preprocess and /construction/payloads.

func (*RosettaConstructionParseResponse) MarshalJSON

func (r *RosettaConstructionParseResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionParseResponse. It customizes the JSON marshaling process for RosettaConstructionParseResponse objects.

func (*RosettaConstructionParseResponse) UnmarshalJSON

func (r *RosettaConstructionParseResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionParseResponse. It customizes the JSON unmarshaling process for RosettaConstructionParseResponse objects.

type RosettaConstructionPayloadResponse

type RosettaConstructionPayloadResponse struct {
	// This is an unsigned transaction blob (that is usually needed to construct the a network transaction from a collection of signatures)
	UnsignedTransaction string `json:"unsigned_transaction"`
	// An array of payloads that must be signed by the caller
	Payloads []SigningPayload `json:"payloads"`
}

RosettaConstructionPayloadResponse represents a RosettaConstructionPayloadResponse struct. RosettaConstructionPayloadResponse is returned by /construction/payloads. It contains an unsigned transaction blob (that is usually needed to construct the a network transaction from a collection of signatures) and an array of payloads that must be signed by the caller.

func (*RosettaConstructionPayloadResponse) MarshalJSON

func (r *RosettaConstructionPayloadResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionPayloadResponse. It customizes the JSON marshaling process for RosettaConstructionPayloadResponse objects.

func (*RosettaConstructionPayloadResponse) UnmarshalJSON

func (r *RosettaConstructionPayloadResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionPayloadResponse. It customizes the JSON unmarshaling process for RosettaConstructionPayloadResponse objects.

type RosettaConstructionPayloadsRequest

type RosettaConstructionPayloadsRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier  `json:"network_identifier"`
	Operations        []RosettaOperation `json:"operations"`
	PublicKeys        []RosettaPublicKey `json:"public_keys,omitempty"`
	Metadata          *Metadata5         `json:"metadata,omitempty"`
}

RosettaConstructionPayloadsRequest represents a RosettaConstructionPayloadsRequest struct. ConstructionPayloadsRequest is the request to /construction/payloads. It contains the network, a slice of operations, and arbitrary metadata that was returned by the call to /construction/metadata. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.

func (*RosettaConstructionPayloadsRequest) MarshalJSON

func (r *RosettaConstructionPayloadsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionPayloadsRequest. It customizes the JSON marshaling process for RosettaConstructionPayloadsRequest objects.

func (*RosettaConstructionPayloadsRequest) UnmarshalJSON

func (r *RosettaConstructionPayloadsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionPayloadsRequest. It customizes the JSON unmarshaling process for RosettaConstructionPayloadsRequest objects.

type RosettaConstructionPreprocessRequest

type RosettaConstructionPreprocessRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier     `json:"network_identifier"`
	Operations        []RosettaOperation    `json:"operations"`
	Metadata          *interface{}          `json:"metadata,omitempty"`
	MaxFee            []RosettaMaxFeeAmount `json:"max_fee,omitempty"`
	// The caller can also provide a suggested fee multiplier to indicate that the suggested fee should be scaled. This may be used to set higher fees for urgent transactions or to pay lower fees when there is less urgency. It is assumed that providing a very low multiplier (like 0.0001) will never lead to a transaction being created with a fee less than the minimum network fee (if applicable). In the case that the caller provides both a max fee and a suggested fee multiplier, the max fee will set an upper bound on the suggested fee (regardless of the multiplier provided).
	SuggestedFeeMultiplier *int `json:"suggested_fee_multiplier,omitempty"`
}

RosettaConstructionPreprocessRequest represents a RosettaConstructionPreprocessRequest struct. ConstructionPreprocessRequest is passed to the /construction/preprocess endpoint so that a Rosetta implementation can determine which metadata it needs to request for construction

func (*RosettaConstructionPreprocessRequest) MarshalJSON

func (r *RosettaConstructionPreprocessRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionPreprocessRequest. It customizes the JSON marshaling process for RosettaConstructionPreprocessRequest objects.

func (*RosettaConstructionPreprocessRequest) UnmarshalJSON

func (r *RosettaConstructionPreprocessRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionPreprocessRequest. It customizes the JSON unmarshaling process for RosettaConstructionPreprocessRequest objects.

type RosettaConstructionPreprocessResponse

type RosettaConstructionPreprocessResponse struct {
	// The options that will be sent directly to /construction/metadata by the caller.
	Options            *RosettaOptions  `json:"options,omitempty"`
	RequiredPublicKeys []RosettaAccount `json:"required_public_keys,omitempty"`
}

RosettaConstructionPreprocessResponse represents a RosettaConstructionPreprocessResponse struct. RosettaConstructionPreprocessResponse contains options that will be sent unmodified to /construction/metadata. If it is not necessary to make a request to /construction/metadata, options should be omitted. Some blockchains require the PublicKey of particular AccountIdentifiers to construct a valid transaction. To fetch these PublicKeys, populate required_public_keys with the AccountIdentifiers associated with the desired PublicKeys. If it is not necessary to retrieve any PublicKeys for construction, required_public_keys should be omitted.

func (*RosettaConstructionPreprocessResponse) MarshalJSON

func (r *RosettaConstructionPreprocessResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionPreprocessResponse. It customizes the JSON marshaling process for RosettaConstructionPreprocessResponse objects.

func (*RosettaConstructionPreprocessResponse) UnmarshalJSON

func (r *RosettaConstructionPreprocessResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionPreprocessResponse. It customizes the JSON unmarshaling process for RosettaConstructionPreprocessResponse objects.

type RosettaConstructionSubmitRequest

type RosettaConstructionSubmitRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// Signed transaction
	SignedTransaction string `json:"signed_transaction"`
}

RosettaConstructionSubmitRequest represents a RosettaConstructionSubmitRequest struct. Submit the transaction in blockchain

func (*RosettaConstructionSubmitRequest) MarshalJSON

func (r *RosettaConstructionSubmitRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionSubmitRequest. It customizes the JSON marshaling process for RosettaConstructionSubmitRequest objects.

func (*RosettaConstructionSubmitRequest) UnmarshalJSON

func (r *RosettaConstructionSubmitRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionSubmitRequest. It customizes the JSON unmarshaling process for RosettaConstructionSubmitRequest objects.

type RosettaConstructionSubmitResponse

type RosettaConstructionSubmitResponse struct {
	// The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
	TransactionIdentifier TransactionIdentifier `json:"transaction_identifier"`
	Metadata              *interface{}          `json:"metadata,omitempty"`
}

RosettaConstructionSubmitResponse represents a RosettaConstructionSubmitResponse struct. TransactionIdentifier contains the transaction_identifier of a transaction that was submitted to either /construction/submit.

func (*RosettaConstructionSubmitResponse) MarshalJSON

func (r *RosettaConstructionSubmitResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaConstructionSubmitResponse. It customizes the JSON marshaling process for RosettaConstructionSubmitResponse objects.

func (*RosettaConstructionSubmitResponse) UnmarshalJSON

func (r *RosettaConstructionSubmitResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaConstructionSubmitResponse. It customizes the JSON unmarshaling process for RosettaConstructionSubmitResponse objects.

type RosettaCurrency

type RosettaCurrency struct {
	// Canonical symbol associated with a currency.
	Symbol string `json:"symbol"`
	// Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10.
	Decimals int `json:"decimals"`
	// Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token.
	Metadata *interface{} `json:"metadata,omitempty"`
}

RosettaCurrency represents a RosettaCurrency struct. Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).

func (*RosettaCurrency) MarshalJSON

func (r *RosettaCurrency) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaCurrency. It customizes the JSON marshaling process for RosettaCurrency objects.

func (*RosettaCurrency) UnmarshalJSON

func (r *RosettaCurrency) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaCurrency. It customizes the JSON unmarshaling process for RosettaCurrency objects.

type RosettaErrorNoDetails

type RosettaErrorNoDetails struct {
	// Code is a network-specific error code. If desired, this code can be equivalent to an HTTP status code.
	Code int `json:"code"`
	// Message is a network-specific error message. The message MUST NOT change for a given code. In particular, this means that any contextual information should be included in the details field.
	Message string `json:"message"`
	// An error is retriable if the same request may succeed if submitted again.
	Retriable bool `json:"retriable"`
}

RosettaErrorNoDetails represents a RosettaErrorNoDetails struct. Instead of utilizing HTTP status codes to describe node errors (which often do not have a good analog), rich errors are returned using this object. Both the code and message fields can be individually used to correctly identify an error. Implementations MUST use unique values for both fields.

func (*RosettaErrorNoDetails) MarshalJSON

func (r *RosettaErrorNoDetails) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaErrorNoDetails. It customizes the JSON marshaling process for RosettaErrorNoDetails objects.

func (*RosettaErrorNoDetails) UnmarshalJSON

func (r *RosettaErrorNoDetails) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaErrorNoDetails. It customizes the JSON unmarshaling process for RosettaErrorNoDetails objects.

type RosettaGenesisBlockIdentifier

type RosettaGenesisBlockIdentifier struct {
	// This is also known as the block height.
	Index int `json:"index"`
	// Block hash
	Hash string `json:"hash"`
}

RosettaGenesisBlockIdentifier represents a RosettaGenesisBlockIdentifier struct. The block_identifier uniquely identifies a block in a particular network.

func (*RosettaGenesisBlockIdentifier) MarshalJSON

func (r *RosettaGenesisBlockIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaGenesisBlockIdentifier. It customizes the JSON marshaling process for RosettaGenesisBlockIdentifier objects.

func (*RosettaGenesisBlockIdentifier) UnmarshalJSON

func (r *RosettaGenesisBlockIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaGenesisBlockIdentifier. It customizes the JSON unmarshaling process for RosettaGenesisBlockIdentifier objects.

type RosettaMaxFeeAmount

type RosettaMaxFeeAmount struct {
	// Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000.
	Value string `json:"value"`
	// Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).
	Currency RosettaCurrency `json:"currency"`
	Metadata *interface{}    `json:"metadata,omitempty"`
}

RosettaMaxFeeAmount represents a RosettaMaxFeeAmount struct. Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency.

func (*RosettaMaxFeeAmount) MarshalJSON

func (r *RosettaMaxFeeAmount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaMaxFeeAmount. It customizes the JSON marshaling process for RosettaMaxFeeAmount objects.

func (*RosettaMaxFeeAmount) UnmarshalJSON

func (r *RosettaMaxFeeAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaMaxFeeAmount. It customizes the JSON unmarshaling process for RosettaMaxFeeAmount objects.

type RosettaMempoolRequest

type RosettaMempoolRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	Metadata          *interface{}      `json:"metadata,omitempty"`
}

RosettaMempoolRequest represents a RosettaMempoolRequest struct. Get all Transaction Identifiers in the mempool

func (*RosettaMempoolRequest) MarshalJSON

func (r *RosettaMempoolRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaMempoolRequest. It customizes the JSON marshaling process for RosettaMempoolRequest objects.

func (*RosettaMempoolRequest) UnmarshalJSON

func (r *RosettaMempoolRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaMempoolRequest. It customizes the JSON unmarshaling process for RosettaMempoolRequest objects.

type RosettaMempoolResponse

type RosettaMempoolResponse struct {
	TransactionIdentifiers []TransactionIdentifier `json:"transaction_identifiers"`
	Metadata               *interface{}            `json:"metadata,omitempty"`
}

RosettaMempoolResponse represents a RosettaMempoolResponse struct. A MempoolResponse contains all transaction identifiers in the mempool for a particular network_identifier.

func (*RosettaMempoolResponse) MarshalJSON

func (r *RosettaMempoolResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaMempoolResponse. It customizes the JSON marshaling process for RosettaMempoolResponse objects.

func (*RosettaMempoolResponse) UnmarshalJSON

func (r *RosettaMempoolResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaMempoolResponse. It customizes the JSON unmarshaling process for RosettaMempoolResponse objects.

type RosettaMempoolTransactionRequest

type RosettaMempoolTransactionRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	// The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
	TransactionIdentifier TransactionIdentifier `json:"transaction_identifier"`
}

RosettaMempoolTransactionRequest represents a RosettaMempoolTransactionRequest struct. A MempoolTransactionRequest is utilized to retrieve a transaction from the mempool.

func (*RosettaMempoolTransactionRequest) MarshalJSON

func (r *RosettaMempoolTransactionRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaMempoolTransactionRequest. It customizes the JSON marshaling process for RosettaMempoolTransactionRequest objects.

func (*RosettaMempoolTransactionRequest) UnmarshalJSON

func (r *RosettaMempoolTransactionRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaMempoolTransactionRequest. It customizes the JSON unmarshaling process for RosettaMempoolTransactionRequest objects.

type RosettaMempoolTransactionResponse

type RosettaMempoolTransactionResponse struct {
	// Transactions contain an array of Operations that are attributable to the same TransactionIdentifier.
	Transaction RosettaTransaction `json:"transaction"`
	Metadata    *interface{}       `json:"metadata,omitempty"`
}

RosettaMempoolTransactionResponse represents a RosettaMempoolTransactionResponse struct. A MempoolTransactionResponse contains an estimate of a mempool transaction. It may not be possible to know the full impact of a transaction in the mempool (ex: fee paid).

func (*RosettaMempoolTransactionResponse) MarshalJSON

func (r *RosettaMempoolTransactionResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaMempoolTransactionResponse. It customizes the JSON marshaling process for RosettaMempoolTransactionResponse objects.

func (*RosettaMempoolTransactionResponse) UnmarshalJSON

func (r *RosettaMempoolTransactionResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaMempoolTransactionResponse. It customizes the JSON unmarshaling process for RosettaMempoolTransactionResponse objects.

type RosettaNetworkListResponse

type RosettaNetworkListResponse struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifiers []NetworkIdentifier `json:"network_identifiers"`
}

RosettaNetworkListResponse represents a RosettaNetworkListResponse struct. A NetworkListResponse contains all NetworkIdentifiers that the node can serve information for.

func (*RosettaNetworkListResponse) MarshalJSON

func (r *RosettaNetworkListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaNetworkListResponse. It customizes the JSON marshaling process for RosettaNetworkListResponse objects.

func (*RosettaNetworkListResponse) UnmarshalJSON

func (r *RosettaNetworkListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaNetworkListResponse. It customizes the JSON unmarshaling process for RosettaNetworkListResponse objects.

type RosettaNetworkOptionsResponse

type RosettaNetworkOptionsResponse struct {
	// The Version object is utilized to inform the client of the versions of different components of the Rosetta implementation.
	Version Version `json:"version"`
	// Allow specifies supported Operation status, Operation types, and all possible error statuses. This Allow object is used by clients to validate the correctness of a Rosetta Server implementation. It is expected that these clients will error if they receive some response that contains any of the above information that is not specified here.
	Allow Allow `json:"allow"`
}

RosettaNetworkOptionsResponse represents a RosettaNetworkOptionsResponse struct. NetworkOptionsResponse contains information about the versioning of the node and the allowed operation statuses, operation types, and errors.

func (*RosettaNetworkOptionsResponse) MarshalJSON

func (r *RosettaNetworkOptionsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaNetworkOptionsResponse. It customizes the JSON marshaling process for RosettaNetworkOptionsResponse objects.

func (*RosettaNetworkOptionsResponse) UnmarshalJSON

func (r *RosettaNetworkOptionsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaNetworkOptionsResponse. It customizes the JSON unmarshaling process for RosettaNetworkOptionsResponse objects.

type RosettaNetworkStatusResponse

type RosettaNetworkStatusResponse struct {
	// The block_identifier uniquely identifies a block in a particular network.
	CurrentBlockIdentifier RosettaBlockIdentifier `json:"current_block_identifier"`
	// The timestamp of the block in milliseconds since the Unix Epoch. The timestamp is stored in milliseconds because some blockchains produce blocks more often than once a second.
	CurrentBlockTimestamp int `json:"current_block_timestamp"`
	// The block_identifier uniquely identifies a block in a particular network.
	GenesisBlockIdentifier RosettaGenesisBlockIdentifier `json:"genesis_block_identifier"`
	// The block_identifier uniquely identifies a block in a particular network.
	OldestBlockIdentifier *RosettaOldestBlockIdentifier `json:"oldest_block_identifier,omitempty"`
	// SyncStatus is used to provide additional context about an implementation's sync status. It is often used to indicate that an implementation is healthy when it cannot be queried until some sync phase occurs. If an implementation is immediately queryable, this model is often not populated.
	SyncStatus *RosettaSyncStatus `json:"sync_status,omitempty"`
	// Peers information
	Peers []RosettaPeers `json:"peers"`
}

RosettaNetworkStatusResponse represents a RosettaNetworkStatusResponse struct. NetworkStatusResponse contains basic information about the node's view of a blockchain network. It is assumed that any BlockIdentifier.Index less than or equal to CurrentBlockIdentifier.Index can be queried. If a Rosetta implementation prunes historical state, it should populate the optional oldest_block_identifier field with the oldest block available to query. If this is not populated, it is assumed that the genesis_block_identifier is the oldest queryable block. If a Rosetta implementation performs some pre-sync before it is possible to query blocks, sync_status should be populated so that clients can still monitor healthiness. Without this field, it may appear that the implementation is stuck syncing and needs to be terminated.

func (*RosettaNetworkStatusResponse) MarshalJSON

func (r *RosettaNetworkStatusResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaNetworkStatusResponse. It customizes the JSON marshaling process for RosettaNetworkStatusResponse objects.

func (*RosettaNetworkStatusResponse) UnmarshalJSON

func (r *RosettaNetworkStatusResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaNetworkStatusResponse. It customizes the JSON unmarshaling process for RosettaNetworkStatusResponse objects.

type RosettaOldestBlockIdentifier

type RosettaOldestBlockIdentifier struct {
	// This is also known as the block height.
	Index int `json:"index"`
	// Block hash
	Hash string `json:"hash"`
}

RosettaOldestBlockIdentifier represents a RosettaOldestBlockIdentifier struct. The block_identifier uniquely identifies a block in a particular network.

func (*RosettaOldestBlockIdentifier) MarshalJSON

func (r *RosettaOldestBlockIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaOldestBlockIdentifier. It customizes the JSON marshaling process for RosettaOldestBlockIdentifier objects.

func (*RosettaOldestBlockIdentifier) UnmarshalJSON

func (r *RosettaOldestBlockIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaOldestBlockIdentifier. It customizes the JSON unmarshaling process for RosettaOldestBlockIdentifier objects.

type RosettaOperation

type RosettaOperation struct {
	// The operation_identifier uniquely identifies an operation within a transaction.
	OperationIdentifier RosettaOperationIdentifier `json:"operation_identifier"`
	// Restrict referenced related_operations to identifier indexes < the current operation_identifier.index. This ensures there exists a clear DAG-structure of relations. Since operations are one-sided, one could imagine relating operations in a single transfer or linking operations in a call tree.
	RelatedOperations []RosettaRelatedOperation `json:"related_operations,omitempty"`
	// The network-specific type of the operation. Ensure that any type that can be returned here is also specified in the NetworkStatus. This can be very useful to downstream consumers that parse all block data.
	Type string `json:"type"`
	// The network-specific status of the operation. Status is not defined on the transaction object because blockchains with smart contracts may have transactions that partially apply. Blockchains with atomic transactions (all operations succeed or all operations fail) will have the same status for each operation.
	Status *string `json:"status,omitempty"`
	// The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated).
	Account *RosettaAccount `json:"account,omitempty"`
	// Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency.
	Amount *RosettaAmount `json:"amount,omitempty"`
	// CoinChange is used to represent a change in state of a some coin identified by a coin_identifier. This object is part of the Operation model and must be populated for UTXO-based blockchains. Coincidentally, this abstraction of UTXOs allows for supporting both account-based transfers and UTXO-based transfers on the same blockchain (when a transfer is account-based, don't populate this model).
	CoinChange *RosettaCoinChange `json:"coin_change,omitempty"`
	// Operations Meta Data
	Metadata *interface{} `json:"metadata,omitempty"`
}

RosettaOperation represents a RosettaOperation struct. Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction.

func (*RosettaOperation) MarshalJSON

func (r *RosettaOperation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaOperation. It customizes the JSON marshaling process for RosettaOperation objects.

func (*RosettaOperation) UnmarshalJSON

func (r *RosettaOperation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaOperation. It customizes the JSON unmarshaling process for RosettaOperation objects.

type RosettaOperationIdentifier

type RosettaOperationIdentifier struct {
	// The operation index is used to ensure each operation has a unique identifier within a transaction. This index is only relative to the transaction and NOT GLOBAL. The operations in each transaction should start from index 0. To clarify, there may not be any notion of an operation index in the blockchain being described.
	Index int `json:"index"`
	// Some blockchains specify an operation index that is essential for client use. For example, Bitcoin uses a network_index to identify which UTXO was used in a transaction. network_index should not be populated if there is no notion of an operation index in a blockchain (typically most account-based blockchains).
	NetworkIndex *int `json:"network_index,omitempty"`
}

RosettaOperationIdentifier represents a RosettaOperationIdentifier struct. The operation_identifier uniquely identifies an operation within a transaction.

func (*RosettaOperationIdentifier) MarshalJSON

func (r *RosettaOperationIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaOperationIdentifier. It customizes the JSON marshaling process for RosettaOperationIdentifier objects.

func (*RosettaOperationIdentifier) UnmarshalJSON

func (r *RosettaOperationIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaOperationIdentifier. It customizes the JSON unmarshaling process for RosettaOperationIdentifier objects.

type RosettaOperationStatus

type RosettaOperationStatus struct {
	// The status is the network-specific status of the operation.
	Status string `json:"status"`
	// An Operation is considered successful if the Operation.Amount should affect the Operation.Account. Some blockchains (like Bitcoin) only include successful operations in blocks but other blockchains (like Ethereum) include unsuccessful operations that incur a fee. To reconcile the computed balance from the stream of Operations, it is critical to understand which Operation.Status indicate an Operation is successful and should affect an Account.
	Successful bool `json:"successful"`
}

RosettaOperationStatus represents a RosettaOperationStatus struct. OperationStatus is utilized to indicate which Operation status are considered successful.

func (*RosettaOperationStatus) MarshalJSON

func (r *RosettaOperationStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaOperationStatus. It customizes the JSON marshaling process for RosettaOperationStatus objects.

func (*RosettaOperationStatus) UnmarshalJSON

func (r *RosettaOperationStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaOperationStatus. It customizes the JSON unmarshaling process for RosettaOperationStatus objects.

type RosettaOptions

type RosettaOptions struct {
	// sender's address
	SenderAddress *string `json:"sender_address,omitempty"`
	// Type of operation e.g transfer
	Type *string `json:"type,omitempty"`
	// This value indicates the state of the operations
	Status *string `json:"status,omitempty"`
	// Recipient's address
	TokenTransferRecipientAddress *string `json:"token_transfer_recipient_address,omitempty"`
	// Amount to be transfered.
	Amount *string `json:"amount,omitempty"`
	// Currency symbol e.g STX
	Symbol *string `json:"symbol,omitempty"`
	// Number of decimal places
	Decimals *int `json:"decimals,omitempty"`
	// Maximum price a user is willing to pay.
	GasLimit *float64 `json:"gas_limit,omitempty"`
	// Cost necessary to perform a transaction on the network
	GasPrice *float64 `json:"gas_price,omitempty"`
	// A suggested fee multiplier to indicate that the suggested fee should be scaled. This may be used to set higher fees for urgent transactions or to pay lower fees when there is less urgency.
	SuggestedFeeMultiplier *float64 `json:"suggested_fee_multiplier,omitempty"`
	// Maximum fee user is willing to pay
	MaxFee *string `json:"max_fee,omitempty"`
	// Fee for this transaction
	Fee *string `json:"fee,omitempty"`
	// Transaction approximative size (used to calculate total fee).
	Size *int `json:"size,omitempty"`
	// STX token transfer memo.
	Memo *string `json:"memo,omitempty"`
	// Number of cycles when stacking.
	NumberOfCycles *int `json:"number_of_cycles,omitempty"`
	// Address of the contract to call.
	ContractAddress *string `json:"contract_address,omitempty"`
	// Name of the contract to call.
	ContractName *string `json:"contract_name,omitempty"`
	// Set the burnchain (BTC) block for stacking lock to start.
	BurnBlockHeight *int `json:"burn_block_height,omitempty"`
	// Delegator address for when calling `delegate-stacking`.
	DelegateTo *string `json:"delegate_to,omitempty"`
	// The reward address for stacking transaction. It should be a valid Bitcoin address
	PoxAddr *string `json:"pox_addr,omitempty"`
}

RosettaOptions represents a RosettaOptions struct. The options that will be sent directly to /construction/metadata by the caller.

func (*RosettaOptions) MarshalJSON

func (r *RosettaOptions) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaOptions. It customizes the JSON marshaling process for RosettaOptions objects.

func (*RosettaOptions) UnmarshalJSON

func (r *RosettaOptions) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaOptions. It customizes the JSON unmarshaling process for RosettaOptions objects.

type RosettaOptionsRequest

type RosettaOptionsRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	Metadata          *interface{}      `json:"metadata,omitempty"`
}

RosettaOptionsRequest represents a RosettaOptionsRequest struct. This endpoint returns the version information and allowed network-specific types for a NetworkIdentifier. Any NetworkIdentifier returned by /network/list should be accessible here. Because options are retrievable in the context of a NetworkIdentifier, it is possible to define unique options for each network.

func (*RosettaOptionsRequest) MarshalJSON

func (r *RosettaOptionsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaOptionsRequest. It customizes the JSON marshaling process for RosettaOptionsRequest objects.

func (*RosettaOptionsRequest) UnmarshalJSON

func (r *RosettaOptionsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaOptionsRequest. It customizes the JSON unmarshaling process for RosettaOptionsRequest objects.

type RosettaParentBlockIdentifier

type RosettaParentBlockIdentifier struct {
	// This is also known as the block height.
	Index int `json:"index"`
	// Block hash
	Hash string `json:"hash"`
}

RosettaParentBlockIdentifier represents a RosettaParentBlockIdentifier struct. The block_identifier uniquely identifies a block in a particular network.

func (*RosettaParentBlockIdentifier) MarshalJSON

func (r *RosettaParentBlockIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaParentBlockIdentifier. It customizes the JSON marshaling process for RosettaParentBlockIdentifier objects.

func (*RosettaParentBlockIdentifier) UnmarshalJSON

func (r *RosettaParentBlockIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaParentBlockIdentifier. It customizes the JSON unmarshaling process for RosettaParentBlockIdentifier objects.

type RosettaPartialBlockIdentifier

type RosettaPartialBlockIdentifier struct {
	// This is also known as the block hash.
	Hash *string `json:"hash,omitempty"`
	// This is also known as the block height.
	Index *int `json:"index,omitempty"`
}

RosettaPartialBlockIdentifier represents a RosettaPartialBlockIdentifier struct. When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block.

func (*RosettaPartialBlockIdentifier) MarshalJSON

func (r *RosettaPartialBlockIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaPartialBlockIdentifier. It customizes the JSON marshaling process for RosettaPartialBlockIdentifier objects.

func (*RosettaPartialBlockIdentifier) UnmarshalJSON

func (r *RosettaPartialBlockIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaPartialBlockIdentifier. It customizes the JSON unmarshaling process for RosettaPartialBlockIdentifier objects.

type RosettaPeers

type RosettaPeers struct {
	// peer id
	PeerId string `json:"peer_id"`
	// meta data
	Metadata *interface{} `json:"metadata,omitempty"`
}

RosettaPeers represents a RosettaPeers struct. A Peer is a representation of a node's peer.

func (*RosettaPeers) MarshalJSON

func (r *RosettaPeers) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaPeers. It customizes the JSON marshaling process for RosettaPeers objects.

func (*RosettaPeers) UnmarshalJSON

func (r *RosettaPeers) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaPeers. It customizes the JSON unmarshaling process for RosettaPeers objects.

type RosettaPublicKey

type RosettaPublicKey struct {
	// Hex-encoded public key bytes in the format specified by the CurveType.
	HexBytes string `json:"hex_bytes"`
	// CurveType is the type of cryptographic curve associated with a PublicKey.
	CurveType CurveTypeEnum `json:"curve_type"`
}

RosettaPublicKey represents a RosettaPublicKey struct. PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation.

func (*RosettaPublicKey) MarshalJSON

func (r *RosettaPublicKey) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaPublicKey. It customizes the JSON marshaling process for RosettaPublicKey objects.

func (*RosettaPublicKey) UnmarshalJSON

func (r *RosettaPublicKey) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaPublicKey. It customizes the JSON unmarshaling process for RosettaPublicKey objects.

type RosettaRelatedOperation

type RosettaRelatedOperation struct {
	// Describes the index of related operation.
	Index int `json:"index"`
	// Some blockchains specify an operation index that is essential for client use. network_index should not be populated if there is no notion of an operation index in a blockchain (typically most account-based blockchains).
	NetworkIndex *int `json:"network_index,omitempty"`
}

RosettaRelatedOperation represents a RosettaRelatedOperation struct. Restrict referenced related_operations to identifier indexes < the current operation_identifier.index. This ensures there exists a clear DAG-structure of relations. Since operations are one-sided, one could imagine relating operations in a single transfer or linking operations in a call tree.

func (*RosettaRelatedOperation) MarshalJSON

func (r *RosettaRelatedOperation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaRelatedOperation. It customizes the JSON marshaling process for RosettaRelatedOperation objects.

func (*RosettaRelatedOperation) UnmarshalJSON

func (r *RosettaRelatedOperation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaRelatedOperation. It customizes the JSON unmarshaling process for RosettaRelatedOperation objects.

type RosettaSignature

type RosettaSignature struct {
	// SigningPayload is signed by the client with the keypair associated with an address using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload.
	SigningPayload SigningPayload `json:"signing_payload"`
	// PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation.
	PublicKey RosettaPublicKey `json:"public_key"`
	// SignatureType is the type of a cryptographic signature.
	SignatureType SignatureTypeEnum `json:"signature_type"`
	HexBytes      string            `json:"hex_bytes"`
}

RosettaSignature represents a RosettaSignature struct. Signature contains the payload that was signed, the public keys of the keypairs used to produce the signature, the signature (encoded in hex), and the SignatureType. PublicKey is often times not known during construction of the signing payloads but may be needed to combine signatures properly.

func (*RosettaSignature) MarshalJSON

func (r *RosettaSignature) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaSignature. It customizes the JSON marshaling process for RosettaSignature objects.

func (*RosettaSignature) UnmarshalJSON

func (r *RosettaSignature) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaSignature. It customizes the JSON unmarshaling process for RosettaSignature objects.

type RosettaStatusRequest

type RosettaStatusRequest struct {
	// The network_identifier specifies which network a particular object is associated with.
	NetworkIdentifier NetworkIdentifier `json:"network_identifier"`
	Metadata          *interface{}      `json:"metadata,omitempty"`
}

RosettaStatusRequest represents a RosettaStatusRequest struct. This endpoint returns the current status of the network requested. Any NetworkIdentifier returned by /network/list should be accessible here.

func (*RosettaStatusRequest) MarshalJSON

func (r *RosettaStatusRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaStatusRequest. It customizes the JSON marshaling process for RosettaStatusRequest objects.

func (*RosettaStatusRequest) UnmarshalJSON

func (r *RosettaStatusRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaStatusRequest. It customizes the JSON unmarshaling process for RosettaStatusRequest objects.

type RosettaSubAccount

type RosettaSubAccount struct {
	// The address may be a cryptographic public key (or some encoding of it) or a provided username.
	Address string `json:"address"`
	// If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients.
	Metadata *interface{} `json:"metadata,omitempty"`
}

RosettaSubAccount represents a RosettaSubAccount struct. An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to.

func (*RosettaSubAccount) MarshalJSON

func (r *RosettaSubAccount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaSubAccount. It customizes the JSON marshaling process for RosettaSubAccount objects.

func (*RosettaSubAccount) UnmarshalJSON

func (r *RosettaSubAccount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaSubAccount. It customizes the JSON unmarshaling process for RosettaSubAccount objects.

type RosettaSyncStatus

type RosettaSyncStatus struct {
	// CurrentIndex is the index of the last synced block in the current stage.
	CurrentIndex int `json:"current_index"`
	// TargetIndex is the index of the block that the implementation is attempting to sync to in the current stage.
	TargetIndex *int `json:"target_index,omitempty"`
	// Stage is the phase of the sync process.
	Stage *string `json:"stage,omitempty"`
	// Synced indicates if an implementation has synced up to the most recent block.
	Synced *bool `json:"synced,omitempty"`
}

RosettaSyncStatus represents a RosettaSyncStatus struct. SyncStatus is used to provide additional context about an implementation's sync status. It is often used to indicate that an implementation is healthy when it cannot be queried until some sync phase occurs. If an implementation is immediately queryable, this model is often not populated.

func (*RosettaSyncStatus) MarshalJSON

func (r *RosettaSyncStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaSyncStatus. It customizes the JSON marshaling process for RosettaSyncStatus objects.

func (*RosettaSyncStatus) UnmarshalJSON

func (r *RosettaSyncStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaSyncStatus. It customizes the JSON unmarshaling process for RosettaSyncStatus objects.

type RosettaTransaction

type RosettaTransaction struct {
	// The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
	TransactionIdentifier TransactionIdentifier `json:"transaction_identifier"`
	// List of operations
	Operations []RosettaOperation `json:"operations"`
	// Transactions that are related to other transactions (like a cross-shard transaction) should include the tranaction_identifier of these transactions in the metadata.
	Metadata *Metadata3 `json:"metadata,omitempty"`
}

RosettaTransaction represents a RosettaTransaction struct. Transactions contain an array of Operations that are attributable to the same TransactionIdentifier.

func (*RosettaTransaction) MarshalJSON

func (r *RosettaTransaction) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RosettaTransaction. It customizes the JSON marshaling process for RosettaTransaction objects.

func (*RosettaTransaction) UnmarshalJSON

func (r *RosettaTransaction) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RosettaTransaction. It customizes the JSON unmarshaling process for RosettaTransaction objects.

type RunFaucetResponse

type RunFaucetResponse struct {
	// Indicates if the faucet call was successful
	Success bool `json:"success"`
	// The transaction ID for the faucet call
	TxId *string `json:"txId,omitempty"`
	// Raw transaction in hex string representation
	TxRaw *string `json:"txRaw,omitempty"`
}

RunFaucetResponse represents a RunFaucetResponse struct. POST request that initiates a transfer of tokens to a specified testnet address

func (*RunFaucetResponse) MarshalJSON

func (r *RunFaucetResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RunFaucetResponse. It customizes the JSON marshaling process for RunFaucetResponse objects.

func (*RunFaucetResponse) UnmarshalJSON

func (r *RunFaucetResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RunFaucetResponse. It customizes the JSON unmarshaling process for RunFaucetResponse objects.

type SearchResult

type SearchResult struct {
	// Indicates if the requested object was found or not
	Found *bool `json:"found,omitempty"`
	// This object carries the search result
	Result *Result11 `json:"result,omitempty"`
	Error  *string   `json:"error,omitempty"`
}

SearchResult represents a SearchResult struct. complete search result for terms

func (*SearchResult) MarshalJSON

func (s *SearchResult) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SearchResult. It customizes the JSON marshaling process for SearchResult objects.

func (*SearchResult) UnmarshalJSON

func (s *SearchResult) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SearchResult. It customizes the JSON unmarshaling process for SearchResult objects.

type ServerStatusResponse

type ServerStatusResponse struct {
	// the server version that is currently running
	ServerVersion *string `json:"server_version,omitempty"`
	// the current server status
	Status            string        `json:"status"`
	PoxV1UnlockHeight Optional[int] `json:"pox_v1_unlock_height"`
	PoxV2UnlockHeight Optional[int] `json:"pox_v2_unlock_height"`
	PoxV3UnlockHeight Optional[int] `json:"pox_v3_unlock_height"`
	// Current chain tip information
	ChainTip *ChainTip `json:"chain_tip,omitempty"`
}

ServerStatusResponse represents a ServerStatusResponse struct. GET blockchain API status

func (*ServerStatusResponse) MarshalJSON

func (s *ServerStatusResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ServerStatusResponse. It customizes the JSON marshaling process for ServerStatusResponse objects.

func (*ServerStatusResponse) UnmarshalJSON

func (s *ServerStatusResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ServerStatusResponse. It customizes the JSON unmarshaling process for ServerStatusResponse objects.

type SignatureTypeEnum

type SignatureTypeEnum string

SignatureTypeEnum is a string enum. SignatureType is the type of a cryptographic signature.

const (
	SignatureTypeEnum_ECDSA           SignatureTypeEnum = "ecdsa"
	SignatureTypeEnum_ECDSARECOVERY   SignatureTypeEnum = "ecdsa_recovery"
	SignatureTypeEnum_ED25519         SignatureTypeEnum = "ed25519"
	SignatureTypeEnum_SCHNORR1        SignatureTypeEnum = "schnorr_1"
	SignatureTypeEnum_SCHNORRPOSEIDON SignatureTypeEnum = "schnorr_poseidon"
)

type SigningPayload

type SigningPayload struct {
	// [DEPRECATED by account_identifier in v1.4.4] The network-specific address of the account that should sign the payload.
	Address *string `json:"address,omitempty"`
	// The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated).
	AccountIdentifier *RosettaAccount `json:"account_identifier,omitempty"`
	HexBytes          string          `json:"hex_bytes"`
	// SignatureType is the type of a cryptographic signature.
	SignatureType *SignatureTypeEnum `json:"signature_type,omitempty"`
}

SigningPayload represents a SigningPayload struct. SigningPayload is signed by the client with the keypair associated with an address using the specified SignatureType. SignatureType can be optionally populated if there is a restriction on the signature scheme that can be used to sign the payload.

func (*SigningPayload) MarshalJSON

func (s *SigningPayload) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SigningPayload. It customizes the JSON marshaling process for SigningPayload objects.

func (*SigningPayload) UnmarshalJSON

func (s *SigningPayload) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SigningPayload. It customizes the JSON unmarshaling process for SigningPayload objects.

type SmartContract

type SmartContract struct {
	// The Clarity version of the contract, only specified for versioned contract transactions, otherwise null
	ClarityVersion Optional[float64] `json:"clarity_version"`
	// Contract identifier formatted as `<principaladdress>.<contract_name>`
	ContractId string `json:"contract_id"`
	// Clarity code of the smart contract being deployed
	SourceCode string `json:"source_code"`
}

SmartContract represents a SmartContract struct.

func (*SmartContract) MarshalJSON

func (s *SmartContract) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SmartContract. It customizes the JSON marshaling process for SmartContract objects.

func (*SmartContract) UnmarshalJSON

func (s *SmartContract) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SmartContract. It customizes the JSON unmarshaling process for SmartContract objects.

type SmartContract1

type SmartContract1 struct {
	NoPriority     int `json:"no_priority"`
	LowPriority    int `json:"low_priority"`
	MediumPriority int `json:"medium_priority"`
	HighPriority   int `json:"high_priority"`
}

SmartContract1 represents a SmartContract1 struct.

func (*SmartContract1) MarshalJSON

func (s *SmartContract1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SmartContract1. It customizes the JSON marshaling process for SmartContract1 objects.

func (*SmartContract1) UnmarshalJSON

func (s *SmartContract1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SmartContract1. It customizes the JSON unmarshaling process for SmartContract1 objects.

type SmartContract2

type SmartContract2 struct {
	P25 *float64 `json:"p25"`
	P50 *float64 `json:"p50"`
	P75 *float64 `json:"p75"`
	P95 *float64 `json:"p95"`
}

SmartContract2 represents a SmartContract2 struct.

func (*SmartContract2) MarshalJSON

func (s *SmartContract2) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SmartContract2. It customizes the JSON marshaling process for SmartContract2 objects.

func (*SmartContract2) UnmarshalJSON

func (s *SmartContract2) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SmartContract2. It customizes the JSON unmarshaling process for SmartContract2 objects.

type SmartContract7

type SmartContract7 struct {
	TxId        string `json:"tx_id"`
	Canonical   bool   `json:"canonical"`
	ContractId  string `json:"contract_id"`
	BlockHeight int    `json:"block_height"`
	SourceCode  string `json:"source_code"`
	Abi         string `json:"abi"`
}

SmartContract7 represents a SmartContract7 struct. A Smart Contract Detail

func (*SmartContract7) MarshalJSON

func (s *SmartContract7) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SmartContract7. It customizes the JSON marshaling process for SmartContract7 objects.

func (*SmartContract7) UnmarshalJSON

func (s *SmartContract7) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SmartContract7. It customizes the JSON unmarshaling process for SmartContract7 objects.

type StxBalance

type StxBalance struct {
	Balance                   string `json:"balance"`
	TotalSent                 string `json:"total_sent"`
	TotalReceived             string `json:"total_received"`
	TotalFeesSent             string `json:"total_fees_sent"`
	TotalMinerRewardsReceived string `json:"total_miner_rewards_received"`
	// The transaction where the lock event occurred. Empty if no tokens are locked.
	LockTxId string `json:"lock_tx_id"`
	// The amount of locked STX, as string quoted micro-STX. Zero if no tokens are locked.
	Locked string `json:"locked"`
	// The STX chain block height of when the lock event occurred. Zero if no tokens are locked.
	LockHeight int `json:"lock_height"`
	// The burnchain block height of when the lock event occurred. Zero if no tokens are locked.
	BurnchainLockHeight int `json:"burnchain_lock_height"`
	// The burnchain block height of when the tokens unlock. Zero if no tokens are locked.
	BurnchainUnlockHeight int `json:"burnchain_unlock_height"`
}

StxBalance represents a StxBalance struct.

func (*StxBalance) MarshalJSON

func (s *StxBalance) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for StxBalance. It customizes the JSON marshaling process for StxBalance objects.

func (*StxBalance) UnmarshalJSON

func (s *StxBalance) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for StxBalance. It customizes the JSON unmarshaling process for StxBalance objects.

type StxLockEvent

type StxLockEvent struct {
	LockedAmount  string `json:"locked_amount"`
	UnlockHeight  int    `json:"unlock_height"`
	LockedAddress string `json:"locked_address"`
}

StxLockEvent represents a StxLockEvent struct.

func (*StxLockEvent) MarshalJSON

func (s *StxLockEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for StxLockEvent. It customizes the JSON marshaling process for StxLockEvent objects.

func (*StxLockEvent) UnmarshalJSON

func (s *StxLockEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for StxLockEvent. It customizes the JSON unmarshaling process for StxLockEvent objects.

type StxTransfer

type StxTransfer struct {
	// Amount transferred in micro-STX as an integer string.
	Amount string `json:"amount"`
	// Principal that sent STX. This is unspecified if the STX were minted.
	Sender *string `json:"sender,omitempty"`
	// Principal that received STX. This is unspecified if the STX were burned.
	Recipient *string `json:"recipient,omitempty"`
}

StxTransfer represents a StxTransfer struct.

func (*StxTransfer) MarshalJSON

func (s *StxTransfer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for StxTransfer. It customizes the JSON marshaling process for StxTransfer objects.

func (*StxTransfer) UnmarshalJSON

func (s *StxTransfer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for StxTransfer. It customizes the JSON unmarshaling process for StxTransfer objects.

type SubNetworkIdentifier

type SubNetworkIdentifier struct {
	// Network name
	Network string `json:"network"`
	// Meta data from subnetwork identifier
	Metadata *Metadata1 `json:"metadata,omitempty"`
}

SubNetworkIdentifier represents a SubNetworkIdentifier struct. In blockchains with sharded state, the SubNetworkIdentifier is required to query some object on a specific shard. This identifier is optional for all non-sharded blockchains.

func (*SubNetworkIdentifier) MarshalJSON

func (s *SubNetworkIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubNetworkIdentifier. It customizes the JSON marshaling process for SubNetworkIdentifier objects.

func (*SubNetworkIdentifier) UnmarshalJSON

func (s *SubNetworkIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubNetworkIdentifier. It customizes the JSON unmarshaling process for SubNetworkIdentifier objects.

type TargetBlockTime

type TargetBlockTime struct {
	TargetBlockTime int `json:"target_block_time"`
}

TargetBlockTime represents a TargetBlockTime struct.

func (*TargetBlockTime) MarshalJSON

func (t *TargetBlockTime) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TargetBlockTime. It customizes the JSON marshaling process for TargetBlockTime objects.

func (*TargetBlockTime) UnmarshalJSON

func (t *TargetBlockTime) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TargetBlockTime. It customizes the JSON unmarshaling process for TargetBlockTime objects.

type TenureChangePayload

type TenureChangePayload struct {
	// Consensus hash of this tenure. Corresponds to the sortition in which the miner of this block was chosen.
	TenureConsensusHash string `json:"tenure_consensus_hash"`
	// Consensus hash of the previous tenure. Corresponds to the sortition of the previous winning block-commit.
	PrevTenureConsensusHash string `json:"prev_tenure_consensus_hash"`
	// Current consensus hash on the underlying burnchain. Corresponds to the last-seen sortition.
	BurnViewConsensusHash string `json:"burn_view_consensus_hash"`
	// (Hex string) Stacks Block hash
	PreviousTenureEnd string `json:"previous_tenure_end"`
	// The number of blocks produced in the previous tenure.
	PreviousTenureBlocks float64 `json:"previous_tenure_blocks"`
	// Cause of change in mining tenure. Depending on cause, tenure can be ended or extended.
	Cause CauseEnum `json:"cause"`
	// (Hex string) The ECDSA public key hash of the current tenure.
	PubkeyHash string `json:"pubkey_hash"`
	// (Hex string) A Schnorr signature from the Stackers.
	Signature string `json:"signature"`
	// (Hex string) A bitmap of which Stackers signed.
	Signers string `json:"signers"`
}

TenureChangePayload represents a TenureChangePayload struct.

func (*TenureChangePayload) MarshalJSON

func (t *TenureChangePayload) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TenureChangePayload. It customizes the JSON marshaling process for TenureChangePayload objects.

func (*TenureChangePayload) UnmarshalJSON

func (t *TenureChangePayload) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TenureChangePayload. It customizes the JSON unmarshaling process for TenureChangePayload objects.

type TokenTransfer

type TokenTransfer struct {
	RecipientAddress string `json:"recipient_address"`
	// Transfer amount as Integer string (64-bit unsigned integer)
	Amount string `json:"amount"`
	// Hex encoded arbitrary message, up to 34 bytes length (should try decoding to an ASCII string)
	Memo string `json:"memo"`
}

TokenTransfer represents a TokenTransfer struct.

func (*TokenTransfer) MarshalJSON

func (t *TokenTransfer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TokenTransfer. It customizes the JSON marshaling process for TokenTransfer objects.

func (*TokenTransfer) UnmarshalJSON

func (t *TokenTransfer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TokenTransfer. It customizes the JSON unmarshaling process for TokenTransfer objects.

type TokenTransfer1

type TokenTransfer1 struct {
	NoPriority     int `json:"no_priority"`
	LowPriority    int `json:"low_priority"`
	MediumPriority int `json:"medium_priority"`
	HighPriority   int `json:"high_priority"`
}

TokenTransfer1 represents a TokenTransfer1 struct.

func (*TokenTransfer1) MarshalJSON

func (t *TokenTransfer1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TokenTransfer1. It customizes the JSON marshaling process for TokenTransfer1 objects.

func (*TokenTransfer1) UnmarshalJSON

func (t *TokenTransfer1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TokenTransfer1. It customizes the JSON unmarshaling process for TokenTransfer1 objects.

type TokenTransfer2

type TokenTransfer2 struct {
	P25 *float64 `json:"p25"`
	P50 *float64 `json:"p50"`
	P75 *float64 `json:"p75"`
	P95 *float64 `json:"p95"`
}

TokenTransfer2 represents a TokenTransfer2 struct.

func (*TokenTransfer2) MarshalJSON

func (t *TokenTransfer2) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TokenTransfer2. It customizes the JSON marshaling process for TokenTransfer2 objects.

func (*TokenTransfer2) UnmarshalJSON

func (t *TokenTransfer2) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TokenTransfer2. It customizes the JSON unmarshaling process for TokenTransfer2 objects.

type Transaction

type Transaction struct {
	// Transaction ID
	TxId *string `json:"tx_id,omitempty"`
	// Used for ordering the transactions originating from and paying from an account. The nonce ensures that a transaction is processed at most once. The nonce counts the number of times an account's owner(s) have authorized a transaction. The first transaction from an account will have a nonce value equal to 0, the second will have a nonce value equal to 1, and so on.
	Nonce *int `json:"nonce,omitempty"`
	// Transaction fee as Integer string (64-bit unsigned integer).
	FeeRate *string `json:"fee_rate,omitempty"`
	// Address of the transaction initiator
	SenderAddress *string `json:"sender_address,omitempty"`
	SponsorNonce  *int    `json:"sponsor_nonce,omitempty"`
	// Denotes whether the originating account is the same as the paying account
	Sponsored         *bool                  `json:"sponsored,omitempty"`
	SponsorAddress    *string                `json:"sponsor_address,omitempty"`
	PostConditionMode *PostConditionModeEnum `json:"post_condition_mode,omitempty"`
	PostConditions    []PostCondition1       `json:"post_conditions,omitempty"`
	// `on_chain_only`: the transaction MUST be included in an anchored block, `off_chain_only`: the transaction MUST be included in a microblock, `any`: the leader can choose where to include the transaction.
	AnchorMode *TransactionAnchorModeTypeEnum `json:"anchor_mode,omitempty"`
	// Hash of the blocked this transactions was associated with
	BlockHash *string `json:"block_hash,omitempty"`
	// Height of the block this transactions was associated with
	BlockHeight *int `json:"block_height,omitempty"`
	// Unix timestamp (in seconds) indicating when this block was mined
	BurnBlockTime *int `json:"burn_block_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this block was mined.
	BurnBlockTimeIso *string `json:"burn_block_time_iso,omitempty"`
	// Unix timestamp (in seconds) indicating when this parent block was mined
	ParentBurnBlockTime *int `json:"parent_burn_block_time,omitempty"`
	// An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this parent block was mined.
	ParentBurnBlockTimeIso *string `json:"parent_burn_block_time_iso,omitempty"`
	// Set to `true` if block corresponds to the canonical chain tip
	Canonical *bool `json:"canonical,omitempty"`
	// Index of the transaction, indicating the order. Starts at `0` and increases with each transaction
	TxIndex *int `json:"tx_index,omitempty"`
	// Status of the transaction
	TxStatus *TransactionStatusEnum `json:"tx_status,omitempty"`
	// Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.
	TxResult *TxResult `json:"tx_result,omitempty"`
	// Number of transaction events
	EventCount *int `json:"event_count,omitempty"`
	// Hash of the previous block.
	ParentBlockHash *string `json:"parent_block_hash,omitempty"`
	// True if the transaction is included in a microblock that has not been confirmed by an anchor block.
	IsUnanchored *bool `json:"is_unanchored,omitempty"`
	// The microblock hash that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be an empty string.
	MicroblockHash *string `json:"microblock_hash,omitempty"`
	// The microblock sequence number that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be 2147483647 (0x7fffffff, the max int32 value), this value preserves logical transaction ordering on (block_height, microblock_sequence, tx_index).
	MicroblockSequence *int `json:"microblock_sequence,omitempty"`
	// Set to `true` if microblock is anchored in the canonical chain tip, `false` if the transaction was orphaned in a micro-fork.
	MicroblockCanonical *bool `json:"microblock_canonical,omitempty"`
	// Execution cost read count.
	ExecutionCostReadCount *int `json:"execution_cost_read_count,omitempty"`
	// Execution cost read length.
	ExecutionCostReadLength *int `json:"execution_cost_read_length,omitempty"`
	// Execution cost runtime.
	ExecutionCostRuntime *int `json:"execution_cost_runtime,omitempty"`
	// Execution cost write count.
	ExecutionCostWriteCount *int `json:"execution_cost_write_count,omitempty"`
	// Execution cost write length.
	ExecutionCostWriteLength *int `json:"execution_cost_write_length,omitempty"`
	// List of transaction events
	Events              []TransactionEvent1  `json:"events,omitempty"`
	TxType              *TxTypeEnum          `json:"tx_type,omitempty"`
	TokenTransfer       *TokenTransfer       `json:"token_transfer,omitempty"`
	SmartContract       *SmartContract       `json:"smart_contract,omitempty"`
	ContractCall        *ContractCall        `json:"contract_call,omitempty"`
	PoisonMicroblock    *PoisonMicroblock    `json:"poison_microblock,omitempty"`
	CoinbasePayload     *CoinbasePayload     `json:"coinbase_payload,omitempty"`
	TenureChangePayload *TenureChangePayload `json:"tenure_change_payload,omitempty"`
}

Transaction represents a Transaction struct. Describes all transaction types on Stacks 2.0 blockchain

func (*Transaction) MarshalJSON

func (t *Transaction) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Transaction. It customizes the JSON marshaling process for Transaction objects.

func (*Transaction) UnmarshalJSON

func (t *Transaction) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Transaction. It customizes the JSON unmarshaling process for Transaction objects.

type TransactionAnchorModeTypeEnum

type TransactionAnchorModeTypeEnum string

TransactionAnchorModeTypeEnum is a string enum. `on_chain_only`: the transaction MUST be included in an anchored block, `off_chain_only`: the transaction MUST be included in a microblock, `any`: the leader can choose where to include the transaction.

const (
	TransactionAnchorModeTypeEnum_ONCHAINONLY  TransactionAnchorModeTypeEnum = "on_chain_only"
	TransactionAnchorModeTypeEnum_OFFCHAINONLY TransactionAnchorModeTypeEnum = "off_chain_only"
	TransactionAnchorModeTypeEnum_ANY          TransactionAnchorModeTypeEnum = "any"
)

type TransactionEvent

type TransactionEvent struct {
	EventIndex   *int                    `json:"event_index,omitempty"`
	EventType    *EventTypeEnum          `json:"event_type,omitempty"`
	TxId         *string                 `json:"tx_id,omitempty"`
	ContractLog  *ContractLog            `json:"contract_log,omitempty"`
	StxLockEvent *StxLockEvent           `json:"stx_lock_event,omitempty"`
	Asset        *TransactionEventAsset1 `json:"asset,omitempty"`
}

TransactionEvent represents a TransactionEvent struct.

func (*TransactionEvent) MarshalJSON

func (t *TransactionEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionEvent. It customizes the JSON marshaling process for TransactionEvent objects.

func (*TransactionEvent) UnmarshalJSON

func (t *TransactionEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionEvent. It customizes the JSON unmarshaling process for TransactionEvent objects.

type TransactionEvent1

type TransactionEvent1 struct {
	EventIndex   int                    `json:"event_index"`
	EventType    string                 `json:"event_type"`
	TxId         string                 `json:"tx_id"`
	ContractLog  ContractLog            `json:"contract_log"`
	StxLockEvent StxLockEvent           `json:"stx_lock_event"`
	Asset        TransactionEventAsset1 `json:"asset"`
}

TransactionEvent1 represents a TransactionEvent1 struct.

func (*TransactionEvent1) MarshalJSON

func (t *TransactionEvent1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionEvent1. It customizes the JSON marshaling process for TransactionEvent1 objects.

func (*TransactionEvent1) UnmarshalJSON

func (t *TransactionEvent1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionEvent1. It customizes the JSON unmarshaling process for TransactionEvent1 objects.

type TransactionEventAsset1

type TransactionEventAsset1 struct {
	AssetEventType TransactionEventAssetTypeEnum `json:"asset_event_type"`
	AssetId        string                        `json:"asset_id"`
	Sender         string                        `json:"sender"`
	Recipient      string                        `json:"recipient"`
	Amount         string                        `json:"amount"`
	Value          Value                         `json:"value"`
	Memo           *string                       `json:"memo,omitempty"`
}

TransactionEventAsset1 represents a TransactionEventAsset1 struct.

func (*TransactionEventAsset1) MarshalJSON

func (t *TransactionEventAsset1) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionEventAsset1. It customizes the JSON marshaling process for TransactionEventAsset1 objects.

func (*TransactionEventAsset1) UnmarshalJSON

func (t *TransactionEventAsset1) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionEventAsset1. It customizes the JSON unmarshaling process for TransactionEventAsset1 objects.

type TransactionEventAssetTypeEnum

type TransactionEventAssetTypeEnum string

TransactionEventAssetTypeEnum is a string enum.

const (
	TransactionEventAssetTypeEnum_TRANSFER TransactionEventAssetTypeEnum = "transfer"
	TransactionEventAssetTypeEnum_MINT     TransactionEventAssetTypeEnum = "mint"
	TransactionEventAssetTypeEnum_BURN     TransactionEventAssetTypeEnum = "burn"
)

type TransactionEventsResponse

type TransactionEventsResponse struct {
	Limit   int                `json:"limit"`
	Offset  int                `json:"offset"`
	Results []TransactionEvent `json:"results"`
}

TransactionEventsResponse represents a TransactionEventsResponse struct. GET event for the given transaction

func (*TransactionEventsResponse) MarshalJSON

func (t *TransactionEventsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionEventsResponse. It customizes the JSON marshaling process for TransactionEventsResponse objects.

func (*TransactionEventsResponse) UnmarshalJSON

func (t *TransactionEventsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionEventsResponse. It customizes the JSON unmarshaling process for TransactionEventsResponse objects.

type TransactionFeeEstimateRequest

type TransactionFeeEstimateRequest struct {
	TransactionPayload string `json:"transaction_payload"`
	EstimatedLen       *int   `json:"estimated_len,omitempty"`
}

TransactionFeeEstimateRequest represents a TransactionFeeEstimateRequest struct. POST request for estimated fee

func (*TransactionFeeEstimateRequest) MarshalJSON

func (t *TransactionFeeEstimateRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionFeeEstimateRequest. It customizes the JSON marshaling process for TransactionFeeEstimateRequest objects.

func (*TransactionFeeEstimateRequest) UnmarshalJSON

func (t *TransactionFeeEstimateRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionFeeEstimateRequest. It customizes the JSON unmarshaling process for TransactionFeeEstimateRequest objects.

type TransactionFeeEstimateResponse

type TransactionFeeEstimateResponse struct {
	EstimatedCostScalar    int           `json:"estimated_cost_scalar"`
	CostScalarChangeByByte *float64      `json:"cost_scalar_change_by_byte,omitempty"`
	EstimatedCost          EstimatedCost `json:"estimated_cost"`
	Estimations            []Estimation  `json:"estimations,omitempty"`
}

TransactionFeeEstimateResponse represents a TransactionFeeEstimateResponse struct. POST response for estimated fee

func (*TransactionFeeEstimateResponse) MarshalJSON

func (t *TransactionFeeEstimateResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionFeeEstimateResponse. It customizes the JSON marshaling process for TransactionFeeEstimateResponse objects.

func (*TransactionFeeEstimateResponse) UnmarshalJSON

func (t *TransactionFeeEstimateResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionFeeEstimateResponse. It customizes the JSON unmarshaling process for TransactionFeeEstimateResponse objects.

type TransactionIdentifier

type TransactionIdentifier struct {
	// Any transactions that are attributable only to a block (ex: a block event) should use the hash of the block as the identifier.
	Hash string `json:"hash"`
}

TransactionIdentifier represents a TransactionIdentifier struct. The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.

func (*TransactionIdentifier) MarshalJSON

func (t *TransactionIdentifier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionIdentifier. It customizes the JSON marshaling process for TransactionIdentifier objects.

func (*TransactionIdentifier) UnmarshalJSON

func (t *TransactionIdentifier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionIdentifier. It customizes the JSON unmarshaling process for TransactionIdentifier objects.

type TransactionList

type TransactionList struct {
	Found  *bool    `json:"found,omitempty"`
	Result *Result2 `json:"result,omitempty"`
}

TransactionList represents a TransactionList struct.

func (*TransactionList) MarshalJSON

func (t *TransactionList) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionList. It customizes the JSON marshaling process for TransactionList objects.

func (*TransactionList) UnmarshalJSON

func (t *TransactionList) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionList. It customizes the JSON unmarshaling process for TransactionList objects.

type TransactionResults

type TransactionResults struct {
	// The number of transactions to return
	Limit int `json:"limit"`
	// The number to transactions to skip (starting at `0`)
	Offset int `json:"offset"`
	// The number of transactions available
	Total   int           `json:"total"`
	Results []Transaction `json:"results"`
}

TransactionResults represents a TransactionResults struct. GET request that returns transactions

func (*TransactionResults) MarshalJSON

func (t *TransactionResults) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TransactionResults. It customizes the JSON marshaling process for TransactionResults objects.

func (*TransactionResults) UnmarshalJSON

func (t *TransactionResults) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TransactionResults. It customizes the JSON unmarshaling process for TransactionResults objects.

type TransactionStatusEnum

type TransactionStatusEnum string

TransactionStatusEnum is a string enum. Status of the transaction

const (
	TransactionStatusEnum_SUCCESS              TransactionStatusEnum = "success"
	TransactionStatusEnum_ABORTBYRESPONSE      TransactionStatusEnum = "abort_by_response"
	TransactionStatusEnum_ABORTBYPOSTCONDITION TransactionStatusEnum = "abort_by_post_condition"
)

type TransferTypeEnum

type TransferTypeEnum string

TransferTypeEnum is a string enum. Indicates if the transfer is from a stx-transfer transaction or a contract-call transaction

const (
	TransferTypeEnum_BULKSEND        TransferTypeEnum = "bulk-send"
	TransferTypeEnum_STXTRANSFER     TransferTypeEnum = "stx-transfer"
	TransferTypeEnum_STXTRANSFERMEMO TransferTypeEnum = "stx-transfer-memo"
)

type TxAges

type TxAges struct {
	TokenTransfer    TokenTransfer2    `json:"token_transfer"`
	SmartContract    SmartContract2    `json:"smart_contract"`
	ContractCall     ContractCall2     `json:"contract_call"`
	PoisonMicroblock PoisonMicroblock1 `json:"poison_microblock"`
}

TxAges represents a TxAges struct. The average time (in blocks) that transactions have lived in the mempool. The start block height is simply the current chain-tip of when the attached Stacks node receives the transaction. This timing can be different across Stacks nodes / API instances due to propagation timing differences in the p2p network.

func (*TxAges) MarshalJSON

func (t *TxAges) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TxAges. It customizes the JSON marshaling process for TxAges objects.

func (*TxAges) UnmarshalJSON

func (t *TxAges) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TxAges. It customizes the JSON unmarshaling process for TxAges objects.

type TxByteSizes

type TxByteSizes struct {
	TokenTransfer    TokenTransfer2    `json:"token_transfer"`
	SmartContract    SmartContract2    `json:"smart_contract"`
	ContractCall     ContractCall2     `json:"contract_call"`
	PoisonMicroblock PoisonMicroblock1 `json:"poison_microblock"`
}

TxByteSizes represents a TxByteSizes struct. The average byte size of transactions in the mempool, broken down by transaction type.

func (*TxByteSizes) MarshalJSON

func (t *TxByteSizes) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TxByteSizes. It customizes the JSON marshaling process for TxByteSizes objects.

func (*TxByteSizes) UnmarshalJSON

func (t *TxByteSizes) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TxByteSizes. It customizes the JSON unmarshaling process for TxByteSizes objects.

type TxData3

type TxData3 struct {
	// If the transaction lies within the canonical chain
	Canonical bool `json:"canonical"`
	// Refers to the hash of the block for searched transaction
	BlockHash     string `json:"block_hash"`
	BurnBlockTime int    `json:"burn_block_time"`
	BlockHeight   int    `json:"block_height"`
	TxType        string `json:"tx_type"`
	// Corresponding tx_id for smart_contract
	TxId *string `json:"tx_id,omitempty"`
}

TxData3 represents a TxData3 struct. Returns basic search result information about the requested id

func (*TxData3) MarshalJSON

func (t *TxData3) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TxData3. It customizes the JSON marshaling process for TxData3 objects.

func (*TxData3) UnmarshalJSON

func (t *TxData3) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TxData3. It customizes the JSON unmarshaling process for TxData3 objects.

type TxResult

type TxResult struct {
	// Hex string representing the value fo the transaction result
	Hex string `json:"hex"`
	// Readable string of the transaction result
	Repr string `json:"repr"`
}

TxResult represents a TxResult struct. Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.

func (*TxResult) MarshalJSON

func (t *TxResult) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TxResult. It customizes the JSON marshaling process for TxResult objects.

func (*TxResult) UnmarshalJSON

func (t *TxResult) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TxResult. It customizes the JSON unmarshaling process for TxResult objects.

type TxSimpleFeeAverages

type TxSimpleFeeAverages struct {
	TokenTransfer    TokenTransfer2    `json:"token_transfer"`
	SmartContract    SmartContract2    `json:"smart_contract"`
	ContractCall     ContractCall2     `json:"contract_call"`
	PoisonMicroblock PoisonMicroblock1 `json:"poison_microblock"`
}

TxSimpleFeeAverages represents a TxSimpleFeeAverages struct. The simple mean (average) transaction fee, broken down by transaction type. Note that this does not factor in actual execution costs. The average fee is not a reliable metric for calculating a fee for a new transaction.

func (*TxSimpleFeeAverages) MarshalJSON

func (t *TxSimpleFeeAverages) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TxSimpleFeeAverages. It customizes the JSON marshaling process for TxSimpleFeeAverages objects.

func (*TxSimpleFeeAverages) UnmarshalJSON

func (t *TxSimpleFeeAverages) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TxSimpleFeeAverages. It customizes the JSON unmarshaling process for TxSimpleFeeAverages objects.

type TxTypeCounts

type TxTypeCounts struct {
	TokenTransfer    float64 `json:"token_transfer"`
	SmartContract    float64 `json:"smart_contract"`
	ContractCall     float64 `json:"contract_call"`
	PoisonMicroblock float64 `json:"poison_microblock"`
}

TxTypeCounts represents a TxTypeCounts struct. Number of tranasction in the mempool, broken down by transaction type.

func (*TxTypeCounts) MarshalJSON

func (t *TxTypeCounts) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TxTypeCounts. It customizes the JSON marshaling process for TxTypeCounts objects.

func (*TxTypeCounts) UnmarshalJSON

func (t *TxTypeCounts) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TxTypeCounts. It customizes the JSON unmarshaling process for TxTypeCounts objects.

type TxTypeEnum

type TxTypeEnum string

TxTypeEnum is a string enum.

const (
	TxTypeEnum_TOKENTRANSFER TxTypeEnum = "token_transfer"
)

type Type2Enum

type Type2Enum string

Type2Enum is a string enum.

const (
	Type2Enum_SMARTCONTRACTLOG      Type2Enum = "smart_contract_log"
	Type2Enum_STXLOCK               Type2Enum = "stx_lock"
	Type2Enum_STXASSET              Type2Enum = "stx_asset"
	Type2Enum_FUNGIBLETOKENASSET    Type2Enum = "fungible_token_asset"
	Type2Enum_NONFUNGIBLETOKENASSET Type2Enum = "non_fungible_token_asset"
)

type TypeEnum

type TypeEnum string

TypeEnum is a string enum.

const (
	TypeEnum_COINBASE         TypeEnum = "coinbase"
	TypeEnum_TOKENTRANSFER    TypeEnum = "token_transfer"
	TypeEnum_SMARTCONTRACT    TypeEnum = "smart_contract"
	TypeEnum_CONTRACTCALL     TypeEnum = "contract_call"
	TypeEnum_POISONMICROBLOCK TypeEnum = "poison_microblock"
	TypeEnum_TENURECHANGE     TypeEnum = "tenure_change"
)

type UnanchoredTransactionListResponse

type UnanchoredTransactionListResponse struct {
	// The number of unanchored transactions available
	Total   int           `json:"total"`
	Results []Transaction `json:"results"`
}

UnanchoredTransactionListResponse represents a UnanchoredTransactionListResponse struct. GET request that returns unanchored transactions

func (*UnanchoredTransactionListResponse) MarshalJSON

func (u *UnanchoredTransactionListResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UnanchoredTransactionListResponse. It customizes the JSON marshaling process for UnanchoredTransactionListResponse objects.

func (*UnanchoredTransactionListResponse) UnmarshalJSON

func (u *UnanchoredTransactionListResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UnanchoredTransactionListResponse. It customizes the JSON unmarshaling process for UnanchoredTransactionListResponse objects.

type Value

type Value struct {
	Hex  string `json:"hex"`
	Repr string `json:"repr"`
}

Value represents a Value struct.

func (*Value) MarshalJSON

func (v *Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Value. It customizes the JSON marshaling process for Value objects.

func (*Value) UnmarshalJSON

func (v *Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Value. It customizes the JSON unmarshaling process for Value objects.

type Value11

type Value11 struct {
	Hex  string `json:"hex"`
	Repr string `json:"repr"`
}

Value11 represents a Value11 struct. Non Fungible Token asset value.

func (*Value11) MarshalJSON

func (v *Value11) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Value11. It customizes the JSON marshaling process for Value11 objects.

func (*Value11) UnmarshalJSON

func (v *Value11) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Value11. It customizes the JSON unmarshaling process for Value11 objects.

type Value18

type Value18 struct {
	// Hex string representing the identifier of the Non-Fungible Token
	Hex string `json:"hex"`
	// Readable string of the Non-Fungible Token identifier
	Repr string `json:"repr"`
}

Value18 represents a Value18 struct. Non-Fungible Token value

func (*Value18) MarshalJSON

func (v *Value18) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Value18. It customizes the JSON marshaling process for Value18 objects.

func (*Value18) UnmarshalJSON

func (v *Value18) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Value18. It customizes the JSON unmarshaling process for Value18 objects.

type Version

type Version struct {
	// The rosetta_version is the version of the Rosetta interface the implementation adheres to. This can be useful for clients looking to reliably parse responses.
	RosettaVersion string `json:"rosetta_version"`
	// The node_version is the canonical version of the node runtime. This can help clients manage deployments.
	NodeVersion string `json:"node_version"`
	// When a middleware server is used to adhere to the Rosetta interface, it should return its version here. This can help clients manage deployments.
	MiddlewareVersion *string `json:"middleware_version,omitempty"`
	// Any other information that may be useful about versioning of dependent services should be returned here.
	Metadata *interface{} `json:"metadata,omitempty"`
}

Version represents a Version struct. The Version object is utilized to inform the client of the versions of different components of the Rosetta implementation.

func (*Version) MarshalJSON

func (v *Version) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Version. It customizes the JSON marshaling process for Version objects.

func (*Version) UnmarshalJSON

func (v *Version) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Version. It customizes the JSON unmarshaling process for Version objects.

Source Files

Jump to

Keyboard shortcuts

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