@suigar/sdk 2.0.0-beta.17 → 2.0.0-beta.19

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 (73) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/client.d.mts +48 -49
  3. package/dist/client.d.mts.map +1 -1
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/configs/package.mainnet.mjs.map +1 -1
  6. package/dist/configs/package.mjs.map +1 -1
  7. package/dist/configs/package.testnet.mjs.map +1 -1
  8. package/dist/configs/registry.mainnet.mjs.map +1 -1
  9. package/dist/configs/registry.mjs.map +1 -1
  10. package/dist/configs/registry.testnet.mjs.map +1 -1
  11. package/dist/contracts/coinflip/coinflip.mjs.map +1 -1
  12. package/dist/contracts/core/core.d.mts +12 -13
  13. package/dist/contracts/core/core.d.mts.map +1 -1
  14. package/dist/contracts/core/core.mjs.map +1 -1
  15. package/dist/contracts/core/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.mjs.map +1 -1
  16. package/dist/contracts/core/deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.mjs.map +1 -1
  17. package/dist/contracts/core/float.d.mts +3 -4
  18. package/dist/contracts/core/float.d.mts.map +1 -1
  19. package/dist/contracts/core/float.mjs.map +1 -1
  20. package/dist/contracts/core/i64.mjs.map +1 -1
  21. package/dist/contracts/limbo/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.mjs.map +1 -1
  22. package/dist/contracts/limbo/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/i64.mjs.map +1 -1
  23. package/dist/contracts/limbo/limbo.mjs.map +1 -1
  24. package/dist/contracts/plinko/deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.mjs.map +1 -1
  25. package/dist/contracts/plinko/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.mjs.map +1 -1
  26. package/dist/contracts/plinko/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/i64.mjs.map +1 -1
  27. package/dist/contracts/plinko/plinko.mjs.map +1 -1
  28. package/dist/contracts/pvp-coinflip/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.mjs.map +1 -1
  29. package/dist/contracts/pvp-coinflip/deps/0x0000000000000000000000000000000000000000000000000000000000000002/balance.mjs.map +1 -1
  30. package/dist/contracts/pvp-coinflip/deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.mjs.map +1 -1
  31. package/dist/contracts/pvp-coinflip/pvp_coinflip.d.mts +10 -11
  32. package/dist/contracts/pvp-coinflip/pvp_coinflip.d.mts.map +1 -1
  33. package/dist/contracts/pvp-coinflip/pvp_coinflip.mjs.map +1 -1
  34. package/dist/contracts/range/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.mjs.map +1 -1
  35. package/dist/contracts/range/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/i64.mjs.map +1 -1
  36. package/dist/contracts/range/range.mjs.map +1 -1
  37. package/dist/contracts/utils/index.mjs.map +1 -1
  38. package/dist/contracts/wheel/deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.mjs.map +1 -1
  39. package/dist/contracts/wheel/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.mjs.map +1 -1
  40. package/dist/contracts/wheel/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/i64.mjs.map +1 -1
  41. package/dist/contracts/wheel/wheel.mjs.map +1 -1
  42. package/dist/games.d.mts +1 -1
  43. package/dist/helpers/config.mjs.map +1 -1
  44. package/dist/helpers/game-settings.mjs.map +1 -1
  45. package/dist/helpers/metadata.mjs.map +1 -1
  46. package/dist/transactions/coinflip.mjs.map +1 -1
  47. package/dist/transactions/limbo.mjs.map +1 -1
  48. package/dist/transactions/plinko.mjs.map +1 -1
  49. package/dist/transactions/pvp-coinflip.mjs.map +1 -1
  50. package/dist/transactions/range.mjs.map +1 -1
  51. package/dist/transactions/shared.mjs.map +1 -1
  52. package/dist/transactions/wheel.mjs.map +1 -1
  53. package/dist/ttl-cache.mjs.map +1 -1
  54. package/dist/types/bet-metadata.type.d.mts.map +1 -1
  55. package/dist/types/build-game-transaction-options.type.d.mts.map +1 -1
  56. package/dist/types/game-details.type.d.mts +7 -8
  57. package/dist/types/game-details.type.d.mts.map +1 -1
  58. package/dist/types/game-details.type.mjs.map +1 -1
  59. package/dist/types/game-settings.type.d.mts +52 -53
  60. package/dist/types/game-settings.type.d.mts.map +1 -1
  61. package/dist/types/game-settings.type.mjs.map +1 -1
  62. package/dist/types/game.type.d.mts.map +1 -1
  63. package/dist/types/game.type.mjs.map +1 -1
  64. package/dist/types/move-float.type.d.mts.map +1 -1
  65. package/dist/types/network.type.mjs.map +1 -1
  66. package/dist/types/suigar-config.type.d.mts.map +1 -1
  67. package/dist/types/transaction-options.type.d.mts.map +1 -1
  68. package/dist/utils/constants.mjs.map +1 -1
  69. package/dist/utils/numeric.d.mts.map +1 -1
  70. package/dist/utils/numeric.mjs.map +1 -1
  71. package/dist/utils/parser.d.mts.map +1 -1
  72. package/dist/utils/parser.mjs.map +1 -1
  73. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @suigar/sdk
2
2
 
3
+ ## 2.0.0-beta.19
4
+
5
+ ### Minor Changes
6
+
7
+ - 10f49e2: Bump the SDK's `@mysten/sui` dependency to the latest shared workspace minor
8
+ release and align the package metadata and lockfile with that update.
9
+
10
+ ## 2.0.0-beta.18
11
+
12
+ ### Patch Changes
13
+
14
+ - de9e425: Update SDK dependency metadata to use the shared Mysten and TypeScript pnpm catalogs, including the `@mysten/sui` and `tsx` dependency updates.
15
+
3
16
  ## 2.0.0-beta.17
4
17
 
5
18
  ### Major Changes
package/dist/client.d.mts CHANGED
@@ -7,7 +7,6 @@ import { BuildGameOptions } from "./types/build-game-transaction-options.type.mj
7
7
  import { GameParameters, GetGameParametersOptions } from "./types/game-settings.type.mjs";
8
8
  import { BuildTransactionOptions, Transaction } from "@mysten/sui/transactions";
9
9
  import { ClientWithCoreApi, SuiClientTypes } from "@mysten/sui/client";
10
- import * as _$_mysten_bcs0 from "@mysten/bcs";
11
10
  import { InferBcsType } from "@mysten/bcs";
12
11
 
13
12
  //#region src/client.d.ts
