@account-kit/wallet-client 0.1.0-alpha.7 → 0.1.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/capabilities/index.d.ts +3 -0
- package/dist/esm/capabilities/index.js +2 -0
- package/dist/esm/capabilities/index.js.map +1 -1
- package/dist/esm/capabilities/multiDimensionalNonce.d.ts +3 -0
- package/dist/esm/capabilities/multiDimensionalNonce.js +7 -0
- package/dist/esm/capabilities/multiDimensionalNonce.js.map +1 -0
- package/dist/esm/client/actions/prepareCalls.d.ts +1 -1
- package/dist/esm/client/actions/prepareCalls.js +1 -1
- package/dist/esm/client/actions/prepareCalls.js.map +1 -1
- package/dist/esm/client/actions/signPreparedCalls.js +26 -37
- package/dist/esm/client/actions/signPreparedCalls.js.map +1 -1
- package/dist/esm/client/actions/signSignatureRequest.d.ts +3 -2
- package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
- package/dist/esm/exports/internal.d.ts +1 -0
- package/dist/esm/exports/internal.js +1 -0
- package/dist/esm/exports/internal.js.map +1 -1
- package/dist/esm/isomorphic/actions/createSession.js +20 -5
- package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
- package/dist/esm/isomorphic/actions/prepareCalls.js +39 -17
- package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
- package/dist/esm/isomorphic/actions/sendPreparedCalls.js +62 -8
- package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
- package/dist/esm/isomorphic/client.d.ts +9 -0
- package/dist/esm/isomorphic/utils/7702.d.ts +6 -1
- package/dist/esm/isomorphic/utils/7702.js +26 -12
- package/dist/esm/isomorphic/utils/7702.js.map +1 -1
- package/dist/esm/isomorphic/utils/createAccount.d.ts +1 -0
- package/dist/esm/isomorphic/utils/createAccount.js +96 -34
- package/dist/esm/isomorphic/utils/createAccount.js.map +1 -1
- package/dist/esm/isomorphic/utils/supportsFeature.d.ts +4 -0
- package/dist/esm/isomorphic/utils/supportsFeature.js +21 -0
- package/dist/esm/isomorphic/utils/supportsFeature.js.map +1 -0
- package/dist/esm/rpc/request.d.ts +54 -0
- package/dist/esm/rpc/request.js +1 -0
- package/dist/esm/rpc/request.js.map +1 -1
- package/dist/esm/rpc/schema.d.ts +54 -0
- package/dist/esm/schemas.d.ts +35 -1
- package/dist/esm/schemas.js +56 -1
- package/dist/esm/schemas.js.map +1 -1
- package/dist/esm/types.d.ts +3 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils.d.ts +1 -0
- package/dist/esm/utils.js.map +1 -1
- package/dist/types/capabilities/index.d.ts +3 -0
- package/dist/types/capabilities/index.d.ts.map +1 -1
- package/dist/types/capabilities/multiDimensionalNonce.d.ts +4 -0
- package/dist/types/capabilities/multiDimensionalNonce.d.ts.map +1 -0
- package/dist/types/client/actions/prepareCalls.d.ts +1 -1
- package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -1
- package/dist/types/client/actions/signSignatureRequest.d.ts +3 -2
- package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
- package/dist/types/exports/internal.d.ts +1 -0
- package/dist/types/exports/internal.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
- package/dist/types/isomorphic/client.d.ts +9 -0
- package/dist/types/isomorphic/client.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/7702.d.ts +6 -1
- package/dist/types/isomorphic/utils/7702.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/createAccount.d.ts +1 -0
- package/dist/types/isomorphic/utils/createAccount.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/supportsFeature.d.ts +5 -0
- package/dist/types/isomorphic/utils/supportsFeature.d.ts.map +1 -0
- package/dist/types/rpc/request.d.ts +54 -0
- package/dist/types/rpc/request.d.ts.map +1 -1
- package/dist/types/rpc/schema.d.ts +54 -0
- package/dist/types/rpc/schema.d.ts.map +1 -1
- package/dist/types/schemas.d.ts +35 -1
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +1 -0
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/capabilities/index.ts +2 -0
- package/src/capabilities/multiDimensionalNonce.ts +7 -0
- package/src/client/actions/prepareCalls.ts +1 -1
- package/src/client/actions/signPreparedCalls.ts +42 -43
- package/src/client/actions/signSignatureRequest.ts +4 -2
- package/src/exports/internal.ts +1 -0
- package/src/isomorphic/actions/createSession.ts +25 -4
- package/src/isomorphic/actions/prepareCalls.ts +48 -21
- package/src/isomorphic/actions/sendPreparedCalls.ts +69 -9
- package/src/isomorphic/utils/7702.ts +41 -14
- package/src/isomorphic/utils/createAccount.ts +115 -35
- package/src/isomorphic/utils/supportsFeature.ts +34 -0
- package/src/rpc/request.ts +1 -0
- package/src/schemas.ts +94 -3
- package/src/types.ts +4 -0
- package/src/utils.ts +2 -0
package/dist/esm/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,IAAI,GAGL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,KAAK,EACL,KAAK,EACL,GAAG,EACH,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,WAAW,GACZ,MAAM,MAAM,CAAC;AAEd,MAAM,aAAa,GACjB,wEAAwE,CAAC;AAC3E,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAEjE,MAAM,iBAAiB,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CACT;YACE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YAC3B,IAAI,EAAE,gBAAgB;SACvB,EACD;YACE,WAAW,EAAE,uCAAuC;SACrD,CACF;KACF,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAC,SAAS,CAC7D,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,YAAY,CAAC,EACxE;IACE,WAAW,EAAE,4DAA4D;CAC1E,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAC,SAAS,CAC7D,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,YAAY,CAAC,EACxE;IACE,WAAW,EAAE,4DAA4D;CAC1E,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,IAAI,CAAC,SAAS,CAChE,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,YAAY,CAAC,EAC3E;IACE,WAAW,EAAE,gDAAgD;CAC9D,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CACtC;IACE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAC,KAAK,CACd,IAAI,CAAC,KAAK,CAAC;QACT,iCAAiC;QACjC,iCAAiC;QACjC,oCAAoC;KACrC,CAAC,CACH;CACF,EACD;IACE,WAAW,EAAE,yCAAyC;CACvD,CACF,CAAC","sourcesContent":["import {\n FormatRegistry,\n Type,\n type SchemaOptions,\n type Static,\n} from \"@sinclair/typebox\";\nimport { yParityToV } from \"ox/Signature\";\nimport {\n toHex,\n slice,\n pad,\n concat,\n hexToBigInt,\n serializeSignature,\n hexToNumber,\n parseSignature,\n numberToHex,\n} from \"viem\";\n\nconst UUID_V4_REGEX =\n /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\nFormatRegistry.Set(\"uuid\", (value) => UUID_V4_REGEX.test(value));\n\nconst BASE_64_URL_REGEX = /^[A-Za-z0-9_-]+$/; // Matches base64url encoded strings (without padding)\nFormatRegistry.Set(\"base64url\", (value) => BASE_64_URL_REGEX.test(value));\n\nexport const TypeHex = (options?: SchemaOptions) =>\n Type.TemplateLiteral(\"0x${string}\", {\n ...options,\n });\n\nexport const TypeAddress = Type.TemplateLiteral(\"0x${string}\", {});\n\nexport const TypeUuid = Type.String({\n format: \"uuid\",\n});\n\nexport const TypeBase64UrlEncodedString = Type.String({\n format: \"base64url\",\n});\n\n// BigInt is not json-serializable, so it must be encoded as a string.\nexport const TypeU256 = Type.Transform(Type.String({}))\n .Decode((value) => BigInt(value))\n .Encode((value) => toHex(value));\n\nexport const TypeU32 = Type.Transform(Type.String({}))\n .Decode((value) => Number.parseInt(value, 16))\n .Encode((value) => toHex(value));\n\nexport const TypeUserOperationRequest_v6 = Type.Object({\n sender: TypeAddress,\n nonce: TypeHex(),\n initCode: Type.Union([\n TypeHex({\n description: \"Present\",\n }),\n Type.Literal(\"0x\", {\n description: \"Absent\",\n }),\n ]),\n callData: TypeHex(),\n callGasLimit: TypeHex(),\n verificationGasLimit: TypeHex(),\n preVerificationGas: TypeHex(),\n maxFeePerGas: TypeHex(),\n maxPriorityFeePerGas: TypeHex(),\n paymasterAndData: Type.Union([\n TypeHex({\n description: \"Present\",\n }),\n Type.Literal(\"0x\", {\n description: \"Absent\",\n }),\n ]),\n signature: TypeHex(),\n});\n\nexport const TypeUserOperationRequest_v7 = Type.Object({\n sender: TypeAddress,\n nonce: TypeHex(),\n factory: Type.Optional(TypeAddress),\n factoryData: Type.Optional(TypeHex()),\n callData: TypeHex(),\n callGasLimit: TypeHex(),\n verificationGasLimit: TypeHex(),\n preVerificationGas: TypeHex(),\n maxFeePerGas: TypeHex(),\n maxPriorityFeePerGas: TypeHex(),\n paymaster: Type.Optional(TypeAddress),\n paymasterData: Type.Optional(TypeHex()),\n paymasterVerificationGasLimit: Type.Optional(TypeHex()),\n paymasterPostOpGasLimit: Type.Optional(TypeHex()),\n signature: TypeHex(),\n});\n\nexport const TypeEip7702UnsignedAuth = Type.Object({\n chainId: TypeHex(),\n address: TypeAddress,\n nonce: TypeHex(),\n});\n\nexport const TypeEip7702SignedAuth = Type.Intersect([\n TypeEip7702UnsignedAuth,\n Type.Object({\n r: TypeHex(),\n s: TypeHex(),\n yParity: TypeHex(),\n }),\n]);\n\nexport const TypeWebAuthnPublicKey = Type.Object({\n x: TypeU256,\n y: TypeU256,\n});\n\nexport const TypePersistedInitcode = Type.Object({\n factoryAddress: TypeAddress,\n initcode: Type.Union([\n Type.Object(\n {\n factoryType: Type.Literal(\"unknown\", {\n description: \"Unknown factory type\",\n }),\n factoryData: TypeHex({}),\n },\n {\n description: \"Unknown factory type\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Union([\n Type.Literal(\"LightAccountV2.0.0\"),\n Type.Literal(\"LightAccountV1.1.0\"),\n Type.Literal(\"LightAccountV1.0.2\"),\n Type.Literal(\"LightAccountV1.0.1\"),\n ]),\n salt: TypeU256,\n initialOwner: TypeAddress,\n },\n {\n description: \"Light Account\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Union([\n Type.Literal(\"MAv1.0.0-MultiOwner\"),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\"),\n ]),\n salt: TypeU256,\n initialOwners: Type.Array(TypeAddress),\n },\n {\n description: \"Multi-Owner Modular Account\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Literal(\"MAv1.0.0-MultiSig\"),\n salt: TypeU256,\n initialOwners: Type.Array(TypeAddress),\n threshold: TypeU256,\n },\n {\n description: \"Multi-Sig Modular Account\",\n },\n ),\n Type.Intersect([\n Type.Object({\n factoryType: Type.Literal(\"MAv2.0.0\"),\n salt: TypeU256,\n }),\n Type.Union([\n Type.Object(\n {\n mav2type: Type.Literal(\"ma-ssv\"),\n initialOwner: TypeAddress,\n entityId: TypeU32,\n },\n {\n description: \"Modular Account V2 SSV\",\n },\n ),\n Type.Object(\n {\n mav2type: Type.Literal(\"sma-b\"),\n initialOwner: TypeAddress,\n },\n {\n description: \"Modular Account V2 SMA-B\",\n },\n ),\n Type.Object(\n {\n mav2type: Type.Literal(\"ma-webauthn\"),\n initialOwner: TypeWebAuthnPublicKey,\n entityId: TypeU32,\n },\n {\n description: \"Modular Account V2 WebAuthn\",\n },\n ),\n ]),\n ]),\n ]),\n});\n\nexport const TypeSerializedInitcode = Type.Object({\n factoryType: Type.Union([\n Type.Literal(\"LightAccountV1.0.1\", { description: \"Light Account v1.0.1\" }),\n Type.Literal(\"LightAccountV1.0.2\", { description: \"Light Account v1.0.2\" }),\n Type.Literal(\"LightAccountV1.1.0\", { description: \"Light Account v1.1.0\" }),\n Type.Literal(\"LightAccountV2.0.0\", { description: \"Light Account v2.0.0\" }),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\", {\n description: \"Light Account v2.0.0 MultiOwner\",\n }),\n Type.Literal(\"MAv1.0.0-MultiOwner\", {\n description: \"Modular Account v1.0.0 MultiOwner\",\n }),\n Type.Literal(\"MAv1.0.0-MultiSig\", {\n description: \"Modular Account v1.0.0 MultiSig\",\n }),\n Type.Literal(\"MAv2.0.0-sma-b\", {\n description: \"Modular Account v2.0.0 SMA-B\",\n }),\n Type.Literal(\"MAv2.0.0-ma-ssv\", {\n description: \"Modular Account v2.0.0 SSV\",\n }),\n Type.Literal(\"MAv2.0.0-ma-webauthn\", {\n description: \"Modular Account v2.0.0 WebAuthn\",\n }),\n Type.Literal(\"unknown\", { description: \"Unknown factory type\" }),\n ]),\n factoryAddress: TypeAddress,\n factoryData: TypeHex({}),\n});\n\nexport const TypeCounterfactualInfo = Type.Intersect([\n Type.Object({\n accountAddress: TypeAddress,\n }),\n Type.Union([\n Type.Intersect(\n [\n Type.Object({\n type: Type.Literal(\"sca\"),\n }),\n TypePersistedInitcode,\n ],\n {\n description: \"Smart Contract Account\",\n },\n ),\n Type.Object(\n {\n type: Type.Literal(\"7702\"),\n implementationAddress: TypeAddress,\n },\n {\n description: \"7702 Account\",\n },\n ),\n ]),\n]);\nexport type TypeCounterfactualInfo = Static<typeof TypeCounterfactualInfo>;\n\nexport const TypeCreationOptions = Type.Optional(\n Type.Union([\n Type.Object(\n {\n // Optional b/c `sma-b` is the default if no accountType is specified.\n accountType: Type.Optional(Type.Literal(\"sma-b\")),\n salt: Type.Optional(TypeHex()),\n },\n {\n description: \"SMA-B account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"7702\"),\n // TODO: Add support for specifying a delegation address.\n // Currently we only support delegating to MAv2, and it's important\n // that wallet applications maintain a strict shortlist of well-known\n // accounts: https://github.com/ethereum/ERCs/pull/947/files#diff-dab085f963ca621595044bcbc0922705aa38b69f5bf8770dcb3d0496a633efcfR189\n // delegation: TypeAddress,\n },\n {\n description: \"7702 account type\",\n },\n ),\n ]),\n);\nexport type TypeCreationOptions = Static<typeof TypeCreationOptions>;\n\nexport type TypeAccountType = Exclude<\n Static<typeof TypeCreationOptions>,\n undefined\n>[\"accountType\"];\n\nexport const TypeSignatureType = Type.Union([\n Type.Literal(\"secp256k1\", { description: \"Secp256k1\" }),\n Type.Literal(\"ecdsa\", { description: \"ECDSA (alias for secp256k1)\" }),\n Type.Literal(\"contract\", { description: \"Contract\" }),\n]);\nexport type TypeSignatureType = Static<typeof TypeSignatureType>;\n\nexport const KeySigner = Type.Object({\n type: TypeSignatureType,\n publicKey: TypeHex({}),\n});\nexport type KeySigner = Static<typeof KeySigner>;\n\nexport const TTypedDataDefinition = Type.Transform(\n Type.Object({\n domain: Type.Optional(\n Type.Object({\n chainId: Type.Optional(Type.Integer()),\n name: Type.Optional(Type.String()),\n salt: Type.Optional(TypeHex()),\n verifyingContract: Type.Optional(TypeAddress),\n version: Type.Optional(Type.String()),\n }),\n ),\n types: Type.Record(\n Type.String(),\n Type.Array(\n Type.Object({\n name: Type.String(),\n type: Type.String(),\n }),\n ),\n ),\n primaryType: Type.String(),\n message: Type.Record(Type.String(), Type.Unknown()),\n }),\n)\n // No-op b/c Viem is happy w/ the encoded version too.\n .Decode((it) => it)\n // Encode the TypedDataDefinition into our json-serialized format.\n .Encode(({ domain, types, primaryType, message }) => {\n return {\n domain: {\n ...domain,\n chainId:\n typeof domain?.chainId === \"bigint\"\n ? Number(domain.chainId)\n : domain?.chainId,\n },\n types,\n primaryType,\n message: JSON.parse(\n JSON.stringify(message, (_, v) =>\n typeof v === \"bigint\" ? toHex(v) : v,\n ),\n ),\n };\n });\n\nexport const TypePersonalSignSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"personal_sign\"),\n data: Type.Union([\n Type.String({ minLength: 1, description: \"Message\" }),\n Type.Object(\n {\n raw: TypeHex(),\n },\n { description: \"Raw message\" },\n ),\n ]),\n },\n { description: \"Personal sign\" },\n);\n\nexport const TypeTypedDataSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"eth_signTypedData_v4\"),\n data: TTypedDataDefinition,\n },\n {\n description: \"Typed data\",\n },\n);\n\nexport const TypeAuthorizationSignatureRequest = Type.Object({\n type: Type.Literal(\"eip7702Auth\"),\n});\n\nexport const TypeSignatureRequest = Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n TypeAuthorizationSignatureRequest,\n]);\n\nexport const TypeCallId = Type.Transform(TypeHex())\n .Decode((value) => {\n return {\n chainId: toHex(hexToBigInt(slice(value, 0, 32))),\n hash: slice(value, 32),\n };\n })\n .Encode(({ chainId, hash }) => {\n const chainIdPadded = pad(chainId, { size: 32 });\n return concat([chainIdPadded, hash]);\n });\n\nexport const PreparedCall_UserOpV060 = Type.Object(\n {\n type: Type.Literal(\"user-operation-v060\", {\n description: \"User Operation (Entrypoint v0.6.0)\",\n }),\n data: Type.Omit(TypeUserOperationRequest_v6, [\"signature\"], {\n description: \"Unsigned User Operation (Entrypoint v0.6.0)\",\n }),\n chainId: TypeHex(),\n signatureRequest: Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n ]),\n },\n {\n description: \"Prepared User Operation (Entrypoint v0.6.0)\",\n },\n);\n\nexport const PreparedCall_UserOpV070 = Type.Object(\n {\n type: Type.Literal(\"user-operation-v070\", {\n description: \"User Operation (Entrypoint v0.7.0)\",\n }),\n data: Type.Omit(TypeUserOperationRequest_v7, [\"signature\"], {\n description: \"Unsigned User Operation (Entrypoint v0.7.0)\",\n }),\n chainId: TypeHex(),\n signatureRequest: Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n ]),\n },\n {\n description: \"Prepared User Operation (Entrypoint v0.7.0)\",\n },\n);\n\nexport const PreparedCall_Authorization = Type.Object(\n {\n type: Type.Literal(\"authorization\", {\n description: \"EIP-7702 Authorization Request\",\n }),\n data: Type.Omit(TypeEip7702UnsignedAuth, [\"chainId\"]),\n chainId: TypeHex(),\n signatureRequest: TypeAuthorizationSignatureRequest,\n },\n {\n description: \"Prepared EIP-7702 Authorization\",\n },\n);\n\nexport const TypeEdcsaSigData = Type.Union([\n TypeHex({\n description: \"Hex-encoded signature\",\n }),\n Type.Transform(\n Type.Object(\n {\n r: TypeHex(),\n s: TypeHex(),\n yParity: TypeHex(),\n },\n { description: \"r, s, yParity\" },\n ),\n )\n .Decode((sig) =>\n serializeSignature({ ...sig, yParity: hexToNumber(sig.yParity) }),\n )\n .Encode((hex) => {\n const parsed = parseSignature(hex);\n return {\n ...parsed,\n yParity: numberToHex(parsed.yParity),\n };\n }),\n Type.Transform(\n Type.Object(\n {\n r: TypeHex(),\n s: TypeHex(),\n v: TypeHex(),\n },\n {\n description: \"r, s, v\",\n },\n ),\n )\n .Decode((sig) => serializeSignature({ ...sig, v: hexToBigInt(sig.v) }))\n .Encode((hex) => {\n const parsed = parseSignature(hex);\n return {\n ...parsed,\n v: numberToHex(yParityToV(parsed.yParity)),\n };\n }),\n]);\n\nexport const TypeEcdsaSig = Type.Object({\n signature: Type.Union([\n Type.Object(\n {\n type: Type.Literal(\"secp256k1\"),\n data: TypeEdcsaSigData,\n },\n {\n description: \"Secp256k1 signature\",\n },\n ),\n Type.Object(\n {\n type: Type.Literal(\"ecdsa\"),\n data: TypeEdcsaSigData,\n },\n {\n description: \"ECDSA signature (alias for secp256k1)\",\n },\n ),\n ]),\n});\n\nexport const TypePrepareCall_UserOpV060_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_UserOpV060, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared User Operation (Entrypoint v0.6.0) with signature\",\n },\n);\n\nexport const TypePrepareCall_UserOpV070_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_UserOpV070, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared User Operation (Entrypoint v0.7.0) with signature\",\n },\n);\n\nexport const TypePrepareCall_Authorization_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_Authorization, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared EIP-7702 Authorization with signature\",\n },\n);\n\nexport const TypeCallArray = Type.Object(\n {\n type: Type.Literal(\"array\"),\n data: Type.Array(\n Type.Union([\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n TypePrepareCall_Authorization_Signed,\n ]),\n ),\n },\n {\n description: \"Array of prepared calls with signatures\",\n },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,IAAI,GAGL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,KAAK,EACL,KAAK,EACL,GAAG,EACH,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,WAAW,EAC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A4D;CAC1E,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,IAAI,CAAC,SAAS,CAChE,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,YAAY,CAAC,EAC3E;IACE,WAAW,EAAE,gDAAgD;CAC9D,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CACtC;IACE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAC,KAAK,CACd,IAAI,CAAC,KAAK,CAAC;QACT,iCAAiC;QACjC,iCAAiC;QACjC,oCAAoC;KACrC,CAAC,CACH;CACF,EACD;IACE,WAAW,EAAE,yCAAyC;CACvD,CACF,CAAC","sourcesContent":["import {\n FormatRegistry,\n Type,\n type SchemaOptions,\n type Static,\n} from \"@sinclair/typebox\";\nimport { yParityToV } from \"ox/Signature\";\nimport {\n toHex,\n slice,\n pad,\n concat,\n hexToBigInt,\n serializeSignature,\n hexToNumber,\n parseSignature,\n numberToHex,\n} from \"viem\";\nimport type { Expect } from \"./utils.ts\";\n\nconst UUID_V4_REGEX =\n /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\nFormatRegistry.Set(\"uuid\", (value) => UUID_V4_REGEX.test(value));\n\nconst BASE_64_URL_REGEX = /^[A-Za-z0-9_-]+$/; // Matches base64url encoded strings (without padding)\nFormatRegistry.Set(\"base64url\", (value) => BASE_64_URL_REGEX.test(value));\n\nexport const baseAccountTypes = [\n \"sma-b\",\n \"la-v2\",\n \"la-v2-multi-owner\",\n \"la-v1.0.1\",\n \"la-v1.0.2\",\n \"la-v1.1.0\",\n \"ma-v1-multi-owner\",\n] as const;\n\nexport type BaseAccountType = (typeof baseAccountTypes)[number];\n\nexport const accountTypes = [...baseAccountTypes, \"7702\"] as const;\n\nexport type AccountType = (typeof accountTypes)[number];\n\nexport const TypeHex = (options?: SchemaOptions) =>\n Type.TemplateLiteral(\"0x${string}\", {\n ...options,\n });\n\nexport const TypeAddress = Type.TemplateLiteral(\"0x${string}\", {});\n\nexport const TypeUuid = Type.String({\n format: \"uuid\",\n});\n\nexport const TypeBase64UrlEncodedString = Type.String({\n format: \"base64url\",\n});\n\n// BigInt is not json-serializable, so it must be encoded as a string.\nexport const TypeU256 = Type.Transform(Type.String({}))\n .Decode((value) => BigInt(value))\n .Encode((value) => toHex(value));\n\nexport const TypeU32 = Type.Transform(Type.String({}))\n .Decode((value) => Number.parseInt(value, 16))\n .Encode((value) => toHex(value));\n\nexport const TypeUserOperationRequest_v6 = Type.Object({\n sender: TypeAddress,\n nonce: TypeHex(),\n initCode: Type.Union([\n TypeHex({\n description: \"Present\",\n }),\n Type.Literal(\"0x\", {\n description: \"Absent\",\n }),\n ]),\n callData: TypeHex(),\n callGasLimit: TypeHex(),\n verificationGasLimit: TypeHex(),\n preVerificationGas: TypeHex(),\n maxFeePerGas: TypeHex(),\n maxPriorityFeePerGas: TypeHex(),\n paymasterAndData: Type.Union([\n TypeHex({\n description: \"Present\",\n }),\n Type.Literal(\"0x\", {\n description: \"Absent\",\n }),\n ]),\n signature: TypeHex(),\n});\n\nexport const TypeUserOperationRequest_v7 = Type.Object({\n sender: TypeAddress,\n nonce: TypeHex(),\n factory: Type.Optional(TypeAddress),\n factoryData: Type.Optional(TypeHex()),\n callData: TypeHex(),\n callGasLimit: TypeHex(),\n verificationGasLimit: TypeHex(),\n preVerificationGas: TypeHex(),\n maxFeePerGas: TypeHex(),\n maxPriorityFeePerGas: TypeHex(),\n paymaster: Type.Optional(TypeAddress),\n paymasterData: Type.Optional(TypeHex()),\n paymasterVerificationGasLimit: Type.Optional(TypeHex()),\n paymasterPostOpGasLimit: Type.Optional(TypeHex()),\n signature: TypeHex(),\n});\n\nexport const TypeEip7702UnsignedAuth = Type.Object({\n chainId: TypeHex(),\n address: TypeAddress,\n nonce: TypeHex(),\n});\n\nexport const TypeEip7702SignedAuth = Type.Intersect([\n TypeEip7702UnsignedAuth,\n Type.Object({\n r: TypeHex(),\n s: TypeHex(),\n yParity: TypeHex(),\n }),\n]);\n\nexport const TypeWebAuthnPublicKey = Type.Object({\n x: TypeU256,\n y: TypeU256,\n});\n\nexport const TypePersistedInitcode = Type.Object({\n factoryAddress: TypeAddress,\n initcode: Type.Union([\n Type.Object(\n {\n factoryType: Type.Literal(\"unknown\", {\n description: \"Unknown factory type\",\n }),\n factoryData: TypeHex({}),\n },\n {\n description: \"Unknown factory type\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Union([\n Type.Literal(\"LightAccountV2.0.0\"),\n Type.Literal(\"LightAccountV1.1.0\"),\n Type.Literal(\"LightAccountV1.0.2\"),\n Type.Literal(\"LightAccountV1.0.1\"),\n ]),\n salt: TypeU256,\n initialOwner: TypeAddress,\n },\n {\n description: \"Light Account\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Union([\n Type.Literal(\"MAv1.0.0-MultiOwner\"),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\"),\n ]),\n salt: TypeU256,\n initialOwners: Type.Array(TypeAddress),\n },\n {\n description: \"Multi-Owner Modular Account\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Literal(\"MAv1.0.0-MultiSig\"),\n salt: TypeU256,\n initialOwners: Type.Array(TypeAddress),\n threshold: TypeU256,\n },\n {\n description: \"Multi-Sig Modular Account\",\n },\n ),\n Type.Intersect([\n Type.Object({\n factoryType: Type.Literal(\"MAv2.0.0\"),\n salt: TypeU256,\n }),\n Type.Union([\n Type.Object(\n {\n mav2type: Type.Literal(\"ma-ssv\"),\n initialOwner: TypeAddress,\n entityId: TypeU32,\n },\n {\n description: \"Modular Account V2 SSV\",\n },\n ),\n Type.Object(\n {\n mav2type: Type.Literal(\"sma-b\"),\n initialOwner: TypeAddress,\n },\n {\n description: \"Modular Account V2 SMA-B\",\n },\n ),\n Type.Object(\n {\n mav2type: Type.Literal(\"ma-webauthn\"),\n initialOwner: TypeWebAuthnPublicKey,\n entityId: TypeU32,\n },\n {\n description: \"Modular Account V2 WebAuthn\",\n },\n ),\n ]),\n ]),\n ]),\n});\n\nexport const TypeSerializedInitcode = Type.Object({\n factoryType: Type.Union([\n Type.Literal(\"LightAccountV1.0.1\", { description: \"Light Account v1.0.1\" }),\n Type.Literal(\"LightAccountV1.0.2\", { description: \"Light Account v1.0.2\" }),\n Type.Literal(\"LightAccountV1.1.0\", { description: \"Light Account v1.1.0\" }),\n Type.Literal(\"LightAccountV2.0.0\", { description: \"Light Account v2.0.0\" }),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\", {\n description: \"Light Account v2.0.0 MultiOwner\",\n }),\n Type.Literal(\"MAv1.0.0-MultiOwner\", {\n description: \"Modular Account v1.0.0 MultiOwner\",\n }),\n Type.Literal(\"MAv1.0.0-MultiSig\", {\n description: \"Modular Account v1.0.0 MultiSig\",\n }),\n Type.Literal(\"MAv2.0.0-sma-b\", {\n description: \"Modular Account v2.0.0 SMA-B\",\n }),\n Type.Literal(\"MAv2.0.0-ma-ssv\", {\n description: \"Modular Account v2.0.0 SSV\",\n }),\n Type.Literal(\"MAv2.0.0-ma-webauthn\", {\n description: \"Modular Account v2.0.0 WebAuthn\",\n }),\n Type.Literal(\"unknown\", { description: \"Unknown factory type\" }),\n ]),\n factoryAddress: TypeAddress,\n factoryData: TypeHex({}),\n});\n\nexport const TypeCounterfactualInfo = Type.Intersect([\n Type.Object({\n accountAddress: TypeAddress,\n }),\n Type.Union([\n Type.Intersect(\n [\n Type.Object({\n type: Type.Literal(\"sca\"),\n }),\n TypePersistedInitcode,\n ],\n {\n description: \"Smart Contract Account\",\n },\n ),\n Type.Object(\n {\n type: Type.Literal(\"7702\"),\n implementationAddress: TypeAddress,\n },\n {\n description: \"7702 Account\",\n },\n ),\n ]),\n]);\nexport type TypeCounterfactualInfo = Static<typeof TypeCounterfactualInfo>;\n\nexport const TypeCreationOptions = Type.Optional(\n Type.Union([\n Type.Object(\n {\n // Optional b/c `sma-b` is the default if no accountType is specified.\n accountType: Type.Optional(Type.Literal(\"sma-b\")),\n salt: Type.Optional(TypeHex()),\n },\n {\n description: \"Modular Account V2 SMA-B account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"la-v2\"),\n salt: Type.Optional(TypeHex()),\n },\n {\n description: \"Light Account V2 account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"la-v2-multi-owner\"),\n salt: Type.Optional(TypeHex()),\n initialOwners: Type.Optional(\n Type.Array(TypeAddress, {\n description:\n \"The initial owners of the account. The signer address will be implicitly added if not specified in this list.\",\n }),\n ),\n },\n {\n description: \"Light Account V2 Multi-Owner account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"la-v1.0.1\"),\n salt: Type.Optional(TypeHex()),\n },\n {\n description: \"Light Account V1.0.1 account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"la-v1.0.2\"),\n salt: Type.Optional(TypeHex()),\n },\n {\n description: \"Light Account V1.0.2 account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"la-v1.1.0\"),\n salt: Type.Optional(TypeHex()),\n },\n {\n description: \"Light Account V1.1.0 account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"ma-v1-multi-owner\"),\n salt: Type.Optional(TypeHex()),\n initialOwners: Type.Optional(\n Type.Array(TypeAddress, {\n description:\n \"The initial owners of the account. The signer address will be implicitly added if not specified in this list.\",\n }),\n ),\n },\n {\n description: \"Modular Account V1 Multi-Owner account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"7702\"),\n // TODO: Add support for specifying a delegation address.\n // Currently we only support delegating to MAv2, and it's important\n // that wallet applications maintain a strict shortlist of well-known\n // accounts: https://github.com/ethereum/ERCs/pull/947/files#diff-dab085f963ca621595044bcbc0922705aa38b69f5bf8770dcb3d0496a633efcfR189\n // delegation: TypeAddress,\n },\n {\n description: \"7702 account type\",\n },\n ),\n ]),\n);\nexport type TypeCreationOptions = Static<typeof TypeCreationOptions>;\n\ntype BaseAccountTypeExhaustive = BaseAccountType extends Exclude<\n Static<typeof TypeCreationOptions>,\n undefined\n>[\"accountType\"]\n ? true\n : \"BaseAccountType values not fully covered in TypeCreationOptions\";\n\n// Compile-time assertion that TypeCreationOptions covers all BaseAccountType values.\ntype _AssertBaseAccountTypeExhaustive = Expect<BaseAccountTypeExhaustive>;\n\nexport const TypeSignatureType = Type.Union([\n Type.Literal(\"secp256k1\", { description: \"Secp256k1\" }),\n Type.Literal(\"ecdsa\", { description: \"ECDSA (alias for secp256k1)\" }),\n Type.Literal(\"contract\", { description: \"Contract\" }),\n]);\nexport type TypeSignatureType = Static<typeof TypeSignatureType>;\n\nexport const KeySigner = Type.Object({\n type: TypeSignatureType,\n publicKey: TypeHex({}),\n});\nexport type KeySigner = Static<typeof KeySigner>;\n\nexport const TTypedDataDefinition = Type.Transform(\n Type.Object({\n domain: Type.Optional(\n Type.Object({\n chainId: Type.Optional(Type.Integer()),\n name: Type.Optional(Type.String()),\n salt: Type.Optional(TypeHex()),\n verifyingContract: Type.Optional(TypeAddress),\n version: Type.Optional(Type.String()),\n }),\n ),\n types: Type.Record(\n Type.String(),\n Type.Array(\n Type.Object({\n name: Type.String(),\n type: Type.String(),\n }),\n ),\n ),\n primaryType: Type.String(),\n message: Type.Record(Type.String(), Type.Unknown()),\n }),\n)\n // No-op b/c Viem is happy w/ the encoded version too.\n .Decode((it) => it)\n // Encode the TypedDataDefinition into our json-serialized format.\n .Encode(({ domain, types, primaryType, message }) => {\n return {\n domain: {\n ...domain,\n chainId:\n typeof domain?.chainId === \"bigint\"\n ? Number(domain.chainId)\n : domain?.chainId,\n },\n types,\n primaryType,\n message: JSON.parse(\n JSON.stringify(message, (_, v) =>\n typeof v === \"bigint\" ? toHex(v) : v,\n ),\n ),\n };\n });\n\nexport const TypePersonalSignSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"personal_sign\"),\n data: Type.Union([\n Type.String({ minLength: 1, description: \"Message\" }),\n Type.Object(\n {\n raw: TypeHex(),\n },\n { description: \"Raw message\" },\n ),\n ]),\n rawPayload: TypeHex(),\n },\n { description: \"Personal sign\" },\n);\n\nexport const TypeTypedDataSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"eth_signTypedData_v4\"),\n data: TTypedDataDefinition,\n rawPayload: TypeHex(),\n },\n {\n description: \"Typed data\",\n },\n);\n\nexport const TypeAuthorizationSignatureRequest = Type.Object({\n type: Type.Literal(\"eip7702Auth\"),\n rawPayload: TypeHex(),\n});\n\nexport const TypeSignatureRequest = Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n TypeAuthorizationSignatureRequest,\n]);\n\nexport const TypeCallId = Type.Transform(TypeHex())\n .Decode((value) => {\n return {\n chainId: toHex(hexToBigInt(slice(value, 0, 32))),\n hash: slice(value, 32),\n };\n })\n .Encode(({ chainId, hash }) => {\n const chainIdPadded = pad(chainId, { size: 32 });\n return concat([chainIdPadded, hash]);\n });\n\nexport const PreparedCall_UserOpV060 = Type.Object(\n {\n type: Type.Literal(\"user-operation-v060\", {\n description: \"User Operation (Entrypoint v0.6.0)\",\n }),\n data: Type.Omit(TypeUserOperationRequest_v6, [\"signature\"], {\n description: \"Unsigned User Operation (Entrypoint v0.6.0)\",\n }),\n chainId: TypeHex(),\n signatureRequest: Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n ]),\n },\n {\n description: \"Prepared User Operation (Entrypoint v0.6.0)\",\n },\n);\n\nexport const PreparedCall_UserOpV070 = Type.Object(\n {\n type: Type.Literal(\"user-operation-v070\", {\n description: \"User Operation (Entrypoint v0.7.0)\",\n }),\n data: Type.Omit(TypeUserOperationRequest_v7, [\"signature\"], {\n description: \"Unsigned User Operation (Entrypoint v0.7.0)\",\n }),\n chainId: TypeHex(),\n signatureRequest: Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n ]),\n },\n {\n description: \"Prepared User Operation (Entrypoint v0.7.0)\",\n },\n);\n\nexport const PreparedCall_Authorization = Type.Object(\n {\n type: Type.Literal(\"authorization\", {\n description: \"EIP-7702 Authorization Request\",\n }),\n data: Type.Omit(TypeEip7702UnsignedAuth, [\"chainId\"]),\n chainId: TypeHex(),\n signatureRequest: TypeAuthorizationSignatureRequest,\n },\n {\n description: \"Prepared EIP-7702 Authorization\",\n },\n);\n\nexport const TypeEdcsaSigData = Type.Union([\n TypeHex({\n description: \"Hex-encoded signature\",\n }),\n Type.Transform(\n Type.Object(\n {\n r: TypeHex(),\n s: TypeHex(),\n yParity: TypeHex(),\n },\n { description: \"r, s, yParity\" },\n ),\n )\n .Decode((sig) =>\n serializeSignature({ ...sig, yParity: hexToNumber(sig.yParity) }),\n )\n .Encode((hex) => {\n const parsed = parseSignature(hex);\n return {\n ...parsed,\n yParity: numberToHex(parsed.yParity),\n };\n }),\n Type.Transform(\n Type.Object(\n {\n r: TypeHex(),\n s: TypeHex(),\n v: TypeHex(),\n },\n {\n description: \"r, s, v\",\n },\n ),\n )\n .Decode((sig) => serializeSignature({ ...sig, v: hexToBigInt(sig.v) }))\n .Encode((hex) => {\n const parsed = parseSignature(hex);\n return {\n ...parsed,\n v: numberToHex(yParityToV(parsed.yParity)),\n };\n }),\n]);\n\nexport const TypeEcdsaSig = Type.Object({\n signature: Type.Union([\n Type.Object(\n {\n type: Type.Literal(\"secp256k1\"),\n data: TypeEdcsaSigData,\n },\n {\n description: \"Secp256k1 signature\",\n },\n ),\n Type.Object(\n {\n type: Type.Literal(\"ecdsa\"),\n data: TypeEdcsaSigData,\n },\n {\n description: \"ECDSA signature (alias for secp256k1)\",\n },\n ),\n ]),\n});\n\nexport const TypePrepareCall_UserOpV060_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_UserOpV060, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared User Operation (Entrypoint v0.6.0) with signature\",\n },\n);\n\nexport const TypePrepareCall_UserOpV070_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_UserOpV070, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared User Operation (Entrypoint v0.7.0) with signature\",\n },\n);\n\nexport const TypePrepareCall_Authorization_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_Authorization, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared EIP-7702 Authorization with signature\",\n },\n);\n\nexport const TypeCallArray = Type.Object(\n {\n type: Type.Literal(\"array\"),\n data: Type.Array(\n Type.Union([\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n TypePrepareCall_Authorization_Signed,\n ]),\n ),\n },\n {\n description: \"Array of prepared calls with signatures\",\n },\n);\n"]}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -36,3 +36,6 @@ export type InnerWalletApiClient = InnerWalletApiClientBase<InnerClientActions &
|
|
|
36
36
|
export type WithoutChainId<T> = T extends {
|
|
37
37
|
chainId: Hex;
|
|
38
38
|
} ? Omit<T, "chainId"> : T;
|
|
39
|
+
export type WithoutRawPayload<T> = T extends {
|
|
40
|
+
rawPayload: Hex;
|
|
41
|
+
} ? Omit<T, "rawPayload"> : T;
|
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SmartAccountSigner, SmartContractAccount } from \"@aa-sdk/core\";\nimport type { AlchemyTransport } from \"@account-kit/infra\";\nimport type {\n Address,\n Chain,\n Client,\n Hex,\n JsonRpcAccount,\n Transport,\n} from \"viem\";\nimport type {\n GrantPermissionsParams,\n GrantPermissionsResult,\n} from \"./client/actions/grantPermissions.ts\";\nimport type { RequestAccountParams } from \"./client/actions/requestAccount.ts\";\nimport type { WalletServerViemRpcSchema } from \"./rpc/schema.ts\";\n\nexport type CreateInnerClientParams<\n TAccount extends Address | undefined = Address | undefined,\n> = {\n chain: Chain;\n transport: AlchemyTransport;\n policyId?: string;\n account?: TAccount | Address | undefined;\n};\n\nexport type InnerWalletApiClientBase<\n TExtend extends { [key: string]: unknown } | undefined =\n | { [key: string]: unknown }\n | undefined,\n> = Client<\n Transport,\n Chain,\n JsonRpcAccount<Address> | undefined,\n WalletServerViemRpcSchema,\n { policyId?: string } & TExtend\n>;\n\nexport type InnerClientActions = {\n grantPermissions: (\n signer: SmartAccountSigner,\n params: GrantPermissionsParams & { chainId: Hex },\n ) => Promise<GrantPermissionsResult>;\n};\n\nexport type CachedAccount = {\n account: SmartContractAccount;\n requestParams: RequestAccountParams;\n};\n\nexport type InternalState = {\n setAccount: (account: CachedAccount) => void;\n getAccount: () => CachedAccount | undefined;\n};\n\nexport type InnerWalletApiClient = InnerWalletApiClientBase<\n InnerClientActions & { internal: InternalState }\n>;\n\nexport type WithoutChainId<T> = T extends { chainId: Hex }\n ? Omit<T, \"chainId\">\n : T;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SmartAccountSigner, SmartContractAccount } from \"@aa-sdk/core\";\nimport type { AlchemyTransport } from \"@account-kit/infra\";\nimport type {\n Address,\n Chain,\n Client,\n Hex,\n JsonRpcAccount,\n Transport,\n} from \"viem\";\nimport type {\n GrantPermissionsParams,\n GrantPermissionsResult,\n} from \"./client/actions/grantPermissions.ts\";\nimport type { RequestAccountParams } from \"./client/actions/requestAccount.ts\";\nimport type { WalletServerViemRpcSchema } from \"./rpc/schema.ts\";\n\nexport type CreateInnerClientParams<\n TAccount extends Address | undefined = Address | undefined,\n> = {\n chain: Chain;\n transport: AlchemyTransport;\n policyId?: string;\n account?: TAccount | Address | undefined;\n};\n\nexport type InnerWalletApiClientBase<\n TExtend extends { [key: string]: unknown } | undefined =\n | { [key: string]: unknown }\n | undefined,\n> = Client<\n Transport,\n Chain,\n JsonRpcAccount<Address> | undefined,\n WalletServerViemRpcSchema,\n { policyId?: string } & TExtend\n>;\n\nexport type InnerClientActions = {\n grantPermissions: (\n signer: SmartAccountSigner,\n params: GrantPermissionsParams & { chainId: Hex },\n ) => Promise<GrantPermissionsResult>;\n};\n\nexport type CachedAccount = {\n account: SmartContractAccount;\n requestParams: RequestAccountParams;\n};\n\nexport type InternalState = {\n setAccount: (account: CachedAccount) => void;\n getAccount: () => CachedAccount | undefined;\n};\n\nexport type InnerWalletApiClient = InnerWalletApiClientBase<\n InnerClientActions & { internal: InternalState }\n>;\n\nexport type WithoutChainId<T> = T extends { chainId: Hex }\n ? Omit<T, \"chainId\">\n : T;\n\nexport type WithoutRawPayload<T> = T extends { rawPayload: Hex }\n ? Omit<T, \"rawPayload\">\n : T;\n"]}
|
package/dist/esm/utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Hex } from "viem";
|
|
2
|
+
export type Expect<T extends true> = T;
|
|
2
3
|
export declare const assertNever: (_val: never, msg: string) => never;
|
|
3
4
|
/** If the value is already Hex, it is returned unchanged. If it's a string, number or bigint, it's converted. */
|
|
4
5
|
export declare const castToHex: (val: string | number | bigint | Hex) => Hex;
|
package/dist/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAY,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAY,MAAM,MAAM,CAAC;AAI9C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAW,EAAE,GAAW,EAAS,EAAE;IAC7D,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,iHAAiH;AACjH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAmC,EAAO,EAAE;IACpE,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACf,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CAAC","sourcesContent":["import { isHex, toHex, type Hex } from \"viem\";\n\nexport type Expect<T extends true> = T;\n\nexport const assertNever = (_val: never, msg: string): never => {\n throw new Error(msg);\n};\n\n/** If the value is already Hex, it is returned unchanged. If it's a string, number or bigint, it's converted. */\nexport const castToHex = (val: string | number | bigint | Hex): Hex => {\n if (isHex(val)) {\n return val;\n }\n return toHex(val);\n};\n"]}
|
|
@@ -35,5 +35,8 @@ export declare const Capabilities: import("@sinclair/typebox").TObject<{
|
|
|
35
35
|
account: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
36
36
|
delegation: import("@sinclair/typebox").TUnion<(import("@sinclair/typebox").TLiteral<"0x69007702764179f14F51cdce752f4f775d74E139"> | import("@sinclair/typebox").TLiteral<"ModularAccountV2">)[]>;
|
|
37
37
|
}>, import("@sinclair/typebox").TLiteral<true>]>>;
|
|
38
|
+
nonceOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
39
|
+
nonceKey: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
40
|
+
}>>;
|
|
38
41
|
}>;
|
|
39
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/capabilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/capabilities/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiDimensionalNonce.d.ts","sourceRoot":"","sources":["../../../src/capabilities/multiDimensionalNonce.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,+BAA+B;;EAG1C,CAAC"}
|
|
@@ -26,7 +26,7 @@ export type PrepareCallsResult = IsomorphicPrepareCallsResult;
|
|
|
26
26
|
* the user operation data and signature request
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
* // Prepare a
|
|
29
|
+
* // Prepare a sponsored user operation call
|
|
30
30
|
* const result = await client.prepareCalls({
|
|
31
31
|
* calls: [{
|
|
32
32
|
* to: "0x1234...",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"signPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAOhE,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CACnF,CAAC,CAAC,CAAC,CAAC;AAEL;;;;;;IAMI;AACJ,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CA2ClC"}
|
|
@@ -3,9 +3,10 @@ import type { Static } from "@sinclair/typebox";
|
|
|
3
3
|
import { type Hex } from "viem";
|
|
4
4
|
import { TypeAuthorizationSignatureRequest, TypePersonalSignSignatureRequest, TypeTypedDataSignatureRequest } from "../../schemas.js";
|
|
5
5
|
import { TypeEip7702UnsignedAuth } from "../../schemas.js";
|
|
6
|
-
|
|
6
|
+
import type { WithoutRawPayload } from "../../types.ts";
|
|
7
|
+
export type SignSignatureRequestParams = WithoutRawPayload<Static<typeof TypePersonalSignSignatureRequest> | Static<typeof TypeTypedDataSignatureRequest> | (Static<typeof TypeAuthorizationSignatureRequest> & {
|
|
7
8
|
data: Static<typeof TypeEip7702UnsignedAuth>;
|
|
8
|
-
})
|
|
9
|
+
})>;
|
|
9
10
|
export type SignSignatureRequestResult = {
|
|
10
11
|
type: "secp256k1";
|
|
11
12
|
data: Hex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,GAAG,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,GAAG,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CACtD,MAAM,CAAC,OAAO,gCAAgC,CAAC,GAC/C,MAAM,CAAC,OAAO,6BAA6B,CAAC,GAC5C,CAAC,MAAM,CAAC,OAAO,iCAAiC,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;CAC9C,CAAC,CACL,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAoCrC"}
|
|
@@ -5,6 +5,7 @@ export * from "../capabilities/permissions/mav2.js";
|
|
|
5
5
|
export type * from "../isomorphic/client.js";
|
|
6
6
|
export { createIsomorphicClient } from "../isomorphic/client.js";
|
|
7
7
|
export { createDummySigner } from "../isomorphic/utils/createDummySigner.js";
|
|
8
|
+
export { prepareInitialOwners } from "../isomorphic/utils/createAccount.js";
|
|
8
9
|
export * from "../rpc/request.js";
|
|
9
10
|
export * as RpcSchemas from "../rpc/request.js";
|
|
10
11
|
export * from "../rpc/schema.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/exports/internal.ts"],"names":[],"mappings":"AAGA,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,mBAAmB,yBAAyB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,mBAAmB,aAAa,CAAC;AACjC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/exports/internal.ts"],"names":[],"mappings":"AAGA,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,mBAAmB,yBAAyB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,mBAAmB,aAAa,CAAC;AACjC,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/createSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL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yB,CAC1B,EACD,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAoG9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareCalls.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/prepareCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"prepareCalls.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/prepareCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAML,KAAK,KAAK,EACV,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAQrE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,MAAM,CACJ,CAAC,OAAO,mBAAmB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAC9E,CAAC,CAAC,CAAC,EACJ,SAAS,CACV,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CACrC,CAAC,OAAO,mBAAmB,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CACzD,CAAC;AAEF,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA4H7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/sendPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EASL,KAAK,KAAK,EAEV,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAKrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CACnF,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CAC9D,CAAC;AAGF,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"sendPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/sendPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EASL,KAAK,KAAK,EAEV,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAKrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CACnF,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CAC9D,CAAC;AAGF,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAwLlC"}
|
|
@@ -50,11 +50,13 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
50
50
|
[x: string]: unknown;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
+
rawPayload: `0x${string}`;
|
|
53
54
|
} | {
|
|
54
55
|
type: "personal_sign";
|
|
55
56
|
data: string | {
|
|
56
57
|
raw: `0x${string}`;
|
|
57
58
|
};
|
|
59
|
+
rawPayload: `0x${string}`;
|
|
58
60
|
};
|
|
59
61
|
} | {
|
|
60
62
|
type: "user-operation-v070";
|
|
@@ -96,11 +98,13 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
96
98
|
[x: string]: unknown;
|
|
97
99
|
};
|
|
98
100
|
};
|
|
101
|
+
rawPayload: `0x${string}`;
|
|
99
102
|
} | {
|
|
100
103
|
type: "personal_sign";
|
|
101
104
|
data: string | {
|
|
102
105
|
raw: `0x${string}`;
|
|
103
106
|
};
|
|
107
|
+
rawPayload: `0x${string}`;
|
|
104
108
|
};
|
|
105
109
|
} | {
|
|
106
110
|
type: "authorization";
|
|
@@ -111,6 +115,7 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
111
115
|
};
|
|
112
116
|
signatureRequest: {
|
|
113
117
|
type: "eip7702Auth";
|
|
118
|
+
rawPayload: `0x${string}`;
|
|
114
119
|
};
|
|
115
120
|
})[];
|
|
116
121
|
} | {
|
|
@@ -149,11 +154,13 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
149
154
|
[x: string]: unknown;
|
|
150
155
|
};
|
|
151
156
|
};
|
|
157
|
+
rawPayload: `0x${string}`;
|
|
152
158
|
} | {
|
|
153
159
|
type: "personal_sign";
|
|
154
160
|
data: string | {
|
|
155
161
|
raw: `0x${string}`;
|
|
156
162
|
};
|
|
163
|
+
rawPayload: `0x${string}`;
|
|
157
164
|
};
|
|
158
165
|
} | {
|
|
159
166
|
type: "user-operation-v070";
|
|
@@ -195,11 +202,13 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
195
202
|
[x: string]: unknown;
|
|
196
203
|
};
|
|
197
204
|
};
|
|
205
|
+
rawPayload: `0x${string}`;
|
|
198
206
|
} | {
|
|
199
207
|
type: "personal_sign";
|
|
200
208
|
data: string | {
|
|
201
209
|
raw: `0x${string}`;
|
|
202
210
|
};
|
|
211
|
+
rawPayload: `0x${string}`;
|
|
203
212
|
};
|
|
204
213
|
}>;
|
|
205
214
|
sendPreparedCalls: (params: SendPreparedCallsParams) => Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/isomorphic/client.ts"],"names":[],"mappings":"AAAA,OAAO,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,CAAC;AACrC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAC;AAGxC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B;2BAGwB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCACb,uBAAuB;;;6BAE1B,oBAAoB;;;;;;;;;;;;;;;;;;4BAErB,mBAAmB;EAG9C;AAID,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,SAAS,EACT,QAAQ,EACR,oBAA2B,GAC5B,EAAE,YAAY,GAAG,kBAAkB,CAClC,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,UAAU,CAAC,OAAO,uBAAuB,CAAC,EAC1C,yBAAyB,GAAG,2BAA2B,CACxD,CAmBA;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -4,10 +4,15 @@ import type { WalletServerViemRpcSchema } from "../../rpc/schema.js";
|
|
|
4
4
|
import { PreparedCall_Authorization } from "../../schemas.js";
|
|
5
5
|
import type { Eip7702AuthCapability } from "../../capabilities/eip7702Auth.ts";
|
|
6
6
|
import type { Static } from "@sinclair/typebox";
|
|
7
|
+
/** Checks if an address is actively delegated on-chain. */
|
|
8
|
+
export declare const isDelegated: (client: SmartAccountClient<Transport, Chain, SmartContractAccount | undefined, Record<string, unknown>, WalletServerViemRpcSchema>, params: {
|
|
9
|
+
address: Address;
|
|
10
|
+
delegation: Address;
|
|
11
|
+
}) => Promise<boolean>;
|
|
7
12
|
export declare const createAuthorizationRequest: (client: SmartAccountClient<Transport, Chain, SmartContractAccount | undefined, Record<string, unknown>, WalletServerViemRpcSchema>, params: {
|
|
8
13
|
address: Address;
|
|
9
14
|
delegation: Address;
|
|
10
|
-
}) => Promise<Static<typeof PreparedCall_Authorization
|
|
15
|
+
}) => Promise<Static<typeof PreparedCall_Authorization>>;
|
|
11
16
|
export declare const EIP_7702_ACCOUNT_TYPE: readonly ["ModularAccountV2"];
|
|
12
17
|
type Supported7702AccountType = (typeof EIP_7702_ACCOUNT_TYPE)[number];
|
|
13
18
|
export declare const SUPPORTED_DELEGATION_ADDRESSES: "0x69007702764179f14F51cdce752f4f775d74E139"[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"7702.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/7702.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"7702.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/7702.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,SAAS,EAGf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,yBAAyB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uBAAuB,MAAM,CAAC,OAAO,qBAAqB,CAAC,GAAG,SAAS,SAqBxE,CAAC"}
|
|
@@ -20,5 +20,6 @@ type CreateAccountParams = {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function createAccount(params: CreateAccountParams): Promise<SmartContractAccount>;
|
|
22
22
|
export declare function isModularAccountV2(account: SmartContractAccount): account is ModularAccountV2;
|
|
23
|
+
export declare function prepareInitialOwners(initialOwners: Address[], signerAddress: Address): Address[];
|
|
23
24
|
export {};
|
|
24
25
|
//# sourceMappingURL=createAccount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAccount.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/createAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"createAccount.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/createAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAGhF,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC;IACjE,WAAW,CAAC,EAAE,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CAwG/B;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,IAAI,gBAAgB,CAE7B;AAID,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,OAAO,EAAE,EACxB,aAAa,EAAE,OAAO,GACrB,OAAO,EAAE,CAiBX"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StaticDecode } from "@sinclair/typebox";
|
|
2
|
+
import type { TypeSerializedInitcode } from "../../schemas.ts";
|
|
3
|
+
export type Feature = "permissions";
|
|
4
|
+
export declare function supportsFeature(counterfactualInfo: StaticDecode<typeof TypeSerializedInitcode>, feature: Feature): boolean;
|
|
5
|
+
//# sourceMappingURL=supportsFeature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportsFeature.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/supportsFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,MAAM,OAAO,GAAG,aAAa,CAAC;AAkBpC,wBAAgB,eAAe,CAC7B,kBAAkB,EAAE,YAAY,CAAC,OAAO,sBAAsB,CAAC,EAC/D,OAAO,EAAE,OAAO,GACf,OAAO,CAST"}
|
|
@@ -262,6 +262,9 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
262
262
|
account: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
263
263
|
delegation: import("@sinclair/typebox").TUnion<(import("@sinclair/typebox").TLiteral<"0x69007702764179f14F51cdce752f4f775d74E139"> | import("@sinclair/typebox").TLiteral<"ModularAccountV2">)[]>;
|
|
264
264
|
}>, import("@sinclair/typebox").TLiteral<true>]>>;
|
|
265
|
+
nonceOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
266
|
+
nonceKey: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
267
|
+
}>>;
|
|
265
268
|
}>>;
|
|
266
269
|
}>]>;
|
|
267
270
|
}>;
|
|
@@ -287,6 +290,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
287
290
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
288
291
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
289
292
|
}>]>;
|
|
293
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
290
294
|
}>, import("@sinclair/typebox").TObject<{
|
|
291
295
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
292
296
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -322,6 +326,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
322
326
|
[x: string]: unknown;
|
|
323
327
|
};
|
|
324
328
|
}>;
|
|
329
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
325
330
|
}>]>;
|
|
326
331
|
}>, import("@sinclair/typebox").TObject<{
|
|
327
332
|
type: import("@sinclair/typebox").TLiteral<"user-operation-v070">;
|
|
@@ -347,6 +352,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
347
352
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
348
353
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
349
354
|
}>]>;
|
|
355
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
350
356
|
}>, import("@sinclair/typebox").TObject<{
|
|
351
357
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
352
358
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -382,6 +388,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
382
388
|
[x: string]: unknown;
|
|
383
389
|
};
|
|
384
390
|
}>;
|
|
391
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
385
392
|
}>]>;
|
|
386
393
|
}>, import("@sinclair/typebox").TObject<{
|
|
387
394
|
type: import("@sinclair/typebox").TLiteral<"authorization">;
|
|
@@ -392,6 +399,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
392
399
|
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
393
400
|
signatureRequest: import("@sinclair/typebox").TObject<{
|
|
394
401
|
type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
|
|
402
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
395
403
|
}>;
|
|
396
404
|
}>]>>;
|
|
397
405
|
}>, import("@sinclair/typebox").TObject<{
|
|
@@ -414,6 +422,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
414
422
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
415
423
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
416
424
|
}>]>;
|
|
425
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
417
426
|
}>, import("@sinclair/typebox").TObject<{
|
|
418
427
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
419
428
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -449,6 +458,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
449
458
|
[x: string]: unknown;
|
|
450
459
|
};
|
|
451
460
|
}>;
|
|
461
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
452
462
|
}>]>;
|
|
453
463
|
}>, import("@sinclair/typebox").TObject<{
|
|
454
464
|
type: import("@sinclair/typebox").TLiteral<"user-operation-v070">;
|
|
@@ -474,6 +484,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
474
484
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
475
485
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
476
486
|
}>]>;
|
|
487
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
477
488
|
}>, import("@sinclair/typebox").TObject<{
|
|
478
489
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
479
490
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -509,6 +520,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
509
520
|
[x: string]: unknown;
|
|
510
521
|
};
|
|
511
522
|
}>;
|
|
523
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
512
524
|
}>]>;
|
|
513
525
|
}>]>;
|
|
514
526
|
}>;
|
|
@@ -521,6 +533,26 @@ export declare const wallet_requestAccount: import("@sinclair/typebox").TObject<
|
|
|
521
533
|
creationHint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
522
534
|
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
|
|
523
535
|
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
536
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
537
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v2">;
|
|
538
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
539
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
540
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v2-multi-owner">;
|
|
541
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
542
|
+
initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
|
|
543
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
544
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.1">;
|
|
545
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
546
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
547
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.2">;
|
|
548
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
549
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
550
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v1.1.0">;
|
|
551
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
552
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
553
|
+
accountType: import("@sinclair/typebox").TLiteral<"ma-v1-multi-owner">;
|
|
554
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
555
|
+
initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
|
|
524
556
|
}>, import("@sinclair/typebox").TObject<{
|
|
525
557
|
accountType: import("@sinclair/typebox").TLiteral<"7702">;
|
|
526
558
|
}>]>>;
|
|
@@ -550,6 +582,26 @@ export declare const wallet_createAccount: import("@sinclair/typebox").TObject<{
|
|
|
550
582
|
creationOptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
551
583
|
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
|
|
552
584
|
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
585
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
586
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v2">;
|
|
587
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
588
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
589
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v2-multi-owner">;
|
|
590
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
591
|
+
initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
|
|
592
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
593
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.1">;
|
|
594
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
595
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
596
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.2">;
|
|
597
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
598
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
599
|
+
accountType: import("@sinclair/typebox").TLiteral<"la-v1.1.0">;
|
|
600
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
601
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
602
|
+
accountType: import("@sinclair/typebox").TLiteral<"ma-v1-multi-owner">;
|
|
603
|
+
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
604
|
+
initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
|
|
553
605
|
}>, import("@sinclair/typebox").TObject<{
|
|
554
606
|
accountType: import("@sinclair/typebox").TLiteral<"7702">;
|
|
555
607
|
}>]>>;
|
|
@@ -637,6 +689,7 @@ export declare const wallet_createSession: import("@sinclair/typebox").TObject<{
|
|
|
637
689
|
}>;
|
|
638
690
|
ReturnType: import("@sinclair/typebox").TObject<{
|
|
639
691
|
sessionId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
692
|
+
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
640
693
|
signatureRequest: import("@sinclair/typebox").TObject<{
|
|
641
694
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
642
695
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -672,6 +725,7 @@ export declare const wallet_createSession: import("@sinclair/typebox").TObject<{
|
|
|
672
725
|
[x: string]: unknown;
|
|
673
726
|
};
|
|
674
727
|
}>;
|
|
728
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
675
729
|
}>;
|
|
676
730
|
}>;
|
|
677
731
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/rpc/request.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCpC,CAAC;AAEF,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/rpc/request.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCpC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0C/B,CAAC;AAEF,e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