Documentation
¶
Index ¶
- Constants
- func ContractValidateSplit(c string) ([]string, error)
- type APIClient
- func (c *APIClient) GetAccountBalance(principal string) (BalanceResponse, error)
- func (c *APIClient) GetAllTokens() ([]TokenResult, error)
- func (c *APIClient) GetContractDetails(contractID string) (ContractDetailsResponse, error)
- func (c *APIClient) GetContractReadOnly(id string, function string, responseType string, arguments []string) (string, error)
- func (c *APIClient) GetContractSource(id string) (string, error)
- func (c *APIClient) GetNFTHoldings(principal string) ([]NFTHoldingResponseResults, error)
- func (c *APIClient) GetTokenHolders(contractID string, block int) (ContractHoldersResponse, error)
- func (c *APIClient) GetTransactions(principal string) ([]Transaction, error)
- type Balance
- type BalanceResponse
- type ContractDetailsResponse
- type ContractHoldersResponse
- type ContractSourceResponse
- type Events
- type Ft
- type FungibleTokens
- type NFTHoldingResponse
- type NFTHoldingResponseResults
- type NFTHoldingResponseResultsValue
- type Nft
- type NonFungibleTokens
- type ReadOnlyPayload
- type ReadOnlyResponse
- type Response
- type Stx
- type TokenResult
- type TokenTransfer
- type Transaction
- type TransactionsResponse
- type Tx
- type TxResult
Constants ¶
View Source
const DefaultApiBase = "https://stacks.hashhavoc.com"
const DefaultApiBase = "https://api.hiro.so"
Variables ¶
This section is empty.
Functions ¶
func ContractValidateSplit ¶
Types ¶
type APIClient ¶
func NewAPIClient ¶
func (*APIClient) GetAccountBalance ¶
func (c *APIClient) GetAccountBalance(principal string) (BalanceResponse, error)
func (*APIClient) GetAllTokens ¶
func (c *APIClient) GetAllTokens() ([]TokenResult, error)
func (*APIClient) GetContractDetails ¶
func (c *APIClient) GetContractDetails(contractID string) (ContractDetailsResponse, error)
func (*APIClient) GetContractReadOnly ¶
func (*APIClient) GetContractSource ¶
func (*APIClient) GetNFTHoldings ¶
func (c *APIClient) GetNFTHoldings(principal string) ([]NFTHoldingResponseResults, error)
func (*APIClient) GetTokenHolders ¶
func (c *APIClient) GetTokenHolders(contractID string, block int) (ContractHoldersResponse, error)
func (*APIClient) GetTransactions ¶ added in v0.0.11
func (c *APIClient) GetTransactions(principal string) ([]Transaction, error)
type BalanceResponse ¶
type BalanceResponse struct {
Stx Balance `json:"stx"`
FungibleTokens FungibleTokens `json:"fungible_tokens"`
NonFungibleTokens NonFungibleTokens `json:"non_fungible_tokens"`
}
type ContractDetailsResponse ¶
type ContractHoldersResponse ¶
type ContractSourceResponse ¶
type FungibleTokens ¶
type NFTHoldingResponse ¶
type NFTHoldingResponse struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
Total int `json:"total"`
Results []NFTHoldingResponseResults `json:"results"`
}
type NFTHoldingResponseResults ¶
type NFTHoldingResponseResults struct {
AssetIdentifier string `json:"asset_identifier"`
Value NFTHoldingResponseResultsValue `json:"value"`
BlockHeight int `json:"block_height"`
TxID string `json:"tx_id"`
}
type NonFungibleTokens ¶
type ReadOnlyPayload ¶
type ReadOnlyResponse ¶
type Response ¶
type Response struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
Total int `json:"total"`
Results []TokenResult `json:"results"`
}
type TokenResult ¶
type TokenResult struct {
Name string `json:"name"`
Symbol string `json:"symbol"`
Decimals int `json:"decimals"`
TotalSupply string `json:"total_supply"`
TokenURI string `json:"token_uri"`
Description string `json:"description"`
ImageURI string `json:"image_uri"`
ImageCanonicalURI string `json:"image_canonical_uri"`
TxID string `json:"tx_id"`
SenderAddress string `json:"sender_address"`
ContractPrincipal string `json:"contract_principal"`
}
type TokenTransfer ¶ added in v0.0.11
type Transaction ¶ added in v0.0.11
type TransactionsResponse ¶ added in v0.0.11
type TransactionsResponse struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
Total int `json:"total"`
Results []Transaction `json:"results"`
}
type Tx ¶ added in v0.0.11
type Tx struct {
TxID string `json:"tx_id,omitempty"`
Nonce int `json:"nonce,omitempty"`
FeeRate string `json:"fee_rate,omitempty"`
SenderAddress string `json:"sender_address,omitempty"`
Sponsored bool `json:"sponsored,omitempty"`
PostConditionMode string `json:"post_condition_mode,omitempty"`
PostConditions []any `json:"post_conditions,omitempty"`
AnchorMode string `json:"anchor_mode,omitempty"`
IsUnanchored bool `json:"is_unanchored,omitempty"`
BlockHash string `json:"block_hash,omitempty"`
ParentBlockHash string `json:"parent_block_hash,omitempty"`
BlockHeight int `json:"block_height,omitempty"`
BlockTime int `json:"block_time,omitempty"`
BlockTimeIso time.Time `json:"block_time_iso,omitempty"`
BurnBlockTime int `json:"burn_block_time,omitempty"`
BurnBlockTimeIso time.Time `json:"burn_block_time_iso,omitempty"`
ParentBurnBlockTime int `json:"parent_burn_block_time,omitempty"`
ParentBurnBlockTimeIso time.Time `json:"parent_burn_block_time_iso,omitempty"`
Canonical bool `json:"canonical,omitempty"`
TxIndex int `json:"tx_index,omitempty"`
TxStatus string `json:"tx_status,omitempty"`
TxResult TxResult `json:"tx_result,omitempty"`
MicroblockHash string `json:"microblock_hash,omitempty"`
MicroblockSequence int64 `json:"microblock_sequence,omitempty"`
MicroblockCanonical bool `json:"microblock_canonical,omitempty"`
EventCount int `json:"event_count,omitempty"`
Events []any `json:"events,omitempty"`
ExecutionCostReadCount int `json:"execution_cost_read_count,omitempty"`
ExecutionCostReadLength int `json:"execution_cost_read_length,omitempty"`
ExecutionCostRuntime int `json:"execution_cost_runtime,omitempty"`
ExecutionCostWriteCount int `json:"execution_cost_write_count,omitempty"`
ExecutionCostWriteLength int `json:"execution_cost_write_length,omitempty"`
TxType string `json:"tx_type,omitempty"`
TokenTransfer TokenTransfer `json:"token_transfer,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.