@@ -107,12 +106,12 @@ declare class SuigarClient {
107
106
  * Object representing the state of a PvP coinflip game, as stored on-chain.
108
107
  */
109
108
  PvPCoinflipGame: MoveStruct<{
110
- id: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
111
- creator: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
112
- creator_is_tails: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
113
- is_private: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
109
+ id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
110
+ creator: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
111
+ creator_is_tails: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
112
+ is_private: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
114
113
  creator_metadata: MoveStruct<{
115
- contents: _$_mysten_bcs0.BcsType<{
114
+ contents: import("@mysten/bcs").BcsType<{
116
115
  key: string;
117
116
  value: number[];
118
117
  }[], Iterable<{
@@ -124,40 +123,40 @@ declare class SuigarClient {
124
123
  length: number;
125
124
  }, string>;
126
125
  }, "0x2::vec_map::VecMap<string, vector<u8>>">;
127
- joiner: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
128
- winner: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
129
- stake_per_player: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
130
- house_edge_bps: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
126
+ joiner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
127
+ winner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
128
+ stake_per_player: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
129
+ house_edge_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
131
130
  stake_pot: MoveStruct<{
132
- value: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
131
+ value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
133
132
  }, "0x2::balance::Balance<phantom T0>">;
134
133
  }, "0xb43cf6583c0c15315c7e66f173af4be79ac40c38aad1fd92ec08638ab2026202::pvp_coinflip::Game<phantom T0>">;
135
134
  /**
136
135
  * Event emitted at the end of a standard game (e.g., Coinflip, Limbo), containing the result and payout information.
137
136
  */
138
137
  BetResultEvent: MoveStruct<{
139
- player: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
138
+ player: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
140
139
  coin_type: MoveStruct<{
141
- name: _$_mysten_bcs0.BcsType<string, string, "string">;
140
+ name: import("@mysten/bcs").BcsType<string, string, "string">;
142
141
  }, "0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName">;
143
- stake_amount: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
142
+ stake_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
144
143
  unsafe_oracle_usd_coin_price: MoveStruct<{
145
- is_negative: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
144
+ is_negative: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
146
145
  exp: MoveStruct<{
147
- bits: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
146
+ bits: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
148
147
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64::I64">;
149
- mant: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
148
+ mant: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
150
149
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float::Float">;
151
150
  adjusted_oracle_usd_coin_price: MoveStruct<{
152
- is_negative: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
151
+ is_negative: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
153
152
  exp: MoveStruct<{
154
- bits: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
153
+ bits: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
155
154
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64::I64">;
156
- mant: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
155
+ mant: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
157
156
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float::Float">;
158
- outcome_amount: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
157
+ outcome_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
159
158
  game_details: MoveStruct<{
160
- contents: _$_mysten_bcs0.BcsType<{
159
+ contents: import("@mysten/bcs").BcsType<{
161
160
  key: string;
162
161
  value: number[];
163
162
  }[], Iterable<{
@@ -170,7 +169,7 @@ declare class SuigarClient {
170
169
  }, string>;
171
170
  }, "0x2::vec_map::VecMap<string, vector<u8>>">;
172
171
  metadata: MoveStruct<{
173
- contents: _$_mysten_bcs0.BcsType<{
172
+ contents: import("@mysten/bcs").BcsType<{
174
173
  key: string;
175
174
  value: number[];
176
175
  }[], Iterable<{
@@ -187,47 +186,47 @@ declare class SuigarClient {
187
186
  * Event emitted when a PvP Coinflip game is created, containing the game configuration and initial state.
188
187
  */
189
188
  PvPCoinflipGameCreatedEvent: MoveStruct<{
190
- game_id: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
191
- creator: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
192
- creator_is_tails: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
193
- is_private: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
194
- joiner_is_tails: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
195
- stake_per_player: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
196
- house_edge_bps: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
189
+ game_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
190
+ creator: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
191
+ creator_is_tails: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
192
+ is_private: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
193
+ joiner_is_tails: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
194
+ stake_per_player: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
195
+ house_edge_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
197
196
  coin_type: MoveStruct<{
198
- name: _$_mysten_bcs0.BcsType<string, string, "string">;
197
+ name: import("@mysten/bcs").BcsType<string, string, "string">;
199
198
  }, "0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName">;
200
199
  }, "0xb43cf6583c0c15315c7e66f173af4be79ac40c38aad1fd92ec08638ab2026202::pvp_coinflip::GameCreatedEvent<phantom T0>">;
201
200
  /**
202
201
  * Event emitted when a PvP Coinflip game is resolved, containing the final outcome.
203
202
  */
204
203
  PvPCoinflipGameResolvedEvent: MoveStruct<{
205
- game_id: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
206
- creator: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
207
- joiner: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
208
- winner: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
209
- creator_is_tails: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
210
- is_private: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
211
- joiner_is_tails: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
212
- stake_per_player: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
213
- total_pot: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
214
- house_edge_amount: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
215
- payout_amount: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
204
+ game_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
205
+ creator: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
206
+ joiner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
207
+ winner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
208
+ creator_is_tails: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
209
+ is_private: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
210
+ joiner_is_tails: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
211
+ stake_per_player: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
212
+ total_pot: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
213
+ house_edge_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
214
+ payout_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
216
215
  coin_type: MoveStruct<{
217
- name: _$_mysten_bcs0.BcsType<string, string, "string">;
216
+ name: import("@mysten/bcs").BcsType<string, string, "string">;
218
217
  }, "0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName">;
219
218
  }, "0xb43cf6583c0c15315c7e66f173af4be79ac40c38aad1fd92ec08638ab2026202::pvp_coinflip::GameResolvedEvent<phantom T0>">;
220
219
  /**
221
220
  * Event emitted when a PvP Coinflip game is cancelled.
222
221
  */
223
222
  PvPCoinflipGameCancelledEvent: MoveStruct<{
224
- game_id: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
225
- creator: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
226
- creator_is_tails: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
227
- is_private: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
228
- stake_per_player: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
223
+ game_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
224
+ creator: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
225
+ creator_is_tails: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
226
+ is_private: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
227
+ stake_per_player: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
229
228
  coin_type: MoveStruct<{
230
- name: _$_mysten_bcs0.BcsType<string, string, "string">;
229
+ name: import("@mysten/bcs").BcsType<string, string, "string">;
231
230
  }, "0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName">;
232
231
  }, "0xb43cf6583c0c15315c7e66f173af4be79ac40c38aad1fd92ec08638ab2026202::pvp_coinflip::GameCancelledEvent<phantom T0>">;
233
232
  };
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"mapp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flipGame","#createPvPCoinflipBetCoin"],"sources":["../src/client.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { InferBcsType } from '@mysten/bcs';\nimport type { ClientWithCoreApi, SuiClientTypes } from '@mysten/sui/client';\nimport {\n\tBuildTransactionOptions,\n\tTransaction,\n\tTransactionResult,\n} from '@mysten/sui/transactions';\nimport { normalizeStructTag, toBase64 } from '@mysten/sui/utils';\nimport { BetResultEvent } from './contracts/core/core';\nimport { TypeName } from './contracts/core/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name';\nimport {\n\tGame as PvPCoinflipGame,\n\tGameCancelledEvent as PvPCoinflipGameCancelledEvent,\n\tGameCreatedEvent as PvPCoinflipGameCreatedEvent,\n\tGameResolvedEvent as PvPCoinflipGameResolvedEvent,\n} from './contracts/pvp-coinflip/pvp_coinflip';\nimport {\n\tDEFAULT_CACHE_TTL_MS,\n\tresolveCoinTypeNameForTypeNameKey,\n\tresolveGamePackageId,\n\tresolveGameSettingsKeyType,\n\tresolveSuigarConfig,\n} from './helpers/index.js';\nimport {\n\tbuildCoinflipTransaction,\n\tbuildLimboTransaction,\n\tbuildPlinkoTransaction,\n\tbuildPvPCoinflipTransaction,\n\tbuildRangeTransaction,\n\tbuildWheelTransaction,\n} from './transactions';\nimport { TtlClientCache } from './ttl-cache.js';\nimport {\n\tBuildCancelPvPCoinflipTransactionOptions,\n\tBuildCoinflipTransactionOptions,\n\tBuildCreatePvPCoinflipTransactionOptions,\n\tBuildGameOptions,\n\tBuildJoinPvPCoinflipTransactionOptions,\n\tBuildLimboTransactionOptions,\n\tBuildPlinkoTransactionOptions,\n\tBuildPvPCoinflipTransactionOptions,\n\tBuildRangeTransactionOptions,\n\tBuildWheelTransactionOptions,\n\tGame,\n\tPvPCoinflipAction,\n\tStandardGame,\n\tSuigarConfig,\n\tSuigarExtensionOptions,\n\tSuiNetwork,\n\tSUPPORTED_SUI_NETWORKS,\n\tWithPartner,\n\tWithThrowOnError,\n} from './types';\nimport {\n\tGAME_SETTINGS,\n\ttype GameParameters,\n\ttype GetGameParametersOptions,\n} from './types/game-settings.type.js';\nimport { parseCoinType } from './utils/index.js';\n\nexport function suigar<const Name = 'suigar'>({\n\tname = 'suigar' as Name,\n\tpartner,\n\tcacheTtl,\n}: SuigarExtensionOptions<Name> = {}) {\n\treturn {\n\t\tname,\n\t\tregister: (client: ClientWithCoreApi): SuigarClient => {\n\t\t\treturn new SuigarClient({\n\t\t\t\tclient,\n\t\t\t\tname: String(name),\n\t\t\t\tpartner,\n\t\t\t\tcacheTtl,\n\t\t\t});\n\t\t},\n\t};\n}\n\nexport class SuigarClient {\n\t#client: ClientWithCoreApi;\n\n\t#config: SuigarConfig;\n\n\t#partner: string | undefined;\n\n\t#cache: TtlClientCache;\n\n\tconstructor({\n\t\tclient,\n\t\tname,\n\t\tpartner,\n\t\tcacheTtl,\n\t}: {\n\t\tclient: ClientWithCoreApi;\n\t\tname: string;\n\t\tpartner?: string;\n\t\tcacheTtl?: number;\n\t}) {\n\t\tthis.#client = client;\n\t\tthis.#partner = partner;\n\t\tthis.#cache = client.cache\n\t\t\t.scope('@suigar/sdk')\n\t\t\t.readSync([name, 'ttl-cache'], () => {\n\t\t\t\treturn new TtlClientCache({\n\t\t\t\t\tttlMs: cacheTtl ?? DEFAULT_CACHE_TTL_MS,\n\t\t\t\t});\n\t\t\t});\n\n\t\tconst network = this.#client.network as SuiNetwork;\n\t\tif (!SUPPORTED_SUI_NETWORKS.includes(network)) {\n\t\t\tthrow new RangeError(`Unsupported network: ${network}`);\n\t\t}\n\n\t\tthis.#config = resolveSuigarConfig(network);\n\t}\n\n\t/**\n\t * Returns the resolved SDK configuration for the connected network.\n\t *\n\t * This is primarily useful for debugging or inspecting which package ids,\n\t * registry ids, supported coin types, and price info object ids the SDK\n\t * resolved for the current client network.\n\t *\n\t * @returns Network-resolved Suigar configuration.\n\t */\n\tgetConfig(): SuigarConfig {\n\t\treturn this.#config;\n\t}\n\n\t/**\n\t * Builds a transaction with the configured Sui client and encodes the resulting BCS bytes as base64.\n\t *\n\t * Use this when an external wallet, API, or transport expects the built transaction payload as a base64 string\n\t * instead of raw bytes. The SDK always injects the configured Sui client, so `options` accepts the standard\n\t * transaction build options except for `client`.\n\t *\n\t * @param transaction Transaction to build and serialize.\n\t * @param options Optional transaction build options forwarded to `transaction.build()`, excluding `client`.\n\t * @returns Base64-encoded transaction bytes ready to send over the wire.\n\t */\n\tasync serializeTransactionToBase64(\n\t\ttransaction: Transaction,\n\t\toptions?: Omit<BuildTransactionOptions, 'client'>,\n\t): Promise<string> {\n\t\tconst bytes = await transaction.build({ ...options, client: this.#client });\n\t\treturn toBase64(bytes);\n\t}\n\n\t/**\n\t * Reads on-chain game parameters for the requested game.\n\t *\n\t * The SDK first reads the selected game's settings object from SweetHouse,\n\t * then reads that game's coin-specific `Parameters<T>` object. Results are\n\t * cached according to the extension `cacheTtl` option. Pass\n\t * `ignoreCache: true` to refresh the on-chain read and replace the cached\n\t * value.\n\t *\n\t * @param game Game whose parameters should be loaded.\n\t * @param options Optional coin type, cache override, and abort signal.\n\t * @returns Parsed game parameters typed for the requested game.\n\t */\n\tasync getGameParameters<TGame extends Game>(\n\t\tgame: TGame,\n\t\toptions: GetGameParametersOptions = {},\n\t): Promise<GameParameters<TGame>> {\n\t\tconst coinType = normalizeStructTag(\n\t\t\toptions.coinType ?? this.#config.coinTypes.sui,\n\t\t);\n\t\treturn this.#cache.read(\n\t\t\t['parameters', this.#client.network, game, coinType],\n\t\t\t() => this.#fetchGameParameters(game, coinType, options.signal),\n\t\t\t{ ignoreCache: options.ignoreCache },\n\t\t) as Promise<GameParameters<TGame>>;\n\t}\n\n\t/**\n\t * Lists unresolved PvP coinflip games from the configured registry and resolves\n\t * each entry into parsed on-chain game state.\n\t *\n\t * This fetches dynamic fields from the PvP coinflip registry object, then bulk\n\t * loads the referenced game objects through `client.core.getObjects()`. Registry\n\t * membership is the unresolved-state signal: when a game is joined and resolved,\n\t * the Move flow removes it from the registry and deletes the live `Game` object.\n\t * Use this when a product needs the current set of open PvP coinflip matches for\n\t * browsing or lobby views.\n\t *\n\t * @param options Optional dynamic field pagination forwarded to `listDynamicFields()`, excluding `parentId`.\n\t * Supported options such as `limit`, `cursor`, and `signal` are forwarded to the\n\t * underlying lookup calls. Pass `throwOnError: true` to fail the whole lookup\n\t * when any referenced game object cannot be fetched or parsed. By default,\n\t * failed per-object lookups are skipped and only successfully parsed unresolved\n\t * games are returned.\n\t * @returns Parsed unresolved PvP coinflip game objects for the requested\n\t * registry page. When `throwOnError` is `false`, entries that fail object fetch\n\t * or parse are omitted from the returned array.\n\t */\n\tasync getPvPCoinflipGames(\n\t\toptions: WithThrowOnError<\n\t\t\tOmit<SuiClientTypes.ListDynamicFieldsOptions, 'parentId'>\n\t\t> = {\n\t\t\tlimit: 50,\n\t\t},\n\t): Promise<(InferBcsType<typeof PvPCoinflipGame> & { coin_type: string })[]> {\n\t\tconst { throwOnError = false, ...listOptions } = options;\n\t\tconst { dynamicFields } = await this.#client.core.listDynamicFields({\n\t\t\t...listOptions,\n\t\t\tparentId: this.#config.registryIds.pvpCoinflip,\n\t\t});\n\n\t\tconst { objects } = await this.#client.core.getObjects({\n\t\t\tobjectIds: dynamicFields.map(({ childId }) => childId!),\n\t\t\tsignal: listOptions.signal,\n\t\t\tinclude: {\n\t\t\t\tcontent: true,\n\t\t\t},\n\t\t});\n\n\t\tconst resolvedGames = objects.map((object) => {\n\t\t\ttry {\n\t\t\t\tif (object instanceof Error) {\n\t\t\t\t\tthrow object;\n\t\t\t\t}\n\n\t\t\t\tif (!object.content) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Unable to resolve PvP coinflip game from retrieved object',\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...PvPCoinflipGame.parse(object.content),\n\t\t\t\t\tcoin_type: parseCoinType(object.type),\n\t\t\t\t} satisfies Awaited<\n\t\t\t\t\tReturnType<SuigarClient['getPvPCoinflipGames']>\n\t\t\t\t>[number];\n\t\t\t} catch (error) {\n\t\t\t\treturn error instanceof Error ? error : new Error(String(error));\n\t\t\t}\n\t\t});\n\n\t\tif (throwOnError) {\n\t\t\tconst firstError = resolvedGames.find((game) => game instanceof Error);\n\t\t\tif (firstError) {\n\t\t\t\tthrow firstError;\n\t\t\t}\n\t\t}\n\n\t\treturn resolvedGames.flatMap((game) =>\n\t\t\tgame instanceof Error ? [] : [game],\n\t\t);\n\t}\n\n\t/**\n\t * BCS struct constructors for decoding on-chain objects and events related to Suigar games.\n\t *\n\t * These can be used to parse the `content` field of on-chain objects and events into structured data with the\n\t * expected types. For example, use `client.suigar.bcs.PvPCoinflipGame.parse(object.content)` to decode a PvP\n\t * coinflip game object.\n\t *\n\t * Note that these constructors are not meant for encoding transaction arguments, as the SDK's transaction\n\t * builders handle argument serialization internally. Use these primarily for decoding and parsing on-chain data.\n\t */\n\tbcs = {\n\t\t// Objects\n\t\t/**\n\t\t * Object representing the state of a PvP coinflip game, as stored on-chain.\n\t\t */\n\t\tPvPCoinflipGame,\n\t\t// Events\n\t\t/**\n\t\t * Event emitted at the end of a standard game (e.g., Coinflip, Limbo), containing the result and payout information.\n\t\t */\n\t\tBetResultEvent,\n\t\t/**\n\t\t * Event emitted when a PvP Coinflip game is created, containing the game configuration and initial state.\n\t\t */\n\t\tPvPCoinflipGameCreatedEvent,\n\t\t/**\n\t\t * Event emitted when a PvP Coinflip game is resolved, containing the final outcome.\n\t\t */\n\t\tPvPCoinflipGameResolvedEvent,\n\t\t/**\n\t\t * Event emitted when a PvP Coinflip game is cancelled.\n\t\t */\n\t\tPvPCoinflipGameCancelledEvent,\n\t};\n\n\t/**\n\t * Transaction builders for Suigar games.\n\t */\n\ttx = {\n\t\t/**\n\t\t * Creates a standard game transaction for the provided game id.\n\t\t *\n\t\t * @param gameId Supported standard game identifier.\n\t\t * @param options Transaction builder options for the selected game.\n\t\t * @returns Prepared transaction for the selected game.\n\t\t */\n\t\tcreateBetTransaction: <GameId extends StandardGame>(\n\t\t\tgameId: GameId,\n\t\t\toptions: BuildGameOptions<GameId>,\n\t\t): Transaction => {\n\t\t\tswitch (gameId) {\n\t\t\t\tcase 'coinflip':\n\t\t\t\t\treturn buildCoinflipTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildCoinflipTransactionOptions>);\n\t\t\t\tcase 'limbo':\n\t\t\t\t\treturn buildLimboTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildLimboTransactionOptions>);\n\t\t\t\tcase 'plinko':\n\t\t\t\t\treturn buildPlinkoTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildPlinkoTransactionOptions>);\n\t\t\t\tcase 'range':\n\t\t\t\t\treturn buildRangeTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildRangeTransactionOptions>);\n\t\t\t\tcase 'wheel':\n\t\t\t\t\treturn buildWheelTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildWheelTransactionOptions>);\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RangeError(`Unsupported game: ${gameId}`);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Creates a PvP coinflip transaction for the requested action.\n\t\t *\n\t\t * @param action PvP coinflip action to perform.\n\t\t * @param options Transaction builder options for the selected action.\n\t\t * @returns Prepared PvP coinflip transaction.\n\t\t */\n\t\tcreatePvPCoinflipTransaction: <Action extends PvPCoinflipAction>(\n\t\t\taction: Action,\n\t\t\toptions: BuildPvPCoinflipTransactionOptions<Action>,\n\t\t): Transaction => {\n\t\t\tswitch (action) {\n\t\t\t\tcase 'create':\n\t\t\t\t\treturn buildPvPCoinflipTransaction('create', {\n\t\t\t\t\t\t...(options as BuildCreatePvPCoinflipTransactionOptions),\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t});\n\t\t\t\tcase 'join': {\n\t\t\t\t\tconst joinOptions = options as BuildJoinPvPCoinflipTransactionOptions;\n\t\t\t\t\treturn buildPvPCoinflipTransaction('join', {\n\t\t\t\t\t\t...joinOptions,\n\t\t\t\t\t\tbetCoin: this.#createPvPCoinflipBetCoin(joinOptions),\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn buildPvPCoinflipTransaction('cancel', {\n\t\t\t\t\t\t...(options as BuildCancelPvPCoinflipTransactionOptions),\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t});\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RangeError(`Unsupported PvP coinflip action: ${action}`);\n\t\t\t}\n\t\t},\n\t};\n\n\t#createPvPCoinflipBetCoin(\n\t\toptions: BuildJoinPvPCoinflipTransactionOptions,\n\t): (tx: Transaction) => Promise<TransactionResult> {\n\t\treturn async (tx: Transaction) => {\n\t\t\tconst { json } = await PvPCoinflipGame.get({\n\t\t\t\tclient: this.#client,\n\t\t\t\tobjectId: options.gameId,\n\t\t\t});\n\n\t\t\treturn tx.coin({\n\t\t\t\ttype: options.coinType,\n\t\t\t\tbalance: BigInt(json.stake_per_player),\n\t\t\t\tuseGasCoin: options.allowGasCoinShortcut,\n\t\t\t});\n\t\t};\n\t}\n\n\tasync #fetchGameParameters<TGame extends Game>(\n\t\tgame: TGame,\n\t\tcoinType: string,\n\t\tsignal?: AbortSignal,\n\t): Promise<GameParameters<TGame>> {\n\t\tconst gameDefinition = GAME_SETTINGS[game];\n\n\t\tconst { object: settingsObject } =\n\t\t\tawait this.#client.core.getDynamicObjectField({\n\t\t\t\tparentId: this.#config.packageIds.sweetHouse,\n\t\t\t\tname: {\n\t\t\t\t\ttype: resolveGameSettingsKeyType(\n\t\t\t\t\t\tgameDefinition.settingsKey.name,\n\t\t\t\t\t\tresolveGamePackageId(this.#config, game),\n\t\t\t\t\t),\n\t\t\t\t\tbcs: gameDefinition.settingsKey\n\t\t\t\t\t\t.serialize({ dummy_field: false })\n\t\t\t\t\t\t.toBytes(),\n\t\t\t\t},\n\t\t\t\tsignal,\n\t\t\t});\n\n\t\tconst { object } = await this.#client.core.getDynamicObjectField({\n\t\t\tparentId: settingsObject.objectId,\n\t\t\tname: {\n\t\t\t\ttype: TypeName.name,\n\t\t\t\tbcs: TypeName.serialize({\n\t\t\t\t\tname: resolveCoinTypeNameForTypeNameKey(coinType),\n\t\t\t\t}).toBytes(),\n\t\t\t},\n\t\t\tinclude: {\n\t\t\t\tcontent: true,\n\t\t\t},\n\t\t\tsignal,\n\t\t});\n\n\t\tif (!object?.content) {\n\t\t\tthrow new Error(\n\t\t\t\t`Missing parameters object content for ${game} and coin type ${coinType}`,\n\t\t\t);\n\t\t}\n\n\t\treturn gameDefinition.parameters.parse(\n\t\t\tobject.content,\n\t\t) as GameParameters<TGame>;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+DA,SAAgB,OAA8B,EAC7C,OAAO,UACP,SACA,aACiC,EAAE,EAAE;CACrC,OAAO;EACN;EACA,WAAW,WAA4C;GACtD,OAAO,IAAI,aAAa;IACvB;IACA,MAAM,OAAO,KAAK;IAClB;IACA;IACA,CAAC;;EAEH;;AAGF,IAAa,eAAb,MAA0B;CACzB;CAEA;CAEA;CAEA;CAEA,YAAY,EACX,QACA,MACA,SACA,YAME;EACF,K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,OAAO,eAAe,WAAW,MAChC,OAAO,QACP"}
1
+ {"version":3,"file":"client.mjs","names":["#client","#partner","#cache","#config","#fetchGameParameters","PvPCoinflipGame","#createPvPCoinflipBetCoin"],"sources":["../src/client.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { InferBcsType } from '@mysten/bcs';\nimport type { ClientWithCoreApi, SuiClientTypes } from '@mysten/sui/client';\nimport {\n\tBuildTransactionOptions,\n\tTransaction,\n\tTransactionResult,\n} from '@mysten/sui/transactions';\nimport { normalizeStructTag, toBase64 } from '@mysten/sui/utils';\nimport { BetResultEvent } from './contracts/core/core';\nimport { TypeName } from './contracts/core/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name';\nimport {\n\tGame as PvPCoinflipGame,\n\tGameCancelledEvent as PvPCoinflipGameCancelledEvent,\n\tGameCreatedEvent as PvPCoinflipGameCreatedEvent,\n\tGameResolvedEvent as PvPCoinflipGameResolvedEvent,\n} from './contracts/pvp-coinflip/pvp_coinflip';\nimport {\n\tDEFAULT_CACHE_TTL_MS,\n\tresolveCoinTypeNameForTypeNameKey,\n\tresolveGamePackageId,\n\tresolveGameSettingsKeyType,\n\tresolveSuigarConfig,\n} from './helpers/index.js';\nimport {\n\tbuildCoinflipTransaction,\n\tbuildLimboTransaction,\n\tbuildPlinkoTransaction,\n\tbuildPvPCoinflipTransaction,\n\tbuildRangeTransaction,\n\tbuildWheelTransaction,\n} from './transactions';\nimport { TtlClientCache } from './ttl-cache.js';\nimport {\n\tBuildCancelPvPCoinflipTransactionOptions,\n\tBuildCoinflipTransactionOptions,\n\tBuildCreatePvPCoinflipTransactionOptions,\n\tBuildGameOptions,\n\tBuildJoinPvPCoinflipTransactionOptions,\n\tBuildLimboTransactionOptions,\n\tBuildPlinkoTransactionOptions,\n\tBuildPvPCoinflipTransactionOptions,\n\tBuildRangeTransactionOptions,\n\tBuildWheelTransactionOptions,\n\tGame,\n\tPvPCoinflipAction,\n\tStandardGame,\n\tSuigarConfig,\n\tSuigarExtensionOptions,\n\tSuiNetwork,\n\tSUPPORTED_SUI_NETWORKS,\n\tWithPartner,\n\tWithThrowOnError,\n} from './types';\nimport {\n\tGAME_SETTINGS,\n\ttype GameParameters,\n\ttype GetGameParametersOptions,\n} from './types/game-settings.type.js';\nimport { parseCoinType } from './utils/index.js';\n\nexport function suigar<const Name = 'suigar'>({\n\tname = 'suigar' as Name,\n\tpartner,\n\tcacheTtl,\n}: SuigarExtensionOptions<Name> = {}) {\n\treturn {\n\t\tname,\n\t\tregister: (client: ClientWithCoreApi): SuigarClient => {\n\t\t\treturn new SuigarClient({\n\t\t\t\tclient,\n\t\t\t\tname: String(name),\n\t\t\t\tpartner,\n\t\t\t\tcacheTtl,\n\t\t\t});\n\t\t},\n\t};\n}\n\nexport class SuigarClient {\n\t#client: ClientWithCoreApi;\n\n\t#config: SuigarConfig;\n\n\t#partner: string | undefined;\n\n\t#cache: TtlClientCache;\n\n\tconstructor({\n\t\tclient,\n\t\tname,\n\t\tpartner,\n\t\tcacheTtl,\n\t}: {\n\t\tclient: ClientWithCoreApi;\n\t\tname: string;\n\t\tpartner?: string;\n\t\tcacheTtl?: number;\n\t}) {\n\t\tthis.#client = client;\n\t\tthis.#partner = partner;\n\t\tthis.#cache = client.cache\n\t\t\t.scope('@suigar/sdk')\n\t\t\t.readSync([name, 'ttl-cache'], () => {\n\t\t\t\treturn new TtlClientCache({\n\t\t\t\t\tttlMs: cacheTtl ?? DEFAULT_CACHE_TTL_MS,\n\t\t\t\t});\n\t\t\t});\n\n\t\tconst network = this.#client.network as SuiNetwork;\n\t\tif (!SUPPORTED_SUI_NETWORKS.includes(network)) {\n\t\t\tthrow new RangeError(`Unsupported network: ${network}`);\n\t\t}\n\n\t\tthis.#config = resolveSuigarConfig(network);\n\t}\n\n\t/**\n\t * Returns the resolved SDK configuration for the connected network.\n\t *\n\t * This is primarily useful for debugging or inspecting which package ids,\n\t * registry ids, supported coin types, and price info object ids the SDK\n\t * resolved for the current client network.\n\t *\n\t * @returns Network-resolved Suigar configuration.\n\t */\n\tgetConfig(): SuigarConfig {\n\t\treturn this.#config;\n\t}\n\n\t/**\n\t * Builds a transaction with the configured Sui client and encodes the resulting BCS bytes as base64.\n\t *\n\t * Use this when an external wallet, API, or transport expects the built transaction payload as a base64 string\n\t * instead of raw bytes. The SDK always injects the configured Sui client, so `options` accepts the standard\n\t * transaction build options except for `client`.\n\t *\n\t * @param transaction Transaction to build and serialize.\n\t * @param options Optional transaction build options forwarded to `transaction.build()`, excluding `client`.\n\t * @returns Base64-encoded transaction bytes ready to send over the wire.\n\t */\n\tasync serializeTransactionToBase64(\n\t\ttransaction: Transaction,\n\t\toptions?: Omit<BuildTransactionOptions, 'client'>,\n\t): Promise<string> {\n\t\tconst bytes = await transaction.build({ ...options, client: this.#client });\n\t\treturn toBase64(bytes);\n\t}\n\n\t/**\n\t * Reads on-chain game parameters for the requested game.\n\t *\n\t * The SDK first reads the selected game's settings object from SweetHouse,\n\t * then reads that game's coin-specific `Parameters<T>` object. Results are\n\t * cached according to the extension `cacheTtl` option. Pass\n\t * `ignoreCache: true` to refresh the on-chain read and replace the cached\n\t * value.\n\t *\n\t * @param game Game whose parameters should be loaded.\n\t * @param options Optional coin type, cache override, and abort signal.\n\t * @returns Parsed game parameters typed for the requested game.\n\t */\n\tasync getGameParameters<TGame extends Game>(\n\t\tgame: TGame,\n\t\toptions: GetGameParametersOptions = {},\n\t): Promise<GameParameters<TGame>> {\n\t\tconst coinType = normalizeStructTag(\n\t\t\toptions.coinType ?? this.#config.coinTypes.sui,\n\t\t);\n\t\treturn this.#cache.read(\n\t\t\t['parameters', this.#client.network, game, coinType],\n\t\t\t() => this.#fetchGameParameters(game, coinType, options.signal),\n\t\t\t{ ignoreCache: options.ignoreCache },\n\t\t) as Promise<GameParameters<TGame>>;\n\t}\n\n\t/**\n\t * Lists unresolved PvP coinflip games from the configured registry and resolves\n\t * each entry into parsed on-chain game state.\n\t *\n\t * This fetches dynamic fields from the PvP coinflip registry object, then bulk\n\t * loads the referenced game objects through `client.core.getObjects()`. Registry\n\t * membership is the unresolved-state signal: when a game is joined and resolved,\n\t * the Move flow removes it from the registry and deletes the live `Game` object.\n\t * Use this when a product needs the current set of open PvP coinflip matches for\n\t * browsing or lobby views.\n\t *\n\t * @param options Optional dynamic field pagination forwarded to `listDynamicFields()`, excluding `parentId`.\n\t * Supported options such as `limit`, `cursor`, and `signal` are forwarded to the\n\t * underlying lookup calls. Pass `throwOnError: true` to fail the whole lookup\n\t * when any referenced game object cannot be fetched or parsed. By default,\n\t * failed per-object lookups are skipped and only successfully parsed unresolved\n\t * games are returned.\n\t * @returns Parsed unresolved PvP coinflip game objects for the requested\n\t * registry page. When `throwOnError` is `false`, entries that fail object fetch\n\t * or parse are omitted from the returned array.\n\t */\n\tasync getPvPCoinflipGames(\n\t\toptions: WithThrowOnError<\n\t\t\tOmit<SuiClientTypes.ListDynamicFieldsOptions, 'parentId'>\n\t\t> = {\n\t\t\tlimit: 50,\n\t\t},\n\t): Promise<(InferBcsType<typeof PvPCoinflipGame> & { coin_type: string })[]> {\n\t\tconst { throwOnError = false, ...listOptions } = options;\n\t\tconst { dynamicFields } = await this.#client.core.listDynamicFields({\n\t\t\t...listOptions,\n\t\t\tparentId: this.#config.registryIds.pvpCoinflip,\n\t\t});\n\n\t\tconst { objects } = await this.#client.core.getObjects({\n\t\t\tobjectIds: dynamicFields.map(({ childId }) => childId!),\n\t\t\tsignal: listOptions.signal,\n\t\t\tinclude: {\n\t\t\t\tcontent: true,\n\t\t\t},\n\t\t});\n\n\t\tconst resolvedGames = objects.map((object) => {\n\t\t\ttry {\n\t\t\t\tif (object instanceof Error) {\n\t\t\t\t\tthrow object;\n\t\t\t\t}\n\n\t\t\t\tif (!object.content) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Unable to resolve PvP coinflip game from retrieved object',\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...PvPCoinflipGame.parse(object.content),\n\t\t\t\t\tcoin_type: parseCoinType(object.type),\n\t\t\t\t} satisfies Awaited<\n\t\t\t\t\tReturnType<SuigarClient['getPvPCoinflipGames']>\n\t\t\t\t>[number];\n\t\t\t} catch (error) {\n\t\t\t\treturn error instanceof Error ? error : new Error(String(error));\n\t\t\t}\n\t\t});\n\n\t\tif (throwOnError) {\n\t\t\tconst firstError = resolvedGames.find((game) => game instanceof Error);\n\t\t\tif (firstError) {\n\t\t\t\tthrow firstError;\n\t\t\t}\n\t\t}\n\n\t\treturn resolvedGames.flatMap((game) =>\n\t\t\tgame instanceof Error ? [] : [game],\n\t\t);\n\t}\n\n\t/**\n\t * BCS struct constructors for decoding on-chain objects and events related to Suigar games.\n\t *\n\t * These can be used to parse the `content` field of on-chain objects and events into structured data with the\n\t * expected types. For example, use `client.suigar.bcs.PvPCoinflipGame.parse(object.content)` to decode a PvP\n\t * coinflip game object.\n\t *\n\t * Note that these constructors are not meant for encoding transaction arguments, as the SDK's transaction\n\t * builders handle argument serialization internally. Use these primarily for decoding and parsing on-chain data.\n\t */\n\tbcs = {\n\t\t// Objects\n\t\t/**\n\t\t * Object representing the state of a PvP coinflip game, as stored on-chain.\n\t\t */\n\t\tPvPCoinflipGame,\n\t\t// Events\n\t\t/**\n\t\t * Event emitted at the end of a standard game (e.g., Coinflip, Limbo), containing the result and payout information.\n\t\t */\n\t\tBetResultEvent,\n\t\t/**\n\t\t * Event emitted when a PvP Coinflip game is created, containing the game configuration and initial state.\n\t\t */\n\t\tPvPCoinflipGameCreatedEvent,\n\t\t/**\n\t\t * Event emitted when a PvP Coinflip game is resolved, containing the final outcome.\n\t\t */\n\t\tPvPCoinflipGameResolvedEvent,\n\t\t/**\n\t\t * Event emitted when a PvP Coinflip game is cancelled.\n\t\t */\n\t\tPvPCoinflipGameCancelledEvent,\n\t};\n\n\t/**\n\t * Transaction builders for Suigar games.\n\t */\n\ttx = {\n\t\t/**\n\t\t * Creates a standard game transaction for the provided game id.\n\t\t *\n\t\t * @param gameId Supported standard game identifier.\n\t\t * @param options Transaction builder options for the selected game.\n\t\t * @returns Prepared transaction for the selected game.\n\t\t */\n\t\tcreateBetTransaction: <GameId extends StandardGame>(\n\t\t\tgameId: GameId,\n\t\t\toptions: BuildGameOptions<GameId>,\n\t\t): Transaction => {\n\t\t\tswitch (gameId) {\n\t\t\t\tcase 'coinflip':\n\t\t\t\t\treturn buildCoinflipTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildCoinflipTransactionOptions>);\n\t\t\t\tcase 'limbo':\n\t\t\t\t\treturn buildLimboTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildLimboTransactionOptions>);\n\t\t\t\tcase 'plinko':\n\t\t\t\t\treturn buildPlinkoTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildPlinkoTransactionOptions>);\n\t\t\t\tcase 'range':\n\t\t\t\t\treturn buildRangeTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildRangeTransactionOptions>);\n\t\t\t\tcase 'wheel':\n\t\t\t\t\treturn buildWheelTransaction({\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t} as WithPartner<BuildWheelTransactionOptions>);\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RangeError(`Unsupported game: ${gameId}`);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Creates a PvP coinflip transaction for the requested action.\n\t\t *\n\t\t * @param action PvP coinflip action to perform.\n\t\t * @param options Transaction builder options for the selected action.\n\t\t * @returns Prepared PvP coinflip transaction.\n\t\t */\n\t\tcreatePvPCoinflipTransaction: <Action extends PvPCoinflipAction>(\n\t\t\taction: Action,\n\t\t\toptions: BuildPvPCoinflipTransactionOptions<Action>,\n\t\t): Transaction => {\n\t\t\tswitch (action) {\n\t\t\t\tcase 'create':\n\t\t\t\t\treturn buildPvPCoinflipTransaction('create', {\n\t\t\t\t\t\t...(options as BuildCreatePvPCoinflipTransactionOptions),\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t});\n\t\t\t\tcase 'join': {\n\t\t\t\t\tconst joinOptions = options as BuildJoinPvPCoinflipTransactionOptions;\n\t\t\t\t\treturn buildPvPCoinflipTransaction('join', {\n\t\t\t\t\t\t...joinOptions,\n\t\t\t\t\t\tbetCoin: this.#createPvPCoinflipBetCoin(joinOptions),\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tcase 'cancel':\n\t\t\t\t\treturn buildPvPCoinflipTransaction('cancel', {\n\t\t\t\t\t\t...(options as BuildCancelPvPCoinflipTransactionOptions),\n\t\t\t\t\t\tconfig: this.#config,\n\t\t\t\t\t\tpartner: this.#partner,\n\t\t\t\t\t});\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RangeError(`Unsupported PvP coinflip action: ${action}`);\n\t\t\t}\n\t\t},\n\t};\n\n\t#createPvPCoinflipBetCoin(\n\t\toptions: BuildJoinPvPCoinflipTransactionOptions,\n\t): (tx: Transaction) => Promise<TransactionResult> {\n\t\treturn async (tx: Transaction) => {\n\t\t\tconst { json } = await PvPCoinflipGame.get({\n\t\t\t\tclient: this.#client,\n\t\t\t\tobjectId: options.gameId,\n\t\t\t});\n\n\t\t\treturn tx.coin({\n\t\t\t\ttype: options.coinType,\n\t\t\t\tbalance: BigInt(json.stake_per_player),\n\t\t\t\tuseGasCoin: options.allowGasCoinShortcut,\n\t\t\t});\n\t\t};\n\t}\n\n\tasync #fetchGameParameters<TGame extends Game>(\n\t\tgame: TGame,\n\t\tcoinType: string,\n\t\tsignal?: AbortSignal,\n\t): Promise<GameParameters<TGame>> {\n\t\tconst gameDefinition = GAME_SETTINGS[game];\n\n\t\tconst { object: settingsObject } =\n\t\t\tawait this.#client.core.getDynamicObjectField({\n\t\t\t\tparentId: this.#config.packageIds.sweetHouse,\n\t\t\t\tname: {\n\t\t\t\t\ttype: resolveGameSettingsKeyType(\n\t\t\t\t\t\tgameDefinition.settingsKey.name,\n\t\t\t\t\t\tresolveGamePackageId(this.#config, game),\n\t\t\t\t\t),\n\t\t\t\t\tbcs: gameDefinition.settingsKey\n\t\t\t\t\t\t.serialize({ dummy_field: false })\n\t\t\t\t\t\t.toBytes(),\n\t\t\t\t},\n\t\t\t\tsignal,\n\t\t\t});\n\n\t\tconst { object } = await this.#client.core.getDynamicObjectField({\n\t\t\tparentId: settingsObject.objectId,\n\t\t\tname: {\n\t\t\t\ttype: TypeName.name,\n\t\t\t\tbcs: TypeName.serialize({\n\t\t\t\t\tname: resolveCoinTypeNameForTypeNameKey(coinType),\n\t\t\t\t}).toBytes(),\n\t\t\t},\n\t\t\tinclude: {\n\t\t\t\tcontent: true,\n\t\t\t},\n\t\t\tsignal,\n\t\t});\n\n\t\tif (!object?.content) {\n\t\t\tthrow new Error(\n\t\t\t\t`Missing parameters object content for ${game} and coin type ${coinType}`,\n\t\t\t);\n\t\t}\n\n\t\treturn gameDefinition.parameters.parse(\n\t\t\tobject.content,\n\t\t) as GameParameters<TGame>;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+DA,SAAgB,OAA8B,EAC7C,OAAO,UACP,SACA,aACiC,CAAC,GAAG;CACrC,OAAO;EACN;EACA,WAAW,WAA4C;GACtD,OAAO,IAAI,aAAa;IACvB;IACA,MAAM,OAAO,IAAI;IACjB;IACA;GACD,CAA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MAAM,kCAAkC,QAAQ,EACjD,CAAC,EAAE,QAAQ;GACZ;GACA,SAAS,EACR,SAAS,KACV;GACA;EACD,CAAC;EAED,IAAI,CAAC,QAAQ,SACZ,MAAM,IAAI,MACT,yCAAyC,KAAK,iBAAiB,UAChE;EAGD,OAAO,eAAe,WAAW,MAChC,OAAO,OACR;CACD;AACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"package.mainnet.mjs","names":[],"sources":["../../src/configs/package.mainnet.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tSuigarCoinTypes,\n\tSuigarPackageIds,\n\tSuigarPriceInfoObjectIds,\n} from '../types/suigar-config.type.js';\n\n// `sweetHouse` is preserved manually because it is not currently resolved from MVR.\nexport const MAINNET_PACKAGE_IDS: SuigarPackageIds = {\n\tsweetHouse:\n\t\t'0xa1549d73230118716bc08865b8d62454f360ddaf40eee2158e458e52125d4ef1',\n\tcore: '0xcbb0929f21450013ebe5e86e7139f2409da2e3ed212c51126a7e6448b795a43f',\n\tcoinflip:\n\t\t'0xca96885371150f55653f7fab9e9b146f5a19698b1002bdff42159ea9d2ba7d7e',\n\tlimbo: '0x89db6a55ad4e650cad641b6f9fd90b391b22b1d9adbb2cabbfeb94a9eeda7026',\n\tplinko: '0x74a73daff11c11ed05299c93ed770c62ec4dc6756fa99e271e251c2399f49fef',\n\tpvpCoinflip:\n\t\t'0x29162faf01a8135630e0a32bbe4ce47f69607b24dbb1edea3800861f91d0030a',\n\trange: '0xd19e32b0f2a5e541fbd345b4602f8a93a2eee25c16029595b6fef0b1e0461a54',\n\twheel: '0x6791eac73fe7bf463b7f3b1ea391df265fbc1b96201270664a5a11e2441e9955',\n};\n\nexport const MAINNET_COIN_TYPES: SuigarCoinTypes = {\n\tsui: '0x2::sui::SUI',\n\tusdc: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',\n};\n\nexport const MAINNET_PRICE_INFO_OBJECT_IDS: SuigarPriceInfoObjectIds = {\n\tsui: '0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37',\n\tusdc: '0x5dec622733a204ca27f5a90d8c2fad453cc6665186fd5dff13a83d0b6c9027ab',\n};\n"],"mappings":";AAUA,MAAa,sBAAwC;CACpD,YACC;CACD,MAAM;CACN,UACC;CACD,OAAO;CACP,QAAQ;CACR,aACC;CACD,OAAO;CACP,OAAO;CACP;AAED,MAAa,qBAAsC;CAClD,KAAK;CACL,MAAM;CACN;AAED,MAAa,gCAA0D;CACtE,KAAK;CACL,MAAM;CACN"}
1
+ {"version":3,"file":"package.mainnet.mjs","names":[],"sources":["../../src/configs/package.mainnet.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tSuigarCoinTypes,\n\tSuigarPackageIds,\n\tSuigarPriceInfoObjectIds,\n} from '../types/suigar-config.type.js';\n\n// `sweetHouse` is preserved manually because it is not currently resolved from MVR.\nexport const MAINNET_PACKAGE_IDS: SuigarPackageIds = {\n\tsweetHouse:\n\t\t'0xa1549d73230118716bc08865b8d62454f360ddaf40eee2158e458e52125d4ef1',\n\tcore: '0xcbb0929f21450013ebe5e86e7139f2409da2e3ed212c51126a7e6448b795a43f',\n\tcoinflip:\n\t\t'0xca96885371150f55653f7fab9e9b146f5a19698b1002bdff42159ea9d2ba7d7e',\n\tlimbo: '0x89db6a55ad4e650cad641b6f9fd90b391b22b1d9adbb2cabbfeb94a9eeda7026',\n\tplinko: '0x74a73daff11c11ed05299c93ed770c62ec4dc6756fa99e271e251c2399f49fef',\n\tpvpCoinflip:\n\t\t'0x29162faf01a8135630e0a32bbe4ce47f69607b24dbb1edea3800861f91d0030a',\n\trange: '0xd19e32b0f2a5e541fbd345b4602f8a93a2eee25c16029595b6fef0b1e0461a54',\n\twheel: '0x6791eac73fe7bf463b7f3b1ea391df265fbc1b96201270664a5a11e2441e9955',\n};\n\nexport const MAINNET_COIN_TYPES: SuigarCoinTypes = {\n\tsui: '0x2::sui::SUI',\n\tusdc: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',\n};\n\nexport const MAINNET_PRICE_INFO_OBJECT_IDS: SuigarPriceInfoObjectIds = {\n\tsui: '0x801dbc2f0053d34734814b2d6df491ce7807a725fe9a01ad74a07e9c51396c37',\n\tusdc: '0x5dec622733a204ca27f5a90d8c2fad453cc6665186fd5dff13a83d0b6c9027ab',\n};\n"],"mappings":";AAUA,MAAa,sBAAwC;CACpD,YACC;CACD,MAAM;CACN,UACC;CACD,OAAO;CACP,QAAQ;CACR,aACC;CACD,OAAO;CACP,OAAO;AACR;AAEA,MAAa,qBAAsC;CAClD,KAAK;CACL,MAAM;AACP;AAEA,MAAa,gCAA0D;CACtE,KAAK;CACL,MAAM;AACP"}
@@ -1 +1 @@
1
- {"version":3,"file":"package.mjs","names":[],"sources":["../../src/configs/package.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tSuigarCoinTypes,\n\tSuigarPackageIds,\n\tSuigarPriceInfoObjectIds,\n\tSuiNetworkRegistry,\n} from '../types/suigar-config.type.js';\nimport {\n\tMAINNET_COIN_TYPES,\n\tMAINNET_PACKAGE_IDS,\n\tMAINNET_PRICE_INFO_OBJECT_IDS,\n} from './package.mainnet.js';\nimport {\n\tTESTNET_COIN_TYPES,\n\tTESTNET_PACKAGE_IDS,\n\tTESTNET_PRICE_INFO_OBJECT_IDS,\n} from './package.testnet.js';\n\nexport const PACKAGE_IDS: SuiNetworkRegistry<SuigarPackageIds> = {\n\tmainnet: { ...MAINNET_PACKAGE_IDS },\n\ttestnet: { ...TESTNET_PACKAGE_IDS },\n};\n\nexport const COIN_TYPES: SuiNetworkRegistry<SuigarCoinTypes> = {\n\tmainnet: { ...MAINNET_COIN_TYPES },\n\ttestnet: { ...TESTNET_COIN_TYPES },\n};\n\nexport const PRICE_INFO_OBJECT_IDS: SuiNetworkRegistry<SuigarPriceInfoObjectIds> =\n\t{\n\t\tmainnet: { ...MAINNET_PRICE_INFO_OBJECT_IDS },\n\t\ttestnet: { ...TESTNET_PRICE_INFO_OBJECT_IDS },\n\t};\n"],"mappings":";;;AAoBA,MAAa,cAAoD;CAChE,SAAS,EAAE,GAAG,qBAAqB;CACnC,SAAS,EAAE,GAAG,qBAAqB;CACnC;AAED,MAAa,aAAkD;CAC9D,SAAS,EAAE,GAAG,oBAAoB;CAClC,SAAS,EAAE,GAAG,oBAAoB;CAClC;AAED,MAAa,wBACZ;CACC,SAAS,EAAE,GAAG,+BAA+B;CAC7C,SAAS,EAAE,GAAG,+BAA+B;CAC7C"}
1
+ {"version":3,"file":"package.mjs","names":[],"sources":["../../src/configs/package.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tSuigarCoinTypes,\n\tSuigarPackageIds,\n\tSuigarPriceInfoObjectIds,\n\tSuiNetworkRegistry,\n} from '../types/suigar-config.type.js';\nimport {\n\tMAINNET_COIN_TYPES,\n\tMAINNET_PACKAGE_IDS,\n\tMAINNET_PRICE_INFO_OBJECT_IDS,\n} from './package.mainnet.js';\nimport {\n\tTESTNET_COIN_TYPES,\n\tTESTNET_PACKAGE_IDS,\n\tTESTNET_PRICE_INFO_OBJECT_IDS,\n} from './package.testnet.js';\n\nexport const PACKAGE_IDS: SuiNetworkRegistry<SuigarPackageIds> = {\n\tmainnet: { ...MAINNET_PACKAGE_IDS },\n\ttestnet: { ...TESTNET_PACKAGE_IDS },\n};\n\nexport const COIN_TYPES: SuiNetworkRegistry<SuigarCoinTypes> = {\n\tmainnet: { ...MAINNET_COIN_TYPES },\n\ttestnet: { ...TESTNET_COIN_TYPES },\n};\n\nexport const PRICE_INFO_OBJECT_IDS: SuiNetworkRegistry<SuigarPriceInfoObjectIds> =\n\t{\n\t\tmainnet: { ...MAINNET_PRICE_INFO_OBJECT_IDS },\n\t\ttestnet: { ...TESTNET_PRICE_INFO_OBJECT_IDS },\n\t};\n"],"mappings":";;;AAoBA,MAAa,cAAoD;CAChE,SAAS,EAAE,GAAG,oBAAoB;CAClC,SAAS,EAAE,GAAG,oBAAoB;AACnC;AAEA,MAAa,aAAkD;CAC9D,SAAS,EAAE,GAAG,mBAAmB;CACjC,SAAS,EAAE,GAAG,mBAAmB;AAClC;AAEA,MAAa,wBACZ;CACC,SAAS,EAAE,GAAG,8BAA8B;CAC5C,SAAS,EAAE,GAAG,8BAA8B;AAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"package.testnet.mjs","names":[],"sources":["../../src/configs/package.testnet.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tSuigarCoinTypes,\n\tSuigarPackageIds,\n\tSuigarPriceInfoObjectIds,\n} from '../types/suigar-config.type.js';\n\n// `sweetHouse` is preserved manually because it is not currently resolved from MVR.\nexport const TESTNET_PACKAGE_IDS: SuigarPackageIds = {\n\tsweetHouse:\n\t\t'0xb7f64e5a273aba1ede00caa0a6f8027cc7490c279d17eab12e7100ed20660603',\n\tcore: '0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc',\n\tcoinflip:\n\t\t'0xb35c5f286c443752afc8ccb40125a578a4f32df35617170ccfa17fe180ab80ea',\n\tlimbo: '0x96c7841b9b32c59a219760fd656f1c3aceb53cc74a68ec9844a3a696374309f4',\n\tplinko: '0xd3dd2200883af10811724f0bed97591ad155a02efd6332d471ff8b346030dfb7',\n\tpvpCoinflip:\n\t\t'0xb43cf6583c0c15315c7e66f173af4be79ac40c38aad1fd92ec08638ab2026202',\n\trange: '0x096a4cf18b3661e76b2c62b90785418345d52f45b272448794f123a4cb6b6416',\n\twheel: '0x0997852ded7e13301c42317004bc49704a893aa82997c5706cebee59053a31b7',\n};\n\nexport const TESTNET_COIN_TYPES: SuigarCoinTypes = {\n\tsui: '0x47c67b9594069c32caa7a6e875ddf31d7fa52602dd22ccb9ebd8d3482aed76dc::test_sui::TEST_SUI',\n\tusdc: '0x47c67b9594069c32caa7a6e875ddf31d7fa52602dd22ccb9ebd8d3482aed76dc::test_usdc::TEST_USDC',\n};\n\nexport const TESTNET_PRICE_INFO_OBJECT_IDS: SuigarPriceInfoObjectIds = {\n\tsui: '0x1ebb295c789cc42b3b2a1606482cd1c7124076a0f5676718501fda8c7fd075a0',\n\tusdc: '0x9c4dd4008297ffa5e480684b8100ec21cc934405ed9a25d4e4d7b6259aad9c81',\n};\n"],"mappings":";AAUA,MAAa,sBAAwC;CACpD,YACC;CACD,MAAM;CACN,UACC;CACD,OAAO;CACP,QAAQ;CACR,aACC;CACD,OAAO;CACP,OAAO;CACP;AAED,MAAa,qBAAsC;CAClD,KAAK;CACL,MAAM;CACN;AAED,MAAa,gCAA0D;CACtE,KAAK;CACL,MAAM;CACN"}
1
+ {"version":3,"file":"package.testnet.mjs","names":[],"sources":["../../src/configs/package.testnet.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tSuigarCoinTypes,\n\tSuigarPackageIds,\n\tSuigarPriceInfoObjectIds,\n} from '../types/suigar-config.type.js';\n\n// `sweetHouse` is preserved manually because it is not currently resolved from MVR.\nexport const TESTNET_PACKAGE_IDS: SuigarPackageIds = {\n\tsweetHouse:\n\t\t'0xb7f64e5a273aba1ede00caa0a6f8027cc7490c279d17eab12e7100ed20660603',\n\tcore: '0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc',\n\tcoinflip:\n\t\t'0xb35c5f286c443752afc8ccb40125a578a4f32df35617170ccfa17fe180ab80ea',\n\tlimbo: '0x96c7841b9b32c59a219760fd656f1c3aceb53cc74a68ec9844a3a696374309f4',\n\tplinko: '0xd3dd2200883af10811724f0bed97591ad155a02efd6332d471ff8b346030dfb7',\n\tpvpCoinflip:\n\t\t'0xb43cf6583c0c15315c7e66f173af4be79ac40c38aad1fd92ec08638ab2026202',\n\trange: '0x096a4cf18b3661e76b2c62b90785418345d52f45b272448794f123a4cb6b6416',\n\twheel: '0x0997852ded7e13301c42317004bc49704a893aa82997c5706cebee59053a31b7',\n};\n\nexport const TESTNET_COIN_TYPES: SuigarCoinTypes = {\n\tsui: '0x47c67b9594069c32caa7a6e875ddf31d7fa52602dd22ccb9ebd8d3482aed76dc::test_sui::TEST_SUI',\n\tusdc: '0x47c67b9594069c32caa7a6e875ddf31d7fa52602dd22ccb9ebd8d3482aed76dc::test_usdc::TEST_USDC',\n};\n\nexport const TESTNET_PRICE_INFO_OBJECT_IDS: SuigarPriceInfoObjectIds = {\n\tsui: '0x1ebb295c789cc42b3b2a1606482cd1c7124076a0f5676718501fda8c7fd075a0',\n\tusdc: '0x9c4dd4008297ffa5e480684b8100ec21cc934405ed9a25d4e4d7b6259aad9c81',\n};\n"],"mappings":";AAUA,MAAa,sBAAwC;CACpD,YACC;CACD,MAAM;CACN,UACC;CACD,OAAO;CACP,QAAQ;CACR,aACC;CACD,OAAO;CACP,OAAO;AACR;AAEA,MAAa,qBAAsC;CAClD,KAAK;CACL,MAAM;AACP;AAEA,MAAa,gCAA0D;CACtE,KAAK;CACL,MAAM;AACP"}
@@ -1 +1 @@
1
- {"version":3,"file":"registry.mainnet.mjs","names":[],"sources":["../../src/configs/registry.mainnet.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SuigarRegistryIds } from '../types';\n\nexport const MAINNET_REGISTRY_IDS: SuigarRegistryIds = {\n\tpvpCoinflip:\n\t\t'0x3d73568546c539c1da3eb2b8fe917faef3c0acdbec78a67fe6d52800a0729349',\n};\n"],"mappings":";AAKA,MAAa,uBAA0C,EACtD,aACC,sEACD"}
1
+ {"version":3,"file":"registry.mainnet.mjs","names":[],"sources":["../../src/configs/registry.mainnet.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SuigarRegistryIds } from '../types';\n\nexport const MAINNET_REGISTRY_IDS: SuigarRegistryIds = {\n\tpvpCoinflip:\n\t\t'0x3d73568546c539c1da3eb2b8fe917faef3c0acdbec78a67fe6d52800a0729349',\n};\n"],"mappings":";AAKA,MAAa,uBAA0C,EACtD,aACC,qEACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"registry.mjs","names":[],"sources":["../../src/configs/registry.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tSuigarRegistryIds,\n\tSuiNetworkRegistry,\n} from '../types/suigar-config.type.js';\nimport { MAINNET_REGISTRY_IDS } from './registry.mainnet.js';\nimport { TESTNET_REGISTRY_IDS } from './registry.testnet.js';\n\nexport const REGISTRY_IDS: SuiNetworkRegistry<SuigarRegistryIds> = {\n\tmainnet: { ...MAINNET_REGISTRY_IDS },\n\ttestnet: { ...TESTNET_REGISTRY_IDS },\n};\n"],"mappings":";;;AAUA,MAAa,eAAsD;CAClE,SAAS,EAAE,GAAG,sBAAsB;CACpC,SAAS,EAAE,GAAG,sBAAsB;CACpC"}
1
+ {"version":3,"file":"registry.mjs","names":[],"sources":["../../src/configs/registry.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tSuigarRegistryIds,\n\tSuiNetworkRegistry,\n} from '../types/suigar-config.type.js';\nimport { MAINNET_REGISTRY_IDS } from './registry.mainnet.js';\nimport { TESTNET_REGISTRY_IDS } from './registry.testnet.js';\n\nexport const REGISTRY_IDS: SuiNetworkRegistry<SuigarRegistryIds> = {\n\tmainnet: { ...MAINNET_REGISTRY_IDS },\n\ttestnet: { ...TESTNET_REGISTRY_IDS },\n};\n"],"mappings":";;;AAUA,MAAa,eAAsD;CAClE,SAAS,EAAE,GAAG,qBAAqB;CACnC,SAAS,EAAE,GAAG,qBAAqB;AACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"registry.testnet.mjs","names":[],"sources":["../../src/configs/registry.testnet.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SuigarRegistryIds } from '../types';\n\nexport const TESTNET_REGISTRY_IDS: SuigarRegistryIds = {\n\tpvpCoinflip:\n\t\t'0x99f20d8e4be012ea14a681144ae72ac349d0a1a1585205880183eb167f075bad',\n};\n"],"mappings":";AAKA,MAAa,uBAA0C,EACtD,aACC,sEACD"}
1
+ {"version":3,"file":"registry.testnet.mjs","names":[],"sources":["../../src/configs/registry.testnet.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport { SuigarRegistryIds } from '../types';\n\nexport const TESTNET_REGISTRY_IDS: SuigarRegistryIds = {\n\tpvpCoinflip:\n\t\t'0x99f20d8e4be012ea14a681144ae72ac349d0a1a1585205880183eb167f075bad',\n};\n"],"mappings":";AAKA,MAAa,uBAA0C,EACtD,aACC,qEACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"coinflip.mjs","names":[],"sources":["../../../src/contracts/coinflip/coinflip.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { type Transaction } from '@mysten/sui/transactions';\nimport {\n\tMoveStruct,\n\tnormalizeMoveArguments,\n\ttype RawTransactionArgument,\n} from '../utils/index.js';\n\nconst $moduleName =\n\t'0xb35c5f286c443752afc8ccb40125a578a4f32df35617170ccfa17fe180ab80ea::coinflip';\nexport const CoinFlipSettingsKey = new MoveStruct({\n\tname: `${$moduleName}::CoinFlipSettingsKey`,\n\tfields: {\n\t\tdummy_field: bcs.bool(),\n\t},\n});\nexport const Parameters = new MoveStruct({\n\tname: `${$moduleName}::Parameters<phantom T0>`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\thouse_edge: bcs.u64(),\n\t\tmin_stake: bcs.u64(),\n\t\tmax_stake: bcs.u64(),\n\t},\n});\nexport interface PlayOptions {\n\tpackage?: string;\n\targuments: [\n\t\tRawTransactionArgument<string>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<string>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<boolean>,\n\t\tRawTransactionArgument<Array<string>>,\n\t\tRawTransactionArgument<Array<Array<number>>>,\n\t\tRawTransactionArgument<string>,\n\t];\n\ttypeArguments: [string];\n}\nexport function play(options: PlayOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\t'0xb35c5f286c443752afc8ccb40125a578a4f32df35617170ccfa17fe180ab80ea';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\t'u64',\n\t\tnull,\n\t\t'u64',\n\t\t'bool',\n\t\t'vector<0x1::string::String>',\n\t\t'vector<vector<u8>>',\n\t\tnull,\n\t\t'0x2::clock::Clock',\n\t\t'0x2::random::Random',\n\t] satisfies (string | null)[];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'coinflip',\n\t\t\tfunction: 'play',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\n"],"mappings":";;;;;;AAWA,MAAM,cACL;AACD,MAAa,sBAAsB,IAAI,WAAW;CACjD,MAAM,GAAG,YAAY;CACrB,QAAQ,EACP,aAAa,IAAI,MAAM,EACvB;CACD,CAAC;AACF,MAAa,aAAa,IAAI,WAAW;CACxC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,IAAI,IAAI;EACR,YAAY,IAAI,KAAK;EACrB,WAAW,IAAI,KAAK;EACpB,WAAW,IAAI,KAAK;EACpB;CACD,CAAC;AAeF,SAAgB,KAAK,SAAsB;CAC1C,MAAM,iBACL,QAAQ,WACR;CACD,MAAM,iBAAiB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,QAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,eAAe;EACpE,eAAe,QAAQ;EACvB,CAAC"}
1
+ {"version":3,"file":"coinflip.mjs","names":[],"sources":["../../../src/contracts/coinflip/coinflip.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { type Transaction } from '@mysten/sui/transactions';\nimport {\n\tMoveStruct,\n\tnormalizeMoveArguments,\n\ttype RawTransactionArgument,\n} from '../utils/index.js';\n\nconst $moduleName =\n\t'0xb35c5f286c443752afc8ccb40125a578a4f32df35617170ccfa17fe180ab80ea::coinflip';\nexport const CoinFlipSettingsKey = new MoveStruct({\n\tname: `${$moduleName}::CoinFlipSettingsKey`,\n\tfields: {\n\t\tdummy_field: bcs.bool(),\n\t},\n});\nexport const Parameters = new MoveStruct({\n\tname: `${$moduleName}::Parameters<phantom T0>`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\thouse_edge: bcs.u64(),\n\t\tmin_stake: bcs.u64(),\n\t\tmax_stake: bcs.u64(),\n\t},\n});\nexport interface PlayOptions {\n\tpackage?: string;\n\targuments: [\n\t\tRawTransactionArgument<string>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<string>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<boolean>,\n\t\tRawTransactionArgument<Array<string>>,\n\t\tRawTransactionArgument<Array<Array<number>>>,\n\t\tRawTransactionArgument<string>,\n\t];\n\ttypeArguments: [string];\n}\nexport function play(options: PlayOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\t'0xb35c5f286c443752afc8ccb40125a578a4f32df35617170ccfa17fe180ab80ea';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\t'u64',\n\t\tnull,\n\t\t'u64',\n\t\t'bool',\n\t\t'vector<0x1::string::String>',\n\t\t'vector<vector<u8>>',\n\t\tnull,\n\t\t'0x2::clock::Clock',\n\t\t'0x2::random::Random',\n\t] satisfies (string | null)[];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'coinflip',\n\t\t\tfunction: 'play',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\n"],"mappings":";;;;;;AAWA,MAAM,cACL;AACD,MAAa,sBAAsB,IAAI,WAAW;CACjD,MAAM,GAAG,YAAY;CACrB,QAAQ,EACP,aAAa,IAAI,KAAK,EACvB;AACD,CAAC;AACD,MAAa,aAAa,IAAI,WAAW;CACxC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,IAAI,IAAI;EACR,YAAY,IAAI,IAAI;EACpB,WAAW,IAAI,IAAI;EACnB,WAAW,IAAI,IAAI;CACpB;AACD,CAAC;AAeD,SAAgB,KAAK,SAAsB;CAC1C,MAAM,iBACL,QAAQ,WACR;CACD,MAAM,iBAAiB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACA,QAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,cAAc;EACnE,eAAe,QAAQ;CACxB,CAAC;AACH"}
@@ -1,30 +1,29 @@
1
1
  import { MoveStruct } from "../utils/index.mjs";
2
- import * as _$_mysten_bcs0 from "@mysten/bcs";
3
2
 
4
3
  //#region src/contracts/core/core.d.ts
5
4
  declare const BetResultEvent: MoveStruct<{
6
- player: _$_mysten_bcs0.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
5
+ player: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
7
6
  coin_type: MoveStruct<{
8
- name: _$_mysten_bcs0.BcsType<string, string, "string">;
7
+ name: import("@mysten/bcs").BcsType<string, string, "string">;
9
8
  }, "0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName">;
10
- stake_amount: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
9
+ stake_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
11
10
  unsafe_oracle_usd_coin_price: MoveStruct<{
12
- is_negative: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
11
+ is_negative: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
13
12
  exp: MoveStruct<{
14
- bits: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
13
+ bits: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
15
14
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64::I64">;
16
- mant: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
15
+ mant: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
17
16
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float::Float">;
18
17
  adjusted_oracle_usd_coin_price: MoveStruct<{
19
- is_negative: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
18
+ is_negative: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
20
19
  exp: MoveStruct<{
21
- bits: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
20
+ bits: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
22
21
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64::I64">;
23
- mant: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
22
+ mant: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
24
23
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float::Float">;
25
- outcome_amount: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
24
+ outcome_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
26
25
  game_details: MoveStruct<{
27
- contents: _$_mysten_bcs0.BcsType<{
26
+ contents: import("@mysten/bcs").BcsType<{
28
27
  key: string;
29
28
  value: number[];
30
29
  }[], Iterable<{
@@ -37,7 +36,7 @@ declare const BetResultEvent: MoveStruct<{
37
36
  }, string>;
38
37
  }, "0x2::vec_map::VecMap<string, vector<u8>>">;
39
38
  metadata: MoveStruct<{
40
- contents: _$_mysten_bcs0.BcsType<{
39
+ contents: import("@mysten/bcs").BcsType<{
41
40
  key: string;
42
41
  value: number[];
43
42
  }[], Iterable<{
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.mts","names":[],"sources":["../../../src/contracts/core/core.ts"],"mappings":";;;;cAWa,cAAA,EAAc,UAAA"}
1
+ {"version":3,"file":"core.d.mts","names":[],"sources":["../../../src/contracts/core/core.ts"],"mappings":";;;cAWa,cAAA,EAAc,UAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"core.mjs","names":["type_name.TypeName","float.Float","vec_map.VecMap"],"sources":["../../../src/contracts/core/core.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../utils/index.js';\nimport * as type_name from './deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.js';\nimport * as vec_map from './deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.js';\nimport * as float from './float.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::core';\nexport const BetResultEvent = new MoveStruct({\n\tname: `${$moduleName}::BetResultEvent<phantom T0>`,\n\tfields: {\n\t\tplayer: bcs.Address,\n\t\tcoin_type: type_name.TypeName,\n\t\tstake_amount: bcs.u64(),\n\t\tunsafe_oracle_usd_coin_price: float.Float,\n\t\tadjusted_oracle_usd_coin_price: float.Float,\n\t\toutcome_amount: bcs.u64(),\n\t\tgame_details: vec_map.VecMap(bcs.string(), bcs.vector(bcs.u8())),\n\t\tmetadata: vec_map.VecMap(bcs.string(), bcs.vector(bcs.u8())),\n\t},\n});\n"],"mappings":";;;;;AAWA,MAAa,iBAAiB,IAAI,WAAW;CAC5C,MAAM;CACN,QAAQ;EACP,QAAQ,IAAI;EACZ,WAAWA;EACX,cAAc,IAAI,KAAK;EACvB,8BAA8BC;EAC9B,gCAAgCA;EAChC,gBAAgB,IAAI,KAAK;EACzB,cAAcC,OAAe,IAAI,QAAQ,EAAE,IAAI,OAAO,IAAI,IAAI,CAAC,CAAC;EAChE,UAAUA,OAAe,IAAI,QAAQ,EAAE,IAAI,OAAO,IAAI,IAAI,CAAC,CAAC;EAC5D;CACD,CAAC"}
1
+ {"version":3,"file":"core.mjs","names":["type_name.TypeName","float.Float","vec_map.VecMap"],"sources":["../../../src/contracts/core/core.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../utils/index.js';\nimport * as type_name from './deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.js';\nimport * as vec_map from './deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.js';\nimport * as float from './float.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::core';\nexport const BetResultEvent = new MoveStruct({\n\tname: `${$moduleName}::BetResultEvent<phantom T0>`,\n\tfields: {\n\t\tplayer: bcs.Address,\n\t\tcoin_type: type_name.TypeName,\n\t\tstake_amount: bcs.u64(),\n\t\tunsafe_oracle_usd_coin_price: float.Float,\n\t\tadjusted_oracle_usd_coin_price: float.Float,\n\t\toutcome_amount: bcs.u64(),\n\t\tgame_details: vec_map.VecMap(bcs.string(), bcs.vector(bcs.u8())),\n\t\tmetadata: vec_map.VecMap(bcs.string(), bcs.vector(bcs.u8())),\n\t},\n});\n"],"mappings":";;;;;AAWA,MAAa,iBAAiB,IAAI,WAAW;CAC5C,MAAM;CACN,QAAQ;EACP,QAAQ,IAAI;EACZ,WAAWA;EACX,cAAc,IAAI,IAAI;EACtB,8BAA8BC;EAC9B,gCAAgCA;EAChC,gBAAgB,IAAI,IAAI;EACxB,cAAcC,OAAe,IAAI,OAAO,GAAG,IAAI,OAAO,IAAI,GAAG,CAAC,CAAC;EAC/D,UAAUA,OAAe,IAAI,OAAO,GAAG,IAAI,OAAO,IAAI,GAAG,CAAC,CAAC;CAC5D;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"type_name.mjs","names":[],"sources":["../../../../../src/contracts/core/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName =\n\t'0x0000000000000000000000000000000000000000000000000000000000000001::type_name';\nexport const TypeName = new MoveStruct({\n\tname: `${$moduleName}::TypeName`,\n\tfields: {\n\t\tname: bcs.string(),\n\t},\n});\n"],"mappings":";;AAQA,MAAa,WAAW,IAAI,WAAW;CACtC,MAAM;CACN,QAAQ,EACP,MAAM,IAAI,QAAQ,EAClB;CACD,CAAC"}
1
+ {"version":3,"file":"type_name.mjs","names":[],"sources":["../../../../../src/contracts/core/deps/0x0000000000000000000000000000000000000000000000000000000000000001/type_name.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName =\n\t'0x0000000000000000000000000000000000000000000000000000000000000001::type_name';\nexport const TypeName = new MoveStruct({\n\tname: `${$moduleName}::TypeName`,\n\tfields: {\n\t\tname: bcs.string(),\n\t},\n});\n"],"mappings":";;AAQA,MAAa,WAAW,IAAI,WAAW;CACtC,MAAM;CACN,QAAQ,EACP,MAAM,IAAI,OAAO,EAClB;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"vec_map.mjs","names":[],"sources":["../../../../../src/contracts/core/deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs, type BcsType } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName = '0x2::vec_map';\nexport function Entry<T0 extends BcsType<any>, T1 extends BcsType<any>>(\n\t...typeParameters: [T0, T1]\n) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::Entry<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,\n\t\tfields: {\n\t\t\tkey: typeParameters[0],\n\t\t\tvalue: typeParameters[1],\n\t\t},\n\t});\n}\nexport function VecMap<T0 extends BcsType<any>, T1 extends BcsType<any>>(\n\t...typeParameters: [T0, T1]\n) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::VecMap<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,\n\t\tfields: {\n\t\t\tcontents: bcs.vector(Entry(typeParameters[0], typeParameters[1])),\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;AAMA,MAAM,cAAc;AACpB,SAAgB,MACf,GAAG,gBACF;CACD,OAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,UAAU,eAAe,GAAG,KAAmB,IAAI,eAAe,GAAG,KAAmB;EAC7G,QAAQ;GACP,KAAK,eAAe;GACpB,OAAO,eAAe;GACtB;EACD,CAAC;;AAEH,SAAgB,OACf,GAAG,gBACF;CACD,OAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,WAAW,eAAe,GAAG,KAAmB,IAAI,eAAe,GAAG,KAAmB;EAC9G,QAAQ,EACP,UAAU,IAAI,OAAO,MAAM,eAAe,IAAI,eAAe,GAAG,CAAC,EACjE;EACD,CAAC"}
1
+ {"version":3,"file":"vec_map.mjs","names":[],"sources":["../../../../../src/contracts/core/deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs, type BcsType } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName = '0x2::vec_map';\nexport function Entry<T0 extends BcsType<any>, T1 extends BcsType<any>>(\n\t...typeParameters: [T0, T1]\n) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::Entry<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,\n\t\tfields: {\n\t\t\tkey: typeParameters[0],\n\t\t\tvalue: typeParameters[1],\n\t\t},\n\t});\n}\nexport function VecMap<T0 extends BcsType<any>, T1 extends BcsType<any>>(\n\t...typeParameters: [T0, T1]\n) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::VecMap<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,\n\t\tfields: {\n\t\t\tcontents: bcs.vector(Entry(typeParameters[0], typeParameters[1])),\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;AAMA,MAAM,cAAc;AACpB,SAAgB,MACf,GAAG,gBACF;CACD,OAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,UAAU,eAAe,GAAG,KAAmB,IAAI,eAAe,GAAG,KAAmB;EAC7G,QAAQ;GACP,KAAK,eAAe;GACpB,OAAO,eAAe;EACvB;CACD,CAAC;AACF;AACA,SAAgB,OACf,GAAG,gBACF;CACD,OAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,WAAW,eAAe,GAAG,KAAmB,IAAI,eAAe,GAAG,KAAmB;EAC9G,QAAQ,EACP,UAAU,IAAI,OAAO,MAAM,eAAe,IAAI,eAAe,EAAE,CAAC,EACjE;CACD,CAAC;AACF"}
@@ -1,13 +1,12 @@
1
1
  import { MoveStruct } from "../utils/index.mjs";
2
- import * as _$_mysten_bcs0 from "@mysten/bcs";
3
2
 
4
3
  //#region src/contracts/core/float.d.ts
5
4
  declare const Float: MoveStruct<{
6
- is_negative: _$_mysten_bcs0.BcsType<boolean, boolean, "bool">;
5
+ is_negative: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
7
6
  exp: MoveStruct<{
8
- bits: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
7
+ bits: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
9
8
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64::I64">;
10
- mant: _$_mysten_bcs0.BcsType<string, string | number | bigint, "u64">;
9
+ mant: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
11
10
  }, "0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float::Float">;
12
11
  //#endregion
13
12
  export { Float };
@@ -1 +1 @@
1
- {"version":3,"file":"float.d.mts","names":[],"sources":["../../../src/contracts/core/float.ts"],"mappings":";;;;cASa,KAAA,EAAK,UAAA;eAOhB,cAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"float.d.mts","names":[],"sources":["../../../src/contracts/core/float.ts"],"mappings":";;;cASa,KAAA,EAAK,UAAA;;OAOhB,UAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"float.mjs","names":["i64.I64"],"sources":["../../../src/contracts/core/float.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../utils/index.js';\nimport * as i64 from './i64.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float';\nexport const Float = new MoveStruct({\n\tname: `${$moduleName}::Float`,\n\tfields: {\n\t\tis_negative: bcs.bool(),\n\t\texp: i64.I64,\n\t\tmant: bcs.u64(),\n\t},\n});\n"],"mappings":";;;AASA,MAAa,QAAQ,IAAI,WAAW;CACnC,MAAM;CACN,QAAQ;EACP,aAAa,IAAI,MAAM;EACvB,KAAKA;EACL,MAAM,IAAI,KAAK;EACf;CACD,CAAC"}
1
+ {"version":3,"file":"float.mjs","names":["i64.I64"],"sources":["../../../src/contracts/core/float.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../utils/index.js';\nimport * as i64 from './i64.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float';\nexport const Float = new MoveStruct({\n\tname: `${$moduleName}::Float`,\n\tfields: {\n\t\tis_negative: bcs.bool(),\n\t\texp: i64.I64,\n\t\tmant: bcs.u64(),\n\t},\n});\n"],"mappings":";;;AASA,MAAa,QAAQ,IAAI,WAAW;CACnC,MAAM;CACN,QAAQ;EACP,aAAa,IAAI,KAAK;EACtB,KAAKA;EACL,MAAM,IAAI,IAAI;CACf;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"i64.mjs","names":[],"sources":["../../../src/contracts/core/i64.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../utils/index.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64';\nexport const I64 = new MoveStruct({\n\tname: `${$moduleName}::I64`,\n\tfields: {\n\t\tbits: bcs.u64(),\n\t},\n});\n"],"mappings":";;AAQA,MAAa,MAAM,IAAI,WAAW;CACjC,MAAM;CACN,QAAQ,EACP,MAAM,IAAI,KAAK,EACf;CACD,CAAC"}
1
+ {"version":3,"file":"i64.mjs","names":[],"sources":["../../../src/contracts/core/i64.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../utils/index.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64';\nexport const I64 = new MoveStruct({\n\tname: `${$moduleName}::I64`,\n\tfields: {\n\t\tbits: bcs.u64(),\n\t},\n});\n"],"mappings":";;AAQA,MAAa,MAAM,IAAI,WAAW;CACjC,MAAM;CACN,QAAQ,EACP,MAAM,IAAI,IAAI,EACf;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"float.mjs","names":["i64.I64"],"sources":["../../../../../src/contracts/limbo/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\nimport * as i64 from './i64.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float';\nexport const Float = new MoveStruct({\n\tname: `${$moduleName}::Float`,\n\tfields: {\n\t\tis_negative: bcs.bool(),\n\t\texp: i64.I64,\n\t\tmant: bcs.u64(),\n\t},\n});\n"],"mappings":";;;AASA,MAAa,QAAQ,IAAI,WAAW;CACnC,MAAM;CACN,QAAQ;EACP,aAAa,IAAI,MAAM;EACvB,KAAKA;EACL,MAAM,IAAI,KAAK;EACf;CACD,CAAC"}
1
+ {"version":3,"file":"float.mjs","names":["i64.I64"],"sources":["../../../../../src/contracts/limbo/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\nimport * as i64 from './i64.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float';\nexport const Float = new MoveStruct({\n\tname: `${$moduleName}::Float`,\n\tfields: {\n\t\tis_negative: bcs.bool(),\n\t\texp: i64.I64,\n\t\tmant: bcs.u64(),\n\t},\n});\n"],"mappings":";;;AASA,MAAa,QAAQ,IAAI,WAAW;CACnC,MAAM;CACN,QAAQ;EACP,aAAa,IAAI,KAAK;EACtB,KAAKA;EACL,MAAM,IAAI,IAAI;CACf;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"i64.mjs","names":[],"sources":["../../../../../src/contracts/limbo/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/i64.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64';\nexport const I64 = new MoveStruct({\n\tname: `${$moduleName}::I64`,\n\tfields: {\n\t\tbits: bcs.u64(),\n\t},\n});\n"],"mappings":";;AAQA,MAAa,MAAM,IAAI,WAAW;CACjC,MAAM;CACN,QAAQ,EACP,MAAM,IAAI,KAAK,EACf;CACD,CAAC"}
1
+ {"version":3,"file":"i64.mjs","names":[],"sources":["../../../../../src/contracts/limbo/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/i64.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64';\nexport const I64 = new MoveStruct({\n\tname: `${$moduleName}::I64`,\n\tfields: {\n\t\tbits: bcs.u64(),\n\t},\n});\n"],"mappings":";;AAQA,MAAa,MAAM,IAAI,WAAW;CACjC,MAAM;CACN,QAAQ,EACP,MAAM,IAAI,IAAI,EACf;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"limbo.mjs","names":["float.Float"],"sources":["../../../src/contracts/limbo/limbo.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { type Transaction } from '@mysten/sui/transactions';\nimport {\n\tMoveStruct,\n\tnormalizeMoveArguments,\n\ttype RawTransactionArgument,\n} from '../utils/index.js';\nimport * as float from './deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.js';\n\nconst $moduleName =\n\t'0x96c7841b9b32c59a219760fd656f1c3aceb53cc74a68ec9844a3a696374309f4::limbo';\nexport const LimboSettingsKey = new MoveStruct({\n\tname: `${$moduleName}::LimboSettingsKey`,\n\tfields: {\n\t\tdummy_field: bcs.bool(),\n\t},\n});\nexport const Parameters = new MoveStruct({\n\tname: `${$moduleName}::Parameters<phantom T0>`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\tmin_stake: bcs.u64(),\n\t\tmax_stake: bcs.u64(),\n\t\tmax_payout: bcs.u64(),\n\t\tmin_target_multiplier: float.Float,\n\t\tmax_target_multiplier: float.Float,\n\t\tmax_number_of_games: bcs.u64(),\n\t\tmin_rtp: float.Float,\n\t\tmax_rtp: float.Float,\n\t},\n});\nexport interface PlayOptions {\n\tpackage?: string;\n\targuments: [\n\t\tRawTransactionArgument<string>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<string>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<Array<string>>,\n\t\tRawTransactionArgument<Array<Array<number>>>,\n\t\tRawTransactionArgument<string>,\n\t];\n\ttypeArguments: [string];\n}\nexport function play(options: PlayOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\t'0x96c7841b9b32c59a219760fd656f1c3aceb53cc74a68ec9844a3a696374309f4';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\t'u64',\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'vector<0x1::string::String>',\n\t\t'vector<vector<u8>>',\n\t\tnull,\n\t\t'0x2::clock::Clock',\n\t\t'0x2::random::Random',\n\t] satisfies (string | null)[];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'limbo',\n\t\t\tfunction: 'play',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\n"],"mappings":";;;;;;;AAYA,MAAM,cACL;AACD,MAAa,mBAAmB,IAAI,WAAW;CAC9C,MAAM,GAAG,YAAY;CACrB,QAAQ,EACP,aAAa,IAAI,MAAM,EACvB;CACD,CAAC;AACF,MAAa,aAAa,IAAI,WAAW;CACxC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,IAAI,IAAI;EACR,WAAW,IAAI,KAAK;EACpB,WAAW,IAAI,KAAK;EACpB,YAAY,IAAI,KAAK;EACrB,uBAAuBA;EACvB,uBAAuBA;EACvB,qBAAqB,IAAI,KAAK;EAC9B,SAASA;EACT,SAASA;EACT;CACD,CAAC;AAgBF,SAAgB,KAAK,SAAsB;CAC1C,MAAM,iBACL,QAAQ,WACR;CACD,MAAM,iBAAiB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,QAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,eAAe;EACpE,eAAe,QAAQ;EACvB,CAAC"}
1
+ {"version":3,"file":"limbo.mjs","names":["float.Float"],"sources":["../../../src/contracts/limbo/limbo.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { type Transaction } from '@mysten/sui/transactions';\nimport {\n\tMoveStruct,\n\tnormalizeMoveArguments,\n\ttype RawTransactionArgument,\n} from '../utils/index.js';\nimport * as float from './deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.js';\n\nconst $moduleName =\n\t'0x96c7841b9b32c59a219760fd656f1c3aceb53cc74a68ec9844a3a696374309f4::limbo';\nexport const LimboSettingsKey = new MoveStruct({\n\tname: `${$moduleName}::LimboSettingsKey`,\n\tfields: {\n\t\tdummy_field: bcs.bool(),\n\t},\n});\nexport const Parameters = new MoveStruct({\n\tname: `${$moduleName}::Parameters<phantom T0>`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\tmin_stake: bcs.u64(),\n\t\tmax_stake: bcs.u64(),\n\t\tmax_payout: bcs.u64(),\n\t\tmin_target_multiplier: float.Float,\n\t\tmax_target_multiplier: float.Float,\n\t\tmax_number_of_games: bcs.u64(),\n\t\tmin_rtp: float.Float,\n\t\tmax_rtp: float.Float,\n\t},\n});\nexport interface PlayOptions {\n\tpackage?: string;\n\targuments: [\n\t\tRawTransactionArgument<string>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<string>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<number | bigint>,\n\t\tRawTransactionArgument<Array<string>>,\n\t\tRawTransactionArgument<Array<Array<number>>>,\n\t\tRawTransactionArgument<string>,\n\t];\n\ttypeArguments: [string];\n}\nexport function play(options: PlayOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\t'0x96c7841b9b32c59a219760fd656f1c3aceb53cc74a68ec9844a3a696374309f4';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\t'u64',\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'vector<0x1::string::String>',\n\t\t'vector<vector<u8>>',\n\t\tnull,\n\t\t'0x2::clock::Clock',\n\t\t'0x2::random::Random',\n\t] satisfies (string | null)[];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'limbo',\n\t\t\tfunction: 'play',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\n"],"mappings":";;;;;;;AAYA,MAAM,cACL;AACD,MAAa,mBAAmB,IAAI,WAAW;CAC9C,MAAM,GAAG,YAAY;CACrB,QAAQ,EACP,aAAa,IAAI,KAAK,EACvB;AACD,CAAC;AACD,MAAa,aAAa,IAAI,WAAW;CACxC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,IAAI,IAAI;EACR,WAAW,IAAI,IAAI;EACnB,WAAW,IAAI,IAAI;EACnB,YAAY,IAAI,IAAI;EACpB,uBAAuBA;EACvB,uBAAuBA;EACvB,qBAAqB,IAAI,IAAI;EAC7B,SAASA;EACT,SAASA;CACV;AACD,CAAC;AAgBD,SAAgB,KAAK,SAAsB;CAC1C,MAAM,iBACL,QAAQ,WACR;CACD,MAAM,iBAAiB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACA,QAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,cAAc;EACnE,eAAe,QAAQ;CACxB,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"vec_map.mjs","names":[],"sources":["../../../../../src/contracts/plinko/deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs, type BcsType } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName = '0x2::vec_map';\nexport function Entry<T0 extends BcsType<any>, T1 extends BcsType<any>>(\n\t...typeParameters: [T0, T1]\n) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::Entry<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,\n\t\tfields: {\n\t\t\tkey: typeParameters[0],\n\t\t\tvalue: typeParameters[1],\n\t\t},\n\t});\n}\nexport function VecMap<T0 extends BcsType<any>, T1 extends BcsType<any>>(\n\t...typeParameters: [T0, T1]\n) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::VecMap<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,\n\t\tfields: {\n\t\t\tcontents: bcs.vector(Entry(typeParameters[0], typeParameters[1])),\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;AAMA,MAAM,cAAc;AACpB,SAAgB,MACf,GAAG,gBACF;CACD,OAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,UAAU,eAAe,GAAG,KAAmB,IAAI,eAAe,GAAG,KAAmB;EAC7G,QAAQ;GACP,KAAK,eAAe;GACpB,OAAO,eAAe;GACtB;EACD,CAAC;;AAEH,SAAgB,OACf,GAAG,gBACF;CACD,OAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,WAAW,eAAe,GAAG,KAAmB,IAAI,eAAe,GAAG,KAAmB;EAC9G,QAAQ,EACP,UAAU,IAAI,OAAO,MAAM,eAAe,IAAI,eAAe,GAAG,CAAC,EACjE;EACD,CAAC"}
1
+ {"version":3,"file":"vec_map.mjs","names":[],"sources":["../../../../../src/contracts/plinko/deps/0x0000000000000000000000000000000000000000000000000000000000000002/vec_map.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs, type BcsType } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName = '0x2::vec_map';\nexport function Entry<T0 extends BcsType<any>, T1 extends BcsType<any>>(\n\t...typeParameters: [T0, T1]\n) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::Entry<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,\n\t\tfields: {\n\t\t\tkey: typeParameters[0],\n\t\t\tvalue: typeParameters[1],\n\t\t},\n\t});\n}\nexport function VecMap<T0 extends BcsType<any>, T1 extends BcsType<any>>(\n\t...typeParameters: [T0, T1]\n) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::VecMap<${typeParameters[0].name as T0['name']}, ${typeParameters[1].name as T1['name']}>`,\n\t\tfields: {\n\t\t\tcontents: bcs.vector(Entry(typeParameters[0], typeParameters[1])),\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;AAMA,MAAM,cAAc;AACpB,SAAgB,MACf,GAAG,gBACF;CACD,OAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,UAAU,eAAe,GAAG,KAAmB,IAAI,eAAe,GAAG,KAAmB;EAC7G,QAAQ;GACP,KAAK,eAAe;GACpB,OAAO,eAAe;EACvB;CACD,CAAC;AACF;AACA,SAAgB,OACf,GAAG,gBACF;CACD,OAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,WAAW,eAAe,GAAG,KAAmB,IAAI,eAAe,GAAG,KAAmB;EAC9G,QAAQ,EACP,UAAU,IAAI,OAAO,MAAM,eAAe,IAAI,eAAe,EAAE,CAAC,EACjE;CACD,CAAC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"float.mjs","names":["i64.I64"],"sources":["../../../../../src/contracts/plinko/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\nimport * as i64 from './i64.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float';\nexport const Float = new MoveStruct({\n\tname: `${$moduleName}::Float`,\n\tfields: {\n\t\tis_negative: bcs.bool(),\n\t\texp: i64.I64,\n\t\tmant: bcs.u64(),\n\t},\n});\n"],"mappings":";;;AASA,MAAa,QAAQ,IAAI,WAAW;CACnC,MAAM;CACN,QAAQ;EACP,aAAa,IAAI,MAAM;EACvB,KAAKA;EACL,MAAM,IAAI,KAAK;EACf;CACD,CAAC"}
1
+ {"version":3,"file":"float.mjs","names":["i64.I64"],"sources":["../../../../../src/contracts/plinko/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/float.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\nimport * as i64 from './i64.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::float';\nexport const Float = new MoveStruct({\n\tname: `${$moduleName}::Float`,\n\tfields: {\n\t\tis_negative: bcs.bool(),\n\t\texp: i64.I64,\n\t\tmant: bcs.u64(),\n\t},\n});\n"],"mappings":";;;AASA,MAAa,QAAQ,IAAI,WAAW;CACnC,MAAM;CACN,QAAQ;EACP,aAAa,IAAI,KAAK;EACtB,KAAKA;EACL,MAAM,IAAI,IAAI;CACf;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"i64.mjs","names":[],"sources":["../../../../../src/contracts/plinko/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/i64.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64';\nexport const I64 = new MoveStruct({\n\tname: `${$moduleName}::I64`,\n\tfields: {\n\t\tbits: bcs.u64(),\n\t},\n});\n"],"mappings":";;AAQA,MAAa,MAAM,IAAI,WAAW;CACjC,MAAM;CACN,QAAQ,EACP,MAAM,IAAI,KAAK,EACf;CACD,CAAC"}
1
+ {"version":3,"file":"i64.mjs","names":[],"sources":["../../../../../src/contracts/plinko/deps/0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc/i64.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\n\nconst $moduleName =\n\t'0xf391858d2a08473e8d4defcc8df89976bd7b123d3865c6b9341b237f7853dbbc::i64';\nexport const I64 = new MoveStruct({\n\tname: `${$moduleName}::I64`,\n\tfields: {\n\t\tbits: bcs.u64(),\n\t},\n});\n"],"mappings":";;AAQA,MAAa,MAAM,IAAI,WAAW;CACjC,MAAM;CACN,QAAQ,EACP,MAAM,IAAI,IAAI,EACf;AACD,CAAC"}