@suigar/sdk 2.0.0-beta.1 → 2.0.0-beta.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,128 @@
1
1
  # @suigar/sdk
2
2
 
3
+ ## 2.0.0-beta.11
4
+
5
+ ### Patch Changes
6
+
7
+ - c7685d2: Add `client.suigar.getGameParameters(game, options?)` for reading live onchain game parameter objects, such as min/max stake and game-specific config bounds, directly from SweetHouse settings.
8
+
9
+ The lookup first reads the selected game's settings object from SweetHouse, then reads that game's coin-specific `Parameters<T>` object, parses it with the correct return type for the requested game, and caches the result for SDK integrations that need to display or validate current game limits without repeatedly querying the same onchain objects.
10
+
11
+ This update also broadens the public numeric helpers in `@suigar/sdk/utils`: `toBigInt()` accepts booleans and non-negative integer strings in addition to numbers and `bigint`, `toU8()` accepts plain integer strings such as `'1'` for parsed config ids and other `u8` values, and `toU16()` provides the same validation pattern for `u16` values.
12
+
13
+ ## 2.0.0-beta.10
14
+
15
+ ### Patch Changes
16
+
17
+ - 4b59c7b: Remove the `client.suigar.resolvePvPConflipGame()` client method. Use the exported generated helper `client.suigar.bcs.PvPCoinflipGame.get({ client, objectId })` for one specific live PvP coinflip game object instead.
18
+
19
+ Add `parseCoinType` to `@suigar/sdk/utils` for extracting normalized coin types from generic Move object type strings.
20
+
21
+ - 4b59c7b: Move the SDK into the `packages/sdk` pnpm workspace while keeping the public package API unchanged.
22
+
23
+ ## 2.0.0-beta.9
24
+
25
+ ### Patch Changes
26
+
27
+ - eaf8b3a: Fix metadata encoding so partner metadata is only added when configured and hex metadata values are encoded consistently as bytes. Improve supported-coin and price-info resolution error handling for transaction configuration.
28
+ - 9929e05: Refine Move parser helpers by simplifying BCS type usage, normalizing missing
29
+ `i64` and float mantissa values to `0`, and documenting the numeric conversion
30
+ behavior in `fromMoveI64` and `fromMoveFloat`.
31
+
32
+ ## 2.0.0-beta.8
33
+
34
+ ### Patch Changes
35
+
36
+ - 0292edb: Rename transaction builder option `owner` to `playerAddress` and remove the separate `sender` option so all game transactions use a single explicit player address.
37
+ - 20311be: Improve the public JSDoc for `parseGameDetails`, `toBigInt`, and `toU8` so the
38
+ generated API surface explains their coercion, validation, and decoding
39
+ behavior more clearly.
40
+ - a2aa324: Update PvP coinflip lookup helpers to use bulk object reads for unresolved lobby discovery and support forwarded lookup options.
41
+ - Make `getPvPCoinflipGames()` parse bulk `client.core.getObjects()` results instead of resolving each game individually.
42
+ - Skip per-object fetch or parse failures by default and continue supporting strict rejection with `throwOnError: true`.
43
+ - Forward supported lookup options such as `signal` through `getPvPCoinflipGames()` and `resolvePvPConflipGame(gameId, options?)`.
44
+ - Update tests, README guidance, and repo-local PvP skill documentation to match the current client behavior.
45
+
46
+ ## 2.0.0-beta.7
47
+
48
+ ### Patch Changes
49
+
50
+ - f0ea104: Align numeric utility names, Move decoding helpers, and PvP BCS event helper references with the current SDK API.
51
+
52
+ ## 2.0.0-beta.6
53
+
54
+ ### Patch Changes
55
+
56
+ - ef6bcd4: Rename getPvPCoinflipGames option from rejectOnError to throwOnError.
57
+
58
+ ## 2.0.0-beta.5
59
+
60
+ ### Patch Changes
61
+
62
+ - bf98e0a: Update PvP coinflip registry lookups so `getPvPCoinflipGames()` can skip
63
+ individual game resolution failures by default while still supporting
64
+ `rejectOnError: true` for strict rejection.
65
+ - Document the `rejectOnError` behavior in the public JSDoc and README examples.
66
+ - Clarify repo guidance and skill documentation to distinguish general PvP game
67
+ guidance from the current PvP coinflip-specific runtime surface.
68
+
69
+ ## 2.0.0-beta.4
70
+
71
+ ### Patch Changes
72
+
73
+ - 6daa819: Add BCS parser helpers and a Next.js game integration example app.
74
+ - expose parser helpers through `@suigar/sdk/utils`
75
+ - add `parseGameDetails` for decoding `BetResultEvent.game_details`
76
+ - document generated BCS event decoding and game detail parsing guidance
77
+ - add a testnet-only `apps/playground` app for standard and PvP Suigar transactions
78
+ - integrate Mysten dApp Kit wallet connection, signing, and execution
79
+ - add live transaction code previews and shared decoded event logging with SDK parser helpers
80
+ - add Suigar-themed responsive UI, supported coin selection, and human-readable stake handling
81
+ - update PvP coinflip join so callers only provide `gameId` and the SDK derives the join stake while using the configured price info object id
82
+
83
+ - b89d0b4: Add a public `@suigar/sdk/games` export subpath for shared game option types, and export `SuigarClient` from the package root.
84
+ - bf1f71b: Add `registryIds` to `SuigarConfig` and resolve it from the network config registry map.
85
+
86
+ Document the PvP coinflip runtime helpers more clearly by describing
87
+ registry-backed unresolved game discovery through `getPvPCoinflipGames()` and
88
+ the normalized live-game lookup behavior of `resolvePvPConflipGame()`.
89
+
90
+ - 4861f55: Add public utility exports for shared scaling constants in `@suigar/sdk/utils`, including `RANGE_POINT_LIMIT` and `DEFAULT_RANGE_SCALE`. Update the SDK example app and documentation to use the exported constants and document limbo/range scaling behavior more clearly.
91
+
92
+ ## 2.0.0-beta.3
93
+
94
+ ### Patch Changes
95
+
96
+ - e1cdedc: Improve public transaction builder typings and refresh Sui 2.0+ integration guidance around the gRPC client.
97
+ - Fix exported transaction option types so `BuildGameOptions` and `BuildPvPGameOptions` no longer require the internal `config` field
98
+ - Update installation and integration documentation for Sui 2.0+ by switching examples to `SuiGrpcClient`, clarifying required peer dependencies, and aligning transaction-result examples with the current client API.
99
+
100
+ ## 2.0.0-beta.2
101
+
102
+ ### Patch Changes
103
+
104
+ - 128cb6c: Make SDK configuration network-resolved and expose runtime config inspection through the client extension.
105
+ - `suigar()` now only accepts the extension `name`.
106
+ - The SDK now validates the connected client network and supports `mainnet` and `testnet`.
107
+ - Added `client.suigar.getConfig()` to inspect the resolved network config at runtime.
108
+ - Exported the `SuiNetwork` type and `resolveGamePackageId()` helper.
109
+ - Reworked `SuigarConfig` into a network-resolved structure with `packageIds`, `coinTypes`, and `priceInfoObjectIds`.
110
+ - Replaced the old Pyth-specific price object resolution flow with supported-coin-based `priceInfoObjectId` resolution.
111
+ - Split package and coin configuration into explicit `mainnet` and `testnet` maps and updated transaction builders to use the new structure.
112
+ - Updated generated event helpers, tests, and documentation to match the new configuration and event parsing flow.
113
+
114
+ Notes:
115
+ - Existing prerelease integrations using `suigar({ ...configOverrides })` will need to migrate to `suigar()`.
116
+ - Runtime config inspection should now use `client.suigar.getConfig()`.
117
+
118
+ ## 2.0.0-beta.1
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated the npm release workflows to install dependencies without a committed lockfile and removed the obsolete Node.js cache configuration.
123
+ - Simplified previous-release deprecation logic so prerelease publishes do not attempt to deprecate earlier npm versions.
124
+ - Stopped tracking `package-lock.json` and removed the obsolete changeset file after the version bump.
125
+
3
126
  ## 2.0.0-beta.0
4
127
 
5
128
  ### Major Changes