Documentation ¶
Index ¶
- Constants
- Variables
- type API
- func (api *API) AddCustomToken(ctx context.Context, token token.Token) error
- func (api *API) AddEthereumChain(ctx context.Context, network params.Network) error
- func (api *API) AddSavedAddress(ctx context.Context, sa SavedAddress) error
- func (api *API) CheckConnected(ctx context.Context) *ConnectedResult
- 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) CreateMultiTransaction(ctx context.Context, multiTransaction *MultiTransaction, ...) (*MultiTransactionResult, 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) DiscoverToken(ctx context.Context, chainID uint64, address common.Address) (*token.Token, error)
- func (api *API) FetchMarketValues(ctx context.Context, symbols []string, currencies []string) (map[string]map[string]MarketCoinValues, error)
- func (api *API) FetchPrices(ctx context.Context, symbols []string, currencies []string) (map[string]map[string]float64, error)
- func (api *API) FetchTokenDetails(ctx context.Context, symbols []string) (map[string]Coin, error)
- func (api *API) GetBalanceHistory(ctx context.Context, chainIDs []uint64, address common.Address, ...) ([]*history.DataPoint, 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) GetCachedPrices(ctx context.Context) (map[string]map[string]float64, error)
- func (api *API) GetCryptoOnRamps(ctx context.Context) ([]CryptoOnRamp, error)
- func (api *API) GetCustomTokens(ctx context.Context) ([]*token.Token, error)
- func (api *API) GetDailyMarketValues(ctx context.Context, symbol string, currency string, limit int, allData bool, ...) ([]TokenHistoricalPairs, error)
- func (api *API) GetDerivedAddressDetails(ctx context.Context, address string) (*DerivedAddress, error)
- func (api *API) GetDerivedAddressForPath(ctx context.Context, password string, derivedFrom string, path string) (*DerivedAddress, error)
- func (api *API) GetDerivedAddressForPrivateKey(ctx context.Context, privateKey string) ([]*DerivedAddress, error)
- func (api *API) GetDerivedAddressesForMnemonicWithPath(ctx context.Context, mnemonic string, path string, pageSize int, ...) ([]*DerivedAddress, error)
- func (api *API) GetDerivedAddressesForPath(ctx context.Context, password string, derivedFrom string, path string, ...) ([]*DerivedAddress, error)
- func (api *API) GetEthereumChains(ctx context.Context, onlyEnabled bool) ([]*params.Network, error)
- func (api *API) GetFiatCurrencyMinorUnit(name string) (int, error)
- func (api *API) GetHourlyMarketValues(ctx context.Context, symbol string, currency string, limit int, aggregate int) ([]TokenHistoricalPairs, 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, chainIDs []uint64, address common.Address) ([]*PendingTransaction, error)
- func (api *API) GetPendingTransactions(ctx context.Context) ([]*PendingTransaction, error)
- func (api *API) GetPendingTransactionsByChainIDs(ctx context.Context, chainIDs []uint64) ([]*PendingTransaction, error)
- func (api *API) GetSavedAddresses(ctx context.Context) ([]SavedAddress, error)
- func (api *API) GetSuggestedFees(ctx context.Context, chainID uint64) (*SuggestedFees, error)
- func (api *API) GetSuggestedRoutes(ctx context.Context, sendType SendType, account common.Address, ...) (*SuggestedRoutes, error)
- func (api *API) GetTokens(ctx context.Context, chainID uint64) ([]*token.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) GetTransactionEstimatedTime(ctx context.Context, chainID uint64, maxFeePerGas *big.Float) (TransactionEstimation, 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) GetVisibleTokens(chainIDs []uint64) (map[uint64][]*token.Token, error)
- func (api *API) GetWalletToken(ctx context.Context, addresses []common.Address) (map[common.Address][]Token, error)
- func (api *API) IsCurrencyFiat(name string) bool
- 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) StartBalanceHistory(ctx context.Context) error
- func (api *API) StartWallet(ctx context.Context) error
- func (api *API) StopBalanceHistory(ctx context.Context) error
- func (api *API) StopWallet(ctx context.Context) error
- func (api *API) StorePendingTransaction(ctx context.Context, trx PendingTransaction) error
- func (api *API) ToggleVisibleToken(ctx context.Context, chainID uint64, address common.Address) (bool, error)
- func (api *API) UpdateVisibleTokens(ctx context.Context, symbols []string) 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 ChainBalance
- type Coin
- type CoinsContainer
- type ConnectedResult
- type CryptoCompare
- type CryptoOnRamp
- type CryptoOnRampManager
- type CryptoOnRampOptions
- type DataSourceType
- type DerivedAddress
- type FeeHistory
- type FeeManager
- type GasFeeMode
- type Graph
- type HistoricalValuesContainer
- type HistoricalValuesData
- type MarketCoinValues
- type MarketValuesContainer
- type MultiTransaction
- type MultiTransactionResult
- type MultiTransactionType
- type Node
- type OpenseaAsset
- type OpenseaAssetCollection
- type OpenseaAssetContainer
- type OpenseaClient
- type OpenseaCollection
- type OpenseaCollectionTrait
- type OpenseaContract
- type OpenseaLastSale
- type OpenseaPaymentToken
- type OpenseaSellOrder
- type OpenseaTrait
- type Path
- type PendingTransaction
- type PendingTrxType
- type PriceManager
- type PricesPerTokenAndCurrency
- type Reader
- type Router
- type SavedAddress
- type SavedAddressesManager
- func (sam *SavedAddressesManager) AddSavedAddressIfNewerUpdate(sa SavedAddress, updateClock uint64) (insertedOrUpdated bool, err error)
- func (sam *SavedAddressesManager) DeleteSavedAddress(chainID uint64, address common.Address) (updatedClock uint64, err error)
- func (sam *SavedAddressesManager) DeleteSavedAddressIfNewerUpdate(chainID uint64, address common.Address, updateClock uint64) (deleted bool, err error)
- func (sam *SavedAddressesManager) DeleteSoftRemovedSavedAddresses(threshold uint64) error
- func (sam *SavedAddressesManager) GetRawSavedAddresses() ([]SavedAddress, error)
- func (sam *SavedAddressesManager) GetSavedAddresses() ([]SavedAddress, error)
- func (sam *SavedAddressesManager) GetSavedAddressesForChainID(chainID uint64) ([]SavedAddress, error)
- func (sam *SavedAddressesManager) UpdateMetadataAndUpsertSavedAddress(sa SavedAddress) (updatedClock uint64, err error)
- type SendType
- type Service
- type SuggestedFees
- type SuggestedRoutes
- type Token
- type TokenHistoricalPairs
- type TokenMarketValues
- type TraitValue
- type TransactionEstimation
- type TransactionManager
Constants ¶
const ( MultiTransactionSend = iota MultiTransactionSwap MultiTransactionBridge )
const AssetLimit = 50
const CollectionLimit = 300
const EstimatePubKey = "" /* 132-byte string literal not displayed */
const EstimateUsername = "RandomUsername"
const EventWalletTickCheckConnected walletevent.EventType = "wallet-tick-check-connected"
const EventWalletTickReload walletevent.EventType = "wallet-tick-reload"
WalletTickReload emitted every 15mn to reload the wallet balance and history
Variables ¶
var BaseURLs = map[uint64]string{
1: "https://api.opensea.io/api/v1",
4: "https://rinkeby-api.opensea.io/api/v1",
5: "https://testnets-api.opensea.io/api/v1",
}
var OpenseaClientInstances = make(map[uint64]*OpenseaClient)
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) AddSavedAddress ¶ added in v0.86.7
func (api *API) AddSavedAddress(ctx context.Context, sa SavedAddress) error
func (*API) CheckConnected ¶ added in v0.125.1
func (api *API) CheckConnected(ctx context.Context) *ConnectedResult
func (*API) CheckRecentHistory ¶ added in v0.75.0
func (*API) CheckRecentHistoryForChainIDs ¶ added in v0.86.7
func (*API) CreateMultiTransaction ¶ added in v0.103.2
func (api *API) CreateMultiTransaction(ctx context.Context, multiTransaction *MultiTransaction, data []*bridge.TransactionBridge, password string) (*MultiTransactionResult, error)
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) DiscoverToken ¶ added in v0.98.1
func (*API) FetchMarketValues ¶ added in v0.106.1
func (*API) FetchPrices ¶ added in v0.96.4
func (*API) FetchTokenDetails ¶ added in v0.106.1
func (*API) GetBalanceHistory ¶ added in v0.114.3
func (api *API) GetBalanceHistory(ctx context.Context, chainIDs []uint64, address common.Address, currency string, timeInterval history.TimeInterval) ([]*history.DataPoint, error)
GetBalanceHistory retrieves token balance history for token identity on multiple chains TODO: pass parameters by GetBalanceHistoryParameters struct TODO: expose endTimestamp parameter
func (*API) GetCachedBalances ¶ added in v0.79.4
func (*API) GetCachedBalancesbyChainID ¶ added in v0.86.7
func (*API) GetCachedPrices ¶ added in v0.125.0
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) GetDailyMarketValues ¶ added in v0.111.5
func (*API) GetDerivedAddressDetails ¶ added in v0.114.1
func (*API) GetDerivedAddressForPath ¶ added in v0.126.2
func (*API) GetDerivedAddressForPrivateKey ¶ added in v0.100.0
func (*API) GetDerivedAddressesForMnemonicWithPath ¶ added in v0.102.6
func (*API) GetDerivedAddressesForPath ¶ added in v0.100.0
func (*API) GetEthereumChains ¶ added in v0.86.7
func (*API) GetFiatCurrencyMinorUnit ¶ added in v0.125.0
func (*API) GetHourlyMarketValues ¶ added in v0.111.5
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) GetPendingTransactionsByChainIDs ¶ added in v0.102.6
func (*API) GetSavedAddresses ¶ added in v0.86.7
func (api *API) GetSavedAddresses(ctx context.Context) ([]SavedAddress, error)
func (*API) GetSuggestedFees ¶ added in v0.97.4
func (*API) GetSuggestedRoutes ¶ added in v0.101.1
func (api *API) GetSuggestedRoutes( ctx context.Context, sendType SendType, account common.Address, amountIn *hexutil.Big, tokenSymbol string, disabledFromChainIDs, disabledToChaindIDs, preferedChainIDs []uint64, gasFeeMode GasFeeMode, fromLockedAmount map[uint64]*hexutil.Big, ) (*SuggestedRoutes, 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) GetTransactionEstimatedTime ¶ added in v0.103.2
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) GetVisibleTokens ¶ added in v0.98.3
func (*API) GetWalletToken ¶ added in v0.115.5
func (*API) IsCurrencyFiat ¶ added in v0.125.0
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) StartBalanceHistory ¶ added in v0.125.2
func (*API) StopBalanceHistory ¶ added in v0.125.2
func (*API) StorePendingTransaction ¶ added in v0.62.0
func (api *API) StorePendingTransaction(ctx context.Context, trx PendingTransaction) error
func (*API) ToggleVisibleToken ¶ added in v0.98.3
func (*API) UpdateVisibleTokens ¶ added in v0.125.2
func (*API) WatchTransaction ¶ added in v0.74.1
type ChainBalance ¶ added in v0.115.5
type Coin ¶ added in v0.106.1
type Coin struct { ID string `json:"Id"` Name string `json:"Name"` Symbol string `json:"Symbol"` Description string `json:"Description"` TotalCoinsMined float64 `json:"TotalCoinsMined"` AssetLaunchDate string `json:"AssetLaunchDate"` AssetWhitepaperURL string `json:"AssetWhitepaperUrl"` AssetWebsiteURL string `json:"AssetWebsiteUrl"` BuiltOn string `json:"BuiltOn"` SmartContractAddress string `json:"SmartContractAddress"` }
type CoinsContainer ¶ added in v0.106.1
type ConnectedResult ¶ added in v0.125.1
type CryptoCompare ¶ added in v0.125.1
type CryptoCompare struct { IsConnected bool IsConnectedLock sync.RWMutex // contains filtered or unexported fields }
func NewCryptoCompare ¶ added in v0.125.1
func NewCryptoCompare() *CryptoCompare
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-mobile }
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 DerivedAddress ¶ added in v0.100.0
type FeeHistory ¶ added in v0.97.4
type FeeHistory struct {
BaseFeePerGas []string `json:"baseFeePerGas"`
}
type FeeManager ¶ added in v0.97.4
type GasFeeMode ¶ added in v0.113.0
type GasFeeMode int
const ( GasFeeLow GasFeeMode = iota GasFeeMedium GasFeeHigh )
type HistoricalValuesContainer ¶ added in v0.111.5
type HistoricalValuesContainer struct { Aggregated bool `json:"Aggregated"` TimeFrom int64 `json:"TimeFrom"` TimeTo int64 `json:"TimeTo"` HistoricalData []TokenHistoricalPairs `json:"Data"` }
type HistoricalValuesData ¶ added in v0.111.5
type HistoricalValuesData struct {
Data HistoricalValuesContainer `json:"Data"`
}
type MarketCoinValues ¶ added in v0.106.1
type MarketCoinValues struct { MKTCAP float64 `json:"MKTCAP"` HIGHDAY float64 `json:"HIGHDAY"` LOWDAY float64 `json:"LOWDAY"` CHANGEPCTHOUR float64 `json:"CHANGEPCTHOUR"` CHANGEPCTDAY float64 `json:"CHANGEPCTDAY"` CHANGEPCT24HOUR float64 `json:"CHANGEPCT24HOUR"` CHANGE24HOUR float64 `json:"CHANGE24HOUR"` }
type MarketValuesContainer ¶ added in v0.106.1
type MarketValuesContainer struct {
Raw map[string]map[string]MarketCoinValues `json:"Raw"`
}
type MultiTransaction ¶ added in v0.103.2
type MultiTransaction struct { ID uint `json:"id"` Timestamp uint64 `json:"timestamp"` FromAddress common.Address `json:"fromAddress"` ToAddress common.Address `json:"toAddress"` FromAsset string `json:"fromAsset"` ToAsset string `json:"toAsset"` FromAmount *hexutil.Big `json:"fromAmount"` Type MultiTransactionType `json:"type"` }
type MultiTransactionResult ¶ added in v0.103.2
type MultiTransactionType ¶ added in v0.103.2
type MultiTransactionType uint8
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 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 Path ¶ added in v0.113.0
type Path struct { BridgeName string From *params.Network To *params.Network MaxAmountIn *hexutil.Big AmountIn *hexutil.Big AmountInLocked bool AmountOut *hexutil.Big GasAmount uint64 GasFees *SuggestedFees BonderFees *hexutil.Big TokenFees *big.Float Cost *big.Float EstimatedTime TransactionEstimation ApprovalRequired bool ApprovalGasFees *big.Float ApprovalAmountRequired *hexutil.Big ApprovalContractAddress *common.Address }
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"` MultiTransactionID int64 `json:"multi_transaction_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 PriceManager ¶ added in v0.125.0
type PriceManager struct {
// contains filtered or unexported fields
}
func NewPriceManager ¶ added in v0.125.0
func NewPriceManager(db *sql.DB, cryptoCompare *CryptoCompare) *PriceManager
func (*PriceManager) FetchPrices ¶ added in v0.125.0
func (pm *PriceManager) FetchPrices(symbols []string, currencies []string) (PricesPerTokenAndCurrency, error)
func (*PriceManager) GetCachedPrices ¶ added in v0.125.0
func (pm *PriceManager) GetCachedPrices() (PricesPerTokenAndCurrency, error)
type PricesPerTokenAndCurrency ¶ added in v0.125.0
type Reader ¶ added in v0.100.0
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) GetWalletToken ¶ added in v0.115.5
type SavedAddress ¶ added in v0.86.7
type SavedAddressesManager ¶ added in v0.86.7
type SavedAddressesManager struct {
// contains filtered or unexported fields
}
func NewSavedAddressesManager ¶ added in v0.111.5
func NewSavedAddressesManager(db *sql.DB) *SavedAddressesManager
func (*SavedAddressesManager) AddSavedAddressIfNewerUpdate ¶ added in v0.111.5
func (sam *SavedAddressesManager) AddSavedAddressIfNewerUpdate(sa SavedAddress, updateClock uint64) (insertedOrUpdated bool, err error)
func (*SavedAddressesManager) DeleteSavedAddress ¶ added in v0.86.7
func (*SavedAddressesManager) DeleteSavedAddressIfNewerUpdate ¶ added in v0.111.5
func (*SavedAddressesManager) DeleteSoftRemovedSavedAddresses ¶ added in v0.111.5
func (sam *SavedAddressesManager) DeleteSoftRemovedSavedAddresses(threshold uint64) error
func (*SavedAddressesManager) GetRawSavedAddresses ¶ added in v0.111.5
func (sam *SavedAddressesManager) GetRawSavedAddresses() ([]SavedAddress, error)
GetRawSavedAddresses provides access to the soft-delete and sync metadata
func (*SavedAddressesManager) GetSavedAddresses ¶ added in v0.86.7
func (sam *SavedAddressesManager) GetSavedAddresses() ([]SavedAddress, error)
func (*SavedAddressesManager) GetSavedAddressesForChainID ¶ added in v0.111.5
func (sam *SavedAddressesManager) GetSavedAddressesForChainID(chainID uint64) ([]SavedAddress, error)
func (*SavedAddressesManager) UpdateMetadataAndUpsertSavedAddress ¶ added in v0.111.5
func (sam *SavedAddressesManager) UpdateMetadataAndUpsertSavedAddress(sa SavedAddress) (updatedClock uint64, err error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a wallet service.
func NewService ¶
func NewService( db *sql.DB, accountsDB *accounts.Database, rpcClient *rpc.Client, accountFeed *event.Feed, openseaAPIKey string, gethManager *account.GethManager, transactor *transactions.Transactor, config *params.NodeConfig, ens *ens.Service, stickers *stickers.Service, ) *Service
NewService initializes service instance.
func (*Service) CheckConnected ¶ added in v0.125.1
func (s *Service) CheckConnected(ctx context.Context) *ConnectedResult
type SuggestedFees ¶ added in v0.97.4
type SuggestedFees struct { GasPrice *big.Float `json:"gasPrice"` BaseFee *big.Float `json:"baseFee"` MaxPriorityFeePerGas *big.Float `json:"maxPriorityFeePerGas"` MaxFeePerGasLow *big.Float `json:"maxFeePerGasLow"` MaxFeePerGasMedium *big.Float `json:"maxFeePerGasMedium"` MaxFeePerGasHigh *big.Float `json:"maxFeePerGasHigh"` EIP1559Enabled bool `json:"eip1559Enabled"` }
type SuggestedRoutes ¶ added in v0.101.1
type Token ¶ added in v0.38.1
type Token struct { Name string `json:"name"` Symbol string `json:"symbol"` Color string `json:"color"` Decimals uint `json:"decimals"` BalancesPerChain map[uint64]ChainBalance `json:"balancesPerChain"` Description string `json:"description"` AssetWebsiteURL string `json:"assetWebsiteUrl"` BuiltOn string `json:"builtOn"` MarketValuesPerCurrency map[string]TokenMarketValues `json:"marketValuesPerCurrency"` PegSymbol string `json:"pegSymbol"` }
type TokenHistoricalPairs ¶ added in v0.111.5
type TokenMarketValues ¶ added in v0.125.0
type TokenMarketValues struct { MarketCap float64 `json:"marketCap"` HighDay float64 `json:"highDay"` LowDay float64 `json:"lowDay"` ChangePctHour float64 `json:"changePctHour"` ChangePctDay float64 `json:"changePctDay"` ChangePct24hour float64 `json:"changePct24hour"` Change24hour float64 `json:"change24hour"` Price float64 `json:"price"` }
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 TransactionEstimation ¶ added in v0.103.2
type TransactionEstimation int
const ( Unknown TransactionEstimation = iota LessThanOneMinute LessThanThreeMinutes LessThanFiveMinutes MoreThanFiveMinutes )
type TransactionManager ¶ added in v0.86.7
type TransactionManager struct {
// contains filtered or unexported fields
}