Documentation ¶
Index ¶
- Constants
- Variables
- type API
- func (api *API) AddCustomToken(ctx context.Context, token Token) error
- func (api *API) AddEthereumChain(ctx context.Context, network params.Network) error
- func (api *API) AddFavourite(ctx context.Context, favourite Favourite) error
- func (api *API) AddSavedAddress(ctx context.Context, sa SavedAddress) error
- func (api *API) CheckRecentHistory(ctx context.Context, addresses []common.Address) error
- func (api *API) CheckRecentHistoryForChainIDs(ctx context.Context, chainIDs []uint64, addresses []common.Address) error
- func (api *API) DeleteCustomToken(ctx context.Context, address common.Address) error
- func (api *API) DeleteCustomTokenByChainID(ctx context.Context, chainID uint64, address common.Address) error
- func (api *API) DeleteEthereumChain(ctx context.Context, chainID uint64) error
- func (api *API) DeletePendingTransaction(ctx context.Context, transactionHash common.Hash) error
- func (api *API) DeletePendingTransactionByChainID(ctx context.Context, chainID uint64, transactionHash common.Hash) error
- func (api *API) DeleteSavedAddress(ctx context.Context, address common.Address) error
- func (api *API) GetCachedBalances(ctx context.Context, addresses []common.Address) ([]transfer.LastKnownBlockView, error)
- func (api *API) GetCachedBalancesbyChainID(ctx context.Context, chainID uint64, addresses []common.Address) ([]transfer.LastKnownBlockView, error)
- func (api *API) GetCryptoOnRamps(ctx context.Context) ([]CryptoOnRamp, error)
- func (api *API) GetCustomTokens(ctx context.Context) ([]*Token, error)
- func (api *API) GetEthereumChains(ctx context.Context, onlyEnabled bool) ([]*params.Network, error)
- func (api *API) GetFavourites(ctx context.Context) ([]*Favourite, error)
- func (api *API) GetOpenseaAssetsByOwnerAndCollection(ctx context.Context, chainID uint64, owner common.Address, ...) ([]OpenseaAsset, error)
- func (api *API) GetOpenseaCollectionsByOwner(ctx context.Context, chainID uint64, owner common.Address) ([]OpenseaCollection, error)
- func (api *API) GetPendingOutboundTransactionsByAddress(ctx context.Context, address common.Address) ([]*PendingTransaction, error)
- func (api *API) GetPendingOutboundTransactionsByAddressAndChainID(ctx context.Context, chainID uint64, address common.Address) ([]*PendingTransaction, error)
- func (api *API) GetPendingTransactions(ctx context.Context) ([]*PendingTransaction, error)
- func (api *API) GetPendingTransactionsByChainID(ctx context.Context, chainID uint64) ([]*PendingTransaction, error)
- func (api *API) GetSavedAddresses(ctx context.Context) ([]*SavedAddress, error)
- func (api *API) GetTokens(ctx context.Context, chainID uint64) ([]*Token, error)
- func (api *API) GetTokensBalances(ctx context.Context, accounts, addresses []common.Address) (map[common.Address]map[common.Address]*hexutil.Big, error)
- func (api *API) GetTokensBalancesForChainIDs(ctx context.Context, chainIDs []uint64, accounts, addresses []common.Address) (map[common.Address]map[common.Address]*hexutil.Big, error)
- func (api *API) GetTransfersByAddress(ctx context.Context, address common.Address, toBlock, limit *hexutil.Big, ...) ([]transfer.View, error)
- func (api *API) GetTransfersByAddressAndChainID(ctx context.Context, chainID uint64, address common.Address, ...) ([]transfer.View, error)
- func (api *API) LoadTransferByHash(ctx context.Context, address common.Address, hash common.Hash) error
- func (api *API) SetInitialBlocksRange(ctx context.Context) error
- func (api *API) SetInitialBlocksRangeForChainIDs(ctx context.Context, chainIDs []uint64) error
- func (api *API) StorePendingTransaction(ctx context.Context, trx PendingTransaction) error
- func (api *API) WatchTransaction(ctx context.Context, transactionHash common.Hash) error
- func (api *API) WatchTransactionByChainID(ctx context.Context, chainID uint64, transactionHash common.Hash) error
- type CryptoOnRamp
- type CryptoOnRampManager
- type CryptoOnRampOptions
- type DataSourceType
- type Favourite
- type FavouriteManager
- type OpenseaAsset
- type OpenseaAssetCollection
- type OpenseaAssetContainer
- type OpenseaClient
- type OpenseaCollection
- type OpenseaCollectionTrait
- type OpenseaContract
- type OpenseaLastSale
- type OpenseaPaymentToken
- type OpenseaSellOrder
- type OpenseaTrait
- type PendingTransaction
- type PendingTrxType
- type SavedAddress
- type SavedAddressesManager
- type Service
- type Token
- type TokenManager
- type TraitValue
- type TransactionManager
Constants ¶
View Source
const AssetLimit = 50
View Source
const CollectionLimit = 300
Variables ¶
View Source
var BaseURLs = map[uint64]string{
1: "https://api.opensea.io/api/v1",
4: "https://rinkeby-api.opensea.io/api/v1",
}
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is class with methods available over RPC.
func (*API) AddCustomToken ¶ added in v0.38.1
func (*API) AddEthereumChain ¶ added in v0.86.7
func (*API) AddFavourite ¶ added in v0.62.2
func (*API) AddSavedAddress ¶ added in v0.86.7
func (api *API) AddSavedAddress(ctx context.Context, sa SavedAddress) error
func (*API) CheckRecentHistory ¶ added in v0.75.0
func (*API) CheckRecentHistoryForChainIDs ¶ added in v0.86.7
func (*API) DeleteCustomToken ¶ added in v0.38.1
func (*API) DeleteCustomTokenByChainID ¶ added in v0.86.7
func (*API) DeleteEthereumChain ¶ added in v0.86.7
func (*API) DeletePendingTransaction ¶ added in v0.62.0
func (*API) DeletePendingTransactionByChainID ¶ added in v0.86.7
func (*API) DeleteSavedAddress ¶ added in v0.86.7
func (*API) GetCachedBalances ¶ added in v0.79.4
func (*API) GetCachedBalancesbyChainID ¶ added in v0.86.7
func (*API) GetCryptoOnRamps ¶ added in v0.71.4
func (api *API) GetCryptoOnRamps(ctx context.Context) ([]CryptoOnRamp, error)
func (*API) GetCustomTokens ¶ added in v0.38.1
func (*API) GetEthereumChains ¶ added in v0.86.7
func (*API) GetFavourites ¶ added in v0.62.2
func (*API) GetOpenseaAssetsByOwnerAndCollection ¶ added in v0.83.17
func (*API) GetOpenseaCollectionsByOwner ¶ added in v0.83.17
func (*API) GetPendingOutboundTransactionsByAddress ¶ added in v0.62.0
func (*API) GetPendingOutboundTransactionsByAddressAndChainID ¶ added in v0.86.7
func (*API) GetPendingTransactions ¶ added in v0.62.0
func (api *API) GetPendingTransactions(ctx context.Context) ([]*PendingTransaction, error)
func (*API) GetPendingTransactionsByChainID ¶ added in v0.86.7
func (*API) GetSavedAddresses ¶ added in v0.86.7
func (api *API) GetSavedAddresses(ctx context.Context) ([]*SavedAddress, error)
func (*API) GetTokensBalances ¶
func (api *API) GetTokensBalances(ctx context.Context, accounts, addresses []common.Address) (map[common.Address]map[common.Address]*hexutil.Big, error)
GetTokensBalances return mapping of token balances for every account.
func (*API) GetTokensBalancesForChainIDs ¶ added in v0.86.7
func (*API) GetTransfersByAddress ¶
func (api *API) GetTransfersByAddress(ctx context.Context, address common.Address, toBlock, limit *hexutil.Big, fetchMore bool) ([]transfer.View, error)
GetTransfersByAddress returns transfers for a single address
func (*API) GetTransfersByAddressAndChainID ¶ added in v0.86.7
func (*API) LoadTransferByHash ¶ added in v0.91.10
func (api *API) LoadTransferByHash(ctx context.Context, address common.Address, hash common.Hash) error
LoadTransferByHash loads transfer to the database
func (*API) SetInitialBlocksRange ¶ added in v0.73.1
SetInitialBlocksRange sets initial blocks range
func (*API) SetInitialBlocksRangeForChainIDs ¶ added in v0.86.7
func (*API) StorePendingTransaction ¶ added in v0.62.0
func (api *API) StorePendingTransaction(ctx context.Context, trx PendingTransaction) error
func (*API) WatchTransaction ¶ added in v0.74.1
type CryptoOnRamp ¶ added in v0.71.4
type CryptoOnRamp struct { Name string `json:"name"` Description string `json:"description"` Fees string `json:"fees"` LogoURL string `json:"logoUrl"` SiteURL string `json:"siteUrl"` Hostname string `json:"hostname"` Params map[string]string `json:"params"` // TODO implement params in JSON and parsing status-react }
type CryptoOnRampManager ¶ added in v0.71.4
func NewCryptoOnRampManager ¶ added in v0.71.4
func NewCryptoOnRampManager(options *CryptoOnRampOptions) *CryptoOnRampManager
func (*CryptoOnRampManager) Get ¶ added in v0.71.4
func (c *CryptoOnRampManager) Get() ([]CryptoOnRamp, error)
type CryptoOnRampOptions ¶ added in v0.71.4
type CryptoOnRampOptions struct {
// contains filtered or unexported fields
}
type DataSourceType ¶ added in v0.71.4
type DataSourceType int
const ( DataSourceHTTP DataSourceType = iota + 1 DataSourceStatic )
type FavouriteManager ¶ added in v0.86.7
type FavouriteManager struct {
// contains filtered or unexported fields
}
func (*FavouriteManager) AddFavourite ¶ added in v0.86.7
func (fm *FavouriteManager) AddFavourite(favourite Favourite) error
func (*FavouriteManager) GetFavourites ¶ added in v0.86.7
func (fm *FavouriteManager) GetFavourites() ([]*Favourite, error)
type OpenseaAsset ¶ added in v0.83.17
type OpenseaAsset struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Permalink string `json:"permalink"` ImageThumbnailURL string `json:"image_thumbnail_url"` ImageURL string `json:"image_url"` Contract OpenseaContract `json:"asset_contract"` Collection OpenseaAssetCollection `json:"collection"` Traits []OpenseaTrait `json:"traits"` LastSale OpenseaLastSale `json:"last_sale"` SellOrders []OpenseaSellOrder `json:"sell_orders"` BackgroundColor string `json:"background_color"` }
type OpenseaAssetCollection ¶ added in v0.83.17
type OpenseaAssetCollection struct {
Name string `json:"name"`
}
type OpenseaAssetContainer ¶ added in v0.83.17
type OpenseaAssetContainer struct {
Assets []OpenseaAsset `json:"assets"`
}
type OpenseaClient ¶ added in v0.83.17
type OpenseaClient struct {
// contains filtered or unexported fields
}
type OpenseaCollection ¶ added in v0.83.17
type OpenseaCollectionTrait ¶ added in v0.87.0
type OpenseaContract ¶ added in v0.83.17
type OpenseaContract struct {
Address string `json:"address"`
}
type OpenseaLastSale ¶ added in v0.87.0
type OpenseaLastSale struct {
PaymentToken OpenseaPaymentToken `json:"payment_token"`
}
type OpenseaPaymentToken ¶ added in v0.87.0
type OpenseaSellOrder ¶ added in v0.87.0
type OpenseaSellOrder struct {
CurrentPrice string `json:"current_price"`
}
type OpenseaTrait ¶ added in v0.85.1
type OpenseaTrait struct { TraitType string `json:"trait_type"` Value TraitValue `json:"value"` DisplayType string `json:"display_type"` MaxValue string `json:"max_value"` }
type PendingTransaction ¶ added in v0.62.0
type PendingTransaction struct { Hash common.Hash `json:"hash"` Timestamp uint64 `json:"timestamp"` Value bigint.BigInt `json:"value"` From common.Address `json:"from"` To common.Address `json:"to"` Data string `json:"data"` Symbol string `json:"symbol"` GasPrice bigint.BigInt `json:"gasPrice"` GasLimit bigint.BigInt `json:"gasLimit"` Type PendingTrxType `json:"type"` AdditionalData string `json:"additionalData"` ChainID uint64 `json:"network_id"` }
type PendingTrxType ¶ added in v0.62.0
type PendingTrxType string
const ( RegisterENS PendingTrxType = "RegisterENS" ReleaseENS PendingTrxType = "ReleaseENS" SetPubKey PendingTrxType = "SetPubKey" BuyStickerPack PendingTrxType = "BuyStickerPack" WalletTransfer PendingTrxType = "WalletTransfer" )
type SavedAddress ¶ added in v0.86.7
type SavedAddressesManager ¶ added in v0.86.7
type SavedAddressesManager struct {
// contains filtered or unexported fields
}
func (*SavedAddressesManager) AddSavedAddress ¶ added in v0.86.7
func (sam *SavedAddressesManager) AddSavedAddress(sa SavedAddress) error
func (*SavedAddressesManager) DeleteSavedAddress ¶ added in v0.86.7
func (sam *SavedAddressesManager) DeleteSavedAddress(chainID uint64, address common.Address) error
func (*SavedAddressesManager) GetSavedAddresses ¶ added in v0.86.7
func (sam *SavedAddressesManager) GetSavedAddresses(chainID uint64) ([]*SavedAddress, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a wallet service.
func NewService ¶
NewService initializes service instance.
type Token ¶ added in v0.38.1
type Token struct { Address common.Address `json:"address"` Name string `json:"name"` Symbol string `json:"symbol"` Color string `json:"color"` // Decimals defines how divisible the token is. For example, 0 would be // indivisible, whereas 18 would allow very small amounts of the token // to be traded. Decimals uint `json:"decimals"` ChainID uint64 `json:"chainId"` }
type TokenManager ¶ added in v0.86.7
type TokenManager struct {
// contains filtered or unexported fields
}
type TraitValue ¶ added in v0.85.1
type TraitValue string
func (*TraitValue) UnmarshalJSON ¶ added in v0.85.1
func (st *TraitValue) UnmarshalJSON(b []byte) error
type TransactionManager ¶ added in v0.86.7
type TransactionManager struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.