Getting Started
Learn how to send transactions using our SDK
Follow these steps to start using our SDK today!!
Step1: Clone the repository
git clone https://github.com/expand-network/sdk-nodejs.gitnpm iStep2: File creation
const {signTransaction,sendTransaction} = require('./src/index');
async function transfer() {
const rawTransaction = await signTransaction({
from: 'SENDER_WALLET_ADDRESS',
to: 'RECEIVER_WALLET_ADDRESS',
value: '1', // in wei
gas: '50000',
},{
privateKey: 'YOUR_PRIVATE_KEY',
xApiKey : 'YOUR_API_KEY',
chainId : "1" // 5 for goerli
}).then(rawTransaction => sendTransaction({
rawTransaction: rawTransaction.rawTransaction,
xApiKey : 'YOUR_API_KEY',
chainId:"1" // 5 for goerli
})).then(res => console.log(res));
}
transfer()Last updated

