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