Documentation ¶
Index ¶
- Constants
- func SupportedNetworkTypes() []interface{}
- func SupportedNetworkTypesText() []string
- func SupportedTxTypes() []interface{}
- func SupportedTxTypesEth() []interface{}
- func SupportedTxTypesNear() []interface{}
- func SupportedTxTypesSolana() []interface{}
- func SupportedTxTypesText() []string
- type Account
- type AccountListResponse
- type AccountRelationships
- type AccountResponse
- type Balance
- type BalanceAttributes
- type BalanceListResponse
- type BalanceResponse
- type BuildTx
- type BuildTxAttributes
- type BuildTxListRequest
- type BuildTxRelationships
- type BuildTxRequest
- type Chain
- type ChainAttributes
- type ChainListResponse
- type ChainRelationships
- type ChainResponse
- type Details
- type EthTxData
- type Flag
- type Flagger
- type Flags
- type Included
- func (c *Included) Add(includes ...Resource)
- func (c Included) MarshalJSON() ([]byte, error)
- func (c *Included) MustAccount(key Key) *Account
- func (c *Included) MustBalance(key Key) *Balance
- func (c *Included) MustBuildTx(key Key) *BuildTx
- func (c *Included) MustChain(key Key) *Chain
- func (c *Included) MustItem(key Key) *Item
- func (c *Included) MustItemChainMapping(key Key) *ItemChainMapping
- func (c *Included) MustNft(key Key) *Nft
- func (c *Included) MustNftMetadata(key Key) *NftMetadata
- func (c *Included) MustToken(key Key) *Token
- func (c *Included) MustTransfer(key Key) *Transfer
- func (c *Included) MustUnsubmittedTx(key Key) *UnsubmittedTx
- func (c *Included) UnmarshalJSON(data []byte) error
- type Item
- type ItemAttributes
- type ItemChainMapping
- type ItemChainMappingAttributes
- type ItemChainMappingListResponse
- type ItemChainMappingRelationships
- type ItemChainMappingResponse
- type ItemListResponse
- type ItemRelationships
- type ItemResponse
- type Key
- type Links
- type NearTxData
- type NetworkType
- type Nft
- type NftAttributes
- type NftListResponse
- type NftMetadata
- type NftMetadataAttribute
- type NftMetadataAttributes
- type NftMetadataListResponse
- type NftMetadataResponse
- type NftResponse
- type Relation
- type RelationCollection
- type Resource
- type ResourceType
- type SolanaTxData
- type Token
- type TokenAttributes
- type TokenListResponse
- type TokenRelationships
- type TokenResponse
- type Transfer
- type TransferAttributes
- type TransferListResponse
- type TransferRelationships
- type TransferResponse
- type TransferState
- type TxType
- type UnsubmittedTx
- type UnsubmittedTxAttributes
- type UnsubmittedTxListResponse
- type UnsubmittedTxResponse
Constants ¶
const ( NetworkTypeEVM = NetworkType(types.NetworkType_EVM) NetworkTypeSolana = NetworkType(types.NetworkType_Solana) NetworkTypeNearProtocol = NetworkType(types.NetworkType_Near) NetworkTypeOther = NetworkType(types.NetworkType_Other) )
const ( TransferStateInitialized = TransferState(rarimocore.OpStatus_INITIALIZED) TransferStateApproved = TransferState(rarimocore.OpStatus_APPROVED) TransferStateNotApproved = TransferState(rarimocore.OpStatus_NOT_APPROVED) TransferStateSigned = TransferState(rarimocore.OpStatus_SIGNED) )
Variables ¶
This section is empty.
Functions ¶
func SupportedNetworkTypes ¶
func SupportedNetworkTypes() []interface{}
func SupportedNetworkTypesText ¶
func SupportedNetworkTypesText() []string
func SupportedTxTypes ¶
func SupportedTxTypes() []interface{}
func SupportedTxTypesEth ¶
func SupportedTxTypesEth() []interface{}
func SupportedTxTypesNear ¶
func SupportedTxTypesNear() []interface{}
func SupportedTxTypesSolana ¶
func SupportedTxTypesSolana() []interface{}
func SupportedTxTypesText ¶
func SupportedTxTypesText() []string
Types ¶
type Account ¶
type Account struct { Key Relationships AccountRelationships `json:"relationships"` }
type AccountListResponse ¶
type AccountListResponse struct { Data []Account `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*AccountListResponse) GetMeta ¶
func (r *AccountListResponse) GetMeta(out interface{}) error
func (*AccountListResponse) PutMeta ¶
func (r *AccountListResponse) PutMeta(v interface{}) (err error)
type AccountRelationships ¶
type AccountRelationships struct {
ExternalIds RelationCollection `json:"external_ids"`
}
type AccountResponse ¶
type Balance ¶
type Balance struct { Key Attributes BalanceAttributes `json:"attributes"` }
type BalanceAttributes ¶
type BalanceAttributes struct { // Balance amount in specific chain 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 BalanceResponse ¶
type BuildTx ¶
type BuildTx struct { Key Attributes BuildTxAttributes `json:"attributes"` Relationships BuildTxRelationships `json:"relationships"` }
type BuildTxAttributes ¶
type BuildTxAttributes struct { // network to send tx to Network string `json:"network"` TxData json.RawMessage `json:"tx_data"` // Type of the transaction TxType TxType `json:"tx_type"` }
type BuildTxListRequest ¶
type BuildTxListRequest struct { Data []BuildTx `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*BuildTxListRequest) GetMeta ¶
func (r *BuildTxListRequest) GetMeta(out interface{}) error
func (*BuildTxListRequest) PutMeta ¶
func (r *BuildTxListRequest) PutMeta(v interface{}) (err error)
type BuildTxRelationships ¶
type BuildTxRequest ¶
type Chain ¶
type Chain struct { Key Attributes ChainAttributes `json:"attributes"` Relationships ChainRelationships `json:"relationships"` }
type ChainAttributes ¶
type ChainAttributes struct { // Address of bridge contract in specific chain BridgeContract string `json:"bridge_contract"` ChainParams json.RawMessage `json:"chain_params"` // Type of blockchain by supported wallets, APIs, etc. Enum: - `evm` - `0` - `solana` - `1` - `near` - `2` - `other` - `3` ChainType tokenmanager.NetworkType `json:"chain_type"` // Link to network icon Icon *string `json:"icon,omitempty"` Name string `json:"name"` }
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 ChainRelationships ¶
type ChainRelationships struct {
Items RelationCollection `json:"items"`
}
type ChainResponse ¶
type Details ¶
type Details json.RawMessage
func (Details) MarshalJSON ¶
MarshalJSON - casts Details to []byte
func (*Details) UnmarshalJSON ¶
UnmarshalJSON - casts data to Details
type EthTxData ¶
type EthTxData struct { // The amount of the token to send (string containing a decimal number with precision specified by the contract) Amount *string `json:"amount,omitempty"` // bundle data as for calling Deposit* methods [(more info)](https://rarimo.gitlab.io/docs/docs/overview/bundling) BundleData string `json:"bundle_data"` // bundle salt as for calling Deposit* methods [(more info)](https://rarimo.gitlab.io/docs/docs/overview/bundling) BundleSalt string `json:"bundle_salt"` // indicates that the deposited token is wrapped IsWrapped *bool `json:"is_wrapped,omitempty"` // The address of the receiver Receiver string `json:"receiver"` // Network which the transfer is to be consumed on TargetNetwork string `json:"target_network"` // [ OPTIONAL ] contract address that identifies the token to be deposited. If not provided then the native token is used. TokenAddr *common.Address `json:"token_addr,omitempty"` // [ OPTIONAL ] hex-encoded token identifier. Should be provided if contract is provided and is of type ERC721 or ERC1155. TokenId *string `json:"token_id,omitempty"` }
transaction parameters for ethereum deposit tx
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) MustAccount ¶
MustAccount - returns Account 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 ¶
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) MustBuildTx ¶
MustBuildTx - returns BuildTx 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) MustItem ¶
MustItem - returns Item 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) MustItemChainMapping ¶
func (c *Included) MustItemChainMapping(key Key) *ItemChainMapping
MustItemChainMapping - returns ItemChainMapping 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) MustNft ¶
MustNft - returns Nft 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) MustNftMetadata ¶
func (c *Included) MustNftMetadata(key Key) *NftMetadata
MustNftMetadata - returns NftMetadata 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) MustTransfer ¶
MustTransfer - returns Transfer 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) MustUnsubmittedTx ¶
func (c *Included) MustUnsubmittedTx(key Key) *UnsubmittedTx
MustUnsubmittedTx - returns UnsubmittedTx 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 Item ¶
type Item struct { Key Attributes ItemAttributes `json:"attributes"` Relationships ItemRelationships `json:"relationships"` }
type ItemAttributes ¶
type ItemAttributes struct { // unique index of the item saved on core Index string `json:"index"` // free form JSON object representing item's metadata saved on core Metadata json.RawMessage `json:"metadata"` }
type ItemChainMapping ¶
type ItemChainMapping struct { Key Attributes ItemChainMappingAttributes `json:"attributes"` Relationships ItemChainMappingRelationships `json:"relationships"` }
type ItemChainMappingListResponse ¶
type ItemChainMappingListResponse struct { Data []ItemChainMapping `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*ItemChainMappingListResponse) GetMeta ¶
func (r *ItemChainMappingListResponse) GetMeta(out interface{}) error
func (*ItemChainMappingListResponse) PutMeta ¶
func (r *ItemChainMappingListResponse) PutMeta(v interface{}) (err error)
type ItemChainMappingResponse ¶
type ItemChainMappingResponse struct { Data ItemChainMapping `json:"data"` Included Included `json:"included"` }
type ItemListResponse ¶
type ItemListResponse struct { Data []Item `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*ItemListResponse) GetMeta ¶
func (r *ItemListResponse) GetMeta(out interface{}) error
func (*ItemListResponse) PutMeta ¶
func (r *ItemListResponse) PutMeta(v interface{}) (err error)
type ItemRelationships ¶
type ItemResponse ¶
type Key ¶
type Key struct { ID string `json:"id"` Type ResourceType `json:"type"` }
func NewKeyInt64 ¶
func NewKeyInt64(id int64, resourceType ResourceType) Key
func NewStringKey ¶
func NewStringKey(id string, resourceType ResourceType) Key
func (Key) AsRelation ¶
type NearTxData ¶
type NearTxData struct { // The amount to be transferred (string containing a decimal number with precision specified by the contract) Amount *string `json:"amount,omitempty"` // indicates that the deposited token is wrapped IsWrapped *bool `json:"is_wrapped,omitempty"` // The address of the receiver Receiver string `json:"receiver"` // The base64-encoded public key of the sender: base64(publicKeyBase58) SenderPublicKey string `json:"sender_public_key"` // Network which the transfer is to be consumed on TargetNetwork string `json:"target_network"` // [ OPTIONAL ] should be provided in case of FT and NFT deposit. TokenAddr *string `json:"token_addr,omitempty"` // [ OPTIONAL ] token identifier. Shpuld be provided in case of NFT deposit. TokenId *string `json:"token_id,omitempty"` }
transaction parameters for ethereum deposit tx
type NetworkType ¶
type NetworkType types.NetworkType
func (NetworkType) Int ¶
func (t NetworkType) Int() int
func (NetworkType) MarshalJSON ¶
func (t NetworkType) MarshalJSON() ([]byte, error)
func (NetworkType) String ¶
func (t NetworkType) String() string
func (*NetworkType) UnmarshalJSON ¶
func (t *NetworkType) UnmarshalJSON(b []byte) error
func (*NetworkType) UnmarshalText ¶
func (t *NetworkType) UnmarshalText(b []byte) error
type Nft ¶
type Nft struct { Key Attributes NftAttributes `json:"attributes"` }
type NftAttributes ¶
type NftAttributes struct { Attributes []NftMetadataAttribute `json:"attributes"` CollectionName string `json:"collection_name"` Description *string `json:"description,omitempty"` // Link to image ImageUrl string `json:"image_url"` Name string `json:"name"` }
type NftListResponse ¶
type NftListResponse struct { Data []Nft `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*NftListResponse) GetMeta ¶
func (r *NftListResponse) GetMeta(out interface{}) error
func (*NftListResponse) PutMeta ¶
func (r *NftListResponse) PutMeta(v interface{}) (err error)
type NftMetadata ¶
type NftMetadata struct { Key Attributes NftMetadataAttributes `json:"attributes"` }
type NftMetadataAttribute ¶
type NftMetadataAttributes ¶
type NftMetadataAttributes struct { AnimationUrl *string `json:"animation_url,omitempty"` Attributes []NftMetadataAttribute `json:"attributes"` Description *string `json:"description,omitempty"` ExternalUrl *string `json:"external_url,omitempty"` // Link to image ImageUrl string `json:"image_url"` // original url to metadata stored in the contract MetadataUrl string `json:"metadata_url"` Name string `json:"name"` }
type NftMetadataListResponse ¶
type NftMetadataListResponse struct { Data []NftMetadata `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*NftMetadataListResponse) GetMeta ¶
func (r *NftMetadataListResponse) GetMeta(out interface{}) error
func (*NftMetadataListResponse) PutMeta ¶
func (r *NftMetadataListResponse) PutMeta(v interface{}) (err error)
type NftMetadataResponse ¶
type NftMetadataResponse struct { Data NftMetadata `json:"data"` Included Included `json:"included"` }
type NftResponse ¶
type RelationCollection ¶
func (RelationCollection) MarshalJSON ¶
func (r RelationCollection) MarshalJSON() ([]byte, error)
type ResourceType ¶
type ResourceType string
const ( ACCOUNT_EXTERNAL_IDS ResourceType = "account-external-ids" ACCOUNTS ResourceType = "accounts" BALANCES ResourceType = "balances" BUILD_TX_REQUESTS ResourceType = "build-tx-requests" CHAINS ResourceType = "chains" COLLECTIONS ResourceType = "collections" ITEM_CHAIN_MAPPINGS ResourceType = "item_chain_mappings" ITEMS ResourceType = "items" NFTS ResourceType = "nfts" NFTS_METADATA ResourceType = "nfts-metadata" TOKENS ResourceType = "tokens" TRANSACTIONS ResourceType = "transactions" TRANSFERS ResourceType = "transfers" UNSUBMITTED_TRANSACTIONS ResourceType = "unsubmitted-transactions" )
List of ResourceType
type SolanaTxData ¶
type SolanaTxData struct { // The amount of the token to send (string containing a decimal number with precision specified by the contract) Amount *string `json:"amount,omitempty"` // bundle data as for calling Deposit* methods [(more info)](https://rarimo.gitlab.io/docs/docs/overview/bundling) BundleData string `json:"bundle_data"` // bundle seed as for calling Deposit* methods [(more info)](https://rarimo.gitlab.io/docs/docs/overview/bundling) BundleSeed string `json:"bundle_seed"` // The address of the receiver Receiver string `json:"receiver"` // Network which the transfer is to be consumed on TargetNetwork string `json:"target_network"` // [ OPTIONAL ] address that identifies the token to be deposited. If not provided then the native token is used. TokenAddr *string `json:"token_addr,omitempty"` }
transaction parameters for solana deposit tx
type Token ¶
type Token struct { Key Attributes TokenAttributes `json:"attributes"` Relationships TokenRelationships `json:"relationships"` }
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 TokenRelationships ¶
type TokenRelationships struct {
Chains RelationCollection `json:"chains"`
}
type TokenResponse ¶
type Transfer ¶
type Transfer struct { Key Attributes TransferAttributes `json:"attributes"` Relationships TransferRelationships `json:"relationships"` }
type TransferAttributes ¶
type TransferAttributes struct { // Amount of tokens to be transferred Amount *string `json:"amount,omitempty"` // Additional data for the transfer [(more info)](https://rarimo.gitlab.io/docs/docs/overview/bundling) BundleData *string `json:"bundle_data,omitempty"` // Salt for the transfer's bundle [(more info)](https://rarimo.gitlab.io/docs/docs/overview/bundling) BundleSalt *string `json:"bundle_salt,omitempty"` // Time (UTC) of the transfer creation, RFC3339 format CreatedAt time.Time `json:"created_at"` // Number of the event in source chain's transaction EventId *string `json:"event_id,omitempty"` // Name of the source chain FromChain *string `json:"from_chain,omitempty"` // Identifier of the transfer origin Origin *string `json:"origin,omitempty"` // Shows state of the transfer Status TransferState `json:"status"` // Name of the destination chain ToChain *string `json:"to_chain,omitempty"` }
type TransferListResponse ¶
type TransferListResponse struct { Data []Transfer `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*TransferListResponse) GetMeta ¶
func (r *TransferListResponse) GetMeta(out interface{}) error
func (*TransferListResponse) PutMeta ¶
func (r *TransferListResponse) PutMeta(v interface{}) (err error)
type TransferRelationships ¶
type TransferResponse ¶
type TransferState ¶
type TransferState rarimocore.OpStatus
func TransferStateFromInt ¶
func TransferStateFromInt(raw int) (TransferState, bool)
func (TransferState) Int ¶
func (t TransferState) Int() int
func (TransferState) Intp ¶
func (t TransferState) Intp() *int
func (TransferState) MarshalJSON ¶
func (t TransferState) MarshalJSON() ([]byte, error)
func (TransferState) String ¶
func (t TransferState) String() string
func (*TransferState) UnmarshalJSON ¶
func (t *TransferState) UnmarshalJSON(b []byte) error
func (*TransferState) UnmarshalText ¶
func (t *TransferState) UnmarshalText(b []byte) error
type TxType ¶
type TxType int
func (TxType) MarshalJSON ¶
func (*TxType) UnmarshalJSON ¶
func (*TxType) UnmarshalText ¶
type UnsubmittedTx ¶
type UnsubmittedTx struct { Key Attributes UnsubmittedTxAttributes `json:"attributes"` }
type UnsubmittedTxAttributes ¶
type UnsubmittedTxListResponse ¶
type UnsubmittedTxListResponse struct { Data []UnsubmittedTx `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` Meta json.RawMessage `json:"meta,omitempty"` }
func (*UnsubmittedTxListResponse) GetMeta ¶
func (r *UnsubmittedTxListResponse) GetMeta(out interface{}) error
func (*UnsubmittedTxListResponse) PutMeta ¶
func (r *UnsubmittedTxListResponse) PutMeta(v interface{}) (err error)
type UnsubmittedTxResponse ¶
type UnsubmittedTxResponse struct { Data UnsubmittedTx `json:"data"` Included Included `json:"included"` }
Source Files ¶
- db.go
- flag.go
- included.go
- keys.go
- links.go
- model_account.go
- model_account_relationships.go
- model_balance.go
- model_balance_attributes.go
- model_build_tx.go
- model_build_tx_attributes.go
- model_build_tx_relationships.go
- model_chain.go
- model_chain_attributes.go
- model_chain_relationships.go
- model_details.go
- model_eth_tx_data.go
- model_item.go
- model_item_attributes.go
- model_item_chain_mapping.go
- model_item_chain_mapping_attributes.go
- model_item_chain_mapping_relationships.go
- model_item_relationships.go
- model_key.go
- model_near_tx_data.go
- model_nft.go
- model_nft_attributes.go
- model_nft_metadata.go
- model_nft_metadata_attribute.go
- model_nft_metadata_attributes.go
- model_relation.go
- model_relation_collection.go
- model_resource_type.go
- model_solana_tx_data.go
- model_token.go
- model_token_attributes.go
- model_token_relationships.go
- model_transfer.go
- model_transfer_attributes.go
- model_transfer_relationships.go
- model_unsubmitted_tx.go
- model_unsubmitted_tx_attributes.go
- network_type.go
- transfer_state.go
- tx_type.go