infinite-games-sdk 0.0.0 → 0.0.2

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 (53) hide show
  1. package/README.md +135 -1
  2. package/dist/errors.d.ts +4 -0
  3. package/dist/errors.d.ts.map +1 -0
  4. package/dist/errors.js +11 -0
  5. package/dist/errors.js.map +1 -0
  6. package/dist/history/HistoryClient.d.ts +20 -0
  7. package/dist/history/HistoryClient.d.ts.map +1 -0
  8. package/dist/history/HistoryClient.js +96 -0
  9. package/dist/history/HistoryClient.js.map +1 -0
  10. package/dist/history/index.d.ts +4 -0
  11. package/dist/history/index.d.ts.map +1 -0
  12. package/dist/history/index.js +8 -0
  13. package/dist/history/index.js.map +1 -0
  14. package/dist/history/types.d.ts +14 -0
  15. package/dist/history/types.d.ts.map +1 -0
  16. package/dist/history/types.js +3 -0
  17. package/dist/history/types.js.map +1 -0
  18. package/dist/history/useHistoryClient.d.ts +15 -0
  19. package/dist/history/useHistoryClient.d.ts.map +1 -0
  20. package/dist/history/useHistoryClient.js +84 -0
  21. package/dist/history/useHistoryClient.js.map +1 -0
  22. package/dist/index.d.ts +8 -2
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +20 -8
  25. package/dist/index.js.map +1 -0
  26. package/dist/session/SessionClient.d.ts +38 -0
  27. package/dist/session/SessionClient.d.ts.map +1 -0
  28. package/dist/session/SessionClient.js +129 -0
  29. package/dist/session/SessionClient.js.map +1 -0
  30. package/dist/session/index.d.ts +4 -0
  31. package/dist/session/index.d.ts.map +1 -0
  32. package/dist/session/index.js +10 -0
  33. package/dist/session/index.js.map +1 -0
  34. package/dist/session/tokens.d.ts +15 -0
  35. package/dist/session/tokens.d.ts.map +1 -0
  36. package/dist/session/tokens.js +55 -0
  37. package/dist/session/tokens.js.map +1 -0
  38. package/dist/session/types.d.ts +21 -0
  39. package/dist/session/types.d.ts.map +1 -0
  40. package/dist/session/types.js +3 -0
  41. package/dist/session/types.js.map +1 -0
  42. package/dist/utils/index.d.ts +2 -0
  43. package/dist/utils/index.d.ts.map +1 -0
  44. package/dist/utils/index.js +8 -0
  45. package/dist/utils/index.js.map +1 -0
  46. package/dist/utils/scale.d.ts +4 -0
  47. package/dist/utils/scale.d.ts.map +1 -0
  48. package/dist/utils/scale.js +13 -0
  49. package/dist/utils/scale.js.map +1 -0
  50. package/package.json +22 -14
  51. package/dist/tsconfig.tsbuildinfo +0 -1
  52. package/src/index.ts +0 -7
  53. package/tsconfig.json +0 -17
