@viwoapp/sdk 0.1.2 → 0.1.4

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 (2) hide show
  1. package/README.md +25 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,11 +5,20 @@
5
5
 
6
6
  TypeScript SDK for VCoin Protocol Integration on Solana.
7
7
 
8
- **Version:** 0.1.1 (Security Update)
8
+ **Version:** 0.1.4 (Phase 5 Security Update)
9
+
10
+ ## What's New in v0.1.4
11
+
12
+ - **New Constants:** `MERKLE_PROOF_MAX_SIZE`, `MAX_EPOCH_BITMAP`, `LEGACY_SLASH_DEPRECATED`
13
+ - **New Enum:** `VoteChoice` for typed governance voting (Against, For, Abstain)
14
+ - **Updated Types:** `SlashRequest` (added `requestId`), `UserClaim` (bitmap storage)
15
+ - **Updated Docs:** `buildVoteTransaction` - voting power now verified on-chain
16
+ - **SECURITY_CONSTANTS:** Added `merkleProofMaxSize`, `maxEpochBitmap`, `votingPowerVerifiedOnChain`
17
+ - **Full README:** Complete usage documentation for all modules
9
18
 
10
19
  ## What's New in v0.1.1
11
20
 
12
- - Added security types for Phase 1-4 audit fixes
21
+ - Added security types for Phase 1-4 fixes
13
22
  - New types: `SlashRequest`, `DecryptionShare`, `PendingScoreUpdate`
14
23
  - All config types now support two-step authority transfer
15
24
  - Added `SECURITY_CONSTANTS` for timelocks and limits
@@ -243,18 +252,25 @@ import {
243
252
  FIVE_A_CONSTANTS,
244
253
  GOVERNANCE_CONSTANTS,
245
254
  CONTENT_CONSTANTS,
246
- // Security constants (v0.1.1)
255
+ // Security constants
247
256
  SECURITY_CONSTANTS,
248
257
  VALID_URI_PREFIXES,
249
258
  MERKLE_CONSTANTS,
259
+ // v0.1.4 additions
260
+ MERKLE_PROOF_MAX_SIZE, // 32 - prevents DoS
261
+ MAX_EPOCH_BITMAP, // 1023 - max epoch with bitmap
262
+ LEGACY_SLASH_DEPRECATED, // true - use propose_slash flow
250
263
  } from "@viwoapp/sdk";
251
264
 
252
265
  // Security constants
253
- SECURITY_CONSTANTS.authorityTransferTimelock; // 24 hours
254
- SECURITY_CONSTANTS.slashApprovalTimelock; // 48 hours
255
- SECURITY_CONSTANTS.maxFeeSlippageBps; // 500 (5%)
256
- SECURITY_CONSTANTS.oracleConsensusRequired; // 3-of-N
257
- SECURITY_CONSTANTS.circuitBreakerCooldown; // 6 hours
266
+ SECURITY_CONSTANTS.authorityTransferTimelock; // 24 hours
267
+ SECURITY_CONSTANTS.slashApprovalTimelock; // 48 hours
268
+ SECURITY_CONSTANTS.maxFeeSlippageBps; // 500 (5%)
269
+ SECURITY_CONSTANTS.oracleConsensusRequired; // 3-of-N
270
+ SECURITY_CONSTANTS.circuitBreakerCooldown; // 6 hours
271
+ SECURITY_CONSTANTS.merkleProofMaxSize; // 32 (v0.1.4)
272
+ SECURITY_CONSTANTS.maxEpochBitmap; // 1023 (v0.1.4)
273
+ SECURITY_CONSTANTS.votingPowerVerifiedOnChain; // true (v0.1.4)
258
274
  ```
259
275
 
260
276
  ## Types
@@ -271,6 +287,7 @@ import type {
271
287
  Proposal,
272
288
  VoteRecord,
273
289
  ProposalStatus,
290
+ VoteChoice, // v0.1.4: Against, For, Abstain
274
291
  GovernanceConfig,
275
292
  Delegation,
276
293
  PrivateVotingConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viwoapp/sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "ViWoApp SDK - TypeScript SDK for VCoin Protocol Integration",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",