@bloxchain/sdk 1.0.0-alpha.7 → 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 +1894 -1851
- 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 +235 -199
- 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 +212 -202
- 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 -30
- 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 +21 -22
- package/dist/lib/definitions/GuardControllerDefinitions.d.ts.map +1 -1
- package/dist/lib/definitions/GuardControllerDefinitions.js +42 -39
- package/dist/lib/definitions/GuardControllerDefinitions.js.map +1 -1
- package/dist/lib/definitions/RuntimeRBACDefinitions.d.ts +24 -27
- package/dist/lib/definitions/RuntimeRBACDefinitions.d.ts.map +1 -1
- package/dist/lib/definitions/RuntimeRBACDefinitions.js +42 -51
- 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 -6
- 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 +111 -12
- package/dist/utils/contract-errors.d.ts.map +1 -1
- package/dist/utils/contract-errors.js +362 -113
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuardController.js","sourceRoot":"","sources":["../../../contracts/core/GuardController.tsx"],"names":[],"mappings":"AACA,OAAO,sBAAsB,MAAM,oCAAoC,CAAC
|
|
1
|
+
{"version":3,"file":"GuardController.js","sourceRoot":"","sources":["../../../contracts/core/GuardController.tsx"],"names":[],"mappings":"AACA,OAAO,sBAAsB,MAAM,oCAAoC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAI9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,OAAO,eAAgB,SAAQ,gBAAgB;IACnD,YACE,MAAoB,EACpB,YAAsC,EACtC,eAAwB,EACxB,KAAY;QAEZ,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,KAAK,EAAE,sBA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, TransactionResult } from '../../interfaces/base.index';
|
|
3
|
-
import { IRuntimeRBAC } from '../../interfaces/core.access.index';
|
|
4
|
-
import { MetaTransaction } from '../../interfaces/lib.index';
|
|
5
|
-
import { BaseStateMachine } from './BaseStateMachine';
|
|
6
|
-
import type { RoleConfigAction } from '../../types/core.access.index';
|
|
1
|
+
import { Address, PublicClient, WalletClient, Chain } from 'viem';
|
|
2
|
+
import { TransactionOptions, TransactionResult } from '../../interfaces/base.index.js';
|
|
3
|
+
import { IRuntimeRBAC } from '../../interfaces/core.access.index.js';
|
|
4
|
+
import { MetaTransaction } from '../../interfaces/lib.index.js';
|
|
5
|
+
import { BaseStateMachine } from './BaseStateMachine.js';
|
|
7
6
|
/**
|
|
8
7
|
* @title RuntimeRBAC
|
|
9
8
|
* @notice TypeScript wrapper for RuntimeRBAC smart contract
|
|
@@ -12,24 +11,12 @@ import type { RoleConfigAction } from '../../types/core.access.index';
|
|
|
12
11
|
*/
|
|
13
12
|
export declare class RuntimeRBAC extends BaseStateMachine implements IRuntimeRBAC {
|
|
14
13
|
constructor(client: PublicClient, walletClient: WalletClient | undefined, contractAddress: Address, chain: Chain);
|
|
15
|
-
/**
|
|
16
|
-
* @dev Creates execution params for a RBAC configuration batch (definition helper; no contract call)
|
|
17
|
-
* @param actions Role configuration actions
|
|
18
|
-
*/
|
|
19
|
-
roleConfigBatchExecutionParams(actions: RoleConfigAction[]): Hex;
|
|
20
14
|
/**
|
|
21
15
|
* @dev Requests and approves a RBAC configuration batch using a meta-transaction
|
|
22
16
|
* @param metaTx The meta-transaction
|
|
23
17
|
* @param options Transaction options
|
|
24
18
|
*/
|
|
25
19
|
roleConfigBatchRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
26
|
-
/**
|
|
27
|
-
* @dev Gets all authorized wallets for a role
|
|
28
|
-
* @param roleHash The role hash to get wallets for
|
|
29
|
-
* @return Array of authorized wallet addresses
|
|
30
|
-
* @notice Requires caller to have any role (via _validateAnyRole) for privacy protection
|
|
31
|
-
*/
|
|
32
|
-
getWalletsInRole(roleHash: Hex): Promise<Address[]>;
|
|
33
20
|
/**
|
|
34
21
|
* @dev Check if this contract supports IRuntimeRBAC interface
|
|
35
22
|
* @return Promise<boolean> indicating if IRuntimeRBAC is supported
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeRBAC.d.ts","sourceRoot":"","sources":["../../../contracts/core/RuntimeRBAC.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"RuntimeRBAC.d.ts","sourceRoot":"","sources":["../../../contracts/core/RuntimeRBAC.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAO,MAAM,MAAM,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;;;;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;;;;OAIG;IACG,gCAAgC,CACpC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC;IAM7B;;;OAGG;IACG,4BAA4B,IAAI,OAAO,CAAC,OAAO,CAAC;CAIvD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import RuntimeRBACABIJson from '../../abi/RuntimeRBAC.abi.json';
|
|
2
|
-
import { BaseStateMachine } from './BaseStateMachine';
|
|
3
|
-
import {
|
|
4
|
-
import { roleConfigBatchExecutionParams as defRoleConfigBatchExecutionParams } from '../../lib/definitions/RuntimeRBACDefinitions';
|
|
1
|
+
import RuntimeRBACABIJson from '../../abi/RuntimeRBAC.abi.json' with { type: 'json' };
|
|
2
|
+
import { BaseStateMachine } from './BaseStateMachine.js';
|
|
3
|
+
import { ComponentDetection } from '../../utils/interface-ids.js';
|
|
5
4
|
/**
|
|
6
5
|
* @title RuntimeRBAC
|
|
7
6
|
* @notice TypeScript wrapper for RuntimeRBAC smart contract
|
|
@@ -13,13 +12,6 @@ export class RuntimeRBAC extends BaseStateMachine {
|
|
|
13
12
|
super(client, walletClient, contractAddress, chain, RuntimeRBACABIJson);
|
|
14
13
|
}
|
|
15
14
|
// ============ ROLE CONFIGURATION BATCH ============
|
|
16
|
-
/**
|
|
17
|
-
* @dev Creates execution params for a RBAC configuration batch (definition helper; no contract call)
|
|
18
|
-
* @param actions Role configuration actions
|
|
19
|
-
*/
|
|
20
|
-
roleConfigBatchExecutionParams(actions) {
|
|
21
|
-
return defRoleConfigBatchExecutionParams(actions);
|
|
22
|
-
}
|
|
23
15
|
/**
|
|
24
16
|
* @dev Requests and approves a RBAC configuration batch using a meta-transaction
|
|
25
17
|
* @param metaTx The meta-transaction
|
|
@@ -28,22 +20,13 @@ export class RuntimeRBAC extends BaseStateMachine {
|
|
|
28
20
|
async roleConfigBatchRequestAndApprove(metaTx, options) {
|
|
29
21
|
return this.executeWriteContract('roleConfigBatchRequestAndApprove', [metaTx], options);
|
|
30
22
|
}
|
|
31
|
-
/**
|
|
32
|
-
* @dev Gets all authorized wallets for a role
|
|
33
|
-
* @param roleHash The role hash to get wallets for
|
|
34
|
-
* @return Array of authorized wallet addresses
|
|
35
|
-
* @notice Requires caller to have any role (via _validateAnyRole) for privacy protection
|
|
36
|
-
*/
|
|
37
|
-
async getWalletsInRole(roleHash) {
|
|
38
|
-
return this.executeReadContract('getWalletsInRole', [roleHash]);
|
|
39
|
-
}
|
|
40
23
|
// ============ INTERFACE SUPPORT ============
|
|
41
24
|
/**
|
|
42
25
|
* @dev Check if this contract supports IRuntimeRBAC interface
|
|
43
26
|
* @return Promise<boolean> indicating if IRuntimeRBAC is supported
|
|
44
27
|
*/
|
|
45
28
|
async supportsRuntimeRBACInterface() {
|
|
46
|
-
return
|
|
29
|
+
return ComponentDetection.isRuntimeRBAC(this);
|
|
47
30
|
}
|
|
48
31
|
}
|
|
49
32
|
export default RuntimeRBAC;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeRBAC.js","sourceRoot":"","sources":["../../../contracts/core/RuntimeRBAC.tsx"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,gCAAgC,CAAC
|
|
1
|
+
{"version":3,"file":"RuntimeRBAC.js","sourceRoot":"","sources":["../../../contracts/core/RuntimeRBAC.tsx"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAItF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE;;;;;GAKG;AACH,MAAM,OAAO,WAAY,SAAQ,gBAAgB;IAC/C,YACE,MAAoB,EACpB,YAAsC,EACtC,eAAwB,EACxB,KAAY;QAEZ,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAC1E,CAAC;IAED,qDAAqD;IAErD;;;;OAIG;IACH,KAAK,CAAC,gCAAgC,CACpC,MAAuB,EACvB,OAA2B;QAE3B,OAAO,IAAI,CAAC,oBAAoB,CAAC,kCAAkC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED,8CAA8C;IAE9C;;;OAGG;IACH,KAAK,CAAC,4BAA4B;QAChC,OAAO,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CAEF;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Address, PublicClient, WalletClient, Chain
|
|
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';
|
|
1
|
+
import { Address, PublicClient, WalletClient, Chain } from 'viem';
|
|
2
|
+
import { TransactionOptions, TransactionResult } from '../../interfaces/base.index.js';
|
|
3
|
+
import { ISecureOwnable } from '../../interfaces/core.security.index.js';
|
|
4
|
+
import { MetaTransaction } from '../../interfaces/lib.index.js';
|
|
5
|
+
import { BaseStateMachine } from './BaseStateMachine.js';
|
|
6
6
|
/**
|
|
7
7
|
* @title SecureOwnable
|
|
8
8
|
* @notice TypeScript wrapper for SecureOwnable smart contract
|
|
@@ -14,23 +14,21 @@ export declare class SecureOwnable extends BaseStateMachine implements ISecureOw
|
|
|
14
14
|
transferOwnershipApprovalWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
15
15
|
transferOwnershipCancellation(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
|
|
16
16
|
transferOwnershipCancellationWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
17
|
-
updateBroadcasterRequest(newBroadcaster: Address,
|
|
17
|
+
updateBroadcasterRequest(newBroadcaster: Address, currentBroadcaster: Address, options: TransactionOptions): Promise<TransactionResult>;
|
|
18
18
|
updateBroadcasterDelayedApproval(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
|
|
19
19
|
updateBroadcasterApprovalWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
20
20
|
updateBroadcasterCancellation(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
|
|
21
21
|
updateBroadcasterCancellationWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
22
|
-
/**
|
|
23
|
-
* @dev Wrapper matching ISecureOwnable interface; delegates to definition helper (no contract call)
|
|
24
|
-
*/
|
|
25
|
-
updateRecoveryExecutionOptions(newRecoveryAddress: Address): Promise<Hex>;
|
|
26
|
-
updateRecoveryExecutionParams(newRecoveryAddress: Address): Promise<Hex>;
|
|
27
22
|
updateRecoveryRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
*/
|
|
31
|
-
updateTimeLockExecutionOptions(newTimeLockPeriodSec: bigint): Promise<Hex>;
|
|
32
|
-
updateTimeLockExecutionParams(newTimeLockPeriodSec: bigint): Promise<Hex>;
|
|
23
|
+
/** Broadcaster-only: execute approved recovery update (see SecureOwnableDefinitions). */
|
|
24
|
+
executeRecoveryUpdate(newRecovery: Address, options: TransactionOptions): Promise<TransactionResult>;
|
|
33
25
|
updateTimeLockRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
26
|
+
/** Broadcaster-only: execute approved timelock period update. */
|
|
27
|
+
executeTimeLockUpdate(newPeriodSec: bigint, options: TransactionOptions): Promise<TransactionResult>;
|
|
28
|
+
/** Broadcaster-only: execute approved ownership transfer. */
|
|
29
|
+
executeTransferOwnership(newOwner: Address, options: TransactionOptions): Promise<TransactionResult>;
|
|
30
|
+
/** Broadcaster-only: execute approved broadcaster rotation. */
|
|
31
|
+
executeBroadcasterUpdate(newBroadcaster: Address, currentBroadcaster: Address, options: TransactionOptions): Promise<TransactionResult>;
|
|
34
32
|
/**
|
|
35
33
|
* @dev Check if this contract supports ISecureOwnable interface
|
|
36
34
|
* @return Promise<boolean> indicating if ISecureOwnable is supported
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecureOwnable.d.ts","sourceRoot":"","sources":["../../../contracts/core/SecureOwnable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"SecureOwnable.d.ts","sourceRoot":"","sources":["../../../contracts/core/SecureOwnable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAO,MAAM,MAAM,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;;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,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIrH,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIpG,uCAAuC,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAKzH,wBAAwB,CAAC,cAAc,EAAE,OAAO,EAAE,kBA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Aa,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import SecureOwnableABIJson from '../../abi/SecureOwnable.abi.json';
|
|
2
|
-
import { BaseStateMachine } from './BaseStateMachine';
|
|
3
|
-
import { INTERFACE_IDS } from '../../utils/interface-ids';
|
|
4
|
-
import { updateRecoveryExecutionParams as defUpdateRecoveryExecutionParams, updateTimeLockExecutionParams as defUpdateTimeLockExecutionParams } from '../../lib/definitions/SecureOwnableDefinitions';
|
|
1
|
+
import SecureOwnableABIJson from '../../abi/SecureOwnable.abi.json' with { type: 'json' };
|
|
2
|
+
import { BaseStateMachine } from './BaseStateMachine.js';
|
|
3
|
+
import { INTERFACE_IDS } from '../../utils/interface-ids.js';
|
|
5
4
|
/**
|
|
6
5
|
* @title SecureOwnable
|
|
7
6
|
* @notice TypeScript wrapper for SecureOwnable smart contract
|
|
@@ -27,8 +26,8 @@ export class SecureOwnable extends BaseStateMachine {
|
|
|
27
26
|
return this.executeWriteContract('transferOwnershipCancellationWithMetaTx', [metaTx], options);
|
|
28
27
|
}
|
|
29
28
|
// Broadcaster Management
|
|
30
|
-
async updateBroadcasterRequest(newBroadcaster,
|
|
31
|
-
return this.executeWriteContract('updateBroadcasterRequest', [newBroadcaster,
|
|
29
|
+
async updateBroadcasterRequest(newBroadcaster, currentBroadcaster, options) {
|
|
30
|
+
return this.executeWriteContract('updateBroadcasterRequest', [newBroadcaster, currentBroadcaster], options);
|
|
32
31
|
}
|
|
33
32
|
async updateBroadcasterDelayedApproval(txId, options) {
|
|
34
33
|
return this.executeWriteContract('updateBroadcasterDelayedApproval', [txId], options);
|
|
@@ -43,31 +42,29 @@ export class SecureOwnable extends BaseStateMachine {
|
|
|
43
42
|
return this.executeWriteContract('updateBroadcasterCancellationWithMetaTx', [metaTx], options);
|
|
44
43
|
}
|
|
45
44
|
// Recovery Management
|
|
46
|
-
/**
|
|
47
|
-
* @dev Wrapper matching ISecureOwnable interface; delegates to definition helper (no contract call)
|
|
48
|
-
*/
|
|
49
|
-
async updateRecoveryExecutionOptions(newRecoveryAddress) {
|
|
50
|
-
return this.updateRecoveryExecutionParams(newRecoveryAddress);
|
|
51
|
-
}
|
|
52
|
-
async updateRecoveryExecutionParams(newRecoveryAddress) {
|
|
53
|
-
return Promise.resolve(defUpdateRecoveryExecutionParams(newRecoveryAddress));
|
|
54
|
-
}
|
|
55
45
|
async updateRecoveryRequestAndApprove(metaTx, options) {
|
|
56
46
|
return this.executeWriteContract('updateRecoveryRequestAndApprove', [metaTx], options);
|
|
57
47
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*/
|
|
62
|
-
async updateTimeLockExecutionOptions(newTimeLockPeriodSec) {
|
|
63
|
-
return this.updateTimeLockExecutionParams(newTimeLockPeriodSec);
|
|
64
|
-
}
|
|
65
|
-
async updateTimeLockExecutionParams(newTimeLockPeriodSec) {
|
|
66
|
-
return Promise.resolve(defUpdateTimeLockExecutionParams(newTimeLockPeriodSec));
|
|
48
|
+
/** Broadcaster-only: execute approved recovery update (see SecureOwnableDefinitions). */
|
|
49
|
+
async executeRecoveryUpdate(newRecovery, options) {
|
|
50
|
+
return this.executeWriteContract('executeRecoveryUpdate', [newRecovery], options);
|
|
67
51
|
}
|
|
52
|
+
// TimeLock Management
|
|
68
53
|
async updateTimeLockRequestAndApprove(metaTx, options) {
|
|
69
54
|
return this.executeWriteContract('updateTimeLockRequestAndApprove', [metaTx], options);
|
|
70
55
|
}
|
|
56
|
+
/** Broadcaster-only: execute approved timelock period update. */
|
|
57
|
+
async executeTimeLockUpdate(newPeriodSec, options) {
|
|
58
|
+
return this.executeWriteContract('executeTimeLockUpdate', [newPeriodSec], options);
|
|
59
|
+
}
|
|
60
|
+
/** Broadcaster-only: execute approved ownership transfer. */
|
|
61
|
+
async executeTransferOwnership(newOwner, options) {
|
|
62
|
+
return this.executeWriteContract('executeTransferOwnership', [newOwner], options);
|
|
63
|
+
}
|
|
64
|
+
/** Broadcaster-only: execute approved broadcaster rotation. */
|
|
65
|
+
async executeBroadcasterUpdate(newBroadcaster, currentBroadcaster, options) {
|
|
66
|
+
return this.executeWriteContract('executeBroadcasterUpdate', [newBroadcaster, currentBroadcaster], options);
|
|
67
|
+
}
|
|
71
68
|
// ============ INTERFACE SUPPORT ============
|
|
72
69
|
/**
|
|
73
70
|
* @dev Check if this contract supports ISecureOwnable interface
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecureOwnable.js","sourceRoot":"","sources":["../../../contracts/core/SecureOwnable.tsx"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,kCAAkC,CAAC
|
|
1
|
+
{"version":3,"file":"SecureOwnable.js","sourceRoot":"","sources":["../../../contracts/core/SecureOwnable.tsx"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAI1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,gBAAgB;IACjD,YACE,MAAoB,EACpB,YAAsC,EACtC,eAAwB,EACxB,KAAY;QAEZ,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC;IAC5E,CAAC;IAED,uBAAuB;IACvB,KAAK,CAAC,wBAAwB,CAAC,OAA2B;QACxD,OAAO,IAAI,CAAC,oBAAoB,CAAC,0BAA0B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,gCAAgC,CAAC,IAAY,EAAE,OAA2B;QAC9E,OAAO,IAAI,CAAC,oBAAoB,CAAC,kCAAkC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED,KAAK,CAAC,mCAAmC,CAAC,MAAuB,EAAE,OAA2B;QAC5F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C;IAC9D,CAAC;CACF;AAED,eAAe,aAAa,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
export { default as BaseStateMachine } from './contracts/core/BaseStateMachine';
|
|
2
|
-
export { default as SecureOwnable } from './contracts/core/SecureOwnable';
|
|
3
|
-
export { default as RuntimeRBAC } from './contracts/core/RuntimeRBAC';
|
|
4
|
-
export { default as GuardController } from './contracts/core/GuardController';
|
|
5
|
-
export { Definitions } from './lib/Definition';
|
|
6
|
-
export { EngineBlox } from './lib/EngineBlox';
|
|
7
|
-
export { updateRecoveryExecutionParams, updateTimeLockExecutionParams, roleConfigBatchExecutionParams, guardConfigBatchExecutionParams, getRoleConfigActionSpecs, encodeCreateRole, encodeRemoveRole, encodeAddWallet, encodeRevokeWallet, encodeAddFunctionToRole, encodeRemoveFunctionFromRole, getGuardConfigActionSpecs, encodeAddTargetToWhitelist, encodeRemoveTargetFromWhitelist, encodeRegisterFunction, encodeUnregisterFunction } from './lib/definitions';
|
|
8
|
-
export type { FunctionPermissionForEncoding } from './lib/definitions';
|
|
9
|
-
export * from './interfaces/base.index';
|
|
10
|
-
export * from './interfaces/base.state.machine.index';
|
|
11
|
-
export * from './interfaces/core.access.index';
|
|
12
|
-
export * from './interfaces/core.security.index';
|
|
13
|
-
export * from './interfaces/core.execution.index';
|
|
14
|
-
export * from './interfaces/lib.index';
|
|
15
|
-
export * from './interfaces/definition.index';
|
|
16
|
-
export { RUNTIME_RBAC_FUNCTION_SELECTORS, RUNTIME_RBAC_OPERATION_TYPES, RoleConfigActionType } from './types/core.access.index';
|
|
17
|
-
export type { RoleConfigAction } from './types/core.access.index';
|
|
18
|
-
export { OPERATION_TYPES } from './types/core.security.index';
|
|
19
|
-
export type { OperationType } from './types/core.security.index';
|
|
20
|
-
export { GUARD_CONTROLLER_FUNCTION_SELECTORS, GUARD_CONTROLLER_OPERATION_TYPES, GuardConfigActionType } from './types/core.execution.index';
|
|
21
|
-
export type { GuardConfigAction } 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
|
|
26
|
-
export * from './utils/
|
|
27
|
-
export * from './utils/
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export * from './utils/
|
|
1
|
+
export { default as BaseStateMachine } from './contracts/core/BaseStateMachine.js';
|
|
2
|
+
export { default as SecureOwnable } from './contracts/core/SecureOwnable.js';
|
|
3
|
+
export { default as RuntimeRBAC } from './contracts/core/RuntimeRBAC.js';
|
|
4
|
+
export { default as GuardController } from './contracts/core/GuardController.js';
|
|
5
|
+
export { Definitions } from './lib/Definition.js';
|
|
6
|
+
export { EngineBlox } from './lib/EngineBlox.js';
|
|
7
|
+
export { updateRecoveryExecutionParams, updateTimeLockExecutionParams, roleConfigBatchExecutionParams, guardConfigBatchExecutionParams, getRoleConfigActionSpecs, encodeCreateRole, encodeRemoveRole, encodeAddWallet, encodeRevokeWallet, encodeAddFunctionToRole, encodeRemoveFunctionFromRole, getGuardConfigActionSpecs, encodeAddTargetToWhitelist, encodeRemoveTargetFromWhitelist, encodeRegisterFunction, encodeUnregisterFunction } from './lib/definitions/index.js';
|
|
8
|
+
export type { FunctionPermissionForEncoding } from './lib/definitions/index.js';
|
|
9
|
+
export * from './interfaces/base.index.js';
|
|
10
|
+
export * from './interfaces/base.state.machine.index.js';
|
|
11
|
+
export * from './interfaces/core.access.index.js';
|
|
12
|
+
export * from './interfaces/core.security.index.js';
|
|
13
|
+
export * from './interfaces/core.execution.index.js';
|
|
14
|
+
export * from './interfaces/lib.index.js';
|
|
15
|
+
export * from './interfaces/definition.index.js';
|
|
16
|
+
export { RUNTIME_RBAC_FUNCTION_SELECTORS, RUNTIME_RBAC_OPERATION_TYPES, RoleConfigActionType } from './types/core.access.index.js';
|
|
17
|
+
export type { RoleConfigAction } from './types/core.access.index.js';
|
|
18
|
+
export { OPERATION_TYPES, FUNCTION_SELECTORS as SECURITY_FUNCTION_SELECTORS } from './types/core.security.index.js';
|
|
19
|
+
export type { OperationType, FunctionSelector as SecurityFunctionSelector } from './types/core.security.index.js';
|
|
20
|
+
export { GUARD_CONTROLLER_FUNCTION_SELECTORS, GUARD_CONTROLLER_OPERATION_TYPES, GuardConfigActionType } from './types/core.execution.index.js';
|
|
21
|
+
export type { GuardConfigAction } from './types/core.execution.index.js';
|
|
22
|
+
export * from './types/base.state.machine.index.js';
|
|
23
|
+
export * from './types/lib.index.js';
|
|
24
|
+
export * from './types/definition.index.js';
|
|
25
|
+
export { ENGINE_BLOX_META_TRANSACTION_PARAM, ENGINE_BLOX_META_TX_PARAMS, metaTxHandlerSignature } from './types/meta-tx-signatures.js';
|
|
26
|
+
export * from './utils/bitmap.js';
|
|
27
|
+
export * from './utils/validations.js';
|
|
28
|
+
export * from './utils/erc20/erc20Token.js';
|
|
29
|
+
export { MetaTransactionSigner, MetaTransactionBuilder } from './utils/metaTx/metaTransaction.js';
|
|
30
|
+
export * from './utils/contract-errors.js';
|
|
31
|
+
export * from './utils/viem-error-handler.js';
|
|
32
|
+
export { INTERFACE_IDS, ComponentDetection, supportsInterface, } from './utils/interface-ids.js';
|
|
31
33
|
export type { Address, Hex, PublicClient, WalletClient, Chain } from 'viem';
|
|
32
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI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O,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,+BAA+B,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAClG,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAGlC,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
// Bloxchain Protocol TypeScript SDK
|
|
2
2
|
// Main entry point for all SDK functionality
|
|
3
3
|
// Core Classes
|
|
4
|
-
export { default as BaseStateMachine } from './contracts/core/BaseStateMachine';
|
|
5
|
-
export { default as SecureOwnable } from './contracts/core/SecureOwnable';
|
|
6
|
-
export { default as RuntimeRBAC } from './contracts/core/RuntimeRBAC';
|
|
7
|
-
export { default as GuardController } from './contracts/core/GuardController';
|
|
8
|
-
export { Definitions } from './lib/Definition';
|
|
9
|
-
export { EngineBlox } from './lib/EngineBlox';
|
|
10
|
-
export { updateRecoveryExecutionParams, updateTimeLockExecutionParams, roleConfigBatchExecutionParams, guardConfigBatchExecutionParams, getRoleConfigActionSpecs, encodeCreateRole, encodeRemoveRole, encodeAddWallet, encodeRevokeWallet, encodeAddFunctionToRole, encodeRemoveFunctionFromRole, getGuardConfigActionSpecs, encodeAddTargetToWhitelist, encodeRemoveTargetFromWhitelist, encodeRegisterFunction, encodeUnregisterFunction } from './lib/definitions';
|
|
4
|
+
export { default as BaseStateMachine } from './contracts/core/BaseStateMachine.js';
|
|
5
|
+
export { default as SecureOwnable } from './contracts/core/SecureOwnable.js';
|
|
6
|
+
export { default as RuntimeRBAC } from './contracts/core/RuntimeRBAC.js';
|
|
7
|
+
export { default as GuardController } from './contracts/core/GuardController.js';
|
|
8
|
+
export { Definitions } from './lib/Definition.js';
|
|
9
|
+
export { EngineBlox } from './lib/EngineBlox.js';
|
|
10
|
+
export { updateRecoveryExecutionParams, updateTimeLockExecutionParams, roleConfigBatchExecutionParams, guardConfigBatchExecutionParams, getRoleConfigActionSpecs, encodeCreateRole, encodeRemoveRole, encodeAddWallet, encodeRevokeWallet, encodeAddFunctionToRole, encodeRemoveFunctionFromRole, getGuardConfigActionSpecs, encodeAddTargetToWhitelist, encodeRemoveTargetFromWhitelist, encodeRegisterFunction, encodeUnregisterFunction } from './lib/definitions/index.js';
|
|
11
11
|
// Interfaces
|
|
12
|
-
export * from './interfaces/base.index';
|
|
13
|
-
export * from './interfaces/base.state.machine.index';
|
|
14
|
-
export * from './interfaces/core.access.index';
|
|
15
|
-
export * from './interfaces/core.security.index';
|
|
16
|
-
export * from './interfaces/core.execution.index';
|
|
17
|
-
export * from './interfaces/lib.index';
|
|
18
|
-
export * from './interfaces/definition.index';
|
|
12
|
+
export * from './interfaces/base.index.js';
|
|
13
|
+
export * from './interfaces/base.state.machine.index.js';
|
|
14
|
+
export * from './interfaces/core.access.index.js';
|
|
15
|
+
export * from './interfaces/core.security.index.js';
|
|
16
|
+
export * from './interfaces/core.execution.index.js';
|
|
17
|
+
export * from './interfaces/lib.index.js';
|
|
18
|
+
export * from './interfaces/definition.index.js';
|
|
19
19
|
// Types and Constants
|
|
20
|
-
export { RUNTIME_RBAC_FUNCTION_SELECTORS, RUNTIME_RBAC_OPERATION_TYPES, RoleConfigActionType } from './types/core.access.index';
|
|
21
|
-
export { OPERATION_TYPES } from './types/core.security.index';
|
|
22
|
-
export { GUARD_CONTROLLER_FUNCTION_SELECTORS, GUARD_CONTROLLER_OPERATION_TYPES, GuardConfigActionType } from './types/core.execution.index';
|
|
23
|
-
export * from './types/base.state.machine.index';
|
|
24
|
-
export * from './types/lib.index';
|
|
25
|
-
export * from './types/definition.index';
|
|
26
|
-
export
|
|
20
|
+
export { RUNTIME_RBAC_FUNCTION_SELECTORS, RUNTIME_RBAC_OPERATION_TYPES, RoleConfigActionType } from './types/core.access.index.js';
|
|
21
|
+
export { OPERATION_TYPES, FUNCTION_SELECTORS as SECURITY_FUNCTION_SELECTORS } from './types/core.security.index.js';
|
|
22
|
+
export { GUARD_CONTROLLER_FUNCTION_SELECTORS, GUARD_CONTROLLER_OPERATION_TYPES, GuardConfigActionType } from './types/core.execution.index.js';
|
|
23
|
+
export * from './types/base.state.machine.index.js';
|
|
24
|
+
export * from './types/lib.index.js';
|
|
25
|
+
export * from './types/definition.index.js';
|
|
26
|
+
export { ENGINE_BLOX_META_TRANSACTION_PARAM, ENGINE_BLOX_META_TX_PARAMS, metaTxHandlerSignature } from './types/meta-tx-signatures.js';
|
|
27
|
+
export * from './utils/bitmap.js';
|
|
27
28
|
// Utilities
|
|
28
|
-
export * from './utils/validations';
|
|
29
|
-
export * from './utils/erc20/erc20Token';
|
|
30
|
-
export { MetaTransactionSigner, MetaTransactionBuilder } from './utils/metaTx/metaTransaction';
|
|
31
|
-
export * from './utils/contract-errors';
|
|
32
|
-
export * from './utils/viem-error-handler';
|
|
29
|
+
export * from './utils/validations.js';
|
|
30
|
+
export * from './utils/erc20/erc20Token.js';
|
|
31
|
+
export { MetaTransactionSigner, MetaTransactionBuilder } from './utils/metaTx/metaTransaction.js';
|
|
32
|
+
export * from './utils/contract-errors.js';
|
|
33
|
+
export * from './utils/viem-error-handler.js';
|
|
34
|
+
export { INTERFACE_IDS, ComponentDetection, supportsInterface, } from './utils/interface-ids.js';
|
|
33
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,6CAA6C;AAE7C,eAAe;AACf,OAAO,EAAE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AAEzC,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,+BAA+B,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAElC,YAAY;AACZ,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAClG,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC"}
|
|
@@ -11,8 +11,16 @@ export interface TransactionResult {
|
|
|
11
11
|
}
|
|
12
12
|
export interface TransactionOptions {
|
|
13
13
|
from: Address;
|
|
14
|
-
gas?: number;
|
|
15
|
-
|
|
14
|
+
gas?: number | bigint | string;
|
|
15
|
+
/** Max fee per gas (EIP-1559) in wei. Prefer bigint; string must be a non-negative integer. */
|
|
16
|
+
gasPrice?: string | bigint;
|
|
16
17
|
value?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Controls how pre-flight simulation (eth_call) is handled before sending a write transaction.
|
|
20
|
+
* - 'strict' (default): simulation must succeed or the write is aborted.
|
|
21
|
+
* - 'warn-only': log simulation failures and still send the transaction.
|
|
22
|
+
* - 'skip': skip simulation entirely and send the transaction directly.
|
|
23
|
+
*/
|
|
24
|
+
simulationMode?: 'strict' | 'warn-only' | 'skip';
|
|
17
25
|
}
|
|
18
26
|
//# sourceMappingURL=base.index.d.ts.map
|
|
@@ -1 +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;
|
|
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,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC;CAClD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Address, Hex } from 'viem';
|
|
2
|
-
import { TxRecord, MetaTransaction, MetaTxParams } from './lib.index';
|
|
3
|
-
import { TxAction } from '../types/lib.index';
|
|
4
|
-
import { FunctionSchema } from '../types/definition.index';
|
|
2
|
+
import { TxRecord, MetaTransaction, MetaTxParams } from './lib.index.js';
|
|
3
|
+
import { TxAction } from '../types/lib.index.js';
|
|
4
|
+
import { FunctionSchema } from '../types/definition.index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Interface for BaseStateMachine contract events
|
|
7
7
|
*/
|
|
@@ -56,10 +56,8 @@ export interface IBaseStateMachine {
|
|
|
56
56
|
}>;
|
|
57
57
|
hasRole(roleHash: Hex, wallet: Address): Promise<boolean>;
|
|
58
58
|
getWalletRoles(wallet: Address): Promise<Hex[]>;
|
|
59
|
-
|
|
60
|
-
functionSchemaExists(functionSelector: Hex): Promise<boolean>;
|
|
59
|
+
getAuthorizedWallets(roleHash: Hex): Promise<Address[]>;
|
|
61
60
|
getFunctionSchema(functionSelector: Hex): Promise<FunctionSchema>;
|
|
62
|
-
isActionSupportedByFunction(functionSelector: Hex, action: TxAction): Promise<boolean>;
|
|
63
61
|
getActiveRolePermissions(roleHash: Hex): Promise<any[]>;
|
|
64
62
|
getSignerNonce(signer: Address): Promise<bigint>;
|
|
65
63
|
getSupportedOperationTypes(): Promise<Hex[]>;
|
|
@@ -1 +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,
|
|
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,gBAAgB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC;IACnB,WAAW,EAAE,MAAM,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OAAO,CAAC,CAAC;IAC1B,eAAe,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACtC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAGhC,iBAAiB,CAAC,WAAW,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvD"}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { Address, Hex } from 'viem';
|
|
2
|
-
import { TransactionResult, TransactionOptions } from './base.index';
|
|
3
|
-
import { MetaTransaction } from './lib.index';
|
|
4
|
-
import type { RoleConfigAction } from '../types/core.access.index';
|
|
2
|
+
import { TransactionResult, TransactionOptions } from './base.index.js';
|
|
3
|
+
import { MetaTransaction } from './lib.index.js';
|
|
5
4
|
/**
|
|
6
5
|
* Interface for RuntimeRBAC contract methods
|
|
7
6
|
* Note: This interface matches the actual contract methods. Some convenience methods
|
|
8
7
|
* may be provided but are not part of the core contract interface.
|
|
9
8
|
*/
|
|
10
9
|
export interface IRuntimeRBAC {
|
|
11
|
-
/**
|
|
12
|
-
* @dev Creates execution params for a RBAC configuration batch (definition helper; no contract call)
|
|
13
|
-
*/
|
|
14
|
-
roleConfigBatchExecutionParams(actions: RoleConfigAction[]): Hex;
|
|
15
10
|
/**
|
|
16
11
|
* @dev Requests and approves a RBAC configuration batch using a meta-transaction
|
|
17
12
|
*/
|
|
18
13
|
roleConfigBatchRequestAndApprove(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
19
14
|
/**
|
|
20
|
-
* @dev Gets all authorized wallets for a role
|
|
15
|
+
* @dev Gets all authorized wallets for a role (inherited from BaseStateMachine)
|
|
21
16
|
* @param roleHash The role hash to get wallets for
|
|
22
17
|
* @return Array of authorized wallet addresses
|
|
23
18
|
*/
|
|
24
|
-
|
|
19
|
+
getAuthorizedWallets(roleHash: Hex): Promise<Address[]>;
|
|
25
20
|
}
|
|
26
21
|
//# sourceMappingURL=core.access.index.d.ts.map
|
|
@@ -1 +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,
|
|
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,iBAAiB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,gCAAgC,CAC9B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE9B;;;;OAIG;IACH,oBAAoB,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CACzD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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';
|
|
2
|
+
import { TransactionResult, TransactionOptions } from './base.index.js';
|
|
3
|
+
import { MetaTransaction } from './lib.index.js';
|
|
4
|
+
import { IBaseStateMachine } from './base.state.machine.index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Interface for GuardController contract methods
|
|
7
7
|
* @notice GuardController extends BaseStateMachine and provides execution workflows
|
|
@@ -10,20 +10,17 @@ import { IBaseStateMachine } from './base.state.machine.index';
|
|
|
10
10
|
export interface IGuardController extends IBaseStateMachine {
|
|
11
11
|
initialize(initialOwner: Address, broadcaster: Address, recovery: Address, timeLockPeriodSec: bigint, eventForwarder: Address, options: TransactionOptions): Promise<TransactionResult>;
|
|
12
12
|
executeWithTimeLock(target: Address, value: bigint, functionSelector: Hex, params: Hex, gasLimit: bigint, operationType: Hex, options: TransactionOptions): Promise<TransactionResult>;
|
|
13
|
+
executeWithPayment(target: Address, value: bigint, functionSelector: Hex, params: Hex, gasLimit: bigint, operationType: Hex, paymentDetails: {
|
|
14
|
+
recipient: Address;
|
|
15
|
+
nativeTokenAmount: bigint;
|
|
16
|
+
erc20TokenAddress: Address;
|
|
17
|
+
erc20TokenAmount: bigint;
|
|
18
|
+
}, options: TransactionOptions): Promise<TransactionResult>;
|
|
13
19
|
approveTimeLockExecution(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
|
|
14
20
|
cancelTimeLockExecution(txId: bigint, options: TransactionOptions): Promise<TransactionResult>;
|
|
15
21
|
approveTimeLockExecutionWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
16
22
|
cancelTimeLockExecutionWithMetaTx(metaTx: MetaTransaction, options: TransactionOptions): Promise<TransactionResult>;
|
|
17
23
|
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
24
|
/**
|
|
28
25
|
* @dev Requests and approves a guard configuration batch using a meta-transaction
|
|
29
26
|
* @param metaTx The meta-transaction describing the guard configuration batch
|
|
@@ -1 +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,
|
|
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,iBAAiB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;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,kBAAkB,CAChB,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,GAAG,EACrB,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,GAAG,EAClB,cAAc,EAAE;QACd,SAAS,EAAE,OAAO,CAAC;QACnB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,iBAAiB,EAAE,OAAO,CAAC;QAC3B,gBAAgB,EA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