//#region extensions/crypto/src/services/delegation-types.ts
const DELEGATION_CONTRACTS = {
	DelegationManager: "0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3",
	EIP7702StatelessDeleGator: "0x63c0c19a282a1B52b07dD5a65b58948A07DAE32B",
	HybridDeleGator: "0x48dBe696A4D990079e039489bA2053B36E8FFEC4",
	MultiSigDeleGator: "0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7",
	ERC20TransferAmountEnforcer: "0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc",
	ERC20PeriodTransferEnforcer: "0x474e3Ae7E169e940607cC624Da8A15Eb120139aB",
	LimitedCallsEnforcer: "0x04658B29F6b82ed55274221a06Fc97D318E25416",
	AllowedTargetsEnforcer: "0x7F20f61b1f09b08D970938F6fa563634d65c4EeB",
	AllowedMethodsEnforcer: "0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5",
	TimestampEnforcer: "0x1046bb45C8d673d4ea75321280DB34899413c069",
	NativeTokenTransferAmountEnforcer: "0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320",
	NativeTokenPeriodTransferEnforcer: "0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9",
	ValueLteEnforcer: "0x92Bf12322527cAA612fd31a0e810472BBB106A8F",
	NonceEnforcer: "0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f"
};
const SUPPORTED_CHAIN_IDS = new Set([
	1,
	8453,
	42161,
	10,
	137,
	59144,
	11155111,
	84532
]);
const CHAIN_NAMES = {
	1: "Ethereum",
	8453: "Base",
	42161: "Arbitrum",
	10: "Optimism",
	137: "Polygon",
	59144: "Linea",
	11155111: "Sepolia",
	84532: "Base Sepolia"
};
const DELEGATION_EIP712_TYPES = {
	Delegation: [
		{
			name: "delegate",
			type: "address"
		},
		{
			name: "delegator",
			type: "address"
		},
		{
			name: "authority",
			type: "bytes32"
		},
		{
			name: "caveats",
			type: "Caveat[]"
		},
		{
			name: "salt",
			type: "uint256"
		}
	],
	Caveat: [{
		name: "enforcer",
		type: "address"
	}, {
		name: "terms",
		type: "bytes"
	}]
};
/**
* Build the EIP-712 domain for a DelegationManager on a specific chain.
*/
function getDelegationDomain(chainId) {
	return {
		name: "DelegationManager",
		version: "1",
		chainId,
		verifyingContract: DELEGATION_CONTRACTS.DelegationManager
	};
}
/**
* Root authority for top-level delegations (no parent).
* The DelegationManager uses 0xfff...f as the sentinel value.
*/
const ROOT_AUTHORITY = "0x" + "f".repeat(64);
/**
* Default single-call execution mode.
* callType=0x00 (single), execType=0x00 (default), rest zeros.
*/
const EXECUTE_MODE_DEFAULT = "0x" + "0".repeat(64);
/**
* Well-known period durations in seconds, for on-chain period enforcers.
*/
const PERIOD_SECONDS = {
	hourly: 3600,
	daily: 86400,
	weekly: 604800,
	monthly: 2592e3
};
const DELEGATION_MANAGER_ABI = [
	{
		name: "redeemDelegations",
		type: "function",
		stateMutability: "nonpayable",
		inputs: [
			{
				name: "_permissionContexts",
				type: "bytes[]"
			},
			{
				name: "_modes",
				type: "bytes32[]"
			},
			{
				name: "_executionCallData",
				type: "bytes[]"
			}
		],
		outputs: []
	},
	{
		name: "disableDelegation",
		type: "function",
		stateMutability: "nonpayable",
		inputs: [{
			name: "_delegation",
			type: "tuple",
			components: [
				{
					name: "delegate",
					type: "address"
				},
				{
					name: "delegator",
					type: "address"
				},
				{
					name: "authority",
					type: "bytes32"
				},
				{
					name: "caveats",
					type: "tuple[]",
					components: [
						{
							name: "enforcer",
							type: "address"
						},
						{
							name: "terms",
							type: "bytes"
						},
						{
							name: "args",
							type: "bytes"
						}
					]
				},
				{
					name: "salt",
					type: "uint256"
				},
				{
					name: "signature",
					type: "bytes"
				}
			]
		}],
		outputs: []
	},
	{
		name: "getDelegationHash",
		type: "function",
		stateMutability: "view",
		inputs: [{
			name: "_delegation",
			type: "tuple",
			components: [
				{
					name: "delegate",
					type: "address"
				},
				{
					name: "delegator",
					type: "address"
				},
				{
					name: "authority",
					type: "bytes32"
				},
				{
					name: "caveats",
					type: "tuple[]",
					components: [
						{
							name: "enforcer",
							type: "address"
						},
						{
							name: "terms",
							type: "bytes"
						},
						{
							name: "args",
							type: "bytes"
						}
					]
				},
				{
					name: "salt",
					type: "uint256"
				},
				{
					name: "signature",
					type: "bytes"
				}
			]
		}],
		outputs: [{
			name: "",
			type: "bytes32"
		}]
	},
	{
		name: "disabledDelegations",
		type: "function",
		stateMutability: "view",
		inputs: [{
			name: "_delegationHash",
			type: "bytes32"
		}],
		outputs: [{
			name: "",
			type: "bool"
		}]
	}
];
/** ABI for NativeTokenPeriodTransferEnforcer.spentMap (read cumulative ETH usage). */
const NATIVE_PERIOD_ENFORCER_ABI = [{
	name: "spentMap",
	type: "function",
	stateMutability: "view",
	inputs: [{
		name: "_delegationManager",
		type: "address"
	}, {
		name: "_delegationHash",
		type: "bytes32"
	}],
	outputs: [{
		name: "spent",
		type: "uint256"
	}, {
		name: "lastUpdated",
		type: "uint256"
	}]
}];
/** ABI for ERC20PeriodTransferEnforcer.spentMap (read cumulative ERC-20 usage). */
const ERC20_PERIOD_ENFORCER_ABI = [{
	name: "spentMap",
	type: "function",
	stateMutability: "view",
	inputs: [{
		name: "_delegationManager",
		type: "address"
	}, {
		name: "_delegationHash",
		type: "bytes32"
	}],
	outputs: [{
		name: "spent",
		type: "uint256"
	}, {
		name: "lastUpdated",
		type: "uint256"
	}]
}];
/** ABI for LimitedCallsEnforcer.callCounts (read cumulative call count). */
const LIMITED_CALLS_ENFORCER_ABI = [{
	name: "callCounts",
	type: "function",
	stateMutability: "view",
	inputs: [{
		name: "_delegationManager",
		type: "address"
	}, {
		name: "_delegationHash",
		type: "bytes32"
	}],
	outputs: [{
		name: "",
		type: "uint256"
	}]
}];
//#endregion
export { CHAIN_NAMES, DELEGATION_CONTRACTS, DELEGATION_EIP712_TYPES, DELEGATION_MANAGER_ABI, ERC20_PERIOD_ENFORCER_ABI, EXECUTE_MODE_DEFAULT, LIMITED_CALLS_ENFORCER_ABI, NATIVE_PERIOD_ENFORCER_ABI, PERIOD_SECONDS, ROOT_AUTHORITY, SUPPORTED_CHAIN_IDS, getDelegationDomain };

//# sourceMappingURL=delegation-types.mjs.map