@citadeldao/lib-citadel
v1.43.61
Published
Citadel.one front-end library
Downloads
734
Readme
lib-citadel
Crypto wallets management module for Citadel.one client application. Provides a standardized interface for working with wallets of various crypto networks.
Features
- Adding wallets in various ways
- Obtaining information on networks and tokens
- Wallet list management
- Actions with the wallet (receipt of balance, transfer, staking, etc.)
- The module does not store private keys and dervation paths
- Supported networks: "Akash", "Axelar", "Band", "Bitsong", "Binance Smart Chain", "Bitcoin", "Cheqd", "Chihuahua", "Comdex", "Cosmos Hub", "Crescent Network", "e-Money", "Ethereum", "Evmos", "Fetch.ai", "GBridge", "ICON", "Injective", "IOST", "IRIS Network", "Juno", "Kava", "Ki Chain", "Konstellation", "Lum", "AssetMantle", "Osmosis", "Persistence", "Polkadot", "Regen", "Rizon", "Secret", "Sentinel", "Sifchain", "Stargaze", "Starname", "Tezos", "Umee"
Installation
npm i --save @citadeldao/lib-citadel
How to use
// Import default object with methods
import citadel from '@citadel/citadel-lib'
// init
await citadel.init({
backendUrl,
})
// Get list of wallets with balances
const { data: wallets } = await getWalletList()
// Call the required method
const response = citadel.generateMnemonic(12)
Return value format
On success
{
result: "success",
data: "m/44'/60'/0'/0/0",
error: null
}
On error
{
result: "error",
data: null,
error: "WrongArguments: Invalid type of argument 'net'. Expected 'String', got 'Number'"
}