@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.
- package/README.md +338 -0
- package/abi/BareBlox.abi.json +1341 -0
- package/abi/BaseStateMachine.abi.json +1308 -0
- package/abi/ControlBlox.abi.json +6210 -0
- package/abi/EngineBlox.abi.json +872 -0
- package/abi/GuardController.abi.json +3045 -0
- package/abi/IDefinition.abi.json +94 -0
- package/abi/RoleBlox.abi.json +4569 -0
- package/abi/RuntimeRBAC.abi.json +1857 -0
- package/abi/RuntimeRBACDefinitions.abi.json +133 -0
- package/abi/SecureBlox.abi.json +4085 -0
- package/abi/SecureOwnable.abi.json +4085 -0
- package/abi/SecureOwnableDefinitions.abi.json +354 -0
- package/abi/SimpleRWA20.abi.json +5545 -0
- package/abi/SimpleRWA20Definitions.abi.json +172 -0
- package/abi/SimpleVault.abi.json +5208 -0
- package/abi/SimpleVaultDefinitions.abi.json +250 -0
- package/dist/abi/BaseStateMachine.abi.json +1308 -0
- package/dist/abi/GuardController.abi.json +3045 -0
- package/dist/abi/IDefinition.abi.json +94 -0
- package/dist/abi/RuntimeRBAC.abi.json +1857 -0
- package/dist/abi/SecureOwnable.abi.json +4085 -0
- package/dist/contracts/BaseStateMachine.d.ts +83 -0
- package/dist/contracts/BaseStateMachine.d.ts.map +1 -0
- package/dist/contracts/BaseStateMachine.js +251 -0
- package/dist/contracts/BaseStateMachine.js.map +1 -0
- package/dist/contracts/GuardController.d.ts +120 -0
- package/dist/contracts/GuardController.d.ts.map +1 -0
- package/dist/contracts/GuardController.js +149 -0
- package/dist/contracts/GuardController.js.map +1 -0
- package/dist/contracts/RuntimeRBAC.d.ts +56 -0
- package/dist/contracts/RuntimeRBAC.d.ts.map +1 -0
- package/dist/contracts/RuntimeRBAC.js +57 -0
- package/dist/contracts/RuntimeRBAC.js.map +1 -0
- package/dist/contracts/SecureOwnable.d.ts +41 -0
- package/dist/contracts/SecureOwnable.d.ts.map +1 -0
- package/dist/contracts/SecureOwnable.js +82 -0
- package/dist/contracts/SecureOwnable.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/base.index.d.ts +18 -0
- package/dist/interfaces/base.index.d.ts.map +1 -0
- package/dist/interfaces/base.index.js +2 -0
- package/dist/interfaces/base.index.js.map +1 -0
- package/dist/interfaces/base.state.machine.index.d.ts +72 -0
- package/dist/interfaces/base.state.machine.index.d.ts.map +1 -0
- package/dist/interfaces/base.state.machine.index.js +2 -0
- package/dist/interfaces/base.state.machine.index.js.map +1 -0
- package/dist/interfaces/core.access.index.d.ts +37 -0
- package/dist/interfaces/core.access.index.d.ts.map +1 -0
- package/dist/interfaces/core.access.index.js +2 -0
- package/dist/interfaces/core.access.index.js.map +1 -0
- package/dist/interfaces/core.execution.index.d.ts +44 -0
- package/dist/interfaces/core.execution.index.d.ts.map +1 -0
- package/dist/interfaces/core.execution.index.js +2 -0
- package/dist/interfaces/core.execution.index.js.map +1 -0
- package/dist/interfaces/core.security.index.d.ts +83 -0
- package/dist/interfaces/core.security.index.d.ts.map +1 -0
- package/dist/interfaces/core.security.index.js +2 -0
- package/dist/interfaces/core.security.index.js.map +1 -0
- package/dist/interfaces/definition.index.d.ts +38 -0
- package/dist/interfaces/definition.index.d.ts.map +1 -0
- package/dist/interfaces/definition.index.js +2 -0
- package/dist/interfaces/definition.index.js.map +1 -0
- package/dist/interfaces/lib.index.d.ts +83 -0
- package/dist/interfaces/lib.index.d.ts.map +1 -0
- package/dist/interfaces/lib.index.js +2 -0
- package/dist/interfaces/lib.index.js.map +1 -0
- package/dist/lib/Definition.d.ts +84 -0
- package/dist/lib/Definition.d.ts.map +1 -0
- package/dist/lib/Definition.js +159 -0
- package/dist/lib/Definition.js.map +1 -0
- package/dist/lib/EngineBlox.d.ts +167 -0
- package/dist/lib/EngineBlox.d.ts.map +1 -0
- package/dist/lib/EngineBlox.js +266 -0
- package/dist/lib/EngineBlox.js.map +1 -0
- package/dist/types/base.state.machine.index.d.ts +45 -0
- package/dist/types/base.state.machine.index.d.ts.map +1 -0
- package/dist/types/base.state.machine.index.js +49 -0
- package/dist/types/base.state.machine.index.js.map +1 -0
- package/dist/types/core.access.index.d.ts +51 -0
- package/dist/types/core.access.index.d.ts.map +1 -0
- package/dist/types/core.access.index.js +41 -0
- package/dist/types/core.access.index.js.map +1 -0
- package/dist/types/core.execution.index.d.ts +36 -0
- package/dist/types/core.execution.index.d.ts.map +1 -0
- package/dist/types/core.execution.index.js +30 -0
- package/dist/types/core.execution.index.js.map +1 -0
- package/dist/types/core.security.index.d.ts +36 -0
- package/dist/types/core.security.index.d.ts.map +1 -0
- package/dist/types/core.security.index.js +37 -0
- package/dist/types/core.security.index.js.map +1 -0
- package/dist/types/definition.index.d.ts +36 -0
- package/dist/types/definition.index.d.ts.map +1 -0
- package/dist/types/definition.index.js +4 -0
- package/dist/types/definition.index.js.map +1 -0
- package/dist/types/lib.index.d.ts +66 -0
- package/dist/types/lib.index.d.ts.map +1 -0
- package/dist/types/lib.index.js +68 -0
- package/dist/types/lib.index.js.map +1 -0
- package/dist/utils/bitmap.d.ts +75 -0
- package/dist/utils/bitmap.d.ts.map +1 -0
- package/dist/utils/bitmap.js +124 -0
- package/dist/utils/bitmap.js.map +1 -0
- package/dist/utils/contract-errors.d.ts +536 -0
- package/dist/utils/contract-errors.d.ts.map +1 -0
- package/dist/utils/contract-errors.js +412 -0
- package/dist/utils/contract-errors.js.map +1 -0
- package/dist/utils/erc20/ERC20Token.abi.json +217 -0
- package/dist/utils/erc20/erc20Token.d.ts +83 -0
- package/dist/utils/erc20/erc20Token.d.ts.map +1 -0
- package/dist/utils/erc20/erc20Token.js +173 -0
- package/dist/utils/erc20/erc20Token.js.map +1 -0
- package/dist/utils/interface-ids.d.ts +59 -0
- package/dist/utils/interface-ids.d.ts.map +1 -0
- package/dist/utils/interface-ids.js +149 -0
- package/dist/utils/interface-ids.js.map +1 -0
- package/dist/utils/metaTx/metaTransaction.d.ts +138 -0
- package/dist/utils/metaTx/metaTransaction.d.ts.map +1 -0
- package/dist/utils/metaTx/metaTransaction.js +271 -0
- package/dist/utils/metaTx/metaTransaction.js.map +1 -0
- package/dist/utils/validations.d.ts +104 -0
- package/dist/utils/validations.d.ts.map +1 -0
- package/dist/utils/validations.js +254 -0
- package/dist/utils/validations.js.map +1 -0
- package/dist/utils/viem-error-handler.d.ts +48 -0
- package/dist/utils/viem-error-handler.d.ts.map +1 -0
- package/dist/utils/viem-error-handler.js +172 -0
- package/dist/utils/viem-error-handler.js.map +1 -0
- package/package.json +65 -0
package/README.md
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
# Bloxchain Protocol TypeScript SDK
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
## 🏗️ **Unique Architecture**
|
|
6
|
+
|
|
7
|
+
Bloxchain Protocol implements a **state machine architecture** with `SecureOperationState` as the core engine, providing:
|
|
8
|
+
|
|
9
|
+
- **Centralized State Management**: All security operations flow through a unified state machine
|
|
10
|
+
- **Multi-Phase Transaction Processing**: Time-locked operations with request/approval workflows
|
|
11
|
+
- **Dynamic Role-Based Access Control**: Flexible, hierarchical permission system
|
|
12
|
+
- **Meta-Transaction Support**: Gasless transactions and delegated execution
|
|
13
|
+
- **Event-Driven Architecture**: Comprehensive audit trails and external monitoring
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- **SecureOwnable**: Multi-phase ownership management with time-locked operations
|
|
18
|
+
- **RuntimeRBAC**: Runtime role-based access control system with batch configuration
|
|
19
|
+
- **Definitions**: Dynamic interaction with any definition library implementing IDefinition
|
|
20
|
+
- **Guardian**: State abstraction with secure operations
|
|
21
|
+
- **Type Safety**: Full TypeScript support with comprehensive type definitions
|
|
22
|
+
- **Viem Integration**: Built on top of Viem for modern Ethereum development
|
|
23
|
+
|
|
24
|
+
## 📚 Documentation
|
|
25
|
+
|
|
26
|
+
Comprehensive documentation is available in the [`docs/`](./docs/) directory:
|
|
27
|
+
|
|
28
|
+
### **🏗️ Architecture & Design**
|
|
29
|
+
- **[Protocol Architecture](./docs/bloxchain-architecture.md)** - Bloxchain protocol overview and design principles
|
|
30
|
+
- **[State Machine Engine](./docs/state-machine-engine.md)** - SecureOperationState engine and state management
|
|
31
|
+
- **[Architecture Patterns](./docs/architecture-patterns.md)** - Design patterns and best practices
|
|
32
|
+
|
|
33
|
+
### **🚀 Getting Started**
|
|
34
|
+
- **[Getting Started](./docs/getting-started.md)** - Quick setup and basic usage
|
|
35
|
+
- **[API Reference](./docs/api-reference.md)** - Complete API documentation
|
|
36
|
+
- **[SecureOwnable Guide](./docs/secure-ownable.md)** - Ownership management
|
|
37
|
+
- **[RuntimeRBAC Guide](./docs/runtime-rbac.md)** - Role-based access control
|
|
38
|
+
|
|
39
|
+
### **🔍 Development Tools**
|
|
40
|
+
- **[Best Practices](./docs/best-practices.md)** - Development guidelines
|
|
41
|
+
- **[Examples](./docs/examples-basic.md)** - Practical code samples
|
|
42
|
+
- **[Types & Interfaces](./docs/types-interfaces.md)** - Type definitions
|
|
43
|
+
|
|
44
|
+
**📖 [View All Documentation](./docs/README.md)**
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Install the SDK package
|
|
50
|
+
npm install @bloxchain/sdk
|
|
51
|
+
|
|
52
|
+
# Or install from the repository
|
|
53
|
+
npm install https://github.com/PracticalParticle/Bloxchain-Protocol.git#main --save
|
|
54
|
+
|
|
55
|
+
# The SDK requires viem as a peer dependency
|
|
56
|
+
npm install viem
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Quick Start
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
import {
|
|
63
|
+
SecureOwnable,
|
|
64
|
+
RuntimeRBAC,
|
|
65
|
+
GuardController,
|
|
66
|
+
Definitions,
|
|
67
|
+
type Address,
|
|
68
|
+
type PublicClient,
|
|
69
|
+
type WalletClient,
|
|
70
|
+
type Chain
|
|
71
|
+
} from '@bloxchain/sdk';
|
|
72
|
+
|
|
73
|
+
// Initialize clients (using your preferred provider)
|
|
74
|
+
const publicClient: PublicClient = createPublicClient({...});
|
|
75
|
+
const walletClient: WalletClient = createWalletClient({...});
|
|
76
|
+
const chain: Chain = mainnet; // or your target chain
|
|
77
|
+
|
|
78
|
+
// Initialize SDK classes
|
|
79
|
+
const secureOwnable = new SecureOwnable(
|
|
80
|
+
publicClient,
|
|
81
|
+
walletClient,
|
|
82
|
+
contractAddress,
|
|
83
|
+
chain
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
const runtimeRBAC = new RuntimeRBAC(
|
|
87
|
+
publicClient,
|
|
88
|
+
walletClient,
|
|
89
|
+
contractAddress,
|
|
90
|
+
chain
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
const definitions = new Definitions(
|
|
94
|
+
publicClient,
|
|
95
|
+
walletClient,
|
|
96
|
+
definitionsAddress,
|
|
97
|
+
chain
|
|
98
|
+
);
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## SecureOwnable Usage
|
|
102
|
+
|
|
103
|
+
### Ownership Management
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
// Request ownership transfer
|
|
107
|
+
const txResult = await secureOwnable.transferOwnershipRequest({
|
|
108
|
+
from: ownerAddress
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Approve after time lock period
|
|
112
|
+
const approvalResult = await secureOwnable.transferOwnershipDelayedApproval(
|
|
113
|
+
txId,
|
|
114
|
+
{ from: ownerAddress }
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
// Cancel ownership transfer
|
|
118
|
+
const cancelResult = await secureOwnable.transferOwnershipCancellation(
|
|
119
|
+
txId,
|
|
120
|
+
{ from: ownerAddress }
|
|
121
|
+
);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Meta Transactions
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
// Create meta transaction parameters
|
|
128
|
+
const metaTxParams = await secureOwnable.createMetaTxParams(
|
|
129
|
+
handlerContract,
|
|
130
|
+
handlerSelector,
|
|
131
|
+
deadline,
|
|
132
|
+
maxGasPrice,
|
|
133
|
+
signer
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
// Generate unsigned meta transaction
|
|
137
|
+
const metaTx = await secureOwnable.generateUnsignedMetaTransactionForNew(
|
|
138
|
+
requester,
|
|
139
|
+
target,
|
|
140
|
+
value,
|
|
141
|
+
gasLimit,
|
|
142
|
+
operationType,
|
|
143
|
+
executionType,
|
|
144
|
+
executionOptions,
|
|
145
|
+
metaTxParams
|
|
146
|
+
);
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## RuntimeRBAC Usage
|
|
150
|
+
|
|
151
|
+
RuntimeRBAC uses batch-based configuration for all role management operations. See the [RuntimeRBAC Guide](./docs/runtime-rbac.md) for complete examples.
|
|
152
|
+
|
|
153
|
+
### Query Functions
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
// Get role information
|
|
157
|
+
const role = await runtimeRBAC.getRole(roleHash);
|
|
158
|
+
console.log(role.roleName, role.maxWallets, role.isProtected);
|
|
159
|
+
|
|
160
|
+
// Check if wallet has role
|
|
161
|
+
const hasRole = await runtimeRBAC.hasRole(roleHash, walletAddress);
|
|
162
|
+
|
|
163
|
+
// Get wallets in role
|
|
164
|
+
const wallets = await runtimeRBAC.getWalletsInRole(roleHash);
|
|
165
|
+
|
|
166
|
+
// Get roles for a wallet
|
|
167
|
+
const walletRoles = await runtimeRBAC.getWalletRoles(walletAddress);
|
|
168
|
+
|
|
169
|
+
// Get supported roles
|
|
170
|
+
const supportedRoles = await runtimeRBAC.getSupportedRoles();
|
|
171
|
+
|
|
172
|
+
// Get active role permissions
|
|
173
|
+
const permissions = await runtimeRBAC.getActiveRolePermissions(roleHash);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Batch Configuration
|
|
177
|
+
|
|
178
|
+
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.
|
|
179
|
+
|
|
180
|
+
## Definitions Usage
|
|
181
|
+
|
|
182
|
+
The `Definitions` class provides dynamic interaction with any definition library that implements the `IDefinition` interface. This allows you to query operation types, function schemas, role permissions, and workflow definitions from any compatible contract.
|
|
183
|
+
|
|
184
|
+
### Basic Usage
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
// Initialize Definitions
|
|
188
|
+
const definitions = new Definitions(
|
|
189
|
+
publicClient,
|
|
190
|
+
walletClient,
|
|
191
|
+
definitionsAddress,
|
|
192
|
+
chain
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
// Get all operation types
|
|
196
|
+
const operationTypes = await definitions.getOperationTypes();
|
|
197
|
+
console.log('Available operations:', operationTypes);
|
|
198
|
+
|
|
199
|
+
// Get all function schemas
|
|
200
|
+
const functionSchemas = await definitions.getFunctionSchemas();
|
|
201
|
+
console.log('Function schemas:', functionSchemas);
|
|
202
|
+
|
|
203
|
+
// Get role permissions
|
|
204
|
+
const rolePermissions = await definitions.getRolePermissions();
|
|
205
|
+
console.log('Role permissions:', rolePermissions);
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Workflow Management
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
// Get all operation workflows
|
|
212
|
+
const workflows = await definitions.getOperationWorkflows();
|
|
213
|
+
console.log('Available workflows:', workflows);
|
|
214
|
+
|
|
215
|
+
// Get workflow for specific operation
|
|
216
|
+
const operationType = '0x1234...'; // operation type hash
|
|
217
|
+
const workflow = await definitions.getWorkflowForOperation(operationType);
|
|
218
|
+
console.log('Workflow for operation:', workflow);
|
|
219
|
+
|
|
220
|
+
// Get all workflow paths
|
|
221
|
+
const paths = await definitions.getWorkflowPaths();
|
|
222
|
+
console.log('Available paths:', paths);
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Utility Functions
|
|
226
|
+
|
|
227
|
+
```typescript
|
|
228
|
+
// Find operation type by name
|
|
229
|
+
const operationType = await definitions.getOperationTypeByName('TRANSFER_OWNERSHIP');
|
|
230
|
+
console.log('Operation type hash:', operationType);
|
|
231
|
+
|
|
232
|
+
// Get function schema by selector
|
|
233
|
+
const functionSelector = '0xabcd...';
|
|
234
|
+
const schema = await definitions.getFunctionSchemaBySelector(functionSelector);
|
|
235
|
+
console.log('Function schema:', schema);
|
|
236
|
+
|
|
237
|
+
// Check role permission for function
|
|
238
|
+
const roleHash = '0xefgh...';
|
|
239
|
+
const hasPermission = await definitions.hasRolePermission(roleHash, functionSelector);
|
|
240
|
+
console.log('Has permission:', hasPermission);
|
|
241
|
+
|
|
242
|
+
// Get all roles that can execute a function
|
|
243
|
+
const allowedRoles = await definitions.getRolesForFunction(functionSelector);
|
|
244
|
+
console.log('Allowed roles:', allowedRoles);
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Configuration Management
|
|
248
|
+
|
|
249
|
+
```typescript
|
|
250
|
+
// Get current configuration
|
|
251
|
+
const config = definitions.getConfig();
|
|
252
|
+
console.log('Current config:', config);
|
|
253
|
+
|
|
254
|
+
// Update configuration
|
|
255
|
+
definitions.updateConfig({
|
|
256
|
+
chainId: 137, // Polygon
|
|
257
|
+
rpcUrl: 'https://polygon-rpc.com'
|
|
258
|
+
});
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Types and Constants
|
|
262
|
+
|
|
263
|
+
### Transaction Actions
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
import { TxAction } from './types/lib.index';
|
|
267
|
+
|
|
268
|
+
// Available transaction actions
|
|
269
|
+
TxAction.EXECUTE_TIME_DELAY_REQUEST
|
|
270
|
+
TxAction.EXECUTE_TIME_DELAY_APPROVE
|
|
271
|
+
TxAction.EXECUTE_TIME_DELAY_CANCEL
|
|
272
|
+
TxAction.SIGN_META_REQUEST_AND_APPROVE
|
|
273
|
+
TxAction.SIGN_META_APPROVE
|
|
274
|
+
TxAction.SIGN_META_CANCEL
|
|
275
|
+
TxAction.EXECUTE_META_REQUEST_AND_APPROVE
|
|
276
|
+
TxAction.EXECUTE_META_APPROVE
|
|
277
|
+
TxAction.EXECUTE_META_CANCEL
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Execution Types
|
|
281
|
+
|
|
282
|
+
```typescript
|
|
283
|
+
import { ExecutionType } from './types/lib.index';
|
|
284
|
+
|
|
285
|
+
ExecutionType.NONE
|
|
286
|
+
ExecutionType.STANDARD
|
|
287
|
+
ExecutionType.RAW
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Transaction Status
|
|
291
|
+
|
|
292
|
+
```typescript
|
|
293
|
+
import { TxStatus } from './types/lib.index';
|
|
294
|
+
|
|
295
|
+
TxStatus.UNDEFINED
|
|
296
|
+
TxStatus.PENDING
|
|
297
|
+
TxStatus.CANCELLED
|
|
298
|
+
TxStatus.COMPLETED
|
|
299
|
+
TxStatus.FAILED
|
|
300
|
+
TxStatus.REJECTED
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Error Handling
|
|
304
|
+
|
|
305
|
+
All SDK methods throw errors for failed operations. Always wrap SDK calls in try-catch blocks:
|
|
306
|
+
|
|
307
|
+
```typescript
|
|
308
|
+
try {
|
|
309
|
+
const result = await secureOwnable.transferOwnershipRequest({
|
|
310
|
+
from: ownerAddress
|
|
311
|
+
});
|
|
312
|
+
console.log('Transaction successful:', result.hash);
|
|
313
|
+
} catch (error) {
|
|
314
|
+
console.error('Transaction failed:', error);
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## Security Considerations
|
|
319
|
+
|
|
320
|
+
- Always validate addresses and parameters before making transactions
|
|
321
|
+
- Use proper time-lock periods for critical operations
|
|
322
|
+
- Implement proper access control using RuntimeRBAC
|
|
323
|
+
- Monitor transaction status and handle failures appropriately
|
|
324
|
+
- Keep private keys secure and never expose them in client-side code
|
|
325
|
+
|
|
326
|
+
## Contributing
|
|
327
|
+
|
|
328
|
+
When contributing to the SDK:
|
|
329
|
+
|
|
330
|
+
1. Follow TypeScript best practices
|
|
331
|
+
2. Add comprehensive type definitions
|
|
332
|
+
3. Include JSDoc comments for all public methods
|
|
333
|
+
4. Test all new functionality thoroughly
|
|
334
|
+
5. Update this README with new features
|
|
335
|
+
|
|
336
|
+
## License
|
|
337
|
+
|
|
338
|
+
This SDK is part of the Bloxchain Protocol and follows the same licensing terms.
|