Status Updates
When a transaction or user operation request is sent, it undergoes a series of status changes. Monitoring these changes can be helpful in tracking progress and informing the user about ongoing activities.
import { ChainId, KriptonioSdk } from '@kriptonio/sdk';
const sdk = new KriptonioSdk({
accessToken: 'your-access-token',
});
const wallet = await sdk.wallet.generate({
chainId: ChainId.BaseSepolia,
type: 'kernel',
});
const hash = await wallet.sendTransaction(
{
to: wallet.address,
value: 0n,
},
{
onStatusChange: (newStatus) => {
console.log('Transaction status:', newStatus);
},
},
);