@bloxchain/sdk 1.0.0-alpha.20 → 1.0.0-alpha.22
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/README.md +22 -22
- package/abi/AccountBlox.abi.json +1886 -1837
- package/abi/BaseStateMachine.abi.json +780 -775
- package/abi/CopyBlox.abi.json +825 -809
- package/abi/EngineBlox.abi.json +545 -538
- package/abi/GuardController.abi.json +1590 -1585
- package/abi/GuardControllerDefinitions.abi.json +231 -226
- package/abi/IDefinition.abi.json +54 -49
- package/abi/RoleBlox.abi.json +2993 -2993
- package/abi/RuntimeRBAC.abi.json +832 -827
- package/abi/RuntimeRBACDefinitions.abi.json +212 -207
- package/abi/SecureBlox.abi.json +2752 -2752
- package/abi/SecureOwnable.abi.json +1359 -1321
- package/abi/SecureOwnableDefinitions.abi.json +171 -166
- package/dist/abi/AccountBlox.abi.json +1886 -1837
- package/dist/abi/BaseStateMachine.abi.json +780 -775
- package/dist/abi/CopyBlox.abi.json +825 -809
- package/dist/abi/EngineBlox.abi.json +545 -538
- package/dist/abi/GuardController.abi.json +1590 -1585
- package/dist/abi/GuardControllerDefinitions.abi.json +231 -226
- package/dist/abi/IDefinition.abi.json +54 -49
- package/dist/abi/RoleBlox.abi.json +2993 -2993
- package/dist/abi/RuntimeRBAC.abi.json +832 -827
- package/dist/abi/RuntimeRBACDefinitions.abi.json +212 -207
- package/dist/abi/SecureBlox.abi.json +2752 -2752
- package/dist/abi/SecureOwnable.abi.json +1359 -1321
- package/dist/abi/SecureOwnableDefinitions.abi.json +171 -166
- package/dist/contracts/core/SecureOwnable.d.ts +1 -1
- package/dist/contracts/core/SecureOwnable.d.ts.map +1 -1
- package/dist/contracts/core/SecureOwnable.js +2 -2
- package/dist/contracts/core/SecureOwnable.js.map +1 -1
- package/dist/interfaces/core.security.index.d.ts +1 -1
- package/dist/interfaces/core.security.index.d.ts.map +1 -1
- package/dist/interfaces/lib.index.d.ts +1 -1
- package/dist/interfaces/lib.index.d.ts.map +1 -1
- package/dist/lib/Definition.d.ts.map +1 -1
- package/dist/lib/Definition.js +1 -0
- package/dist/lib/Definition.js.map +1 -1
- package/dist/lib/EngineBlox.d.ts +4 -5
- package/dist/lib/EngineBlox.d.ts.map +1 -1
- package/dist/lib/EngineBlox.js +9 -5
- package/dist/lib/EngineBlox.js.map +1 -1
- package/dist/types/core.execution.index.js +2 -2
- package/dist/types/core.execution.index.js.map +1 -1
- package/dist/types/core.security.index.d.ts.map +1 -1
- package/dist/types/core.security.index.js +8 -8
- package/dist/types/core.security.index.js.map +1 -1
- package/dist/types/definition.index.d.ts +5 -0
- 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 +0 -1
- package/dist/types/lib.index.d.ts.map +1 -1
- package/dist/types/lib.index.js +1 -2
- 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/utils/contract-errors.d.ts +1 -8
- package/dist/utils/contract-errors.d.ts.map +1 -1
- package/dist/utils/contract-errors.js +0 -5
- package/dist/utils/contract-errors.js.map +1 -1
- package/dist/utils/interface-ids.js +1 -1
- package/dist/utils/validations.d.ts.map +1 -1
- package/dist/utils/validations.js +10 -11
- package/dist/utils/validations.js.map +1 -1
- package/package.json +5 -5
- package/abi/SimpleRWA20.abi.json +0 -4010
- package/abi/SimpleRWA20Definitions.abi.json +0 -196
- package/abi/SimpleVault.abi.json +0 -3385
- package/abi/SimpleVaultDefinitions.abi.json +0 -274
package/README.md
CHANGED
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@bloxchain/sdk)
|
|
4
4
|
[](https://opensource.org/licenses/MPL-2.0)
|
|
5
|
-
[](https://www.typescriptlang.org/)
|
|
6
6
|
[](https://nodejs.org/)
|
|
7
7
|
|
|
8
8
|
A comprehensive TypeScript SDK for interacting with the Bloxchain Protocol smart contracts, providing type-safe interfaces for secure multi-phase operations, dynamic role-based access control, and state abstraction.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
> This package contains experimental smart contract code and SDK support. While the framework is feature-complete and tested, it is not yet audited for production use. Use at your own risk and do not deploy with real assets without proper security review.
|
|
10
|
+
The SDK mirrors the audited core protocol and is intended for production integrations. Pin an exact package version and review release notes before upgrading.
|
|
12
11
|
|
|
13
12
|
## Requirements
|
|
14
13
|
|
|
15
14
|
- **Node.js**: >= 18.0.0
|
|
16
|
-
- **TypeScript**:
|
|
15
|
+
- **TypeScript**: 6.x (recommended)
|
|
17
16
|
- **Peer dependency**: `viem` ^2.0.0 (required for all SDK usage)
|
|
18
17
|
- **Optional peer**: `@bloxchain/contracts` ^1.0.0-alpha (for Solidity/ABI alignment when building apps that use both)
|
|
19
18
|
|
|
@@ -38,25 +37,25 @@ Bloxchain Protocol implements a **state machine architecture** with `SecureOpera
|
|
|
38
37
|
|
|
39
38
|
## 📚 Documentation
|
|
40
39
|
|
|
41
|
-
Comprehensive documentation is available in the [`docs/`](
|
|
40
|
+
Comprehensive documentation is available in the repository root [`docs/`](../../docs/) folder:
|
|
42
41
|
|
|
43
42
|
### **🏗️ Architecture & Design**
|
|
44
|
-
- **[Protocol Architecture](
|
|
45
|
-
- **[State Machine Engine](
|
|
46
|
-
- **[Architecture Patterns](
|
|
43
|
+
- **[Protocol Architecture](../../docs/bloxchain-architecture.md)** - Bloxchain protocol overview and design principles
|
|
44
|
+
- **[State Machine Engine](../../docs/state-machine-engine.md)** - SecureOperationState engine and state management
|
|
45
|
+
- **[Architecture Patterns](../../docs/architecture-patterns.md)** - Design patterns and best practices
|
|
47
46
|
|
|
48
47
|
### **🚀 Getting Started**
|
|
49
|
-
- **[Getting Started](
|
|
50
|
-
- **[API Reference](
|
|
51
|
-
- **[SecureOwnable Guide](
|
|
52
|
-
- **[RuntimeRBAC Guide](
|
|
48
|
+
- **[Getting Started](../../docs/getting-started.md)** - Quick setup and basic usage
|
|
49
|
+
- **[API Reference](../../docs/api-reference.md)** - Complete API documentation
|
|
50
|
+
- **[SecureOwnable Guide](../../docs/secure-ownable.md)** - Ownership management
|
|
51
|
+
- **[RuntimeRBAC Guide](../../docs/runtime-rbac.md)** - Role-based access control
|
|
53
52
|
|
|
54
53
|
### **🔍 Development Tools**
|
|
55
|
-
- **[Best Practices](
|
|
56
|
-
- **[Examples](
|
|
57
|
-
- **[Types & Interfaces](
|
|
54
|
+
- **[Best Practices](../../docs/best-practices.md)** - Development guidelines
|
|
55
|
+
- **[Examples](../../docs/examples-basic.md)** - Practical code samples
|
|
56
|
+
- **[Types & Interfaces](../../docs/types-interfaces.md)** - Type definitions
|
|
58
57
|
|
|
59
|
-
**📖 [View All Documentation](
|
|
58
|
+
**📖 [View All Documentation](../../docs/README.md)**
|
|
60
59
|
|
|
61
60
|
## Installation
|
|
62
61
|
|
|
@@ -166,7 +165,7 @@ const metaTx = await secureOwnable.generateUnsignedMetaTransactionForNew(
|
|
|
166
165
|
|
|
167
166
|
## RuntimeRBAC Usage
|
|
168
167
|
|
|
169
|
-
RuntimeRBAC uses batch-based configuration for all role management operations. See the [RuntimeRBAC Guide](
|
|
168
|
+
RuntimeRBAC uses batch-based configuration for all role management operations. See the [RuntimeRBAC Guide](../../docs/runtime-rbac.md) for complete examples.
|
|
170
169
|
|
|
171
170
|
### Query Functions
|
|
172
171
|
|
|
@@ -193,7 +192,7 @@ const permissions = await runtimeRBAC.getActiveRolePermissions(roleHash);
|
|
|
193
192
|
|
|
194
193
|
### Batch Configuration
|
|
195
194
|
|
|
196
|
-
All role management (create role, add wallet, add permissions, etc.) is done via batch operations. See the [RuntimeRBAC Guide](
|
|
195
|
+
All role management (create role, add wallet, add permissions, etc.) is done via batch operations. See the [RuntimeRBAC Guide](../../docs/runtime-rbac.md) for detailed batch configuration examples.
|
|
197
196
|
|
|
198
197
|
## Definitions Usage
|
|
199
198
|
|
|
@@ -312,10 +311,11 @@ import { TxStatus } from '@bloxchain/sdk';
|
|
|
312
311
|
|
|
313
312
|
TxStatus.UNDEFINED
|
|
314
313
|
TxStatus.PENDING
|
|
314
|
+
TxStatus.EXECUTING
|
|
315
|
+
TxStatus.PROCESSING_PAYMENT
|
|
315
316
|
TxStatus.CANCELLED
|
|
316
317
|
TxStatus.COMPLETED
|
|
317
318
|
TxStatus.FAILED
|
|
318
|
-
TxStatus.REJECTED
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
## Error Handling
|
|
@@ -343,16 +343,16 @@ try {
|
|
|
343
343
|
|
|
344
344
|
## Versioning and stability
|
|
345
345
|
|
|
346
|
-
This package follows [Semantic Versioning](https://semver.org/).
|
|
346
|
+
This package follows [Semantic Versioning](https://semver.org/). Published versions use the **alpha** channel (`1.0.0-alpha.x`) while we finalize the 1.0.0 release line. Pin the exact version in production and review release notes before upgrading.
|
|
347
347
|
|
|
348
348
|
## Security
|
|
349
349
|
|
|
350
350
|
- **Vulnerability reporting**: Do not open public GitHub issues for security vulnerabilities. See the [Security Policy](https://github.com/PracticalParticle/Bloxchain-Protocol/blob/main/SECURITY.md) for reporting instructions (e.g. security@particlecs.com).
|
|
351
|
-
- **Audit status**: The underlying protocol
|
|
351
|
+
- **Audit status**: The underlying core protocol smart contracts have completed an independent security audit. Follow your own deployment, upgrade, and operational review processes before production use.
|
|
352
352
|
|
|
353
353
|
## Support and links
|
|
354
354
|
|
|
355
|
-
- **Documentation**: [SDK
|
|
355
|
+
- **Documentation**: [SDK and protocol guides](../../docs/) in the repository `docs/` folder; [Bloxchain Protocol README](https://github.com/PracticalParticle/Bloxchain-Protocol#readme) for protocol details
|
|
356
356
|
- **Issues and feature requests**: [GitHub Issues](https://github.com/PracticalParticle/Bloxchain-Protocol/issues)
|
|
357
357
|
- **Homepage**: [bloxchain.app](https://bloxchain.app/)
|
|
358
358
|
- **Author**: [Particle Crypto Security](https://particlecs.com/)
|