@metamask/smart-accounts-kit 0.4.0-beta.1 → 0.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -1
- package/dist/actions/index.cjs +5 -5
- package/dist/actions/index.d.cts +2 -2
- package/dist/actions/index.d.ts +2 -2
- package/dist/actions/index.mjs +4 -4
- package/dist/{chunk-HBAJRXQB.cjs → chunk-23YXLKTX.cjs} +11 -11
- package/dist/{chunk-HBAJRXQB.cjs.map → chunk-23YXLKTX.cjs.map} +1 -1
- package/dist/{chunk-GH5EK5MB.mjs → chunk-33AMUJBJ.mjs} +7 -7
- package/dist/chunk-33AMUJBJ.mjs.map +1 -0
- package/dist/{chunk-TEH426Y4.mjs → chunk-C5ZEEH2Z.mjs} +283 -184
- package/dist/chunk-C5ZEEH2Z.mjs.map +1 -0
- package/dist/{chunk-OPJBYTWX.cjs → chunk-DLD377CN.cjs} +16 -32
- package/dist/chunk-DLD377CN.cjs.map +1 -0
- package/dist/{chunk-YYZWHBF2.mjs → chunk-NOCLGZGB.mjs} +173 -128
- package/dist/chunk-NOCLGZGB.mjs.map +1 -0
- package/dist/{chunk-5FLY3IPW.mjs → chunk-QCULIK3O.mjs} +27 -56
- package/dist/chunk-QCULIK3O.mjs.map +1 -0
- package/dist/{chunk-CLBI7P3Z.cjs → chunk-QMRKCB7T.cjs} +203 -158
- package/dist/chunk-QMRKCB7T.cjs.map +1 -0
- package/dist/{chunk-Q4V7BKAG.cjs → chunk-SOFB2MXG.cjs} +27 -56
- package/dist/chunk-SOFB2MXG.cjs.map +1 -0
- package/dist/{chunk-NGZLJAMA.cjs → chunk-UUOH2WAW.cjs} +12 -12
- package/dist/{chunk-NGZLJAMA.cjs.map → chunk-UUOH2WAW.cjs.map} +1 -1
- package/dist/{chunk-DRVPD5QI.mjs → chunk-WPVSFOQM.mjs} +10 -26
- package/dist/chunk-WPVSFOQM.mjs.map +1 -0
- package/dist/{chunk-ZTGEG2ZA.mjs → chunk-WV2R7BXP.mjs} +2 -2
- package/dist/{chunk-7CVW7JE3.cjs → chunk-XN36L4RX.cjs} +102 -102
- package/dist/chunk-XN36L4RX.cjs.map +1 -0
- package/dist/{chunk-MIP7KJYH.cjs → chunk-YDLLC6PP.cjs} +252 -153
- package/dist/chunk-YDLLC6PP.cjs.map +1 -0
- package/dist/{chunk-XUVEYTD2.mjs → chunk-YTELOQ4I.mjs} +2 -2
- package/dist/contracts/index.cjs +5 -5
- package/dist/contracts/index.d.cts +3 -3
- package/dist/contracts/index.d.ts +3 -3
- package/dist/contracts/index.mjs +4 -4
- package/dist/{delegation-sP7mnAkl.d.ts → delegation-DGUfyX-C.d.ts} +52 -26
- package/dist/{delegation-Bd2v5lF5.d.cts → delegation-D_TY-tAq.d.cts} +52 -26
- package/dist/experimental/index.cjs +4 -4
- package/dist/experimental/index.cjs.map +1 -1
- package/dist/experimental/index.d.cts +1 -1
- package/dist/experimental/index.d.ts +1 -1
- package/dist/experimental/index.mjs +5 -5
- package/dist/experimental/index.mjs.map +1 -1
- package/dist/{index-B9w3fRT-.d.cts → index-B9bsjGqI.d.ts} +4 -5
- package/dist/{index-C8wAvC29.d.cts → index-CZes99jV.d.cts} +92 -62
- package/dist/{index-DpokPMZc.d.ts → index-DvcKJcXi.d.cts} +4 -5
- package/dist/{index-Bfcoh3WQ.d.ts → index-FpCh2419.d.ts} +92 -62
- package/dist/index.cjs +23 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -11
- package/dist/index.d.ts +9 -11
- package/dist/index.mjs +14 -12
- package/dist/index.mjs.map +1 -1
- package/dist/{smartAccountsEnvironment-YDC3jB33.d.cts → smartAccountsEnvironment-BU8kjlEv.d.cts} +1 -1
- package/dist/{smartAccountsEnvironment-EW722Cnw.d.ts → smartAccountsEnvironment-egxuflDO.d.ts} +1 -1
- package/dist/{types-B9GE5CfG.d.ts → types-BLYWtcR3.d.cts} +46 -28
- package/dist/{types-B9GE5CfG.d.cts → types-BLYWtcR3.d.ts} +46 -28
- package/dist/utils/index.cjs +7 -5
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +3 -4
- package/dist/utils/index.d.ts +3 -4
- package/dist/utils/index.mjs +12 -10
- package/package.json +5 -10
- package/dist/chunk-5FLY3IPW.mjs.map +0 -1
- package/dist/chunk-7CVW7JE3.cjs.map +0 -1
- package/dist/chunk-CLBI7P3Z.cjs.map +0 -1
- package/dist/chunk-DRVPD5QI.mjs.map +0 -1
- package/dist/chunk-GH5EK5MB.mjs.map +0 -1
- package/dist/chunk-MIP7KJYH.cjs.map +0 -1
- package/dist/chunk-OPJBYTWX.cjs.map +0 -1
- package/dist/chunk-Q4V7BKAG.cjs.map +0 -1
- package/dist/chunk-TEH426Y4.mjs.map +0 -1
- package/dist/chunk-YYZWHBF2.mjs.map +0 -1
- /package/dist/{chunk-ZTGEG2ZA.mjs.map → chunk-WV2R7BXP.mjs.map} +0 -0
- /package/dist/{chunk-XUVEYTD2.mjs.map → chunk-YTELOQ4I.mjs.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/counterfactualAccountData.ts","../src/encodeCalls.ts","../src/webAuthn.ts"],"sourcesContent":["import type { Address, Hex } from 'viem';\nimport { getContractAddress, pad } from 'viem';\n\nimport { Implementation } from './constants';\nimport { initializeHybridDeleGator } from './DelegationFramework/HybridDeleGator/encode';\nimport { initializeMultiSigDeleGator } from './DelegationFramework/MultiSigDeleGator/encode';\nimport { create2Deploy as encodeCreate2Deploy } from './DelegationFramework/SimpleFactory/encode';\nimport { encodeProxyCreationCode } from './DelegationFramework/utils';\nimport type {\n SmartAccountsEnvironment,\n HybridDeleGatorDeployParams,\n MultiSigDeleGatorDeployParams,\n DeployParams,\n} from './types';\n\n/**\n * Infers counterfactual account data for a DeleGator smart account.\n *\n * @template TImplementation - The type of implementation, extending Implementation.\n * @template TDeployParams - The type of deployment parameters, defaults to DeployParams<Implementation>.\n * @param options - The options for generating counterfactual account data.\n * @param options.factory - The address of the SimpleFactory contract.\n * @param options.implementations - The DeleGator implementation contracts.\n * @param options.implementation - The implementation type to use.\n * @param options.deployParams - The deployment parameters for the specified implementation.\n * @param options.deploySalt - The salt to use for CREATE2 address computation.\n * @returns An object containing the counterfactual address and factory calldata.\n * @description This function calculates the address a DeleGator contract would have if deployed,\n * and provides the calldata needed to deploy it.\n */\nexport const getCounterfactualAccountData = async <\n TImplementation extends Implementation,\n>({\n factory,\n implementations,\n implementation,\n deployParams,\n deploySalt,\n}: {\n factory: Address;\n implementations: SmartAccountsEnvironment['implementations'];\n implementation: TImplementation;\n deployParams: DeployParams<TImplementation>;\n deploySalt: Hex;\n}): Promise<{ factoryData: Hex; address: Address }> => {\n let implementationAddress: Address;\n let initcode: Hex;\n\n switch (implementation) {\n case Implementation.Hybrid: {\n const [owner, keyIds, xValues, yValues] =\n deployParams as HybridDeleGatorDeployParams;\n\n if (!implementations.HybridDeleGatorImpl) {\n throw new Error(\n 'HybridDeleGatorImpl address not provided in environment',\n );\n }\n\n implementationAddress = implementations.HybridDeleGatorImpl;\n\n const p256Owners = keyIds.map((keyId, index) => {\n const xValue = xValues[index];\n const yValue = yValues[index];\n\n if (!xValue || !yValue) {\n throw new Error(\n `Missing X or Y value for keyId ${keyId} at index ${index}`,\n );\n }\n\n return {\n keyId,\n x: xValue,\n y: yValue,\n };\n });\n\n initcode = initializeHybridDeleGator({ eoaOwner: owner, p256Owners });\n break;\n }\n case Implementation.MultiSig: {\n const [owners, threshold] = deployParams as MultiSigDeleGatorDeployParams;\n\n if (!implementations.MultiSigDeleGatorImpl) {\n throw new Error(\n 'MultiSigDeleGatorImpl address not provided in environment',\n );\n }\n\n implementationAddress = implementations.MultiSigDeleGatorImpl;\n initcode = initializeMultiSigDeleGator({ owners, threshold });\n break;\n }\n case Implementation.Stateless7702:\n default:\n throw new Error(`Implementation type '${implementation}' not supported`);\n }\n\n const salt = pad(deploySalt, { dir: 'left', size: 32 });\n\n const proxyCreationCode = encodeProxyCreationCode({\n implementationAddress,\n initcode,\n });\n\n const address = getContractAddress({\n bytecode: proxyCreationCode,\n from: factory,\n opcode: 'CREATE2',\n salt,\n });\n\n const factoryData = encodeCreate2Deploy(proxyCreationCode, salt);\n\n return {\n factoryData,\n address,\n };\n};\n","import { DelegationManager } from '@metamask/delegation-abis';\nimport { encodeFunctionData } from 'viem';\nimport type { Address, Hex } from 'viem';\n\nimport type { DelegatedCall } from './actions/erc7710RedeemDelegationAction';\nimport { encodeDelegations } from './delegation';\nimport {\n execute,\n executeWithMode,\n} from './DelegationFramework/DeleGatorCore/encode';\nimport {\n ExecutionMode,\n createExecution,\n encodeExecutionCalldatas,\n} from './executions';\nimport type { Call } from './types';\n\n/**\n * Checks if a call is a delegated call by checking for the presence of permissionContext and delegationManager.\n *\n * @param call - The call to check.\n * @returns True if the call is a delegated call, false otherwise.\n */\nconst isDelegatedCall = (call: Call): call is DelegatedCall => {\n return 'permissionContext' in call && 'delegationManager' in call;\n};\n\n/**\n * If there's a single call with permissionContext and delegationManager,\n * processes it as a delegated call.\n *\n * @param call - The call to process.\n * @returns The execution object for the delegated call.\n * @description\n * This function creates an execution that calls redeemDelegations on the delegation manager.\n */\nconst processDelegatedCall = (call: DelegatedCall) => {\n const {\n permissionContext,\n delegationManager,\n to: target,\n value,\n data: callData,\n } = call;\n\n const callAsExecution = createExecution({ target, value, callData });\n\n if (!permissionContext) {\n return callAsExecution;\n }\n\n const encodedPermissionsContext = encodeDelegations(permissionContext);\n\n const redeemCalldata = encodeFunctionData({\n abi: DelegationManager,\n functionName: 'redeemDelegations',\n args: [\n [encodedPermissionsContext],\n [ExecutionMode.SingleDefault],\n encodeExecutionCalldatas([[callAsExecution]]),\n ],\n });\n\n return createExecution({\n target: delegationManager,\n callData: redeemCalldata,\n });\n};\n\n/**\n * If there's a single call, encode the shorthand `execute` function. Otherwise, encode the `executeWithMode` function. Execution type will always be \"default\".\n *\n * @param calls - The calls to execute.\n * @returns The encoded calldata for the DeleGator to execute the calls.\n * @description\n * This function supports both single and batch execution modes.\n * For single calls, it uses the gas-efficient execute function.\n */\nexport const encodeCalls = (calls: readonly Call[]) => {\n if (calls.length === 1) {\n const call = calls[0];\n if (call && !isDelegatedCall(call)) {\n const { to: target, value, data: callData } = call;\n const execution = createExecution({ target, value, callData });\n return execute({ execution });\n }\n }\n\n const executions = calls.map((call) => {\n if (isDelegatedCall(call)) {\n return processDelegatedCall(call);\n }\n const { to: target, value, data: callData } = call;\n return createExecution({ target, value, callData });\n });\n\n const mode =\n calls.length === 1\n ? ExecutionMode.SingleDefault\n : ExecutionMode.BatchDefault;\n return executeWithMode({ mode, executions });\n};\n\n/**\n * Encodes calls for execution by a DeleGator smart contract.\n *\n * @param caller - The address of the DeleGator contract.\n * @param calls - An array of Call objects, each containing 'to', optional 'data', and optional 'value'.\n * @returns A promise that resolves to the encoded function data as a hexadecimal string.\n * @description\n * - If there's a single call directly to the delegator, it returns the call data directly.\n * - For multiple calls or calls to other addresses, it creates executions and encodes them for the DeleGator's execute function.\n * - The execution mode is set to ExecutionMode.SingleDefault for a single call, or ExecutionMode.BatchDefault for multiple calls.\n *\n * todo: This doesn't fully expose the flexibility of the DeleGator's execute function, but it's a start.\n * maybe we add a mechanism where individual calls passed to this function can be encoded batches.\n */\nexport const encodeCallsForCaller = async (\n caller: Address,\n calls: readonly Call[],\n): Promise<Hex> => {\n if (calls.length === 1) {\n const call = calls[0];\n if (call?.to === caller && !isDelegatedCall(call)) {\n // if there's a single call, and it's to the delegator, we can just return the calldata directly.\n return call.data ?? '0x';\n }\n }\n return encodeCalls(calls);\n};\n","import {\n parseAbiParameters,\n encodeAbiParameters,\n type Hex,\n encodePacked,\n keccak256,\n concat,\n hexToBytes,\n} from 'viem';\nimport { parseSignature } from 'webauthn-p256';\n\nexport const FIELD_MODULUS =\n 115792089210356248762697446949407573529996955224135760342422259061068512044369n;\nexport const MALLEABILITY_THRESHOLD = FIELD_MODULUS / 2n;\n\nexport const SIGNATURE_ABI_PARAMS = parseAbiParameters(\n 'bytes32, uint256, uint256, bytes, bool, string, string, uint256',\n);\n\n/**\n * This function is used to convert the client data returned from the\n * credentials API into a format that can be consumed by the DeleGator\n * contracts. We need the flattend JSON strings before and after the\n * userOpHash/challenge. This function provides those two client data string\n * slices.\n *\n * @param clientDataJson - The client data JSON string.\n * @returns Returns [clientDataJSONPrefix and clientDataJSONSuffix]\n * ClientDataJSONPrefix contains the client data till the challengeHash\n * ClientDataJSONSuffix contains the client data after the challengeHash.\n */\nexport const splitOnChallenge = (\n clientDataJson: string,\n): [clientDataJSONPrefix: string, clientDataJSONSuffix: string] => {\n /*\n CientData looks like this:\n {\n \"type\": \"webauthn.create\" | \"webauthn.get\",\n \"challenge\": \"{userOpHash}\",\n \"origin\": \"{Domain}\",\n \"crossOrigin\": boolean\n }\n */\n try {\n const { challenge } = JSON.parse(clientDataJson);\n if (challenge === undefined) {\n throw new Error('No \"challenge\" found in the input string');\n }\n return clientDataJson.split(challenge) as [string, string];\n } catch (error) {\n throw new Error('No \"challenge\" found in the input string', {\n cause: error,\n });\n }\n};\n\n/**\n * Returns the index of '\"type\":' in the ClientData.\n *\n * @param clientDataJson - Stringified ClientDataJSON.\n * @returns The index of '\"type\":' in the ClientData.\n */\nexport const getResponseTypeLocation = (clientDataJson: string): bigint => {\n try {\n // Find the index of the `\"type\":` key in the JSON string directly\n const typeIndex = clientDataJson.indexOf('\"type\":');\n\n if (typeIndex === -1) {\n throw new Error('No \"type\" found in the input string');\n }\n // Return the index of the `\"type\":` key\n return BigInt(typeIndex);\n } catch (error) {\n // Handle any errors that occur during the search\n throw new Error('No \"type\" found in the input string', {\n cause: error,\n });\n }\n};\n\n/**\n * Encodes a signature to a hexadecimal signature that will be accepted\n * by the DeleGator contracts.\n *\n * @param keyId - The key used for the signature, represented as a hexadecimal string.\n * @param signature - The signature to convert, as Hex.\n * @param clientDataJSON - The client data used in the creation of the signature.\n * @param authenticatorData - The authenticator data used in the creation of the signature.\n * @returns The signature as a valid DeleGator signature encoded as Hexadecimal string.\n */\nexport function encodeDeleGatorSignature(\n keyId: string,\n signature: Hex,\n clientDataJSON: string,\n authenticatorData: Hex,\n): Hex {\n const keyIdHash = keccak256(encodePacked(['string'], [keyId]));\n\n const parsedSignature = parseSignature(signature);\n\n let { s } = parsedSignature;\n\n while (s > MALLEABILITY_THRESHOLD) {\n s = FIELD_MODULUS - s;\n }\n\n const { r } = parsedSignature;\n\n const [clientDataComponent1, clientDataComponent2] =\n splitOnChallenge(clientDataJSON);\n\n const { userVerified } = parseAuthenticatorFlags(authenticatorData);\n\n const responseTypeLocation = getResponseTypeLocation(clientDataJSON);\n\n const encodedSignature = encodeAbiParameters(SIGNATURE_ABI_PARAMS, [\n keyIdHash,\n r,\n s,\n authenticatorData,\n userVerified,\n clientDataComponent1,\n clientDataComponent2,\n responseTypeLocation,\n ]);\n return encodedSignature;\n}\n\nconst AUTHENTICATOR_DATA_FLAGS_OFFSET = 32;\n// We have all of the flag bits defined here for completeness, even though we only extract the userVerified flag.\nenum AuthenticatorDataFlagBitIndex {\n UserPresence = 0,\n UserVerified = 2,\n BackupEligibility = 3,\n BackupState = 4,\n AttestedCredentialData = 6,\n ExtensionData = 7,\n}\n\nexport type AuthenticatorFlags = {\n userVerified: boolean;\n};\n\n/**\n * Parses the authenticator data and returns an authenticator flags object with the `userVerified` flag.\n * See https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API/Authenticator_data.\n *\n * @param authenticatorData - The authenticator data to parse.\n * @returns An object representing the parsed authenticator flags.\n */\nexport function parseAuthenticatorFlags(\n authenticatorData: Hex,\n): AuthenticatorFlags {\n const authenticatorDataBuffer = hexToBytes(authenticatorData);\n const dataBufferUint8 = new Uint8Array(authenticatorDataBuffer);\n const flags = dataBufferUint8[AUTHENTICATOR_DATA_FLAGS_OFFSET];\n if (flags === undefined) {\n throw new Error('Authenticator flags not found in authenticator data');\n }\n\n // Bit 0 is the least significant bit in the flags byte, so we left shift 0b1 by the bit index\n // eslint-disable-next-line no-bitwise\n const bitMask = 0b1 << AuthenticatorDataFlagBitIndex.UserVerified;\n\n return {\n // eslint-disable-next-line no-bitwise\n userVerified: (flags & bitMask) !== 0x0,\n };\n}\n\n/**\n * Creates a dummy signature.\n * This must meet all early-failure conditions of the real signature, but does not need to be a valid signature.\n *\n * @param keyId - The key ID to use for the dummy signature.\n * @returns The encoded signature.\n */\nexport const createDummyWebAuthnSignature = (keyId: Hex) => {\n // https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API/Authenticator_data#data_structure\n const rpIdHash = keccak256(encodePacked(['string'], ['AuthenticatorData']));\n const flags = '0x05';\n const signCount = '0x00000000';\n const authenticatorData = concat([rpIdHash, flags, signCount]);\n\n const keyIdHash = keccak256(encodePacked(['string'], [keyId]));\n const rs =\n 57896044605178124381348723474703786764998477612067880171211129530534256022184n;\n const userVerification = true;\n const clientDataPrefix = '{\"type\":\"webauthn.get\",\"challenge\":\"';\n const clientDataSuffix = '\",\"origin\":\"passkey-domain\",\"crossOrigin\":false}';\n const responseTypeLocation = 1n;\n\n const encodedSignature = encodeAbiParameters(SIGNATURE_ABI_PARAMS, [\n keyIdHash,\n rs,\n rs,\n authenticatorData,\n userVerification,\n clientDataPrefix,\n clientDataSuffix,\n responseTypeLocation,\n ]);\n\n return encodedSignature;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,SAAS,oBAAoB,WAAW;AA6BjC,IAAM,+BAA+B,OAE1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAMuD;AACrD,MAAI;AACJ,MAAI;AAEJ,UAAQ,gBAAgB;AAAA,IACtB,4BAA4B;AAC1B,YAAM,CAAC,OAAO,QAAQ,SAAS,OAAO,IACpC;AAEF,UAAI,CAAC,gBAAgB,qBAAqB;AACxC,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAEA,8BAAwB,gBAAgB;AAExC,YAAM,aAAa,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EEH2Z.mjs";
|
|
8
8
|
|
|
9
9
|
// src/DelegationFramework/utils.ts
|
|
10
10
|
import { ERC1967Proxy } from "@metamask/delegation-abis";
|
|
@@ -827,4 +827,4 @@ export {
|
|
|
827
827
|
execute6,
|
|
828
828
|
encode_exports4
|
|
829
829
|
};
|
|
830
|
-
//# sourceMappingURL=chunk-
|
|
830
|
+
//# sourceMappingURL=chunk-WV2R7BXP.mjs.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkUUOH2WAWcjs = require('./chunk-UUOH2WAW.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -38,7 +38,7 @@ var _chunkNGZLJAMAcjs = require('./chunk-NGZLJAMA.cjs');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunk23YXLKTXcjs = require('./chunk-23YXLKTX.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
var _chunkVLKX4BR6cjs = require('./chunk-VLKX4BR6.cjs');
|
|
@@ -48,39 +48,39 @@ var _chunkVLKX4BR6cjs = require('./chunk-VLKX4BR6.cjs');
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunkYDLLC6PPcjs = require('./chunk-YDLLC6PP.cjs');
|
|
52
52
|
|
|
53
53
|
// src/contracts/index.ts
|
|
54
54
|
var contracts_exports = {};
|
|
55
|
-
|
|
55
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, contracts_exports, {
|
|
56
56
|
DeleGatorCore: () => DeleGatorCore_exports,
|
|
57
57
|
DelegationManager: () => DelegationManager_exports,
|
|
58
58
|
EIP712: () => EIP712_exports,
|
|
59
|
-
ERC20PeriodTransferEnforcer: () =>
|
|
60
|
-
ERC20StreamingEnforcer: () =>
|
|
59
|
+
ERC20PeriodTransferEnforcer: () => _chunkUUOH2WAWcjs.ERC20PeriodTransferEnforcer_exports,
|
|
60
|
+
ERC20StreamingEnforcer: () => _chunkUUOH2WAWcjs.ERC20StreamingEnforcer_exports,
|
|
61
61
|
ERC20TransferAmountEnforcer: () => ERC20TransferAmountEnforcer_exports,
|
|
62
62
|
EntryPoint: () => EntryPoint_exports,
|
|
63
63
|
HybridDeleGator: () => HybridDeleGator_exports,
|
|
64
64
|
IdEnforcer: () => IdEnforcer_exports,
|
|
65
65
|
LimitedCallsEnforcer: () => LimitedCallsEnforcer_exports,
|
|
66
66
|
MultiSigDeleGator: () => MultiSigDeleGator_exports,
|
|
67
|
-
MultiTokenPeriodEnforcer: () =>
|
|
68
|
-
NativeTokenPeriodTransferEnforcer: () =>
|
|
69
|
-
NativeTokenStreamingEnforcer: () =>
|
|
67
|
+
MultiTokenPeriodEnforcer: () => _chunkUUOH2WAWcjs.MultiTokenPeriodEnforcer_exports,
|
|
68
|
+
NativeTokenPeriodTransferEnforcer: () => _chunkUUOH2WAWcjs.NativeTokenPeriodTransferEnforcer_exports,
|
|
69
|
+
NativeTokenStreamingEnforcer: () => _chunkUUOH2WAWcjs.NativeTokenStreamingEnforcer_exports,
|
|
70
70
|
NativeTokenTransferAmountEnforcer: () => NativeTokenTransferAmountEnforcer_exports,
|
|
71
71
|
NonceEnforcer: () => NonceEnforcer_exports,
|
|
72
72
|
Ownable2Step: () => Ownable2Step_exports,
|
|
73
73
|
Pausable: () => Pausable_exports,
|
|
74
74
|
SimpleFactory: () => SimpleFactory_exports,
|
|
75
75
|
SpecificActionERC20TransferBatchEnforcer: () => SpecificActionERC20TransferBatchEnforcer_exports,
|
|
76
|
-
encodeProxyCreationCode: () =>
|
|
77
|
-
isContractDeployed: () =>
|
|
78
|
-
isImplementationExpected: () =>
|
|
76
|
+
encodeProxyCreationCode: () => _chunk23YXLKTXcjs.encodeProxyCreationCode,
|
|
77
|
+
isContractDeployed: () => _chunk23YXLKTXcjs.isContractDeployed,
|
|
78
|
+
isImplementationExpected: () => _chunk23YXLKTXcjs.isImplementationExpected
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
// src/DelegationFramework/DelegationManager/index.ts
|
|
82
82
|
var DelegationManager_exports = {};
|
|
83
|
-
|
|
83
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, DelegationManager_exports, {
|
|
84
84
|
constants: () => constants_exports,
|
|
85
85
|
encode: () => encode_exports5,
|
|
86
86
|
execute: () => execute_exports,
|
|
@@ -90,11 +90,11 @@ _chunkMIP7KJYHcjs.__export.call(void 0, DelegationManager_exports, {
|
|
|
90
90
|
|
|
91
91
|
// src/DelegationFramework/DelegationManager/constants.ts
|
|
92
92
|
var constants_exports = {};
|
|
93
|
-
|
|
94
|
-
ANY_BENEFICIARY: () =>
|
|
93
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, constants_exports, {
|
|
94
|
+
ANY_BENEFICIARY: () => _chunkYDLLC6PPcjs.ANY_BENEFICIARY,
|
|
95
95
|
DOMAIN_VERSION: () => DOMAIN_VERSION,
|
|
96
96
|
NAME: () => NAME,
|
|
97
|
-
ROOT_AUTHORITY: () =>
|
|
97
|
+
ROOT_AUTHORITY: () => _chunkYDLLC6PPcjs.ROOT_AUTHORITY,
|
|
98
98
|
VERSION: () => VERSION
|
|
99
99
|
});
|
|
100
100
|
var NAME = "DelegationManager";
|
|
@@ -103,7 +103,7 @@ var DOMAIN_VERSION = "1";
|
|
|
103
103
|
|
|
104
104
|
// src/DelegationFramework/DelegationManager/encode.ts
|
|
105
105
|
var encode_exports5 = {};
|
|
106
|
-
|
|
106
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, encode_exports5, {
|
|
107
107
|
disableDelegation: () => encode,
|
|
108
108
|
enableDelegation: () => encode2,
|
|
109
109
|
redeemDelegations: () => encode3
|
|
@@ -118,7 +118,7 @@ var simulate19 = async ({
|
|
|
118
118
|
delegationManagerAddress,
|
|
119
119
|
delegation
|
|
120
120
|
}) => {
|
|
121
|
-
const delegationStruct =
|
|
121
|
+
const delegationStruct = _chunkYDLLC6PPcjs.toDelegationStruct.call(void 0, delegation);
|
|
122
122
|
return _actions.simulateContract.call(void 0, client, {
|
|
123
123
|
address: delegationManagerAddress,
|
|
124
124
|
abi: _delegationabis.DelegationManager,
|
|
@@ -139,7 +139,7 @@ var execute7 = async ({
|
|
|
139
139
|
return _actions.writeContract.call(void 0, client, request);
|
|
140
140
|
};
|
|
141
141
|
var encode = ({ delegation }) => {
|
|
142
|
-
const delegationStruct =
|
|
142
|
+
const delegationStruct = _chunkYDLLC6PPcjs.toDelegationStruct.call(void 0, delegation);
|
|
143
143
|
return _viem.encodeFunctionData.call(void 0, {
|
|
144
144
|
abi: _delegationabis.DelegationManager,
|
|
145
145
|
functionName: "disableDelegation",
|
|
@@ -156,7 +156,7 @@ var simulate20 = async ({
|
|
|
156
156
|
delegationManagerAddress,
|
|
157
157
|
delegation
|
|
158
158
|
}) => {
|
|
159
|
-
const delegationStruct =
|
|
159
|
+
const delegationStruct = _chunkYDLLC6PPcjs.toDelegationStruct.call(void 0, delegation);
|
|
160
160
|
return _actions.simulateContract.call(void 0, client, {
|
|
161
161
|
address: delegationManagerAddress,
|
|
162
162
|
abi: _delegationabis.DelegationManager,
|
|
@@ -177,7 +177,7 @@ var execute8 = async ({
|
|
|
177
177
|
return _actions.writeContract.call(void 0, client, request);
|
|
178
178
|
};
|
|
179
179
|
var encode2 = ({ delegation }) => {
|
|
180
|
-
const delegationStruct =
|
|
180
|
+
const delegationStruct = _chunkYDLLC6PPcjs.toDelegationStruct.call(void 0, delegation);
|
|
181
181
|
return _viem.encodeFunctionData.call(void 0, {
|
|
182
182
|
abi: _delegationabis.DelegationManager,
|
|
183
183
|
functionName: "enableDelegation",
|
|
@@ -201,7 +201,7 @@ var simulate21 = async ({
|
|
|
201
201
|
abi: _delegationabis.DelegationManager,
|
|
202
202
|
functionName: "redeemDelegations",
|
|
203
203
|
args: [
|
|
204
|
-
|
|
204
|
+
delegations.map((delegationChain) => _chunkYDLLC6PPcjs.encodeDelegations.call(void 0, delegationChain)),
|
|
205
205
|
modes,
|
|
206
206
|
_chunkVLKX4BR6cjs.encodeExecutionCalldatas.call(void 0, executions)
|
|
207
207
|
]
|
|
@@ -232,7 +232,7 @@ var encode3 = ({
|
|
|
232
232
|
abi: _delegationabis.DelegationManager,
|
|
233
233
|
functionName: "redeemDelegations",
|
|
234
234
|
args: [
|
|
235
|
-
|
|
235
|
+
delegations.map((delegationChain) => _chunkYDLLC6PPcjs.encodeDelegations.call(void 0, delegationChain)),
|
|
236
236
|
modes,
|
|
237
237
|
_chunkVLKX4BR6cjs.encodeExecutionCalldatas.call(void 0, executions)
|
|
238
238
|
]
|
|
@@ -241,7 +241,7 @@ var encode3 = ({
|
|
|
241
241
|
|
|
242
242
|
// src/DelegationFramework/DelegationManager/execute.ts
|
|
243
243
|
var execute_exports = {};
|
|
244
|
-
|
|
244
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, execute_exports, {
|
|
245
245
|
disableDelegation: () => execute7,
|
|
246
246
|
enableDelegation: () => execute8,
|
|
247
247
|
redeemDelegations: () => execute9
|
|
@@ -249,7 +249,7 @@ _chunkMIP7KJYHcjs.__export.call(void 0, execute_exports, {
|
|
|
249
249
|
|
|
250
250
|
// src/DelegationFramework/DelegationManager/read.ts
|
|
251
251
|
var read_exports2 = {};
|
|
252
|
-
|
|
252
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports2, {
|
|
253
253
|
disabledDelegations: () => read,
|
|
254
254
|
getAnyDelegate: () => read2,
|
|
255
255
|
getRootAuthority: () => read3
|
|
@@ -295,7 +295,7 @@ var read3 = async ({
|
|
|
295
295
|
|
|
296
296
|
// src/DelegationFramework/DelegationManager/simulate.ts
|
|
297
297
|
var simulate_exports = {};
|
|
298
|
-
|
|
298
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, simulate_exports, {
|
|
299
299
|
disableDelegation: () => simulate19,
|
|
300
300
|
enableDelegation: () => simulate20,
|
|
301
301
|
redeemDelegations: () => simulate21
|
|
@@ -303,42 +303,42 @@ _chunkMIP7KJYHcjs.__export.call(void 0, simulate_exports, {
|
|
|
303
303
|
|
|
304
304
|
// src/DelegationFramework/DeleGatorCore/index.ts
|
|
305
305
|
var DeleGatorCore_exports = {};
|
|
306
|
-
|
|
307
|
-
encode: () =>
|
|
306
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, DeleGatorCore_exports, {
|
|
307
|
+
encode: () => _chunk23YXLKTXcjs.encode_exports4,
|
|
308
308
|
execute: () => execute_exports2,
|
|
309
|
-
read: () =>
|
|
309
|
+
read: () => _chunk23YXLKTXcjs.read_exports,
|
|
310
310
|
simulate: () => simulate_exports2
|
|
311
311
|
});
|
|
312
312
|
|
|
313
313
|
// src/DelegationFramework/DeleGatorCore/execute.ts
|
|
314
314
|
var execute_exports2 = {};
|
|
315
|
-
|
|
316
|
-
disableDelegation: () =>
|
|
317
|
-
enableDelegation: () =>
|
|
318
|
-
execute: () =>
|
|
319
|
-
executeWithMode: () =>
|
|
320
|
-
upgradeToAndCall: () =>
|
|
315
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, execute_exports2, {
|
|
316
|
+
disableDelegation: () => _chunk23YXLKTXcjs.execute2,
|
|
317
|
+
enableDelegation: () => _chunk23YXLKTXcjs.execute3,
|
|
318
|
+
execute: () => _chunk23YXLKTXcjs.execute4,
|
|
319
|
+
executeWithMode: () => _chunk23YXLKTXcjs.execute5,
|
|
320
|
+
upgradeToAndCall: () => _chunk23YXLKTXcjs.execute6
|
|
321
321
|
});
|
|
322
322
|
|
|
323
323
|
// src/DelegationFramework/DeleGatorCore/simulate.ts
|
|
324
324
|
var simulate_exports2 = {};
|
|
325
|
-
|
|
326
|
-
disableDelegation: () =>
|
|
327
|
-
enableDelegation: () =>
|
|
328
|
-
execute: () =>
|
|
329
|
-
executeWithMode: () =>
|
|
330
|
-
upgradeToAndCall: () =>
|
|
325
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, simulate_exports2, {
|
|
326
|
+
disableDelegation: () => _chunk23YXLKTXcjs.simulate14,
|
|
327
|
+
enableDelegation: () => _chunk23YXLKTXcjs.simulate15,
|
|
328
|
+
execute: () => _chunk23YXLKTXcjs.simulate16,
|
|
329
|
+
executeWithMode: () => _chunk23YXLKTXcjs.simulate17,
|
|
330
|
+
upgradeToAndCall: () => _chunk23YXLKTXcjs.simulate18
|
|
331
331
|
});
|
|
332
332
|
|
|
333
333
|
// src/DelegationFramework/EIP712/index.ts
|
|
334
334
|
var EIP712_exports = {};
|
|
335
|
-
|
|
335
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, EIP712_exports, {
|
|
336
336
|
read: () => read_exports3
|
|
337
337
|
});
|
|
338
338
|
|
|
339
339
|
// src/DelegationFramework/EIP712/read.ts
|
|
340
340
|
var read_exports3 = {};
|
|
341
|
-
|
|
341
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports3, {
|
|
342
342
|
getContractName: () => read4,
|
|
343
343
|
getContractVersion: () => read5,
|
|
344
344
|
getDomainVersion: () => read6
|
|
@@ -421,13 +421,13 @@ var read6 = async ({
|
|
|
421
421
|
|
|
422
422
|
// src/DelegationFramework/EntryPoint/index.ts
|
|
423
423
|
var EntryPoint_exports = {};
|
|
424
|
-
|
|
424
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, EntryPoint_exports, {
|
|
425
425
|
read: () => read_exports4
|
|
426
426
|
});
|
|
427
427
|
|
|
428
428
|
// src/DelegationFramework/EntryPoint/read.ts
|
|
429
429
|
var read_exports4 = {};
|
|
430
|
-
|
|
430
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports4, {
|
|
431
431
|
entryPointGetNonce: () => read7
|
|
432
432
|
});
|
|
433
433
|
|
|
@@ -448,13 +448,13 @@ var read7 = async ({
|
|
|
448
448
|
|
|
449
449
|
// src/DelegationFramework/ERC20TransferAmountEnforcer/index.ts
|
|
450
450
|
var ERC20TransferAmountEnforcer_exports = {};
|
|
451
|
-
|
|
451
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, ERC20TransferAmountEnforcer_exports, {
|
|
452
452
|
read: () => read_exports5
|
|
453
453
|
});
|
|
454
454
|
|
|
455
455
|
// src/DelegationFramework/ERC20TransferAmountEnforcer/read.ts
|
|
456
456
|
var read_exports5 = {};
|
|
457
|
-
|
|
457
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports5, {
|
|
458
458
|
getSpentAmount: () => read8,
|
|
459
459
|
getTermsInfo: () => read9
|
|
460
460
|
});
|
|
@@ -499,16 +499,16 @@ var read9 = async ({
|
|
|
499
499
|
|
|
500
500
|
// src/DelegationFramework/HybridDeleGator/index.ts
|
|
501
501
|
var HybridDeleGator_exports = {};
|
|
502
|
-
|
|
502
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, HybridDeleGator_exports, {
|
|
503
503
|
constants: () => constants_exports2,
|
|
504
|
-
encode: () =>
|
|
504
|
+
encode: () => _chunk23YXLKTXcjs.encode_exports,
|
|
505
505
|
read: () => read_exports6,
|
|
506
506
|
simulate: () => simulate_exports3
|
|
507
507
|
});
|
|
508
508
|
|
|
509
509
|
// src/DelegationFramework/HybridDeleGator/read.ts
|
|
510
510
|
var read_exports6 = {};
|
|
511
|
-
|
|
511
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports6, {
|
|
512
512
|
getKey: () => read10,
|
|
513
513
|
getKeyIdHashes: () => read11,
|
|
514
514
|
getKeyIdHashesCount: () => read12
|
|
@@ -554,21 +554,21 @@ var read12 = async ({
|
|
|
554
554
|
|
|
555
555
|
// src/DelegationFramework/HybridDeleGator/simulate.ts
|
|
556
556
|
var simulate_exports3 = {};
|
|
557
|
-
|
|
558
|
-
addKey: () =>
|
|
559
|
-
initializeHybridDeleGator: () =>
|
|
560
|
-
reinitializeHybridDeleGator: () =>
|
|
561
|
-
removeKey: () =>
|
|
562
|
-
updateSigners: () =>
|
|
557
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, simulate_exports3, {
|
|
558
|
+
addKey: () => _chunk23YXLKTXcjs.simulate,
|
|
559
|
+
initializeHybridDeleGator: () => _chunk23YXLKTXcjs.simulate2,
|
|
560
|
+
reinitializeHybridDeleGator: () => _chunk23YXLKTXcjs.simulate3,
|
|
561
|
+
removeKey: () => _chunk23YXLKTXcjs.simulate4,
|
|
562
|
+
updateSigners: () => _chunk23YXLKTXcjs.simulate5
|
|
563
563
|
});
|
|
564
564
|
|
|
565
565
|
// src/DelegationFramework/HybridDeleGator/constants.ts
|
|
566
566
|
var constants_exports2 = {};
|
|
567
|
-
|
|
568
|
-
ANY_BENEFICIARY: () =>
|
|
567
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, constants_exports2, {
|
|
568
|
+
ANY_BENEFICIARY: () => _chunkYDLLC6PPcjs.ANY_BENEFICIARY,
|
|
569
569
|
DOMAIN_VERSION: () => DOMAIN_VERSION2,
|
|
570
570
|
NAME: () => NAME2,
|
|
571
|
-
ROOT_AUTHORITY: () =>
|
|
571
|
+
ROOT_AUTHORITY: () => _chunkYDLLC6PPcjs.ROOT_AUTHORITY,
|
|
572
572
|
VERSION: () => VERSION2
|
|
573
573
|
});
|
|
574
574
|
var NAME2 = "HybridDeleGator";
|
|
@@ -577,13 +577,13 @@ var DOMAIN_VERSION2 = "1";
|
|
|
577
577
|
|
|
578
578
|
// src/DelegationFramework/IdEnforcer/index.ts
|
|
579
579
|
var IdEnforcer_exports = {};
|
|
580
|
-
|
|
580
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, IdEnforcer_exports, {
|
|
581
581
|
read: () => read_exports7
|
|
582
582
|
});
|
|
583
583
|
|
|
584
584
|
// src/DelegationFramework/IdEnforcer/read.ts
|
|
585
585
|
var read_exports7 = {};
|
|
586
|
-
|
|
586
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports7, {
|
|
587
587
|
getIsUsed: () => read13,
|
|
588
588
|
getTermsInfo: () => read14
|
|
589
589
|
});
|
|
@@ -626,13 +626,13 @@ var read14 = async ({
|
|
|
626
626
|
|
|
627
627
|
// src/DelegationFramework/LimitedCallsEnforcer/index.ts
|
|
628
628
|
var LimitedCallsEnforcer_exports = {};
|
|
629
|
-
|
|
629
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, LimitedCallsEnforcer_exports, {
|
|
630
630
|
read: () => read_exports8
|
|
631
631
|
});
|
|
632
632
|
|
|
633
633
|
// src/DelegationFramework/LimitedCallsEnforcer/read.ts
|
|
634
634
|
var read_exports8 = {};
|
|
635
|
-
|
|
635
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports8, {
|
|
636
636
|
callCounts: () => read15,
|
|
637
637
|
getTermsInfo: () => read16
|
|
638
638
|
});
|
|
@@ -674,16 +674,16 @@ var read16 = async ({
|
|
|
674
674
|
|
|
675
675
|
// src/DelegationFramework/MultiSigDeleGator/index.ts
|
|
676
676
|
var MultiSigDeleGator_exports = {};
|
|
677
|
-
|
|
677
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, MultiSigDeleGator_exports, {
|
|
678
678
|
constants: () => constants_exports3,
|
|
679
|
-
encode: () =>
|
|
679
|
+
encode: () => _chunk23YXLKTXcjs.encode_exports2,
|
|
680
680
|
read: () => read_exports9,
|
|
681
681
|
simulate: () => simulate_exports4
|
|
682
682
|
});
|
|
683
683
|
|
|
684
684
|
// src/DelegationFramework/MultiSigDeleGator/read.ts
|
|
685
685
|
var read_exports9 = {};
|
|
686
|
-
|
|
686
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports9, {
|
|
687
687
|
getMaxNumberOfSigners: () => read17,
|
|
688
688
|
getSigners: () => read18,
|
|
689
689
|
getSignersCount: () => read19,
|
|
@@ -755,32 +755,32 @@ var read21 = async ({
|
|
|
755
755
|
|
|
756
756
|
// src/DelegationFramework/MultiSigDeleGator/simulate.ts
|
|
757
757
|
var simulate_exports4 = {};
|
|
758
|
-
|
|
759
|
-
addSigner: () =>
|
|
760
|
-
initializeMultiSigDeleGator: () =>
|
|
761
|
-
reinitializeMultiSigDeleGator: () =>
|
|
762
|
-
removeSigner: () =>
|
|
763
|
-
replaceSigner: () =>
|
|
764
|
-
updateMultiSigParameters: () =>
|
|
765
|
-
updateThreshold: () =>
|
|
758
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, simulate_exports4, {
|
|
759
|
+
addSigner: () => _chunk23YXLKTXcjs.simulate6,
|
|
760
|
+
initializeMultiSigDeleGator: () => _chunk23YXLKTXcjs.simulate7,
|
|
761
|
+
reinitializeMultiSigDeleGator: () => _chunk23YXLKTXcjs.simulate8,
|
|
762
|
+
removeSigner: () => _chunk23YXLKTXcjs.simulate9,
|
|
763
|
+
replaceSigner: () => _chunk23YXLKTXcjs.simulate10,
|
|
764
|
+
updateMultiSigParameters: () => _chunk23YXLKTXcjs.simulate11,
|
|
765
|
+
updateThreshold: () => _chunk23YXLKTXcjs.simulate12
|
|
766
766
|
});
|
|
767
767
|
|
|
768
768
|
// src/DelegationFramework/MultiSigDeleGator/constants.ts
|
|
769
769
|
var constants_exports3 = {};
|
|
770
|
-
|
|
770
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, constants_exports3, {
|
|
771
771
|
MAX_NUMBER_OF_SIGNERS: () => MAX_NUMBER_OF_SIGNERS
|
|
772
772
|
});
|
|
773
773
|
var MAX_NUMBER_OF_SIGNERS = 30;
|
|
774
774
|
|
|
775
775
|
// src/DelegationFramework/NativeTokenTransferAmountEnforcer/index.ts
|
|
776
776
|
var NativeTokenTransferAmountEnforcer_exports = {};
|
|
777
|
-
|
|
777
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, NativeTokenTransferAmountEnforcer_exports, {
|
|
778
778
|
read: () => read_exports10
|
|
779
779
|
});
|
|
780
780
|
|
|
781
781
|
// src/DelegationFramework/NativeTokenTransferAmountEnforcer/read.ts
|
|
782
782
|
var read_exports10 = {};
|
|
783
|
-
|
|
783
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports10, {
|
|
784
784
|
getSpentAmount: () => read22,
|
|
785
785
|
getTermsInfo: () => read23
|
|
786
786
|
});
|
|
@@ -822,7 +822,7 @@ var read23 = async ({
|
|
|
822
822
|
|
|
823
823
|
// src/DelegationFramework/NonceEnforcer/index.ts
|
|
824
824
|
var NonceEnforcer_exports = {};
|
|
825
|
-
|
|
825
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, NonceEnforcer_exports, {
|
|
826
826
|
encode: () => encode_exports6,
|
|
827
827
|
execute: () => execute_exports3,
|
|
828
828
|
read: () => read_exports11,
|
|
@@ -831,7 +831,7 @@ _chunkMIP7KJYHcjs.__export.call(void 0, NonceEnforcer_exports, {
|
|
|
831
831
|
|
|
832
832
|
// src/DelegationFramework/NonceEnforcer/encode.ts
|
|
833
833
|
var encode_exports6 = {};
|
|
834
|
-
|
|
834
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, encode_exports6, {
|
|
835
835
|
incrementNonce: () => encode4
|
|
836
836
|
});
|
|
837
837
|
|
|
@@ -873,13 +873,13 @@ var execute10 = async ({
|
|
|
873
873
|
|
|
874
874
|
// src/DelegationFramework/NonceEnforcer/execute.ts
|
|
875
875
|
var execute_exports3 = {};
|
|
876
|
-
|
|
876
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, execute_exports3, {
|
|
877
877
|
incrementNonce: () => execute10
|
|
878
878
|
});
|
|
879
879
|
|
|
880
880
|
// src/DelegationFramework/NonceEnforcer/read.ts
|
|
881
881
|
var read_exports11 = {};
|
|
882
|
-
|
|
882
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports11, {
|
|
883
883
|
currentNonce: () => read24,
|
|
884
884
|
getTermsInfo: () => read25
|
|
885
885
|
});
|
|
@@ -921,13 +921,13 @@ var read25 = async ({
|
|
|
921
921
|
|
|
922
922
|
// src/DelegationFramework/NonceEnforcer/simulate.ts
|
|
923
923
|
var simulate_exports5 = {};
|
|
924
|
-
|
|
924
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, simulate_exports5, {
|
|
925
925
|
incrementNonce: () => simulate22
|
|
926
926
|
});
|
|
927
927
|
|
|
928
928
|
// src/DelegationFramework/Ownable2Step/index.ts
|
|
929
929
|
var Ownable2Step_exports = {};
|
|
930
|
-
|
|
930
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, Ownable2Step_exports, {
|
|
931
931
|
encode: () => encode_exports7,
|
|
932
932
|
execute: () => execute_exports4,
|
|
933
933
|
read: () => read_exports12,
|
|
@@ -936,7 +936,7 @@ _chunkMIP7KJYHcjs.__export.call(void 0, Ownable2Step_exports, {
|
|
|
936
936
|
|
|
937
937
|
// src/DelegationFramework/Ownable2Step/read.ts
|
|
938
938
|
var read_exports12 = {};
|
|
939
|
-
|
|
939
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports12, {
|
|
940
940
|
getOwner: () => read26,
|
|
941
941
|
getPendingOwner: () => read27
|
|
942
942
|
});
|
|
@@ -967,7 +967,7 @@ var read27 = async ({
|
|
|
967
967
|
|
|
968
968
|
// src/DelegationFramework/Ownable2Step/execute.ts
|
|
969
969
|
var execute_exports4 = {};
|
|
970
|
-
|
|
970
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, execute_exports4, {
|
|
971
971
|
acceptOwnership: () => execute11,
|
|
972
972
|
renounceOwnership: () => execute12,
|
|
973
973
|
transferOwnership: () => execute13
|
|
@@ -1073,7 +1073,7 @@ var encode7 = (account) => {
|
|
|
1073
1073
|
|
|
1074
1074
|
// src/DelegationFramework/Ownable2Step/encode.ts
|
|
1075
1075
|
var encode_exports7 = {};
|
|
1076
|
-
|
|
1076
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, encode_exports7, {
|
|
1077
1077
|
acceptOwnership: () => encode5,
|
|
1078
1078
|
renounceOwnership: () => encode6,
|
|
1079
1079
|
transferOwnership: () => encode7
|
|
@@ -1081,7 +1081,7 @@ _chunkMIP7KJYHcjs.__export.call(void 0, encode_exports7, {
|
|
|
1081
1081
|
|
|
1082
1082
|
// src/DelegationFramework/Ownable2Step/simulate.ts
|
|
1083
1083
|
var simulate_exports6 = {};
|
|
1084
|
-
|
|
1084
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, simulate_exports6, {
|
|
1085
1085
|
acceptOwnership: () => simulate23,
|
|
1086
1086
|
renounceOwnership: () => simulate24,
|
|
1087
1087
|
transferOwnership: () => simulate25
|
|
@@ -1089,7 +1089,7 @@ _chunkMIP7KJYHcjs.__export.call(void 0, simulate_exports6, {
|
|
|
1089
1089
|
|
|
1090
1090
|
// src/DelegationFramework/Pausable/index.ts
|
|
1091
1091
|
var Pausable_exports = {};
|
|
1092
|
-
|
|
1092
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, Pausable_exports, {
|
|
1093
1093
|
encode: () => encode_exports8,
|
|
1094
1094
|
execute: () => execute_exports5,
|
|
1095
1095
|
read: () => read_exports13,
|
|
@@ -1098,7 +1098,7 @@ _chunkMIP7KJYHcjs.__export.call(void 0, Pausable_exports, {
|
|
|
1098
1098
|
|
|
1099
1099
|
// src/DelegationFramework/Pausable/read.ts
|
|
1100
1100
|
var read_exports13 = {};
|
|
1101
|
-
|
|
1101
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports13, {
|
|
1102
1102
|
isPaused: () => read28
|
|
1103
1103
|
});
|
|
1104
1104
|
|
|
@@ -1116,7 +1116,7 @@ var read28 = async ({
|
|
|
1116
1116
|
|
|
1117
1117
|
// src/DelegationFramework/Pausable/execute.ts
|
|
1118
1118
|
var execute_exports5 = {};
|
|
1119
|
-
|
|
1119
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, execute_exports5, {
|
|
1120
1120
|
pause: () => execute14,
|
|
1121
1121
|
unpause: () => execute15
|
|
1122
1122
|
});
|
|
@@ -1201,22 +1201,22 @@ var encode9 = () => {
|
|
|
1201
1201
|
|
|
1202
1202
|
// src/DelegationFramework/Pausable/encode.ts
|
|
1203
1203
|
var encode_exports8 = {};
|
|
1204
|
-
|
|
1204
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, encode_exports8, {
|
|
1205
1205
|
pause: () => encode8,
|
|
1206
1206
|
unpause: () => encode9
|
|
1207
1207
|
});
|
|
1208
1208
|
|
|
1209
1209
|
// src/DelegationFramework/Pausable/simulate.ts
|
|
1210
1210
|
var simulate_exports7 = {};
|
|
1211
|
-
|
|
1211
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, simulate_exports7, {
|
|
1212
1212
|
pause: () => simulate26,
|
|
1213
1213
|
unpause: () => simulate27
|
|
1214
1214
|
});
|
|
1215
1215
|
|
|
1216
1216
|
// src/DelegationFramework/SimpleFactory/index.ts
|
|
1217
1217
|
var SimpleFactory_exports = {};
|
|
1218
|
-
|
|
1219
|
-
encode: () =>
|
|
1218
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, SimpleFactory_exports, {
|
|
1219
|
+
encode: () => _chunk23YXLKTXcjs.encode_exports3,
|
|
1220
1220
|
execute: () => execute_exports6,
|
|
1221
1221
|
read: () => read_exports14,
|
|
1222
1222
|
simulate: () => simulate_exports8
|
|
@@ -1224,13 +1224,13 @@ _chunkMIP7KJYHcjs.__export.call(void 0, SimpleFactory_exports, {
|
|
|
1224
1224
|
|
|
1225
1225
|
// src/DelegationFramework/SimpleFactory/execute.ts
|
|
1226
1226
|
var execute_exports6 = {};
|
|
1227
|
-
|
|
1228
|
-
create2Deploy: () =>
|
|
1227
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, execute_exports6, {
|
|
1228
|
+
create2Deploy: () => _chunk23YXLKTXcjs.execute
|
|
1229
1229
|
});
|
|
1230
1230
|
|
|
1231
1231
|
// src/DelegationFramework/SimpleFactory/read.ts
|
|
1232
1232
|
var read_exports14 = {};
|
|
1233
|
-
|
|
1233
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports14, {
|
|
1234
1234
|
getCreate2Address: () => read29
|
|
1235
1235
|
});
|
|
1236
1236
|
|
|
@@ -1248,19 +1248,19 @@ var read29 = async (client, factoryAddress, creationCode, salt) => {
|
|
|
1248
1248
|
|
|
1249
1249
|
// src/DelegationFramework/SimpleFactory/simulate.ts
|
|
1250
1250
|
var simulate_exports8 = {};
|
|
1251
|
-
|
|
1252
|
-
create2Deploy: () =>
|
|
1251
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, simulate_exports8, {
|
|
1252
|
+
create2Deploy: () => _chunk23YXLKTXcjs.simulate13
|
|
1253
1253
|
});
|
|
1254
1254
|
|
|
1255
1255
|
// src/DelegationFramework/SpecificActionERC20TransferBatchEnforcer/index.ts
|
|
1256
1256
|
var SpecificActionERC20TransferBatchEnforcer_exports = {};
|
|
1257
|
-
|
|
1257
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, SpecificActionERC20TransferBatchEnforcer_exports, {
|
|
1258
1258
|
read: () => read_exports15
|
|
1259
1259
|
});
|
|
1260
1260
|
|
|
1261
1261
|
// src/DelegationFramework/SpecificActionERC20TransferBatchEnforcer/read.ts
|
|
1262
1262
|
var read_exports15 = {};
|
|
1263
|
-
|
|
1263
|
+
_chunkYDLLC6PPcjs.__export.call(void 0, read_exports15, {
|
|
1264
1264
|
getTermsInfo: () => read30,
|
|
1265
1265
|
usedDelegations: () => read31
|
|
1266
1266
|
});
|
|
@@ -1319,4 +1319,4 @@ var read31 = async ({
|
|
|
1319
1319
|
|
|
1320
1320
|
|
|
1321
1321
|
exports.read = read7; exports.DelegationManager_exports = DelegationManager_exports; exports.DeleGatorCore_exports = DeleGatorCore_exports; exports.EIP712_exports = EIP712_exports; exports.EntryPoint_exports = EntryPoint_exports; exports.ERC20TransferAmountEnforcer_exports = ERC20TransferAmountEnforcer_exports; exports.HybridDeleGator_exports = HybridDeleGator_exports; exports.IdEnforcer_exports = IdEnforcer_exports; exports.LimitedCallsEnforcer_exports = LimitedCallsEnforcer_exports; exports.MultiSigDeleGator_exports = MultiSigDeleGator_exports; exports.NativeTokenTransferAmountEnforcer_exports = NativeTokenTransferAmountEnforcer_exports; exports.NonceEnforcer_exports = NonceEnforcer_exports; exports.Ownable2Step_exports = Ownable2Step_exports; exports.Pausable_exports = Pausable_exports; exports.SimpleFactory_exports = SimpleFactory_exports; exports.SpecificActionERC20TransferBatchEnforcer_exports = SpecificActionERC20TransferBatchEnforcer_exports; exports.contracts_exports = contracts_exports;
|
|
1322
|
-
//# sourceMappingURL=chunk-
|
|
1322
|
+
//# sourceMappingURL=chunk-XN36L4RX.cjs.map
|