@tatumio/kadena-wallet-provider
v1.0.1
Published
Kadena provider with local wallet operations
Downloads
21
Readme
🌍 Kadena Wallet Provider
Kadena Wallet Provider integrates seamlessly with Tatum SDK to provide extended wallet capabilities for Kadena.
📖 Description
The Kadena Wallet Provider provides an array of tools for:
- Generating public and private keys.
- Signing and broadcasting transactions to the Kadena network.
It is built upon popular packages like @kadena/client
, ensuring a robust and secure foundation.
🚀 Quick Start
Installation
Firstly, ensure that the
@tatumio/kadena-wallet-provider
package is set as a dependency within your project. Next, import the Kadena Wallet Provider extension:import { KadenaWalletProvider } from '@tatumio/kadena-wallet-provider'
Initialization
Create an instance of Tatum SDK passing
KadenaWalletProvider
as one of wallet providers.const tatumSdk = await TatumSDK.init<Kadena>({ network: Network.KADENA, configureWalletProviders: [KadenaWalletProvider], })
🛠️ How to Use
Get Serret Key, Public Key and Address
const { privateKey, address, mnemonic } = await tatumSdk.walletProvider .use(KadenaWalletProvider) .getWallet()
Note: To fully use Kadena Account address it needs to be activated first.
Sign and Broadcast a Transaction
Define your payload according to the
KadenaTxPayload
type:const kadenaTxPayload = { secretKey: privateKey, command: unsignedCommand } const txHash = await tatumSdk.walletProvider.use(KadenaWalletProvider).signAndBroadcast(kadenaTxPayload)
Remember to always ensure the safety of private keys and other sensitive data. Never expose them in client-side code or public repositories.
🔗🔗 Supported Networks
Network.KADENA, Network.KADENA_TESTNET