v0.3.1
New features:
Session state callback
Pass optional callback when creating client:
onSessionStateChange: ({ state, address, chainId }) => {
console.log(`Session state for address ${address} changed: ${state.type} - ${state.message}`);
// Use this to notify users and restart the session if needed
// - Session expired: state.type === 'session_expired'
// - Session inactive (e.g. was revoked): state.type === 'session_inactive'
},Pre-transaction validation
Now before submitting a transaction a check is done on the SDK side to verify that transaction you're trying to submit aligns with a given session config. This provides better error messages.
Validation can be skipped by passing skipPreTransactionStateValidation: true to the client.
What's Changed
- feat(sdk): session state checks and tx verifier by @JackHamer09 in #140
- fix: add fee and call constraints validation by @JackHamer09 in #143
Full Changelog: v0.2.0...v0.3.1