Craft a withdraw rewards transaction. Rewards on Cardano are automatically added to your stake balance but you need to withdraw them in order to spend or exchange them.
import { Integration } from"@kilnfi/sdk/lib/types/integrations";constfs=require('fs');constapiSecret=fs.readFileSync(__dirname +'/fireblocks_secret.key','utf8');constvault:Integration= { provider:'fireblocks', fireblocksApiKey:'YOUR_API_USER_KEY',// your fireblocks API user key fireblocksSecretKey: apiSecret,// your fireblocks private key (generated with your CSR file and your API user) vaultId:7// your fireblocks vault id};consttxSigned=awaitk.ada.sign(vault, tx);
Broadcast
Broadcast a signed transaction.
consttxHash=awaitk.ada.broadcast(txSigned);
Get transaction status
Get the transaction status of a broadcasted transaction by providing its transaction hash.
conststatus=awaitk.ada.getTxStatus('tx_hash');
Decode transaction
Decode a serialized transaction previously crafted. You can use this to get more information about a transaction prior to broadcast it such as the gas fees used, the function parameters etc.