Documentation ¶
Index ¶
- type Airdrop
- type AirdropAttributes
- type AirdropListResponse
- type AirdropParams
- type AirdropParamsAttributes
- type AirdropParamsListResponse
- type AirdropParamsResponse
- type AirdropResponse
- type Balance
- type BalanceAttributes
- type BalanceListResponse
- type BalanceResponse
- type BuildPermitHash
- type BuildPermitHashAttributes
- type BuildPermitHashListRequest
- type BuildPermitHashRequest
- type CreateAirdrop
- type CreateAirdropAttributes
- type CreateAirdropListRequest
- type CreateAirdropRequest
- type Details
- type Estimate
- type EstimateAttributes
- type EstimateListResponse
- type EstimateResponse
- type Flag
- type Flagger
- type Flags
- type Included
- func (c *Included) Add(includes ...Resource)
- func (c Included) MarshalJSON() ([]byte, error)
- func (c *Included) MustAirdrop(key Key) *Airdrop
- func (c *Included) MustAirdropParams(key Key) *AirdropParams
- func (c *Included) MustBalance(key Key) *Balance
- func (c *Included) MustBuildPermitHash(key Key) *BuildPermitHash
- func (c *Included) MustCreateAirdrop(key Key) *CreateAirdrop
- func (c *Included) MustEstimate(key Key) *Estimate
- func (c *Included) MustPermitHash(key Key) *PermitHash
- func (c *Included) MustTokenDetails(key Key) *TokenDetails
- func (c *Included) MustTransferErc20Token(key Key) *TransferErc20Token
- func (c *Included) MustTx(key Key) *Tx
- func (c *Included) UnmarshalJSON(data []byte) error
- type Key
- type Links
- type PermitHash
- type PermitHashAttributes
- type PermitHashListResponse
- type PermitHashResponse
- type Relation
- type RelationCollection
- type Resource
- type ResourceType
- type TokenDetails
- type TokenDetailsAttributes
- type TokenDetailsListResponse
- type TokenDetailsResponse
- type TransferErc20Token
- type TransferErc20TokenAttributes
- type TransferErc20TokenListRequest
- type TransferErc20TokenRequest
- type Tx
- type TxAttributes
- type TxListResponse
- type TxResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Airdrop ¶
type Airdrop struct { Key Attributes AirdropAttributes `json:"attributes"` }
type AirdropAttributes ¶
type AirdropAttributes struct { // Destination address for the airdrop Address string `json:"address"` // Amount of airdropped coins Amount string `json:"amount"` // RFC3339 UTC timestamp of the airdrop creation CreatedAt time.Time `json:"created_at"` // User nullifier Nullifier string `json:"nullifier"` // Status of the airdrop transaction Status string `json:"status"` // Hash of the airdrop transaction TxHash *string `json:"tx_hash,omitempty"` // RFC3339 UTC timestamp of the airdrop successful tx UpdatedAt time.Time `json:"updated_at"` }
type AirdropListResponse ¶
type AirdropListResponse struct { Data []Airdrop `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*AirdropListResponse) GetMeta ¶
func (r *AirdropListResponse) GetMeta(out interface{}) error
func (*AirdropListResponse) PutMeta ¶
func (r *AirdropListResponse) PutMeta(v interface{}) (err error)
type AirdropParams ¶
type AirdropParams struct { Key Attributes AirdropParamsAttributes `json:"attributes"` }
type AirdropParamsAttributes ¶
type AirdropParamsAttributes struct { // Event identifier that is generated during ZKP query creation EventId string `json:"event_id"` // Query selector that is used for proof generation QuerySelector string `json:"query_selector"` // Unix timestamp in seconds when airdrop event starts StartedAt int64 `json:"started_at"` }
type AirdropParamsListResponse ¶
type AirdropParamsListResponse struct { Data []AirdropParams `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*AirdropParamsListResponse) GetMeta ¶
func (r *AirdropParamsListResponse) GetMeta(out interface{}) error
func (*AirdropParamsListResponse) PutMeta ¶
func (r *AirdropParamsListResponse) PutMeta(v interface{}) (err error)
type AirdropParamsResponse ¶
type AirdropParamsResponse struct { Data AirdropParams `json:"data"` Included Included `json:"included"` }
type AirdropResponse ¶
type Balance ¶ added in v0.2.1
type Balance struct { Key Attributes BalanceAttributes `json:"attributes"` }
type BalanceAttributes ¶ added in v0.2.1
type BalanceListResponse ¶ added in v0.2.1
type BalanceListResponse struct { Data []Balance `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*BalanceListResponse) GetMeta ¶ added in v0.2.1
func (r *BalanceListResponse) GetMeta(out interface{}) error
func (*BalanceListResponse) PutMeta ¶ added in v0.2.1
func (r *BalanceListResponse) PutMeta(v interface{}) (err error)
type BalanceResponse ¶ added in v0.2.1
type BuildPermitHash ¶ added in v0.2.0
type BuildPermitHash struct { Key Attributes BuildPermitHashAttributes `json:"attributes"` }
type BuildPermitHashAttributes ¶ added in v0.2.0
type BuildPermitHashAttributes struct { // Transferred amount of tokens. Amount *big.Int `json:"amount"` // UNIX UTC timestamp in the future till which permit signature may be used. Deadline *big.Int `json:"deadline"` // EVM address FROM which tokens are transferred. Sender common.Address `json:"sender"` }
type BuildPermitHashListRequest ¶ added in v0.2.0
type BuildPermitHashListRequest struct { Data []BuildPermitHash `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*BuildPermitHashListRequest) GetMeta ¶ added in v0.2.0
func (r *BuildPermitHashListRequest) GetMeta(out interface{}) error
func (*BuildPermitHashListRequest) PutMeta ¶ added in v0.2.0
func (r *BuildPermitHashListRequest) PutMeta(v interface{}) (err error)
type BuildPermitHashRequest ¶ added in v0.2.0
type BuildPermitHashRequest struct { Data BuildPermitHash `json:"data"` Included Included `json:"included"` }
type CreateAirdrop ¶
type CreateAirdrop struct { Key Attributes CreateAirdropAttributes `json:"attributes"` }
type CreateAirdropAttributes ¶
type CreateAirdropListRequest ¶
type CreateAirdropListRequest struct { Data []CreateAirdrop `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*CreateAirdropListRequest) GetMeta ¶
func (r *CreateAirdropListRequest) GetMeta(out interface{}) error
func (*CreateAirdropListRequest) PutMeta ¶
func (r *CreateAirdropListRequest) PutMeta(v interface{}) (err error)
type CreateAirdropRequest ¶
type CreateAirdropRequest struct { Data CreateAirdrop `json:"data"` Included Included `json:"included"` }
type Details ¶
type Details json.RawMessage
func (Details) MarshalJSON ¶
MarshalJSON - casts Details to []byte
func (*Details) UnmarshalJSON ¶
UnmarshalJSON - casts data to Details
type Estimate ¶ added in v0.2.0
type Estimate struct { Key Attributes EstimateAttributes `json:"attributes"` }
type EstimateAttributes ¶ added in v0.2.0
type EstimateListResponse ¶ added in v0.2.0
type EstimateListResponse struct { Data []Estimate `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*EstimateListResponse) GetMeta ¶ added in v0.2.0
func (r *EstimateListResponse) GetMeta(out interface{}) error
func (*EstimateListResponse) PutMeta ¶ added in v0.2.0
func (r *EstimateListResponse) PutMeta(v interface{}) (err error)
type EstimateResponse ¶ added in v0.2.0
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) MustAirdrop ¶
MustAirdrop - returns Airdrop 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) MustAirdropParams ¶
func (c *Included) MustAirdropParams(key Key) *AirdropParams
MustAirdropParams - returns AirdropParams 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) MustBalance ¶ added in v0.2.1
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) MustBuildPermitHash ¶ added in v0.2.0
func (c *Included) MustBuildPermitHash(key Key) *BuildPermitHash
MustBuildPermitHash - returns BuildPermitHash 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) MustCreateAirdrop ¶
func (c *Included) MustCreateAirdrop(key Key) *CreateAirdrop
MustCreateAirdrop - returns CreateAirdrop 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) MustEstimate ¶ added in v0.2.0
MustEstimate - returns Estimate 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) MustPermitHash ¶ added in v0.2.0
func (c *Included) MustPermitHash(key Key) *PermitHash
MustPermitHash - returns PermitHash 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) MustTokenDetails ¶ added in v0.3.0
func (c *Included) MustTokenDetails(key Key) *TokenDetails
MustTokenDetails - returns TokenDetails 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) MustTransferErc20Token ¶ added in v0.2.0
func (c *Included) MustTransferErc20Token(key Key) *TransferErc20Token
MustTransferErc20Token - returns TransferErc20Token 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) MustTx ¶ added in v0.2.0
MustTx - returns Tx 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 PermitHash ¶ added in v0.2.0
type PermitHash struct { Key Attributes PermitHashAttributes `json:"attributes"` }
type PermitHashAttributes ¶ added in v0.2.0
type PermitHashAttributes struct { // Permit message hash built by ERC-2612 standard that has to be signed by token owner. Hash string `json:"hash"` }
type PermitHashListResponse ¶ added in v0.2.0
type PermitHashListResponse struct { Data []PermitHash `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*PermitHashListResponse) GetMeta ¶ added in v0.2.0
func (r *PermitHashListResponse) GetMeta(out interface{}) error
func (*PermitHashListResponse) PutMeta ¶ added in v0.2.0
func (r *PermitHashListResponse) PutMeta(v interface{}) (err error)
type PermitHashResponse ¶ added in v0.2.0
type PermitHashResponse struct { Data PermitHash `json:"data"` Included Included `json:"included"` }
type RelationCollection ¶
func (RelationCollection) MarshalJSON ¶
func (r RelationCollection) MarshalJSON() ([]byte, error)
type ResourceType ¶
type ResourceType string
const ( AIRDROP ResourceType = "airdrop" CREATE_AIRDROP ResourceType = "create_airdrop" TOKEN ResourceType = "token" TRANSFER_ERC20 ResourceType = "transfer_erc20" )
List of ResourceType
type TokenDetails ¶ added in v0.3.0
type TokenDetails struct { Key Attributes TokenDetailsAttributes `json:"attributes"` }
type TokenDetailsAttributes ¶ added in v0.3.0
type TokenDetailsListResponse ¶ added in v0.3.0
type TokenDetailsListResponse struct { Data []TokenDetails `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*TokenDetailsListResponse) GetMeta ¶ added in v0.3.0
func (r *TokenDetailsListResponse) GetMeta(out interface{}) error
func (*TokenDetailsListResponse) PutMeta ¶ added in v0.3.0
func (r *TokenDetailsListResponse) PutMeta(v interface{}) (err error)
type TokenDetailsResponse ¶ added in v0.3.0
type TokenDetailsResponse struct { Data TokenDetails `json:"data"` Included Included `json:"included"` }
type TransferErc20Token ¶ added in v0.2.0
type TransferErc20Token struct { Key Attributes TransferErc20TokenAttributes `json:"attributes"` }
type TransferErc20TokenAttributes ¶ added in v0.2.0
type TransferErc20TokenAttributes struct { // Transferred amount of tokens. Amount *big.Int `json:"amount"` // UNIX UTC timestamp in the future till which permit signature may be used. Deadline *big.Int `json:"deadline"` // Hex encoded permit the x coordinate of R value of the signature. R string `json:"r"` // EVM address TO which tokens are transferred. Receiver common.Address `json:"receiver"` // Hex encoded permit the x coordinate of S value of the signature. S string `json:"s"` // EVM address FROM which tokens are transferred. Sender common.Address `json:"sender"` // The parity of the y coordinate of R. V uint8 `json:"v"` }
type TransferErc20TokenListRequest ¶ added in v0.2.0
type TransferErc20TokenListRequest struct { Data []TransferErc20Token `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*TransferErc20TokenListRequest) GetMeta ¶ added in v0.2.0
func (r *TransferErc20TokenListRequest) GetMeta(out interface{}) error
func (*TransferErc20TokenListRequest) PutMeta ¶ added in v0.2.0
func (r *TransferErc20TokenListRequest) PutMeta(v interface{}) (err error)
type TransferErc20TokenRequest ¶ added in v0.2.0
type TransferErc20TokenRequest struct { Data TransferErc20Token `json:"data"` Included Included `json:"included"` }
type Tx ¶ added in v0.2.0
type Tx struct { Key Attributes TxAttributes `json:"attributes"` }
type TxAttributes ¶ added in v0.2.0
type TxListResponse ¶ added in v0.2.0
type TxListResponse struct { Data []Tx `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*TxListResponse) GetMeta ¶ added in v0.2.0
func (r *TxListResponse) GetMeta(out interface{}) error
func (*TxListResponse) PutMeta ¶ added in v0.2.0
func (r *TxListResponse) PutMeta(v interface{}) (err error)
type TxResponse ¶ added in v0.2.0
Source Files ¶
- db.go
- flag.go
- included.go
- links.go
- model_airdrop.go
- model_airdrop_attributes.go
- model_airdrop_params.go
- model_airdrop_params_attributes.go
- model_balance.go
- model_balance_attributes.go
- model_build_permit_hash.go
- model_build_permit_hash_attributes.go
- model_create_airdrop.go
- model_create_airdrop_attributes.go
- model_details.go
- model_estimate.go
- model_estimate_attributes.go
- model_key.go
- model_permit_hash.go
- model_permit_hash_attributes.go
- model_relation.go
- model_relation_collection.go
- model_resource_type.go
- model_token_details.go
- model_token_details_attributes.go
- model_transfer_erc20_token.go
- model_transfer_erc20_token_attributes.go
- model_tx.go
- model_tx_attributes.go