Documentation
¶
Index ¶
- Constants
- func SupportedChainKinds() []interface{}
- func SupportedChainKindsText() []string
- func SupportedChainTypes() []interface{}
- func SupportedChainTypesText() []string
- type Balance
- type BalanceAttributes
- type BalanceListResponse
- type BalanceRelationships
- type BalanceResponse
- type Chain
- type ChainAttributes
- type ChainKind
- type ChainListResponse
- type ChainResponse
- type ChainType
- type Details
- type Flag
- type Flagger
- type Flags
- type Included
- type Key
- type Links
- type NativeTokenInfo
- type Relation
- type RelationCollection
- type Resource
- type ResourceType
- type Token
- type TokenAttributes
- type TokenListResponse
- type TokenResponse
Constants ¶
const ( ChainTypeEVM = ChainType(types.NetworkType_EVM) ChainTypeSolana = ChainType(types.NetworkType_Solana) ChainTypeNearProtocol = ChainType(types.NetworkType_Near) ChainTypeOther = ChainType(types.NetworkType_Other) )
Variables ¶
This section is empty.
Functions ¶
func SupportedChainKinds ¶
func SupportedChainKinds() []interface{}
func SupportedChainKindsText ¶
func SupportedChainKindsText() []string
func SupportedChainTypes ¶
func SupportedChainTypes() []interface{}
func SupportedChainTypesText ¶
func SupportedChainTypesText() []string
Types ¶
type Balance ¶
type Balance struct { Key Attributes BalanceAttributes `json:"attributes"` Relationships BalanceRelationships `json:"relationships"` }
type BalanceAttributes ¶
type BalanceAttributes struct {
Amount string `json:"amount"`
}
type BalanceListResponse ¶
type BalanceListResponse struct { Data []Balance `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*BalanceListResponse) GetMeta ¶
func (r *BalanceListResponse) GetMeta(out interface{}) error
func (*BalanceListResponse) PutMeta ¶
func (r *BalanceListResponse) PutMeta(v interface{}) (err error)
type BalanceRelationships ¶
type BalanceResponse ¶
type BalanceResponse struct { Data Balance `json:"data"` Included Included `json:"included"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*BalanceResponse) GetMeta ¶
func (r *BalanceResponse) GetMeta(out interface{}) error
func (*BalanceResponse) PutMeta ¶
func (r *BalanceResponse) PutMeta(v interface{}) (err error)
type Chain ¶
type Chain struct { Key Attributes ChainAttributes `json:"attributes"` }
type ChainAttributes ¶
type ChainAttributes struct { ExplorerUrl string `json:"explorer_url"` Icon string `json:"icon"` // The kind of the chain Kind ChainKind `json:"kind"` Name string `json:"name"` NativeToken NativeTokenInfo `json:"native_token"` Rpc string `json:"rpc"` SwapContractAddress string `json:"swap_contract_address"` SwapContractVersion string `json:"swap_contract_version"` // The type of the chain Type ChainType `json:"type"` }
type ChainKind ¶
type ChainKind int32
func (ChainKind) MarshalJSON ¶
func (*ChainKind) UnmarshalJSON ¶
func (*ChainKind) UnmarshalText ¶
type ChainListResponse ¶
type ChainListResponse struct { Data []Chain `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*ChainListResponse) GetMeta ¶
func (r *ChainListResponse) GetMeta(out interface{}) error
func (*ChainListResponse) PutMeta ¶
func (r *ChainListResponse) PutMeta(v interface{}) (err error)
type ChainResponse ¶
type ChainResponse struct { Data Chain `json:"data"` Included Included `json:"included"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*ChainResponse) GetMeta ¶
func (r *ChainResponse) GetMeta(out interface{}) error
func (*ChainResponse) PutMeta ¶
func (r *ChainResponse) PutMeta(v interface{}) (err error)
type ChainType ¶
type ChainType types.NetworkType
func (ChainType) MarshalJSON ¶
func (*ChainType) UnmarshalJSON ¶
func (*ChainType) UnmarshalText ¶
type Details ¶
type Details json.RawMessage
func (Details) MarshalJSON ¶
MarshalJSON - casts Details to []byte
func (*Details) UnmarshalJSON ¶
UnmarshalJSON - casts data to Details
type Included ¶
type Included struct {
// contains filtered or unexported fields
}
Included - an array of Resource objects that are related to the primary data and/or each other (“included resources”).
func (Included) MarshalJSON ¶
MarshalJSON - marshals include collection as array of json objects
func (*Included) MustBalance ¶
MustBalance - returns Balance from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustChain ¶
MustChain - returns Chain from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustToken ¶
MustToken - returns Token from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) UnmarshalJSON ¶
UmarshalJSON - unmarshal array of json objects into include collection
type Key ¶
type Key struct { ID string `json:"id"` Type ResourceType `json:"type"` }
func NewKeyInt64 ¶
func NewKeyInt64(id int64, resourceType ResourceType) Key
func (Key) AsRelation ¶
type NativeTokenInfo ¶
type NativeTokenInfo struct { // The number of decimals the token uses - e.g. 18, means to divide the token amount by 1000000000000000000 to get its user representation. Decimals int64 `json:"decimals"` // The name of the token. Name string `json:"name"` // The symbol of the token. Symbol string `json:"symbol"` }
type RelationCollection ¶
func (RelationCollection) MarshalJSON ¶
func (r RelationCollection) MarshalJSON() ([]byte, error)
type ResourceType ¶
type ResourceType string
const ( ACCOUNTS ResourceType = "accounts" BALANCES ResourceType = "balances" CHAINS ResourceType = "chains" TOKENS ResourceType = "tokens" )
List of ResourceType
type Token ¶
type Token struct { Key Attributes TokenAttributes `json:"attributes"` }
type TokenAttributes ¶
type TokenListResponse ¶
type TokenListResponse struct { Data []Token `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*TokenListResponse) GetMeta ¶
func (r *TokenListResponse) GetMeta(out interface{}) error
func (*TokenListResponse) PutMeta ¶
func (r *TokenListResponse) PutMeta(v interface{}) (err error)
type TokenResponse ¶
type TokenResponse struct { Data Token `json:"data"` Included Included `json:"included"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*TokenResponse) GetMeta ¶
func (r *TokenResponse) GetMeta(out interface{}) error
func (*TokenResponse) PutMeta ¶
func (r *TokenResponse) PutMeta(v interface{}) (err error)
Source Files
¶
- chain_kind.go
- chain_type.go
- db.go
- flag.go
- included.go
- links.go
- model_balance.go
- model_balance_attributes.go
- model_balance_relationships.go
- model_chain.go
- model_chain_attributes.go
- model_details.go
- model_key.go
- model_native_token_info.go
- model_relation.go
- model_relation_collection.go
- model_resource_type.go
- model_token.go
- model_token_attributes.go