Crypto wallet APIs & infrastructure | Tatum
We Make Building a Wallet Really Easy
So you can focus on UX - not the back-end.
Generate Address Method
// Install with: npm install @tatumio/evm-wallet-provider @tatumio/tatum
const { EvmWalletProvider } = require("@tatumio/evm-wallet-provider");
const { TatumSDK, Network, Ethereum } = require("@tatumio/tatum");
(async () => {
try {
const tatumSdk = await TatumSDK.init({ network: Network.ETHEREUM,
configureWalletProviders: [
EvmWalletProvider,
]});
const addressFromMnemonic = await tatumSdk.walletProvider
.use(EvmWalletProvider).generateAddressFromMnemonic(mnemonic, 0);
const addressFromXpub = await tatumSdk.walletProvider
.use(EvmWalletProvider).generateAddressFromXpub(xpubDetails.xpub, 0);
console.log(addressFromMnemonic);
console.log(addressFromXpub);
} catch (error) {
console.error("Error generating address:", error);
}
})();
await tatum.destroy()
Create as Many Addresses as You Need
Create limitless user addresses effortlessly with our streamlined code — choose between Mnemonic and Xpub for seamless integration.
Safely Handle Private Keys
It's integral that every wallet has its private generated in the most safe and reliable way as possible - with Tatum this is easy.
Generate Private Key Method
(async () => { try { const tatumSdk = await TatumSDK.init({ network: Network.ETHEREUM, configureWalletProviders: [ EvmWalletProvider, ]}); const privateKey = await tatumSdk.walletProvider.use(EvmWalletProvider) .generatePrivateKeyFromMnemonic(mnemonic, 0); console.log(privateKey); } catch (error) { console.error("Error generating private key:", error); } })();
await tatum.destroy()
## Sign and Broadcast Method
(async () => {
try {
const tatumSdk = await TatumSDK.init({ network: Network.ETHEREUM,
configureWalletProviders: [
EvmWalletProvider,
]});
const payload = {
privateKey: 'YOUR_PRIVATE_KEY',
// other fields for your transaction...
}
const txHash = await tatumSdk.walletProvider.use(EvmWalletProvider)
.signAndBroadcast(payload);
console.log(txHash);
} catch (error) {
console.error("Error signing and broadcasting transaction:", error);
}
})();
await tatum.destroy()
Generate Address Method
// Import the necessary library and initialize the SDK
import { UtxoWalletProvider } from '@tatumio/utxo-wallet-provider';
import { TatumSDK, Network } from '@tatumio/tatum';
const tatumSdk = await TatumSDK.init({network: Network.BITCOIN,
configureWalletProviders: [
UtxoWalletProvider,
]});
// Generate address from mnemonic or xpub
const addressFromMnemonic = await tatumSdk.walletProvider
.use(UtxoWalletProvider).generateAddressFromMnemonic(mnemonic, 0);
const addressFromXpub = await tatumSdk.walletProvider
.use(UtxoWalletProvider).generateAddressFromXpub(xpubDetails.xpub, 0);
// This will print the generated address from mnemonic
console.log(addressFromMnemonic);
// This will print the generated address from xpub
console.log(addressFromXpub);
await tatum.destroy();
Safely Handle Private Keys
It's integral that every wallet has its private generated in the most safe and reliable way as possible - with Tatum this is easy.
Generate Private Key Method
const tatumSdk = await TatumSDK.init({network: Network.BITCOIN, configureWalletProviders: [ UtxoWalletProvider, ]});
// Generate private key from mnemonic const privateKey = await tatumSdk.walletProvider.use(UtxoWalletProvider) .generatePrivateKeyFromMnemonic(mnemonic, 0);
console.log(privateKey); // This will print the generated private key
await tatum.destroy();
## Sign and Broadcast Method
const tatumSdk = await TatumSDK.init({network: Network.BITCOIN,
configureWalletProviders: [
UtxoWalletProvider,
]});
// Define your transaction details
const payloadUtxo = {
fromAddress: [{ address: 'YOUR_WALLET_ADDRESS', privateKey: 'YOUR_PRIVATE_KEY'}],
to: [{ address: 'TARGET_WALLET_ADDRESS', value: 0.0001 }], // BTC_AMOUNT
fee: '0.00001', // BTC_AMOUNT
changeAddress: 'CHANGE_WALLET_ADDRESS',
}
// Sign and broadcast the transaction using the UTXO Wallet Provider submodule
const txHash = await tatumSdk.walletProvider.use(UtxoWalletProvider)
.signAndBroadcast(payloadUtxo);
// This will print the transaction hash of the broadcasted transaction
console.log(txHash);
await tatum.destroy();
Generate Address Method
// Import the necessary library and initialize the SDK
import { TronWalletProvider } from '@tatumio/tron-wallet-provider';
import { TatumSDK, Network } from '@tatumio/tatum';
// Initialize the SDK for Tron
const tatumSdk = await TatumSDK.init({
network: Network.TRON,
configureWalletProviders: [TronWalletProvider]
});
// Derive address from mnemonic
const addressFromMnemonic = await tatumSdk.walletProvider
.use(TronWalletProvider)
.generateAddressFromMnemonic(mnemonic, 0);
// Derive address from xpub
const addressFromXpub = await tatumSdk.walletProvider
.use(TronWalletProvider)
.generateAddressFromXpub(xpubDetails.xpub, 0);
// Output the derived addresses
console.log(addressFromMnemonic); // Prints the address derived from mnemonic
console.log(addressFromXpub); // Prints the address derived from xpub
await tatum.destroy();
Generate Private Key Method
// Import the necessary library and initialize the SDK
import { TronWalletProvider } from '@tatumio/tron-wallet-provider';
import { TatumSDK, Network, Tron } from '@tatumio/tatum';
// Initialize the SDK for Tron
const tatumSdk = await TatumSDK.init({
network: Network.TRON,
configureWalletProviders: [TronWalletProvider]
});
// Generate private key from mnemonic
const privateKey = await tatumSdk.walletProvider
.use(TronWalletProvider)
.generatePrivateKeyFromMnemonic(mnemonic, 0);
console.log(privateKey); // This will print the generated private key
await tatum.destroy()
Sign and Broadcast Method
const tatumSdk = await TatumSDK.init({network: Network.TRON, configureWalletProviders: [ TronWalletProvider, ]});
// Define your transaction details const payloadTron = { privateKey: 'YOUR_PRIVATE_KEY', to: 'TARGET_WALLET_ADDRESS', amount: '0.01' // TRX_AMOUNT }
// Sign and broadcast the transaction using the Tron Wallet Provider submodule const txHash = await tatumSdk.walletProvider.use(TronWalletProvider) .signAndBroadcast(payloadTron);
// This will print the transaction hash of the broadcasted transaction console.log(txHash);
await tatum.destroy();
## Generate Address Method
```javascript
// Import the necessary library and initialize the SDK
import { TezosWalletProvider } from '@tatumio/tezos-wallet-provider';
import { TatumSDK, Network } from '@tatumio/tatum';
const tatumSdk = await TatumSDK.init({network: Network.TEZOS,
configureWalletProviders: [TezosWalletProvider],
});
// Generate Address from Private Key
const address = await tatumSdk.walletProvider
.use(TezosWalletProvider)
.generateAddressFromPrivateKey(privateKey);
console.log(address); // This will print the generated address
await tatum.destroy();
Generate Private Key Method
const tatumSdk = await TatumSDK.init({network: Network.TEZOS, configureWalletProviders: [TezosWalletProvider], });
// Generate Private Key from Mnemonic const privateKey = await tatumSdk.walletProvider .use(TezosWalletProvider) .generatePrivateKeyFromMnemonic(mnemonic, 0);
console.log(privateKey); // This will print the generated private key
await tatum.destroy();
## Sign and Broadcast Method
```javascript
// Import necessary libraries
import { TezosWalletProvider } from '@tatumio/tezos-wallet-provider';
import { TatumSDK, Network } from '@tatumio/tatum';
// Initialize the SDK for Tezos
const tatumSdk = await TatumSDK.init({network: Network.TEZOS,
configureWalletProviders: [
{ type: TezosWalletProvider, config: { rpcUrl: 'https://ghostnet.ecadinfra.com' } },
]
});
// Get private key, address and mnemonic
const { privateKey, address, mnemonic } = await tatumSdk.walletProvider
.use(TezosWalletProvider)
.getWallet();
// Output the retrieved data
console.log(privateKey); // Prints the private key
console.log(address); // Prints the address
console.log(mnemonic); // Prints the mnemonic
What Devs Say About Us
Zac Barron
Product Lead at Binance
"Tatum helps us build robust product solutions in a fraction of the time."
David Spitzer-Dulagan
CTO at Limewire
"Building a product in the crypto space is hard. Making it work reliably across chains - even harder. Tatum helped us meet our deadline."
Hitoshi Harada
Co-founder & CPO at Alpaca
"Tatum accelerates our web3 development."
Access All Tatum Tools
A powerful SDK, lightning-fast RPC nodes, faucets and a whole lot more - for free.