matter-labs / zksync-sso-clave-contracts

ZKsync SSO Contracts based on Clave
GNU General Public License v3.0
7 stars 1 forks source link

feat: sdk connector interface improvements, and more #202

Closed JackHamer09 closed 6 days ago

JackHamer09 commented 1 week ago

Description

SDK quality of life and typesafety improvements, as well as bug fixes for constraint abi indexes.

zksyncSsoConnector({ session: { expiry: "1 day", // human readable time

contractCalls: [
  callPolicy({ // new helper function, provides type safety
    address: "0x...",
    abi: erc20Abi, // now have to provide abi
    functionName: "transfer", // typesafe function name
    constraints: [
      {
        index: 0,
        value: "0x6cC8cf7f6b488C58AA909B77E6e65c631c204784", // typesafe value, converted to abi bytes32 on SDK side
      },
      {
        index: 1,
        limit: {
          limit: 1n,
          period: "1 hour", // human readable time
        },
      },
    ],
  }),
],

}, });



- Added few additional wagmi methods, e.g. `getConnectedSsoClient`. It provides a way to get properly typed ZKsync SSO client, so that developers can access things like session key and other available parameters and methods.
github-actions[bot] commented 1 week ago

Visit the preview URL for this PR (updated for commit 8f6ec49):

https://zksync-auth-server-staging--pr202-improved-sdk-interfa-r02vtgz9.web.app

(expires Wed, 04 Dec 2024 09:50:29 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 509a9c9ea42583076f531c53cf2979c544d5d0b7