@bloxchain/sdk 1.0.0-alpha

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.
Files changed (132) hide show
  1. package/README.md +338 -0
  2. package/abi/BareBlox.abi.json +1341 -0
  3. package/abi/BaseStateMachine.abi.json +1308 -0
  4. package/abi/ControlBlox.abi.json +6210 -0
  5. package/abi/EngineBlox.abi.json +872 -0
  6. package/abi/GuardController.abi.json +3045 -0
  7. package/abi/IDefinition.abi.json +94 -0
  8. package/abi/RoleBlox.abi.json +4569 -0
  9. package/abi/RuntimeRBAC.abi.json +1857 -0
  10. package/abi/RuntimeRBACDefinitions.abi.json +133 -0
  11. package/abi/SecureBlox.abi.json +4085 -0
  12. package/abi/SecureOwnable.abi.json +4085 -0
  13. package/abi/SecureOwnableDefinitions.abi.json +354 -0
  14. package/abi/SimpleRWA20.abi.json +5545 -0
  15. package/abi/SimpleRWA20Definitions.abi.json +172 -0
  16. package/abi/SimpleVault.abi.json +5208 -0
  17. package/abi/SimpleVaultDefinitions.abi.json +250 -0
  18. package/dist/abi/BaseStateMachine.abi.json +1308 -0
  19. package/dist/abi/GuardController.abi.json +3045 -0
  20. package/dist/abi/IDefinition.abi.json +94 -0
  21. package/dist/abi/RuntimeRBAC.abi.json +1857 -0
  22. package/dist/abi/SecureOwnable.abi.json +4085 -0
  23. package/dist/contracts/BaseStateMachine.d.ts +83 -0
  24. package/dist/contracts/BaseStateMachine.d.ts.map +1 -0
  25. package/dist/contracts/BaseStateMachine.js +251 -0
  26. package/dist/contracts/BaseStateMachine.js.map +1 -0
  27. package/dist/contracts/GuardController.d.ts +120 -0
  28. package/dist/contracts/GuardController.d.ts.map +1 -0
  29. package/dist/contracts/GuardController.js +149 -0
  30. package/dist/contracts/GuardController.js.map +1 -0
  31. package/dist/contracts/RuntimeRBAC.d.ts +56 -0
  32. package/dist/contracts/RuntimeRBAC.d.ts.map +1 -0
  33. package/dist/contracts/RuntimeRBAC.js +57 -0
  34. package/dist/contracts/RuntimeRBAC.js.map +1 -0
  35. package/dist/contracts/SecureOwnable.d.ts +41 -0
  36. package/dist/contracts/SecureOwnable.d.ts.map +1 -0
  37. package/dist/contracts/SecureOwnable.js +82 -0
  38. package/dist/contracts/SecureOwnable.js.map +1 -0
  39. package/dist/index.d.ts +30 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +32 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/interfaces/base.index.d.ts +18 -0
  44. package/dist/interfaces/base.index.d.ts.map +1 -0
  45. package/dist/interfaces/base.index.js +2 -0
  46. package/dist/interfaces/base.index.js.map +1 -0
  47. package/dist/interfaces/base.state.machine.index.d.ts +72 -0
  48. package/dist/interfaces/base.state.machine.index.d.ts.map +1 -0
  49. package/dist/interfaces/base.state.machine.index.js +2 -0
  50. package/dist/interfaces/base.state.machine.index.js.map +1 -0
  51. package/dist/interfaces/core.access.index.d.ts +37 -0
  52. package/dist/interfaces/core.access.index.d.ts.map +1 -0
  53. package/dist/interfaces/core.access.index.js +2 -0
  54. package/dist/interfaces/core.access.index.js.map +1 -0
  55. package/dist/interfaces/core.execution.index.d.ts +44 -0
  56. package/dist/interfaces/core.execution.index.d.ts.map +1 -0
  57. package/dist/interfaces/core.execution.index.js +2 -0
  58. package/dist/interfaces/core.execution.index.js.map +1 -0
  59. package/dist/interfaces/core.security.index.d.ts +83 -0
  60. package/dist/interfaces/core.security.index.d.ts.map +1 -0
  61. package/dist/interfaces/core.security.index.js +2 -0
  62. package/dist/interfaces/core.security.index.js.map +1 -0
  63. package/dist/interfaces/definition.index.d.ts +38 -0
  64. package/dist/interfaces/definition.index.d.ts.map +1 -0
  65. package/dist/interfaces/definition.index.js +2 -0
  66. package/dist/interfaces/definition.index.js.map +1 -0
  67. package/dist/interfaces/lib.index.d.ts +83 -0
  68. package/dist/interfaces/lib.index.d.ts.map +1 -0
  69. package/dist/interfaces/lib.index.js +2 -0
  70. package/dist/interfaces/lib.index.js.map +1 -0
  71. package/dist/lib/Definition.d.ts +84 -0
  72. package/dist/lib/Definition.d.ts.map +1 -0
  73. package/dist/lib/Definition.js +159 -0
  74. package/dist/lib/Definition.js.map +1 -0
  75. package/dist/lib/EngineBlox.d.ts +167 -0
  76. package/dist/lib/EngineBlox.d.ts.map +1 -0
  77. package/dist/lib/EngineBlox.js +266 -0
  78. package/dist/lib/EngineBlox.js.map +1 -0
  79. package/dist/types/base.state.machine.index.d.ts +45 -0
  80. package/dist/types/base.state.machine.index.d.ts.map +1 -0
  81. package/dist/types/base.state.machine.index.js +49 -0
  82. package/dist/types/base.state.machine.index.js.map +1 -0
  83. package/dist/types/core.access.index.d.ts +51 -0
  84. package/dist/types/core.access.index.d.ts.map +1 -0
  85. package/dist/types/core.access.index.js +41 -0
  86. package/dist/types/core.access.index.js.map +1 -0
  87. package/dist/types/core.execution.index.d.ts +36 -0
  88. package/dist/types/core.execution.index.d.ts.map +1 -0
  89. package/dist/types/core.execution.index.js +30 -0
  90. package/dist/types/core.execution.index.js.map +1 -0
  91. package/dist/types/core.security.index.d.ts +36 -0
  92. package/dist/types/core.security.index.d.ts.map +1 -0
  93. package/dist/types/core.security.index.js +37 -0
  94. package/dist/types/core.security.index.js.map +1 -0
  95. package/dist/types/definition.index.d.ts +36 -0
  96. package/dist/types/definition.index.d.ts.map +1 -0
  97. package/dist/types/definition.index.js +4 -0
  98. package/dist/types/definition.index.js.map +1 -0
  99. package/dist/types/lib.index.d.ts +66 -0
  100. package/dist/types/lib.index.d.ts.map +1 -0
  101. package/dist/types/lib.index.js +68 -0
  102. package/dist/types/lib.index.js.map +1 -0
  103. package/dist/utils/bitmap.d.ts +75 -0
  104. package/dist/utils/bitmap.d.ts.map +1 -0
  105. package/dist/utils/bitmap.js +124 -0
  106. package/dist/utils/bitmap.js.map +1 -0
  107. package/dist/utils/contract-errors.d.ts +536 -0
  108. package/dist/utils/contract-errors.d.ts.map +1 -0
  109. package/dist/utils/contract-errors.js +412 -0
  110. package/dist/utils/contract-errors.js.map +1 -0
  111. package/dist/utils/erc20/ERC20Token.abi.json +217 -0
  112. package/dist/utils/erc20/erc20Token.d.ts +83 -0
  113. package/dist/utils/erc20/erc20Token.d.ts.map +1 -0
  114. package/dist/utils/erc20/erc20Token.js +173 -0
  115. package/dist/utils/erc20/erc20Token.js.map +1 -0
  116. package/dist/utils/interface-ids.d.ts +59 -0
  117. package/dist/utils/interface-ids.d.ts.map +1 -0
  118. package/dist/utils/interface-ids.js +149 -0
  119. package/dist/utils/interface-ids.js.map +1 -0
  120. package/dist/utils/metaTx/metaTransaction.d.ts +138 -0
  121. package/dist/utils/metaTx/metaTransaction.d.ts.map +1 -0
  122. package/dist/utils/metaTx/metaTransaction.js +271 -0
  123. package/dist/utils/metaTx/metaTransaction.js.map +1 -0
  124. package/dist/utils/validations.d.ts +104 -0
  125. package/dist/utils/validations.d.ts.map +1 -0
  126. package/dist/utils/validations.js +254 -0
  127. package/dist/utils/validations.js.map +1 -0
  128. package/dist/utils/viem-error-handler.d.ts +48 -0
  129. package/dist/utils/viem-error-handler.d.ts.map +1 -0
  130. package/dist/utils/viem-error-handler.js +172 -0
  131. package/dist/utils/viem-error-handler.js.map +1 -0
  132. package/package.json +65 -0
