Skip to content

v0.3.1

Choose a tag to compare

@JackHamer09 JackHamer09 released this 27 May 16:30
· 84 commits to main since this release
2b5242c

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

Full Changelog: v0.2.0...v0.3.1