zksync-sso 0.5.0-beta.3 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_cjs/abi/SessionKeyValidator.js +729 -993
- package/dist/_cjs/abi/SessionKeyValidator.js.map +1 -1
- package/dist/_cjs/abi/{WebAuthValidator.js → WebAuthnValidator.js} +273 -306
- package/dist/_cjs/abi/WebAuthnValidator.js.map +1 -0
- package/dist/_cjs/abi/index.js +17 -15
- package/dist/_cjs/abi/index.js.map +1 -1
- package/dist/_cjs/actions/sendUserOperation.js +14 -0
- package/dist/_cjs/actions/sendUserOperation.js.map +1 -0
- package/dist/_cjs/client/actions/deploy.js +53 -0
- package/dist/_cjs/client/actions/deploy.js.map +1 -0
- package/dist/_cjs/client/actions/index.js +22 -0
- package/dist/_cjs/client/actions/index.js.map +1 -0
- package/dist/_cjs/client/actions/modules.js +42 -0
- package/dist/_cjs/client/actions/modules.js.map +1 -0
- package/dist/_cjs/client/actions/passkey.js +89 -0
- package/dist/_cjs/client/actions/passkey.js.map +1 -0
- package/dist/_cjs/client/actions/sessions.js +178 -0
- package/dist/_cjs/client/actions/sessions.js.map +1 -0
- package/dist/_cjs/client/actions/utils.js +8 -0
- package/dist/_cjs/client/actions/utils.js.map +1 -0
- package/dist/_cjs/client/common/smart-account-client-actions.js +173 -0
- package/dist/_cjs/client/common/smart-account-client-actions.js.map +1 -0
- package/dist/_cjs/client/ecdsa/account.js +75 -30
- package/dist/_cjs/client/ecdsa/account.js.map +1 -1
- package/dist/_cjs/client/ecdsa/client-actions.js +14 -0
- package/dist/_cjs/client/ecdsa/client-actions.js.map +1 -0
- package/dist/_cjs/client/ecdsa/client.js +29 -23
- package/dist/_cjs/client/ecdsa/client.js.map +1 -1
- package/dist/_cjs/client/ecdsa/index.js +5 -5
- package/dist/_cjs/client/ecdsa/index.js.map +1 -1
- package/dist/_cjs/client/index.js +7 -82
- package/dist/_cjs/client/index.js.map +1 -1
- package/dist/_cjs/client/passkey/account.js +88 -33
- package/dist/_cjs/client/passkey/account.js.map +1 -1
- package/dist/_cjs/client/passkey/client-actions.js +42 -0
- package/dist/_cjs/client/passkey/client-actions.js.map +1 -0
- package/dist/_cjs/client/passkey/client.js +32 -41
- package/dist/_cjs/client/passkey/client.js.map +1 -1
- package/dist/_cjs/client/passkey/index.js +14 -18
- package/dist/_cjs/client/passkey/index.js.map +1 -1
- package/dist/_cjs/client/passkey/webauthn.js +381 -0
- package/dist/_cjs/client/passkey/webauthn.js.map +1 -0
- package/dist/_cjs/client/session/account.js +91 -34
- package/dist/_cjs/client/session/account.js.map +1 -1
- package/dist/_cjs/client/session/client-actions.js +19 -0
- package/dist/_cjs/client/session/client-actions.js.map +1 -0
- package/dist/_cjs/client/session/client.js +29 -83
- package/dist/_cjs/client/session/client.js.map +1 -1
- package/dist/_cjs/client/session/formatSessionPreferences.js +263 -0
- package/dist/_cjs/client/session/formatSessionPreferences.js.map +1 -0
- package/dist/_cjs/client/session/index.js +5 -0
- package/dist/_cjs/client/session/index.js.map +1 -1
- package/dist/_cjs/client/session/monitor.js +138 -0
- package/dist/_cjs/client/session/monitor.js.map +1 -0
- package/dist/_cjs/client/session/types.js +83 -0
- package/dist/_cjs/client/session/types.js.map +1 -0
- package/dist/_cjs/client/session/utils.js +95 -0
- package/dist/_cjs/client/session/utils.js.map +1 -0
- package/dist/_cjs/client-auth-server/Signer.js +67 -43
- package/dist/_cjs/client-auth-server/Signer.js.map +1 -1
- package/dist/_cjs/client-auth-server/WalletProvider.js +6 -7
- package/dist/_cjs/client-auth-server/WalletProvider.js.map +1 -1
- package/dist/_cjs/client-auth-server/session/index.js +36 -21
- package/dist/_cjs/client-auth-server/session/index.js.map +1 -1
- package/dist/_cjs/client-auth-server/session/utils.js.map +1 -1
- package/dist/_cjs/client-auth-server/utils/helpers.js.map +1 -0
- package/dist/_cjs/{client/recovery → client-auth-server/utils}/index.js +2 -2
- package/dist/_cjs/client-auth-server/utils/index.js.map +1 -0
- package/dist/_cjs/client-auth-server/utils/storage.js.map +1 -0
- package/dist/_cjs/connector/index.js +92 -13
- package/dist/_cjs/connector/index.js.map +1 -1
- package/dist/_cjs/index.js +19 -3
- package/dist/_cjs/index.js.map +1 -1
- package/dist/_esm/abi/SessionKeyValidator.js +729 -993
- package/dist/_esm/abi/SessionKeyValidator.js.map +1 -1
- package/dist/_esm/abi/{WebAuthValidator.js → WebAuthnValidator.js} +272 -305
- package/dist/_esm/abi/WebAuthnValidator.js.map +1 -0
- package/dist/_esm/abi/index.js +3 -7
- package/dist/_esm/abi/index.js.map +1 -1
- package/dist/_esm/actions/sendUserOperation.js +26 -0
- package/dist/_esm/actions/sendUserOperation.js.map +1 -0
- package/dist/_esm/client/actions/deploy.js +114 -0
- package/dist/_esm/client/actions/deploy.js.map +1 -0
- package/dist/_esm/client/actions/index.js +7 -0
- package/dist/_esm/client/actions/index.js.map +1 -0
- package/dist/_esm/client/actions/modules.js +75 -0
- package/dist/_esm/client/actions/modules.js.map +1 -0
- package/dist/_esm/client/actions/passkey.js +200 -0
- package/dist/_esm/client/actions/passkey.js.map +1 -0
- package/dist/_esm/client/actions/sessions.js +279 -0
- package/dist/_esm/client/actions/sessions.js.map +1 -0
- package/dist/_esm/client/actions/utils.js +27 -0
- package/dist/_esm/client/actions/utils.js.map +1 -0
- package/dist/_esm/client/common/smart-account-client-actions.js +209 -0
- package/dist/_esm/client/common/smart-account-client-actions.js.map +1 -0
- package/dist/_esm/client/ecdsa/account.js +91 -29
- package/dist/_esm/client/ecdsa/account.js.map +1 -1
- package/dist/_esm/client/ecdsa/client-actions.js +16 -0
- package/dist/_esm/client/ecdsa/client-actions.js.map +1 -0
- package/dist/_esm/client/ecdsa/client.js +90 -23
- package/dist/_esm/client/ecdsa/client.js.map +1 -1
- package/dist/_esm/client/ecdsa/index.js +2 -5
- package/dist/_esm/client/ecdsa/index.js.map +1 -1
- package/dist/_esm/client/index.js +6 -77
- package/dist/_esm/client/index.js.map +1 -1
- package/dist/_esm/client/passkey/account.js +118 -32
- package/dist/_esm/client/passkey/account.js.map +1 -1
- package/dist/_esm/client/passkey/client-actions.js +51 -0
- package/dist/_esm/client/passkey/client-actions.js.map +1 -0
- package/dist/_esm/client/passkey/client.js +99 -42
- package/dist/_esm/client/passkey/client.js.map +1 -1
- package/dist/_esm/client/passkey/index.js +4 -4
- package/dist/_esm/client/passkey/index.js.map +1 -1
- package/dist/_esm/client/passkey/webauthn.js +493 -0
- package/dist/_esm/client/passkey/webauthn.js.map +1 -0
- package/dist/_esm/client/session/account.js +114 -33
- package/dist/_esm/client/session/account.js.map +1 -1
- package/dist/_esm/client/session/client-actions.js +20 -0
- package/dist/_esm/client/session/client-actions.js.map +1 -0
- package/dist/_esm/client/session/client.js +34 -84
- package/dist/_esm/client/session/client.js.map +1 -1
- package/dist/_esm/client/session/formatSessionPreferences.js +283 -0
- package/dist/_esm/client/session/formatSessionPreferences.js.map +1 -0
- package/dist/_esm/client/session/index.js +5 -0
- package/dist/_esm/client/session/index.js.map +1 -1
- package/dist/_esm/client/session/monitor.js +195 -0
- package/dist/_esm/client/session/monitor.js.map +1 -0
- package/dist/_esm/client/session/types.js +110 -0
- package/dist/_esm/client/session/types.js.map +1 -0
- package/dist/_esm/client/session/utils.js +115 -0
- package/dist/_esm/client/session/utils.js.map +1 -0
- package/dist/_esm/client-auth-server/Signer.js +84 -43
- package/dist/_esm/client-auth-server/Signer.js.map +1 -1
- package/dist/_esm/client-auth-server/WalletProvider.js +6 -5
- package/dist/_esm/client-auth-server/WalletProvider.js.map +1 -1
- package/dist/_esm/client-auth-server/session/index.js +2 -1
- package/dist/_esm/client-auth-server/session/index.js.map +1 -1
- package/dist/_esm/client-auth-server/session/utils.js.map +1 -1
- package/dist/_esm/client-auth-server/utils/helpers.js.map +1 -0
- package/dist/_esm/client-auth-server/utils/index.js +3 -0
- package/dist/_esm/client-auth-server/utils/index.js.map +1 -0
- package/dist/_esm/client-auth-server/utils/storage.js.map +1 -0
- package/dist/_esm/connector/index.js +105 -11
- package/dist/_esm/connector/index.js.map +1 -1
- package/dist/_esm/index.js +9 -1
- package/dist/_esm/index.js.map +1 -1
- package/dist/_types/abi/SessionKeyValidator.d.ts +612 -602
- package/dist/_types/abi/SessionKeyValidator.d.ts.map +1 -1
- package/dist/_types/abi/{WebAuthValidator.d.ts → WebAuthnValidator.d.ts} +234 -186
- package/dist/_types/abi/WebAuthnValidator.d.ts.map +1 -0
- package/dist/_types/abi/index.d.ts +3 -7
- package/dist/_types/abi/index.d.ts.map +1 -1
- package/dist/_types/actions/sendUserOperation.d.ts +49 -0
- package/dist/_types/actions/sendUserOperation.d.ts.map +1 -0
- package/dist/_types/client/actions/deploy.d.ts +108 -0
- package/dist/_types/client/actions/deploy.d.ts.map +1 -0
- package/dist/_types/client/actions/index.d.ts +10 -0
- package/dist/_types/client/actions/index.d.ts.map +1 -0
- package/dist/_types/client/actions/modules.d.ts +65 -0
- package/dist/_types/client/actions/modules.d.ts.map +1 -0
- package/dist/_types/client/actions/passkey.d.ts +192 -0
- package/dist/_types/client/actions/passkey.d.ts.map +1 -0
- package/dist/_types/client/actions/sessions.d.ts +225 -0
- package/dist/_types/client/actions/sessions.d.ts.map +1 -0
- package/dist/_types/client/actions/utils.d.ts +25 -0
- package/dist/_types/client/actions/utils.d.ts.map +1 -0
- package/dist/_types/client/common/smart-account-client-actions.d.ts +50 -0
- package/dist/_types/client/common/smart-account-client-actions.d.ts.map +1 -0
- package/dist/_types/client/ecdsa/account.d.ts +16 -11
- package/dist/_types/client/ecdsa/account.d.ts.map +1 -1
- package/dist/_types/client/ecdsa/client-actions.d.ts +25 -0
- package/dist/_types/client/ecdsa/client-actions.d.ts.map +1 -0
- package/dist/_types/client/ecdsa/client.d.ts +92 -22
- package/dist/_types/client/ecdsa/client.d.ts.map +1 -1
- package/dist/_types/client/ecdsa/index.d.ts +2 -5
- package/dist/_types/client/ecdsa/index.d.ts.map +1 -1
- package/dist/_types/client/index.d.ts +7 -31
- package/dist/_types/client/index.d.ts.map +1 -1
- package/dist/_types/client/passkey/account.d.ts +22 -15
- package/dist/_types/client/passkey/account.d.ts.map +1 -1
- package/dist/_types/client/passkey/client-actions.d.ts +54 -0
- package/dist/_types/client/passkey/client-actions.d.ts.map +1 -0
- package/dist/_types/client/passkey/client.d.ts +103 -32
- package/dist/_types/client/passkey/client.d.ts.map +1 -1
- package/dist/_types/client/passkey/index.d.ts +4 -4
- package/dist/_types/client/passkey/index.d.ts.map +1 -1
- package/dist/_types/client/passkey/webauthn.d.ts +123 -0
- package/dist/_types/client/passkey/webauthn.d.ts.map +1 -0
- package/dist/_types/client/session/account.d.ts +26 -13
- package/dist/_types/client/session/account.d.ts.map +1 -1
- package/dist/_types/client/session/client-actions.d.ts +26 -0
- package/dist/_types/client/session/client-actions.d.ts.map +1 -0
- package/dist/_types/client/session/client.d.ts +38 -36
- package/dist/_types/client/session/client.d.ts.map +1 -1
- package/dist/_types/client/session/formatSessionPreferences.d.ts +101 -0
- package/dist/_types/client/session/formatSessionPreferences.d.ts.map +1 -0
- package/dist/_types/client/session/index.d.ts +5 -0
- package/dist/_types/client/session/index.d.ts.map +1 -1
- package/dist/_types/client/session/monitor.d.ts +93 -0
- package/dist/_types/client/session/monitor.d.ts.map +1 -0
- package/dist/_types/client/session/types.d.ts +133 -0
- package/dist/_types/client/session/types.d.ts.map +1 -0
- package/dist/_types/client/session/utils.d.ts +47 -0
- package/dist/_types/client/session/utils.d.ts.map +1 -0
- package/dist/_types/client-auth-server/Signer.d.ts +241 -245
- package/dist/_types/client-auth-server/Signer.d.ts.map +1 -1
- package/dist/_types/client-auth-server/WalletProvider.d.ts +236 -241
- package/dist/_types/client-auth-server/WalletProvider.d.ts.map +1 -1
- package/dist/_types/client-auth-server/interface.d.ts +2 -2
- package/dist/_types/client-auth-server/interface.d.ts.map +1 -1
- package/dist/_types/client-auth-server/rpc.d.ts +4 -0
- package/dist/_types/client-auth-server/rpc.d.ts.map +1 -1
- package/dist/_types/client-auth-server/session/index.d.ts +5 -4
- package/dist/_types/client-auth-server/session/index.d.ts.map +1 -1
- package/dist/_types/client-auth-server/session/utils.d.ts +3 -3
- package/dist/_types/client-auth-server/session/utils.d.ts.map +1 -1
- package/dist/_types/client-auth-server/utils/helpers.d.ts.map +1 -0
- package/dist/_types/client-auth-server/utils/index.d.ts +3 -0
- package/dist/_types/client-auth-server/utils/index.d.ts.map +1 -0
- package/dist/_types/client-auth-server/utils/storage.d.ts.map +1 -0
- package/dist/_types/communicator/interface.d.ts +5 -0
- package/dist/_types/communicator/interface.d.ts.map +1 -1
- package/dist/_types/connector/index.d.ts +11 -9
- package/dist/_types/connector/index.d.ts.map +1 -1
- package/dist/_types/index.d.ts +5 -3
- package/dist/_types/index.d.ts.map +1 -1
- package/package.json +36 -55
- package/prepare-package.mjs +8 -0
- package/project.json +7 -7
- package/src/abi/SessionKeyValidator.ts +861 -1125
- package/src/abi/WebAuthnValidator.ts +324 -0
- package/src/abi/index.ts +3 -7
- package/src/actions/sendUserOperation.ts +98 -0
- package/src/client/actions/deploy.ts +225 -0
- package/src/client/actions/index.ts +39 -0
- package/src/client/actions/modules.ts +112 -0
- package/src/client/actions/passkey.ts +344 -0
- package/src/client/actions/sessions.ts +457 -0
- package/src/client/actions/utils.ts +30 -0
- package/src/client/common/smart-account-client-actions.ts +317 -0
- package/src/client/ecdsa/account.ts +146 -42
- package/src/client/ecdsa/client-actions.ts +54 -0
- package/src/client/ecdsa/client.ts +177 -75
- package/src/client/ecdsa/index.ts +9 -5
- package/src/client/index.ts +10 -122
- package/src/client/passkey/account.ts +180 -55
- package/src/client/passkey/client-actions.ts +117 -0
- package/src/client/passkey/client.ts +194 -108
- package/src/client/passkey/index.ts +21 -4
- package/src/client/passkey/webauthn.ts +638 -0
- package/src/client/session/account.ts +211 -46
- package/src/client/session/client-actions.ts +62 -0
- package/src/client/session/client.ts +121 -160
- package/src/client/session/formatSessionPreferences.ts +444 -0
- package/src/client/session/index.ts +5 -0
- package/src/client/session/monitor.ts +292 -0
- package/src/client/session/types.ts +205 -0
- package/src/client/session/utils.ts +160 -0
- package/src/client-auth-server/Signer.ts +91 -41
- package/src/client-auth-server/WalletProvider.ts +12 -11
- package/src/client-auth-server/interface.ts +2 -2
- package/src/client-auth-server/rpc.ts +4 -0
- package/src/client-auth-server/session/index.ts +6 -4
- package/src/client-auth-server/session/utils.ts +4 -4
- package/src/client-auth-server/utils/index.ts +2 -0
- package/src/communicator/interface.ts +6 -0
- package/src/connector/index.ts +137 -24
- package/src/index.ts +12 -3
- package/tsconfig.json +1 -1
- package/dist/_cjs/abi/GuardianRecoveryModule.js +0 -767
- package/dist/_cjs/abi/GuardianRecoveryModule.js.map +0 -1
- package/dist/_cjs/abi/GuardianRecoveryValidator.js +0 -813
- package/dist/_cjs/abi/GuardianRecoveryValidator.js.map +0 -1
- package/dist/_cjs/abi/OidcKeyRegistry.js +0 -492
- package/dist/_cjs/abi/OidcKeyRegistry.js.map +0 -1
- package/dist/_cjs/abi/OidcRecoveryValidator.js +0 -650
- package/dist/_cjs/abi/OidcRecoveryValidator.js.map +0 -1
- package/dist/_cjs/abi/SsoAccount.js +0 -1354
- package/dist/_cjs/abi/SsoAccount.js.map +0 -1
- package/dist/_cjs/abi/WebAuthValidator.js.map +0 -1
- package/dist/_cjs/client/ecdsa/actions/account.js +0 -83
- package/dist/_cjs/client/ecdsa/actions/account.js.map +0 -1
- package/dist/_cjs/client/ecdsa/decorators/ecdsa.js +0 -22
- package/dist/_cjs/client/ecdsa/decorators/ecdsa.js.map +0 -1
- package/dist/_cjs/client/ecdsa/decorators/wallet.js +0 -53
- package/dist/_cjs/client/ecdsa/decorators/wallet.js.map +0 -1
- package/dist/_cjs/client/ecdsa/types.js +0 -63
- package/dist/_cjs/client/ecdsa/types.js.map +0 -1
- package/dist/_cjs/client/oidc/account.js +0 -43
- package/dist/_cjs/client/oidc/account.js.map +0 -1
- package/dist/_cjs/client/oidc/actions/addNewPasskeyViaOidc.js +0 -28
- package/dist/_cjs/client/oidc/actions/addNewPasskeyViaOidc.js.map +0 -1
- package/dist/_cjs/client/oidc/actions/index.js +0 -12
- package/dist/_cjs/client/oidc/actions/index.js.map +0 -1
- package/dist/_cjs/client/oidc/client.js +0 -46
- package/dist/_cjs/client/oidc/client.js.map +0 -1
- package/dist/_cjs/client/oidc/decorators/actions.js +0 -3
- package/dist/_cjs/client/oidc/decorators/actions.js.map +0 -1
- package/dist/_cjs/client/oidc/index.js +0 -20
- package/dist/_cjs/client/oidc/index.js.map +0 -1
- package/dist/_cjs/client/oidc/serialize.js +0 -3
- package/dist/_cjs/client/oidc/serialize.js.map +0 -1
- package/dist/_cjs/client/passkey/actions/account.js +0 -169
- package/dist/_cjs/client/passkey/actions/account.js.map +0 -1
- package/dist/_cjs/client/passkey/actions/passkey.js +0 -151
- package/dist/_cjs/client/passkey/actions/passkey.js.map +0 -1
- package/dist/_cjs/client/passkey/decorators/passkey.js +0 -52
- package/dist/_cjs/client/passkey/decorators/passkey.js.map +0 -1
- package/dist/_cjs/client/passkey/decorators/wallet.js +0 -54
- package/dist/_cjs/client/passkey/decorators/wallet.js.map +0 -1
- package/dist/_cjs/client/recovery/account.js +0 -46
- package/dist/_cjs/client/recovery/account.js.map +0 -1
- package/dist/_cjs/client/recovery/actions/oidc.js +0 -69
- package/dist/_cjs/client/recovery/actions/oidc.js.map +0 -1
- package/dist/_cjs/client/recovery/actions/recovery.js +0 -114
- package/dist/_cjs/client/recovery/actions/recovery.js.map +0 -1
- package/dist/_cjs/client/recovery/actions/sendEip712Transaction.js +0 -45
- package/dist/_cjs/client/recovery/actions/sendEip712Transaction.js.map +0 -1
- package/dist/_cjs/client/recovery/client.js +0 -49
- package/dist/_cjs/client/recovery/client.js.map +0 -1
- package/dist/_cjs/client/recovery/decorators/publicActionsRewrite.js +0 -33
- package/dist/_cjs/client/recovery/decorators/publicActionsRewrite.js.map +0 -1
- package/dist/_cjs/client/recovery/decorators/recovery.js +0 -15
- package/dist/_cjs/client/recovery/decorators/recovery.js.map +0 -1
- package/dist/_cjs/client/recovery/decorators/wallet.js +0 -46
- package/dist/_cjs/client/recovery/decorators/wallet.js.map +0 -1
- package/dist/_cjs/client/recovery/index.js.map +0 -1
- package/dist/_cjs/client/session/actions/sendEip712Transaction.js +0 -45
- package/dist/_cjs/client/session/actions/sendEip712Transaction.js.map +0 -1
- package/dist/_cjs/client/session/actions/session.js +0 -116
- package/dist/_cjs/client/session/actions/session.js.map +0 -1
- package/dist/_cjs/client/session/decorators/publicActionsRewrite.js +0 -58
- package/dist/_cjs/client/session/decorators/publicActionsRewrite.js.map +0 -1
- package/dist/_cjs/client/session/decorators/wallet.js +0 -93
- package/dist/_cjs/client/session/decorators/wallet.js.map +0 -1
- package/dist/_cjs/client/utils/assertEip712Transaction.js +0 -44
- package/dist/_cjs/client/utils/assertEip712Transaction.js.map +0 -1
- package/dist/_cjs/client/utils/getEip712Domain.js +0 -57
- package/dist/_cjs/client/utils/getEip712Domain.js.map +0 -1
- package/dist/_cjs/client/utils/isEip712Transaction.js +0 -16
- package/dist/_cjs/client/utils/isEip712Transaction.js.map +0 -1
- package/dist/_cjs/paymaster/handlers/general.js +0 -13
- package/dist/_cjs/paymaster/handlers/general.js.map +0 -1
- package/dist/_cjs/paymaster/handlers/index.js +0 -19
- package/dist/_cjs/paymaster/handlers/index.js.map +0 -1
- package/dist/_cjs/paymaster/handlers/zyfi.js +0 -57
- package/dist/_cjs/paymaster/handlers/zyfi.js.map +0 -1
- package/dist/_cjs/paymaster/index.js +0 -54
- package/dist/_cjs/paymaster/index.js.map +0 -1
- package/dist/_cjs/utils/encoding.js +0 -56
- package/dist/_cjs/utils/encoding.js.map +0 -1
- package/dist/_cjs/utils/helpers.js.map +0 -1
- package/dist/_cjs/utils/index.js +0 -20
- package/dist/_cjs/utils/index.js.map +0 -1
- package/dist/_cjs/utils/passkey.js +0 -245
- package/dist/_cjs/utils/passkey.js.map +0 -1
- package/dist/_cjs/utils/session.js +0 -346
- package/dist/_cjs/utils/session.js.map +0 -1
- package/dist/_cjs/utils/storage.js.map +0 -1
- package/dist/_esm/abi/GuardianRecoveryModule.js +0 -764
- package/dist/_esm/abi/GuardianRecoveryModule.js.map +0 -1
- package/dist/_esm/abi/GuardianRecoveryValidator.js +0 -810
- package/dist/_esm/abi/GuardianRecoveryValidator.js.map +0 -1
- package/dist/_esm/abi/OidcKeyRegistry.js +0 -489
- package/dist/_esm/abi/OidcKeyRegistry.js.map +0 -1
- package/dist/_esm/abi/OidcRecoveryValidator.js +0 -647
- package/dist/_esm/abi/OidcRecoveryValidator.js.map +0 -1
- package/dist/_esm/abi/SsoAccount.js +0 -1351
- package/dist/_esm/abi/SsoAccount.js.map +0 -1
- package/dist/_esm/abi/WebAuthValidator.js.map +0 -1
- package/dist/_esm/client/ecdsa/actions/account.js +0 -82
- package/dist/_esm/client/ecdsa/actions/account.js.map +0 -1
- package/dist/_esm/client/ecdsa/decorators/ecdsa.js +0 -19
- package/dist/_esm/client/ecdsa/decorators/ecdsa.js.map +0 -1
- package/dist/_esm/client/ecdsa/decorators/wallet.js +0 -54
- package/dist/_esm/client/ecdsa/decorators/wallet.js.map +0 -1
- package/dist/_esm/client/ecdsa/types.js +0 -61
- package/dist/_esm/client/ecdsa/types.js.map +0 -1
- package/dist/_esm/client/oidc/account.js +0 -40
- package/dist/_esm/client/oidc/account.js.map +0 -1
- package/dist/_esm/client/oidc/actions/addNewPasskeyViaOidc.js +0 -26
- package/dist/_esm/client/oidc/actions/addNewPasskeyViaOidc.js.map +0 -1
- package/dist/_esm/client/oidc/actions/index.js +0 -9
- package/dist/_esm/client/oidc/actions/index.js.map +0 -1
- package/dist/_esm/client/oidc/client.js +0 -41
- package/dist/_esm/client/oidc/client.js.map +0 -1
- package/dist/_esm/client/oidc/decorators/actions.js +0 -2
- package/dist/_esm/client/oidc/decorators/actions.js.map +0 -1
- package/dist/_esm/client/oidc/index.js +0 -4
- package/dist/_esm/client/oidc/index.js.map +0 -1
- package/dist/_esm/client/oidc/serialize.js +0 -2
- package/dist/_esm/client/oidc/serialize.js.map +0 -1
- package/dist/_esm/client/passkey/actions/account.js +0 -165
- package/dist/_esm/client/passkey/actions/account.js.map +0 -1
- package/dist/_esm/client/passkey/actions/passkey.js +0 -148
- package/dist/_esm/client/passkey/actions/passkey.js.map +0 -1
- package/dist/_esm/client/passkey/decorators/passkey.js +0 -50
- package/dist/_esm/client/passkey/decorators/passkey.js.map +0 -1
- package/dist/_esm/client/passkey/decorators/wallet.js +0 -54
- package/dist/_esm/client/passkey/decorators/wallet.js.map +0 -1
- package/dist/_esm/client/recovery/account.js +0 -43
- package/dist/_esm/client/recovery/account.js.map +0 -1
- package/dist/_esm/client/recovery/actions/oidc.js +0 -69
- package/dist/_esm/client/recovery/actions/oidc.js.map +0 -1
- package/dist/_esm/client/recovery/actions/recovery.js +0 -111
- package/dist/_esm/client/recovery/actions/recovery.js.map +0 -1
- package/dist/_esm/client/recovery/actions/sendEip712Transaction.js +0 -93
- package/dist/_esm/client/recovery/actions/sendEip712Transaction.js.map +0 -1
- package/dist/_esm/client/recovery/client.js +0 -45
- package/dist/_esm/client/recovery/client.js.map +0 -1
- package/dist/_esm/client/recovery/decorators/publicActionsRewrite.js +0 -31
- package/dist/_esm/client/recovery/decorators/publicActionsRewrite.js.map +0 -1
- package/dist/_esm/client/recovery/decorators/recovery.js +0 -13
- package/dist/_esm/client/recovery/decorators/recovery.js.map +0 -1
- package/dist/_esm/client/recovery/decorators/wallet.js +0 -45
- package/dist/_esm/client/recovery/decorators/wallet.js.map +0 -1
- package/dist/_esm/client/recovery/index.js +0 -3
- package/dist/_esm/client/recovery/index.js.map +0 -1
- package/dist/_esm/client/session/actions/sendEip712Transaction.js +0 -93
- package/dist/_esm/client/session/actions/sendEip712Transaction.js.map +0 -1
- package/dist/_esm/client/session/actions/session.js +0 -119
- package/dist/_esm/client/session/actions/session.js.map +0 -1
- package/dist/_esm/client/session/decorators/publicActionsRewrite.js +0 -55
- package/dist/_esm/client/session/decorators/publicActionsRewrite.js.map +0 -1
- package/dist/_esm/client/session/decorators/wallet.js +0 -100
- package/dist/_esm/client/session/decorators/wallet.js.map +0 -1
- package/dist/_esm/client/utils/assertEip712Transaction.js +0 -39
- package/dist/_esm/client/utils/assertEip712Transaction.js.map +0 -1
- package/dist/_esm/client/utils/getEip712Domain.js +0 -57
- package/dist/_esm/client/utils/getEip712Domain.js.map +0 -1
- package/dist/_esm/client/utils/isEip712Transaction.js +0 -13
- package/dist/_esm/client/utils/isEip712Transaction.js.map +0 -1
- package/dist/_esm/paymaster/handlers/general.js +0 -11
- package/dist/_esm/paymaster/handlers/general.js.map +0 -1
- package/dist/_esm/paymaster/handlers/index.js +0 -3
- package/dist/_esm/paymaster/handlers/index.js.map +0 -1
- package/dist/_esm/paymaster/handlers/zyfi.js +0 -54
- package/dist/_esm/paymaster/handlers/zyfi.js.map +0 -1
- package/dist/_esm/paymaster/index.js +0 -37
- package/dist/_esm/paymaster/index.js.map +0 -1
- package/dist/_esm/utils/encoding.js +0 -49
- package/dist/_esm/utils/encoding.js.map +0 -1
- package/dist/_esm/utils/helpers.js.map +0 -1
- package/dist/_esm/utils/index.js +0 -4
- package/dist/_esm/utils/index.js.map +0 -1
- package/dist/_esm/utils/passkey.js +0 -296
- package/dist/_esm/utils/passkey.js.map +0 -1
- package/dist/_esm/utils/session.js +0 -358
- package/dist/_esm/utils/session.js.map +0 -1
- package/dist/_esm/utils/storage.js.map +0 -1
- package/dist/_types/abi/GuardianRecoveryModule.d.ts +0 -590
- package/dist/_types/abi/GuardianRecoveryModule.d.ts.map +0 -1
- package/dist/_types/abi/GuardianRecoveryValidator.d.ts +0 -626
- package/dist/_types/abi/GuardianRecoveryValidator.d.ts.map +0 -1
- package/dist/_types/abi/OidcKeyRegistry.d.ts +0 -375
- package/dist/_types/abi/OidcKeyRegistry.d.ts.map +0 -1
- package/dist/_types/abi/OidcRecoveryValidator.d.ts +0 -501
- package/dist/_types/abi/OidcRecoveryValidator.d.ts.map +0 -1
- package/dist/_types/abi/SsoAccount.d.ts +0 -1044
- package/dist/_types/abi/SsoAccount.d.ts.map +0 -1
- package/dist/_types/abi/WebAuthValidator.d.ts.map +0 -1
- package/dist/_types/client/ecdsa/actions/account.d.ts +0 -38
- package/dist/_types/client/ecdsa/actions/account.d.ts.map +0 -1
- package/dist/_types/client/ecdsa/decorators/ecdsa.d.ts +0 -16
- package/dist/_types/client/ecdsa/decorators/ecdsa.d.ts.map +0 -1
- package/dist/_types/client/ecdsa/decorators/wallet.d.ts +0 -5
- package/dist/_types/client/ecdsa/decorators/wallet.d.ts.map +0 -1
- package/dist/_types/client/ecdsa/types.d.ts +0 -10
- package/dist/_types/client/ecdsa/types.d.ts.map +0 -1
- package/dist/_types/client/oidc/account.d.ts +0 -13
- package/dist/_types/client/oidc/account.d.ts.map +0 -1
- package/dist/_types/client/oidc/actions/addNewPasskeyViaOidc.d.ts +0 -12
- package/dist/_types/client/oidc/actions/addNewPasskeyViaOidc.d.ts.map +0 -1
- package/dist/_types/client/oidc/actions/index.d.ts +0 -5
- package/dist/_types/client/oidc/actions/index.d.ts.map +0 -1
- package/dist/_types/client/oidc/client.d.ts +0 -24
- package/dist/_types/client/oidc/client.d.ts.map +0 -1
- package/dist/_types/client/oidc/decorators/actions.d.ts +0 -5
- package/dist/_types/client/oidc/decorators/actions.d.ts.map +0 -1
- package/dist/_types/client/oidc/index.d.ts +0 -4
- package/dist/_types/client/oidc/index.d.ts.map +0 -1
- package/dist/_types/client/oidc/serialize.d.ts +0 -10
- package/dist/_types/client/oidc/serialize.d.ts.map +0 -1
- package/dist/_types/client/passkey/actions/account.d.ts +0 -48
- package/dist/_types/client/passkey/actions/account.d.ts.map +0 -1
- package/dist/_types/client/passkey/actions/passkey.d.ts +0 -55
- package/dist/_types/client/passkey/actions/passkey.d.ts.map +0 -1
- package/dist/_types/client/passkey/decorators/passkey.d.ts +0 -16
- package/dist/_types/client/passkey/decorators/passkey.d.ts.map +0 -1
- package/dist/_types/client/passkey/decorators/wallet.d.ts +0 -5
- package/dist/_types/client/passkey/decorators/wallet.d.ts.map +0 -1
- package/dist/_types/client/recovery/account.d.ts +0 -14
- package/dist/_types/client/recovery/account.d.ts.map +0 -1
- package/dist/_types/client/recovery/actions/oidc.d.ts +0 -24
- package/dist/_types/client/recovery/actions/oidc.d.ts.map +0 -1
- package/dist/_types/client/recovery/actions/recovery.d.ts +0 -50
- package/dist/_types/client/recovery/actions/recovery.d.ts.map +0 -1
- package/dist/_types/client/recovery/actions/sendEip712Transaction.d.ts +0 -60
- package/dist/_types/client/recovery/actions/sendEip712Transaction.d.ts.map +0 -1
- package/dist/_types/client/recovery/client.d.ts +0 -23
- package/dist/_types/client/recovery/client.d.ts.map +0 -1
- package/dist/_types/client/recovery/decorators/publicActionsRewrite.d.ts +0 -4
- package/dist/_types/client/recovery/decorators/publicActionsRewrite.d.ts.map +0 -1
- package/dist/_types/client/recovery/decorators/recovery.d.ts +0 -8
- package/dist/_types/client/recovery/decorators/recovery.d.ts.map +0 -1
- package/dist/_types/client/recovery/decorators/wallet.d.ts +0 -5
- package/dist/_types/client/recovery/decorators/wallet.d.ts.map +0 -1
- package/dist/_types/client/recovery/index.d.ts +0 -3
- package/dist/_types/client/recovery/index.d.ts.map +0 -1
- package/dist/_types/client/session/actions/sendEip712Transaction.d.ts +0 -60
- package/dist/_types/client/session/actions/sendEip712Transaction.d.ts.map +0 -1
- package/dist/_types/client/session/actions/session.d.ts +0 -61
- package/dist/_types/client/session/actions/session.d.ts.map +0 -1
- package/dist/_types/client/session/decorators/publicActionsRewrite.d.ts +0 -4
- package/dist/_types/client/session/decorators/publicActionsRewrite.d.ts.map +0 -1
- package/dist/_types/client/session/decorators/wallet.d.ts +0 -5
- package/dist/_types/client/session/decorators/wallet.d.ts.map +0 -1
- package/dist/_types/client/utils/assertEip712Transaction.d.ts +0 -11
- package/dist/_types/client/utils/assertEip712Transaction.d.ts.map +0 -1
- package/dist/_types/client/utils/getEip712Domain.d.ts +0 -3
- package/dist/_types/client/utils/getEip712Domain.d.ts.map +0 -1
- package/dist/_types/client/utils/isEip712Transaction.d.ts +0 -4
- package/dist/_types/client/utils/isEip712Transaction.d.ts.map +0 -1
- package/dist/_types/paymaster/handlers/general.d.ts +0 -4
- package/dist/_types/paymaster/handlers/general.d.ts.map +0 -1
- package/dist/_types/paymaster/handlers/index.d.ts +0 -3
- package/dist/_types/paymaster/handlers/index.d.ts.map +0 -1
- package/dist/_types/paymaster/handlers/zyfi.d.ts +0 -18
- package/dist/_types/paymaster/handlers/zyfi.d.ts.map +0 -1
- package/dist/_types/paymaster/index.d.ts +0 -29
- package/dist/_types/paymaster/index.d.ts.map +0 -1
- package/dist/_types/utils/encoding.d.ts +0 -19
- package/dist/_types/utils/encoding.d.ts.map +0 -1
- package/dist/_types/utils/helpers.d.ts.map +0 -1
- package/dist/_types/utils/index.d.ts +0 -4
- package/dist/_types/utils/index.d.ts.map +0 -1
- package/dist/_types/utils/passkey.d.ts +0 -47
- package/dist/_types/utils/passkey.d.ts.map +0 -1
- package/dist/_types/utils/session.d.ts +0 -179
- package/dist/_types/utils/session.d.ts.map +0 -1
- package/dist/_types/utils/storage.d.ts.map +0 -1
- package/src/abi/GuardianRecoveryModule.ts +0 -763
- package/src/abi/GuardianRecoveryValidator.ts +0 -809
- package/src/abi/OidcKeyRegistry.ts +0 -488
- package/src/abi/OidcRecoveryValidator.ts +0 -646
- package/src/abi/SsoAccount.ts +0 -1350
- package/src/abi/WebAuthValidator.ts +0 -357
- package/src/client/ecdsa/actions/account.ts +0 -146
- package/src/client/ecdsa/decorators/ecdsa.ts +0 -32
- package/src/client/ecdsa/decorators/wallet.ts +0 -80
- package/src/client/ecdsa/types.ts +0 -108
- package/src/client/oidc/account.ts +0 -65
- package/src/client/oidc/actions/addNewPasskeyViaOidc.ts +0 -54
- package/src/client/oidc/actions/index.ts +0 -16
- package/src/client/oidc/client.ts +0 -122
- package/src/client/oidc/decorators/actions.ts +0 -5
- package/src/client/oidc/index.ts +0 -3
- package/src/client/oidc/serialize.ts +0 -10
- package/src/client/passkey/actions/account.ts +0 -241
- package/src/client/passkey/actions/passkey.ts +0 -208
- package/src/client/passkey/decorators/passkey.ts +0 -77
- package/src/client/passkey/decorators/wallet.ts +0 -79
- package/src/client/recovery/account.ts +0 -61
- package/src/client/recovery/actions/oidc.ts +0 -119
- package/src/client/recovery/actions/recovery.ts +0 -176
- package/src/client/recovery/actions/sendEip712Transaction.ts +0 -149
- package/src/client/recovery/client.ts +0 -102
- package/src/client/recovery/decorators/publicActionsRewrite.ts +0 -38
- package/src/client/recovery/decorators/recovery.ts +0 -22
- package/src/client/recovery/decorators/wallet.ts +0 -59
- package/src/client/recovery/index.ts +0 -2
- package/src/client/session/actions/sendEip712Transaction.ts +0 -149
- package/src/client/session/actions/session.ts +0 -204
- package/src/client/session/decorators/publicActionsRewrite.ts +0 -63
- package/src/client/session/decorators/wallet.ts +0 -143
- package/src/client/utils/assertEip712Transaction.ts +0 -49
- package/src/client/utils/getEip712Domain.ts +0 -84
- package/src/client/utils/isEip712Transaction.ts +0 -18
- package/src/paymaster/handlers/general.ts +0 -14
- package/src/paymaster/handlers/index.ts +0 -2
- package/src/paymaster/handlers/zyfi.ts +0 -108
- package/src/paymaster/index.ts +0 -76
- package/src/types/index.d.ts +0 -9
- package/src/utils/encoding.ts +0 -70
- package/src/utils/index.ts +0 -3
- package/src/utils/passkey.ts +0 -347
- package/src/utils/session.ts +0 -524
- /package/dist/_cjs/{utils → client-auth-server/utils}/helpers.js +0 -0
- /package/dist/_cjs/{utils → client-auth-server/utils}/storage.js +0 -0
- /package/dist/_esm/{utils → client-auth-server/utils}/helpers.js +0 -0
- /package/dist/_esm/{utils → client-auth-server/utils}/storage.js +0 -0
- /package/dist/_types/{utils → client-auth-server/utils}/helpers.d.ts +0 -0
- /package/dist/_types/{utils → client-auth-server/utils}/storage.d.ts +0 -0
- /package/src/{utils → client-auth-server/utils}/helpers.ts +0 -0
- /package/src/{utils → client-auth-server/utils}/storage.ts +0 -0
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { type Account, type Address, type Chain, type Client, encodeFunctionData, type Hash, type Hex, keccak256, type Prettify, toHex, type TransactionReceipt, type Transport } from "viem";
|
|
2
|
-
import { waitForTransactionReceipt } from "viem/actions";
|
|
3
|
-
import { getGeneralPaymasterInput, sendTransaction } from "viem/zksync";
|
|
4
|
-
|
|
5
|
-
import { GuardianRecoveryValidatorAbi } from "../../../abi/GuardianRecoveryValidator.js";
|
|
6
|
-
import { noThrow } from "../../../utils/helpers.js";
|
|
7
|
-
|
|
8
|
-
export type ProposeGuardianArgs = {
|
|
9
|
-
newGuardian: Address;
|
|
10
|
-
contracts: {
|
|
11
|
-
recovery: Address; // recovery module
|
|
12
|
-
};
|
|
13
|
-
origin?: string;
|
|
14
|
-
paymaster?: {
|
|
15
|
-
address: Address;
|
|
16
|
-
paymasterInput?: Hex;
|
|
17
|
-
};
|
|
18
|
-
onTransactionSent?: (hash: Hash) => void;
|
|
19
|
-
};
|
|
20
|
-
export type ProposeGuardianReturnType = {
|
|
21
|
-
transactionReceipt: TransactionReceipt;
|
|
22
|
-
};
|
|
23
|
-
export const proposeGuardian = async <
|
|
24
|
-
transport extends Transport,
|
|
25
|
-
chain extends Chain,
|
|
26
|
-
account extends Account,
|
|
27
|
-
>(client: Client<transport, chain, account>, args: Prettify<ProposeGuardianArgs>): Promise<Prettify<ProposeGuardianReturnType>> => {
|
|
28
|
-
let origin: string | undefined = args.origin;
|
|
29
|
-
if (!origin) {
|
|
30
|
-
try {
|
|
31
|
-
origin = window.location.origin;
|
|
32
|
-
} catch {
|
|
33
|
-
throw new Error("Can't identify expectedOrigin, please provide it manually");
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const callData = encodeFunctionData({
|
|
38
|
-
abi: GuardianRecoveryValidatorAbi,
|
|
39
|
-
functionName: "proposeGuardian",
|
|
40
|
-
args: [keccak256(toHex(origin)), args.newGuardian],
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const sendTransactionArgs = {
|
|
44
|
-
account: client.account,
|
|
45
|
-
to: args.contracts.recovery,
|
|
46
|
-
paymaster: args.paymaster?.address,
|
|
47
|
-
paymasterInput: args.paymaster?.address ? (args.paymaster?.paymasterInput || getGeneralPaymasterInput({ innerInput: "0x" })) : undefined,
|
|
48
|
-
data: callData,
|
|
49
|
-
gas: 10_000_000n, // TODO: Remove when gas estimation is fixed
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
|
-
} as any;
|
|
52
|
-
|
|
53
|
-
const transactionHash = await sendTransaction(client, sendTransactionArgs);
|
|
54
|
-
if (args.onTransactionSent) {
|
|
55
|
-
noThrow(() => args.onTransactionSent?.(transactionHash));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const transactionReceipt = await waitForTransactionReceipt(client, { hash: transactionHash });
|
|
59
|
-
if (transactionReceipt.status !== "success") throw new Error("proposeGuardian transaction reverted");
|
|
60
|
-
|
|
61
|
-
return {
|
|
62
|
-
transactionReceipt,
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
export type ConfirmGuardianArgs = {
|
|
66
|
-
accountToGuard: Address;
|
|
67
|
-
contracts: {
|
|
68
|
-
recovery: Address; // recovery module
|
|
69
|
-
};
|
|
70
|
-
origin?: string;
|
|
71
|
-
paymaster?: {
|
|
72
|
-
address: Address;
|
|
73
|
-
paymasterInput?: Hex;
|
|
74
|
-
};
|
|
75
|
-
onTransactionSent?: (hash: Hash) => void;
|
|
76
|
-
};
|
|
77
|
-
export type ConfirmGuardianReturnType = {
|
|
78
|
-
transactionReceipt: TransactionReceipt;
|
|
79
|
-
};
|
|
80
|
-
export const confirmGuardian = async <
|
|
81
|
-
transport extends Transport,
|
|
82
|
-
chain extends Chain,
|
|
83
|
-
account extends Account,
|
|
84
|
-
>(client: Client<transport, chain, account>, args: Prettify<ConfirmGuardianArgs>): Promise<Prettify<ConfirmGuardianReturnType>> => {
|
|
85
|
-
let origin: string | undefined = args.origin;
|
|
86
|
-
if (!origin) {
|
|
87
|
-
try {
|
|
88
|
-
origin = window.location.origin;
|
|
89
|
-
} catch {
|
|
90
|
-
throw new Error("Can't identify expectedOrigin, please provide it manually");
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const callData = encodeFunctionData({
|
|
94
|
-
abi: GuardianRecoveryValidatorAbi,
|
|
95
|
-
functionName: "addGuardian",
|
|
96
|
-
args: [keccak256(toHex(origin)), args.accountToGuard],
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
const sendTransactionArgs = {
|
|
100
|
-
account: client.account,
|
|
101
|
-
to: args.contracts.recovery,
|
|
102
|
-
paymaster: args.paymaster?.address,
|
|
103
|
-
paymasterInput: args.paymaster?.address ? (args.paymaster?.paymasterInput || getGeneralPaymasterInput({ innerInput: "0x" })) : undefined,
|
|
104
|
-
data: callData,
|
|
105
|
-
gas: 10_000_000n, // TODO: Remove when gas estimation is fixed
|
|
106
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
|
-
} as any;
|
|
108
|
-
|
|
109
|
-
const transactionHash = await sendTransaction(client, sendTransactionArgs);
|
|
110
|
-
if (args.onTransactionSent) {
|
|
111
|
-
noThrow(() => args.onTransactionSent?.(transactionHash));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const transactionReceipt = await waitForTransactionReceipt(client, { hash: transactionHash });
|
|
115
|
-
if (transactionReceipt.status !== "success") throw new Error("confirmGuardian transaction reverted");
|
|
116
|
-
|
|
117
|
-
return {
|
|
118
|
-
transactionReceipt,
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
export type RemoveGuardianArgs = {
|
|
122
|
-
guardian: Address;
|
|
123
|
-
contracts: {
|
|
124
|
-
recovery: Address; // recovery module
|
|
125
|
-
};
|
|
126
|
-
origin?: string;
|
|
127
|
-
paymaster?: {
|
|
128
|
-
address: Address;
|
|
129
|
-
paymasterInput?: Hex;
|
|
130
|
-
};
|
|
131
|
-
onTransactionSent?: (hash: Hash) => void;
|
|
132
|
-
};
|
|
133
|
-
export type RemoveGuardianReturnType = {
|
|
134
|
-
transactionReceipt: TransactionReceipt;
|
|
135
|
-
};
|
|
136
|
-
export const removeGuardian = async <
|
|
137
|
-
transport extends Transport,
|
|
138
|
-
chain extends Chain,
|
|
139
|
-
account extends Account,
|
|
140
|
-
>(client: Client<transport, chain, account>, args: Prettify<RemoveGuardianArgs>): Promise<Prettify<RemoveGuardianReturnType>> => {
|
|
141
|
-
let origin: string | undefined = args.origin;
|
|
142
|
-
if (!origin) {
|
|
143
|
-
try {
|
|
144
|
-
origin = window.location.origin;
|
|
145
|
-
} catch {
|
|
146
|
-
throw new Error("Can't identify expectedOrigin, please provide it manually");
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
const callData = encodeFunctionData({
|
|
150
|
-
abi: GuardianRecoveryValidatorAbi,
|
|
151
|
-
functionName: "removeGuardian",
|
|
152
|
-
args: [keccak256(toHex(origin)), args.guardian],
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
const sendTransactionArgs = {
|
|
156
|
-
account: client.account,
|
|
157
|
-
to: args.contracts.recovery,
|
|
158
|
-
paymaster: args.paymaster?.address,
|
|
159
|
-
paymasterInput: args.paymaster?.address ? (args.paymaster?.paymasterInput || getGeneralPaymasterInput({ innerInput: "0x" })) : undefined,
|
|
160
|
-
data: callData,
|
|
161
|
-
gas: 10_000_000n, // TODO: Remove when gas estimation is fixed
|
|
162
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
163
|
-
} as any;
|
|
164
|
-
|
|
165
|
-
const transactionHash = await sendTransaction(client, sendTransactionArgs);
|
|
166
|
-
if (args.onTransactionSent) {
|
|
167
|
-
noThrow(() => args.onTransactionSent?.(transactionHash));
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const transactionReceipt = await waitForTransactionReceipt(client, { hash: transactionHash });
|
|
171
|
-
if (transactionReceipt.status !== "success") throw new Error("removeGuardian transaction reverted");
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
transactionReceipt,
|
|
175
|
-
};
|
|
176
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { type Account, assertRequest, type AssertRequestErrorType, type Chain, type Client, type ExactPartial, type Hash, type PublicActions, type RpcSchema, type SendTransactionRequest, type Transport, type WalletActions } from "viem";
|
|
2
|
-
import { parseAccount } from "viem/accounts";
|
|
3
|
-
import { prepareTransactionRequest, sendRawTransaction } from "viem/actions";
|
|
4
|
-
import { type ChainEIP712, type SendEip712TransactionParameters, type SendEip712TransactionReturnType, type SendTransactionParameters, zksync } from "viem/zksync";
|
|
5
|
-
|
|
6
|
-
import { InvalidEip712TransactionError, type InvalidEip712TransactionErrorType } from "../../utils/assertEip712Transaction.js";
|
|
7
|
-
import { isEIP712Transaction } from "../../utils/isEip712Transaction.js";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Creates, signs, and sends a new EIP712 transaction to the network.
|
|
11
|
-
*
|
|
12
|
-
* @param client - Client to use
|
|
13
|
-
* @param parameters - {@link SendEip712TransactionParameters}
|
|
14
|
-
* @returns The [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. {@link SendTransactionReturnType}
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* import { createWalletClient, custom } from 'viem'
|
|
18
|
-
* import { zksync } from 'viem/chains'
|
|
19
|
-
* import { sendEip712Transaction } from 'viem/zksync'
|
|
20
|
-
*
|
|
21
|
-
* const client = createWalletClient({
|
|
22
|
-
* chain: zksync,
|
|
23
|
-
* transport: custom(window.ethereum),
|
|
24
|
-
* })
|
|
25
|
-
* const hash = await sendEip712Transaction(client, {
|
|
26
|
-
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
27
|
-
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
|
28
|
-
* value: 1000000000000000000n,
|
|
29
|
-
* })
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* // Account Hoisting
|
|
33
|
-
* import { createWalletClient, http } from 'viem'
|
|
34
|
-
* import { privateKeyToAccount } from 'viem/accounts'
|
|
35
|
-
* import { zksync } from 'viem/chains'
|
|
36
|
-
* import { sendEip712Transaction } from 'viem/zksync'
|
|
37
|
-
*
|
|
38
|
-
* const client = createWalletClient({
|
|
39
|
-
* account: privateKeyToAccount('0x…'),
|
|
40
|
-
* chain: zksync,
|
|
41
|
-
* transport: http(),
|
|
42
|
-
* })
|
|
43
|
-
*
|
|
44
|
-
* const hash = await sendEip712Transaction(client, {
|
|
45
|
-
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
|
46
|
-
* value: 1000000000000000000n,
|
|
47
|
-
* })
|
|
48
|
-
*/
|
|
49
|
-
export async function sendEip712Transaction<
|
|
50
|
-
chain extends ChainEIP712 | undefined,
|
|
51
|
-
account extends Account | undefined,
|
|
52
|
-
const request extends SendTransactionRequest<chain, chainOverride>,
|
|
53
|
-
chainOverride extends ChainEIP712 | undefined = undefined,
|
|
54
|
-
>(
|
|
55
|
-
client: Client<Transport, chain, account>,
|
|
56
|
-
parameters: SendEip712TransactionParameters<
|
|
57
|
-
chain,
|
|
58
|
-
account,
|
|
59
|
-
chainOverride,
|
|
60
|
-
request
|
|
61
|
-
>,
|
|
62
|
-
): Promise<SendEip712TransactionReturnType> {
|
|
63
|
-
const {
|
|
64
|
-
account: account_ = client.account,
|
|
65
|
-
chain = client.chain,
|
|
66
|
-
...rest
|
|
67
|
-
} = parameters;
|
|
68
|
-
|
|
69
|
-
if (!account_)
|
|
70
|
-
throw new Error("Account not found.");
|
|
71
|
-
const account = parseAccount(account_);
|
|
72
|
-
|
|
73
|
-
assertEip712Request(parameters);
|
|
74
|
-
|
|
75
|
-
const request = await getAction(
|
|
76
|
-
client,
|
|
77
|
-
prepareTransactionRequest,
|
|
78
|
-
"prepareTransactionRequest",
|
|
79
|
-
)({
|
|
80
|
-
account,
|
|
81
|
-
chain,
|
|
82
|
-
nonceManager: account.nonceManager,
|
|
83
|
-
...rest,
|
|
84
|
-
} as any);
|
|
85
|
-
|
|
86
|
-
const serializer = chain?.serializers?.transaction;
|
|
87
|
-
const serializedTransaction = (await account.signTransaction!(request, {
|
|
88
|
-
serializer,
|
|
89
|
-
})) as Hash;
|
|
90
|
-
|
|
91
|
-
return await getAction(
|
|
92
|
-
client,
|
|
93
|
-
sendRawTransaction,
|
|
94
|
-
"sendRawTransaction",
|
|
95
|
-
)({
|
|
96
|
-
serializedTransaction,
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Retrieves and returns an action from the client (if exists), and falls
|
|
102
|
-
* back to the tree-shakable action.
|
|
103
|
-
*
|
|
104
|
-
* Useful for extracting overridden actions from a client (ie. if a consumer
|
|
105
|
-
* wants to override the `sendTransaction` implementation).
|
|
106
|
-
*/
|
|
107
|
-
export function getAction<
|
|
108
|
-
transport extends Transport,
|
|
109
|
-
chain extends Chain | undefined,
|
|
110
|
-
account extends Account | undefined,
|
|
111
|
-
rpcSchema extends RpcSchema | undefined,
|
|
112
|
-
extended extends { [key: string]: unknown },
|
|
113
|
-
client extends Client<transport, chain, account, rpcSchema, extended>,
|
|
114
|
-
parameters,
|
|
115
|
-
returnType,
|
|
116
|
-
>(
|
|
117
|
-
client: client,
|
|
118
|
-
actionFn: (_: any, parameters: parameters) => returnType,
|
|
119
|
-
// cspell:ignore minifiers
|
|
120
|
-
// Some minifiers drop `Function.prototype.name`, or replace it with short letters,
|
|
121
|
-
// meaning that `actionFn.name` will not always work. For that case, the consumer
|
|
122
|
-
// needs to pass the name explicitly.
|
|
123
|
-
name: keyof PublicActions | keyof WalletActions | (string & {}),
|
|
124
|
-
): (parameters: parameters) => returnType {
|
|
125
|
-
const action_implicit = client[actionFn.name];
|
|
126
|
-
if (typeof action_implicit === "function")
|
|
127
|
-
return action_implicit as (params: parameters) => returnType;
|
|
128
|
-
|
|
129
|
-
const action_explicit = client[name];
|
|
130
|
-
if (typeof action_explicit === "function")
|
|
131
|
-
return action_explicit as (params: parameters) => returnType;
|
|
132
|
-
|
|
133
|
-
return (params) => actionFn(client, params);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
type AssertEip712RequestParameters = ExactPartial<
|
|
137
|
-
SendTransactionParameters<typeof zksync>
|
|
138
|
-
>;
|
|
139
|
-
|
|
140
|
-
/** @internal */
|
|
141
|
-
export type AssertEip712RequestErrorType =
|
|
142
|
-
| InvalidEip712TransactionErrorType
|
|
143
|
-
| AssertRequestErrorType;
|
|
144
|
-
|
|
145
|
-
export function assertEip712Request(args: AssertEip712RequestParameters) {
|
|
146
|
-
if (!isEIP712Transaction(args as any))
|
|
147
|
-
throw new InvalidEip712TransactionError();
|
|
148
|
-
assertRequest(args as any);
|
|
149
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { type Account, type Address, type Chain, type Client, createClient, encodeAbiParameters, getAddress, type Prettify, publicActions, type PublicRpcSchema, type RpcSchema, type Transport, type WalletClientConfig, type WalletRpcSchema } from "viem";
|
|
2
|
-
|
|
3
|
-
import { toRecoveryAccount } from "./account.js";
|
|
4
|
-
import { publicActionsRewrite } from "./decorators/publicActionsRewrite.js";
|
|
5
|
-
import { type ZksyncSsoRecoveryActions, zksyncSsoRecoveryActions } from "./decorators/recovery.js";
|
|
6
|
-
import { type ZksyncSsoWalletActions, zksyncSsoWalletActions } from "./decorators/wallet.js";
|
|
7
|
-
|
|
8
|
-
export const signRecoveryTransaction = (recoveryValidatorAddress: `0x${string}`) => {
|
|
9
|
-
return encodeAbiParameters(
|
|
10
|
-
[
|
|
11
|
-
{ type: "bytes", name: "unusedSignedHash" },
|
|
12
|
-
{ type: "address", name: "recoveryContract" },
|
|
13
|
-
{ type: "bytes", name: "validatorData" },
|
|
14
|
-
],
|
|
15
|
-
[
|
|
16
|
-
"0x",
|
|
17
|
-
recoveryValidatorAddress,
|
|
18
|
-
"0x",
|
|
19
|
-
],
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export function createZksyncRecoveryGuardianClient<
|
|
24
|
-
transport extends Transport,
|
|
25
|
-
chain extends Chain,
|
|
26
|
-
rpcSchema extends RpcSchema | undefined = undefined,
|
|
27
|
-
>(_parameters: ZksyncSsoRecoveryClientConfig<transport, chain, rpcSchema>): ZksyncSsoRecoveryClient<transport, chain, rpcSchema> {
|
|
28
|
-
type WalletClientParameters = typeof _parameters;
|
|
29
|
-
const parameters: WalletClientParameters & {
|
|
30
|
-
key: NonNullable<WalletClientParameters["key"]>;
|
|
31
|
-
name: NonNullable<WalletClientParameters["name"]>;
|
|
32
|
-
} = {
|
|
33
|
-
..._parameters,
|
|
34
|
-
address: getAddress(_parameters.address),
|
|
35
|
-
key: _parameters.key || "zksync-sso-recovery-wallet",
|
|
36
|
-
name: _parameters.name || "ZKsync SSO Recovery Client",
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const account = toRecoveryAccount({
|
|
40
|
-
address: parameters.address,
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
|
-
signTransaction: async ({ hash: _ }) => {
|
|
43
|
-
return signRecoveryTransaction(parameters.contracts.recovery);
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
const client = createClient<transport, chain, Account, rpcSchema>({
|
|
47
|
-
...parameters,
|
|
48
|
-
account,
|
|
49
|
-
type: "walletClient",
|
|
50
|
-
})
|
|
51
|
-
.extend(() => ({
|
|
52
|
-
contracts: parameters.contracts,
|
|
53
|
-
}))
|
|
54
|
-
.extend(publicActions)
|
|
55
|
-
.extend(publicActionsRewrite)
|
|
56
|
-
.extend(zksyncSsoWalletActions)
|
|
57
|
-
.extend(zksyncSsoRecoveryActions);
|
|
58
|
-
return client;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export type RecoveryRequiredContracts = {
|
|
62
|
-
recovery: Address; // Recovery
|
|
63
|
-
passkey: Address; // Passkey
|
|
64
|
-
};
|
|
65
|
-
type ZksyncSsoRecoveryData = {
|
|
66
|
-
contracts: RecoveryRequiredContracts;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export type ClientWithZksyncSsoRecoveryData<
|
|
70
|
-
transport extends Transport = Transport,
|
|
71
|
-
chain extends Chain = Chain,
|
|
72
|
-
account extends Account = Account,
|
|
73
|
-
> = Client<transport, chain, account> & ZksyncSsoRecoveryData;
|
|
74
|
-
|
|
75
|
-
export type ZksyncSsoRecoveryClient<
|
|
76
|
-
transport extends Transport = Transport,
|
|
77
|
-
chain extends Chain = Chain,
|
|
78
|
-
rpcSchema extends RpcSchema | undefined = undefined,
|
|
79
|
-
account extends Account = Account,
|
|
80
|
-
> = Prettify<
|
|
81
|
-
Client<
|
|
82
|
-
transport,
|
|
83
|
-
chain,
|
|
84
|
-
account,
|
|
85
|
-
rpcSchema extends RpcSchema
|
|
86
|
-
? [...PublicRpcSchema, ...WalletRpcSchema, ...rpcSchema]
|
|
87
|
-
: [...PublicRpcSchema, ...WalletRpcSchema],
|
|
88
|
-
ZksyncSsoWalletActions<chain, account> & ZksyncSsoRecoveryActions
|
|
89
|
-
> & ZksyncSsoRecoveryData
|
|
90
|
-
>;
|
|
91
|
-
|
|
92
|
-
export interface ZksyncSsoRecoveryClientConfig<
|
|
93
|
-
transport extends Transport = Transport,
|
|
94
|
-
chain extends Chain = Chain,
|
|
95
|
-
rpcSchema extends RpcSchema | undefined = undefined,
|
|
96
|
-
> extends Omit<WalletClientConfig<transport, chain, Account, rpcSchema>, "account"> {
|
|
97
|
-
chain: NonNullable<chain>;
|
|
98
|
-
address: Address;
|
|
99
|
-
contracts: RecoveryRequiredContracts;
|
|
100
|
-
key?: string;
|
|
101
|
-
name?: string;
|
|
102
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type Account, type Chain, type PublicActions, type Transport } from "viem";
|
|
2
|
-
import { estimateContractGas, estimateGas, prepareTransactionRequest } from "viem/actions";
|
|
3
|
-
|
|
4
|
-
import { type ClientWithZksyncSsoRecoveryData, signRecoveryTransaction } from "../client.js";
|
|
5
|
-
|
|
6
|
-
export function publicActionsRewrite<
|
|
7
|
-
transport extends Transport,
|
|
8
|
-
chain extends Chain,
|
|
9
|
-
account extends Account,
|
|
10
|
-
>(
|
|
11
|
-
client: ClientWithZksyncSsoRecoveryData<transport, chain, account>,
|
|
12
|
-
): Pick<PublicActions<transport, chain, account>, "estimateContractGas" | "estimateGas" | "prepareTransactionRequest"> {
|
|
13
|
-
return {
|
|
14
|
-
prepareTransactionRequest: async (args) => {
|
|
15
|
-
if (!("customSignature" in args)) {
|
|
16
|
-
(args as any).customSignature = signRecoveryTransaction(client.contracts.recovery);
|
|
17
|
-
}
|
|
18
|
-
const request = await prepareTransactionRequest(client, {
|
|
19
|
-
...args,
|
|
20
|
-
type: "eip712",
|
|
21
|
-
} as any) as any;
|
|
22
|
-
return request;
|
|
23
|
-
},
|
|
24
|
-
estimateContractGas: (args) => {
|
|
25
|
-
if (!("customSignature" in args)) {
|
|
26
|
-
(args as any).customSignature = signRecoveryTransaction(client.contracts.recovery);
|
|
27
|
-
}
|
|
28
|
-
return estimateContractGas(client, args as any);
|
|
29
|
-
},
|
|
30
|
-
estimateGas: async (args) => {
|
|
31
|
-
if (!("customSignature" in args)) {
|
|
32
|
-
(args as any).customSignature = signRecoveryTransaction(client.contracts.recovery);
|
|
33
|
-
}
|
|
34
|
-
const estimated = await estimateGas(client, args);
|
|
35
|
-
return estimated;
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type Chain, type Transport } from "viem";
|
|
2
|
-
|
|
3
|
-
import { addAccountOwnerPasskey, type AddAccountOwnerPasskeyArgs, type AddAccountOwnerPasskeyReturnType } from "../../passkey/index.js";
|
|
4
|
-
import type { ClientWithZksyncSsoRecoveryData } from "../client.js";
|
|
5
|
-
|
|
6
|
-
export type ZksyncSsoRecoveryActions = {
|
|
7
|
-
addAccountOwnerPasskey: (args: Omit<AddAccountOwnerPasskeyArgs, "contracts">) => Promise<AddAccountOwnerPasskeyReturnType>;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export function zksyncSsoRecoveryActions<
|
|
11
|
-
transport extends Transport,
|
|
12
|
-
chain extends Chain,
|
|
13
|
-
>(client: ClientWithZksyncSsoRecoveryData<transport, chain>): ZksyncSsoRecoveryActions {
|
|
14
|
-
return {
|
|
15
|
-
addAccountOwnerPasskey: async (args: Omit<AddAccountOwnerPasskeyArgs, "contracts">) => {
|
|
16
|
-
return await addAccountOwnerPasskey(client, {
|
|
17
|
-
...args,
|
|
18
|
-
contracts: client.contracts,
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { type Account, bytesToHex, type Chain, formatTransaction, type Transport, type WalletActions } from "viem";
|
|
2
|
-
import { deployContract, getAddresses, getCallsStatus, getCapabilities, getChainId, prepareAuthorization, sendCalls, sendRawTransaction, showCallsStatus, signAuthorization, signMessage, signTypedData, waitForCallsStatus, writeContract } from "viem/actions";
|
|
3
|
-
import { signTransaction, type ZksyncEip712Meta } from "viem/zksync";
|
|
4
|
-
|
|
5
|
-
import { sendEip712Transaction } from "../actions/sendEip712Transaction.js";
|
|
6
|
-
import type { ClientWithZksyncSsoRecoveryData } from "../client.js";
|
|
7
|
-
|
|
8
|
-
export type ZksyncSsoWalletActions<chain extends Chain, account extends Account> = Omit<
|
|
9
|
-
WalletActions<chain, account>, "addChain" | "getPermissions" | "requestAddresses" | "requestPermissions" | "switchChain" | "watchAsset" | "prepareTransactionRequest"
|
|
10
|
-
>;
|
|
11
|
-
|
|
12
|
-
export function zksyncSsoWalletActions<
|
|
13
|
-
transport extends Transport,
|
|
14
|
-
chain extends Chain,
|
|
15
|
-
account extends Account,
|
|
16
|
-
>(client: ClientWithZksyncSsoRecoveryData<transport, chain, account>): ZksyncSsoWalletActions<chain, account> {
|
|
17
|
-
return {
|
|
18
|
-
deployContract: (args) => deployContract(client, args),
|
|
19
|
-
getAddresses: () => getAddresses(client),
|
|
20
|
-
getChainId: () => getChainId(client),
|
|
21
|
-
sendRawTransaction: (args) => sendRawTransaction(client, args),
|
|
22
|
-
sendTransaction: async (args) => {
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
-
const unformattedTx: any = Object.assign({}, args);
|
|
25
|
-
|
|
26
|
-
if ("eip712Meta" in unformattedTx) {
|
|
27
|
-
const eip712Meta = unformattedTx.eip712Meta as ZksyncEip712Meta;
|
|
28
|
-
unformattedTx.gasPerPubdata = eip712Meta.gasPerPubdata ? BigInt(eip712Meta.gasPerPubdata) : undefined;
|
|
29
|
-
unformattedTx.factoryDeps = eip712Meta.factoryDeps;
|
|
30
|
-
unformattedTx.customSignature = eip712Meta.customSignature;
|
|
31
|
-
unformattedTx.paymaster = eip712Meta.paymasterParams?.paymaster;
|
|
32
|
-
unformattedTx.paymasterInput = eip712Meta.paymasterParams?.paymasterInput ? bytesToHex(new Uint8Array(eip712Meta.paymasterParams?.paymasterInput)) : undefined;
|
|
33
|
-
delete unformattedTx.eip712Meta;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const formatters = client.chain?.formatters;
|
|
37
|
-
const format = formatters?.transaction?.format || formatTransaction;
|
|
38
|
-
|
|
39
|
-
const tx = {
|
|
40
|
-
...format(unformattedTx),
|
|
41
|
-
type: "eip712",
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return await sendEip712Transaction(client, tx);
|
|
45
|
-
},
|
|
46
|
-
signMessage: (args) => signMessage(client, args),
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
-
signTransaction: (args) => signTransaction(client, args as any) as any,
|
|
49
|
-
signTypedData: (args) => signTypedData(client, args),
|
|
50
|
-
writeContract: (args) => writeContract(client, args),
|
|
51
|
-
signAuthorization: (args) => signAuthorization(client, args),
|
|
52
|
-
getCallsStatus: (args) => getCallsStatus(client, args),
|
|
53
|
-
getCapabilities: (args) => getCapabilities(client, args),
|
|
54
|
-
prepareAuthorization: (args) => prepareAuthorization(client, args),
|
|
55
|
-
sendCalls: (args) => sendCalls(client, args),
|
|
56
|
-
showCallsStatus: (args) => showCallsStatus(client, args),
|
|
57
|
-
waitForCallsStatus: (args) => waitForCallsStatus(client, args),
|
|
58
|
-
};
|
|
59
|
-
}
|