@rhinestone/sdk 2.0.0-beta.9 → 2.0.0
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/README.md +2 -2
- package/dist/src/accounts/adapter.d.ts +31 -0
- package/dist/src/accounts/adapter.d.ts.map +1 -0
- package/dist/src/accounts/adapters/eoa.d.ts +4 -0
- package/dist/src/accounts/adapters/eoa.d.ts.map +1 -0
- package/dist/src/accounts/adapters/eoa.js +45 -0
- package/dist/src/accounts/adapters/hca.d.ts +5 -0
- package/dist/src/accounts/adapters/hca.d.ts.map +1 -0
- package/dist/src/accounts/adapters/hca.js +118 -0
- package/dist/src/accounts/adapters/kernel.d.ts +9 -0
- package/dist/src/accounts/adapters/kernel.d.ts.map +1 -0
- package/dist/src/accounts/adapters/kernel.js +159 -0
- package/dist/src/accounts/adapters/nexus.d.ts +16 -0
- package/dist/src/accounts/adapters/nexus.d.ts.map +1 -0
- package/dist/src/accounts/adapters/nexus.js +212 -0
- package/dist/src/accounts/adapters/safe.d.ts +6 -0
- package/dist/src/accounts/adapters/safe.d.ts.map +1 -0
- package/dist/src/accounts/adapters/safe.js +194 -0
- package/dist/src/accounts/adapters/shared.d.ts +9 -0
- package/dist/src/accounts/adapters/shared.d.ts.map +1 -0
- package/dist/src/accounts/adapters/shared.js +62 -0
- package/dist/src/accounts/adapters/startale.d.ts +14 -0
- package/dist/src/accounts/adapters/startale.d.ts.map +1 -0
- package/dist/src/accounts/adapters/startale.js +165 -0
- package/dist/src/accounts/construction.d.ts +25 -0
- package/dist/src/accounts/construction.d.ts.map +1 -0
- package/dist/src/accounts/construction.js +34 -0
- package/dist/src/accounts/deployment.d.ts +12 -0
- package/dist/src/accounts/deployment.d.ts.map +1 -0
- package/dist/src/accounts/deployment.js +33 -0
- package/dist/src/accounts/erc7579-calls.d.ts +4 -0
- package/dist/src/accounts/erc7579-calls.d.ts.map +1 -0
- package/dist/src/accounts/erc7579-calls.js +57 -0
- package/dist/src/accounts/error.d.ts +3 -10
- package/dist/src/accounts/error.d.ts.map +1 -1
- package/dist/src/accounts/error.js +5 -11
- package/dist/src/accounts/legacy.d.ts +14 -0
- package/dist/src/accounts/legacy.d.ts.map +1 -0
- package/dist/src/accounts/legacy.js +40 -0
- package/dist/src/accounts/registry.d.ts +4 -0
- package/dist/src/accounts/registry.d.ts.map +1 -0
- package/dist/src/accounts/registry.js +22 -0
- package/dist/src/accounts/types.d.ts +131 -0
- package/dist/src/accounts/types.d.ts.map +1 -0
- package/dist/src/accounts/types.js +1 -0
- package/dist/src/accounts/wallet-account.d.ts +3 -0
- package/dist/src/accounts/wallet-account.d.ts.map +1 -0
- package/dist/src/accounts/wallet-account.js +12 -0
- package/dist/src/actions/deploy.d.ts +4 -0
- package/dist/src/actions/deploy.d.ts.map +1 -0
- package/dist/src/actions/deploy.js +8 -0
- package/dist/src/actions/ecdsa.d.ts +1 -1
- package/dist/src/actions/ecdsa.d.ts.map +1 -1
- package/dist/src/actions/ecdsa.js +8 -8
- package/dist/src/actions/index.d.ts +2 -16
- package/dist/src/actions/index.d.ts.map +1 -1
- package/dist/src/actions/index.js +3 -49
- package/dist/src/actions/mfa.d.ts +1 -1
- package/dist/src/actions/mfa.d.ts.map +1 -1
- package/dist/src/actions/mfa.js +30 -10
- package/dist/src/actions/modules.d.ts +4 -0
- package/dist/src/actions/modules.d.ts.map +1 -0
- package/dist/src/actions/modules.js +22 -0
- package/dist/src/actions/passkeys.d.ts +2 -2
- package/dist/src/actions/passkeys.d.ts.map +1 -1
- package/dist/src/actions/passkeys.js +19 -14
- package/dist/src/actions/runtime.d.ts +12 -0
- package/dist/src/actions/runtime.d.ts.map +1 -0
- package/dist/src/actions/runtime.js +158 -0
- package/dist/src/actions/smart-sessions.d.ts +30 -6
- package/dist/src/actions/smart-sessions.d.ts.map +1 -1
- package/dist/src/actions/smart-sessions.js +69 -18
- package/dist/src/api/account.d.ts +265 -0
- package/dist/src/api/account.d.ts.map +1 -0
- package/dist/src/api/account.js +637 -0
- package/dist/src/api/accounts.d.ts +12 -0
- package/dist/src/api/accounts.d.ts.map +1 -0
- package/dist/src/api/accounts.js +17 -0
- package/dist/src/api/compose-types.d.ts +147 -0
- package/dist/src/api/compose-types.d.ts.map +1 -0
- package/dist/src/api/compose-types.js +1 -0
- package/dist/src/api/compose.d.ts +6 -0
- package/dist/src/api/compose.d.ts.map +1 -0
- package/dist/src/api/compose.js +766 -0
- package/dist/src/api/direct-signing.d.ts +27 -0
- package/dist/src/api/direct-signing.d.ts.map +1 -0
- package/dist/src/api/direct-signing.js +191 -0
- package/dist/src/api/project-mappers.d.ts +7 -0
- package/dist/src/api/project-mappers.d.ts.map +1 -0
- package/dist/src/api/project-mappers.js +23 -0
- package/dist/src/api/queries/app-fees.d.ts +4 -0
- package/dist/src/api/queries/app-fees.d.ts.map +1 -0
- package/dist/src/api/queries/app-fees.js +3 -0
- package/dist/src/api/queries/portfolio.d.ts +9 -0
- package/dist/src/api/queries/portfolio.d.ts.map +1 -0
- package/dist/src/api/queries/portfolio.js +28 -0
- package/dist/src/api/queries/session.d.ts +8 -0
- package/dist/src/api/queries/session.d.ts.map +1 -0
- package/dist/src/api/queries/session.js +15 -0
- package/dist/src/api/sdk.d.ts +80 -0
- package/dist/src/api/sdk.d.ts.map +1 -0
- package/dist/src/api/sdk.js +103 -0
- package/dist/src/api/signer-selection.d.ts +7 -0
- package/dist/src/api/signer-selection.d.ts.map +1 -0
- package/dist/src/api/signer-selection.js +109 -0
- package/dist/src/calls/normalize.d.ts +9 -0
- package/dist/src/calls/normalize.d.ts.map +1 -0
- package/dist/src/calls/normalize.js +17 -0
- package/dist/src/calls/resolve.d.ts +3 -0
- package/dist/src/calls/resolve.d.ts.map +1 -0
- package/dist/src/calls/resolve.js +15 -0
- package/dist/src/calls/types.d.ts +25 -0
- package/dist/src/calls/types.d.ts.map +1 -0
- package/dist/src/calls/types.js +1 -0
- package/dist/src/chains/caip2.d.ts +10 -0
- package/dist/src/chains/caip2.d.ts.map +1 -0
- package/dist/src/chains/caip2.js +85 -0
- package/dist/src/chains/catalog.d.ts +5 -0
- package/dist/src/chains/catalog.d.ts.map +1 -0
- package/dist/src/chains/catalog.js +41 -0
- package/dist/src/chains/errors.d.ts +15 -0
- package/dist/src/chains/errors.d.ts.map +1 -0
- package/dist/src/chains/errors.js +21 -0
- package/dist/src/{orchestrator/destinations.d.ts → chains/non-evm.d.ts} +9 -6
- package/dist/src/chains/non-evm.d.ts.map +1 -0
- package/dist/src/chains/non-evm.js +30 -0
- package/dist/src/chains/tokens.d.ts +4 -0
- package/dist/src/chains/tokens.d.ts.map +1 -0
- package/dist/src/chains/tokens.js +22 -0
- package/dist/src/chains/types.d.ts +25 -0
- package/dist/src/chains/types.d.ts.map +1 -0
- package/dist/src/chains/types.js +1 -0
- package/dist/src/clients/bundler/client.d.ts +10 -0
- package/dist/src/clients/bundler/client.d.ts.map +1 -0
- package/dist/src/clients/bundler/client.js +85 -0
- package/dist/src/clients/bundler/endpoints.d.ts +3 -0
- package/dist/src/clients/bundler/endpoints.d.ts.map +1 -0
- package/dist/src/clients/bundler/endpoints.js +18 -0
- package/dist/src/clients/bundler/port.d.ts +22 -0
- package/dist/src/clients/bundler/port.d.ts.map +1 -0
- package/dist/src/clients/bundler/port.js +1 -0
- package/dist/src/clients/json-rpc.d.ts +20 -0
- package/dist/src/clients/json-rpc.d.ts.map +1 -0
- package/dist/src/clients/json-rpc.js +56 -0
- package/dist/src/clients/orchestrator/auth.d.ts +7 -0
- package/dist/src/clients/orchestrator/auth.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/auth.js +27 -0
- package/dist/src/clients/orchestrator/chain-catalog.d.ts +36 -0
- package/dist/src/clients/orchestrator/chain-catalog.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/chain-catalog.js +67 -0
- package/dist/src/clients/orchestrator/client.d.ts +13 -0
- package/dist/src/clients/orchestrator/client.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/client.js +97 -0
- package/dist/src/clients/orchestrator/errors.d.ts +238 -0
- package/dist/src/clients/orchestrator/errors.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/errors.js +525 -0
- package/dist/src/clients/orchestrator/fetch.d.ts +7 -0
- package/dist/src/clients/orchestrator/fetch.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/fetch.js +37 -0
- package/dist/src/clients/orchestrator/mappers.d.ts +9 -0
- package/dist/src/clients/orchestrator/mappers.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/mappers.js +198 -0
- package/dist/src/clients/orchestrator/port.d.ts +26 -0
- package/dist/src/clients/orchestrator/port.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/port.js +1 -0
- package/dist/src/{orchestrator/types.d.ts → clients/orchestrator/public.d.ts} +102 -40
- package/dist/src/clients/orchestrator/public.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/public.js +14 -0
- package/dist/src/clients/orchestrator/types.d.ts +144 -0
- package/dist/src/clients/orchestrator/types.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/types.js +1 -0
- package/dist/src/clients/orchestrator/wire.d.ts +19 -0
- package/dist/src/clients/orchestrator/wire.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/wire.gen.d.ts +6463 -0
- package/dist/src/clients/orchestrator/wire.gen.d.ts.map +1 -0
- package/dist/src/clients/orchestrator/wire.gen.js +1 -0
- package/dist/src/clients/orchestrator/wire.js +1 -0
- package/dist/src/clients/paymaster/client.d.ts +8 -0
- package/dist/src/clients/paymaster/client.d.ts.map +1 -0
- package/dist/src/clients/paymaster/client.js +38 -0
- package/dist/src/clients/paymaster/endpoints.d.ts +3 -0
- package/dist/src/clients/paymaster/endpoints.d.ts.map +1 -0
- package/dist/src/clients/paymaster/endpoints.js +16 -0
- package/dist/src/clients/paymaster/port.d.ts +17 -0
- package/dist/src/clients/paymaster/port.d.ts.map +1 -0
- package/dist/src/clients/paymaster/port.js +1 -0
- package/dist/src/clients/rpc/client.d.ts +6 -0
- package/dist/src/clients/rpc/client.d.ts.map +1 -0
- package/dist/src/clients/rpc/client.js +66 -0
- package/dist/src/clients/rpc/compatibility.d.ts +12 -0
- package/dist/src/clients/rpc/compatibility.d.ts.map +1 -0
- package/dist/src/clients/rpc/compatibility.js +16 -0
- package/dist/src/clients/rpc/port.d.ts +13 -0
- package/dist/src/clients/rpc/port.d.ts.map +1 -0
- package/dist/src/clients/rpc/port.js +1 -0
- package/dist/src/clients/rpc/providers.d.ts +3 -0
- package/dist/src/clients/rpc/providers.d.ts.map +1 -0
- package/dist/src/clients/rpc/providers.js +8 -0
- package/dist/src/clients/rpc/transport.d.ts +4 -0
- package/dist/src/clients/rpc/transport.d.ts.map +1 -0
- package/dist/src/clients/rpc/transport.js +5 -0
- package/dist/src/clients/rpc/types.d.ts +23 -0
- package/dist/src/clients/rpc/types.d.ts.map +1 -0
- package/dist/src/clients/rpc/types.js +1 -0
- package/dist/src/config/account-runtime.d.ts +7 -0
- package/dist/src/config/account-runtime.d.ts.map +1 -0
- package/dist/src/config/account-runtime.js +36 -0
- package/dist/src/config/account.d.ts +743 -0
- package/dist/src/config/account.d.ts.map +1 -0
- package/dist/src/config/account.js +10 -0
- package/dist/src/config/defaults.d.ts +14 -0
- package/dist/src/config/defaults.d.ts.map +1 -0
- package/dist/src/config/defaults.js +26 -0
- package/dist/src/config/input.d.ts +54 -0
- package/dist/src/config/input.d.ts.map +1 -0
- package/dist/src/config/input.js +1 -0
- package/dist/src/config/legacy.d.ts +22 -0
- package/dist/src/config/legacy.d.ts.map +1 -0
- package/dist/src/config/legacy.js +23 -0
- package/dist/src/config/resolve.d.ts +13 -0
- package/dist/src/config/resolve.d.ts.map +1 -0
- package/dist/src/config/resolve.js +174 -0
- package/dist/src/config/resolved.d.ts +77 -0
- package/dist/src/config/resolved.d.ts.map +1 -0
- package/dist/src/config/resolved.js +1 -0
- package/dist/src/config/validate.d.ts +3 -0
- package/dist/src/config/validate.d.ts.map +1 -0
- package/dist/src/config/validate.js +6 -0
- package/dist/src/{execution/error.d.ts → errors/execution.d.ts} +43 -12
- package/dist/src/errors/execution.d.ts.map +1 -0
- package/dist/src/errors/execution.js +123 -0
- package/dist/src/errors/index.d.ts +6 -4
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +7 -6
- package/dist/src/index.d.ts +14 -84
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -293
- package/dist/src/jwt-server/jcs.d.ts +1 -1
- package/dist/src/jwt-server/jcs.js +4 -2
- package/dist/src/modules/erc7579-abi.d.ts +4 -0
- package/dist/src/modules/erc7579-abi.d.ts.map +1 -0
- package/dist/src/modules/erc7579-abi.js +12 -0
- package/dist/src/modules/intent-executor.d.ts +6 -0
- package/dist/src/modules/intent-executor.d.ts.map +1 -0
- package/dist/src/modules/intent-executor.js +13 -0
- package/dist/src/modules/legacy-core.d.ts +29 -0
- package/dist/src/modules/legacy-core.d.ts.map +1 -0
- package/dist/src/modules/legacy-core.js +80 -0
- package/dist/src/modules/normalize.d.ts +4 -0
- package/dist/src/modules/normalize.d.ts.map +1 -0
- package/dist/src/modules/normalize.js +15 -0
- package/dist/src/modules/plan.d.ts +16 -0
- package/dist/src/modules/plan.d.ts.map +1 -0
- package/dist/src/modules/plan.js +51 -0
- package/dist/src/modules/read-core.d.ts +39 -0
- package/dist/src/modules/read-core.d.ts.map +1 -0
- package/dist/src/modules/read-core.js +149 -0
- package/dist/src/modules/types.d.ts +46 -0
- package/dist/src/modules/types.d.ts.map +1 -0
- package/dist/src/modules/types.js +1 -0
- package/dist/src/modules/validators/capabilities.d.ts +4 -0
- package/dist/src/modules/validators/capabilities.d.ts.map +1 -0
- package/dist/src/modules/validators/capabilities.js +58 -0
- package/dist/src/modules/validators/contribution.d.ts +4 -0
- package/dist/src/modules/validators/contribution.d.ts.map +1 -0
- package/dist/src/modules/validators/contribution.js +64 -0
- package/dist/src/modules/validators/definition.d.ts +3 -0
- package/dist/src/modules/validators/definition.d.ts.map +1 -0
- package/dist/src/modules/validators/definition.js +68 -0
- package/dist/src/modules/validators/ens.d.ts +5 -0
- package/dist/src/modules/validators/ens.d.ts.map +1 -0
- package/dist/src/modules/validators/ens.js +34 -0
- package/dist/src/modules/validators/k1.d.ts +2 -0
- package/dist/src/modules/validators/k1.d.ts.map +1 -0
- package/dist/src/modules/validators/k1.js +1 -0
- package/dist/src/modules/validators/multi-factor.d.ts +18 -0
- package/dist/src/modules/validators/multi-factor.d.ts.map +1 -0
- package/dist/src/modules/validators/multi-factor.js +79 -0
- package/dist/src/modules/validators/ownable.d.ts +26 -0
- package/dist/src/modules/validators/ownable.d.ts.map +1 -0
- package/dist/src/modules/validators/ownable.js +84 -0
- package/dist/src/modules/validators/permissions.d.ts +2 -1
- package/dist/src/modules/validators/permissions.d.ts.map +1 -1
- package/dist/src/modules/validators/permissions.js +192 -18
- package/dist/src/modules/validators/policies/claim/arbiters.d.ts +19 -0
- package/dist/src/modules/validators/policies/claim/arbiters.d.ts.map +1 -0
- package/dist/src/modules/validators/policies/claim/arbiters.js +82 -0
- package/dist/src/modules/validators/resolve.d.ts +5 -0
- package/dist/src/modules/validators/resolve.d.ts.map +1 -0
- package/dist/src/modules/validators/resolve.js +22 -0
- package/dist/src/modules/validators/signer-id.d.ts +5 -0
- package/dist/src/modules/validators/signer-id.d.ts.map +1 -0
- package/dist/src/modules/validators/signer-id.js +8 -0
- package/dist/src/modules/validators/smart-session-signature-types.d.ts +35 -0
- package/dist/src/modules/validators/smart-session-signature-types.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-session-signature-types.js +1 -0
- package/dist/src/modules/validators/smart-sessions/authorization.d.ts +99 -0
- package/dist/src/modules/validators/smart-sessions/authorization.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/authorization.js +101 -0
- package/dist/src/modules/validators/smart-sessions/calls.d.ts +19 -0
- package/dist/src/modules/validators/smart-sessions/calls.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/calls.js +85 -0
- package/dist/src/modules/validators/smart-sessions/cross-chain-permits.d.ts +4 -0
- package/dist/src/modules/validators/smart-sessions/cross-chain-permits.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/cross-chain-permits.js +77 -0
- package/dist/src/modules/validators/smart-sessions/digest.d.ts +5 -0
- package/dist/src/modules/validators/smart-sessions/digest.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/digest.js +30 -0
- package/dist/src/modules/validators/smart-sessions/mock-signature.d.ts +10 -0
- package/dist/src/modules/validators/smart-sessions/mock-signature.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/mock-signature.js +31 -0
- package/dist/src/modules/validators/smart-sessions/module.d.ts +11 -0
- package/dist/src/modules/validators/smart-sessions/module.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/module.js +18 -0
- package/dist/src/modules/validators/smart-sessions/policies/addresses.d.ts +23 -0
- package/dist/src/modules/validators/smart-sessions/policies/addresses.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/policies/addresses.js +29 -0
- package/dist/src/modules/validators/smart-sessions/policies/claim.d.ts +10 -0
- package/dist/src/modules/validators/smart-sessions/policies/claim.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/policies/claim.js +106 -0
- package/dist/src/modules/validators/smart-sessions/policies/encode.d.ts +4 -0
- package/dist/src/modules/validators/smart-sessions/policies/encode.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/policies/encode.js +197 -0
- package/dist/src/modules/validators/smart-sessions/resolve.d.ts +16 -0
- package/dist/src/modules/validators/smart-sessions/resolve.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/resolve.js +120 -0
- package/dist/src/modules/validators/smart-sessions/signature.d.ts +14 -0
- package/dist/src/modules/validators/smart-sessions/signature.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/signature.js +167 -0
- package/dist/src/modules/validators/smart-sessions/state.d.ts +19 -0
- package/dist/src/modules/validators/smart-sessions/state.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/state.js +42 -0
- package/dist/src/modules/validators/smart-sessions/types.d.ts +227 -0
- package/dist/src/modules/validators/smart-sessions/types.d.ts.map +1 -0
- package/dist/src/modules/validators/smart-sessions/types.js +1 -0
- package/dist/src/modules/validators/types.d.ts +143 -0
- package/dist/src/modules/validators/types.d.ts.map +1 -0
- package/dist/src/modules/validators/types.js +1 -0
- package/dist/src/modules/validators/webauthn.d.ts +54 -0
- package/dist/src/modules/validators/webauthn.d.ts.map +1 -0
- package/dist/src/modules/validators/webauthn.js +159 -0
- package/dist/src/signing/context.d.ts +25 -0
- package/dist/src/signing/context.d.ts.map +1 -0
- package/dist/src/signing/context.js +163 -0
- package/dist/src/signing/contribution.d.ts +13 -0
- package/dist/src/signing/contribution.d.ts.map +1 -0
- package/dist/src/signing/contribution.js +83 -0
- package/dist/src/signing/eip7702.d.ts +41 -0
- package/dist/src/signing/eip7702.d.ts.map +1 -0
- package/dist/src/signing/eip7702.js +215 -0
- package/dist/src/signing/error.d.ts +27 -0
- package/dist/src/signing/error.d.ts.map +1 -0
- package/dist/src/signing/error.js +25 -0
- package/dist/src/signing/execute.d.ts +17 -0
- package/dist/src/signing/execute.d.ts.map +1 -0
- package/dist/src/signing/execute.js +138 -0
- package/dist/src/signing/intent-plans/assemble.d.ts +15 -0
- package/dist/src/signing/intent-plans/assemble.d.ts.map +1 -0
- package/dist/src/signing/intent-plans/assemble.js +96 -0
- package/dist/src/signing/intent-plans/independent.d.ts +48 -0
- package/dist/src/signing/intent-plans/independent.d.ts.map +1 -0
- package/dist/src/signing/intent-plans/independent.js +150 -0
- package/dist/src/signing/intent-plans/plan.d.ts +14 -0
- package/dist/src/signing/intent-plans/plan.d.ts.map +1 -0
- package/dist/src/signing/intent-plans/plan.js +187 -0
- package/dist/src/signing/intent-plans/types.d.ts +63 -0
- package/dist/src/signing/intent-plans/types.d.ts.map +1 -0
- package/dist/src/signing/intent-plans/types.js +1 -0
- package/dist/src/signing/message.d.ts +28 -0
- package/dist/src/signing/message.d.ts.map +1 -0
- package/dist/src/signing/message.js +90 -0
- package/dist/src/signing/passkeys.d.ts +28 -0
- package/dist/src/signing/passkeys.d.ts.map +1 -0
- package/dist/src/signing/passkeys.js +17 -0
- package/dist/src/signing/plan.d.ts +35 -0
- package/dist/src/signing/plan.d.ts.map +1 -0
- package/dist/src/signing/plan.js +377 -0
- package/dist/src/signing/protocols/erc6492.d.ts +11 -0
- package/dist/src/signing/protocols/erc6492.d.ts.map +1 -0
- package/dist/src/signing/protocols/erc6492.js +24 -0
- package/dist/src/signing/protocols/erc7739.d.ts +17 -0
- package/dist/src/signing/protocols/erc7739.d.ts.map +1 -0
- package/dist/src/signing/protocols/erc7739.js +84 -0
- package/dist/src/signing/session-enable.d.ts +35 -0
- package/dist/src/signing/session-enable.d.ts.map +1 -0
- package/dist/src/signing/session-enable.js +62 -0
- package/dist/src/signing/signers/compatibility.d.ts +4 -0
- package/dist/src/signing/signers/compatibility.d.ts.map +1 -0
- package/dist/src/signing/signers/compatibility.js +51 -0
- package/dist/src/signing/signers/ecdsa.d.ts +14 -0
- package/dist/src/signing/signers/ecdsa.d.ts.map +1 -0
- package/dist/src/signing/signers/ecdsa.js +54 -0
- package/dist/src/signing/signers/registry.d.ts +7 -0
- package/dist/src/signing/signers/registry.d.ts.map +1 -0
- package/dist/src/signing/signers/registry.js +33 -0
- package/dist/src/signing/signers/types.d.ts +16 -0
- package/dist/src/signing/signers/types.d.ts.map +1 -0
- package/dist/src/signing/signers/types.js +1 -0
- package/dist/src/signing/signers/wallet-chain.d.ts +9 -0
- package/dist/src/signing/signers/wallet-chain.d.ts.map +1 -0
- package/dist/src/signing/signers/wallet-chain.js +15 -0
- package/dist/src/signing/signers/webauthn.d.ts +11 -0
- package/dist/src/signing/signers/webauthn.d.ts.map +1 -0
- package/dist/src/signing/signers/webauthn.js +14 -0
- package/dist/src/signing/typed-data.d.ts +39 -0
- package/dist/src/signing/typed-data.d.ts.map +1 -0
- package/dist/src/signing/typed-data.js +135 -0
- package/dist/src/signing/types.d.ts +346 -0
- package/dist/src/signing/types.d.ts.map +1 -0
- package/dist/src/signing/types.js +1 -0
- package/dist/src/signing/user-operation.d.ts +23 -0
- package/dist/src/signing/user-operation.d.ts.map +1 -0
- package/dist/src/signing/user-operation.js +61 -0
- package/dist/src/smart-sessions/index.d.ts +16 -0
- package/dist/src/smart-sessions/index.d.ts.map +1 -0
- package/dist/src/smart-sessions/index.js +45 -0
- package/dist/src/transactions/intents/account.d.ts +15 -0
- package/dist/src/transactions/intents/account.d.ts.map +1 -0
- package/dist/src/transactions/intents/account.js +48 -0
- package/dist/src/transactions/intents/compatibility.d.ts +4 -0
- package/dist/src/transactions/intents/compatibility.d.ts.map +1 -0
- package/dist/src/transactions/intents/compatibility.js +19 -0
- package/dist/src/transactions/intents/normalize.d.ts +5 -0
- package/dist/src/transactions/intents/normalize.d.ts.map +1 -0
- package/dist/src/transactions/intents/normalize.js +48 -0
- package/dist/src/transactions/intents/prepare.d.ts +7 -0
- package/dist/src/transactions/intents/prepare.d.ts.map +1 -0
- package/dist/src/transactions/intents/prepare.js +249 -0
- package/dist/src/transactions/intents/quotes.d.ts +3 -0
- package/dist/src/transactions/intents/quotes.d.ts.map +1 -0
- package/dist/src/transactions/intents/quotes.js +11 -0
- package/dist/src/transactions/intents/request.d.ts +11 -0
- package/dist/src/transactions/intents/request.d.ts.map +1 -0
- package/dist/src/transactions/intents/request.js +55 -0
- package/dist/src/transactions/intents/send.d.ts +3 -0
- package/dist/src/transactions/intents/send.d.ts.map +1 -0
- package/dist/src/transactions/intents/send.js +22 -0
- package/dist/src/transactions/intents/session-signing.d.ts +7 -0
- package/dist/src/transactions/intents/session-signing.d.ts.map +1 -0
- package/dist/src/transactions/intents/session-signing.js +363 -0
- package/dist/src/transactions/intents/sessions.d.ts +17 -0
- package/dist/src/transactions/intents/sessions.d.ts.map +1 -0
- package/dist/src/transactions/intents/sessions.js +85 -0
- package/dist/src/transactions/intents/sign-transaction.d.ts +10 -0
- package/dist/src/transactions/intents/sign-transaction.d.ts.map +1 -0
- package/dist/src/transactions/intents/sign-transaction.js +386 -0
- package/dist/src/transactions/intents/split.d.ts +13 -0
- package/dist/src/transactions/intents/split.d.ts.map +1 -0
- package/dist/src/transactions/intents/split.js +3 -0
- package/dist/src/transactions/intents/status-policy.d.ts +13 -0
- package/dist/src/transactions/intents/status-policy.d.ts.map +1 -0
- package/dist/src/transactions/intents/status-policy.js +39 -0
- package/dist/src/transactions/intents/status.d.ts +4 -0
- package/dist/src/transactions/intents/status.d.ts.map +1 -0
- package/dist/src/transactions/intents/status.js +50 -0
- package/dist/src/transactions/intents/submit.d.ts +3 -0
- package/dist/src/transactions/intents/submit.d.ts.map +1 -0
- package/dist/src/transactions/intents/submit.js +32 -0
- package/dist/src/transactions/intents/types.d.ts +136 -0
- package/dist/src/transactions/intents/types.d.ts.map +1 -0
- package/dist/src/transactions/intents/types.js +1 -0
- package/dist/src/transactions/user-operations/hash.d.ts +5 -0
- package/dist/src/transactions/user-operations/hash.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/hash.js +9 -0
- package/dist/src/transactions/user-operations/nonce.d.ts +18 -0
- package/dist/src/transactions/user-operations/nonce.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/nonce.js +43 -0
- package/dist/src/transactions/user-operations/prepare.d.ts +12 -0
- package/dist/src/transactions/user-operations/prepare.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/prepare.js +136 -0
- package/dist/src/transactions/user-operations/reconstruct.d.ts +28 -0
- package/dist/src/transactions/user-operations/reconstruct.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/reconstruct.js +52 -0
- package/dist/src/transactions/user-operations/send.d.ts +3 -0
- package/dist/src/transactions/user-operations/send.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/send.js +8 -0
- package/dist/src/transactions/user-operations/sign.d.ts +3 -0
- package/dist/src/transactions/user-operations/sign.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/sign.js +14 -0
- package/dist/src/transactions/user-operations/status.d.ts +4 -0
- package/dist/src/transactions/user-operations/status.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/status.js +37 -0
- package/dist/src/transactions/user-operations/submit.d.ts +3 -0
- package/dist/src/transactions/user-operations/submit.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/submit.js +8 -0
- package/dist/src/transactions/user-operations/types.d.ts +68 -0
- package/dist/src/transactions/user-operations/types.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/types.js +1 -0
- package/dist/src/transactions/user-operations/validator-account.d.ts +5 -0
- package/dist/src/transactions/user-operations/validator-account.d.ts.map +1 -0
- package/dist/src/transactions/user-operations/validator-account.js +26 -0
- package/dist/src/utils/index.d.ts +68 -4
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +113 -51
- package/package.json +6 -11
- package/dist/src/accounts/index.d.ts +0 -51
- package/dist/src/accounts/index.d.ts.map +0 -1
- package/dist/src/accounts/index.js +0 -589
- package/dist/src/accounts/json-rpc/index.d.ts +0 -5
- package/dist/src/accounts/json-rpc/index.d.ts.map +0 -1
- package/dist/src/accounts/json-rpc/index.js +0 -19
- package/dist/src/accounts/json-rpc/providers.d.ts +0 -5
- package/dist/src/accounts/json-rpc/providers.d.ts.map +0 -1
- package/dist/src/accounts/json-rpc/providers.js +0 -16
- package/dist/src/accounts/kernel.d.ts +0 -27
- package/dist/src/accounts/kernel.d.ts.map +0 -1
- package/dist/src/accounts/kernel.js +0 -272
- package/dist/src/accounts/nexus.d.ts +0 -33
- package/dist/src/accounts/nexus.d.ts.map +0 -1
- package/dist/src/accounts/nexus.js +0 -444
- package/dist/src/accounts/safe.d.ts +0 -33
- package/dist/src/accounts/safe.d.ts.map +0 -1
- package/dist/src/accounts/safe.js +0 -343
- package/dist/src/accounts/signing/common.d.ts +0 -32
- package/dist/src/accounts/signing/common.d.ts.map +0 -1
- package/dist/src/accounts/signing/common.js +0 -184
- package/dist/src/accounts/signing/message.d.ts +0 -7
- package/dist/src/accounts/signing/message.d.ts.map +0 -1
- package/dist/src/accounts/signing/message.js +0 -45
- package/dist/src/accounts/signing/passkeys.d.ts +0 -36
- package/dist/src/accounts/signing/passkeys.d.ts.map +0 -1
- package/dist/src/accounts/signing/passkeys.js +0 -119
- package/dist/src/accounts/signing/typedData.d.ts +0 -5
- package/dist/src/accounts/signing/typedData.d.ts.map +0 -1
- package/dist/src/accounts/signing/typedData.js +0 -33
- package/dist/src/accounts/startale.d.ts +0 -26
- package/dist/src/accounts/startale.d.ts.map +0 -1
- package/dist/src/accounts/startale.js +0 -191
- package/dist/src/accounts/utils.d.ts +0 -33
- package/dist/src/accounts/utils.d.ts.map +0 -1
- package/dist/src/accounts/utils.js +0 -202
- package/dist/src/actions/recovery.d.ts +0 -33
- package/dist/src/actions/recovery.d.ts.map +0 -1
- package/dist/src/actions/recovery.js +0 -189
- package/dist/src/auth/provider.d.ts +0 -7
- package/dist/src/auth/provider.d.ts.map +0 -1
- package/dist/src/auth/provider.js +0 -38
- package/dist/src/execution/compact.d.ts +0 -5
- package/dist/src/execution/compact.d.ts.map +0 -1
- package/dist/src/execution/compact.js +0 -4
- package/dist/src/execution/error.d.ts.map +0 -1
- package/dist/src/execution/error.js +0 -85
- package/dist/src/execution/index.d.ts +0 -42
- package/dist/src/execution/index.d.ts.map +0 -1
- package/dist/src/execution/index.js +0 -202
- package/dist/src/execution/utils.d.ts +0 -127
- package/dist/src/execution/utils.d.ts.map +0 -1
- package/dist/src/execution/utils.js +0 -1116
- package/dist/src/modules/abi/smart-sessions.d.ts +0 -104
- package/dist/src/modules/abi/smart-sessions.d.ts.map +0 -1
- package/dist/src/modules/abi/smart-sessions.js +0 -128
- package/dist/src/modules/chain-abstraction.d.ts +0 -5
- package/dist/src/modules/chain-abstraction.d.ts.map +0 -1
- package/dist/src/modules/chain-abstraction.js +0 -3
- package/dist/src/modules/common.d.ts +0 -30
- package/dist/src/modules/common.d.ts.map +0 -1
- package/dist/src/modules/common.js +0 -30
- package/dist/src/modules/index.d.ts +0 -11
- package/dist/src/modules/index.d.ts.map +0 -1
- package/dist/src/modules/index.js +0 -90
- package/dist/src/modules/legacy.d.ts +0 -10
- package/dist/src/modules/legacy.d.ts.map +0 -1
- package/dist/src/modules/legacy.js +0 -62
- package/dist/src/modules/read.d.ts +0 -10
- package/dist/src/modules/read.d.ts.map +0 -1
- package/dist/src/modules/read.js +0 -171
- package/dist/src/modules/validators/core.d.ts +0 -31
- package/dist/src/modules/validators/core.d.ts.map +0 -1
- package/dist/src/modules/validators/core.js +0 -266
- package/dist/src/modules/validators/index.d.ts +0 -4
- package/dist/src/modules/validators/index.d.ts.map +0 -1
- package/dist/src/modules/validators/index.js +0 -3
- package/dist/src/modules/validators/smart-sessions.d.ts +0 -196
- package/dist/src/modules/validators/smart-sessions.d.ts.map +0 -1
- package/dist/src/modules/validators/smart-sessions.js +0 -772
- package/dist/src/orchestrator/caip2.d.ts +0 -13
- package/dist/src/orchestrator/caip2.d.ts.map +0 -1
- package/dist/src/orchestrator/caip2.js +0 -52
- package/dist/src/orchestrator/client.d.ts +0 -29
- package/dist/src/orchestrator/client.d.ts.map +0 -1
- package/dist/src/orchestrator/client.js +0 -293
- package/dist/src/orchestrator/consts.d.ts +0 -6
- package/dist/src/orchestrator/consts.d.ts.map +0 -1
- package/dist/src/orchestrator/consts.js +0 -5
- package/dist/src/orchestrator/destinations.d.ts.map +0 -1
- package/dist/src/orchestrator/destinations.js +0 -36
- package/dist/src/orchestrator/error.d.ts +0 -97
- package/dist/src/orchestrator/error.d.ts.map +0 -1
- package/dist/src/orchestrator/error.js +0 -173
- package/dist/src/orchestrator/index.d.ts +0 -12
- package/dist/src/orchestrator/index.d.ts.map +0 -1
- package/dist/src/orchestrator/index.js +0 -10
- package/dist/src/orchestrator/registry.d.ts +0 -17
- package/dist/src/orchestrator/registry.d.ts.map +0 -1
- package/dist/src/orchestrator/registry.js +0 -100
- package/dist/src/orchestrator/types.d.ts.map +0 -1
- package/dist/src/orchestrator/types.js +0 -15
- package/dist/src/orchestrator/utils.d.ts +0 -3
- package/dist/src/orchestrator/utils.d.ts.map +0 -1
- package/dist/src/orchestrator/utils.js +0 -22
- package/dist/src/types.d.ts +0 -466
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/utils/walletClient.d.ts +0 -34
- package/dist/src/utils/walletClient.d.ts.map +0 -1
- package/dist/src/utils/walletClient.js +0 -117
- /package/dist/src/{types.js → accounts/adapter.js} +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
class ExecutionError extends Error {
|
|
2
|
+
_message;
|
|
3
|
+
_context;
|
|
4
|
+
_errorType;
|
|
5
|
+
_traceId;
|
|
6
|
+
constructor(params) {
|
|
7
|
+
super();
|
|
8
|
+
this._message = params?.message || 'ExecutionError';
|
|
9
|
+
this._context = params?.context || {};
|
|
10
|
+
this._errorType = params?.errorType || 'Unknown';
|
|
11
|
+
this._traceId = params?.traceId || '';
|
|
12
|
+
}
|
|
13
|
+
get message() {
|
|
14
|
+
return this._message;
|
|
15
|
+
}
|
|
16
|
+
get context() {
|
|
17
|
+
return this._context;
|
|
18
|
+
}
|
|
19
|
+
get errorType() {
|
|
20
|
+
return this._errorType;
|
|
21
|
+
}
|
|
22
|
+
get traceId() {
|
|
23
|
+
return this._traceId;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
class OrderPathRequiredForIntentsError extends ExecutionError {
|
|
27
|
+
constructor(params) {
|
|
28
|
+
super({
|
|
29
|
+
message: 'Order path is required when using intents',
|
|
30
|
+
...params,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class IntentFailedError extends ExecutionError {
|
|
35
|
+
constructor(params) {
|
|
36
|
+
super({
|
|
37
|
+
message: 'Intent failed',
|
|
38
|
+
...params,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class QuoteNotInPreparedTransactionError extends ExecutionError {
|
|
43
|
+
constructor(params) {
|
|
44
|
+
super({
|
|
45
|
+
message: 'Selected quote does not belong to the prepared transaction. Re-prepare and try again.',
|
|
46
|
+
...params,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
class InvalidSourceCallsError extends ExecutionError {
|
|
51
|
+
constructor(params) {
|
|
52
|
+
super({
|
|
53
|
+
message: params?.chainId !== undefined
|
|
54
|
+
? `sourceCalls includes chainId ${params.chainId} which is not in sourceChains (or the target chain for same-chain transactions)`
|
|
55
|
+
: 'sourceCalls includes a chainId not in sourceChains (or the target chain for same-chain transactions)',
|
|
56
|
+
...params,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
class Eip7702InitSignatureRequiredError extends ExecutionError {
|
|
61
|
+
constructor(params) {
|
|
62
|
+
super({
|
|
63
|
+
message: 'EIP-7702 initialization signature is required for 7702 accounts. This signature is needed during transaction preparation, even if your account is already deployed on all chains. Use `getEip7702InitSignature()` to generate it.',
|
|
64
|
+
...params,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
class UnknownOwnerError extends ExecutionError {
|
|
69
|
+
constructor(params) {
|
|
70
|
+
super({
|
|
71
|
+
message: 'The provided owner is not part of the account owner set. Pass an account that matches one of the configured `owners` (for multi-factor owner sets, also pass the matching `validatorId`).',
|
|
72
|
+
...params,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class MismatchedOwnerSignaturesError extends ExecutionError {
|
|
77
|
+
constructor(params) {
|
|
78
|
+
super({
|
|
79
|
+
message: params?.message ??
|
|
80
|
+
'Owner signatures are inconsistent and cannot be assembled. All owners must sign the same prepared transaction and quote using `signTransaction` with the `owner` option.',
|
|
81
|
+
...params,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
class InsufficientOwnerSignaturesError extends ExecutionError {
|
|
86
|
+
constructor(params) {
|
|
87
|
+
super({
|
|
88
|
+
message: params?.required !== undefined
|
|
89
|
+
? params?.validatorId !== undefined
|
|
90
|
+
? `Not enough owner signatures to meet the threshold of validator ${params.validatorId}: ${params.provided ?? 0} of ${params.required} required. Collect the missing owner signatures before calling \`assembleTransaction\`.`
|
|
91
|
+
: `Not enough owner signatures to meet the account threshold: ${params.provided ?? 0} of ${params.required} required. Collect the missing owner signatures before calling \`assembleTransaction\`.`
|
|
92
|
+
: 'Not enough owner signatures to meet the account threshold. Collect the missing owner signatures before calling `assembleTransaction`.',
|
|
93
|
+
context: {
|
|
94
|
+
required: params?.required,
|
|
95
|
+
provided: params?.provided,
|
|
96
|
+
validatorId: params?.validatorId,
|
|
97
|
+
...params?.context,
|
|
98
|
+
},
|
|
99
|
+
errorType: params?.errorType,
|
|
100
|
+
traceId: params?.traceId,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
class InvalidOwnerSigningOptionsError extends ExecutionError {
|
|
105
|
+
constructor(params) {
|
|
106
|
+
super({
|
|
107
|
+
message: 'Invalid per-owner signing options. Pass `validatorId` only for multi-factor accounts, where it must identify the factor containing `owner`.',
|
|
108
|
+
...params,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
class IndependentSigningNotSupportedError extends ExecutionError {
|
|
113
|
+
constructor(params) {
|
|
114
|
+
super({
|
|
115
|
+
message: 'Independent owner signing is only supported for smart accounts using ECDSA, passkey, or multi-factor owners. EOA accounts, smart sessions, and K1/ERC-7739 validators must use the standard `signTransaction` flow.',
|
|
116
|
+
...params,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function isExecutionError(error) {
|
|
121
|
+
return error instanceof ExecutionError;
|
|
122
|
+
}
|
|
123
|
+
export { isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { AccountConfigurationNotSupportedError, AccountError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError,
|
|
2
|
-
import {
|
|
3
|
-
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isValidationError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError,
|
|
4
|
-
|
|
1
|
+
import { AccountConfigurationNotSupportedError, AccountError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError } from '../accounts/error.js';
|
|
2
|
+
import { UnsupportedChainError, UnsupportedTokenError } from '../chains/errors.js';
|
|
3
|
+
import { ConflictError, type ErrorDetail, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, isAuthError, isInsufficientSponsorBalance, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isSponsorError, isSponsorLimitExceeded, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, SponsorLimitExceededError, type SponsorLimitKey, UnauthorizedError, UnprocessableContentError, ValidationError } from '../clients/orchestrator/errors.js';
|
|
4
|
+
import { Eip7702InitSignatureRequiredError, ExecutionError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, isExecutionError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError } from './execution.js';
|
|
5
|
+
export type { ErrorDetail, SponsorLimitKey };
|
|
6
|
+
export { isAccountError, AccountError, AccountConfigurationNotSupportedError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError, isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError, UnsupportedChainError, UnsupportedTokenError, };
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,YAAY,EACZ,uCAAuC,EACvC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,cAAc,EACd,mCAAmC,EACnC,wBAAwB,EACxB,kCAAkC,EAClC,mCAAmC,EACpC,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EACL,aAAa,EACb,KAAK,WAAW,EAChB,2BAA2B,EAC3B,cAAc,EACd,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,WAAW,EACX,4BAA4B,EAC5B,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,eAAe,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EAChB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,mCAAmC,EACnC,gCAAgC,EAChC,iBAAiB,EACjB,+BAA+B,EAC/B,uBAAuB,EACvB,gBAAgB,EAChB,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,EAClB,MAAM,aAAa,CAAA;AAEpB,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,CAAA;AAE5C,OAAO,EAEL,cAAc,EACd,YAAY,EACZ,qCAAqC,EACrC,uCAAuC,EACvC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,4BAA4B,EAC5B,mCAAmC,EACnC,wBAAwB,EACxB,kCAAkC,EAClC,mCAAmC,EAEnC,gBAAgB,EAChB,cAAc,EACd,iCAAiC,EACjC,mCAAmC,EACnC,gCAAgC,EAChC,iBAAiB,EACjB,+BAA+B,EAC/B,uBAAuB,EACvB,8BAA8B,EAC9B,gCAAgC,EAChC,kCAAkC,EAClC,iBAAiB,EAEjB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,cAAc,EACd,aAAa,EACb,2BAA2B,EAC3B,cAAc,EACd,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,EAEf,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
|
package/dist/src/errors/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { AccountConfigurationNotSupportedError, AccountError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError,
|
|
2
|
-
import {
|
|
3
|
-
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isValidationError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError,
|
|
1
|
+
import { AccountConfigurationNotSupportedError, AccountError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, isAccountError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError, } from '../accounts/error.js';
|
|
2
|
+
import { UnsupportedChainError, UnsupportedTokenError } from '../chains/errors.js';
|
|
3
|
+
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, isAuthError, isInsufficientSponsorBalance, isOrchestratorError, isRateLimited, isRetryable, isSimulationFailed, isSponsorError, isSponsorLimitExceeded, isValidationError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, SimulationFailedError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError, } from '../clients/orchestrator/errors.js';
|
|
4
|
+
import { Eip7702InitSignatureRequiredError, ExecutionError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, isExecutionError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError, } from './execution.js';
|
|
4
5
|
export {
|
|
5
6
|
// Account
|
|
6
|
-
isAccountError, AccountError, AccountConfigurationNotSupportedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, EoaAccountMustHaveAccountError,
|
|
7
|
+
isAccountError, AccountError, AccountConfigurationNotSupportedError, DefaultValidatorAlreadyInitializedError, Eip712DomainNotAvailableError, Eip7702AccountMustHaveEoaError, Eip7702NotSupportedForAccountError, EoaAccountMustHaveAccountError, EoaSigningMethodNotConfiguredError, EoaSigningNotSupportedError, FactoryArgsNotAvailableError, ModuleInstallationNotSupportedError, OwnersFieldRequiredError, SigningNotSupportedForAccountError, WalletClientNoConnectedAccountError,
|
|
7
8
|
// Execution
|
|
8
|
-
isExecutionError, ExecutionError, IntentFailedError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError,
|
|
9
|
+
isExecutionError, ExecutionError, Eip7702InitSignatureRequiredError, IndependentSigningNotSupportedError, InsufficientOwnerSignaturesError, IntentFailedError, InvalidOwnerSigningOptionsError, InvalidSourceCallsError, MismatchedOwnerSignaturesError, OrderPathRequiredForIntentsError, QuoteNotInPreparedTransactionError, UnknownOwnerError,
|
|
9
10
|
// Orchestrator
|
|
10
|
-
isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, ValidationError,
|
|
11
|
+
isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isSimulationFailed, isSponsorLimitExceeded, isInsufficientSponsorBalance, isSponsorError, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InsufficientSponsorBalanceError, InternalServerError, KeyScopeDeniedError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SimulationFailedError, SettlementExecutionError, SettlementQuoteError, SponsorLimitExceededError, UnauthorizedError, UnprocessableContentError, ValidationError,
|
|
11
12
|
// Registry (SDK-local validation)
|
|
12
13
|
UnsupportedChainError, UnsupportedTokenError, };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,85 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* of the supported public API.
|
|
16
|
-
*/
|
|
17
|
-
internal_dryRun?: boolean;
|
|
18
|
-
}
|
|
19
|
-
interface RhinestoneAccount {
|
|
20
|
-
config: RhinestoneAccountConfig;
|
|
21
|
-
deploy: (chain: Chain, params?: {
|
|
22
|
-
session?: Session;
|
|
23
|
-
sponsored?: boolean;
|
|
24
|
-
}) => Promise<boolean>;
|
|
25
|
-
isDeployed: (chain: Chain) => Promise<boolean>;
|
|
26
|
-
setup: (chain: Chain) => Promise<boolean>;
|
|
27
|
-
getInitData(): {
|
|
28
|
-
factory: Address;
|
|
29
|
-
factoryData: Hex;
|
|
30
|
-
};
|
|
31
|
-
signEip7702InitData: () => Promise<Hex>;
|
|
32
|
-
prepareTransaction: (transaction: Transaction) => Promise<PreparedTransactionData>;
|
|
33
|
-
getTransactionMessages: (preparedTransaction: PreparedTransactionData, options?: QuoteSelection) => {
|
|
34
|
-
origin: TypedDataDefinition[];
|
|
35
|
-
destination: TypedDataDefinition;
|
|
36
|
-
targetExecution?: TypedDataDefinition;
|
|
37
|
-
};
|
|
38
|
-
signTransaction: (preparedTransaction: PreparedTransactionData, options?: QuoteSelection) => Promise<SignedTransactionData>;
|
|
39
|
-
signAuthorizations: (preparedTransaction: PreparedTransactionData) => Promise<SignedAuthorizationList>;
|
|
40
|
-
signMessage: (message: SignableMessage, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
|
|
41
|
-
signTypedData: <typedData extends TypedData | Record<string, unknown> = TypedData, primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData>(parameters: HashTypedDataParameters<typedData, primaryType>, chain: Chain, signers: SignerSet | undefined) => Promise<Hex>;
|
|
42
|
-
submitTransaction: (signedTransaction: SignedTransactionData, options?: SubmitTransactionOptions) => Promise<TransactionResult>;
|
|
43
|
-
prepareUserOperation: (transaction: UserOperationTransaction) => Promise<PreparedUserOperationData>;
|
|
44
|
-
signUserOperation: (preparedUserOperation: PreparedUserOperationData) => Promise<SignedUserOperationData>;
|
|
45
|
-
submitUserOperation: (signedUserOperation: SignedUserOperationData) => Promise<UserOperationResult>;
|
|
46
|
-
sendUserOperation: (transaction: UserOperationTransaction) => Promise<UserOperationResult>;
|
|
47
|
-
waitForExecution(result: TransactionResult): Promise<TransactionStatus>;
|
|
48
|
-
waitForExecution(result: UserOperationResult): Promise<UserOperationReceipt>;
|
|
49
|
-
getAddress: () => Address;
|
|
50
|
-
getPortfolio: (onTestnets?: boolean) => Promise<Portfolio>;
|
|
51
|
-
experimental_getSessionDetails: (sessions: Session[]) => Promise<SessionDetails>;
|
|
52
|
-
experimental_isSessionEnabled: (session: Session) => Promise<boolean>;
|
|
53
|
-
experimental_signEnableSession: (details: SessionDetails) => Promise<Hex>;
|
|
54
|
-
getOwners: (chain: Chain) => Promise<{
|
|
55
|
-
accounts: Address[];
|
|
56
|
-
threshold: number;
|
|
57
|
-
} | null>;
|
|
58
|
-
getValidators: (chain: Chain) => Promise<Address[]>;
|
|
59
|
-
getExecutors: (chain: Chain) => Promise<Address[]>;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Initialize a Rhinestone account
|
|
63
|
-
* Note: accounts are deployed onchain only when the first transaction is sent.
|
|
64
|
-
* @param config Account config (e.g. implementation vendor, owner signers, smart sessions)
|
|
65
|
-
* @returns account
|
|
66
|
-
*/
|
|
67
|
-
declare function createRhinestoneAccount(config: RhinestoneConfig): Promise<RhinestoneAccount>;
|
|
68
|
-
declare class RhinestoneSDK {
|
|
69
|
-
private authProvider;
|
|
70
|
-
private endpointUrl?;
|
|
71
|
-
private provider?;
|
|
72
|
-
private bundler?;
|
|
73
|
-
private paymaster?;
|
|
74
|
-
private useDevContracts?;
|
|
75
|
-
private headers?;
|
|
76
|
-
constructor(options: RhinestoneSDKConfig);
|
|
77
|
-
createAccount(config: RhinestoneAccountConfig): Promise<RhinestoneAccount>;
|
|
78
|
-
getIntentStatus(intentId: string): Promise<TransactionStatus & {
|
|
79
|
-
status: IntentOpStatus["status"];
|
|
80
|
-
}>;
|
|
81
|
-
splitIntents(input: SplitIntentsInput): Promise<SplitIntentsResult>;
|
|
82
|
-
}
|
|
83
|
-
export { RhinestoneSDK, createRhinestoneAccount, solanaMainnet, tronMainnet, OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, };
|
|
84
|
-
export type { RhinestoneAccount, AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, NonEvmTokenRequest, NonEvmTokenRequests, NonEvmAddress, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, ChainSessionConfig, Session, SessionDefinition, Recovery, Permission, PermissionFunctionConfig, ParamConstraint, Policy, Permit2ClaimPolicy, UniversalActionPolicyParamCondition, PreparedQuotes, PreparedTransactionData, Quote, QuoteSelection, SignedTransactionData, TransactionResult, PreparedUserOperationData, SignedUserOperationData, UserOperationResult, AuxiliaryFunds, BridgeFill, DestinationChain, NonEvmChain, IntentInput, IntentOpStatus, SettlementLayer, SettlementLayerFilter, SplitIntentsInput, SplitIntentsResult, Portfolio, TokenRequirements, WrapRequired, ApprovalRequired, };
|
|
1
|
+
import { RhinestoneSDK } from './api/sdk.js';
|
|
2
|
+
import { hyperCoreMainnet, solanaMainnet, tronMainnet } from './chains/non-evm.js';
|
|
3
|
+
import { MULTI_FACTOR_VALIDATOR_ADDRESS } from './modules/validators/multi-factor.js';
|
|
4
|
+
import { OWNABLE_VALIDATOR_ADDRESS } from './modules/validators/ownable.js';
|
|
5
|
+
import { SMART_SESSION_EMISSARY_ADDRESS } from './modules/validators/smart-sessions/module.js';
|
|
6
|
+
import { WEBAUTHN_VALIDATOR_ADDRESS } from './modules/validators/webauthn.js';
|
|
7
|
+
export { RhinestoneSDK, hyperCoreMainnet, solanaMainnet, tronMainnet, OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, };
|
|
8
|
+
export type { RhinestoneAccount, SignedIntentData } from './api/account.js';
|
|
9
|
+
export type { DestinationChain, NonEvmAddress, NonEvmChain, } from './chains/non-evm.js';
|
|
10
|
+
export type { AppFeeBalances, AppFeeRate, ApprovalRequired, AuxiliaryFunds, BridgeFill, ChainOperation, FailureReason, IntentInput, IntentOpStatus, OperationStatus, OriginSignature, Portfolio, ProtocolFeeRate, Quote, SettlementLayer, SettlementLayerFilter, SignData, SplitIntentsInput, SplitIntentsResult, TokenRequirements, WrapRequired, } from './clients/orchestrator/public.js';
|
|
11
|
+
export type { AccountProviderConfig, AccountType, BundlerConfig, Call, CallInput, ChainSessionConfig, CrossChainPermissionInput, CrossChainPermit, CrossChainSettlementLayer, FromLeg, MultiFactorValidatorConfig, NonEvmTokenRequest, NonEvmTokenRequests, OwnableValidatorConfig, OwnerSet, ParamConstraint, PaymasterConfig, Permission, PermissionFunctionConfig, Permit2ClaimPolicy, Policy, ProviderConfig, RhinestoneAccountConfig, Session, SessionDefinition, SignerSet, SourceCallInput, SourceCallProvidedFunds, TokenRequest, TokenSymbol, ToLeg, Transaction, UniversalActionPolicyParamCondition, WebauthnValidatorConfig, } from './config/account.js';
|
|
12
|
+
export type { OwnerPasskeySignature, OwnerSignature, OwnerSignatureData, SignAsOwnerOptions, } from './signing/types.js';
|
|
13
|
+
export type { PreparedQuotes, PreparedTransactionData, QuoteSelection, SignedTransactionData, TransactionResult, } from './transactions/intents/types.js';
|
|
14
|
+
export type { PreparedUserOperationData, SignedUserOperationData, UserOperationResult, } from './transactions/user-operations/types.js';
|
|
85
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAA;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAA;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAA;AAE1E,OAAO,EACL,aAAa,EAEb,gBAAgB,EAChB,aAAa,EACb,WAAW,EAEX,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,8BAA8B,GAC/B,CAAA;AAED,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACxE,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,WAAW,GACZ,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,eAAe,EACf,SAAS,EACT,eAAe,EACf,KAAK,EACL,eAAe,EACf,qBAAqB,EACrB,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,GACb,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,EACzB,OAAO,EACP,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,eAAe,EACf,UAAU,EACV,wBAAwB,EACxB,kBAAkB,EAClB,MAAM,EACN,cAAc,EACd,uBAAuB,EACvB,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACX,KAAK,EACL,WAAW,EACX,mCAAmC,EACnC,uBAAuB,GACxB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,8BAA8B,CAAA;AACrC,YAAY,EACV,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,sCAAsC,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,295 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Note: accounts are deployed onchain only when the first transaction is sent.
|
|
11
|
-
* @param config Account config (e.g. implementation vendor, owner signers, smart sessions)
|
|
12
|
-
* @returns account
|
|
13
|
-
*/
|
|
14
|
-
async function createRhinestoneAccount(config) {
|
|
15
|
-
// Sanity check for existing (externally created) accounts
|
|
16
|
-
// Ensures we decode the initdata correctly
|
|
17
|
-
checkAddress(config);
|
|
18
|
-
// Validate that owners field is provided for non-EOA accounts
|
|
19
|
-
if (config.account?.type !== 'eoa' && !config.owners) {
|
|
20
|
-
throw new OwnersFieldRequiredError();
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Deploys the account on a given chain
|
|
24
|
-
* @param chain Chain to deploy the account on
|
|
25
|
-
* @param session Session to deploy the account on (optional)
|
|
26
|
-
*/
|
|
27
|
-
function deploy(chain, params) {
|
|
28
|
-
return deployInternal(config, chain, params);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Checks if the account is deployed on a given chain
|
|
32
|
-
* @param chain Chain to check if the account is deployed on
|
|
33
|
-
* @returns true if the account is deployed, false otherwise
|
|
34
|
-
*/
|
|
35
|
-
function isDeployed(chain) {
|
|
36
|
-
return isDeployedInternal(config, chain);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Sets up the existing account on a given chain
|
|
40
|
-
* by installing the missing modules (if any).
|
|
41
|
-
* @param chain Chain to set up the account on
|
|
42
|
-
*/
|
|
43
|
-
function setup(chain) {
|
|
44
|
-
return setupInternal(config, chain);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get the account initialization data. Used for deploying the account onchain.
|
|
48
|
-
* @returns factory address and factory data
|
|
49
|
-
*/
|
|
50
|
-
function getInitData() {
|
|
51
|
-
const initData = getInitCode(config);
|
|
52
|
-
if (!initData) {
|
|
53
|
-
throw new FactoryArgsNotAvailableError();
|
|
54
|
-
}
|
|
55
|
-
if (!('factory' in initData)) {
|
|
56
|
-
throw new FactoryArgsNotAvailableError();
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
factory: initData.factory,
|
|
60
|
-
factoryData: initData.factoryData,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Prepare and sign the EIP-7702 account initialization data
|
|
65
|
-
* @returns init data signature
|
|
66
|
-
*/
|
|
67
|
-
function signEip7702InitData() {
|
|
68
|
-
return signEip7702InitDataInternal(config);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Prepare a transaction data
|
|
72
|
-
* @param transaction Transaction to prepare
|
|
73
|
-
* @returns prepared transaction data
|
|
74
|
-
*/
|
|
75
|
-
function prepareTransaction(transaction) {
|
|
76
|
-
return prepareTransactionInternal(config, transaction);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Get the transaction typed data message to sign
|
|
80
|
-
* @param preparedTransaction Prepared transaction data
|
|
81
|
-
* @param options Optional override; pass `{ intentId }` to inspect a specific quote from `preparedTransaction.quotes.all`
|
|
82
|
-
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
83
|
-
*/
|
|
84
|
-
function getTransactionMessages(preparedTransaction, options) {
|
|
85
|
-
return getTransactionMessagesInternal(config, preparedTransaction, options);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Sign a transaction
|
|
89
|
-
* @param preparedTransaction Prepared transaction data
|
|
90
|
-
* @param options Optional override; pass `{ intentId }` to sign a specific quote from `preparedTransaction.quotes.all`
|
|
91
|
-
* @returns signed transaction data
|
|
92
|
-
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
93
|
-
*/
|
|
94
|
-
function signTransaction(preparedTransaction, options) {
|
|
95
|
-
return signTransactionInternal(config, preparedTransaction, options);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Sign the required EIP-7702 authorizations for a transaction
|
|
99
|
-
* @param preparedTransaction Prepared transaction data
|
|
100
|
-
* @returns signed authorizations
|
|
101
|
-
* @see {@link prepareTransaction} to prepare the transaction data for signing
|
|
102
|
-
*/
|
|
103
|
-
function signAuthorizations(preparedTransaction) {
|
|
104
|
-
return signAuthorizationsInternal(config, preparedTransaction);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Sign a message (EIP-191)
|
|
108
|
-
* @param message Message to sign
|
|
109
|
-
* @param chain Chain to sign the message on
|
|
110
|
-
* @param signers Signers to use for signing
|
|
111
|
-
* @returns signature
|
|
112
|
-
*/
|
|
113
|
-
function signMessage(message, chain, signers) {
|
|
114
|
-
return signMessageInternal(config, message, chain, signers);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Sign a typed data (EIP-712)
|
|
118
|
-
* @param parameters Typed data parameters
|
|
119
|
-
* @param chain Chain to sign the typed data on
|
|
120
|
-
* @param signers Signers to use for signing
|
|
121
|
-
* @returns signature
|
|
122
|
-
*/
|
|
123
|
-
function signTypedData(parameters, chain, signers) {
|
|
124
|
-
return signTypedDataInternal(config, parameters, chain, signers);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Submit a transaction
|
|
128
|
-
* @param signedTransaction Signed transaction data
|
|
129
|
-
* @param options Optional submission options
|
|
130
|
-
* @param options.authorizations EIP-7702 authorizations to submit
|
|
131
|
-
* @returns transaction result object (a UserOp hash)
|
|
132
|
-
* @see {@link signTransaction} to sign the transaction data
|
|
133
|
-
* @see {@link signAuthorizations} to sign the required EIP-7702 authorizations
|
|
134
|
-
*/
|
|
135
|
-
function submitTransaction(signedTransaction, options) {
|
|
136
|
-
return submitTransactionInternal(config, signedTransaction, options?.authorizations ?? [], options?.internal_dryRun ?? false);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Prepare a user operation data
|
|
140
|
-
* @param transaction User operation to prepare
|
|
141
|
-
* @returns prepared user operation data
|
|
142
|
-
*/
|
|
143
|
-
function prepareUserOperation(transaction) {
|
|
144
|
-
return prepareUserOperationInternal(config, transaction);
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Sign a user operation
|
|
148
|
-
* @param preparedUserOperation Prepared user operation data
|
|
149
|
-
* @returns signed user operation data
|
|
150
|
-
* @see {@link prepareUserOperation} to prepare the user operation data for signing
|
|
151
|
-
*/
|
|
152
|
-
function signUserOperation(preparedUserOperation) {
|
|
153
|
-
return signUserOperationInternal(config, preparedUserOperation);
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Submit a transaction
|
|
157
|
-
* @param signedTransaction Signed transaction data
|
|
158
|
-
* @returns transaction result object (a UserOp hash)
|
|
159
|
-
* @see {@link signUserOperation} to sign the user operation data
|
|
160
|
-
*/
|
|
161
|
-
function submitUserOperation(signedUserOperation) {
|
|
162
|
-
return submitUserOperationInternal(config, signedUserOperation);
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Sign and send a user operation
|
|
166
|
-
* @param transaction User operation to send
|
|
167
|
-
* @returns user operation result object (a UserOp hash)
|
|
168
|
-
*/
|
|
169
|
-
function sendUserOperation(transaction) {
|
|
170
|
-
return sendUserOperationInternal(config, transaction);
|
|
171
|
-
}
|
|
172
|
-
function waitForExecution(result) {
|
|
173
|
-
return waitForExecutionInternal(config, result);
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Get account address
|
|
177
|
-
* @returns Address of the smart account
|
|
178
|
-
*/
|
|
179
|
-
function getAddress() {
|
|
180
|
-
return getAddressInternal(config);
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Get account portfolio
|
|
184
|
-
* @param onTestnets Whether to query the testnet balances (default is `false`)
|
|
185
|
-
* @returns Account balances
|
|
186
|
-
*/
|
|
187
|
-
function getPortfolio(onTestnets = false) {
|
|
188
|
-
return getPortfolioInternal(config, onTestnets);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Get account owners (ECDSA)
|
|
192
|
-
* @param chain Chain to get the owners on
|
|
193
|
-
* @returns Account owners
|
|
194
|
-
*/
|
|
195
|
-
function getOwners(chain) {
|
|
196
|
-
const account = getAddress();
|
|
197
|
-
return getOwnersInternal(account, chain, config.provider);
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Get account validator modules
|
|
201
|
-
* @param chain Chain to get the validators on
|
|
202
|
-
* @returns List of account validators
|
|
203
|
-
*/
|
|
204
|
-
function getValidators(chain) {
|
|
205
|
-
const accountType = getAccountProvider(config).type;
|
|
206
|
-
const account = getAddress();
|
|
207
|
-
return getValidatorsInternal(accountType, account, chain, config.provider);
|
|
208
|
-
}
|
|
209
|
-
function getExecutors(chain) {
|
|
210
|
-
const accountType = getAccountProvider(config).type;
|
|
211
|
-
const account = getAddress();
|
|
212
|
-
return getExecutorsInternal(accountType, account, chain, config.provider);
|
|
213
|
-
}
|
|
214
|
-
function experimental_getSessionDetails(sessions) {
|
|
215
|
-
const account = getAddress();
|
|
216
|
-
return getSessionDetailsInternal(account, sessions, config.provider, config.useDevContracts);
|
|
217
|
-
}
|
|
218
|
-
function experimental_isSessionEnabled(session) {
|
|
219
|
-
const account = getAddress();
|
|
220
|
-
return isSessionEnabledInternal(account, config.provider, session, config.useDevContracts);
|
|
221
|
-
}
|
|
222
|
-
function experimental_signEnableSession(details) {
|
|
223
|
-
return signEnableSessionInternal(config, details);
|
|
224
|
-
}
|
|
225
|
-
return {
|
|
226
|
-
config,
|
|
227
|
-
deploy,
|
|
228
|
-
isDeployed,
|
|
229
|
-
setup,
|
|
230
|
-
signEip7702InitData,
|
|
231
|
-
prepareTransaction,
|
|
232
|
-
getTransactionMessages,
|
|
233
|
-
signTransaction,
|
|
234
|
-
signAuthorizations,
|
|
235
|
-
signMessage,
|
|
236
|
-
signTypedData,
|
|
237
|
-
submitTransaction,
|
|
238
|
-
prepareUserOperation,
|
|
239
|
-
signUserOperation,
|
|
240
|
-
submitUserOperation,
|
|
241
|
-
sendUserOperation,
|
|
242
|
-
waitForExecution,
|
|
243
|
-
getAddress,
|
|
244
|
-
getPortfolio,
|
|
245
|
-
getOwners,
|
|
246
|
-
getValidators,
|
|
247
|
-
getExecutors,
|
|
248
|
-
experimental_getSessionDetails,
|
|
249
|
-
experimental_isSessionEnabled,
|
|
250
|
-
experimental_signEnableSession,
|
|
251
|
-
getInitData,
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
class RhinestoneSDK {
|
|
255
|
-
authProvider;
|
|
256
|
-
endpointUrl;
|
|
257
|
-
provider;
|
|
258
|
-
bundler;
|
|
259
|
-
paymaster;
|
|
260
|
-
useDevContracts;
|
|
261
|
-
headers;
|
|
262
|
-
constructor(options) {
|
|
263
|
-
this.authProvider = createAuthProvider(options);
|
|
264
|
-
this.endpointUrl = options.endpointUrl;
|
|
265
|
-
this.provider = options.provider;
|
|
266
|
-
this.bundler = options.bundler;
|
|
267
|
-
this.paymaster = options.paymaster;
|
|
268
|
-
this.useDevContracts = options.useDevContracts;
|
|
269
|
-
this.headers = options.headers;
|
|
270
|
-
}
|
|
271
|
-
createAccount(config) {
|
|
272
|
-
const rhinestoneConfig = {
|
|
273
|
-
...config,
|
|
274
|
-
_authProvider: this.authProvider,
|
|
275
|
-
endpointUrl: this.endpointUrl,
|
|
276
|
-
provider: this.provider,
|
|
277
|
-
bundler: this.bundler,
|
|
278
|
-
paymaster: this.paymaster,
|
|
279
|
-
useDevContracts: this.useDevContracts,
|
|
280
|
-
headers: this.headers,
|
|
281
|
-
};
|
|
282
|
-
return createRhinestoneAccount(rhinestoneConfig);
|
|
283
|
-
}
|
|
284
|
-
getIntentStatus(intentId) {
|
|
285
|
-
return getIntentStatusInternal(this.authProvider, this.endpointUrl, intentId, this.headers);
|
|
286
|
-
}
|
|
287
|
-
splitIntents(input) {
|
|
288
|
-
return splitIntentsInternal(this.authProvider, this.endpointUrl, input, this.headers);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
export { RhinestoneSDK, createRhinestoneAccount,
|
|
292
|
-
// Non-EVM destination chain descriptors
|
|
293
|
-
solanaMainnet, tronMainnet,
|
|
1
|
+
import { RhinestoneSDK } from './api/sdk.js';
|
|
2
|
+
import { hyperCoreMainnet, solanaMainnet, tronMainnet } from './chains/non-evm.js';
|
|
3
|
+
import { MULTI_FACTOR_VALIDATOR_ADDRESS } from './modules/validators/multi-factor.js';
|
|
4
|
+
import { OWNABLE_VALIDATOR_ADDRESS } from './modules/validators/ownable.js';
|
|
5
|
+
import { SMART_SESSION_EMISSARY_ADDRESS } from './modules/validators/smart-sessions/module.js';
|
|
6
|
+
import { WEBAUTHN_VALIDATOR_ADDRESS } from './modules/validators/webauthn.js';
|
|
7
|
+
export { RhinestoneSDK,
|
|
8
|
+
// Non-viem destination chain descriptors (Solana, Tron, HyperCore)
|
|
9
|
+
hyperCoreMainnet, solanaMainnet, tronMainnet,
|
|
294
10
|
// Validator addresses
|
|
295
11
|
OWNABLE_VALIDATOR_ADDRESS, WEBAUTHN_VALIDATOR_ADDRESS, MULTI_FACTOR_VALIDATOR_ADDRESS, SMART_SESSION_EMISSARY_ADDRESS, };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* RFC 8785 JSON Canonicalization Scheme (JCS).
|
|
3
3
|
*
|
|
4
4
|
* Produces a deterministic JSON serialization by:
|
|
5
|
-
* 1. Sorting object keys lexicographically (
|
|
5
|
+
* 1. Sorting object keys lexicographically (UTF-16 code-unit order, per RFC 8785 §3.2.3)
|
|
6
6
|
* 2. Using ES2015+ `JSON.stringify` number serialization (IEEE 754 → shortest round-trip)
|
|
7
7
|
* 3. No whitespace
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* RFC 8785 JSON Canonicalization Scheme (JCS).
|
|
3
3
|
*
|
|
4
4
|
* Produces a deterministic JSON serialization by:
|
|
5
|
-
* 1. Sorting object keys lexicographically (
|
|
5
|
+
* 1. Sorting object keys lexicographically (UTF-16 code-unit order, per RFC 8785 §3.2.3)
|
|
6
6
|
* 2. Using ES2015+ `JSON.stringify` number serialization (IEEE 754 → shortest round-trip)
|
|
7
7
|
* 3. No whitespace
|
|
8
8
|
*
|
|
@@ -43,7 +43,9 @@ function serialize(value) {
|
|
|
43
43
|
const items = value.map((item) => serialize(item));
|
|
44
44
|
return `[${items.join(',')}]`;
|
|
45
45
|
}
|
|
46
|
-
// Object — sort keys by
|
|
46
|
+
// Object — sort keys by UTF-16 code-unit order (RFC 8785 §3.2.3).
|
|
47
|
+
// Native String comparison already orders by UTF-16 code unit, which is
|
|
48
|
+
// exactly what JCS mandates — do not replace with a code-point comparator.
|
|
47
49
|
const obj = value;
|
|
48
50
|
const keys = Object.keys(obj).sort();
|
|
49
51
|
const members = [];
|