Documentation ¶
Index ¶
- Constants
- func ContractValidateSplit(c string) ([]string, error)
- type APIClient
- func (c *APIClient) GetAccountBalance(principal string, block int) (BalanceResponse, error)
- func (c *APIClient) GetAllNames() ([]Names, 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) GetName(name string) (NameDetails, error)
- func (c *APIClient) GetNames(page int) ([]string, error)
- func (c *APIClient) GetTokenHolders(contractID string, block int) (ContractHoldersResponse, error)
- func (c *APIClient) GetTransactions(principal string) ([]Transaction, error)
- type Asset
- type Balance
- type BalanceResponse
- type BalanceResponseByAddress
- type ClarityValue
- type ContractCall
- type ContractDetailsResponse
- type ContractHoldersResponse
- type ContractLog
- type ContractSourceResponse
- type Event
- type Events
- type Ft
- type FungibleTokens
- type NFTHoldingResponse
- type NFTHoldingResponseResults
- type NFTHoldingResponseResultsValue
- type NameDetails
- type Names
- type NamesListResponse
- 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, block int) (BalanceResponse, error)
func (*APIClient) GetAllNames ¶ added in v0.1.1
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) GetName ¶ added in v0.1.1
func (c *APIClient) GetName(name string) (NameDetails, 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 BalanceResponseByAddress ¶ added in v0.0.23
type BalanceResponseByAddress struct { Address string Resp BalanceResponse }
type ClarityValue ¶ added in v0.1.1
type ContractCall ¶ added in v0.1.1
type ContractCall struct { ContractId string `json:"contract_id,omitempty"` FunctionName string `json:"function_name,omitempty"` FunctionSignature string `json:"function_signature,omitempty"` FunctionArgs []ClarityValue `json:"function_args,omitempty"` }
type ContractDetailsResponse ¶
type ContractHoldersResponse ¶
type ContractLog ¶ added in v0.1.1
type ContractLog struct { ContractId string `json:"contract_id,omitempty"` Topic string `json:"topic,omitempty"` Value ClarityValue `json:"value,omitempty"` }
type ContractSourceResponse ¶
type Event ¶ added in v0.1.1
type Event struct { EventIndex int `json:"event_index,omitempty"` EventType string `json:"event_type,omitempty"` TxId string `json:"tx_id,omitempty"` Asset Asset `json:"asset,omitempty"` ContractLog ContractLog `json:"contract_log,omitempty"` }
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 NameDetails ¶ added in v0.1.1
type NamesListResponse ¶ added in v0.1.2
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"` ContractCall ContractCall `json:"contract_call,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 []Event `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.