@bloxchain/sdk 1.0.0-alpha.6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +411 -376
- package/abi/AccountBlox.abi.json +1895 -1833
- package/abi/BaseStateMachine.abi.json +773 -822
- package/abi/CopyBlox.abi.json +1609 -0
- package/abi/EngineBlox.abi.json +562 -552
- package/abi/GuardController.abi.json +1597 -1609
- package/abi/GuardControllerDefinitions.abi.json +257 -120
- package/abi/IDefinition.abi.json +57 -47
- package/abi/RoleBlox.abi.json +2993 -2982
- package/abi/RuntimeRBAC.abi.json +841 -842
- package/abi/RuntimeRBACDefinitions.abi.json +265 -99
- package/abi/SecureBlox.abi.json +2752 -2752
- package/abi/SecureOwnable.abi.json +1365 -1349
- package/abi/SecureOwnableDefinitions.abi.json +174 -164
- package/dist/abi/AccountBlox.abi.json +3978 -0
- package/dist/abi/BareBlox.abi.json +1378 -0
- package/dist/abi/BaseStateMachine.abi.json +1281 -1330
- package/dist/abi/CopyBlox.abi.json +1609 -0
- package/dist/abi/EngineBlox.abi.json +862 -0
- package/dist/abi/GuardController.abi.json +2325 -2337
- package/dist/abi/GuardControllerDefinitions.abi.json +416 -0
- package/dist/abi/IDefinition.abi.json +122 -112
- package/dist/abi/RoleBlox.abi.json +2994 -0
- package/dist/abi/RuntimeRBAC.abi.json +1629 -1630
- package/dist/abi/RuntimeRBACDefinitions.abi.json +386 -0
- package/dist/abi/SecureBlox.abi.json +2753 -0
- package/dist/abi/SecureOwnable.abi.json +2735 -2719
- package/dist/abi/SecureOwnableDefinitions.abi.json +421 -0
- package/{abi → dist/abi}/SimpleRWA20.abi.json +52 -74
- package/{abi → dist/abi}/SimpleRWA20Definitions.abi.json +5 -0
- package/{abi → dist/abi}/SimpleVault.abi.json +54 -76
- package/{abi → dist/abi}/SimpleVaultDefinitions.abi.json +5 -0
- package/dist/abi.d.ts +11 -0
- package/dist/abi.d.ts.map +1 -0
- package/dist/abi.js +10 -0
- package/dist/abi.js.map +1 -0
- package/dist/contracts/core/BaseStateMachine.d.ts +7 -8
- package/dist/contracts/core/BaseStateMachine.d.ts.map +1 -1
- package/dist/contracts/core/BaseStateMachine.js +77 -42
- package/dist/contracts/core/BaseStateMachine.js.map +1 -1
- package/dist/contracts/core/GuardController.d.ts +21 -14
- package/dist/contracts/core/GuardController.d.ts.map +1 -1
- package/dist/contracts/core/GuardController.js +18 -20
- package/dist/contracts/core/GuardController.js.map +1 -1
- package/dist/contracts/core/RuntimeRBAC.d.ts +5 -18
- package/dist/contracts/core/RuntimeRBAC.d.ts.map +1 -1
- package/dist/contracts/core/RuntimeRBAC.js +4 -21
- package/dist/contracts/core/RuntimeRBAC.js.map +1 -1
- package/dist/contracts/core/SecureOwnable.d.ts +14 -16
- package/dist/contracts/core/SecureOwnable.d.ts.map +1 -1
- package/dist/contracts/core/SecureOwnable.js +21 -24
- package/dist/contracts/core/SecureOwnable.js.map +1 -1
- package/dist/index.d.ts +32 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -26
- package/dist/index.js.map +1 -1
- package/dist/interfaces/base.index.d.ts +10 -2
- package/dist/interfaces/base.index.d.ts.map +1 -1
- package/dist/interfaces/base.state.machine.index.d.ts +4 -6
- package/dist/interfaces/base.state.machine.index.d.ts.map +1 -1
- package/dist/interfaces/core.access.index.d.ts +4 -9
- package/dist/interfaces/core.access.index.d.ts.map +1 -1
- package/dist/interfaces/core.execution.index.d.ts +9 -12
- package/dist/interfaces/core.execution.index.d.ts.map +1 -1
- package/dist/interfaces/core.security.index.d.ts +4 -7
- package/dist/interfaces/core.security.index.d.ts.map +1 -1
- package/dist/interfaces/definition.index.d.ts +1 -1
- package/dist/interfaces/definition.index.d.ts.map +1 -1
- package/dist/interfaces/lib.index.d.ts +2 -2
- package/dist/interfaces/lib.index.d.ts.map +1 -1
- package/dist/lib/Definition.d.ts +2 -2
- package/dist/lib/Definition.d.ts.map +1 -1
- package/dist/lib/Definition.js +9 -2
- package/dist/lib/Definition.js.map +1 -1
- package/dist/lib/EngineBlox.d.ts +23 -48
- package/dist/lib/EngineBlox.d.ts.map +1 -1
- package/dist/lib/EngineBlox.js +61 -136
- package/dist/lib/EngineBlox.js.map +1 -1
- package/dist/lib/definitions/GuardControllerDefinitions.d.ts +30 -13
- package/dist/lib/definitions/GuardControllerDefinitions.d.ts.map +1 -1
- package/dist/lib/definitions/GuardControllerDefinitions.js +58 -27
- package/dist/lib/definitions/GuardControllerDefinitions.js.map +1 -1
- package/dist/lib/definitions/RuntimeRBACDefinitions.d.ts +44 -13
- package/dist/lib/definitions/RuntimeRBACDefinitions.d.ts.map +1 -1
- package/dist/lib/definitions/RuntimeRBACDefinitions.js +68 -32
- package/dist/lib/definitions/RuntimeRBACDefinitions.js.map +1 -1
- package/dist/lib/definitions/SecureOwnableDefinitions.d.ts +12 -7
- package/dist/lib/definitions/SecureOwnableDefinitions.d.ts.map +1 -1
- package/dist/lib/definitions/SecureOwnableDefinitions.js +25 -9
- package/dist/lib/definitions/SecureOwnableDefinitions.js.map +1 -1
- package/dist/lib/definitions/index.d.ts +7 -5
- package/dist/lib/definitions/index.d.ts.map +1 -1
- package/dist/lib/definitions/index.js +6 -5
- package/dist/lib/definitions/index.js.map +1 -1
- package/dist/types/base.state.machine.index.d.ts +4 -20
- package/dist/types/base.state.machine.index.d.ts.map +1 -1
- package/dist/types/base.state.machine.index.js +20 -40
- package/dist/types/base.state.machine.index.js.map +1 -1
- package/dist/types/core.access.index.d.ts +0 -16
- package/dist/types/core.access.index.d.ts.map +1 -1
- package/dist/types/core.access.index.js +2 -13
- package/dist/types/core.access.index.js.map +1 -1
- package/dist/types/core.execution.index.d.ts +9 -10
- package/dist/types/core.execution.index.d.ts.map +1 -1
- package/dist/types/core.execution.index.js +16 -13
- package/dist/types/core.execution.index.js.map +1 -1
- package/dist/types/core.security.index.d.ts +4 -6
- package/dist/types/core.security.index.d.ts.map +1 -1
- package/dist/types/core.security.index.js +23 -27
- package/dist/types/core.security.index.js.map +1 -1
- package/dist/types/definition.index.d.ts +8 -1
- package/dist/types/definition.index.d.ts.map +1 -1
- package/dist/types/definition.index.js.map +1 -1
- package/dist/types/lib.index.d.ts +7 -28
- package/dist/types/lib.index.d.ts.map +1 -1
- package/dist/types/lib.index.js +11 -34
- package/dist/types/lib.index.js.map +1 -1
- package/dist/types/meta-transaction.signatures.d.ts +10 -0
- package/dist/types/meta-transaction.signatures.d.ts.map +1 -0
- package/dist/types/meta-transaction.signatures.js +12 -0
- package/dist/types/meta-transaction.signatures.js.map +1 -0
- package/dist/types/meta-tx-signatures.d.ts +9 -0
- package/dist/types/meta-tx-signatures.d.ts.map +1 -0
- package/dist/types/meta-tx-signatures.js +11 -0
- package/dist/types/meta-tx-signatures.js.map +1 -0
- package/dist/utils/bitmap.d.ts +1 -1
- package/dist/utils/bitmap.d.ts.map +1 -1
- package/dist/utils/contract-errors.d.ts +125 -12
- package/dist/utils/contract-errors.d.ts.map +1 -1
- package/dist/utils/contract-errors.js +367 -104
- package/dist/utils/contract-errors.js.map +1 -1
- package/dist/utils/erc20/erc20Token.d.ts +1 -1
- package/dist/utils/erc20/erc20Token.d.ts.map +1 -1
- package/dist/utils/erc20/erc20Token.js +5 -1
- package/dist/utils/erc20/erc20Token.js.map +1 -1
- package/dist/utils/interface-ids.d.ts +5 -31
- package/dist/utils/interface-ids.d.ts.map +1 -1
- package/dist/utils/interface-ids.js +27 -88
- package/dist/utils/interface-ids.js.map +1 -1
- package/dist/utils/metaTx/metaTransaction.d.ts +110 -9
- package/dist/utils/metaTx/metaTransaction.d.ts.map +1 -1
- package/dist/utils/metaTx/metaTransaction.js +146 -26
- package/dist/utils/metaTx/metaTransaction.js.map +1 -1
- package/dist/utils/validations.d.ts +1 -1
- package/dist/utils/validations.d.ts.map +1 -1
- package/dist/utils/validations.js +12 -12
- package/dist/utils/validations.js.map +1 -1
- package/dist/utils/viem-error-handler.d.ts +1 -1
- package/dist/utils/viem-error-handler.d.ts.map +1 -1
- package/dist/utils/viem-error-handler.js +1 -1
- package/dist/utils/viem-error-handler.js.map +1 -1
- package/package.json +77 -71
- package/dist/contracts/BaseStateMachine.d.ts +0 -92
- package/dist/contracts/BaseStateMachine.d.ts.map +0 -1
- package/dist/contracts/BaseStateMachine.js +0 -263
- package/dist/contracts/BaseStateMachine.js.map +0 -1
- package/dist/contracts/GuardController.d.ts +0 -120
- package/dist/contracts/GuardController.d.ts.map +0 -1
- package/dist/contracts/GuardController.js +0 -150
- package/dist/contracts/GuardController.js.map +0 -1
- package/dist/contracts/RuntimeRBAC.d.ts +0 -40
- package/dist/contracts/RuntimeRBAC.d.ts.map +0 -1
- package/dist/contracts/RuntimeRBAC.js +0 -50
- package/dist/contracts/RuntimeRBAC.js.map +0 -1
- package/dist/contracts/SecureOwnable.d.ts +0 -41
- package/dist/contracts/SecureOwnable.d.ts.map +0 -1
- package/dist/contracts/SecureOwnable.js +0 -81
- package/dist/contracts/SecureOwnable.js.map +0 -1
|
@@ -1,41 +1,72 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GuardControllerDefinitions
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Calls the deployed GuardControllerDefinitions contract for specs and encoding.
|
|
4
|
+
* Single source of truth: action names, formats, and encoding come from the contract.
|
|
5
|
+
* @see contracts/core/execution/lib/definitions/GuardControllerDefinitions.sol
|
|
6
|
+
* @see scripts/sanity/guard-controller/base-test.cjs createGuardConfigBatchMetaTx (actionsArray = [actionType, data] per element)
|
|
6
7
|
*/
|
|
7
|
-
import { encodeAbiParameters, parseAbiParameters } from 'viem';
|
|
8
|
+
import { bytesToHex, encodeAbiParameters, parseAbiParameters } from 'viem';
|
|
9
|
+
import GuardControllerDefinitionsAbi from '../../abi/GuardControllerDefinitions.abi.json' with { type: 'json' };
|
|
10
|
+
const ABI = GuardControllerDefinitionsAbi;
|
|
11
|
+
/** Normalize bytes to ABI Hex (0x-prefixed); empty -> '0x'. */
|
|
12
|
+
function normalizeData(data) {
|
|
13
|
+
if (data === undefined || data === null)
|
|
14
|
+
return '0x';
|
|
15
|
+
if (typeof data === 'string')
|
|
16
|
+
return data.startsWith('0x') ? data : `0x${data}`;
|
|
17
|
+
return bytesToHex(data);
|
|
18
|
+
}
|
|
8
19
|
/**
|
|
9
20
|
* Builds execution params for executeGuardConfigBatch((uint8,bytes)[]).
|
|
10
|
-
*
|
|
11
|
-
* Same
|
|
21
|
+
* Encoding matches GuardControllerDefinitions.sol guardConfigBatchExecutionParams (abi.encode(actions)).
|
|
22
|
+
* Same format as scripts/sanity (direct contract tests); single source of truth in this module.
|
|
12
23
|
*/
|
|
13
|
-
export function guardConfigBatchExecutionParams(actions) {
|
|
14
|
-
const
|
|
24
|
+
export function guardConfigBatchExecutionParams(_client, _definitionAddress, actions) {
|
|
25
|
+
const actionsTuple = actions.map((a) => ({
|
|
15
26
|
actionType: Number(a.actionType),
|
|
16
|
-
data: a.data
|
|
27
|
+
data: normalizeData(a.data)
|
|
17
28
|
}));
|
|
18
|
-
return encodeAbiParameters(parseAbiParameters('(uint8 actionType, bytes data)[]'), [
|
|
29
|
+
return encodeAbiParameters(parseAbiParameters('(uint8 actionType, bytes data)[]'), [actionsTuple]);
|
|
19
30
|
}
|
|
20
31
|
/**
|
|
21
|
-
* Returns all available GuardConfig action types and their ABI decode formats.
|
|
22
|
-
* Mirrors GuardControllerDefinitions.getGuardConfigActionSpecs in Solidity.
|
|
23
|
-
*
|
|
32
|
+
* Returns all available GuardConfig action types and their ABI decode formats from the contract.
|
|
24
33
|
* Index i in both arrays corresponds to GuardConfigActionType enum value i.
|
|
25
34
|
*/
|
|
26
|
-
export function getGuardConfigActionSpecs() {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'
|
|
31
|
-
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
];
|
|
39
|
-
|
|
35
|
+
export async function getGuardConfigActionSpecs(client, definitionAddress) {
|
|
36
|
+
const result = (await client.readContract({
|
|
37
|
+
address: definitionAddress,
|
|
38
|
+
abi: ABI,
|
|
39
|
+
functionName: 'getGuardConfigActionSpecs'
|
|
40
|
+
}));
|
|
41
|
+
return { actionNames: result[0], formats: result[1] };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Encodes data for ADD_TARGET_TO_WHITELIST. Matches GuardControllerDefinitions.sol encodeAddTargetToWhitelist (abi.encode(functionSelector, target)).
|
|
45
|
+
*/
|
|
46
|
+
export function encodeAddTargetToWhitelist(_client, _definitionAddress, functionSelector, target) {
|
|
47
|
+
return encodeAbiParameters(parseAbiParameters('bytes4, address'), [functionSelector, target]);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Encodes data for REMOVE_TARGET_FROM_WHITELIST. Matches GuardControllerDefinitions.sol encodeRemoveTargetFromWhitelist (abi.encode(functionSelector, target)).
|
|
51
|
+
*/
|
|
52
|
+
export function encodeRemoveTargetFromWhitelist(_client, _definitionAddress, functionSelector, target) {
|
|
53
|
+
return encodeAbiParameters(parseAbiParameters('bytes4, address'), [functionSelector, target]);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Encodes data for REGISTER_FUNCTION. Matches GuardControllerDefinitions.sol encodeRegisterFunction (abi.encode(functionSignature, operationName, supportedActions)).
|
|
57
|
+
* supportedActions: array of TxAction enum values (e.g. TxAction.EXECUTE_TIME_DELAY_REQUEST).
|
|
58
|
+
*/
|
|
59
|
+
export function encodeRegisterFunction(_client, _definitionAddress, functionSignature, operationName, supportedActions) {
|
|
60
|
+
return encodeAbiParameters(parseAbiParameters('string, string, uint8[]'), [
|
|
61
|
+
functionSignature,
|
|
62
|
+
operationName,
|
|
63
|
+
supportedActions.map((a) => Number(a))
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Encodes data for UNREGISTER_FUNCTION. Matches GuardControllerDefinitions.sol encodeUnregisterFunction (abi.encode(functionSelector, safeRemoval)).
|
|
68
|
+
*/
|
|
69
|
+
export function encodeUnregisterFunction(_client, _definitionAddress, functionSelector, safeRemoval) {
|
|
70
|
+
return encodeAbiParameters(parseAbiParameters('bytes4, bool'), [functionSelector, safeRemoval]);
|
|
40
71
|
}
|
|
41
72
|
//# sourceMappingURL=GuardControllerDefinitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuardControllerDefinitions.js","sourceRoot":"","sources":["../../../lib/definitions/GuardControllerDefinitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"GuardControllerDefinitions.js","sourceRoot":"","sources":["../../../lib/definitions/GuardControllerDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAuD,UAAU,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAChI,OAAO,6BAA6B,MAAM,+CAA+C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAIhH,MAAM,GAAG,GAAG,6BAAoC,CAAC;AAEjD,+DAA+D;AAC/D,SAAS,aAAa,CAAC,IAAyC;IAC9D,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACrD,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,IAAY,CAAC,CAAC,CAAE,KAAK,IAAI,EAAU,CAAC;IAClG,OAAO,UAAU,CAAC,IAAkB,CAAQ,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,OAAqB,EACrB,kBAA2B,EAC3B,OAA4B;IAE5B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACvC,UAAU,EAAE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CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KACvC,CAAQ,CAAC;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,OAAqB,EACrB,kBAA2B,EAC3B,gBAAqB,EACrB,WAAoB;IAEpB,OAAO,mBAAmB,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAQ,CAAC;AACzG,CAAC"}
|
|
@@ -1,25 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RuntimeRBACDefinitions
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Calls the deployed RuntimeRBACDefinitions contract for specs and encoding.
|
|
4
|
+
* Single source of truth: action names, formats, and encoding come from the contract.
|
|
5
|
+
* @see contracts/core/access/lib/definitions/RuntimeRBACDefinitions.sol
|
|
6
6
|
*/
|
|
7
|
-
import { Hex } from 'viem';
|
|
8
|
-
import type { RoleConfigAction } from '../../types/core.access.index';
|
|
7
|
+
import { type Address, type Hex, type PublicClient } from 'viem';
|
|
8
|
+
import type { RoleConfigAction } from '../../types/core.access.index.js';
|
|
9
|
+
/**
|
|
10
|
+
* FunctionPermission shape for encodeAddFunctionToRole.
|
|
11
|
+
* Matches Solidity EngineBlox.FunctionPermission (functionSelector, grantedActionsBitmap, handlerForSelectors).
|
|
12
|
+
*/
|
|
13
|
+
export interface FunctionPermissionForEncoding {
|
|
14
|
+
functionSelector: Hex;
|
|
15
|
+
grantedActionsBitmap: number;
|
|
16
|
+
handlerForSelectors: readonly Hex[];
|
|
17
|
+
}
|
|
9
18
|
/**
|
|
10
19
|
* Builds execution params for executeRoleConfigBatch((uint8,bytes)[]).
|
|
11
|
-
*
|
|
12
|
-
* Same
|
|
20
|
+
* Encoding matches RuntimeRBACDefinitions.sol roleConfigBatchExecutionParams (abi.encode(actions)).
|
|
21
|
+
* Same format as scripts/sanity (direct contract tests); single source of truth in this module.
|
|
13
22
|
*/
|
|
14
|
-
export declare function roleConfigBatchExecutionParams(actions: RoleConfigAction[]): Hex;
|
|
23
|
+
export declare function roleConfigBatchExecutionParams(_client: PublicClient, _definitionAddress: Address, actions: RoleConfigAction[]): Hex;
|
|
15
24
|
/**
|
|
16
|
-
* Returns all available RoleConfig action types and their ABI decode formats.
|
|
17
|
-
* Mirrors RuntimeRBACDefinitions.getRoleConfigActionSpecs in Solidity.
|
|
18
|
-
*
|
|
25
|
+
* Returns all available RoleConfig action types and their ABI decode formats from the contract.
|
|
19
26
|
* Index i in both arrays corresponds to RoleConfigActionType enum value i.
|
|
20
27
|
*/
|
|
21
|
-
export declare function getRoleConfigActionSpecs(): {
|
|
28
|
+
export declare function getRoleConfigActionSpecs(client: PublicClient, definitionAddress: Address): Promise<{
|
|
22
29
|
actionNames: string[];
|
|
23
30
|
formats: string[];
|
|
24
|
-
}
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Encodes data for CREATE_ROLE. Matches RuntimeRBACDefinitions.sol encodeCreateRole (abi.encode(roleName, maxWallets)).
|
|
34
|
+
*/
|
|
35
|
+
export declare function encodeCreateRole(_client: PublicClient, _definitionAddress: Address, roleName: string, maxWallets: bigint): Hex;
|
|
36
|
+
/**
|
|
37
|
+
* Encodes data for REMOVE_ROLE. Matches RuntimeRBACDefinitions.sol encodeRemoveRole (abi.encode(roleHash)).
|
|
38
|
+
*/
|
|
39
|
+
export declare function encodeRemoveRole(_client: PublicClient, _definitionAddress: Address, roleHash: Hex): Hex;
|
|
40
|
+
/**
|
|
41
|
+
* Encodes data for ADD_WALLET. Matches RuntimeRBACDefinitions.sol encodeAddWallet (abi.encode(roleHash, wallet)).
|
|
42
|
+
*/
|
|
43
|
+
export declare function encodeAddWallet(_client: PublicClient, _definitionAddress: Address, roleHash: Hex, wallet: Address): Hex;
|
|
44
|
+
/**
|
|
45
|
+
* Encodes data for REVOKE_WALLET. Matches RuntimeRBACDefinitions.sol encodeRevokeWallet (abi.encode(roleHash, wallet)).
|
|
46
|
+
*/
|
|
47
|
+
export declare function encodeRevokeWallet(_client: PublicClient, _definitionAddress: Address, roleHash: Hex, wallet: Address): Hex;
|
|
48
|
+
/**
|
|
49
|
+
* Encodes data for ADD_FUNCTION_TO_ROLE. Matches RuntimeRBACDefinitions.sol encodeAddFunctionToRole (abi.encode(roleHash, functionPermission)).
|
|
50
|
+
*/
|
|
51
|
+
export declare function encodeAddFunctionToRole(_client: PublicClient, _definitionAddress: Address, roleHash: Hex, functionPermission: FunctionPermissionForEncoding): Hex;
|
|
52
|
+
/**
|
|
53
|
+
* Encodes data for REMOVE_FUNCTION_FROM_ROLE. Matches RuntimeRBACDefinitions.sol encodeRemoveFunctionFromRole (abi.encode(roleHash, functionSelector)).
|
|
54
|
+
*/
|
|
55
|
+
export declare function encodeRemoveFunctionFromRole(_client: PublicClient, _definitionAddress: Address, roleHash: Hex, functionSelector: Hex): Hex;
|
|
25
56
|
//# sourceMappingURL=RuntimeRBACDefinitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeRBACDefinitions.d.ts","sourceRoot":"","sources":["../../../lib/definitions/RuntimeRBACDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"RuntimeRBACDefinitions.d.ts","sourceRoot":"","sources":["../../../lib/definitions/RuntimeRBACDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAY,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAuD,MAAM,MAAM,CAAC;AAEhI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAWzE;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,gBAAgB,EAAE,GAAG,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,SAAS,GA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G,GACpB,GAAG,CAEL"}
|
|
@@ -1,47 +1,83 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RuntimeRBACDefinitions
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Calls the deployed RuntimeRBACDefinitions contract for specs and encoding.
|
|
4
|
+
* Single source of truth: action names, formats, and encoding come from the contract.
|
|
5
|
+
* @see contracts/core/access/lib/definitions/RuntimeRBACDefinitions.sol
|
|
6
6
|
*/
|
|
7
|
-
import { encodeAbiParameters, parseAbiParameters } from 'viem';
|
|
7
|
+
import { bytesToHex, encodeAbiParameters, parseAbiParameters } from 'viem';
|
|
8
|
+
import RuntimeRBACDefinitionsAbi from '../../abi/RuntimeRBACDefinitions.abi.json' with { type: 'json' };
|
|
9
|
+
const ABI = RuntimeRBACDefinitionsAbi;
|
|
10
|
+
/** Normalize bytes to ABI Hex (0x-prefixed); empty -> '0x'. */
|
|
11
|
+
function normalizeData(data) {
|
|
12
|
+
if (data === undefined || data === null)
|
|
13
|
+
return '0x';
|
|
14
|
+
if (typeof data === 'string')
|
|
15
|
+
return data.startsWith('0x') ? data : `0x${data}`;
|
|
16
|
+
return bytesToHex(data);
|
|
17
|
+
}
|
|
8
18
|
/**
|
|
9
19
|
* Builds execution params for executeRoleConfigBatch((uint8,bytes)[]).
|
|
10
|
-
*
|
|
11
|
-
* Same
|
|
20
|
+
* Encoding matches RuntimeRBACDefinitions.sol roleConfigBatchExecutionParams (abi.encode(actions)).
|
|
21
|
+
* Same format as scripts/sanity (direct contract tests); single source of truth in this module.
|
|
12
22
|
*/
|
|
13
|
-
export function roleConfigBatchExecutionParams(actions) {
|
|
14
|
-
const
|
|
23
|
+
export function roleConfigBatchExecutionParams(_client, _definitionAddress, actions) {
|
|
24
|
+
const actionsTuple = actions.map((a) => ({
|
|
15
25
|
actionType: Number(a.actionType),
|
|
16
|
-
data: a.data
|
|
26
|
+
data: normalizeData(a.data)
|
|
17
27
|
}));
|
|
18
|
-
return encodeAbiParameters(parseAbiParameters('(uint8 actionType, bytes data)[]'), [
|
|
28
|
+
return encodeAbiParameters(parseAbiParameters('(uint8 actionType, bytes data)[]'), [actionsTuple]);
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
21
|
-
* Returns all available RoleConfig action types and their ABI decode formats.
|
|
22
|
-
* Mirrors RuntimeRBACDefinitions.getRoleConfigActionSpecs in Solidity.
|
|
23
|
-
*
|
|
31
|
+
* Returns all available RoleConfig action types and their ABI decode formats from the contract.
|
|
24
32
|
* Index i in both arrays corresponds to RoleConfigActionType enum value i.
|
|
25
33
|
*/
|
|
26
|
-
export function getRoleConfigActionSpecs() {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
export async function getRoleConfigActionSpecs(client, definitionAddress) {
|
|
35
|
+
const result = (await client.readContract({
|
|
36
|
+
address: definitionAddress,
|
|
37
|
+
abi: ABI,
|
|
38
|
+
functionName: 'getRoleConfigActionSpecs'
|
|
39
|
+
}));
|
|
40
|
+
return { actionNames: result[0], formats: result[1] };
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Encodes data for CREATE_ROLE. Matches RuntimeRBACDefinitions.sol encodeCreateRole (abi.encode(roleName, maxWallets)).
|
|
44
|
+
*/
|
|
45
|
+
export function encodeCreateRole(_client, _definitionAddress, roleName, maxWallets) {
|
|
46
|
+
return encodeAbiParameters(parseAbiParameters('string, uint256'), [roleName, maxWallets]);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Encodes data for REMOVE_ROLE. Matches RuntimeRBACDefinitions.sol encodeRemoveRole (abi.encode(roleHash)).
|
|
50
|
+
*/
|
|
51
|
+
export function encodeRemoveRole(_client, _definitionAddress, roleHash) {
|
|
52
|
+
return encodeAbiParameters(parseAbiParameters('bytes32'), [roleHash]);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Encodes data for ADD_WALLET. Matches RuntimeRBACDefinitions.sol encodeAddWallet (abi.encode(roleHash, wallet)).
|
|
56
|
+
*/
|
|
57
|
+
export function encodeAddWallet(_client, _definitionAddress, roleHash, wallet) {
|
|
58
|
+
return encodeAbiParameters(parseAbiParameters('bytes32, address'), [roleHash, wallet]);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Encodes data for REVOKE_WALLET. Matches RuntimeRBACDefinitions.sol encodeRevokeWallet (abi.encode(roleHash, wallet)).
|
|
62
|
+
*/
|
|
63
|
+
export function encodeRevokeWallet(_client, _definitionAddress, roleHash, wallet) {
|
|
64
|
+
return encodeAbiParameters(parseAbiParameters('bytes32, address'), [roleHash, wallet]);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Encodes data for ADD_FUNCTION_TO_ROLE. Matches RuntimeRBACDefinitions.sol encodeAddFunctionToRole (abi.encode(roleHash, functionPermission)).
|
|
68
|
+
*/
|
|
69
|
+
export function encodeAddFunctionToRole(_client, _definitionAddress, roleHash, functionPermission) {
|
|
70
|
+
const tuple = [
|
|
71
|
+
functionPermission.functionSelector,
|
|
72
|
+
functionPermission.grantedActionsBitmap,
|
|
73
|
+
[...functionPermission.handlerForSelectors]
|
|
44
74
|
];
|
|
45
|
-
return
|
|
75
|
+
return encodeAbiParameters(parseAbiParameters('bytes32, (bytes4, uint16, bytes4[])'), [roleHash, tuple]);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Encodes data for REMOVE_FUNCTION_FROM_ROLE. Matches RuntimeRBACDefinitions.sol encodeRemoveFunctionFromRole (abi.encode(roleHash, functionSelector)).
|
|
79
|
+
*/
|
|
80
|
+
export function encodeRemoveFunctionFromRole(_client, _definitionAddress, roleHash, functionSelector) {
|
|
81
|
+
return encodeAbiParameters(parseAbiParameters('bytes32, bytes4'), [roleHash, functionSelector]);
|
|
46
82
|
}
|
|
47
83
|
//# sourceMappingURL=RuntimeRBACDefinitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeRBACDefinitions.js","sourceRoot":"","sources":["../../../lib/definitions/RuntimeRBACDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"RuntimeRBACDefinitions.js","sourceRoot":"","sources":["../../../lib/definitions/RuntimeRBACDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAuD,UAAU,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAChI,OAAO,yBAAyB,MAAM,2CAA2C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAGxG,MAAM,GAAG,GAAG,yBAAgC,CAAC;AAE7C,+DAA+D;AAC/D,SAAS,aAAa,CAAC,IAAyC;IAC9D,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACrD,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,IAAY,CAAC,CAAC,CAAE,KAAK,IAAI,EAAU,CAAC;IAClG,OAAO,UAAU,CAAC,IAAkB,CAAQ,CAAC;AAC/C,CAAC;AAYD;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAAqB,EACrB,kBAA2B,EAC3B,OAA2B;IAE3B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACvC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;QAChC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;KAC5B,CAAC,CAAC,CAAC;IACJ,OAA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,CAAC,CAAQ,CAAC;AAChG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAqB,EACrB,kBAA2B,EAC3B,QAAa,EACb,kBAAiD;IAEjD,MAAM,KAAK,GAAkC;QAC3C,kBAAkB,CAAC,gBAAgB;QACnC,kBAAkB,CAAC,oBAAoB;QACvC,CAAC,GAAG,kBAAkB,CAAC,mBAAmB,CAAC;KAC5C,CAAC;IACF,OAAO,mBAAmB,CACxB,kBAAkB,CAAC,qCAAqC,CAAC,EACzD,CAAC,QAAQ,EAAE,KAAK,CAAC,CACX,CAAC;AACX,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAC1C,OAAqB,EACrB,kBAA2B,EAC3B,QAAa,EACb,gBAAqB;IAErB,OAAO,mBAAmB,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAQ,CAAC;AACzG,CAAC"}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SecureOwnableDefinitions
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Calls the deployed SecureOwnableDefinitions contract for execution params.
|
|
4
|
+
* Single source of truth: encoding is done by the contract to avoid TypeScript/Solidity drift.
|
|
5
|
+
* @see contracts/core/security/lib/definitions/SecureOwnableDefinitions.sol
|
|
5
6
|
*/
|
|
6
|
-
import { Address, Hex } from 'viem';
|
|
7
|
+
import { type Address, type Hex, type PublicClient } from 'viem';
|
|
7
8
|
/**
|
|
8
|
-
* Builds execution params for executeRecoveryUpdate(address).
|
|
9
|
+
* Builds execution params for executeRecoveryUpdate(address) by calling the definition contract.
|
|
9
10
|
* Equivalent to SecureOwnableDefinitions.updateRecoveryExecutionParams in Solidity.
|
|
11
|
+
* @param client Viem public client
|
|
12
|
+
* @param definitionAddress Deployed SecureOwnableDefinitions library address (e.g. from deployed-addresses.json)
|
|
10
13
|
*/
|
|
11
|
-
export declare function updateRecoveryExecutionParams(newRecoveryAddress: Address): Hex
|
|
14
|
+
export declare function updateRecoveryExecutionParams(client: PublicClient, definitionAddress: Address, newRecoveryAddress: Address): Promise<Hex>;
|
|
12
15
|
/**
|
|
13
|
-
* Builds execution params for executeTimeLockUpdate(uint256).
|
|
16
|
+
* Builds execution params for executeTimeLockUpdate(uint256) by calling the definition contract.
|
|
14
17
|
* Equivalent to SecureOwnableDefinitions.updateTimeLockExecutionParams in Solidity.
|
|
18
|
+
* @param client Viem public client
|
|
19
|
+
* @param definitionAddress Deployed SecureOwnableDefinitions library address
|
|
15
20
|
*/
|
|
16
|
-
export declare function updateTimeLockExecutionParams(newTimeLockPeriodSec: bigint): Hex
|
|
21
|
+
export declare function updateTimeLockExecutionParams(client: PublicClient, definitionAddress: Address, newTimeLockPeriodSec: bigint): Promise<Hex>;
|
|
17
22
|
//# sourceMappingURL=SecureOwnableDefinitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecureOwnableDefinitions.d.ts","sourceRoot":"","sources":["../../../lib/definitions/SecureOwnableDefinitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SecureOwnableDefinitions.d.ts","sourceRoot":"","sources":["../../../lib/definitions/SecureOwnableDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAC;AAKjE;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,YAAY,EACpB,iBAAiB,EAAE,OAAO,EAC1B,kBAAkB,EAAE,OAAO,GAC1B,OAAO,CAAC,GAAG,CAAC,CAOd;AAED;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,YAAY,EACpB,iBAAiB,EAAE,OAAO,EAC1B,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,GAAG,CAAC,CAOd"}
|
|
@@ -1,21 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SecureOwnableDefinitions
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Calls the deployed SecureOwnableDefinitions contract for execution params.
|
|
4
|
+
* Single source of truth: encoding is done by the contract to avoid TypeScript/Solidity drift.
|
|
5
|
+
* @see contracts/core/security/lib/definitions/SecureOwnableDefinitions.sol
|
|
5
6
|
*/
|
|
6
|
-
import
|
|
7
|
+
import SecureOwnableDefinitionsAbi from '../../abi/SecureOwnableDefinitions.abi.json' with { type: 'json' };
|
|
8
|
+
const ABI = SecureOwnableDefinitionsAbi;
|
|
7
9
|
/**
|
|
8
|
-
* Builds execution params for executeRecoveryUpdate(address).
|
|
10
|
+
* Builds execution params for executeRecoveryUpdate(address) by calling the definition contract.
|
|
9
11
|
* Equivalent to SecureOwnableDefinitions.updateRecoveryExecutionParams in Solidity.
|
|
12
|
+
* @param client Viem public client
|
|
13
|
+
* @param definitionAddress Deployed SecureOwnableDefinitions library address (e.g. from deployed-addresses.json)
|
|
10
14
|
*/
|
|
11
|
-
export function updateRecoveryExecutionParams(newRecoveryAddress) {
|
|
12
|
-
return
|
|
15
|
+
export async function updateRecoveryExecutionParams(client, definitionAddress, newRecoveryAddress) {
|
|
16
|
+
return client.readContract({
|
|
17
|
+
address: definitionAddress,
|
|
18
|
+
abi: ABI,
|
|
19
|
+
functionName: 'updateRecoveryExecutionParams',
|
|
20
|
+
args: [newRecoveryAddress]
|
|
21
|
+
});
|
|
13
22
|
}
|
|
14
23
|
/**
|
|
15
|
-
* Builds execution params for executeTimeLockUpdate(uint256).
|
|
24
|
+
* Builds execution params for executeTimeLockUpdate(uint256) by calling the definition contract.
|
|
16
25
|
* Equivalent to SecureOwnableDefinitions.updateTimeLockExecutionParams in Solidity.
|
|
26
|
+
* @param client Viem public client
|
|
27
|
+
* @param definitionAddress Deployed SecureOwnableDefinitions library address
|
|
17
28
|
*/
|
|
18
|
-
export function updateTimeLockExecutionParams(newTimeLockPeriodSec) {
|
|
19
|
-
return
|
|
29
|
+
export async function updateTimeLockExecutionParams(client, definitionAddress, newTimeLockPeriodSec) {
|
|
30
|
+
return client.readContract({
|
|
31
|
+
address: definitionAddress,
|
|
32
|
+
abi: ABI,
|
|
33
|
+
functionName: 'updateTimeLockExecutionParams',
|
|
34
|
+
args: [newTimeLockPeriodSec]
|
|
35
|
+
});
|
|
20
36
|
}
|
|
21
37
|
//# sourceMappingURL=SecureOwnableDefinitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecureOwnableDefinitions.js","sourceRoot":"","sources":["../../../lib/definitions/SecureOwnableDefinitions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SecureOwnableDefinitions.js","sourceRoot":"","sources":["../../../lib/definitions/SecureOwnableDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,2BAA2B,MAAM,6CAA6C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5G,MAAM,GAAG,GAAG,2BAAiD,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,MAAoB,EACpB,iBAA0B,EAC1B,kBAA2B;IAE3B,OAAO,MAAM,CAAC,YAAY,CAAC;QACzB,OAAO,EAAE,iBAAiB;QAC1B,GAAG,EAAE,GAAG;QACR,YAAY,EAAE,+BAA+B;QAC7C,IAAI,EAAE,CAAC,kBAAkB,CAAC;KAC3B,CAAiB,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,MAAoB,EACpB,iBAA0B,EAC1B,oBAA4B;IAE5B,OAAO,MAAM,CAAC,YAAY,CAAC;QACzB,OAAO,EAAE,iBAAiB;QAC1B,GAAG,EAAE,GAAG;QACR,YAAY,EAAE,+BAA+B;QAC7C,IAAI,EAAE,CAAC,oBAAoB,CAAC;KAC7B,CAAiB,CAAC;AACrB,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Definition modules:
|
|
3
|
-
*
|
|
2
|
+
* Definition modules: call deployed definition contracts for execution params and specs.
|
|
3
|
+
* Single source of truth: encoding and specs come from Solidity definition libraries.
|
|
4
|
+
* Pass PublicClient and definition contract address (e.g. from deployed-addresses.json per chain).
|
|
4
5
|
*/
|
|
5
|
-
export { updateRecoveryExecutionParams, updateTimeLockExecutionParams } from './SecureOwnableDefinitions';
|
|
6
|
-
export { roleConfigBatchExecutionParams } from './RuntimeRBACDefinitions';
|
|
7
|
-
export {
|
|
6
|
+
export { updateRecoveryExecutionParams, updateTimeLockExecutionParams } from './SecureOwnableDefinitions.js';
|
|
7
|
+
export { roleConfigBatchExecutionParams, getRoleConfigActionSpecs, encodeCreateRole, encodeRemoveRole, encodeAddWallet, encodeRevokeWallet, encodeAddFunctionToRole, encodeRemoveFunctionFromRole } from './RuntimeRBACDefinitions.js';
|
|
8
|
+
export type { FunctionPermissionForEncoding } from './RuntimeRBACDefinitions.js';
|
|
9
|
+
export { guardConfigBatchExecutionParams, getGuardConfigActionSpecs, encodeAddTargetToWhitelist, encodeRemoveTargetFromWhitelist, encodeRegisterFunction, encodeUnregisterFunction } from './GuardControllerDefinitions.js';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/definitions/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAEjF,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Definition modules:
|
|
3
|
-
*
|
|
2
|
+
* Definition modules: call deployed definition contracts for execution params and specs.
|
|
3
|
+
* Single source of truth: encoding and specs come from Solidity definition libraries.
|
|
4
|
+
* Pass PublicClient and definition contract address (e.g. from deployed-addresses.json per chain).
|
|
4
5
|
*/
|
|
5
|
-
export { updateRecoveryExecutionParams, updateTimeLockExecutionParams } from './SecureOwnableDefinitions';
|
|
6
|
-
export { roleConfigBatchExecutionParams } from './RuntimeRBACDefinitions';
|
|
7
|
-
export { guardConfigBatchExecutionParams } from './GuardControllerDefinitions';
|
|
6
|
+
export { updateRecoveryExecutionParams, updateTimeLockExecutionParams } from './SecureOwnableDefinitions.js';
|
|
7
|
+
export { roleConfigBatchExecutionParams, getRoleConfigActionSpecs, encodeCreateRole, encodeRemoveRole, encodeAddWallet, encodeRevokeWallet, encodeAddFunctionToRole, encodeRemoveFunctionFromRole } from './RuntimeRBACDefinitions.js';
|
|
8
|
+
export { guardConfigBatchExecutionParams, getGuardConfigActionSpecs, encodeAddTargetToWhitelist, encodeRemoveTargetFromWhitelist, encodeRegisterFunction, encodeUnregisterFunction } from './GuardControllerDefinitions.js';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/definitions/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/definitions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*/
|
|
4
|
-
export declare const BASE_STATE_MACHINE_OPERATION_TYPES: {
|
|
5
|
-
readonly TX_REQUEST: `0x${string}`;
|
|
6
|
-
readonly TX_DELAYED_APPROVAL: `0x${string}`;
|
|
7
|
-
readonly TX_CANCELLATION: `0x${string}`;
|
|
8
|
-
readonly META_TX_APPROVAL: `0x${string}`;
|
|
9
|
-
readonly META_TX_CANCELLATION: `0x${string}`;
|
|
10
|
-
readonly META_TX_REQUEST_AND_APPROVE: `0x${string}`;
|
|
11
|
-
};
|
|
12
|
-
export type BaseStateMachineOperationType = typeof BASE_STATE_MACHINE_OPERATION_TYPES[keyof typeof BASE_STATE_MACHINE_OPERATION_TYPES];
|
|
13
|
-
/**
|
|
14
|
-
* Constants for BaseStateMachine function selectors
|
|
2
|
+
* Function selectors for IBaseStateMachine (contracts/core/base/interface/IBaseStateMachine.sol).
|
|
15
3
|
*/
|
|
16
4
|
export declare const BASE_STATE_MACHINE_FUNCTION_SELECTORS: {
|
|
17
5
|
readonly CREATE_META_TX_PARAMS: string;
|
|
@@ -21,7 +9,7 @@ export declare const BASE_STATE_MACHINE_FUNCTION_SELECTORS: {
|
|
|
21
9
|
readonly GET_TRANSACTION: string;
|
|
22
10
|
readonly GET_PENDING_TRANSACTIONS: string;
|
|
23
11
|
readonly HAS_ROLE: string;
|
|
24
|
-
readonly
|
|
12
|
+
readonly GET_FUNCTION_SCHEMA: string;
|
|
25
13
|
readonly GET_ACTIVE_ROLE_PERMISSIONS: string;
|
|
26
14
|
readonly GET_SIGNER_NONCE: string;
|
|
27
15
|
readonly GET_SUPPORTED_OPERATION_TYPES: string;
|
|
@@ -29,16 +17,12 @@ export declare const BASE_STATE_MACHINE_FUNCTION_SELECTORS: {
|
|
|
29
17
|
readonly GET_SUPPORTED_FUNCTIONS: string;
|
|
30
18
|
readonly GET_TIME_LOCK_PERIOD_SEC: string;
|
|
31
19
|
readonly INITIALIZED: string;
|
|
32
|
-
readonly SUPPORTS_INTERFACE: string;
|
|
33
20
|
};
|
|
34
|
-
export type BaseStateMachineFunctionSelector = typeof BASE_STATE_MACHINE_FUNCTION_SELECTORS[keyof typeof BASE_STATE_MACHINE_FUNCTION_SELECTORS];
|
|
35
|
-
/**
|
|
36
|
-
* Constants for core role hashes
|
|
37
|
-
*/
|
|
21
|
+
export type BaseStateMachineFunctionSelector = (typeof BASE_STATE_MACHINE_FUNCTION_SELECTORS)[keyof typeof BASE_STATE_MACHINE_FUNCTION_SELECTORS];
|
|
38
22
|
export declare const CORE_ROLE_HASHES: {
|
|
39
23
|
readonly OWNER_ROLE: `0x${string}`;
|
|
40
24
|
readonly BROADCASTER_ROLE: `0x${string}`;
|
|
41
25
|
readonly RECOVERY_ROLE: `0x${string}`;
|
|
42
26
|
};
|
|
43
|
-
export type CoreRoleHash = typeof CORE_ROLE_HASHES[keyof typeof CORE_ROLE_HASHES];
|
|
27
|
+
export type CoreRoleHash = (typeof CORE_ROLE_HASHES)[keyof typeof CORE_ROLE_HASHES];
|
|
44
28
|
//# sourceMappingURL=base.state.machine.index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.state.machine.index.d.ts","sourceRoot":"","sources":["../../types/base.state.machine.index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.state.machine.index.d.ts","sourceRoot":"","sources":["../../types/base.state.machine.index.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;CAgCxC,CAAC;AAEX,MAAM,MAAM,gCAAgC,GAC1C,CAAC,OAAO,qCAAqC,CAAC,CAAC,MAAM,OAAO,qCAAqC,CAAC,CAAC;AAErG,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,48 +1,28 @@
|
|
|
1
1
|
import { keccak256 } from 'viem';
|
|
2
|
+
import { ENGINE_BLOX_META_TX_PARAMS } from './meta-tx-signatures.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export const BASE_STATE_MACHINE_OPERATION_TYPES = {
|
|
6
|
-
// Core state machine operations
|
|
7
|
-
TX_REQUEST: keccak256(new TextEncoder().encode("TX_REQUEST")),
|
|
8
|
-
TX_DELAYED_APPROVAL: keccak256(new TextEncoder().encode("TX_DELAYED_APPROVAL")),
|
|
9
|
-
TX_CANCELLATION: keccak256(new TextEncoder().encode("TX_CANCELLATION")),
|
|
10
|
-
META_TX_APPROVAL: keccak256(new TextEncoder().encode("META_TX_APPROVAL")),
|
|
11
|
-
META_TX_CANCELLATION: keccak256(new TextEncoder().encode("META_TX_CANCELLATION")),
|
|
12
|
-
META_TX_REQUEST_AND_APPROVE: keccak256(new TextEncoder().encode("META_TX_REQUEST_AND_APPROVE"))
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Constants for BaseStateMachine function selectors
|
|
4
|
+
* Function selectors for IBaseStateMachine (contracts/core/base/interface/IBaseStateMachine.sol).
|
|
16
5
|
*/
|
|
17
6
|
export const BASE_STATE_MACHINE_FUNCTION_SELECTORS = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
GET_SUPPORTED_ROLES: keccak256(new TextEncoder().encode("getSupportedRoles()")).slice(0, 10),
|
|
34
|
-
GET_SUPPORTED_FUNCTIONS: keccak256(new TextEncoder().encode("getSupportedFunctions()")).slice(0, 10),
|
|
35
|
-
GET_TIME_LOCK_PERIOD_SEC: keccak256(new TextEncoder().encode("getTimeLockPeriodSec()")).slice(0, 10),
|
|
36
|
-
INITIALIZED: keccak256(new TextEncoder().encode("initialized()")).slice(0, 10),
|
|
37
|
-
// Interface support
|
|
38
|
-
SUPPORTS_INTERFACE: keccak256(new TextEncoder().encode("supportsInterface(bytes4)")).slice(0, 10)
|
|
7
|
+
CREATE_META_TX_PARAMS: keccak256(new TextEncoder().encode('createMetaTxParams(address,bytes4,uint8,uint256,uint256,address)')).slice(0, 10),
|
|
8
|
+
GENERATE_UNSIGNED_META_TX_FOR_NEW: keccak256(new TextEncoder().encode(`generateUnsignedMetaTransactionForNew(address,address,uint256,uint256,bytes32,bytes4,bytes,${ENGINE_BLOX_META_TX_PARAMS})`)).slice(0, 10),
|
|
9
|
+
GENERATE_UNSIGNED_META_TX_FOR_EXISTING: keccak256(new TextEncoder().encode(`generateUnsignedMetaTransactionForExisting(uint256,${ENGINE_BLOX_META_TX_PARAMS})`)).slice(0, 10),
|
|
10
|
+
GET_TRANSACTION_HISTORY: keccak256(new TextEncoder().encode('getTransactionHistory(uint256,uint256)')).slice(0, 10),
|
|
11
|
+
GET_TRANSACTION: keccak256(new TextEncoder().encode('getTransaction(uint256)')).slice(0, 10),
|
|
12
|
+
GET_PENDING_TRANSACTIONS: keccak256(new TextEncoder().encode('getPendingTransactions()')).slice(0, 10),
|
|
13
|
+
HAS_ROLE: keccak256(new TextEncoder().encode('hasRole(bytes32,address)')).slice(0, 10),
|
|
14
|
+
GET_FUNCTION_SCHEMA: keccak256(new TextEncoder().encode('getFunctionSchema(bytes4)')).slice(0, 10),
|
|
15
|
+
GET_ACTIVE_ROLE_PERMISSIONS: keccak256(new TextEncoder().encode('getActiveRolePermissions(bytes32)')).slice(0, 10),
|
|
16
|
+
GET_SIGNER_NONCE: keccak256(new TextEncoder().encode('getSignerNonce(address)')).slice(0, 10),
|
|
17
|
+
GET_SUPPORTED_OPERATION_TYPES: keccak256(new TextEncoder().encode('getSupportedOperationTypes()')).slice(0, 10),
|
|
18
|
+
GET_SUPPORTED_ROLES: keccak256(new TextEncoder().encode('getSupportedRoles()')).slice(0, 10),
|
|
19
|
+
GET_SUPPORTED_FUNCTIONS: keccak256(new TextEncoder().encode('getSupportedFunctions()')).slice(0, 10),
|
|
20
|
+
GET_TIME_LOCK_PERIOD_SEC: keccak256(new TextEncoder().encode('getTimeLockPeriodSec()')).slice(0, 10),
|
|
21
|
+
INITIALIZED: keccak256(new TextEncoder().encode('initialized()')).slice(0, 10),
|
|
39
22
|
};
|
|
40
|
-
/**
|
|
41
|
-
* Constants for core role hashes
|
|
42
|
-
*/
|
|
43
23
|
export const CORE_ROLE_HASHES = {
|
|
44
|
-
OWNER_ROLE: keccak256(new TextEncoder().encode(
|
|
45
|
-
BROADCASTER_ROLE: keccak256(new TextEncoder().encode(
|
|
46
|
-
RECOVERY_ROLE: keccak256(new TextEncoder().encode(
|
|
24
|
+
OWNER_ROLE: keccak256(new TextEncoder().encode('OWNER_ROLE')),
|
|
25
|
+
BROADCASTER_ROLE: keccak256(new TextEncoder().encode('BROADCASTER_ROLE')),
|
|
26
|
+
RECOVERY_ROLE: keccak256(new TextEncoder().encode('RECOVERY_ROLE')),
|
|
47
27
|
};
|
|
48
28
|
//# sourceMappingURL=base.state.machine.index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.state.machine.index.js","sourceRoot":"","sources":["../../types/base.state.machine.index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,M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