@@ -0,0 +1,56 @@
1
+ import { Address, PublicClient, WalletClient, Chain, Hex } from 'viem';
2
+ import { TransactionOptions, TransactionResult } from '../interfaces/base.index';
3
+ import { IRuntimeRBAC } from '../interfaces/core.access.index';
4
+ import { TxAction } from '../types/lib.index';
5
+ import { MetaTransaction } from '../interfaces/lib.index';
6
+ import { BaseStateMachine } from './BaseStateMachine';
7
+ /**
8
+ * @title RuntimeRBAC
9
+ * @notice TypeScript wrapper for RuntimeRBAC smart contract
10
+ * @dev Matches the actual Solidity contract implementation
11
+ * @dev Extends BaseStateMachine directly for modular architecture
12
+ */
13
+ export declare class RuntimeRBAC extends BaseStateMachine implements IRuntimeRBAC {
14
+ constructor(client: PublicClient, walletClient: WalletClient | undefined, contractAddress: Address, chain: Chain);
15
+ /**
16
+ * @dev Creates execution params for a RBAC configuration batch
17
+ * @param actions Encoded role configuration actions
18
+ */
19
+ roleConfigBatchExecutionParams(actions: Array<{
20
+ actionType: number;
21
+ data: Hex;
22
+ }>): Promise<Hex>;
23
+ /**
24
+ * @dev Requests and approves a RBAC configuration batch using a meta-transaction
25
+ * @param metaTx The meta-transaction
26
+ * @param options Transaction options
27
+ */
28
+ roleConfigBatchRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
29
+ /**
30
+ * @dev Gets function schema information
31
+ * @param functionSelector The function selector to get information for
32
+ * @return Function schema information
33
+ */
34
+ getFunctionSchema(functionSelector: Hex): Promise<{
35
+ functionSignature: string;
36
+ functionSelectorReturn: Hex;
37
+ operationType: Hex;
38
+ operationName: string;
39
+ supportedActions: TxAction[];
40
+ isProtected: boolean;
41
+ }>;
42
+ /**
43
+ * @dev Gets all authorized wallets for a role
44
+ * @param roleHash The role hash to get wallets for
45
+ * @return Array of authorized wallet addresses
46
+ * @notice Requires caller to have any role (via _validateAnyRole) for privacy protection
47
+ */
48
+ getWalletsInRole(roleHash: Hex): Promise<Address[]>;
49
+ /**
50
+ * @dev Check if this contract supports IRuntimeRBAC interface
51
+ * @return Promise<boolean> indicating if IRuntimeRBAC is supported
52
+ */
53
+ supportsRuntimeRBACInterface(): Promise<boolean>;
54
+ }
55
+ export default RuntimeRBAC;
56
+ //# sourceMappingURL=RuntimeRBAC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RuntimeRBAC.d.ts","sourceRoot":"","sources":["../../contracts/RuntimeRBAC.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA0BtD;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,gBAAiB,YAAW,YAAY;gBAErE,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,eAAe,EAAE,OAAO,EACxB,KAAK,EAAE,KAAK;IAOd;;;OAGG;IACG,8BAA8B,CAClC,OAAO,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,CAAC,GAChD,OAAO,CAAC,GAAG,CAAC;IAIf;;;;OAIG;IACG,gCAAgC,CACpC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC;IAI7B;;;;OAIG;IACG,iBAAiB,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAAC;QACtD,iBAAiB,EAAE,MAAM,CAAC;QAC1B,sBAAsB,EAAE,GAAG,CAAC;QAC5B,aAAa,EAAE,GAAG,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,gBAAgB,EAAE,QAAQ,EAAE,CAAC;QAC7B,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC;IAWF;;;;;OAKG;IACG,gBAAgB,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAMzD;;;OAGG;IACG,4BAA4B,IAAI,OAAO,CAAC,OAAO,CAAC;CAIvD;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,57 @@
1
+ import RuntimeRBACABIJson from '../abi/RuntimeRBAC.abi.json';
2
+ import { BaseStateMachine } from './BaseStateMachine';
3
+ import { INTERFACE_IDS } from '../utils/interface-ids';
4
+ /**
5
+ * @title RuntimeRBAC
6
+ * @notice TypeScript wrapper for RuntimeRBAC smart contract
7
+ * @dev Matches the actual Solidity contract implementation
8
+ * @dev Extends BaseStateMachine directly for modular architecture
9
+ */
10
+ export class RuntimeRBAC extends BaseStateMachine {
11
+ constructor(client, walletClient, contractAddress, chain) {
12
+ super(client, walletClient, contractAddress, chain, RuntimeRBACABIJson);
13
+ }
14
+ // ============ ROLE CONFIGURATION BATCH ============
15
+ /**
16
+ * @dev Creates execution params for a RBAC configuration batch
17
+ * @param actions Encoded role configuration actions
18
+ */
19
+ async roleConfigBatchExecutionParams(actions) {
20
+ return this.executeReadContract('roleConfigBatchExecutionParams', [actions]);
21
+ }
22
+ /**
23
+ * @dev Requests and approves a RBAC configuration batch using a meta-transaction
24
+ * @param metaTx The meta-transaction
25
+ * @param options Transaction options
26
+ */
27
+ async roleConfigBatchRequestAndApprove(metaTx, options) {
28
+ return this.executeWriteContract('roleConfigBatchRequestAndApprove', [metaTx], options);
29
+ }
30
+ /**
31
+ * @dev Gets function schema information
32
+ * @param functionSelector The function selector to get information for
33
+ * @return Function schema information
34
+ */
35
+ async getFunctionSchema(functionSelector) {
36
+ return this.executeReadContract('getFunctionSchema', [functionSelector]);
37
+ }
38
+ /**
39
+ * @dev Gets all authorized wallets for a role
40
+ * @param roleHash The role hash to get wallets for
41
+ * @return Array of authorized wallet addresses
42
+ * @notice Requires caller to have any role (via _validateAnyRole) for privacy protection
43
+ */
44
+ async getWalletsInRole(roleHash) {
45
+ return this.executeReadContract('getWalletsInRole', [roleHash]);
46
+ }
47
+ // ============ INTERFACE SUPPORT ============
48
+ /**
49
+ * @dev Check if this contract supports IRuntimeRBAC interface
50
+ * @return Promise<boolean> indicating if IRuntimeRBAC is supported
51
+ */
52
+ async supportsRuntimeRBACInterface() {
53
+ return this.supportsInterface(INTERFACE_IDS.IRuntimeRBAC);
54
+ }
55
+ }
56
+ export default RuntimeRBAC;
57
+ //# sourceMappingURL=RuntimeRBAC.js.map
@@ -0,0 +1 @@
1
+ {"version":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Ae,WAAW,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { Address, PublicClient, WalletClient, Chain, Hex } from 'viem';
2
+ import { TransactionOptions, TransactionResult } from '../interfaces/base.index';
3
+ import { ISecureOwnable } from '../interfaces/core.security.index';
4
+ import { MetaTransaction } from '../interfaces/lib.index';
5
+ import { BaseStateMachine } from './BaseStateMachine';
6
+ /**
7
+ * @title SecureOwnable
8
+ * @notice TypeScript wrapper for SecureOwnable smart contract
9
+ */
10
+ export declare class SecureOwnable extends BaseStateMachine implements ISecureOwnable {
11
+ constructor(client: PublicClient, walletClient: WalletClient | undefined, contractAddress: Address, chain: Chain);
12
+ transferOwnershipRequest(options: TransactionOptions): Promise<TransactionResult>;
13
+ transferOwnershipDelayedApproval(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
14
+ transferOwnershipApprovalWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
15
+ transferOwnershipCancellation(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
16
+ transferOwnershipCancellationWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
17
+ updateBroadcasterRequest(newBroadcaster: Address, options: TransactionOptions): Promise<TransactionResult>;
18
+ updateBroadcasterDelayedApproval(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
19
+ updateBroadcasterApprovalWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
20
+ updateBroadcasterCancellation(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
21
+ updateBroadcasterCancellationWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
22
+ /**
23
+ * @dev Wrapper matching ISecureOwnable interface; delegates to updateRecoveryExecutionParams
24
+ */
25
+ updateRecoveryExecutionOptions(newRecoveryAddress: Address): Promise<Hex>;
26
+ updateRecoveryExecutionParams(newRecoveryAddress: Address): Promise<Hex>;
27
+ updateRecoveryRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
28
+ /**
29
+ * @dev Wrapper matching ISecureOwnable interface; delegates to updateTimeLockExecutionParams
30
+ */
31
+ updateTimeLockExecutionOptions(newTimeLockPeriodSec: bigint): Promise<Hex>;
32
+ updateTimeLockExecutionParams(newTimeLockPeriodSec: bigint): Promise<Hex>;
33
+ updateTimeLockRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
34
+ /**
35
+ * @dev Check if this contract supports ISecureOwnable interface
36
+ * @return Promise<boolean> indicating if ISecureOwnable is supported
37
+ */
38
+ supportsSecureOwnableInterface(): Promise<boolean>;
39
+ }
40
+ export default SecureOwnable;
41
+ //# sourceMappingURL=SecureOwnable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecureOwnable.d.ts","sourceRoot":"","sources":["../../contracts/SecureOwnable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD;;;GAGG;AACH,qBAAa,aAAc,SAAQ,gBAAiB,YAAW,cAAc;gBAEzE,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,eAAe,EAAE,OAAO,EACxB,KAAK,EAAE,KAAK;IAMR,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIjF,gCAAgC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIvG,mCAAmC,C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AO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAMvH;;;OAGG;IACG,8BAA8B,IAAI,OAAO,CAAC,OAAO,CAAC;CAmBzD;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,82 @@
1
+ import SecureOwnableABIJson from '../abi/SecureOwnable.abi.json';
2
+ import { BaseStateMachine } from './BaseStateMachine';
3
+ import { INTERFACE_IDS } from '../utils/interface-ids';
4
+ /**
5
+ * @title SecureOwnable
6
+ * @notice TypeScript wrapper for SecureOwnable smart contract
7
+ */
8
+ export class SecureOwnable extends BaseStateMachine {
9
+ constructor(client, walletClient, contractAddress, chain) {
10
+ super(client, walletClient, contractAddress, chain, SecureOwnableABIJson);
11
+ }
12
+ // Ownership Management
13
+ async transferOwnershipRequest(options) {
14
+ return this.executeWriteContract('transferOwnershipRequest', [], options);
15
+ }
16
+ async transferOwnershipDelayedApproval(txId, options) {
17
+ return this.executeWriteContract('transferOwnershipDelayedApproval', [txId], options);
18
+ }
19
+ async transferOwnershipApprovalWithMetaTx(metaTx, options) {
20
+ return this.executeWriteContract('transferOwnershipApprovalWithMetaTx', [metaTx], options);
21
+ }
22
+ async transferOwnershipCancellation(txId, options) {
23
+ return this.executeWriteContract('transferOwnershipCancellation', [txId], options);
24
+ }
25
+ async transferOwnershipCancellationWithMetaTx(metaTx, options) {
26
+ return this.executeWriteContract('transferOwnershipCancellationWithMetaTx', [metaTx], options);
27
+ }
28
+ // Broadcaster Management
29
+ async updateBroadcasterRequest(newBroadcaster, options) {
30
+ return this.executeWriteContract('updateBroadcasterRequest', [newBroadcaster], options);
31
+ }
32
+ async updateBroadcasterDelayedApproval(txId, options) {
33
+ return this.executeWriteContract('updateBroadcasterDelayedApproval', [txId], options);
34
+ }
35
+ async updateBroadcasterApprovalWithMetaTx(metaTx, options) {
36
+ return this.executeWriteContract('updateBroadcasterApprovalWithMetaTx', [metaTx], options);
37
+ }
38
+ async updateBroadcasterCancellation(txId, options) {
39
+ return this.executeWriteContract('updateBroadcasterCancellation', [txId], options);
40
+ }
41
+ async updateBroadcasterCancellationWithMetaTx(metaTx, options) {
42
+ return this.executeWriteContract('updateBroadcasterCancellationWithMetaTx', [metaTx], options);
43
+ }
44
+ // Recovery Management
45
+ /**
46
+ * @dev Wrapper matching ISecureOwnable interface; delegates to updateRecoveryExecutionParams
47
+ */
48
+ async updateRecoveryExecutionOptions(newRecoveryAddress) {
49
+ return this.updateRecoveryExecutionParams(newRecoveryAddress);
50
+ }
51
+ async updateRecoveryExecutionParams(newRecoveryAddress) {
52
+ // Contract ABI encodes bytes as Hex string; read directly as Hex
53
+ return this.executeReadContract('updateRecoveryExecutionParams', [newRecoveryAddress]);
54
+ }
55
+ async updateRecoveryRequestAndApprove(metaTx, options) {
56
+ return this.executeWriteContract('updateRecoveryRequestAndApprove', [metaTx], options);
57
+ }
58
+ // TimeLock Management
59
+ /**
60
+ * @dev Wrapper matching ISecureOwnable interface; delegates to updateTimeLockExecutionParams
61
+ */
62
+ async updateTimeLockExecutionOptions(newTimeLockPeriodSec) {
63
+ return this.updateTimeLockExecutionParams(newTimeLockPeriodSec);
64
+ }
65
+ async updateTimeLockExecutionParams(newTimeLockPeriodSec) {
66
+ // Contract ABI encodes bytes as Hex string; read directly as Hex
67
+ return this.executeReadContract('updateTimeLockExecutionParams', [newTimeLockPeriodSec]);
68
+ }
69
+ async updateTimeLockRequestAndApprove(metaTx, options) {
70
+ return this.executeWriteContract('updateTimeLockRequestAndApprove', [metaTx], options);
71
+ }
72
+ // ============ INTERFACE SUPPORT ============
73
+ /**
74
+ * @dev Check if this contract supports ISecureOwnable interface
75
+ * @return Promise<boolean> indicating if ISecureOwnable is supported
76
+ */
77
+ async supportsSecureOwnableInterface() {
78
+ return this.supportsInterface(INTERFACE_IDS.ISecureOwnable);
79
+ }
80
+ }
81
+ export default SecureOwnable;
82
+ //# sourceMappingURL=SecureOwnable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecureOwnable.js","sourceRoot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IACtB;;OAEG;IACH,KAAK,CAAC,8BAA8B,CAAC,oBAA4B;QAC/D,OAAO,IAAI,CAAC,6BAA6B,CAAC,oBAAoB,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,6BAA6B,CAAC,oBAA4B;QAC9D,iEAAiE;QACjE,OAAO,IAAI,CAAC,mBAAmB,CAAM,+BAA+B,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAChG,CAAC;IAED,KAAK,CAAC,+BAA+B,CAAC,MAAuB,EAAE,OAA2B;QACxF,OAAO,IAAI,CAAC,oBAAoB,CAAC,iCAAiC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED,8CAA8C;IAE9C;;;OAGG;IACH,KAAK,CAAC,8BAA8B;QAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAC9D,CAAC;CAiBF;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,30 @@
1
+ export { default as BaseStateMachine } from './contracts/BaseStateMachine';
2
+ export { default as SecureOwnable } from './contracts/SecureOwnable';
3
+ export { default as RuntimeRBAC } from './contracts/RuntimeRBAC';
4
+ export { default as GuardController } from './contracts/GuardController';
5
+ export { Definitions } from './lib/Definition';
6
+ export { EngineBlox } from './lib/EngineBlox';
7
+ export * from './interfaces/base.index';
8
+ export * from './interfaces/base.state.machine.index';
9
+ export * from './interfaces/core.access.index';
10
+ export * from './interfaces/core.security.index';
11
+ export * from './interfaces/core.execution.index';
12
+ export * from './interfaces/lib.index';
13
+ export * from './interfaces/definition.index';
14
+ export { RUNTIME_RBAC_FUNCTION_SELECTORS, RUNTIME_RBAC_OPERATION_TYPES, RoleConfigActionType } from './types/core.access.index';
15
+ export type { RoleConfigAction } from './types/core.access.index';
16
+ export { OPERATION_TYPES } from './types/core.security.index';
17
+ export type { OperationType } from './types/core.security.index';
18
+ export { GUARD_CONTROLLER_FUNCTION_SELECTORS, GUARD_CONTROLLER_OPERATION_TYPES, GuardConfigActionType } from './types/core.execution.index';
19
+ export type { GuardConfigAction } from './types/core.execution.index';
20
+ export * from './types/base.state.machine.index';
21
+ export * from './types/lib.index';
22
+ export * from './types/definition.index';
23
+ export * from './utils/bitmap';
24
+ export * from './utils/validations';
25
+ export * from './utils/erc20/erc20Token';
26
+ export { MetaTransactionSigner, MetaTransactionBuilder } from './utils/metaTx/metaTransaction';
27
+ export * from './utils/contract-errors';
28
+ export * from './utils/viem-error-handler';
29
+ export type { Address, Hex, PublicClient, WalletClient, Chain } from 'viem';
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAG9C,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EACL,eAAe,EAChB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC/F,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAG3C,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,32 @@
1
+ // Bloxchain Protocol TypeScript SDK
2
+ // Main entry point for all SDK functionality
3
+ // Core Classes
4
+ export { default as BaseStateMachine } from './contracts/BaseStateMachine';
5
+ export { default as SecureOwnable } from './contracts/SecureOwnable';
6
+ export { default as RuntimeRBAC } from './contracts/RuntimeRBAC';
7
+ export { default as GuardController } from './contracts/GuardController';
8
+ export { Definitions } from './lib/Definition';
9
+ export { EngineBlox } from './lib/EngineBlox';
10
+ // Interfaces
11
+ export * from './interfaces/base.index';
12
+ export * from './interfaces/base.state.machine.index';
13
+ export * from './interfaces/core.access.index';
14
+ export * from './interfaces/core.security.index';
15
+ export * from './interfaces/core.execution.index';
16
+ export * from './interfaces/lib.index';
17
+ export * from './interfaces/definition.index';
18
+ // Types and Constants
19
+ export { RUNTIME_RBAC_FUNCTION_SELECTORS, RUNTIME_RBAC_OPERATION_TYPES, RoleConfigActionType } from './types/core.access.index';
20
+ export { OPERATION_TYPES } from './types/core.security.index';
21
+ export { GUARD_CONTROLLER_FUNCTION_SELECTORS, GUARD_CONTROLLER_OPERATION_TYPES, GuardConfigActionType } from './types/core.execution.index';
22
+ export * from './types/base.state.machine.index';
23
+ export * from './types/lib.index';
24
+ export * from './types/definition.index';
25
+ export * from './utils/bitmap';
26
+ // Utilities
27
+ export * from './utils/validations';
28
+ export * from './utils/erc20/erc20Token';
29
+ export { MetaTransactionSigner, MetaTransactionBuilder } from './utils/metaTx/metaTransaction';
30
+ export * from './utils/contract-errors';
31
+ export * from './utils/viem-error-handler';
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,6CAA6C;AAE7C,eAAe;AACf,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,aAAa;AACb,cAAc,yBAAyB,CAAC;AACxC,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAE9C,sBAAsB;AACtB,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AAEtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAE/B,YAAY;AACZ,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC/F,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { Address, Hash, TransactionReceipt } from 'viem';
2
+ /**
3
+ * Represents the result of a blockchain transaction, providing both immediate hash
4
+ * and the ability to wait for confirmation
5
+ */
6
+ export interface TransactionResult {
7
+ /** The transaction hash returned immediately after submission */
8
+ hash: Hash;
9
+ /** Function to wait for transaction confirmation and get the receipt */
10
+ wait: () => Promise<TransactionReceipt>;
11
+ }
12
+ export interface TransactionOptions {
13
+ from: Address;
14
+ gas?: number;
15
+ gasPrice?: string;
16
+ value?: string;
17
+ }
18
+ //# sourceMappingURL=base.index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.index.d.ts","sourceRoot":"","sources":["../../interfaces/base.index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,iEAAiE;IACjE,IAAI,EAAE,IAAI,CAAC;IACX,wEAAwE;IACxE,IAAI,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACzC;AAGH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=base.index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.index.js","sourceRoot":"","sources":["../../interfaces/base.index.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,72 @@
1
+ import { Address, Hex } from 'viem';
2
+ import { TxRecord, MetaTransaction, MetaTxParams } from './lib.index';
3
+ import { TxAction } from '../types/lib.index';
4
+ /**
5
+ * Interface for BaseStateMachine contract events
6
+ */
7
+ export interface TransactionRequestedEvent {
8
+ txId: bigint;
9
+ requester: Address;
10
+ operationType: Hex;
11
+ releaseTime: bigint;
12
+ }
13
+ export interface TransactionApprovedEvent {
14
+ txId: bigint;
15
+ operationType: Hex;
16
+ approver: Address;
17
+ }
18
+ export interface TransactionCancelledEvent {
19
+ txId: bigint;
20
+ operationType: Hex;
21
+ canceller: Address;
22
+ }
23
+ export interface TransactionExecutedEvent {
24
+ txId: bigint;
25
+ operationType: Hex;
26
+ success: boolean;
27
+ }
28
+ /**
29
+ * Interface for BaseStateMachine contract state
30
+ */
31
+ export interface BaseStateMachineState {
32
+ initialized: boolean;
33
+ txCounter: bigint;
34
+ timeLockPeriodSec: bigint;
35
+ supportedOperationTypes: Hex[];
36
+ supportedRoles: Hex[];
37
+ supportedFunctions: Hex[];
38
+ }
39
+ /**
40
+ * Interface for BaseStateMachine contract methods
41
+ */
42
+ export interface IBaseStateMachine {
43
+ createMetaTxParams(handlerContract: Address, handlerSelector: Hex, action: TxAction, deadline: bigint, maxGasPrice: bigint, signer: Address): Promise<MetaTxParams>;
44
+ generateUnsignedMetaTransactionForNew(requester: Address, target: Address, value: bigint, gasLimit: bigint, operationType: Hex, executionSelector: Hex, executionParams: Hex, metaTxParams: MetaTxParams): Promise<MetaTransaction>;
45
+ generateUnsignedMetaTransactionForExisting(txId: bigint, metaTxParams: MetaTxParams): Promise<MetaTransaction>;
46
+ getTransactionHistory(fromTxId: bigint, toTxId: bigint): Promise<TxRecord[]>;
47
+ getTransaction(txId: bigint): Promise<TxRecord>;
48
+ getPendingTransactions(): Promise<bigint[]>;
49
+ getRole(roleHash: Hex): Promise<{
50
+ roleName: string;
51
+ roleHashReturn: Hex;
52
+ maxWallets: bigint;
53
+ walletCount: bigint;
54
+ isProtected: boolean;
55
+ }>;
56
+ hasRole(roleHash: Hex, wallet: Address): Promise<boolean>;
57
+ getWalletRoles(wallet: Address): Promise<Hex[]>;
58
+ functionSchemaExists(functionSelector: Hex): Promise<boolean>;
59
+ isActionSupportedByFunction(functionSelector: Hex, action: TxAction): Promise<boolean>;
60
+ getActiveRolePermissions(roleHash: Hex): Promise<any[]>;
61
+ getSignerNonce(signer: Address): Promise<bigint>;
62
+ getSupportedOperationTypes(): Promise<Hex[]>;
63
+ getSupportedRoles(): Promise<Hex[]>;
64
+ getSupportedFunctions(): Promise<Hex[]>;
65
+ getTimeLockPeriodSec(): Promise<bigint>;
66
+ initialized(): Promise<boolean>;
67
+ owner(): Promise<Address>;
68
+ getBroadcasters(): Promise<Address[]>;
69
+ getRecovery(): Promise<Address>;
70
+ supportsInterface(interfaceId: Hex): Promise<boolean>;
71
+ }
72
+ //# sourceMappingURL=base.state.machine.index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.state.machine.index.d.ts","sourceRoot":"","sources":["../../interfaces/base.state.machine.index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,GAAG,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACx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C,WAAW,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=base.state.machine.index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.state.machine.index.js","sourceRoot":"","sources":["../../interfaces/base.state.machine.index.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import { Address, Hex } from 'viem';
2
+ import { TransactionResult, TransactionOptions } from './base.index';
3
+ import { MetaTransaction } from './lib.index';
4
+ import { TxAction } from '../types/lib.index';
5
+ /**
6
+ * Interface for RuntimeRBAC contract methods
7
+ * Note: This interface matches the actual contract methods. Some convenience methods
8
+ * may be provided but are not part of the core contract interface.
9
+ */
10
+ export interface IRuntimeRBAC {
11
+ /**
12
+ * @dev Creates execution params for a RBAC configuration batch
13
+ */
14
+ roleConfigBatchExecutionParams(actions: Array<{
15
+ actionType: number;
16
+ data: Hex;
17
+ }>): Promise<Hex>;
18
+ /**
19
+ * @dev Requests and approves a RBAC configuration batch using a meta-transaction
20
+ */
21
+ roleConfigBatchRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
22
+ getFunctionSchema(functionSelector: Hex): Promise<{
23
+ functionSignature: string;
24
+ functionSelectorReturn: Hex;
25
+ operationType: Hex;
26
+ operationName: string;
27
+ supportedActions: TxAction[];
28
+ isProtected: boolean;
29
+ }>;
30
+ /**
31
+ * @dev Gets all authorized wallets for a role
32
+ * @param roleHash The role hash to get wallets for
33
+ * @return Array of authorized wallet addresses
34
+ */
35
+ getWalletsInRole(roleHash: Hex): Promise<Address[]>;
36
+ }
37
+ //# sourceMappingURL=core.access.index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.access.index.d.ts","sourceRoot":"","sources":["../../interfaces/core.access.index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,8BAA8B,CAC5B,OAAO,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,CAAC,GAChD,OAAO,CAAC,GAAG,CAAC,CAAC;IAEhB;;OAEG;IACH,gCAAgC,CAC9B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAG9B,iBAAiB,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAAC;QAChD,iBAAiB,EAAE,MAAM,CAAC;QAC1B,sBAAsB,EAAE,GAAG,CAAC;QAC5B,aAAa,EAAE,GAAG,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,gBAAgB,EAAE,QAAQ,EAAE,CAAC;QAC7B,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC,CAAC;IAEH;;;;OAIG;IACH,gBAAgB,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CACrD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=core.access.index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.access.index.js","sourceRoot":"","sources":["../../interfaces/core.access.index.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ import { Address, Hex } from 'viem';
2
+ import { TransactionResult, TransactionOptions } from './base.index';
3
+ import { MetaTransaction } from './lib.index';
4
+ import { IBaseStateMachine } from './base.state.machine.index';
5
+ /**
6
+ * Interface for GuardController contract methods
7
+ * @notice GuardController extends BaseStateMachine and provides execution workflows
8
+ * @notice For role management, combine GuardController with RuntimeRBAC
9
+ */
10
+ export interface IGuardController extends IBaseStateMachine {
11
+ initialize(initialOwner: Address, broadcaster: Address, recovery: Address, timeLockPeriodSec: bigint, eventForwarder: Address, options: TransactionOptions): Promise<TransactionResult>;
12
+ executeWithTimeLock(target: Address, value: bigint, functionSelector: Hex, params: Hex, gasLimit: bigint, operationType: Hex, options: TransactionOptions): Promise<TransactionResult>;
13
+ approveTimeLockExecution(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
14
+ cancelTimeLockExecution(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
15
+ approveTimeLockExecutionWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
16
+ cancelTimeLockExecutionWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
17
+ requestAndApproveExecution(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
18
+ /**
19
+ * @dev Creates execution params for a guard configuration batch
20
+ * @param actions Encoded guard configuration actions
21
+ * @return Promise<Hex> The execution params to be used in a meta-transaction
22
+ */
23
+ guardConfigBatchExecutionParams(actions: Array<{
24
+ actionType: number;
25
+ data: Hex;
26
+ }>): Promise<Hex>;
27
+ /**
28
+ * @dev Requests and approves a guard configuration batch using a meta-transaction
29
+ * @param metaTx The meta-transaction describing the guard configuration batch
30
+ * @param options Transaction options including from address
31
+ * @return TransactionResult with hash and wait function
32
+ * @notice OWNER signs, BROADCASTER executes according to GuardControllerDefinitions
33
+ * @notice Supports whitelist management and function schema registration
34
+ */
35
+ guardConfigBatchRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
36
+ /**
37
+ * @dev Gets all whitelisted targets for a function selector
38
+ * @param functionSelector The function selector
39
+ * @return Promise<Address[]> Array of whitelisted target addresses
40
+ * @notice Requires caller to have any role (via _validateAnyRole) for privacy protection
41
+ */
42
+ getAllowedTargets(functionSelector: Hex): Promise<Address[]>;
43
+ }
44
+ //# sourceMappingURL=core.execution.index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.execution.index.d.ts","sourceRoot":"","sources":["../../interfaces/core.execution.index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IAEzD,UAAU,CACR,YAAY,EAAE,OAAO,EACrB,WAAW,EAAE,OAAO,EACpB,QAAQ,EAAE,OAAO,EACjB,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAG9B,mBAAmB,CACjB,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,GAAG,EACrB,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,GAAG,EAClB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B,wBAAwB,CACtB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B,uBAAuB,CACrB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B,kCAAkC,CAChC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B,iCAAiC,CAC/B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B,0BAA0B,CACxB,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAG9B;;;;OAIG;IACH,+BAA+B,CAC7B,OAAO,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,CAAC,GAChD,OAAO,CAAC,GAAG,CAAC,CAAC;IAEhB;;;;;;;OAOG;IACH,iCAAiC,CAC/B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B;;;;;OAKG;IACH,iBAAiB,CACf,gBAAgB,EAAE,GAAG,GACpB,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=core.execution.index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.execution.index.js","sourceRoot":"","sources":["../../interfaces/core.execution.index.tsx"],"names":[],"mappings":""}