package/README.md CHANGED
@@ -1 +1,135 @@
1
- # infinite-games-sdk
1
+ # Infinite Games SDK
2
+
3
+ ## Installation
4
+
5
+ ```bash
6
+ pnpm add infinite-games-sdk
7
+ ```
8
+
9
+ ## SessionClient
10
+
11
+ ### Launch a game (from parent site like doubleup-io)
12
+
13
+ ```typescript
14
+ import { SessionClient } from 'infinite-games-sdk';
15
+
16
+ const session = new SessionClient();
17
+
18
+ // Get launch URL with one-time token
19
+ const { launchUrl, origin, token } = await session.getLaunchUrl({
20
+ address: wallet.address,
21
+ signature: await wallet.signMessage('Sign in to Infinite Games'),
22
+ chain: 'sui',
23
+ gameType: 'baccarat',
24
+ });
25
+
26
+ // Load game in iframe
27
+ iframe.src = launchUrl;
28
+ ```
29
+
30
+ ### Initialize session (from game frontend)
31
+
32
+ ```typescript
33
+ import { SessionClient, AuthError } from 'infinite-games-sdk';
34
+
35
+ const session = new SessionClient();
36
+ const urlToken = new URLSearchParams(window.location.search).get('token');
37
+
38
+ try {
39
+ const result = await session.initializeSession(urlToken);
40
+
41
+ if (result.tokenType === 'table_id') {
42
+ // Spectator or returning player - load existing table
43
+ loadTable(result.tableId);
44
+ } else if (result.tokenType === 'ott') {
45
+ // New session - create table with session token
46
+ const table = await createTable(result.sessionToken, coinType);
47
+ }
48
+ } catch (error) {
49
+ if (error instanceof AuthError) {
50
+ showExpiredLinkError();
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Quick token type check (no network call)
56
+
57
+ ```typescript
58
+ const tokenType = session.getTokenType(urlToken);
59
+ // 'ott' | 'table_id' | 'expired_jwt' | 'unknown'
60
+ ```
61
+
62
+ ## HistoryClient
63
+
64
+ ### React hook for game sync and spectating
65
+
66
+ ```typescript
67
+ import { useHistoryClient } from 'infinite-games-sdk';
68
+
69
+ function BaccaratGame({ tableId, coinType, sessionToken }) {
70
+ const isSpectator = !sessionToken;
71
+
72
+ const { isConnected, sendBetUpdate, sendGameReset } = useHistoryClient(
73
+ tableId,
74
+ coinType,
75
+ {
76
+ onGameEvent: (event) => {
77
+ // Game result broadcast - both owner and spectators receive this
78
+ playAnimation(event);
79
+ },
80
+ onBetUpdate: (bets) => {
81
+ // Spectators see owner's bet placement
82
+ if (isSpectator) setSpectatorBets(bets);
83
+ },
84
+ onGameReset: () => {
85
+ // Owner clicked Play Again
86
+ if (isSpectator) resetGame();
87
+ },
88
+ }
89
+ );
90
+
91
+ // Owner broadcasts bets to spectators
92
+ const handleBetChange = (bets) => {
93
+ if (!isSpectator) sendBetUpdate(bets);
94
+ };
95
+ }
96
+ ```
97
+
98
+ ### Vanilla JavaScript
99
+
100
+ ```typescript
101
+ import { HistoryClient } from 'infinite-games-sdk';
102
+
103
+ const history = new HistoryClient();
104
+
105
+ history.onMessage = (event) => {
106
+ const msg = JSON.parse(event.data);
107
+ if (msg.channel && msg.data) handleGameEvent(msg.data);
108
+ if (msg.type === 'bet_update') handleBetUpdate(msg);
109
+ };
110
+
111
+ history.connect(tableId, 'sui/sui');
112
+ history.send({ type: 'bet_update', playerBet: 100, bankerBet: 0, tieBet: 50 });
113
+ history.disconnect();
114
+ ```
115
+
116
+ ## Scale Utilities
117
+
118
+ ```typescript
119
+ import { toBackendScale, fromBackendScale } from 'infinite-games-sdk';
120
+
121
+ toBackendScale(1.5); // 1500000000
122
+ fromBackendScale(1500000000); // 1.5
123
+ ```
124
+
125
+ ## Configuration
126
+
127
+ ```typescript
128
+ // Dev (default)
129
+ new SessionClient();
130
+ new HistoryClient();
131
+
132
+ // Production
133
+ new SessionClient({ baseUrl: 'https://session.infiniteedgers.com' });
134
+ new HistoryClient({ baseUrl: 'history.infiniteedgers.com' });
135
+ ```
@@ -0,0 +1,4 @@
1
+ export declare class AuthError extends Error {
2
+ name: string;
3
+ }
4
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;IAClC,IAAI,SAAe;CACpB"}
package/dist/errors.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthError = void 0;
4
+ class AuthError extends Error {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.name = 'AuthError';
8
+ }
9
+ }
10
+ exports.AuthError = AuthError;
11
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAU,SAAQ,KAAK;IAApC;;QACE,SAAI,GAAG,WAAW,CAAC;IACrB,CAAC;CAAA;AAFD,8BAEC"}
@@ -0,0 +1,20 @@
1
+ import { HistoryConfig } from './types';
2
+ export declare class HistoryClient {
3
+ private ws;
4
+ private config;
5
+ private keepAliveInterval;
6
+ private reconnectTimeout;
7
+ private tableId;
8
+ private coinType;
9
+ onMessage: ((event: MessageEvent) => void) | null;
10
+ onConnect: (() => void) | null;
11
+ onDisconnect: (() => void) | null;
12
+ onError: ((error: Event) => void) | null;
13
+ constructor(config?: HistoryConfig);
14
+ connect(tableId: string, coinType: string): void;
15
+ disconnect(): void;
16
+ send(message: object): void;
17
+ private startKeepAlive;
18
+ private cleanup;
19
+ }
20
+ //# sourceMappingURL=HistoryClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HistoryClient.d.ts","sourceRoot":"","sources":["../../src/history/HistoryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAMxC,qBAAa,aAAa;IACxB,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,iBAAiB,CAAuB;IAChD,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,QAAQ,CAAuB;IAEhC,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IACzD,SAAS,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAQ;IACtC,YAAY,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAQ;IACzC,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;gBAE3C,MAAM,GAAE,aAAkB;IAStC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IA0ChD,UAAU,IAAI,IAAI;IASlB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAM3B,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,OAAO;CAUhB"}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HistoryClient = void 0;
4
+ const DEFAULT_BASE_URL = 'historydev.infiniteedgers.com';
5
+ const DEFAULT_KEEP_ALIVE_INTERVAL_MS = 30000;
6
+ const DEFAULT_RECONNECT_DELAY_MS = 3000;
7
+ class HistoryClient {
8
+ constructor(config = {}) {
9
+ this.ws = null;
10
+ this.keepAliveInterval = null;
11
+ this.reconnectTimeout = null;
12
+ this.tableId = null;
13
+ this.coinType = null;
14
+ this.onMessage = null;
15
+ this.onConnect = null;
16
+ this.onDisconnect = null;
17
+ this.onError = null;
18
+ this.config = {
19
+ baseUrl: config.baseUrl || DEFAULT_BASE_URL,
20
+ keepAliveIntervalMs: config.keepAliveIntervalMs || DEFAULT_KEEP_ALIVE_INTERVAL_MS,
21
+ reconnectDelayMs: config.reconnectDelayMs || DEFAULT_RECONNECT_DELAY_MS,
22
+ autoReconnect: config.autoReconnect !== false,
23
+ };
24
+ }
25
+ connect(tableId, coinType) {
26
+ this.tableId = tableId;
27
+ this.coinType = coinType;
28
+ // Convert coin_type from "sui/sui" to "sui-sui" for URL
29
+ const coinTypeUrl = coinType.replace('/', '-');
30
+ const url = `wss://${this.config.baseUrl}/api/ws/${encodeURIComponent(tableId)}/${encodeURIComponent(coinTypeUrl)}`;
31
+ this.ws = new WebSocket(url);
32
+ this.ws.onopen = () => {
33
+ this.startKeepAlive();
34
+ if (this.onConnect) {
35
+ this.onConnect();
36
+ }
37
+ };
38
+ this.ws.onmessage = (event) => {
39
+ if (this.onMessage) {
40
+ this.onMessage(event);
41
+ }
42
+ };
43
+ this.ws.onclose = () => {
44
+ this.cleanup();
45
+ if (this.onDisconnect) {
46
+ this.onDisconnect();
47
+ }
48
+ if (this.config.autoReconnect && this.tableId && this.coinType) {
49
+ this.reconnectTimeout = window.setTimeout(() => {
50
+ this.connect(this.tableId, this.coinType);
51
+ }, this.config.reconnectDelayMs);
52
+ }
53
+ };
54
+ this.ws.onerror = (error) => {
55
+ if (this.onError) {
56
+ this.onError(error);
57
+ }
58
+ };
59
+ }
60
+ disconnect() {
61
+ this.config.autoReconnect = false;
62
+ this.cleanup();
63
+ if (this.ws) {
64
+ this.ws.close();
65
+ this.ws = null;
66
+ }
67
+ }
68
+ send(message) {
69
+ if (this.ws && this.ws.readyState === WebSocket.OPEN) {
70
+ this.ws.send(JSON.stringify(message));
71
+ }
72
+ }
73
+ startKeepAlive() {
74
+ if (this.keepAliveInterval !== null) {
75
+ clearInterval(this.keepAliveInterval);
76
+ }
77
+ this.keepAliveInterval = window.setInterval(() => {
78
+ if (this.ws && this.ws.readyState === WebSocket.OPEN) {
79
+ // Send plain 'ping' string - history service expects this format
80
+ this.ws.send('ping');
81
+ }
82
+ }, this.config.keepAliveIntervalMs);
83
+ }
84
+ cleanup() {
85
+ if (this.keepAliveInterval !== null) {
86
+ clearInterval(this.keepAliveInterval);
87
+ this.keepAliveInterval = null;
88
+ }
89
+ if (this.reconnectTimeout !== null) {
90
+ clearTimeout(this.reconnectTimeout);
91
+ this.reconnectTimeout = null;
92
+ }
93
+ }
94
+ }
95
+ exports.HistoryClient = HistoryClient;
96
+ //# sourceMappingURL=HistoryClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HistoryClient.js","sourceRoot":"","sources":["../../src/history/HistoryClient.ts"],"names":[],"mappings":";;;AAEA,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AACzD,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAC7C,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAExC,MAAa,aAAa;IAaxB,YAAY,SAAwB,EAAE;QAZ9B,OAAE,GAAqB,IAAI,CAAC;QAE5B,sBAAiB,GAAkB,IAAI,CAAC;QACxC,qBAAgB,GAAkB,IAAI,CAAC;QACvC,YAAO,GAAkB,IAAI,CAAC;QAC9B,aAAQ,GAAkB,IAAI,CAAC;QAEhC,cAAS,GAA2C,IAAI,CAAC;QACzD,cAAS,GAAwB,IAAI,CAAC;QACtC,iBAAY,GAAwB,IAAI,CAAC;QACzC,YAAO,GAAoC,IAAI,CAAC;QAGrD,IAAI,CAAC,MAAM,GAAG;YACZ,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,gBAAgB;YAC3C,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,IAAI,8BAA8B;YACjF,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,IAAI,0BAA0B;YACvE,aAAa,EAAE,MAAM,CAAC,aAAa,KAAK,KAAK;SAC9C,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,OAAe,EAAE,QAAgB;QACvC,IAAI,CAAC,OAAO,GAA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I,CAAC,iBAAiB,KAAK,IAAI,EAAE,CAAC;YACpC,aAAa,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YACtC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAChC,CAAC;QACD,IAAI,IAAI,CAAC,gBAAgB,KAAK,IAAI,EAAE,CAAC;YACnC,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC/B,CAAC;IACH,CAAC;CACF;AAtGD,sCAsGC"}
@@ -0,0 +1,4 @@
1
+ export { HistoryClient } from './HistoryClient';
2
+ export { useHistoryClient } from './useHistoryClient';
3
+ export type { HistoryConfig, GameEvent, BetUpdate } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/history/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useHistoryClient = exports.HistoryClient = void 0;
4
+ var HistoryClient_1 = require("./HistoryClient");
5
+ Object.defineProperty(exports, "HistoryClient", { enumerable: true, get: function () { return HistoryClient_1.HistoryClient; } });
6
+ var useHistoryClient_1 = require("./useHistoryClient");
7
+ Object.defineProperty(exports, "useHistoryClient", { enumerable: true, get: function () { return useHistoryClient_1.useHistoryClient; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/history/index.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA"}
@@ -0,0 +1,14 @@
1
+ export interface HistoryConfig {
2
+ baseUrl?: string;
3
+ keepAliveIntervalMs?: number;
4
+ reconnectDelayMs?: number;
5
+ autoReconnect?: boolean;
6
+ }
7
+ export interface GameEvent {
8
+ type: string;
9
+ data: any;
10
+ }
11
+ export interface BetUpdate {
12
+ [key: string]: number;
13
+ }
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/history/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,CAAC;CACX;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/history/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { GameEvent, BetUpdate, HistoryConfig } from './types';
2
+ interface UseHistoryClientOptions {
3
+ onGameEvent?: (event: GameEvent) => void;
4
+ onBetUpdate?: (update: BetUpdate) => void;
5
+ onGameReset?: () => void;
6
+ config?: HistoryConfig;
7
+ }
8
+ export declare function useHistoryClient(tableId: string | null, coinType: string | null, options?: UseHistoryClientOptions): {
9
+ isConnected: boolean;
10
+ sendBetUpdate: (bets: BetUpdate) => void;
11
+ sendGameReset: () => void;
12
+ disconnect: () => void;
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=useHistoryClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHistoryClient.d.ts","sourceRoot":"","sources":["../../src/history/useHistoryClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE9D,UAAU,uBAAuB;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,GAAE,uBAA4B;;0BAkER,SAAS;;;EAwBvC"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useHistoryClient = useHistoryClient;
4
+ const react_1 = require("react");
5
+ const HistoryClient_1 = require("./HistoryClient");
6
+ function useHistoryClient(tableId, coinType, options = {}) {
7
+ const [isConnected, setIsConnected] = (0, react_1.useState)(false);
8
+ const clientRef = (0, react_1.useRef)(null);
9
+ // Use refs for callbacks to avoid stale closures
10
+ const onGameEventRef = (0, react_1.useRef)(options.onGameEvent);
11
+ const onBetUpdateRef = (0, react_1.useRef)(options.onBetUpdate);
12
+ const onGameResetRef = (0, react_1.useRef)(options.onGameReset);
13
+ (0, react_1.useEffect)(() => {
14
+ onGameEventRef.current = options.onGameEvent;
15
+ onBetUpdateRef.current = options.onBetUpdate;
16
+ onGameResetRef.current = options.onGameReset;
17
+ }, [options.onGameEvent, options.onBetUpdate, options.onGameReset]);
18
+ (0, react_1.useEffect)(() => {
19
+ if (!tableId || !coinType) {
20
+ return;
21
+ }
22
+ const client = new HistoryClient_1.HistoryClient(options.config);
23
+ clientRef.current = client;
24
+ client.onConnect = () => {
25
+ setIsConnected(true);
26
+ };
27
+ client.onDisconnect = () => {
28
+ setIsConnected(false);
29
+ };
30
+ client.onMessage = (event) => {
31
+ try {
32
+ const message = JSON.parse(event.data);
33
+ // Wrapped event: {channel, data}
34
+ if (message.channel && message.data) {
35
+ if (onGameEventRef.current) {
36
+ onGameEventRef.current(message.data);
37
+ }
38
+ }
39
+ // Relay messages: {type, ...}
40
+ else if (message.type === 'bet_update') {
41
+ if (onBetUpdateRef.current) {
42
+ const { type, ...bets } = message;
43
+ onBetUpdateRef.current(bets);
44
+ }
45
+ }
46
+ else if (message.type === 'game_reset') {
47
+ if (onGameResetRef.current) {
48
+ onGameResetRef.current();
49
+ }
50
+ }
51
+ }
52
+ catch (error) {
53
+ console.error('Failed to parse WebSocket message:', error);
54
+ }
55
+ };
56
+ client.connect(tableId, coinType);
57
+ return () => {
58
+ client.disconnect();
59
+ clientRef.current = null;
60
+ };
61
+ }, [tableId, coinType, options.config]);
62
+ const sendBetUpdate = (bets) => {
63
+ if (clientRef.current) {
64
+ clientRef.current.send({ type: 'bet_update', ...bets });
65
+ }
66
+ };
67
+ const sendGameReset = () => {
68
+ if (clientRef.current) {
69
+ clientRef.current.send({ type: 'game_reset' });
70
+ }
71
+ };
72
+ const disconnect = () => {
73
+ if (clientRef.current) {
74
+ clientRef.current.disconnect();
75
+ }
76
+ };
77
+ return {
78
+ isConnected,
79
+ sendBetUpdate,
80
+ sendGameReset,
81
+ disconnect,
82
+ };
83
+ }
84
+ //# sourceMappingURL=useHistoryClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHistoryClient.js","sourceRoot":"","sources":["../../src/history/useHistoryClient.ts"],"names":[],"mappings":";;AAWA,4CA6FC;AAxGD,iCAAoD;AACpD,mDAAgD;AAUhD,SAAgB,gBAAgB,CAC9B,OAAsB,EACtB,QAAuB,EACvB,UAAmC,EAAE;IAErC,MAAM,CAAC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AE,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACtB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACtB,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACjC,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,WAAW;QACX,aAAa;QACb,aAAa;QACb,UAAU;KACX,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,8 @@
1
- export declare function greet(name: string): string;
2
- export declare function add(a: number, b: number): number;
1
+ export { SessionClient } from './session';
2
+ export { HistoryClient, useHistoryClient } from './history';
3
+ export { looksLikeJwt, isOneTimeToken, isTableId } from './session/tokens';
4
+ export { toBackendScale, fromBackendScale, SCALE_FACTOR } from './utils/scale';
5
+ export { AuthError } from './errors';
6
+ export type { SessionConfig, LaunchParams, LaunchResult, TokenType, InitializeResult, } from './session/types';
7
+ export type { HistoryConfig, GameEvent, BetUpdate } from './history/types';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG5D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG/E,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,YAAY,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,10 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.greet = greet;
4
- exports.add = add;
5
- function greet(name) {
6
- return `Hello, ${name}! Welcome to the SDK.`;
7
- }
8
- function add(a, b) {
9
- return a + b;
10
- }
3
+ exports.AuthError = exports.SCALE_FACTOR = exports.fromBackendScale = exports.toBackendScale = exports.isTableId = exports.isOneTimeToken = exports.looksLikeJwt = exports.useHistoryClient = exports.HistoryClient = exports.SessionClient = void 0;
4
+ // Clients
5
+ var session_1 = require("./session");
6
+ Object.defineProperty(exports, "SessionClient", { enumerable: true, get: function () { return session_1.SessionClient; } });
7
+ var history_1 = require("./history");
8
+ Object.defineProperty(exports, "HistoryClient", { enumerable: true, get: function () { return history_1.HistoryClient; } });
9
+ Object.defineProperty(exports, "useHistoryClient", { enumerable: true, get: function () { return history_1.useHistoryClient; } });
10
+ // Utilities
11
+ var tokens_1 = require("./session/tokens");
12
+ Object.defineProperty(exports, "looksLikeJwt", { enumerable: true, get: function () { return tokens_1.looksLikeJwt; } });
13
+ Object.defineProperty(exports, "isOneTimeToken", { enumerable: true, get: function () { return tokens_1.isOneTimeToken; } });
14
+ Object.defineProperty(exports, "isTableId", { enumerable: true, get: function () { return tokens_1.isTableId; } });
15
+ var scale_1 = require("./utils/scale");
16
+ Object.defineProperty(exports, "toBackendScale", { enumerable: true, get: function () { return scale_1.toBackendScale; } });
17
+ Object.defineProperty(exports, "fromBackendScale", { enumerable: true, get: function () { return scale_1.fromBackendScale; } });
18
+ Object.defineProperty(exports, "SCALE_FACTOR", { enumerable: true, get: function () { return scale_1.SCALE_FACTOR; } });
19
+ // Errors
20
+ var errors_1 = require("./errors");
21
+ Object.defineProperty(exports, "AuthError", { enumerable: true, get: function () { return errors_1.AuthError; } });
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,UAAU;AACV,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,qCAA4D;AAAnD,wGAAA,aAAa,OAAA;AAAE,2GAAA,gBAAgB,OAAA;AAExC,YAAY;AACZ,2CAA2E;AAAlE,sGAAA,YAAY,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,mGAAA,SAAS,OAAA;AAChD,uCAA+E;AAAtE,uGAAA,cAAc,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAAE,qGAAA,YAAY,OAAA;AAEvD,SAAS;AACT,mCAAqC;AAA5B,mGAAA,SAAS,OAAA"}
@@ -0,0 +1,38 @@
1
+ import { SessionConfig, LaunchParams, LaunchResult, InitializeResult, TokenType } from './types';
2
+ export declare class SessionClient {
3
+ private baseUrl;
4
+ constructor(config?: SessionConfig);
5
+ /**
6
+ * Get a launch URL with one-time token for a game.
7
+ * Used by the parent site (e.g., doubleup-io) to launch games.
8
+ *
9
+ * @param params - Wallet address, signature, chain, and game type
10
+ * @returns Launch URL containing the one-time token
11
+ */
12
+ getLaunchUrl(params: LaunchParams): Promise<LaunchResult>;
13
+ /**
14
+ * Exchange a one-time token (OTT) for a session JWT.
15
+ *
16
+ * @param oneTimeToken - The one-time token from the launch URL
17
+ * @returns The session JWT token
18
+ * @throws AuthError if the token is invalid or expired
19
+ */
20
+ getSessionToken(oneTimeToken: string): Promise<string>;
21
+ /**
22
+ * Initialize a game session from a URL token.
23
+ * Handles the full flow: detect token type → exchange OTT → return session info.
24
+ *
25
+ * This is the main entry point for game frontends (baccarat, blackjack, range).
26
+ *
27
+ * @param urlToken - Token from URL (can be OTT, session JWT, or table ID)
28
+ * @returns Session initialization result with token type and session token
29
+ * @throws AuthError if authentication fails
30
+ */
31
+ initializeSession(urlToken: string): Promise<InitializeResult>;
32
+ /**
33
+ * Get the token type without making any network calls.
34
+ * Useful for quick UI decisions before full initialization.
35
+ */
36
+ getTokenType(token: string): TokenType;
37
+ }
38
+ //# sourceMappingURL=SessionClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionClient.d.ts","sourceRoot":"","sources":["../../src/session/SessionClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKjG,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,GAAE,aAAkB;IAItC;;;;;;OAMG;IACG,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAuC/D;;;;;;OAMG;IACG,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAwB5D;;;;;;;;;OASG;IACG,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6BpE;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS;CAMvC"}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SessionClient = void 0;
4
+ const errors_1 = require("../errors");
5
+ const tokens_1 = require("./tokens");
6
+ const DEFAULT_BASE_URL = 'https://sessiondev.infiniteedgers.com';
7
+ class SessionClient {
8
+ constructor(config = {}) {
9
+ this.baseUrl = config.baseUrl || DEFAULT_BASE_URL;
10
+ }
11
+ /**
12
+ * Get a launch URL with one-time token for a game.
13
+ * Used by the parent site (e.g., doubleup-io) to launch games.
14
+ *
15
+ * @param params - Wallet address, signature, chain, and game type
16
+ * @returns Launch URL containing the one-time token
17
+ */
18
+ async getLaunchUrl(params) {
19
+ const response = await fetch(`${this.baseUrl}/api/get_launch_url`, {
20
+ method: 'POST',
21
+ headers: {
22
+ 'Content-Type': 'application/json',
23
+ },
24
+ body: JSON.stringify({
25
+ address: params.address,
26
+ signature: params.signature,
27
+ chain: params.chain,
28
+ gameType: params.gameType,
29
+ }),
30
+ });
31
+ if (!response.ok) {
32
+ const errorText = await response.text();
33
+ throw new Error(errorText || 'Failed to get launch URL');
34
+ }
35
+ const data = await response.json();
36
+ const launchUrl = (data.launchUrl ?? data.launch_url);
37
+ if (!launchUrl) {
38
+ throw new Error('Missing launch URL in response');
39
+ }
40
+ // Parse the launch URL to extract origin and token
41
+ const parsed = new URL(launchUrl);
42
+ const token = parsed.searchParams.get('token');
43
+ if (!token) {
44
+ throw new Error('Missing token in launch URL');
45
+ }
46
+ return {
47
+ launchUrl,
48
+ origin: parsed.origin,
49
+ token,
50
+ };
51
+ }
52
+ /**
53
+ * Exchange a one-time token (OTT) for a session JWT.
54
+ *
55
+ * @param oneTimeToken - The one-time token from the launch URL
56
+ * @returns The session JWT token
57
+ * @throws AuthError if the token is invalid or expired
58
+ */
59
+ async getSessionToken(oneTimeToken) {
60
+ const response = await fetch(`${this.baseUrl}/api/get_session_token`, {
61
+ method: 'POST',
62
+ headers: {
63
+ Authorization: `Bearer ${oneTimeToken}`,
64
+ },
65
+ });
66
+ if (response.status === 401) {
67
+ throw new errors_1.AuthError('Invalid or expired one-time token');
68
+ }
69
+ if (!response.ok) {
70
+ const errorText = await response.text();
71
+ throw new Error(errorText || 'Failed to get session token');
72
+ }
73
+ const data = await response.json();
74
+ if (data.error) {
75
+ throw new Error(data.error);
76
+ }
77
+ return data.token;
78
+ }
79
+ /**
80
+ * Initialize a game session from a URL token.
81
+ * Handles the full flow: detect token type → exchange OTT → return session info.
82
+ *
83
+ * This is the main entry point for game frontends (baccarat, blackjack, range).
84
+ *
85
+ * @param urlToken - Token from URL (can be OTT, session JWT, or table ID)
86
+ * @returns Session initialization result with token type and session token
87
+ * @throws AuthError if authentication fails
88
+ */
89
+ async initializeSession(urlToken) {
90
+ // Case 1: Token is a table ID (UUID) - spectator or returning player
91
+ if ((0, tokens_1.isTableId)(urlToken)) {
92
+ return {
93
+ tokenType: 'table_id',
94
+ tableId: urlToken,
95
+ sessionToken: null,
96
+ };
97
+ }
98
+ // Case 2: Token is a one-time token - exchange for session JWT
99
+ if ((0, tokens_1.isOneTimeToken)(urlToken)) {
100
+ const sessionToken = await this.getSessionToken(urlToken);
101
+ return {
102
+ tokenType: 'ott',
103
+ tableId: null,
104
+ sessionToken,
105
+ };
106
+ }
107
+ // Case 3: Token looks like a JWT but is not an OTT - likely expired/used
108
+ if ((0, tokens_1.looksLikeJwt)(urlToken)) {
109
+ throw new errors_1.AuthError('This launch link has expired or was already used. Please launch the game again.');
110
+ }
111
+ // Case 4: Unknown token format
112
+ throw new Error('Invalid token format');
113
+ }
114
+ /**
115
+ * Get the token type without making any network calls.
116
+ * Useful for quick UI decisions before full initialization.
117
+ */
118
+ getTokenType(token) {
119
+ if ((0, tokens_1.isTableId)(token))
120
+ return 'table_id';
121
+ if ((0, tokens_1.isOneTimeToken)(token))
122
+ return 'ott';
123
+ if ((0, tokens_1.looksLikeJwt)(token))
124
+ return 'expired_jwt';
125
+ return 'unknown';
126
+ }
127
+ }
128
+ exports.SessionClient = SessionClient;
129
+ //# sourceMappingURL=SessionClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionClient.js","sourceRoot":"","sources":["../../src/session/SessionClient.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AAEtC,qCAAmE;AAEnE,MAAM,gBAAgB,GAAG,uCAAuC,CAAC;AAEjE,MAAa,aAAa;IAGxB,YAAY,SAAwB,EAAE;QACpC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,gBAAgB,CAAC;IACpD,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,YAAY,CAAC,MAAoB;QACrC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAA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iF,CAAC,CAAC;QACzG,CAAC;QAED,+BAA+B;QAC/B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,KAAa;QACxB,IAAI,IAAA,kBAAS,EAAC,KAAK,CAAC;YAAE,OAAO,UAAU,CAAC;QACxC,IAAI,IAAA,uBAAc,EAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QACxC,IAAI,IAAA,qBAAY,EAAC,KAAK,CAAC;YAAE,OAAO,aAAa,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArID,sCAqIC"}
@@ -0,0 +1,4 @@
1
+ export { SessionClient } from './SessionClient';
2
+ export { looksLikeJwt, isOneTimeToken, isTableId } from './tokens';
3
+ export type { SessionConfig, LaunchParams, LaunchResult, TokenType, InitializeResult, } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACnE,YAAY,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTableId = exports.isOneTimeToken = exports.looksLikeJwt = exports.SessionClient = void 0;
4
+ var SessionClient_1 = require("./SessionClient");
5
+ Object.defineProperty(exports, "SessionClient", { enumerable: true, get: function () { return SessionClient_1.SessionClient; } });
6
+ var tokens_1 = require("./tokens");
7
+ Object.defineProperty(exports, "looksLikeJwt", { enumerable: true, get: function () { return tokens_1.looksLikeJwt; } });
8
+ Object.defineProperty(exports, "isOneTimeToken", { enumerable: true, get: function () { return tokens_1.isOneTimeToken; } });
9
+ Object.defineProperty(exports, "isTableId", { enumerable: true, get: function () { return tokens_1.isTableId; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,mCAAmE;AAA1D,sGAAA,YAAY,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,mGAAA,SAAS,OAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Check if a token looks like a JWT (has 3 non-empty parts separated by dots).
3
+ */
4
+ export declare function looksLikeJwt(token: string | null | undefined): boolean;
5
+ /**
6
+ * Check if a token is a one-time token (OTT) based on JWT audience claim.
7
+ * OTTs have aud: "login" in their payload.
8
+ */
9
+ export declare function isOneTimeToken(token: string): boolean;
10
+ /**
11
+ * Check if a token looks like a UUID (table_id format).
12
+ * UUIDs are 36 characters: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
13
+ */
14
+ export declare function isTableId(token: string): boolean;
15
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/session/tokens.ts"],"names":[],"mappings":"AAyBA;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAItE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIhD"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.looksLikeJwt = looksLikeJwt;
4
+ exports.isOneTimeToken = isOneTimeToken;
5
+ exports.isTableId = isTableId;
6
+ /**
7
+ * Decode a base64url encoded string (used for JWT payloads).
8
+ */
9
+ function base64UrlDecode(input) {
10
+ // Convert base64url to standard base64
11
+ const base64 = input.replace(/-/g, '+').replace(/_/g, '/');
12
+ // Add padding if needed
13
+ const padded = base64 + '='.repeat((4 - (base64.length % 4)) % 4);
14
+ return atob(padded);
15
+ }
16
+ /**
17
+ * Extract the audience claim from a JWT token.
18
+ */
19
+ function getTokenAudience(token) {
20
+ try {
21
+ const parts = token.split('.');
22
+ if (parts.length < 2)
23
+ return null;
24
+ const payload = JSON.parse(base64UrlDecode(parts[1]));
25
+ return payload.aud;
26
+ }
27
+ catch {
28
+ return null;
29
+ }
30
+ }
31
+ /**
32
+ * Check if a token looks like a JWT (has 3 non-empty parts separated by dots).
33
+ */
34
+ function looksLikeJwt(token) {
35
+ if (!token || typeof token !== 'string')
36
+ return false;
37
+ const parts = token.split('.');
38
+ return parts.length === 3 && parts.every((p) => p.length > 0);
39
+ }
40
+ /**
41
+ * Check if a token is a one-time token (OTT) based on JWT audience claim.
42
+ * OTTs have aud: "login" in their payload.
43
+ */
44
+ function isOneTimeToken(token) {
45
+ return getTokenAudience(token) === 'login';
46
+ }
47
+ /**
48
+ * Check if a token looks like a UUID (table_id format).
49
+ * UUIDs are 36 characters: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
50
+ */
51
+ function isTableId(token) {
52
+ const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
53
+ return uuidRegex.test(token);
54
+ }
55
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/session/tokens.ts"],"names":[],"mappings":";;AA4BA,oCAIC;AAMD,wCAEC;AAMD,8BAIC;AAlDD;;GAEG;AACH,SAAS,eAAe,CAAC,KAAa;IACpC,uCAAuC;IACvC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,IA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,CAAC;IACpE,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,21 @@
1
+ export interface SessionConfig {
2
+ baseUrl?: string;
3
+ }
4
+ export interface LaunchParams {
5
+ address: string;
6
+ signature: string;
7
+ chain: string;
8
+ gameType: string;
9
+ }
10
+ export interface LaunchResult {
11
+ launchUrl: string;
12
+ origin: string;
13
+ token: string;
14
+ }
15
+ export type TokenType = 'ott' | 'table_id' | 'expired_jwt' | 'unknown';
16
+ export interface InitializeResult {
17
+ tokenType: TokenType;
18
+ tableId: string | null;
19
+ sessionToken: string | null;
20
+ }
21
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/session/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/session/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { SCALE_FACTOR, toBackendScale, fromBackendScale } from './scale';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fromBackendScale = exports.toBackendScale = exports.SCALE_FACTOR = void 0;
4
+ var scale_1 = require("./scale");
5
+ Object.defineProperty(exports, "SCALE_FACTOR", { enumerable: true, get: function () { return scale_1.SCALE_FACTOR; } });
6
+ Object.defineProperty(exports, "toBackendScale", { enumerable: true, get: function () { return scale_1.toBackendScale; } });
7
+ Object.defineProperty(exports, "fromBackendScale", { enumerable: true, get: function () { return scale_1.fromBackendScale; } });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,iCAAyE;AAAhE,qGAAA,YAAY,OAAA;AAAE,uGAAA,cAAc,OAAA;AAAE,yGAAA,gBAAgB,OAAA"}
@@ -0,0 +1,4 @@
1
+ export declare const SCALE_FACTOR = 1000000000;
2
+ export declare function toBackendScale(amount: number): number;
3
+ export declare function fromBackendScale(amount: number): number;
4
+ //# sourceMappingURL=scale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../src/utils/scale.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,aAAgB,CAAC;AAE1C,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SCALE_FACTOR = void 0;
4
+ exports.toBackendScale = toBackendScale;
5
+ exports.fromBackendScale = fromBackendScale;
6
+ exports.SCALE_FACTOR = 1000000000;
7
+ function toBackendScale(amount) {
8
+ return Math.round(amount * exports.SCALE_FACTOR);
9
+ }
10
+ function fromBackendScale(amount) {
11
+ return amount / exports.SCALE_FACTOR;
12
+ }
13
+ //# sourceMappingURL=scale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scale.js","sourceRoot":"","sources":["../../src/utils/scale.ts"],"names":[],"mappings":";;;AAEA,wCAEC;AAED,4CAEC;AARY,QAAA,YAAY,GAAG,UAAa,CAAC;AAE1C,SAAgB,cAAc,CAAC,MAAc;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,oBAAY,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,gBAAgB,CAAC,MAAc;IAC7C,OAAO,MAAM,GAAG,oBAAY,CAAC;AAC/B,CAAC"}
package/package.json CHANGED
@@ -1,21 +1,29 @@
1
1
  {
2
2
  "name": "infinite-games-sdk",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
4
  "description": "Infinite Games SDK",
5
5
  "main": "dist/index.js",
6
- "scripts": {
7
- "build": "tsc",
8
- "publishts": "tsc && npm publish"
9
- },
10
- "author": "degenxdev",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "/dist"
9
+ ],
10
+ "keywords": [
11
+ "sdk",
12
+ "typescript",
13
+ "npm"
14
+ ],
15
+ "author": "",
11
16
  "license": "ISC",
12
- "dependencies": {
13
- "axios": "^1.7.7"
14
- },
15
17
  "devDependencies": {
16
- "@types/node": "^20.14.10",
17
- "ts-node": "^10.9.2",
18
- "typescript": "^5.4.5"
18
+ "@types/node": "^20.x",
19
+ "@types/react": "^18.x",
20
+ "typescript": "^5.x"
19
21
  },
20
- "peerDependencies": {}
21
- }
22
+ "peerDependencies": {
23
+ "react": "^18.x"
24
+ },
25
+ "scripts": {
26
+ "build": "tsc",
27
+ "test": "echo \"Error: no test specified\" && exit 1"
28
+ }
29
+ }
@@ -1 +0,0 @@
1
- {"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.float16.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/typescript/lib/lib.es2020.full.d.ts","../src/index.ts","../node_modules/@types/deep-eql/index.d.ts","../node_modules/assertion-error/index.d.ts","../node_modules/@types/chai/index.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/node/compatibility/iterators.d.ts","../node_modules/@types/node/globals.typedarray.d.ts","../node_modules/@types/node/buffer.buffer.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/web-globals/abortcontroller.d.ts","../node_modules/@types/node/web-globals/blob.d.ts","../node_modules/@types/node/web-globals/console.d.ts","../node_modules/@types/node/web-globals/crypto.d.ts","../node_modules/@types/node/web-globals/domexception.d.ts","../node_modules/@types/node/web-globals/encoding.d.ts","../node_modules/@types/node/web-globals/events.d.ts","../node_modules/undici-types/utility.d.ts","../node_modules/undici-types/header.d.ts","../node_modules/undici-types/readable.d.ts","../node_modules/undici-types/fetch.d.ts","../node_modules/undici-types/formdata.d.ts","../node_modules/undici-types/connector.d.ts","../node_modules/undici-types/client-stats.d.ts","../node_modules/undici-types/client.d.ts","../node_modules/undici-types/errors.d.ts","../node_modules/undici-types/dispatcher.d.ts","../node_modules/undici-types/global-dispatcher.d.ts","../node_modules/undici-types/global-origin.d.ts","../node_modules/undici-types/pool-stats.d.ts","../node_modules/undici-types/pool.d.ts","../node_modules/undici-types/handlers.d.ts","../node_modules/undici-types/balanced-pool.d.ts","../node_modules/undici-types/h2c-client.d.ts","../node_modules/undici-types/agent.d.ts","../node_modules/undici-types/mock-interceptor.d.ts","../node_modules/undici-types/mock-call-history.d.ts","../node_modules/undici-types/mock-agent.d.ts","../node_modules/undici-types/mock-client.d.ts","../node_modules/undici-types/mock-pool.d.ts","../node_modules/undici-types/snapshot-agent.d.ts","../node_modules/undici-types/mock-errors.d.ts","../node_modules/undici-types/proxy-agent.d.ts","../node_modules/undici-types/env-http-proxy-agent.d.ts","../node_modules/undici-types/retry-handler.d.ts","../node_modules/undici-types/retry-agent.d.ts","../node_modules/undici-types/api.d.ts","../node_modules/undici-types/cache-interceptor.d.ts","../node_modules/undici-types/interceptors.d.ts","../node_modules/undici-types/util.d.ts","../node_modules/undici-types/cookies.d.ts","../node_modules/undici-types/patch.d.ts","../node_modules/undici-types/websocket.d.ts","../node_modules/undici-types/eventsource.d.ts","../node_modules/undici-types/diagnostics-channel.d.ts","../node_modules/undici-types/content-type.d.ts","../node_modules/undici-types/cache.d.ts","../node_modules/undici-types/index.d.ts","../node_modules/@types/node/web-globals/fetch.d.ts","../node_modules/@types/node/web-globals/importmeta.d.ts","../node_modules/@types/node/web-globals/messaging.d.ts","../node_modules/@types/node/web-globals/navigator.d.ts","../node_modules/@types/node/web-globals/performance.d.ts","../node_modules/@types/node/web-globals/storage.d.ts","../node_modules/@types/node/web-globals/streams.d.ts","../node_modules/@types/node/web-globals/timers.d.ts","../node_modules/@types/node/web-globals/url.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/inspector.generated.d.ts","../node_modules/@types/node/inspector/promises.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/path/posix.d.ts","../node_modules/@types/node/path/win32.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/quic.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/sea.d.ts","../node_modules/@types/node/sqlite.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/test/reporters.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/util/types.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/index.d.ts"],"fileIdsList":[[55,56,62,124,132,136,139,141,142,143,155],[62,124,132,136,139,141,142,143,155],[62,121,122,124,132,136,139,141,142,143,155],[62,123,124,132,136,139,141,142,143,155],[124,132,136,139,141,142,143,155],[62,124,132,136,139,141,142,143,155,163],[62,124,125,130,132,135,136,139,141,142,143,145,155,160,172],[62,124,125,126,132,135,136,139,141,142,143,155],[62,124,127,132,136,139,141,142,143,155,173],[62,124,128,129,132,136,139,141,142,143,146,155],[62,124,129,132,136,139,141,142,143,155,160,169],[62,124,130,132,135,136,139,141,142,143,145,155],[62,123,124,131,132,136,139,141,142,143,155],[62,124,132,133,136,139,141,142,143,155],[62,124,132,134,135,136,139,141,142,143,155],[62,123,124,132,135,136,139,141,142,143,155],[62,124,132,135,136,137,139,141,142,143,155,160,172],[62,124,132,135,136,137,139,141,142,143,155,160,163],[62,111,124,132,135,136,138,139,141,142,143,145,155,160,172],[62,124,132,135,136,138,139,141,142,143,145,155,160,169,172],[62,124,132,136,138,139,140,141,142,143,155,160,169,172],[60,61,62,63,64,65,66,67,68,69,70,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179],[62,124,132,135,136,139,141,142,143,155],[62,124,132,136,139,141,143,155],[62,124,132,136,139,141,142,143,144,155,172],[62,124,132,135,136,139,141,142,143,145,155,160],[62,124,132,136,139,141,142,143,146,155],[62,124,132,136,139,141,142,143,147,155],[62,124,132,135,136,139,141,142,143,150,155],[62,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179],[62,124,132,136,139,141,142,143,152,155],[62,124,132,136,139,141,142,143,153,155],[62,124,129,132,136,139,141,142,143,145,155,163],[62,124,132,135,136,139,141,142,143,155,156],[62,124,132,136,139,141,142,143,155,157,173,176],[62,124,132,135,136,139,141,142,143,155,160,162,163],[62,124,132,136,139,141,142,143,155,161,163],[62,124,132,136,139,141,142,143,155,163,173],[62,124,132,136,139,141,142,143,155,164],[62,121,124,132,136,139,141,142,143,155,160,166],[62,124,132,136,139,141,142,143,155,160,165],[62,124,132,135,136,139,141,142,143,155,167,168],[62,124,132,136,139,141,142,143,155,167,168],[62,124,129,132,136,139,141,142,143,145,155,160,169],[62,124,132,136,139,141,142,143,155,170],[62,124,132,136,139,141,142,143,145,155,171],[62,124,132,136,138,139,141,142,143,153,155,172],[62,124,132,136,139,141,142,143,155,173,174],[62,124,129,132,136,139,141,142,143,155,174],[62,124,132,136,139,141,142,143,155,160,175],[62,124,132,136,139,141,142,143,144,155,176],[62,124,132,136,139,141,142,143,155,177],[62,124,127,132,136,139,141,142,143,155],[62,124,129,132,136,139,141,142,143,155],[62,124,132,136,139,141,142,143,155,173],[62,111,124,132,136,139,141,142,143,155],[62,124,132,136,139,141,142,143,155,172],[62,124,132,136,139,141,142,143,155,178],[62,124,132,136,139,141,142,143,150,155],[62,124,132,136,139,141,142,143,155,168],[62,111,124,132,135,136,137,139,141,142,143,150,155,160,163,172,175,176,178],[62,124,132,136,139,141,142,143,155,160,179],[62,77,80,83,84,124,132,136,139,141,142,143,155,172],[62,80,124,132,136,139,141,142,143,155,160,172],[62,80,84,124,132,136,139,141,142,143,155,172],[62,124,132,136,139,141,142,143,155,160],[62,74,124,132,136,139,141,142,143,155],[62,78,124,132,136,139,141,142,143,155],[62,76,77,80,124,132,136,139,141,142,143,155,172],[62,124,132,136,139,141,142,143,145,155,169],[62,124,132,136,139,141,142,143,155,180],[62,74,124,132,136,139,141,142,143,155,180],[62,76,80,124,132,136,139,141,142,143,145,155,172],[62,71,72,73,75,79,124,132,135,136,139,141,142,143,155,160,172],[62,80,88,96,124,132,136,139,141,142,143,155],[62,72,78,124,132,136,139,141,142,143,155],[62,80,105,106,124,132,136,139,141,142,143,155],[62,72,75,80,124,132,136,139,141,142,143,155,163,172,180],[62,80,124,132,136,139,141,142,143,155],[62,76,80,124,132,136,139,141,142,143,155,172],[62,71,124,132,136,139,141,142,143,155],[62,74,75,76,78,79,80,81,82,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,107,108,109,110,124,132,136,139,141,142,143,155],[62,80,98,101,124,132,136,139,141,142,143,155],[62,80,88,89,90,124,132,136,139,141,142,143,155],[62,78,80,89,91,124,132,136,139,141,142,143,155],[62,79,124,132,136,139,141,142,143,155],[62,72,74,80,124,132,136,139,141,142,143,155],[62,80,84,89,91,124,132,136,139,141,142,143,155],[62,84,124,132,136,139,141,142,143,155],[62,78,80,83,124,132,136,139,141,142,143,155,172],[62,72,76,80,88,124,132,136,139,141,142,143,155],[62,80,98,124,132,136,139,141,142,143,155],[62,91,124,132,136,139,141,142,143,155],[62,74,80,105,124,132,136,139,141,142,143,155,163,178,180]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"196cb558a13d4533a5163286f30b0509ce0210e4b316c56c38d4c0fd2fb38405","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"1305d1e76ca44e30fb8b2b8075fa522b83f60c0bcf5d4326a9d2cf79b53724f8","impliedFormat":1},{"version":"f24a2ad37ba067505697f479fbca171e16ff7b82d6f0feb6c7e1d1c4859b3298","signature":"64e0ad1e5da4785690f01a63236ab7874debc4cf62f7f42360768e1c2f70d587"},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ccdaa19852d25ecd84eec365c3bfa16e7859cadecf6e9ca6d0dbbbee439743f","affectsGlobalScope":true,"impliedFormat":1},{"version":"438b41419b1df9f1fbe33b5e1b18f5853432be205991d1b19f5b7f351675541e","affectsGlobalScope":true,"impliedFormat":1},{"version":"096116f8fedc1765d5bd6ef360c257b4a9048e5415054b3bf3c41b07f8951b0b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5e01375c9e124a83b52ee4b3244ed1a4d214a6cfb54ac73e164a823a4a7860a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f90ae2bbce1505e67f2f6502392e318f5714bae82d2d969185c4a6cecc8af2fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b58e207b93a8f1c88bbf2a95ddc686ac83962b13830fe8ad3f404ffc7051fb4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1fefabcb2b06736a66d2904074d56268753654805e829989a46a0161cd8412c5","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"c18a99f01eb788d849ad032b31cafd49de0b19e083fe775370834c5675d7df8e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5247874c2a23b9a62d178ae84f2db6a1d54e6c9a2e7e057e178cc5eea13757fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"487b694c3de27ddf4ad107d4007ad304d29effccf9800c8ae23c2093638d906a","impliedFormat":1},{"version":"3a80bc85f38526ca3b08007ee80712e7bb0601df178b23fbf0bf87036fce40ce","impliedFormat":1},{"version":"ccf4552357ce3c159ef75f0f0114e80401702228f1898bdc9402214c9499e8c0","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"2931540c47ee0ff8a62860e61782eb17b155615db61e36986e54645ec67f67c2","impliedFormat":1},{"version":"ccab02f3920fc75c01174c47fcf67882a11daf16baf9e81701d0a94636e94556","impliedFormat":1},{"version":"f6faf5f74e4c4cc309a6c6a6c4da02dbb840be5d3e92905a23dcd7b2b0bd1986","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"33e981bf6376e939f99bd7f89abec757c64897d33c005036b9a10d9587d80187","impliedFormat":1},{"version":"7fd1b31fd35876b0aa650811c25ec2c97a3c6387e5473eb18004bed86cdd76b6","impliedFormat":1},{"version":"b41767d372275c154c7ea6c9d5449d9a741b8ce080f640155cc88ba1763e35b3","impliedFormat":1},{"version":"3bacf516d686d08682751a3bd2519ea3b8041a164bfb4f1d35728993e70a2426","impliedFormat":1},{"version":"7fb266686238369442bd1719bc0d7edd0199da4fb8540354e1ff7f16669b4323","impliedFormat":1},{"version":"0a60a292b89ca7218b8616f78e5bbd1c96b87e048849469cccb4355e98af959a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"5b03a034c72146b61573aab280f295b015b9168470f2df05f6080a2122f9b4df","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"249b9cab7f5d628b71308c7d9bb0a808b50b091e640ba3ed6e2d0516f4a8d91d","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"54c3e2371e3d016469ad959697fd257e5621e16296fa67082c2575d0bf8eced0","impliedFormat":1},{"version":"beb8233b2c220cfa0feea31fbe9218d89fa02faa81ef744be8dce5acb89bb1fd","impliedFormat":1},{"version":"c183b931b68ad184bc8e8372bf663f3d33304772fb482f29fb91b3c391031f3e","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"48cc3ec153b50985fb95153258a710782b25975b10dd4ac8a4f3920632d10790","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"e1528ca65ac90f6fa0e4a247eb656b4263c470bb22d9033e466463e13395e599","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"866078923a56d026e39243b4392e282c1c63159723996fa89243140e1388a98d","impliedFormat":1},{"version":"dd0109710de4cd93e245121ab86d8c66d20f3ead80074b68e9c3e349c4f53342","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3275d55fac10b799c9546804126239baf020d220136163f763b55a74e50e750","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa68a0a3b7cb32c00e39ee3cd31f8f15b80cac97dce51b6ee7fc14a1e8deb30b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c36e755bced82df7fb6ce8169265d0a7bb046ab4e2cb6d0da0cb72b22033e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a93de4ff8a63bafe62ba86b89af1df0ccb5e40bb85b0c67d6bbcfdcf96bf3d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"90e85f9bc549dfe2b5749b45fe734144e96cd5d04b38eae244028794e142a77e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0a5deeb610b2a50a6350bd23df6490036a1773a8a71d70f2f9549ab009e67ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"435b3711465425770ed2ee2f1cf00ce071835265e0851a7dc4600ab4b007550e","impliedFormat":1},{"version":"7e49f52a159435fc8df4de9dc377ef5860732ca2dc9efec1640531d3cf5da7a3","impliedFormat":1},{"version":"dd4bde4bdc2e5394aed6855e98cf135dfdf5dd6468cad842e03116d31bbcc9bc","impliedFormat":1},{"version":"4d4e879009a84a47c05350b8dca823036ba3a29a3038efed1be76c9f81e45edf","affectsGlobalScope":true,"impliedFormat":1},{"version":"cf83d90d5faf27b994c2e79af02e32b555dbfe42cd9bd1571445f2168d1f4e2d","impliedFormat":1},{"version":"9ba13b47cb450a438e3076c4a3f6afb9dc85e17eae50f26d4b2d72c0688c9251","impliedFormat":1},{"version":"b64cd4401633ea4ecadfd700ddc8323a13b63b106ac7127c1d2726f32424622c","impliedFormat":1},{"version":"37c6e5fe5715814412b43cc9b50b24c67a63c4e04e753e0d1305970d65417a60","impliedFormat":1},{"version":"0e28335ac43f4d94dd2fe6d9e6fa6813570640839addd10d309d7985f33a6308","impliedFormat":1},{"version":"ee0e4946247f842c6dd483cbb60a5e6b484fee07996e3a7bc7343dfb68a04c5d","impliedFormat":1},{"version":"ef051f42b7e0ef5ca04552f54c4552eac84099d64b6c5ad0ef4033574b6035b8","impliedFormat":1},{"version":"853a43154f1d01b0173d9cbd74063507ece57170bad7a3b68f3fa1229ad0a92f","impliedFormat":1},{"version":"56231e3c39a031bfb0afb797690b20ed4537670c93c0318b72d5180833d98b72","impliedFormat":1},{"version":"5cc7c39031bfd8b00ad58f32143d59eb6ffc24f5d41a20931269011dccd36c5e","impliedFormat":1},{"version":"b0b69c61b0f0ec8ca15db4c8c41f6e77f4cacb784d42bca948f42dea33e8757e","affectsGlobalScope":true,"impliedFormat":1},{"version":"961cf7535b9c521cd634055b1b6ac49b94d055f0b573ce7fdc4cfaddab080b7c","impliedFormat":1},{"version":"806a8c6daae69e5695e7200d9eca6bc1e4298f38d90edda3ce67a794da31a24f","impliedFormat":1},{"version":"ac86245c2f31335bfd52cbe7fc760f9fc4f165387875869a478a6d9616a95e72","impliedFormat":1},{"version":"01ff95aa1443e3f7248974e5a771f513cb2ac158c8898f470a1792f817bee497","impliedFormat":1},{"version":"9d96a7ce809392ff2cb99691acf7c62e632fe56897356ba013b689277aca3619","impliedFormat":1},{"version":"42a05d8f239f74587d4926aba8cc54792eed8e8a442c7adc9b38b516642aadfe","impliedFormat":1},{"version":"5d21b58d60383cc6ab9ad3d3e265d7d25af24a2c9b506247e0e50b0a884920be","impliedFormat":1},{"version":"101f482fd48cb4c7c0468dcc6d62c843d842977aea6235644b1edd05e81fbf22","impliedFormat":1},{"version":"ae6757460f37078884b1571a3de3ebaf724d827d7e1d53626c02b3c2a408ac63","affectsGlobalScope":true,"impliedFormat":1},{"version":"27c0a08e343c6a0ae17bd13ba6d44a9758236dc904cd5e4b43456996cd51f520","impliedFormat":1},{"version":"3ef397f12387eff17f550bc484ea7c27d21d43816bbe609d495107f44b97e933","impliedFormat":1},{"version":"1023282e2ba810bc07905d3668349fbd37a26411f0c8f94a70ef3c05fe523fcf","impliedFormat":1},{"version":"b214ebcf76c51b115453f69729ee8aa7b7f8eccdae2a922b568a45c2d7ff52f7","impliedFormat":1},{"version":"429c9cdfa7d126255779efd7e6d9057ced2d69c81859bbab32073bad52e9ba76","impliedFormat":1},{"version":"6f80e51ba310608cd71bcdc09a171d7bbfb3b316048601c9ec215ce16a8dcfbc","impliedFormat":1},{"version":"a3bdc774995d56caaac759a424831091bb22450ca3590f34dae53d98323be191","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f2c62938251b45715fd2a9887060ec4fbc8724727029d1cbce373747252bdd7","impliedFormat":1},{"version":"e3ace08b6bbd84655d41e244677b474fd995923ffef7149ddb68af8848b60b05","impliedFormat":1},{"version":"132580b0e86c48fab152bab850fc57a4b74fe915c8958d2ccb052b809a44b61c","impliedFormat":1},{"version":"af4ab0aa8908fc9a655bb833d3bc28e117c4f0e1038c5a891546158beb25accb","impliedFormat":1},{"version":"69c9a5a9392e8564bd81116e1ed93b13205201fb44cb35a7fde8c9f9e21c4b23","impliedFormat":1},{"version":"5f8fc37f8434691ffac1bfd8fc2634647da2c0e84253ab5d2dd19a7718915b35","impliedFormat":1},{"version":"5981c2340fd8b076cae8efbae818d42c11ffc615994cb060b1cd390795f1be2b","impliedFormat":1},{"version":"2ca2bca6845a7234eff5c3d192727a068fca72ac565f3c819c6b04ccc83dadc0","impliedFormat":1},{"version":"ed4f674fc8c0c993cc7e145069ac44129e03519b910c62be206a0cc777bdc60b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0250da3eb85c99624f974e77ef355cdf86f43980251bc371475c2b397ba55bcd","impliedFormat":1},{"version":"f1c93e046fb3d9b7f8249629f4b63dc068dd839b824dd0aa39a5e68476dc9420","impliedFormat":1},{"version":"3d3a5f27ffbc06c885dd4d5f9ee20de61faf877fe2c3a7051c4825903d9a7fdc","impliedFormat":1},{"version":"12806f9f085598ef930edaf2467a5fa1789a878fba077cd27e85dc5851e11834","impliedFormat":1},{"version":"17d06eb5709839c7ce719f0c38ada6f308fb433f2cd6d8c87b35856e07400950","impliedFormat":1},{"version":"a43fe41c33d0a192a0ecaf9b92e87bef3709c9972e6d53c42c49251ccb962d69","impliedFormat":1},{"version":"a177959203c017fad3ecc4f3d96c8757a840957a4959a3ae00dab9d35961ca6c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc727ccf9b36e257ff982ea0badeffbfc2c151802f741bddff00c6af3b784cf","impliedFormat":1},{"version":"6c00f77f0335ae0c18bd45a6c7c9c97c9625fb7e5dd6d5936eadf70718bce52e","impliedFormat":1},{"version":"4844a4c9b4b1e812b257676ed8a80b3f3be0e29bf05e742cc2ea9c3c6865e6c6","impliedFormat":1},{"version":"064878a60367e0407c42fb7ba02a2ea4d83257357dc20088e549bd4d89433e9c","impliedFormat":1},{"version":"14d4bd22d1b05824971b98f7e91b2484c90f1a684805c330476641417c3d9735","impliedFormat":1},{"version":"586eaf66bace2e731cee0ddfbfac326ad74a83c1acfeac4afb2db85ad23226c7","impliedFormat":1},{"version":"b484ec11ba00e3a2235562a41898d55372ccabe607986c6fa4f4aba72093749f","impliedFormat":1},{"version":"d1a14d87cedcf4f0b8173720d6eb29cc02878bf2b6dabf9c9d9cee742f275368","impliedFormat":1},{"version":"e60efae9fe48a2955f66bf4cbf0f082516185b877daf50d9c5e2a009660a7714","impliedFormat":1},{"version":"041a7781b9127ab568d2cdcce62c58fdea7c7407f40b8c50045d7866a2727130","impliedFormat":1},{"version":"cd9189eacf0f9143b8830e9d6769335aa6d902c04195f04145bcbf19e7f26fcb","impliedFormat":1},{"version":"e1cb68f3ef3a8dd7b2a9dfb3de482ed6c0f1586ba0db4e7d73c1d2147b6ffc51","impliedFormat":1},{"version":"55cdbeebe76a1fa18bbd7e7bf73350a2173926bd3085bb050cf5a5397025ee4e","impliedFormat":1}],"root":[54],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"jsx":4,"module":1,"outDir":"./","removeComments":true,"sourceMap":false,"target":7},"referencedMap":[[57,1],[55,2],[58,2],[59,2],[121,3],[122,3],[123,4],[62,5],[124,6],[125,7],[126,8],[60,2],[127,9],[128,10],[129,11],[130,12],[131,13],[132,14],[133,14],[134,15],[135,16],[136,17],[137,18],[63,2],[61,2],[138,19],[139,20],[140,21],[180,22],[141,23],[142,24],[143,23],[144,25],[145,26],[146,27],[147,28],[148,28],[149,28],[150,29],[151,30],[152,31],[153,32],[154,33],[155,34],[156,34],[157,35],[158,2],[159,2],[160,36],[161,37],[162,36],[163,38],[164,39],[165,40],[166,41],[167,42],[168,43],[169,44],[170,45],[171,46],[172,47],[173,48],[174,49],[175,50],[176,51],[177,52],[64,23],[65,2],[66,53],[67,54],[68,2],[69,55],[70,2],[112,56],[113,57],[114,58],[115,58],[116,59],[117,2],[118,6],[119,60],[120,57],[178,61],[179,62],[56,2],[51,2],[52,2],[10,2],[8,2],[9,2],[14,2],[13,2],[2,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[3,2],[23,2],[24,2],[4,2],[25,2],[29,2],[26,2],[27,2],[28,2],[30,2],[31,2],[32,2],[5,2],[33,2],[34,2],[35,2],[36,2],[6,2],[40,2],[37,2],[38,2],[39,2],[41,2],[7,2],[42,2],[53,2],[47,2],[48,2],[43,2],[44,2],[45,2],[46,2],[1,2],[49,2],[50,2],[12,2],[11,2],[88,63],[100,64],[86,65],[101,66],[110,67],[77,68],[78,69],[76,70],[109,71],[104,72],[108,73],[80,74],[97,75],[79,76],[107,77],[74,78],[75,72],[81,79],[82,2],[87,80],[85,79],[72,81],[111,82],[102,83],[91,84],[90,79],[92,85],[95,86],[89,87],[93,88],[105,71],[83,89],[84,90],[96,91],[73,66],[99,92],[98,79],[94,93],[103,2],[71,2],[106,94],[54,2]],"version":"5.9.3"}
package/src/index.ts DELETED
@@ -1,7 +0,0 @@
1
- export function greet(name: string) {
2
- return `Hello, ${name}! Welcome to the SDK.`;
3
- }
4
-
5
- export function add(a: number, b: number) {
6
- return a + b;
7
- }
package/tsconfig.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "declaration": true,
5
- "jsx": "react-jsx",
6
- "removeComments": true,
7
- "allowSyntheticDefaultImports": true,
8
- "target": "ES2020",
9
- "sourceMap": false,
10
- "outDir": "./dist",
11
- "baseUrl": "./",
12
- "incremental": true
13
- },
14
- "include": ["src/**/*"],
15
- "exclude": ["node_modules", "test", "lib", "**/*spec.ts", "src/run/**"]
16
- }
17
-