@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,743 @@
|
|
|
1
|
+
import type { Abi, AbiFunction, Account, Address, Chain, Hex } from 'viem';
|
|
2
|
+
import type { WebAuthnAccount } from 'viem/account-abstraction';
|
|
3
|
+
import type { AccountType } from '../accounts/types.js';
|
|
4
|
+
import type { NonEvmAddress, NonEvmChain } from '../chains/non-evm.js';
|
|
5
|
+
import type { AppFeeRate, AuxiliaryFunds, ProtocolFeeRate, SettlementLayerFilter } from '../clients/orchestrator/public.js';
|
|
6
|
+
declare const MODULE_TYPE_VALIDATOR = "validator";
|
|
7
|
+
declare const MODULE_TYPE_EXECUTOR = "executor";
|
|
8
|
+
declare const MODULE_TYPE_FALLBACK = "fallback";
|
|
9
|
+
declare const MODULE_TYPE_HOOK = "hook";
|
|
10
|
+
type ModuleType = typeof MODULE_TYPE_VALIDATOR | typeof MODULE_TYPE_EXECUTOR | typeof MODULE_TYPE_FALLBACK | typeof MODULE_TYPE_HOOK;
|
|
11
|
+
interface AuthProvider {
|
|
12
|
+
getHeaders(): Promise<Record<string, string>>;
|
|
13
|
+
getSubmitHeaders(intentInput: unknown, isSponsored: boolean): Promise<Record<string, string>>;
|
|
14
|
+
}
|
|
15
|
+
interface SafeAccount {
|
|
16
|
+
type: 'safe';
|
|
17
|
+
version?: '1.4.1';
|
|
18
|
+
adapter?: '1.0.0' | '2.0.0';
|
|
19
|
+
nonce?: bigint;
|
|
20
|
+
}
|
|
21
|
+
interface NexusAccount {
|
|
22
|
+
type: 'nexus';
|
|
23
|
+
version?: '1.2.0' | '1.2.1';
|
|
24
|
+
salt?: Hex;
|
|
25
|
+
}
|
|
26
|
+
interface KernelAccount {
|
|
27
|
+
type: 'kernel';
|
|
28
|
+
version?: '3.3';
|
|
29
|
+
salt?: Hex;
|
|
30
|
+
}
|
|
31
|
+
interface StartaleAccount {
|
|
32
|
+
type: 'startale';
|
|
33
|
+
salt?: Hex;
|
|
34
|
+
}
|
|
35
|
+
interface HcaAccount {
|
|
36
|
+
type: 'hca';
|
|
37
|
+
factory?: Address;
|
|
38
|
+
}
|
|
39
|
+
interface EoaAccount {
|
|
40
|
+
type: 'eoa';
|
|
41
|
+
}
|
|
42
|
+
type AccountProviderConfig = SafeAccount | NexusAccount | KernelAccount | StartaleAccount | HcaAccount | EoaAccount;
|
|
43
|
+
interface OwnableValidatorConfig {
|
|
44
|
+
type: 'ecdsa';
|
|
45
|
+
accounts: Account[];
|
|
46
|
+
threshold?: number;
|
|
47
|
+
module?: Address;
|
|
48
|
+
}
|
|
49
|
+
interface ENSValidatorConfig {
|
|
50
|
+
type: 'ens';
|
|
51
|
+
/** Each owner with an optional expiry. Omit `expiration` to never expire. */
|
|
52
|
+
owners: {
|
|
53
|
+
account: Account;
|
|
54
|
+
expiration?: Date;
|
|
55
|
+
}[];
|
|
56
|
+
threshold?: number;
|
|
57
|
+
}
|
|
58
|
+
interface WebauthnValidatorConfig {
|
|
59
|
+
type: 'passkey';
|
|
60
|
+
accounts: WebAuthnAccount[];
|
|
61
|
+
threshold?: number;
|
|
62
|
+
module?: Address;
|
|
63
|
+
}
|
|
64
|
+
interface MultiFactorValidatorConfig {
|
|
65
|
+
type: 'multi-factor';
|
|
66
|
+
validators: (OwnableValidatorConfig | ENSValidatorConfig | WebauthnValidatorConfig)[];
|
|
67
|
+
threshold?: number;
|
|
68
|
+
module?: Address;
|
|
69
|
+
}
|
|
70
|
+
type ProviderConfig = {
|
|
71
|
+
type: 'custom';
|
|
72
|
+
urls: Record<number, string>;
|
|
73
|
+
};
|
|
74
|
+
type BundlerConfig = {
|
|
75
|
+
type: 'pimlico' | 'biconomy';
|
|
76
|
+
apiKey: string;
|
|
77
|
+
} | {
|
|
78
|
+
type: 'custom';
|
|
79
|
+
url: string | Record<number, string>;
|
|
80
|
+
};
|
|
81
|
+
type PaymasterConfig = {
|
|
82
|
+
type: 'pimlico' | 'biconomy';
|
|
83
|
+
apiKey: string;
|
|
84
|
+
} | {
|
|
85
|
+
type: 'custom';
|
|
86
|
+
url: string | Record<number, string>;
|
|
87
|
+
};
|
|
88
|
+
type OwnerSet = OwnableValidatorConfig | ENSValidatorConfig | WebauthnValidatorConfig | MultiFactorValidatorConfig;
|
|
89
|
+
interface SudoPolicy {
|
|
90
|
+
type: 'sudo';
|
|
91
|
+
}
|
|
92
|
+
interface UniversalActionPolicy {
|
|
93
|
+
type: 'universal-action';
|
|
94
|
+
valueLimitPerUse?: bigint;
|
|
95
|
+
rules: [UniversalActionPolicyParamRule, ...UniversalActionPolicyParamRule[]];
|
|
96
|
+
}
|
|
97
|
+
interface UniversalActionPolicyParamRule {
|
|
98
|
+
condition: UniversalActionPolicyParamCondition;
|
|
99
|
+
calldataOffset: bigint;
|
|
100
|
+
usageLimit?: bigint;
|
|
101
|
+
referenceValue: Hex | bigint;
|
|
102
|
+
}
|
|
103
|
+
type UniversalActionPolicyParamCondition = 'equal' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'notEqual' | 'inRange';
|
|
104
|
+
type ArgPolicyExpression = {
|
|
105
|
+
type: 'rule';
|
|
106
|
+
rule: UniversalActionPolicyParamRule;
|
|
107
|
+
} | {
|
|
108
|
+
type: 'not';
|
|
109
|
+
child: ArgPolicyExpression;
|
|
110
|
+
} | {
|
|
111
|
+
type: 'and';
|
|
112
|
+
left: ArgPolicyExpression;
|
|
113
|
+
right: ArgPolicyExpression;
|
|
114
|
+
} | {
|
|
115
|
+
type: 'or';
|
|
116
|
+
left: ArgPolicyExpression;
|
|
117
|
+
right: ArgPolicyExpression;
|
|
118
|
+
};
|
|
119
|
+
interface ArgPolicy {
|
|
120
|
+
type: 'arg-policy';
|
|
121
|
+
valueLimitPerUse?: bigint;
|
|
122
|
+
expression: ArgPolicyExpression;
|
|
123
|
+
}
|
|
124
|
+
interface SpendingLimitsPolicy {
|
|
125
|
+
type: 'spending-limits';
|
|
126
|
+
limits: {
|
|
127
|
+
token: Address;
|
|
128
|
+
amount: bigint;
|
|
129
|
+
}[];
|
|
130
|
+
}
|
|
131
|
+
interface TimeFramePolicy {
|
|
132
|
+
type: 'time-frame';
|
|
133
|
+
validUntil: number;
|
|
134
|
+
validAfter: number;
|
|
135
|
+
}
|
|
136
|
+
interface UsageLimitPolicy {
|
|
137
|
+
type: 'usage-limit';
|
|
138
|
+
limit: bigint;
|
|
139
|
+
}
|
|
140
|
+
interface ValueLimitPolicy {
|
|
141
|
+
type: 'value-limit';
|
|
142
|
+
limit: bigint;
|
|
143
|
+
}
|
|
144
|
+
interface IntentExecutionPolicy {
|
|
145
|
+
type: 'intent-execution';
|
|
146
|
+
}
|
|
147
|
+
interface Permit2ClaimPolicy {
|
|
148
|
+
type: 'permit2';
|
|
149
|
+
/** Whitelisted Permit2 spender addresses */
|
|
150
|
+
spenders?: Address[];
|
|
151
|
+
/** Permitted input tokens per origin chain */
|
|
152
|
+
sourceTokens?: {
|
|
153
|
+
chain: Chain;
|
|
154
|
+
address: Address;
|
|
155
|
+
}[];
|
|
156
|
+
/** Permitted output tokens per destination chain */
|
|
157
|
+
destinationTokens?: {
|
|
158
|
+
chain: Chain;
|
|
159
|
+
address: Address;
|
|
160
|
+
}[];
|
|
161
|
+
/** Permitted recipients per destination chain (use `'any'` to allow all) */
|
|
162
|
+
recipients?: {
|
|
163
|
+
chain: Chain;
|
|
164
|
+
address: Address | 'any';
|
|
165
|
+
}[];
|
|
166
|
+
/** Enforce that the destination recipient is the smart account */
|
|
167
|
+
recipientIsAccount?: boolean;
|
|
168
|
+
/** Bounds for the Permit2 signature deadline */
|
|
169
|
+
permitDeadline?: {
|
|
170
|
+
min?: bigint;
|
|
171
|
+
max?: bigint;
|
|
172
|
+
};
|
|
173
|
+
/** Bounds for the mandate target fill deadline, per destination chain */
|
|
174
|
+
fillDeadline?: {
|
|
175
|
+
chain: Chain;
|
|
176
|
+
min?: bigint;
|
|
177
|
+
max?: bigint;
|
|
178
|
+
}[];
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Settlement layers supported by the cross-chain session abstraction.
|
|
182
|
+
* Each value maps to one or more Permit2 arbiter addresses from the SDK's
|
|
183
|
+
* bundled arbiter allow-set — devs pick a layer, the SDK resolves it to the
|
|
184
|
+
* on-chain arbiter whitelist.
|
|
185
|
+
*
|
|
186
|
+
* The set is intentionally narrower than the orchestrator's broader
|
|
187
|
+
* `SettlementLayer` union (which also names intent-executor-backed
|
|
188
|
+
* bridges like `CCTP`, `RHINO`, ...). Once the params-bearing
|
|
189
|
+
* intent-executor policy lands in smart-sessions-v2 (see
|
|
190
|
+
* `rhinestonewtf/smart-sessions-v2#46`), this union grows to cover those
|
|
191
|
+
* layers via the same selector interface.
|
|
192
|
+
*/
|
|
193
|
+
type CrossChainSettlementLayer = 'SAME_CHAIN' | 'ECO' | 'ACROSS';
|
|
194
|
+
/**
|
|
195
|
+
* A high-level permit that authorises a session key to move funds
|
|
196
|
+
* between two chains via Permit2 arbiter settlement. The SDK expands
|
|
197
|
+
* one `CrossChainPermit` into a {@link Permit2ClaimPolicy} (claim-side)
|
|
198
|
+
* plus optional {@link SpendingLimitsPolicy} / {@link TimeFramePolicy}
|
|
199
|
+
* entries on the fallback action — the claim policy itself doesn't
|
|
200
|
+
* enforce amounts or expiry on-chain, so we lift those guarantees into
|
|
201
|
+
* action-level policies that do.
|
|
202
|
+
*
|
|
203
|
+
* Resolved from {@link CrossChainPermissionInput} by the SDK; consumers
|
|
204
|
+
* normally set `SessionDefinition.crossChainPermits` with the input shape,
|
|
205
|
+
* not this one. Exported as a low-level escape hatch.
|
|
206
|
+
*/
|
|
207
|
+
interface CrossChainPermit {
|
|
208
|
+
/**
|
|
209
|
+
* Allowed source legs: chain + token (+ optional max amount cap).
|
|
210
|
+
* Omit for no source-token restriction (any token on any chain may be
|
|
211
|
+
* pulled) — only the arbiter whitelist, deadline, and bridge-to-self
|
|
212
|
+
* flag then constrain the source side.
|
|
213
|
+
*/
|
|
214
|
+
from?: {
|
|
215
|
+
chain: Chain;
|
|
216
|
+
token: Address;
|
|
217
|
+
maxAmount?: bigint;
|
|
218
|
+
}[];
|
|
219
|
+
/**
|
|
220
|
+
* Allowed destination legs: chain + token (+ optional recipient pin).
|
|
221
|
+
* Omit for no destination-token restriction. Note `recipientIsAccount`
|
|
222
|
+
* still constrains the destination recipient even when `to` is absent.
|
|
223
|
+
*/
|
|
224
|
+
to?: {
|
|
225
|
+
chain: Chain;
|
|
226
|
+
token: Address;
|
|
227
|
+
recipient?: Address | 'any';
|
|
228
|
+
}[];
|
|
229
|
+
/** Upper bound on the permit deadline (Permit2 deadline) — unix seconds */
|
|
230
|
+
validUntil?: bigint;
|
|
231
|
+
/** Lower bound on the permit deadline — unix seconds */
|
|
232
|
+
validAfter?: bigint;
|
|
233
|
+
/** Per-destination fill-deadline windows — unix seconds */
|
|
234
|
+
fillDeadline?: {
|
|
235
|
+
chain: Chain;
|
|
236
|
+
min?: bigint;
|
|
237
|
+
max?: bigint;
|
|
238
|
+
}[];
|
|
239
|
+
/**
|
|
240
|
+
* Enforce bridge-to-self (the destination recipient must be the smart
|
|
241
|
+
* account). Defaults to `true` when resolved from
|
|
242
|
+
* {@link CrossChainPermissionInput}.
|
|
243
|
+
*/
|
|
244
|
+
recipientIsAccount?: boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Settlement layers this session is permitted to use. Omit (or pass
|
|
247
|
+
* `[]`) for any supported layer — the SDK resolves to the union of
|
|
248
|
+
* every arbiter in its bundled allow-set.
|
|
249
|
+
*/
|
|
250
|
+
settlementLayers?: CrossChainSettlementLayer[];
|
|
251
|
+
}
|
|
252
|
+
interface FromLeg {
|
|
253
|
+
chain: Chain;
|
|
254
|
+
token: Address;
|
|
255
|
+
maxAmount?: bigint;
|
|
256
|
+
}
|
|
257
|
+
interface ToLeg {
|
|
258
|
+
chain: Chain;
|
|
259
|
+
token: Address;
|
|
260
|
+
recipient?: Address | 'any';
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Ergonomic input for a cross-chain session permit. Set on
|
|
264
|
+
* `SessionDefinition.crossChainPermits`; token fields are per-chain ERC-20
|
|
265
|
+
* addresses (v2 no longer accepts symbols) and the SDK resolves `Date`s to
|
|
266
|
+
* on-chain deadlines, then expands
|
|
267
|
+
* each entry into a {@link Permit2ClaimPolicy} (claim-side) plus optional
|
|
268
|
+
* {@link SpendingLimitsPolicy} / {@link TimeFramePolicy} guardrails.
|
|
269
|
+
*/
|
|
270
|
+
interface CrossChainPermissionInput {
|
|
271
|
+
/**
|
|
272
|
+
* Source chain + token (+ optional max amount cap). Pass a single leg
|
|
273
|
+
* or an array for multi-leg permits. Omit for no source-token
|
|
274
|
+
* restriction (any token on any chain may be pulled) — the arbiter
|
|
275
|
+
* whitelist, deadline, and bridge-to-self flag still apply.
|
|
276
|
+
*/
|
|
277
|
+
from?: FromLeg | FromLeg[];
|
|
278
|
+
/**
|
|
279
|
+
* Destination chain + token (+ optional recipient pin). Pass a single
|
|
280
|
+
* leg or an array for fan-out destinations. Omit for no
|
|
281
|
+
* destination-token restriction; `recipientIsAccount` still constrains
|
|
282
|
+
* the recipient.
|
|
283
|
+
*/
|
|
284
|
+
to?: ToLeg | ToLeg[];
|
|
285
|
+
/** Upper bound on the permit deadline. */
|
|
286
|
+
validUntil?: Date;
|
|
287
|
+
/** Lower bound on the permit deadline. */
|
|
288
|
+
validAfter?: Date;
|
|
289
|
+
/** Per-destination fill-deadline windows. */
|
|
290
|
+
fillDeadline?: {
|
|
291
|
+
chain: Chain;
|
|
292
|
+
min?: Date;
|
|
293
|
+
max?: Date;
|
|
294
|
+
}[];
|
|
295
|
+
/**
|
|
296
|
+
* Allow the destination recipient to differ from the smart account
|
|
297
|
+
* (the sponsor funding the cross-chain transfer). Defaults to
|
|
298
|
+
* `false`, which enforces bridge-to-self on-chain — the safer default
|
|
299
|
+
* since it prevents a compromised session key from routing funds to
|
|
300
|
+
* an attacker-controlled address. Set to `true` to opt out explicitly.
|
|
301
|
+
*/
|
|
302
|
+
allowRecipientNotAccount?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* Settlement layers this session is permitted to use. Omit (or pass
|
|
305
|
+
* `[]`) to allow **any of the supported settlement layers** — the SDK
|
|
306
|
+
* resolves to the union of every arbiter in its bundled allow-set. Pass
|
|
307
|
+
* a subset (e.g. `['ECO']`) to narrow.
|
|
308
|
+
*/
|
|
309
|
+
settlementLayers?: CrossChainSettlementLayer[];
|
|
310
|
+
}
|
|
311
|
+
type Policy = SudoPolicy | UniversalActionPolicy | ArgPolicy | SpendingLimitsPolicy | TimeFramePolicy | UsageLimitPolicy | ValueLimitPolicy | IntentExecutionPolicy;
|
|
312
|
+
/** @internal */
|
|
313
|
+
interface FallbackAction {
|
|
314
|
+
policies?: Policy[];
|
|
315
|
+
}
|
|
316
|
+
/** @internal */
|
|
317
|
+
interface ScopedAction {
|
|
318
|
+
target: Address;
|
|
319
|
+
selector: Hex;
|
|
320
|
+
policies?: Policy[];
|
|
321
|
+
}
|
|
322
|
+
/** @internal */
|
|
323
|
+
type Action = FallbackAction | ScopedAction;
|
|
324
|
+
/** Extract function names from an ABI. */
|
|
325
|
+
type FunctionNames<TAbi extends Abi> = Extract<TAbi[number], {
|
|
326
|
+
type: 'function';
|
|
327
|
+
}>['name'];
|
|
328
|
+
/** Pull the AbiFunction entry for a given name (union if overloaded). */
|
|
329
|
+
type GetFunction<TAbi extends Abi, TName extends string> = Extract<TAbi[number], {
|
|
330
|
+
type: 'function';
|
|
331
|
+
name: TName;
|
|
332
|
+
}>;
|
|
333
|
+
/**
|
|
334
|
+
* Map a Solidity type string to the TypeScript value a developer provides as
|
|
335
|
+
* `value` in a param constraint. Dynamic types resolve to `never` so the
|
|
336
|
+
* compiler prevents rules on params the on-chain policy cannot compare.
|
|
337
|
+
*/
|
|
338
|
+
type AbiTypeToValue<T extends string> = T extends 'address' ? Address : T extends 'bool' ? boolean : T extends `uint${string}` ? bigint : T extends `int${string}` ? bigint : T extends `bytes${infer N}` ? N extends '' ? never : Hex : never;
|
|
339
|
+
type ParamValue<TFn extends AbiFunction, TParamName extends string> = AbiTypeToValue<Extract<TFn['inputs'][number], {
|
|
340
|
+
name: TParamName;
|
|
341
|
+
}>['type']>;
|
|
342
|
+
type NamedInputs<TFn extends AbiFunction> = Extract<TFn['inputs'][number], {
|
|
343
|
+
name: string;
|
|
344
|
+
}>;
|
|
345
|
+
type ParamConstraint<TValue> = {
|
|
346
|
+
condition: UniversalActionPolicyParamCondition;
|
|
347
|
+
value: TValue;
|
|
348
|
+
usageLimit?: bigint;
|
|
349
|
+
anyOf?: never;
|
|
350
|
+
} | {
|
|
351
|
+
anyOf: readonly [TValue, ...TValue[]];
|
|
352
|
+
condition?: never;
|
|
353
|
+
value?: never;
|
|
354
|
+
usageLimit?: never;
|
|
355
|
+
};
|
|
356
|
+
type IsERC20TransferLike<TFn extends AbiFunction> = TFn['name'] extends 'approve' | 'increaseAllowance' | 'transfer' ? TFn['inputs'] extends readonly [{
|
|
357
|
+
type: 'address';
|
|
358
|
+
}, {
|
|
359
|
+
type: 'uint256';
|
|
360
|
+
}] ? true : false : TFn['name'] extends 'transferFrom' ? TFn['inputs'] extends readonly [
|
|
361
|
+
{
|
|
362
|
+
type: 'address';
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
type: 'address';
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
type: 'uint256';
|
|
369
|
+
}
|
|
370
|
+
] ? true : false : false;
|
|
371
|
+
type IsPayable<TFn extends AbiFunction> = TFn['stateMutability'] extends 'payable' ? true : false;
|
|
372
|
+
type SpendingLimitField<TFn extends AbiFunction> = IsERC20TransferLike<TFn> extends true ? {
|
|
373
|
+
spendingLimit?: {
|
|
374
|
+
token: Address;
|
|
375
|
+
amount: bigint;
|
|
376
|
+
};
|
|
377
|
+
} : {
|
|
378
|
+
spendingLimit?: never;
|
|
379
|
+
};
|
|
380
|
+
type ValueLimitField<TFn extends AbiFunction> = IsPayable<TFn> extends true ? {
|
|
381
|
+
valueLimit?: bigint;
|
|
382
|
+
} : {
|
|
383
|
+
valueLimit?: never;
|
|
384
|
+
};
|
|
385
|
+
type PermissionFunctionConfig<TFn extends AbiFunction> = {
|
|
386
|
+
/** `valueLimitPerUse` embedded in universal/arg-policy `ActionConfig`. */
|
|
387
|
+
valueLimitPerUse?: bigint;
|
|
388
|
+
params?: {
|
|
389
|
+
[K in NamedInputs<TFn>['name']]?: ParamConstraint<ParamValue<TFn, K>>;
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* Per-action call cap. Emits a standalone `usage-limit` policy.
|
|
393
|
+
* Counter is scoped to this single action — `transfer.maxUses=10` and
|
|
394
|
+
* `approve.maxUses=10` are independent counters.
|
|
395
|
+
*/
|
|
396
|
+
maxUses?: bigint;
|
|
397
|
+
/**
|
|
398
|
+
* Upper bound on `block.timestamp`. Pairs with `validAfter` into one
|
|
399
|
+
* `time-frame` policy. If only one of the two is set, the other defaults to
|
|
400
|
+
* "always passes" (validAfter=0 / validUntil=year-2100).
|
|
401
|
+
*/
|
|
402
|
+
validUntil?: Date;
|
|
403
|
+
/** Lower bound on `block.timestamp`. See `validUntil`. */
|
|
404
|
+
validAfter?: Date;
|
|
405
|
+
} & SpendingLimitField<TFn> & ValueLimitField<TFn>;
|
|
406
|
+
interface Permission<TAbi extends Abi = Abi> {
|
|
407
|
+
abi: TAbi;
|
|
408
|
+
address: Address;
|
|
409
|
+
functions: {
|
|
410
|
+
[K in FunctionNames<TAbi>]?: PermissionFunctionConfig<GetFunction<TAbi, K> & AbiFunction>;
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
type PermissionsForAbis<TAbis extends readonly Abi[]> = {
|
|
414
|
+
[K in keyof TAbis]: TAbis[K] extends Abi ? Permission<TAbis[K]> : never;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Per-session override for SmartSession policy singleton addresses.
|
|
418
|
+
*
|
|
419
|
+
* Defaults are the latest canonical V2 deployments. Provide a partial map to
|
|
420
|
+
* pin one or more policies to non-default addresses — primarily for backwards
|
|
421
|
+
* compatibility with accounts that already enabled sessions against the
|
|
422
|
+
* previous V1 deployments.
|
|
423
|
+
*
|
|
424
|
+
* Resolved addresses are baked into `Session.actions[i].actionPolicies[j].policy`
|
|
425
|
+
* at construction time, so this only needs to be set on `SessionDefinition` —
|
|
426
|
+
* downstream consumers read the already-resolved values off the `Session`.
|
|
427
|
+
*/
|
|
428
|
+
interface SessionPolicyAddresses {
|
|
429
|
+
sudo?: Address;
|
|
430
|
+
universalAction?: Address;
|
|
431
|
+
argPolicy?: Address;
|
|
432
|
+
spendingLimits?: Address;
|
|
433
|
+
timeFrame?: Address;
|
|
434
|
+
usageLimit?: Address;
|
|
435
|
+
valueLimit?: Address;
|
|
436
|
+
}
|
|
437
|
+
interface SessionDefinition<TAbis extends readonly Abi[] = readonly Abi[]> {
|
|
438
|
+
chain: Chain;
|
|
439
|
+
owners: OwnerSet;
|
|
440
|
+
permissions?: readonly [...PermissionsForAbis<TAbis>];
|
|
441
|
+
claimPolicies?: readonly Permit2ClaimPolicy[];
|
|
442
|
+
/**
|
|
443
|
+
* Cross-chain permits expanded by the SDK into matching
|
|
444
|
+
* {@link Permit2ClaimPolicy} (claim-side) plus action-level
|
|
445
|
+
* {@link SpendingLimitsPolicy} / {@link TimeFramePolicy} guardrails.
|
|
446
|
+
* See {@link CrossChainPermissionInput}.
|
|
447
|
+
*/
|
|
448
|
+
crossChainPermits?: readonly CrossChainPermissionInput[];
|
|
449
|
+
/**
|
|
450
|
+
* Override one or more SmartSession policy addresses. Defaults to the latest
|
|
451
|
+
* V2 deployments. Use to pin to V1 deployments for an account that already
|
|
452
|
+
* has sessions enabled against them.
|
|
453
|
+
*/
|
|
454
|
+
policyAddresses?: SessionPolicyAddresses;
|
|
455
|
+
}
|
|
456
|
+
type SessionInput<TAbis extends readonly Abi[] = readonly Abi[]> = Omit<SessionDefinition<TAbis>, 'chain'>;
|
|
457
|
+
interface ResolvedERC7739Content {
|
|
458
|
+
appDomainSeparator: Hex;
|
|
459
|
+
contentNames: readonly string[];
|
|
460
|
+
}
|
|
461
|
+
interface ResolvedPolicy {
|
|
462
|
+
policy: Address;
|
|
463
|
+
initData: Hex;
|
|
464
|
+
}
|
|
465
|
+
interface ResolvedERC7739Policies {
|
|
466
|
+
allowedERC7739Content: readonly ResolvedERC7739Content[];
|
|
467
|
+
erc1271Policies: readonly ResolvedPolicy[];
|
|
468
|
+
}
|
|
469
|
+
interface ResolvedAction {
|
|
470
|
+
actionTargetSelector: Hex;
|
|
471
|
+
actionTarget: Address;
|
|
472
|
+
actionPolicies: readonly ResolvedPolicy[];
|
|
473
|
+
}
|
|
474
|
+
interface Session {
|
|
475
|
+
chain: Chain;
|
|
476
|
+
owners: OwnerSet;
|
|
477
|
+
hasExplicitPermissions: boolean;
|
|
478
|
+
permissionId: Hex;
|
|
479
|
+
sessionValidator: Address;
|
|
480
|
+
sessionValidatorInitData: Hex;
|
|
481
|
+
salt: Hex;
|
|
482
|
+
erc7739Policies: ResolvedERC7739Policies;
|
|
483
|
+
actions: readonly ResolvedAction[];
|
|
484
|
+
claimPolicies: readonly Permit2ClaimPolicy[];
|
|
485
|
+
}
|
|
486
|
+
interface ModuleInput {
|
|
487
|
+
type: ModuleType;
|
|
488
|
+
address: Address;
|
|
489
|
+
initData?: Hex;
|
|
490
|
+
deInitData?: Hex;
|
|
491
|
+
additionalContext?: Hex;
|
|
492
|
+
}
|
|
493
|
+
interface RhinestoneAccountConfig {
|
|
494
|
+
account?: AccountProviderConfig;
|
|
495
|
+
owners?: OwnerSet;
|
|
496
|
+
sessions?: {
|
|
497
|
+
enabled: boolean;
|
|
498
|
+
module?: Address;
|
|
499
|
+
compatibilityFallback?: Address;
|
|
500
|
+
};
|
|
501
|
+
eoa?: Account;
|
|
502
|
+
modules?: ModuleInput[];
|
|
503
|
+
initData?: {
|
|
504
|
+
address: Address;
|
|
505
|
+
factory: Address;
|
|
506
|
+
factoryData: Hex;
|
|
507
|
+
intentExecutorInstalled: boolean;
|
|
508
|
+
} | {
|
|
509
|
+
address: Address;
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
interface ApiKeyAuth {
|
|
513
|
+
mode: 'apiKey';
|
|
514
|
+
apiKey: string;
|
|
515
|
+
}
|
|
516
|
+
interface JwtAuth {
|
|
517
|
+
mode: 'experimental_jwt';
|
|
518
|
+
/** Static access token, or async getter for refreshable tokens. */
|
|
519
|
+
accessToken: string | (() => Promise<string>);
|
|
520
|
+
/**
|
|
521
|
+
* Called when submitting a sponsored intent. Receives the raw intent
|
|
522
|
+
* input object and must return a signed intent_extension_token JWT.
|
|
523
|
+
*/
|
|
524
|
+
getIntentExtensionToken?: (intentInput: unknown) => Promise<string>;
|
|
525
|
+
}
|
|
526
|
+
type AuthConfig = ApiKeyAuth | JwtAuth;
|
|
527
|
+
interface RhinestoneSDKConfigBase {
|
|
528
|
+
provider?: ProviderConfig;
|
|
529
|
+
bundler?: BundlerConfig;
|
|
530
|
+
paymaster?: PaymasterConfig;
|
|
531
|
+
/**
|
|
532
|
+
* @internal
|
|
533
|
+
* Optional orchestrator URL override for internal testing - do not use
|
|
534
|
+
*/
|
|
535
|
+
endpointUrl?: string;
|
|
536
|
+
/**
|
|
537
|
+
* @internal
|
|
538
|
+
* Optional intent executor address override for internal testing - do not use
|
|
539
|
+
*/
|
|
540
|
+
useDevContracts?: boolean;
|
|
541
|
+
/**
|
|
542
|
+
* Optional custom headers sent with every orchestrator request.
|
|
543
|
+
*/
|
|
544
|
+
headers?: Record<string, string>;
|
|
545
|
+
}
|
|
546
|
+
type RhinestoneSDKConfig = RhinestoneSDKConfigBase & ({
|
|
547
|
+
/** @deprecated Use `auth` instead. Still supported for backward compatibility. */
|
|
548
|
+
apiKey: string;
|
|
549
|
+
} | {
|
|
550
|
+
auth: AuthConfig;
|
|
551
|
+
});
|
|
552
|
+
type RhinestoneConfig = RhinestoneAccountConfig & Partial<RhinestoneSDKConfig> & {
|
|
553
|
+
/** @internal Resolved auth provider — set by RhinestoneSDK, not by users. */
|
|
554
|
+
_authProvider?: AuthProvider;
|
|
555
|
+
};
|
|
556
|
+
type TokenSymbol = 'ETH' | 'WETH' | 'USDC' | 'USDT' | 'USDT0';
|
|
557
|
+
interface CalldataInput {
|
|
558
|
+
to: Address;
|
|
559
|
+
data?: Hex;
|
|
560
|
+
value?: bigint;
|
|
561
|
+
}
|
|
562
|
+
interface CallResolveContext {
|
|
563
|
+
config: RhinestoneConfig;
|
|
564
|
+
chain: Chain;
|
|
565
|
+
accountAddress: Address;
|
|
566
|
+
}
|
|
567
|
+
interface LazyCallInput {
|
|
568
|
+
resolve: (context: CallResolveContext) => Promise<CalldataInput | CalldataInput[]>;
|
|
569
|
+
}
|
|
570
|
+
type CallInput = CalldataInput | LazyCallInput;
|
|
571
|
+
interface Call {
|
|
572
|
+
to: Address;
|
|
573
|
+
data: Hex;
|
|
574
|
+
value: bigint;
|
|
575
|
+
}
|
|
576
|
+
type SourceCallProvidedFunds = {
|
|
577
|
+
token: Address;
|
|
578
|
+
amount: bigint;
|
|
579
|
+
};
|
|
580
|
+
type SourceCallInput = CallInput & {
|
|
581
|
+
provides?: SourceCallProvidedFunds[];
|
|
582
|
+
};
|
|
583
|
+
interface TokenRequestWithAmount {
|
|
584
|
+
address: Address;
|
|
585
|
+
amount: bigint;
|
|
586
|
+
}
|
|
587
|
+
interface TokenRequestWithoutAmount {
|
|
588
|
+
address: Address;
|
|
589
|
+
amount?: undefined;
|
|
590
|
+
}
|
|
591
|
+
type TokenRequest = TokenRequestWithAmount | TokenRequestWithoutAmount;
|
|
592
|
+
type TokenRequests = [TokenRequestWithoutAmount] | TokenRequestWithAmount[];
|
|
593
|
+
interface NonEvmTokenRequestWithAmount {
|
|
594
|
+
address: NonEvmAddress;
|
|
595
|
+
amount: bigint;
|
|
596
|
+
}
|
|
597
|
+
interface NonEvmTokenRequestWithoutAmount {
|
|
598
|
+
address: NonEvmAddress;
|
|
599
|
+
amount?: undefined;
|
|
600
|
+
}
|
|
601
|
+
type NonEvmTokenRequest = NonEvmTokenRequestWithAmount | NonEvmTokenRequestWithoutAmount;
|
|
602
|
+
type NonEvmTokenRequests = [NonEvmTokenRequestWithoutAmount] | NonEvmTokenRequestWithAmount[];
|
|
603
|
+
export type SimpleTokenList = Address[];
|
|
604
|
+
export type ChainTokenMap = Record<number, SimpleTokenList>;
|
|
605
|
+
export type ExactInputConfig = {
|
|
606
|
+
chain: Chain;
|
|
607
|
+
address: Address;
|
|
608
|
+
amount?: bigint;
|
|
609
|
+
};
|
|
610
|
+
type SourceAssetInput = SimpleTokenList | ChainTokenMap | ExactInputConfig[];
|
|
611
|
+
type OwnerSignerSet = {
|
|
612
|
+
type: 'owner';
|
|
613
|
+
kind: 'ecdsa';
|
|
614
|
+
accounts: Account[];
|
|
615
|
+
module?: Address;
|
|
616
|
+
} | {
|
|
617
|
+
type: 'owner';
|
|
618
|
+
kind: 'passkey';
|
|
619
|
+
accounts: WebAuthnAccount[];
|
|
620
|
+
module?: Address;
|
|
621
|
+
} | {
|
|
622
|
+
type: 'owner';
|
|
623
|
+
kind: 'multi-factor';
|
|
624
|
+
validators: ({
|
|
625
|
+
type: 'ecdsa';
|
|
626
|
+
id: number | Hex;
|
|
627
|
+
accounts: Account[];
|
|
628
|
+
} | {
|
|
629
|
+
type: 'passkey';
|
|
630
|
+
id: number | Hex;
|
|
631
|
+
accounts: WebAuthnAccount[];
|
|
632
|
+
})[];
|
|
633
|
+
module?: Address;
|
|
634
|
+
};
|
|
635
|
+
interface SessionEnableData {
|
|
636
|
+
userSignature: Hex;
|
|
637
|
+
hashesAndChainIds: {
|
|
638
|
+
chainId: bigint;
|
|
639
|
+
sessionDigest: Hex;
|
|
640
|
+
}[];
|
|
641
|
+
sessionToEnableIndex: number;
|
|
642
|
+
}
|
|
643
|
+
interface ChainSessionConfig {
|
|
644
|
+
session: Session;
|
|
645
|
+
enableData?: SessionEnableData;
|
|
646
|
+
}
|
|
647
|
+
interface SingleSessionSignerSet {
|
|
648
|
+
type: 'session';
|
|
649
|
+
session: Session;
|
|
650
|
+
enableData?: SessionEnableData;
|
|
651
|
+
}
|
|
652
|
+
interface PerChainSessionSignerSet {
|
|
653
|
+
type: 'session';
|
|
654
|
+
sessions: Record<number, ChainSessionConfig>;
|
|
655
|
+
}
|
|
656
|
+
type SessionSignerSet = SingleSessionSignerSet | PerChainSessionSignerSet;
|
|
657
|
+
type SignerSet = OwnerSignerSet | SessionSignerSet;
|
|
658
|
+
type Sponsorship = boolean | {
|
|
659
|
+
gas: boolean;
|
|
660
|
+
bridging: boolean;
|
|
661
|
+
swaps: boolean;
|
|
662
|
+
/**
|
|
663
|
+
* Sponsor the Rhinestone protocol fee (`protocolFees`) from the
|
|
664
|
+
* integrator's sponsorship balance instead of charging the user, without
|
|
665
|
+
* the sponsorship surcharge. Defaults to `false` in the object form; the
|
|
666
|
+
* `sponsored: true` shorthand enables it along with the other categories.
|
|
667
|
+
*/
|
|
668
|
+
protocolFees?: boolean;
|
|
669
|
+
};
|
|
670
|
+
interface BaseTransaction {
|
|
671
|
+
calls?: CallInput[];
|
|
672
|
+
/**
|
|
673
|
+
* Per-chain executions to run on the source side, before the claim.
|
|
674
|
+
* Keyed by chain ID (must be present in `sourceChains`, or equal the
|
|
675
|
+
* target chain for same-chain transactions). Bundled into the intent
|
|
676
|
+
* at routing time and covered by the user's mandate signature.
|
|
677
|
+
*
|
|
678
|
+
* Caveat: only executes if the orchestrator creates an element on the
|
|
679
|
+
* matching chain — i.e. when the intent actually moves tokens from
|
|
680
|
+
* that source. Sponsored / no-op fills with no source movement skip
|
|
681
|
+
* the source element entirely, and `sourceCalls` keyed on that chain
|
|
682
|
+
* are silently dropped.
|
|
683
|
+
*/
|
|
684
|
+
sourceCalls?: Record<number, SourceCallInput[]>;
|
|
685
|
+
gasLimit?: bigint;
|
|
686
|
+
signers?: SignerSet;
|
|
687
|
+
sponsored?: Sponsorship;
|
|
688
|
+
eip7702InitSignature?: Hex;
|
|
689
|
+
sourceAssets?: SourceAssetInput;
|
|
690
|
+
appFees?: AppFeeRate;
|
|
691
|
+
/**
|
|
692
|
+
* Rhinestone protocol fee rate in basis points of the input value (0–10000 =
|
|
693
|
+
* 0–100%). Collected alongside `appFees` in one batched transfer and always
|
|
694
|
+
* accrues to Rhinestone. Sponsor it via `sponsored.protocolFees` to charge
|
|
695
|
+
* the integrator's sponsorship balance instead of the user.
|
|
696
|
+
*/
|
|
697
|
+
protocolFees?: ProtocolFeeRate;
|
|
698
|
+
settlementLayers?: SettlementLayerFilter;
|
|
699
|
+
auxiliaryFunds?: AuxiliaryFunds;
|
|
700
|
+
experimental_accountOverride?: {
|
|
701
|
+
setupOps?: {
|
|
702
|
+
to: Address;
|
|
703
|
+
data: Hex;
|
|
704
|
+
}[];
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
interface SameChainTransaction extends BaseTransaction {
|
|
708
|
+
chain: Chain;
|
|
709
|
+
tokenRequests?: TokenRequests;
|
|
710
|
+
recipient?: RhinestoneAccountConfig | Address;
|
|
711
|
+
/**
|
|
712
|
+
* Absolute unix timestamp (seconds) overriding the on-chain fill deadline
|
|
713
|
+
* (default 2 min). Same-chain only — the field lives on this type precisely
|
|
714
|
+
* because the orchestrator honors it only on the same-chain (tokenless)
|
|
715
|
+
* route; cross-chain transactions cannot set it. Must be between
|
|
716
|
+
* `now + 120s` and `now + 86400s` (24h); out-of-range values are rejected
|
|
717
|
+
* by the orchestrator with a `400`. When honored, the quoted `expiresAt`
|
|
718
|
+
* and the bundle claim/nonce expiry track this value automatically.
|
|
719
|
+
*/
|
|
720
|
+
customDeadline?: number;
|
|
721
|
+
}
|
|
722
|
+
interface CrossChainEvmTransaction extends BaseTransaction {
|
|
723
|
+
sourceChains?: Chain[];
|
|
724
|
+
targetChain: Chain;
|
|
725
|
+
tokenRequests?: TokenRequests;
|
|
726
|
+
recipient?: RhinestoneAccountConfig | Address;
|
|
727
|
+
}
|
|
728
|
+
interface CrossChainNonEvmTransaction extends BaseTransaction {
|
|
729
|
+
sourceChains?: Chain[];
|
|
730
|
+
targetChain: NonEvmChain;
|
|
731
|
+
tokenRequests?: NonEvmTokenRequests;
|
|
732
|
+
recipient?: NonEvmAddress;
|
|
733
|
+
}
|
|
734
|
+
type CrossChainTransaction = CrossChainEvmTransaction | CrossChainNonEvmTransaction;
|
|
735
|
+
interface UserOperationTransaction {
|
|
736
|
+
calls: CallInput[];
|
|
737
|
+
gasLimit?: bigint;
|
|
738
|
+
signers?: SignerSet;
|
|
739
|
+
chain: Chain;
|
|
740
|
+
}
|
|
741
|
+
type Transaction = SameChainTransaction | CrossChainTransaction;
|
|
742
|
+
export type { AccountType, SafeAccount, NexusAccount, KernelAccount, StartaleAccount, HcaAccount, EoaAccount, RhinestoneAccountConfig, RhinestoneSDKConfig, RhinestoneConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, UserOperationTransaction, TokenSymbol, CalldataInput, LazyCallInput, CallInput, SourceCallProvidedFunds, SourceCallInput, CallResolveContext, Call, Sponsorship, TokenRequest, TokenRequests, NonEvmTokenRequest, NonEvmTokenRequests, SourceAssetInput, OwnerSet, OwnableValidatorConfig, ENSValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, ChainSessionConfig, SingleSessionSignerSet, PerChainSessionSignerSet, SessionSignerSet, SessionDefinition, SessionInput, SessionEnableData, Session, ModuleType, ModuleInput, Action, ScopedAction, FallbackAction, Permission, PermissionsForAbis, PermissionFunctionConfig, ParamConstraint, ResolvedAction, ResolvedERC7739Content, ResolvedERC7739Policies, ResolvedPolicy, Policy, Permit2ClaimPolicy, CrossChainPermit, CrossChainPermissionInput, FromLeg, ToLeg, CrossChainSettlementLayer, UniversalActionPolicyParamCondition, ArgPolicyExpression, SessionPolicyAddresses, ApiKeyAuth, JwtAuth, AuthConfig, };
|
|
743
|
+
//# sourceMappingURL=account.d.ts.map
|