Documentation
¶
Index ¶
- Constants
- Variables
- func AddAddressLink(v *gocui.View, a common.Address)
- func AddAddressShortLink(v *gocui.View, a common.Address)
- func AddDollarLink(v *gocui.View, val float64)
- func AddDollarValueLink(v *gocui.View, val *big.Int, t *Token)
- func AddFixedAddressShortLink(v *gocui.View, a common.Address, width int)
- func AddFixedDollarLink(v *gocui.View, val float64, width int)
- func AddFixedDollarValueLink(v *gocui.View, val *big.Int, t *Token, width int)
- func AddFixedValueLink(v *gocui.View, val *big.Int, t *Token, width int)
- func AddValueLink(v *gocui.View, val *big.Int, t *Token)
- func AddValueSymbolLink(v *gocui.View, val *big.Int, t *Token)
- func AddressFromAny(value any) common.Address
- func Amount2Str(amount *big.Int, decimals int) string
- func BackupList() []string
- func BigIntFromAny(value any) *big.Int
- func ConfirmEIP712Template(data apitypes.TypedData, confirmed bool) string
- func Contains(s string, subststr string) bool
- func Create(name, pass string) error
- func Exists(name string) bool
- func FixedWidth(s string, width int) string
- func Float(value *big.Int, decimals int) *big.Float
- func Float64(value *big.Int, decimals int) float64
- func FmtAmount(amount *big.Int, decimals int, fixed bool) string
- func FmtFloat64(v float64, fixed bool) string
- func FmtFloat64D(v float64, fixed bool) string
- func FmtFloat64DN(num float64) string
- func FormatFloatWithCommas(num float64) string
- func FormatUInt64(v uint64, fixed bool) string
- func GetDataFolder() (string, error)
- func GetHostName(URL string) string
- func InitConfig()
- func IntFromAny(value any) int
- func IsContractDownloaded(a common.Address) bool
- func IsInArray(slice []string, item string) bool
- func Open(name string, pass string) error
- func OpenBrowser(url string) error
- func RestoreConfig(path string) error
- func SaveConfig() error
- func SaveToFile(w *Wallet, file, pass string) error
- func ShortAddress(a common.Address) string
- func Split3(input string) []string
- func SplitN(input string, n int) []string
- func Str2Wei(str string, decimals int) (*big.Int, error)
- func SystemCommand(command string) error
- func TagAddressShortLink(a common.Address) string
- func TagBytesLink(b []byte) string
- func TagDollarLink(val float64) string
- func TagDollarValueLink(val *big.Int, t *Token) string
- func TagFixedDollarLink(val float64, width int) string
- func TagFixedValueLink(val *big.Int, t *Token, width int) string
- func TagLink(text, action, tip string) string
- func TagShortDollarLink(val float64) string
- func TagShortDollarValueLink(val *big.Int, t *Token) string
- func TagShortValueSymbolLink(val *big.Int, t *Token) string
- func TagUint64Link(val uint64) string
- func TagValueLink(val *big.Int, t *Token) string
- func TagValueSymbolLink(val *big.Int, t *Token) string
- func Truncate(s string, maxLen int) string
- func Uint256FromHex(hex string) *big.Int
- func WalletList() []string
- type Address
- type Blockchain
- type Contract
- type LP_V2
- type LP_V2_Position
- type LP_V3
- type LP_V3_Position
- type LP_V4
- type LP_V4_Position
- type Origin
- type PD_V2
- type PD_V3
- type PD_V4
- type SConfig
- type SignedDataInfo
- type Signer
- type Staking
- type StakingPosition
- type Token
- type Wallet
- func (w *Wallet) AddBlockchain(b *Blockchain) error
- func (w *Wallet) AddLP_V2(lp *LP_V2) error
- func (w *Wallet) AddLP_V2Position(lp *LP_V2_Position) error
- func (w *Wallet) AddLP_V3(lp *LP_V3) error
- func (w *Wallet) AddLP_V3Position(lp *LP_V3_Position) error
- func (w *Wallet) AddLP_V4(lp *LP_V4) error
- func (w *Wallet) AddLP_V4Position(lp *LP_V4_Position) error
- func (w *Wallet) AddOrigin(o *Origin) error
- func (w *Wallet) AddOriginAddress(url string, a string) error
- func (w *Wallet) AddStaking(s *Staking) error
- func (w *Wallet) AddStakingPosition(pos *StakingPosition) error
- func (w *Wallet) AddToken(chain int, a common.Address, n string, s string, d int) error
- func (w *Wallet) ChangePassword(newPass string) error
- func (w *Wallet) DeleteBlockchain(name string) error
- func (w *Wallet) DeleteToken(chain int, a common.Address) error
- func (w *Wallet) EditBlockchain(ub *Blockchain) error
- func (w *Wallet) GetAddress(a any) *Address
- func (w *Wallet) GetAddressByName(n string) *Address
- func (w *Wallet) GetBlockchain(id int) *Blockchain
- func (w *Wallet) GetBlockchainByName(n string) *Blockchain
- func (w *Wallet) GetContract(a common.Address) *Contract
- func (w *Wallet) GetFilePath() string
- func (w *Wallet) GetLP_V2(chainId int, factory common.Address) *LP_V2
- func (w *Wallet) GetLP_V2Position(chainId int, factory common.Address, pair common.Address) *LP_V2_Position
- func (w *Wallet) GetLP_V2_by_name(chainId int, name string) *LP_V2
- func (w *Wallet) GetLP_V3(chainId int, addr common.Address) *LP_V3
- func (w *Wallet) GetLP_V3Position(chainId int, provider common.Address, nft *big.Int) *LP_V3_Position
- func (w *Wallet) GetLP_V3_by_name(chainId int, name string) *LP_V3
- func (w *Wallet) GetLP_V4(chainId int, addr common.Address) *LP_V4
- func (w *Wallet) GetLP_V4Position(chainId int, provider common.Address, nft *big.Int) *LP_V4_Position
- func (w *Wallet) GetLP_V4_by_name(chainId int, name string) *LP_V4
- func (w *Wallet) GetNativeToken(b *Blockchain) (*Token, error)
- func (w *Wallet) GetOrigin(url string) *Origin
- func (w *Wallet) GetSigner(n string) *Signer
- func (w *Wallet) GetSignerWithCopies(name string) []*Signer
- func (w *Wallet) GetSignerWithCopyIndex(name string) (*Signer, int)
- func (w *Wallet) GetStaking(chainId int, contract common.Address) *Staking
- func (w *Wallet) GetStakingByName(chainId int, name string) *Staking
- func (w *Wallet) GetStakingPosition(chainId int, contract common.Address, owner common.Address) *StakingPosition
- func (w *Wallet) GetStakingPositionWithValidator(chainId int, contract common.Address, owner common.Address, validatorId uint64) *StakingPosition
- func (w *Wallet) GetToken(chain int, a string) *Token
- func (w *Wallet) GetTokenByAddress(chain int, a common.Address) *Token
- func (w *Wallet) GetTokenBySymbol(chain int, s string) *Token
- func (w *Wallet) IsContractTrusted(addr common.Address) bool
- func (w *Wallet) PromoteOriginAddress(url string, a string) error
- func (w *Wallet) RemoveLP_V2(chainId int, factory common.Address) error
- func (w *Wallet) RemoveLP_V2Position(addr common.Address, chainId int, factory common.Address, pair common.Address) error
- func (w *Wallet) RemoveLP_V3(chainId int, provider common.Address) error
- func (w *Wallet) RemoveLP_V3Position(addr common.Address, chainId int, provider common.Address, nft *big.Int) error
- func (w *Wallet) RemoveLP_V4(chainId int, provider common.Address) error
- func (w *Wallet) RemoveLP_V4Position(addr common.Address, chainId int, provider common.Address, nft *big.Int) error
- func (w *Wallet) RemoveOrigin(url string) error
- func (w *Wallet) RemoveOriginAddress(url string, a common.Address) error
- func (w *Wallet) RemoveStaking(chainId int, contract common.Address) error
- func (w *Wallet) RemoveStakingPosition(chainId int, contract common.Address, owner common.Address) error
- func (w *Wallet) RemoveStakingPositionWithValidator(chainId int, contract common.Address, owner common.Address, validatorId uint64) error
- func (w *Wallet) Save() error
- func (w *Wallet) SetContract(a common.Address, c *Contract) error
- func (w *Wallet) SetOrigin(url string) error
- func (w *Wallet) SetOriginChain(url string, ch string) error
- func (w *Wallet) SetParamInt(name string, val int) error
- func (w *Wallet) SetParamStr(name string, val string) error
- func (w *Wallet) TrustContract(addr common.Address) error
- func (w *Wallet) UntrustContract(addr common.Address) error
- func (w *Wallet) VerifyPassword(pass string) bool
- type XF
- func (n *XF) Add(x *XF) *XF
- func (n *XF) BigInt() *big.Int
- func (n *XF) Div(x *XF) *XF
- func (n *XF) Dump() string
- func (n *XF) Float64() float64
- func (n *XF) Format(fixed bool, prefix string) string
- func (n *XF) IsZero() bool
- func (n *XF) Mul(x *XF) *XF
- func (n *XF) Norm() *XF
- func (n *XF) OrderOfMagnitude() int
- func (n *XF) String() string
- func (n *XF) Sub(x *XF) *XF
Constants ¶
const ( ICON_DELETE = "\U0000f057 " //"\uf00d" ICON_EDIT = "\uf044 " ICON_COPY = "\uf0c5 " ICON_DROPLIST = "\ueb6e " ICON_PROMOTE = "\ued65 " ICON_ADD = "\ueadc " ICON_3DOTS = "\U000f01d8" ICON_BACK = "\U000f006e " ICON_SEND = "\U000f048a " ICON_LINK = "\uf08e " ICON_FEED = "\uf09e " ICON_DOWNLOAD = "\ueac2 " ICON_VSC = "\U000f0a1e " ICON_TRUST = "\uebc1 " ICON_NO_ENTRY = "\uf4f4 " ICON_LIGHT = "\U000f06e8 " ICON_CHECK = "\U000f0134 " ICON_UNCHECK = "\U000f0130 " ICON_ALERT = "\U000f0028 " )
const (
ALERT_ARROW = "<blink>\U000f0028\uf178 </blink>"
)
const CONFIG_NAME = "config.yaml"
const LOG_NAME = "web3pro.log"
const MAX_DECIMALS = 80
const PRECISION = 20
const SOLT_SIZE = 32
const VERSION = "0.1.0"
Variables ¶
var AppName = "web3pro"
var ConfPath = CONFIG_NAME
var ConfigChanged = false
var DataFolder = "data"
var EXPLORER_API_TYPES = []string{"etherscan", "blockscout"}
var FMT_NEG_SUFFIXES = []string{"", "m", "µ", "n", "p", "f", "a", "/^21", "/^24", "/^27", "/^30", "/^33",
"/^36", "/^39", "/^42", "/^45", "/^48", "/^51", "/^54", "/^57", "/^60", "/^63", "/^66", "/^69", "/^72", "/^75", "/^76"}
var FMT_NEG_SUFFIXES = []string{"", "/K", "/M", "/B", "/T", "/Qa", "/Qi", "/^21", "/^24", "/^27", "/^30", "/^33",
"/^36", "/^39", "/^42", "/^45", "/^48", "/^51", "/^54", "/^57", "/^60", "/^63", "/^66", "/^69", "/^72", "/^75", "/^76"}
var FMT_SUFFIXES = []string{"", "k", "M", "B", "T", "Qa", "Qi", "^21", "^24", "^27", "^30", "^33", "^36", "^39",
"^42", "^45", "^48", "^51", "^54", "^57", "^60", "^63", "^66", "^69", "^72", "^75", "^76"}
var KNOWN_FEEDERS = []string{"dexscreener", "coinmarketcap"}
var KNOWN_SIGNER_TYPES = []string{"mnemonics", "ledger", "trezor"}
var LogPath = LOG_NAME
var PD []XF
var PredefinedBlockchains []Blockchain = []Blockchain{}/* 243 elements not displayed */
var PredefinedStakings []Staking = []Staking{ { Name: "SAVVA Staking", ChainId: 369, Contract: common.HexToAddress("0x6BC07cC3d6c0927320d273D6318ef5405f2eB911"), URL: "https://savva.app", StakedToken: common.HexToAddress("0xb528a9DB27A74dB802C74D0CCc40657efE5F0A45"), BalanceFunc: "balanceOf", Reward1Token: common.HexToAddress("0xb528a9DB27A74dB802C74D0CCc40657efE5F0A45"), Reward1Func: "claimable", }, { Name: "Liquid Loans", ChainId: 369, Contract: common.HexToAddress("0x853F0CD4B0083eDf7cFf5Ad9A296f02Ffb71C995"), URL: "https://go.liquidloans.io/#/staking-pool", StakedToken: common.HexToAddress("0x9159f1D2a9f51998Fc9Ab03fbd8f265ab14A1b3B"), BalanceFunc: "stakes", Reward1Token: common.HexToAddress("0x0dEEd1486bc52aA0d3E6f8849cEC5adD6598A162"), Reward1Func: "getPendingUSDLGain", Reward2Token: common.HexToAddress("0xA1077a294dDE1B09bB078844df40758a5D0f9a27"), Reward2Func: "getPendingPLSGain", }, { Name: "INC Printer", ChainId: 369, Contract: common.HexToAddress("0x35b99f29b3Ec3276A2b3Bb5863326B1c100aa160"), URL: "https://incprinter.com/#/", StakedToken: common.HexToAddress("0x6c203a555824ec90a215f37916cf8db58ebe2fa3"), BalanceFunc: "stakes", Reward1Token: common.HexToAddress("0x144cd22aaa2a80fed0bb8b1deaddc51a53df1d50"), Reward1Func: "getPendingLUSDGain", Reward2Token: common.HexToAddress("0xA1077a294dDE1B09bB078844df40758a5D0f9a27"), Reward2Func: "getPendingETHGain", }, { Name: "INC INCD-DAI", ChainId: 369, Contract: common.HexToAddress("0x5A0D3cC13A523Dd7A9279C5Eb4f363593dA4198e"), URL: "https://incprinter.com/#/", StakedToken: common.HexToAddress("0x2cb92b1e8b2fc53b5a9165e765488e17b38c26d3"), BalanceFunc: "balanceOf", Reward1Token: common.HexToAddress("0x6c203a555824ec90a215f37916cf8db58ebe2fa3"), Reward1Func: "earned", }, { Name: "INC PRINT-INC", ChainId: 369, Contract: common.HexToAddress("0x857ab0cb7449Fb29429FC30596F08cfbf9F171F5"), URL: "https://incprinter.com/#/", StakedToken: common.HexToAddress("0xf35f8db9b6760799db76796340aacc69dea0c644"), BalanceFunc: "balanceOf", Reward1Token: common.HexToAddress("0x6c203a555824ec90a215f37916cf8db58ebe2fa3"), Reward1Func: "earned", }, { Name: "Monad Staking", ChainId: 143, Contract: common.HexToAddress("0x0000000000000000000000000000000000001000"), URL: "https://monadvision.com/myspace?feature=Stake", StakedToken: common.HexToAddress("0x0000000000000000000000000000000000000000"), BalanceFunc: "getDelegator", Reward1Token: common.HexToAddress("0x0000000000000000000000000000000000000000"), Reward1Func: "getDelegator", ValidatorId: 0, }, { Name: "Aztec Staking", ChainId: 1, Contract: common.HexToAddress("0xa92ecFD0E70c9cd5E5cd76c50Af0F7Da93567a4f"), URL: "https://stake.aztec.network", StakedToken: common.HexToAddress("0xA27EC0006e59f245217Ff08CD52A7E8b169E62D2"), Reward1Token: common.HexToAddress("0xA27EC0006e59f245217Ff08CD52A7E8b169E62D2"), Hardcoded: true, }, }
var PrefedinedLP_V2 = map[int]([]PD_V2){ 1: { { Name: "Uniswap", Factory: common.HexToAddress("0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"), Router: common.HexToAddress("0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"), URL: "https://app.uniswap.org/positions", SubgraphID: "A3Np3RQbaBA6oKJgiwDJeo5T3zrYfGHPWFYayMwtNDum", }, { Name: "SushiSwap", Factory: common.HexToAddress("0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac"), Router: common.HexToAddress("0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F"), URL: "https://www.sushi.com/pool", SubgraphID: "6NUtT5mGjZ1tSshKLf5Q3uEEJtjBZJo1TpL5MXsUBqrT", }, }, 42161: { { Name: "Uniswap", Factory: common.HexToAddress("0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9"), Router: common.HexToAddress("0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), URL: "https://app.uniswap.org/positions", SubgraphID: "EYCKATKGBKLWvSfwvBjzfCBmGwYNdVkduYXVivCsLRFu", }, { Name: "SushiSwap", Factory: common.HexToAddress("0xc35DADB65012eC5796536bD9864eD8773aBc74C4"), Router: common.HexToAddress("0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"), URL: "https://www.sushi.com/pool", SubgraphID: "8nFDCAhdnJQEhQF3ZRnfWkJ6FkRsfAiiVabVn4eGoAZH", }, { Name: "Camelot", Factory: common.HexToAddress("0x6EcCab422D763aC031210895C81787E87B43A652"), Router: common.HexToAddress("0xc873fEcbd354f5A56E00E710B90EF4201db2448d"), URL: "https://app.camelot.exchange/liquidity", SubgraphID: "", }, }, 10: { { Name: "Uniswap", Factory: common.HexToAddress("0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf"), Router: common.HexToAddress("0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2"), URL: "https://app.uniswap.org/positions", SubgraphID: "", }, { Name: "Velodrome", Factory: common.HexToAddress("0x25CbdDb98b35ab1FF77413456B31EC81A6B6B746"), Router: common.HexToAddress("0x9c12939390052919aF3155f41Bf4160Fd3666A6f"), URL: "https://velodrome.finance/liquidity", SubgraphID: "", }, }, 137: { { Name: "Uniswap", Factory: common.HexToAddress("0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C"), Router: common.HexToAddress("0xedf6066a2b290C185783862C7F4776A2C8077AD1"), URL: "https://app.uniswap.org/positions", SubgraphID: "", }, { Name: "QuickSwap", Factory: common.HexToAddress("0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32"), Router: common.HexToAddress("0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff"), URL: "https://quickswap.exchange/#/pools", SubgraphID: "FqsRcH1XqSjqVx9GRTvEJe959aCbKrcyGgDWBrUkG24g", }, { Name: "SushiSwap", Factory: common.HexToAddress("0xc35DADB65012eC5796536bD9864eD8773aBc74C4"), Router: common.HexToAddress("0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"), URL: "https://www.sushi.com/pool", SubgraphID: "8obLTNcEuGMqkTMFpoNnqNzwRzNvM7o7L1rHo2RDkPCN", }, }, 56: { { Name: "PancakeSwap", Factory: common.HexToAddress("0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73"), Router: common.HexToAddress("0x10ED43C718714eb63d5aA57B78B54704E256024E"), URL: "https://pancakeswap.finance/liquidity", SubgraphID: "EsL7geTRcA3LaLLM9EcMFzYbUgnvf8RixoEEGErrodB3", }, { Name: "SushiSwap", Factory: common.HexToAddress("0xc35DADB65012eC5796536bD9864eD8773aBc74C4"), Router: common.HexToAddress("0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"), URL: "https://www.sushi.com/pool", SubgraphID: "", }, }, 8453: { { Name: "Uniswap", Factory: common.HexToAddress("0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6"), Router: common.HexToAddress("0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), URL: "https://app.uniswap.org/positions", SubgraphID: "", }, { Name: "PancakeSwap", Factory: common.HexToAddress("0x02a84c1b3BBD7401a5f7fa98a384EBC70bB5749E"), Router: common.HexToAddress("0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb"), URL: "https://pancakeswap.finance/liquidity", SubgraphID: "2NjL7L4CmQaGJSacM43ofmH6ARf6gJoBeBaJtz9eWAQ9", }, { Name: "Aerodrome", Factory: common.HexToAddress("0x420DD381b31aEf6683db6B902084cB0FFECe40Da"), Router: common.HexToAddress("0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43"), URL: "https://aerodrome.finance/liquidity", SubgraphID: "", }, { Name: "SushiSwap", Factory: common.HexToAddress("0x71524B4f93c58fcbF659783284E38825f0622859"), Router: common.HexToAddress("0x6BDED42c6DA8FBf0d2bA55B2fa120C5e0c8D7891"), URL: "https://www.sushi.com/pool", SubgraphID: "", }, }, 43114: { { Name: "TraderJoe", Factory: common.HexToAddress("0x9Ad6C38BE94206cA50bb0d90783181c47F58c0a8"), Router: common.HexToAddress("0x60aE616a2155Ee3d9A68541Ba4544862310933d4"), URL: "https://traderjoexyz.com/avalanche/pool", SubgraphID: "5Mw8qH6fRMCRxYXee7NqLh9FP5i5TMT5GFjFaHZMgxkF", }, { Name: "SushiSwap", Factory: common.HexToAddress("0xc35DADB65012eC5796536bD9864eD8773aBc74C4"), Router: common.HexToAddress("0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"), URL: "https://www.sushi.com/pool", SubgraphID: "6nDfs3qv13SvhCr1PUD8M6hrWQ88xEQAvMGJNyucC4aq", }, }, 369: { { Name: "PulseX V1", Factory: common.HexToAddress("0x1715a3E4A142d8b698131108995174F37aEBA10D"), Router: common.HexToAddress("0x98bf93ebf5c380C0e6Ae8e192A7e2AE08edAcc02"), URL: "https://app.pulsex.com/liquidity", SubgraphID: "https://graph.pulsechain.com/subgraphs/name/pulsechain/pulsex", }, { Name: "PulseX V2", Factory: common.HexToAddress("0x29eA7545DEf87022BAdc76323F373EA1e707C523"), Router: common.HexToAddress("0x165C3410fC91EF562C50559f7d2289fEbed552d9"), URL: "https://app.pulsex.com/liquidity", SubgraphID: "https://graph.pulsechain.com/subgraphs/name/pulsechain/pulsexv2", }, { Name: "9mm V2", Factory: common.HexToAddress("0x3a0Fa7884dD93f3cd234bBE2A0958Ef04b05E13b"), Router: common.HexToAddress("0xcC73b59F8D6e5b0DE5bBf5eA186e5F0C888b4208"), URL: "https://swap.9mm.pro", SubgraphID: "https://info-api.9mm.pro/subgraphs/name/pulsechain/9mm", }, }, 250: { { Name: "SpookySwap", Factory: common.HexToAddress("0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3"), Router: common.HexToAddress("0xF491e7B69E4244ad4002BC14e878a34207E38c29"), URL: "https://spooky.fi/#/pools", SubgraphID: "2VaKGu3kDewSd3mBmhAJcBA1snJnWPnS3v8wpACz3tLM", }, { Name: "SushiSwap", Factory: common.HexToAddress("0xc35DADB65012eC5796536bD9864eD8773aBc74C4"), Router: common.HexToAddress("0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"), URL: "https://www.sushi.com/pool", SubgraphID: "3nozHgmPEDLRSgLPKfVD9XKdrajkumuhfE4Cb8Q6GLMK", }, }, }
SubgraphID can be either: - A subgraph ID (combined with Config.TheGraphGateway at runtime) - A full URL starting with "http" (used as-is, e.g., for PulseChain's own Graph)
Get your API key at https://thegraph.com/studio/apikeys/
NOTE: Only subgraphs with "liquidityPositions" entity support discovery. PancakeSwap and some other DEXes use a different schema without user position tracking.
var PrefedinedLP_V3 = map[int]([]PD_V3){ 1: { { Name: "Uniswap", Address: common.HexToAddress("0xC36442b4a4522E871399CD717aBDD847Ab11FE88"), URL: "https://app.uniswap.org/positions", }, { Name: "PancakeSwap", Address: common.HexToAddress("0x46A15B0b27311cedF172AB29E4f4766fbE7F4364"), URL: "https://pancakeswap.finance/liquidity", }, { Name: "SushiSwap", Address: common.HexToAddress("0x2214A42d8e2A1d20635c2cb0664422c528B6A432"), URL: "https://www.sushi.com/pool", }, }, 42161: { { Name: "Uniswap", Address: common.HexToAddress("0xC36442b4a4522E871399CD717aBDD847Ab11FE88"), URL: "https://app.uniswap.org/positions", }, { Name: "PancakeSwap", Address: common.HexToAddress("0x46A15B0b27311cedF172AB29E4f4766fbE7F4364"), URL: "https://pancakeswap.finance/liquidity", }, { Name: "SushiSwap", Address: common.HexToAddress("0x2214A42d8e2A1d20635c2cb0664422c528B6A432"), URL: "https://www.sushi.com/pool", }, { Name: "Camelot", Address: common.HexToAddress("0x00c7f3082833e796A5b3e4Bd59f6642FF44DCD15"), URL: "https://app.camelot.exchange/liquidity", }, }, 10: { { Name: "Uniswap", Address: common.HexToAddress("0xC36442b4a4522E871399CD717aBDD847Ab11FE88"), URL: "https://app.uniswap.org/positions", }, { Name: "Velodrome", Address: common.HexToAddress("0x416b433906b1B72FA758e166e239c43d68dC6F29"), URL: "https://velodrome.finance/liquidity", }, }, 137: { { Name: "Uniswap", Address: common.HexToAddress("0xC36442b4a4522E871399CD717aBDD847Ab11FE88"), URL: "https://app.uniswap.org/positions", }, { Name: "QuickSwap", Address: common.HexToAddress("0x8eF88E4c7CfbbaC1C163f7eddd4B578792201de6"), URL: "https://quickswap.exchange/#/pools", }, { Name: "SushiSwap", Address: common.HexToAddress("0x2214A42d8e2A1d20635c2cb0664422c528B6A432"), URL: "https://www.sushi.com/pool", }, }, 56: { { Name: "PancakeSwap", Address: common.HexToAddress("0x46A15B0b27311cedF172AB29E4f4766fbE7F4364"), URL: "https://pancakeswap.finance/liquidity", }, { Name: "Uniswap", Address: common.HexToAddress("0x7b8A01B39D58278b5DE7e48c8449c9f4F5170613"), URL: "https://app.uniswap.org/positions", }, { Name: "SushiSwap", Address: common.HexToAddress("0x2214A42d8e2A1d20635c2cb0664422c528B6A432"), URL: "https://www.sushi.com/pool", }, }, 8453: { { Name: "Uniswap", Address: common.HexToAddress("0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1"), URL: "https://app.uniswap.org/positions", }, { Name: "Aerodrome", Address: common.HexToAddress("0x827922686190790b37229fd06084350E74485b72"), URL: "https://aerodrome.finance/liquidity", }, { Name: "SushiSwap", Address: common.HexToAddress("0x80C7DD17B01855a6D2347444a0FCC36136a314de"), URL: "https://www.sushi.com/pool", }, { Name: "PancakeSwap", Address: common.HexToAddress("0x46A15B0b27311cedF172AB29E4f4766fbE7F4364"), URL: "https://pancakeswap.finance/liquidity", }, }, 43114: { { Name: "Uniswap", Address: common.HexToAddress("0x655C406EBFa14EE2006250925e54ec43AD184f8B"), URL: "https://app.uniswap.org/positions", }, { Name: "TraderJoe", Address: common.HexToAddress("0x7BFd7192E76D950832c77BB412aaE841049D8D9B"), URL: "https://traderjoexyz.com/avalanche/pool", }, { Name: "SushiSwap", Address: common.HexToAddress("0x2214A42d8e2A1d20635c2cb0664422c528B6A432"), URL: "https://www.sushi.com/pool", }, }, 369: { { Name: "9Inch", Address: common.HexToAddress("0x18A532b36A9F6B10b3FEC5BF225C00A0Ec89B79E"), URL: "https://v3.9inch.io/?chain=pulse", }, { Name: "9mm", Address: common.HexToAddress("0xCC05bf158202b4F461Ede8843d76dcd7Bbad07f2"), URL: "https://v3.9mm.pro", }, { Name: "PulseX", Address: common.HexToAddress("0x1a6c311a6d865dc3f35fea3e74d8c2f032ee7aa2"), URL: "https://app.pulsex.com/liquidity", }, }, 324: { { Name: "PancakeSwap", Address: common.HexToAddress("0xa815e2eD7f7d5B0c49fda367F249232a1B9D2883"), URL: "https://pancakeswap.finance/liquidity", }, { Name: "SyncSwap", Address: common.HexToAddress("0x8f5E695569D47F86E3229B2b41cf8e64E5Ddb5b5"), URL: "https://syncswap.xyz/pools", }, }, 250: { { Name: "SpookySwap", Address: common.HexToAddress("0x89f9F823A234E71A3C92bb66cf7c2bc2e9B69092"), URL: "https://spooky.fi/#/pools", }, { Name: "SushiSwap", Address: common.HexToAddress("0x2214A42d8e2A1d20635c2cb0664422c528B6A432"), URL: "https://www.sushi.com/pool", }, }, 59144: { { Name: "PancakeSwap", Address: common.HexToAddress("0x46A15B0b27311cedF172AB29E4f4766fbE7F4364"), URL: "https://pancakeswap.finance/liquidity", }, { Name: "Lynex", Address: common.HexToAddress("0xAB5ed8c81B65b6Bd2bC5F2DF4b59d81d6b6e5e9a"), URL: "https://app.lynex.fi/liquidity", }, }, 534352: { { Name: "Uniswap", Address: common.HexToAddress("0xB39002E4033b162fAc607fc3471E205FA2aE5967"), URL: "https://app.uniswap.org/positions", }, { Name: "SushiSwap", Address: common.HexToAddress("0x80C7DD17B01855a6D2347444a0FCC36136a314de"), URL: "https://www.sushi.com/pool", }, }, 81457: { { Name: "Thruster", Address: common.HexToAddress("0x434575EaEa081b735C985FA9bf63CD7b87e227F9"), URL: "https://app.thruster.finance/liquidity", }, { Name: "SushiSwap", Address: common.HexToAddress("0x80C7DD17B01855a6D2347444a0FCC36136a314de"), URL: "https://www.sushi.com/pool", }, }, }
var PrefedinedLP_V4 = map[int]([]PD_V4){ 1: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0xbD216513d74C8cf14cf4747E6AaA6420FF64ee9e"), PoolManager: common.HexToAddress("0x000000000004444c5dc75cb358380d2e3de08a90"), StateView: common.HexToAddress("0x7ffe42c4a5deea5b0fec41c94c136cf115597227"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/DiYPVdygkfjDWhbxGSqAQxwBKmfKnkWQojqeM2rkLb3G", }, }, 42161: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0xd88F38F930b7952f2DB2432Cb002E7abbF3dD869"), PoolManager: common.HexToAddress("0x360E68faCcca8cA495c1B759Fd9EEe466db9FB32"), StateView: common.HexToAddress("0x76fd297e2d437cd7f76d50f01afe6160f86e9990"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/GUWTydadTY23DvLudPv7MRhQkooMmSjpJ1tvcr9Lgkgq", }, }, 10: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x3C3Ea4B57a46241e54610e5f022E5c45859A1017"), PoolManager: common.HexToAddress("0x9a13F98Cb987694C9F086b1F5eB990EeA8264Ec3"), StateView: common.HexToAddress("0xc18a3169788f4f75a170290584eca6395c75ecdb"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/5pSBzyD1GBFmqSBjLrDGMWPVYwEv2BNswsGvLxWEWNfR", }, }, 137: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x1Ec2eBf4F37E7363FDfe3f0E37A14CE0Ff938447"), PoolManager: common.HexToAddress("0x67366782805870060151383F4BbFF9daB53e5cD6"), StateView: common.HexToAddress("0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/6NMLgPeuGdWk9pxHEwnUJK2xrMVuGYFWm2i4eWMSDGWC", }, }, 56: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x7A4a5c919aE2541AeD11041A1AEeE68f1287f95b"), PoolManager: common.HexToAddress("0x28e2Ea090877bF75740558f6BFB36A5ffeE9e9dF"), StateView: common.HexToAddress("0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/3HfqCn5cpVG5FLQ6JpVhDvnSJPqRu95KCJwqsKMgAt7X", }, }, 8453: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x7C5f5A4bBd8fD63184577525326123B519429bDc"), PoolManager: common.HexToAddress("0x498581fF718922c3f8e6A244956aF099B2652b2b"), StateView: common.HexToAddress("0xa3c0c9b65bad0b08107aa264b0f3db444b867a71"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/GCZR3WReDkPmZSqkPWupSNTsssZSJqvHmCApPc4GqsxU", }, }, 43114: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0xb3CD9b4CF08b107ae6f3F6C9fD7Fb7bb7c2fA0E6"), PoolManager: common.HexToAddress("0x06380C0e0912312B5150364B9DC4542BA0DbBc85"), StateView: common.HexToAddress("0xc3c9e198c735a4b97e3e683f391ccbdd60b69286"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/6GeeX9tBAquHtSm4So2pXXNmjuQJbm3HiLLsE6dKi4UD", }, }, 324: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x9a13F98Cb987694C9F086b1F5eB990EeA8264Ec3"), PoolManager: common.HexToAddress("0x9a89c8E57D0fC74E55926289120B7B8A248D99f7"), StateView: common.HexToAddress("0x0000000000000000000000000000000000000000"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/4HRo4yiNyAWr1p3r6QfLB4K14cMDbR4JjmGUU5g4Y6xK", }, }, 81457: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x4eE8DDd4f5697E5a7805Bebd5e4Cc118Cae9A903"), PoolManager: common.HexToAddress("0x1631559198A9e474033433b2958daBC135ab6446"), StateView: common.HexToAddress("0x12a88ae16f46dce4e8b15368008ab3380885df30"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/Bc94BthHCL8qKsxfPcAuFGDMBwB6f5NcXkLhNq8sLJar", }, }, 7777777: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x4eE8DDd4f5697E5a7805Bebd5e4Cc118Cae9A903"), PoolManager: common.HexToAddress("0x0575338e4C17006aE181B47900A84404247CA30f"), StateView: common.HexToAddress("0x385785af07d63b50d0a0ea57c4ff89d06adf7328"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/BcrwnLuDhD7ny2BmWxLUGvEf1H4SgSBMEkPm5HJm9wMU", }, }, 480: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x4eE8DDd4f5697E5a7805Bebd5e4Cc118Cae9A903"), PoolManager: common.HexToAddress("0xb1860D529182ac3BC1F51Fa2ABd56662b7D13f33"), StateView: common.HexToAddress("0x51d394718bc09297262e368c1a481217fdeb71eb"), URL: "https://app.uniswap.org/positions", SubgraphURL: "https://gateway.thegraph.com/api/{api-key}/subgraphs/id/28xHHc4JPBrWRFxAdx1vAAXivUBuPdnUisCb8YjLBmvK", }, }, 143: { { Name: "Uniswap", ProviderAddress: common.HexToAddress("0x5b7ec4a94ff9bedb700fb82ab09d5846972f4016"), PoolManager: common.HexToAddress("0x188d586ddcf52439676ca21a244753fa19f9ea8e"), StateView: common.HexToAddress("0x77395f3b2e73ae90843717371294fa97cc419d64"), URL: "https://app.uniswap.org/positions", SubgraphURL: "", }, }, }
var STANDARD_DERIVATIONS = map[string]struct { Name string Format string }{ "legacy": { Name: "Legacy (MEW, MyCrypto) m/44'/60'/0'/%d", Format: "m/44'/60'/0'/%d", }, "ledger-live": { Name: "Ledger Live m/44'/60'/%d'/0/0", Format: "m/44'/60'/%d'/0/0", }, "default": { Name: "Default m/44'/60'/0'/0/%d", Format: "m/44'/60'/0'/0/%d", }, }
var StandardOnClickHotspot func(v *gocui.View, hs *gocui.Hotspot)
var StandardOnOverHotspot func(v *gocui.View, hs *gocui.Hotspot)
var XF_NaN = &XF{big.NewInt(0), 0, true}
Functions ¶
func AddDollarLink ¶
func AddFixedDollarValueLink ¶
func AddressFromAny ¶
func BackupList ¶
func BackupList() []string
func BigIntFromAny ¶
func ConfirmEIP712Template ¶
func FixedWidth ¶
FixedWidth returns a string padded/truncated to exactly width characters
func FmtFloat64 ¶
func FmtFloat64D ¶
func FormatFloatWithCommas ¶
func FormatUInt64 ¶
func GetDataFolder ¶
func GetHostName ¶
func InitConfig ¶
func InitConfig()
func IntFromAny ¶
func IsContractDownloaded ¶
func OpenBrowser ¶
func RestoreConfig ¶
func SaveConfig ¶
func SaveConfig() error
func SaveToFile ¶
func ShortAddress ¶
func Split3 ¶
Split3 splits the input string into a slice of strings. Guarantees that the result has at least 3 elements.
func SplitN ¶
Split splits the input string into a slice of strings. Guarantees that the result has at least n elements.
func SystemCommand ¶
func TagAddressShortLink ¶
func TagBytesLink ¶
func TagDollarLink ¶
func TagFixedDollarLink ¶
func TagShortDollarLink ¶
func TagUint64Link ¶
func Uint256FromHex ¶
func WalletList ¶
func WalletList() []string
Types ¶
type Blockchain ¶
type Blockchain struct {
Name string `json:"name"`
ShortName string `json:"short_name"` // 4 chars max, for display in LP listings
Url string `json:"url"`
ChainId int `json:"chain_id"`
ExplorerUrl string `json:"explorer_url"`
ExplorerAPIUrl string `json:"explorer_api_url"`
ExplorerAPIToken string `json:"explorer_api_token"`
ExplorerApiType string `json:"explorer_api_type"`
Currency string `json:"currency"`
WTokenAddress common.Address `json:"wrapped_native_token_address"`
Multicall common.Address `json:"multicall"`
RPCRateLimit int `json:"rpc_rate_limit,omitempty"` // RPC calls per second (auto-tuned or fixed)
RPCRateAuto bool `json:"rpc_rate_auto,omitempty"` // true = auto-tune rate, false = use fixed rate
}
func (*Blockchain) ExplorerLink ¶
func (b *Blockchain) ExplorerLink(address common.Address) string
func (*Blockchain) GetShortName ¶
func (b *Blockchain) GetShortName() string
GetShortName returns ShortName if set, otherwise falls back to Currency
type LP_V2 ¶
type LP_V2 struct {
Name string `json:"name"`
Factory common.Address `json:"factory"` // Factory contract address
Router common.Address `json:"router"` // Router contract address
ChainId int `json:"chain_id"`
URL string `json:"url"` // Web UI URL
SubgraphID string `json:"subgraph_id"` // The Graph subgraph ID for discovery
}
type LP_V2_Position ¶
type LP_V3_Position ¶
type LP_V3_Position struct {
Owner common.Address `json:"owner"`
ChainId int `json:"chain_id"`
Provider common.Address `json:"provider"`
NFT_Token *big.Int `json:"nft_token"`
Token0 common.Address `json:"token0"`
Token1 common.Address `json:"token1"`
Fee *big.Int `json:"fee"`
Pool common.Address `json:"pool"`
TickLower int64 `json:"tick_lower"`
TickUpper int64 `json:"tick_upper"`
}
type LP_V4 ¶
type LP_V4 struct {
Name string `json:"name"`
Provider common.Address `json:"provider"` // PositionManager contract
PoolManager common.Address `json:"pool_manager"` // Singleton PoolManager
StateView common.Address `json:"state_view"` // StateView contract for reading pool state
ChainId int `json:"chain_id"`
URL string `json:"url"` // Web UI URL
SubgraphURL string `json:"subgraph_url"` // Subgraph API URL for discovery
}
type LP_V4_Position ¶
type LP_V4_Position struct {
Owner common.Address `json:"owner"`
ChainId int `json:"chain_id"`
Provider common.Address `json:"provider"`
PoolManager common.Address `json:"pool_manager"`
NFT_Token *big.Int `json:"nft_token"`
PoolId [32]byte `json:"pool_id"`
Currency0 common.Address `json:"currency0"`
Currency1 common.Address `json:"currency1"`
Fee int64 `json:"fee"`
TickSpacing int64 `json:"tick_spacing"`
TickLower int64 `json:"tick_lower"`
TickUpper int64 `json:"tick_upper"`
Liquidity *big.Int `json:"liquidity"`
HookAddress common.Address `json:"hook_address"`
}
type Origin ¶
type SConfig ¶
type SConfig struct {
Verbosity string `yaml:"verbosity"` // log verbosity
Theme string `yaml:"theme"` // UI theme
BusTimeout time.Duration `yaml:"bus_timeout"` // timeout for bus requests
BusHardTimeout time.Duration `yaml:"bus_hard_timeout"` // hard timeout for bus requests
PriceUpdatePeriod string `yaml:"price_update_period"` // price update period
Editor string `yaml:"editor"` // editor
CMC_API_KEY string `yaml:"cmc_api_key"` // CoinMarketCap API key
TheGraphAPIKey string `yaml:"thegraph_api_key"` // The Graph API key for subgraph queries
TheGraphGateway string `yaml:"thegraph_gateway"` // The Graph gateway URL (default: https://gateway.thegraph.com/api/{api-key}/subgraphs/id/)
MinTokenValue float64 `yaml:"min_token_value"` // minimum USD value to show token in tokens pane
WSEnabled bool `yaml:"ws_enabled"` // enable WebSocket server for browser communication
}
type SignedDataInfo ¶
type Signer ¶
type Signer struct {
Name string `json:"name"`
Type string `json:"type"`
MasterKey string `json:"master-key"`
Copies []string `json:"copies"`
}
func (*Signer) GetAllCopies ¶
type Staking ¶
type Staking struct {
Name string `json:"name"`
ChainId int `json:"chain_id"`
Contract common.Address `json:"contract"` // Staking contract address
URL string `json:"url"` // Provider website URL
StakedToken common.Address `json:"staked_token"` // Token being staked
BalanceFunc string `json:"balance_func"` // Function name to get staked balance (e.g., "balanceOf", "stakedAmount")
Reward1Token common.Address `json:"reward1_token"` // First reward token address
Reward1Func string `json:"reward1_func"` // First reward pending function (e.g., "earned")
Reward2Token common.Address `json:"reward2_token"` // Second reward token address (optional)
Reward2Func string `json:"reward2_func"` // Second reward pending function (optional)
ValidatorId uint64 `json:"validator_id"` // Validator ID for native staking (e.g., Monad)
Hardcoded bool `json:"hardcoded"` // If true, uses custom logic (cannot be configured, only deleted)
}
Staking represents a staking contract configuration
type StakingPosition ¶
type StakingPosition struct {
Owner common.Address `json:"owner"`
ChainId int `json:"chain_id"`
Contract common.Address `json:"contract"` // Reference to the staking contract
ValidatorId uint64 `json:"validator_id"` // Validator ID for native staking (e.g., Monad)
VaultAddress common.Address `json:"vault_address"` // User's vault address for vault-based staking (e.g., Aztec)
}
StakingPosition represents a user's position in a staking contract
type Token ¶
type Token struct {
ChainId int `json:"chain_id"`
Name string `json:"name"`
Symbol string `json:"symbol"`
Address common.Address `json:"address"`
Decimals int `json:"decimals"`
Native bool `json:"native"`
Unique bool `json:"-"` // Unique name in the blockchain
Ignored bool `json:"ignored,omitempty"`
PriceFeeder string `json:"price_feeder"`
PriceFeedParam string `json:"price_feed_id"`
Price float64 `json:"price"`
PriceChange24 float64 `json:"price_change_24"`
PriceTimestamp time.Time `json:"price_timestamp"` // Unix timestamp
}
func (*Token) GetPrintName ¶
type Wallet ¶
type Wallet struct {
Name string `json:"name"`
Blockchains []*Blockchain `json:"blockchains"`
Signers []*Signer `json:"signers"`
Addresses []*Address `json:"addresses"`
Tokens []*Token `json:"tokens"`
Origins []*Origin `json:"origins"`
LP_V2_Providers []*LP_V2 `json:"lp_v2_providers"`
LP_V2_Positions []*LP_V2_Position `json:"lp_v2_positions"`
LP_V3_Providers []*LP_V3 `json:"lp_v3_providers"`
LP_V3_Positions []*LP_V3_Position `json:"lp_v3_positions"`
LP_V4_Providers []*LP_V4 `json:"lp_v4_providers"`
LP_V4_Positions []*LP_V4_Position `json:"lp_v4_positions"`
Stakings []*Staking `json:"stakings"`
StakingPositions []*StakingPosition `json:"staking_positions"`
Contracts map[common.Address]*Contract
AppsPaneOn bool `json:"apps_pane_on"`
LP_V2PaneOn bool `json:"lp_v2_pane_on"`
LP_V3PaneOn bool `json:"lp_v3_pane_on"`
LP_V4PaneOn bool `json:"lp_v4_pane_on"`
TokenPaneOn bool `json:"token_pane_on"`
StakingPaneOn bool `json:"staking_pane_on"`
CurrentChainId int `json:"current_chain_id"`
CurrentAddress common.Address `json:"current_address"`
CurrentOrigin string `json:"current_origin"`
// Auxilary params
ParamInt map[string]int `json:"param_int"`
ParamStr map[string]string `json:"param_str"`
SoundOn bool `json:"sound_on"`
Sound string `json:"sound"`
// contains filtered or unexported fields
}
var CurrentWallet *Wallet
func OpenFromFile ¶
OpenFromFile opens a wallet from a specific file path (used for restore)
func (*Wallet) AddBlockchain ¶
func (w *Wallet) AddBlockchain(b *Blockchain) error
func (*Wallet) AddLP_V2Position ¶
func (w *Wallet) AddLP_V2Position(lp *LP_V2_Position) error
func (*Wallet) AddLP_V3Position ¶
func (w *Wallet) AddLP_V3Position(lp *LP_V3_Position) error
func (*Wallet) AddLP_V4Position ¶
func (w *Wallet) AddLP_V4Position(lp *LP_V4_Position) error
func (*Wallet) AddStaking ¶
func (*Wallet) AddStakingPosition ¶
func (w *Wallet) AddStakingPosition(pos *StakingPosition) error
func (*Wallet) ChangePassword ¶
ChangePassword changes the wallet password and re-saves the wallet
func (*Wallet) DeleteBlockchain ¶
func (*Wallet) EditBlockchain ¶
func (w *Wallet) EditBlockchain(ub *Blockchain) error
func (*Wallet) GetAddress ¶
func (*Wallet) GetAddressByName ¶
func (*Wallet) GetBlockchain ¶
func (w *Wallet) GetBlockchain(id int) *Blockchain
func (*Wallet) GetBlockchainByName ¶
func (w *Wallet) GetBlockchainByName(n string) *Blockchain
func (*Wallet) GetFilePath ¶
func (*Wallet) GetLP_V2Position ¶
func (*Wallet) GetLP_V2_by_name ¶
func (*Wallet) GetLP_V3Position ¶
func (*Wallet) GetLP_V3_by_name ¶
func (*Wallet) GetLP_V4Position ¶
func (*Wallet) GetLP_V4_by_name ¶
func (*Wallet) GetNativeToken ¶
func (w *Wallet) GetNativeToken(b *Blockchain) (*Token, error)
func (*Wallet) GetSignerWithCopies ¶
func (*Wallet) GetSignerWithCopyIndex ¶
func (*Wallet) GetStaking ¶
func (*Wallet) GetStakingByName ¶
func (*Wallet) GetStakingPosition ¶
func (*Wallet) GetStakingPositionWithValidator ¶
func (*Wallet) GetTokenByAddress ¶
func (*Wallet) PromoteOriginAddress ¶
func (*Wallet) RemoveLP_V2 ¶
func (*Wallet) RemoveLP_V2Position ¶
func (*Wallet) RemoveLP_V3 ¶
func (*Wallet) RemoveLP_V3Position ¶
func (*Wallet) RemoveLP_V4 ¶
func (*Wallet) RemoveLP_V4Position ¶
func (*Wallet) RemoveOrigin ¶
func (*Wallet) RemoveOriginAddress ¶
func (*Wallet) RemoveStaking ¶
func (*Wallet) RemoveStakingPosition ¶
func (*Wallet) RemoveStakingPositionWithValidator ¶
func (*Wallet) VerifyPassword ¶
VerifyPassword checks if the provided password matches the current wallet password