@anywalletkit/core
@anywalletkit/core
Section titled “@anywalletkit/core”The contracts every Any Wallet Kit package is written against.
- Accounts and signers.
IWalletAccount(what protocol modules see) andSigner(what holds a key). The local seed signer is one implementation; a Safe, a hardware wallet, MPC or a backend signer are others. WalletManager— the base class chain packages extend: one seed → accounts by index or path,dispose()zeroizes.- Protocol base classes — swap, bridge, swap2 (swap + bridge in one), lending, staking, approvals, fiat. Every method throws
NotImplementedErroruntil a module implements it. - Errors — the shared error classes apps branch on.
- Key derivation — BIP-39 seeds, BIP-32 (secp256k1) and SLIP-10 (ed25519) helpers.
- History, names, numbers — the activity and
NameResolverinterfaces, and BigInt helpers that are safe on Hermes.
Install
Section titled “Install”npm install @anywalletkit/core# or: pnpm add @anywalletkit/core · yarn add @anywalletkit/coreOn npm: @anywalletkit/core, published from the release workflow with provenance.
Docs: Accounts and signers · Errors · Packages
Apache-2.0
Classes
Section titled “Classes”- ApprovalsError
- ApprovalsProtocol
- BridgeProtocol
- FiatProtocol
- InsufficientFundsError
- LendingProtocol
- LocalSigner
- NameError
- NetworkError
- NotATokenError
- NotImplementedError
- ProtocolBase
- ReadOnlyAccountError
- SignerError
- StakingProtocol
- Swap2Protocol
- SwapProtocol
- UserRejectedError
- WalletManager
Interfaces
Section titled “Interfaces”- ActivityAsset
- ActivityItem
- Approval
- ApprovalsCoverage
- ApprovalsResult
- BorrowOptions
- BridgeOptions
- BridgeProtocolConfig
- BridgeResult
- BuyCommonOptions
- BuyExactCryptoAmountOptions
- BuyResult
- BuyWithFiatAmountOptions
- ChainCall
- ChainTransfer
- ChainTx
- ClaimWithdrawalsOptions
- ClaimWithdrawalsResult
- DerivedKey
- DescribeActivityContext
- ExternalSignerOptions
- FeeRates
- FiatQuote
- FiatTransactionDetail
- GetApprovalsOptions
- HistoryPage
- HistoryQuery
- HistorySource
- IApprovalsProtocol
- IBridgeProtocol
- IFiatProtocol
- ILendingProtocol
- IStakingProtocol
- ISwap2Protocol
- ISwapProtocol
- IWalletAccount
- IWalletAccountReadOnly
- LendingResult
- NameResolver
- NameWarning
- Receipt
- RepayOptions
- ResolvedName
- RevokeResult
- SeedSigner
- SellCommonOptions
- SellExactCryptoAmountOptions
- SellForFiatAmountOptions
- SellResult
- Signer
- SignOptions
- StakedBalance
- StakeOptions
- StakeResult
- SupplyOptions
- SupportedCountry
- SupportedCryptoAsset
- SupportedFiatCurrency
- Swap2CommonOptions
- Swap2ExactInOptions
- Swap2ExactOutOptions
- Swap2Fee
- Swap2ProtocolConfig
- Swap2Quote
- Swap2Result
- Swap2StatusOptions
- Swap2StatusResult
- Swap2SupportedChain
- Swap2SupportedToken
- Swap2SupportedTokensOptions
- Swap2Transaction
- SwapBuyOptions
- SwapCommonOptions
- SwapProtocolConfig
- SwapResult
- SwapSellOptions
- TokenInfo
- TransferOptions
- TransferResult
- WithdrawalRequest
- WithdrawalRequestOptions
- WithdrawalRequestResult
- WithdrawalRequestsView
- WithdrawOptions
- WriteOptions
Type Aliases
Section titled “Type Aliases”- ActivityKind
- ApprovalRisk
- ApprovalsErrorReason
- ApprovalStandard
- BridgeQuote
- BuyOptions
- ChainTxStatus
- FiatTransactionStatus
- LendingQuote
- NameErrorCode
- ProtocolType
- SellOptions
- SignerCurve
- SignScheme
- Swap2FeeType
- Swap2Options
- Swap2Status
- SwapOptions
- SwapQuote
- TokenFlag
Variables
Section titled “Variables”Functions
Section titled “Functions”- activityBase
- assertNameUnchanged
- bigintToNumber
- bigintToUnits
- canSign
- copyBytes
- defaultScheme
- deriveEd25519
- deriveSecp256k1
- externalSigner
- feeLimit
- getRandomSeedPhrase
- isNameLike
- isSeedSigner
- isUnlimitedAllowance
- isValidSeedPhrase
- nameResolvers
- netTransfers
- normalizeMnemonic
- parsePath
- privateKeySigner
- requireCurve
- sameAddress
- schemesFor
- seedFromMnemonic
- seedFromMnemonicSync
- splitNet
- tweakSecp256k1PrivateKey
- zeroize