@bloxchain/contracts 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 (34) hide show
  1. package/README.md +49 -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/contracts/core/access/RuntimeRBAC.sol +344 -0
  19. package/contracts/core/access/interface/IRuntimeRBAC.sol +108 -0
  20. package/contracts/core/access/lib/definitions/RuntimeRBACDefinitions.sol +168 -0
  21. package/contracts/core/base/BaseStateMachine.sol +834 -0
  22. package/contracts/core/base/interface/IBaseStateMachine.sol +153 -0
  23. package/contracts/core/execution/GuardController.sol +507 -0
  24. package/contracts/core/execution/interface/IGuardController.sol +120 -0
  25. package/contracts/core/execution/lib/definitions/GuardControllerDefinitions.sol +401 -0
  26. package/contracts/core/lib/EngineBlox.sol +2283 -0
  27. package/contracts/core/security/SecureOwnable.sol +419 -0
  28. package/contracts/core/security/interface/ISecureOwnable.sol +118 -0
  29. package/contracts/core/security/lib/definitions/SecureOwnableDefinitions.sol +757 -0
  30. package/contracts/interfaces/IDefinition.sol +40 -0
  31. package/contracts/interfaces/IEventForwarder.sol +33 -0
  32. package/contracts/interfaces/IOnActionHook.sol +79 -0
  33. package/contracts/utils/SharedValidation.sol +486 -0
  34. package/package.json +47 -0
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # @bloxchain/contracts
2
+
3
+ Bloxchain Protocol Smart Contracts - State Abstraction for Blockchain Security
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @bloxchain/contracts
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Import contracts in your Solidity files:
14
+
15
+ ```solidity
16
+ import "@bloxchain/contracts/core/base/BaseStateMachine.sol";
17
+ import "@bloxchain/contracts/core/security/SecureOwnable.sol";
18
+ import "@bloxchain/contracts/core/access/RuntimeRBAC.sol";
19
+ import "@bloxchain/contracts/core/execution/GuardController.sol";
20
+ ```
21
+
22
+ ## Contracts
23
+
24
+ ### Core Contracts
25
+ - `BaseStateMachine` - Foundation state machine contract
26
+ - `SecureOwnable` - Multi-role security with time-locked operations
27
+ - `RuntimeRBAC` - Dynamic role-based access control
28
+ - `GuardController` - Execution workflows and time-locked transactions
29
+
30
+ ### Template Contracts
31
+ - `BareBlox` - Minimal base state machine
32
+ - `SecureBlox` - Basic secure ownership
33
+ - `RoleBlox` - Secure ownership + RBAC
34
+ - `ControlBlox` - Complete execution workflows
35
+ - `MachineBlox` - Full-featured with hooks
36
+
37
+ ### Example Contracts
38
+ - `SimpleVault` - Secure asset management
39
+ - `SimpleRWA20` - Tokenized real-world assets
40
+
41
+ ## Dependencies
42
+
43
+ This package requires:
44
+ - `@openzeppelin/contracts`: ^5.4.0
45
+ - `@openzeppelin/contracts-upgradeable`: ^5.4.0
46
+
47
+ ## License
48
+
49
+ MPL-2.0