@lifi/perps-sdk-provider-lighter 8.2.1 → 9.0.0

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 (96) hide show
  1. package/README.md +14 -10
  2. package/dist/cjs/LighterProvider.d.ts +5 -10
  3. package/dist/cjs/LighterProvider.d.ts.map +1 -1
  4. package/dist/cjs/LighterProvider.js +27 -26
  5. package/dist/cjs/LighterProvider.js.map +1 -1
  6. package/dist/cjs/constants.d.ts +5 -8
  7. package/dist/cjs/constants.d.ts.map +1 -1
  8. package/dist/cjs/constants.js +15 -12
  9. package/dist/cjs/constants.js.map +1 -1
  10. package/dist/cjs/index.d.ts +3 -4
  11. package/dist/cjs/index.d.ts.map +1 -1
  12. package/dist/cjs/index.js +6 -5
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/signers/LighterSigner.d.ts +5 -7
  15. package/dist/cjs/signers/LighterSigner.d.ts.map +1 -1
  16. package/dist/cjs/signers/LighterSigner.js +5 -12
  17. package/dist/cjs/signers/LighterSigner.js.map +1 -1
  18. package/dist/cjs/signers/generated/wasmExecRuntime.d.ts +2 -0
  19. package/dist/cjs/signers/generated/wasmExecRuntime.d.ts.map +1 -0
  20. package/dist/cjs/signers/generated/wasmExecRuntime.js +569 -0
  21. package/dist/cjs/signers/generated/wasmExecRuntime.js.map +1 -0
  22. package/dist/cjs/signers/signActions.d.ts +2 -2
  23. package/dist/cjs/signers/signActions.d.ts.map +1 -1
  24. package/dist/cjs/signers/signActions.js +4 -10
  25. package/dist/cjs/signers/signActions.js.map +1 -1
  26. package/dist/cjs/signers/wasmBinaryUrl.js +11 -0
  27. package/dist/cjs/signers/wasmLoader.d.ts +1 -6
  28. package/dist/cjs/signers/wasmLoader.d.ts.map +1 -1
  29. package/dist/cjs/signers/wasmLoader.js +15 -69
  30. package/dist/cjs/signers/wasmLoader.js.map +1 -1
  31. package/dist/esm/LighterProvider.d.ts +53 -56
  32. package/dist/esm/LighterProvider.d.ts.map +1 -1
  33. package/dist/esm/LighterProvider.js +69 -48
  34. package/dist/esm/LighterProvider.js.map +1 -1
  35. package/dist/esm/constants.d.ts +25 -36
  36. package/dist/esm/constants.d.ts.map +1 -1
  37. package/dist/esm/constants.js +31 -18
  38. package/dist/esm/constants.js.map +1 -1
  39. package/dist/esm/index.d.ts +6 -7
  40. package/dist/esm/index.d.ts.map +1 -1
  41. package/dist/esm/index.js +5 -6
  42. package/dist/esm/index.js.map +1 -1
  43. package/dist/esm/signers/LighterSigner.d.ts +10 -18
  44. package/dist/esm/signers/LighterSigner.d.ts.map +1 -1
  45. package/dist/esm/signers/LighterSigner.js +7 -14
  46. package/dist/esm/signers/LighterSigner.js.map +1 -1
  47. package/dist/esm/signers/generated/wasmExecRuntime.d.ts +8 -0
  48. package/dist/esm/signers/generated/wasmExecRuntime.d.ts.map +1 -0
  49. package/dist/esm/signers/generated/wasmExecRuntime.js +574 -0
  50. package/dist/esm/signers/generated/wasmExecRuntime.js.map +1 -0
  51. package/dist/esm/signers/signActions.d.ts +3 -5
  52. package/dist/esm/signers/signActions.d.ts.map +1 -1
  53. package/dist/esm/signers/signActions.js +4 -10
  54. package/dist/esm/signers/signActions.js.map +1 -1
  55. package/dist/esm/signers/wasmBinaryUrl.js +10 -0
  56. package/dist/esm/signers/wasmLoader.d.ts +7 -31
  57. package/dist/esm/signers/wasmLoader.d.ts.map +1 -1
  58. package/dist/esm/signers/wasmLoader.js +32 -108
  59. package/dist/esm/signers/wasmLoader.js.map +1 -1
  60. package/dist/types/LighterProvider.d.ts +53 -56
  61. package/dist/types/LighterProvider.d.ts.map +1 -1
  62. package/dist/types/constants.d.ts +25 -36
  63. package/dist/types/constants.d.ts.map +1 -1
  64. package/dist/types/index.d.ts +6 -7
  65. package/dist/types/index.d.ts.map +1 -1
  66. package/dist/types/signers/LighterSigner.d.ts +10 -18
  67. package/dist/types/signers/LighterSigner.d.ts.map +1 -1
  68. package/dist/types/signers/generated/wasmExecRuntime.d.ts +8 -0
  69. package/dist/types/signers/generated/wasmExecRuntime.d.ts.map +1 -0
  70. package/dist/types/signers/signActions.d.ts +3 -5
  71. package/dist/types/signers/signActions.d.ts.map +1 -1
  72. package/dist/types/signers/wasmLoader.d.ts +7 -31
  73. package/dist/types/signers/wasmLoader.d.ts.map +1 -1
  74. package/package.json +1 -4
  75. package/src/LighterProvider.ts +98 -101
  76. package/src/constants.ts +35 -45
  77. package/src/index.ts +13 -10
  78. package/src/signers/LighterSigner.ts +15 -36
  79. package/src/signers/generated/wasmExecRuntime.ts +575 -0
  80. package/src/signers/signActions.ts +12 -30
  81. package/src/signers/wasmBinaryUrl.d.ts +7 -0
  82. package/src/signers/wasmLoader.ts +33 -152
  83. package/dist/cjs/signers/index.d.ts +0 -11
  84. package/dist/cjs/signers/index.d.ts.map +0 -1
  85. package/dist/cjs/signers/index.js +0 -18
  86. package/dist/cjs/signers/index.js.map +0 -1
  87. package/dist/esm/signers/index.d.ts +0 -11
  88. package/dist/esm/signers/index.d.ts.map +0 -1
  89. package/dist/esm/signers/index.js +0 -7
  90. package/dist/esm/signers/index.js.map +0 -1
  91. package/dist/types/signers/index.d.ts +0 -11
  92. package/dist/types/signers/index.d.ts.map +0 -1
  93. package/dist/wasm/wasm_exec.js +0 -561
  94. package/src/signers/index.ts +0 -35
  95. package/wasm/lighter-signer.wasm +0 -0
  96. package/wasm/wasm_exec.js +0 -561
@@ -0,0 +1,7 @@
1
+ /**
2
+ * URL of the Go signer binary shipped with this package: an emitted asset URL
3
+ * under a bundler, a `file://` path under Node.
4
+ *
5
+ * @internal
6
+ */
7
+ export declare const lighterWasmBinaryUrl: URL
@@ -1,78 +1,8 @@
1
1
  // The Go runtime installs functions (SignCreateOrder, SignCancelOrder, etc.)
2
2
  // onto `globalThis` when `go.run(instance)` starts the main goroutine.
3
- //
4
- // The default asset URLs resolve relative to this module's emitted JS file:
5
- // src/signers/../../wasm/lighter-signer.wasm → package-root wasm/
6
- // dist/{esm,cjs}/signers/../../wasm/… → dist/wasm/ (shared)
7
- // The build script copies the wasm assets into both dist subtrees so the same
8
- // relative path resolves at runtime regardless of which bundle is loaded.
9
- //
10
- // To resolve the module's own URL in both ESM (where `__filename` is absent)
11
- // and CJS (where `import.meta.url` is a syntax error), we parse a stack trace
12
- // — `currentModuleUrl` always appears as the first frame, and V8 includes the
13
- // emitting file path regardless of module system. Callers can override both
14
- // asset URLs via {@link LoadLighterWasmOptions} to bypass this heuristic.
15
3
 
16
- function currentModuleUrl(): string {
17
- const cjsFilename = (globalThis as { __filename?: string }).__filename
18
- if (typeof cjsFilename === 'string' && cjsFilename.length > 0) {
19
- return `file://${cjsFilename}`
20
- }
21
- const stack = new Error().stack ?? ''
22
- // Stack frames look like one of:
23
- // " at currentModuleUrl (file:///abs/path/wasmLoader.js:29:10)"
24
- // " at currentModuleUrl (/abs/path/wasmLoader.js:29:10)"
25
- // " at currentModuleUrl (file:///abs/path/wasmLoader.ts:29:10)" (vitest)
26
- // " at currentModuleUrl (http://localhost:5173/.../wasmLoader.ts?v=…:29:10)" (vite dev)
27
- const match = stack.match(/\(([^)]+wasmLoader\.[tj]s[^)]*)\)/)
28
- const frame = match?.[1] ?? ''
29
- const withoutPos = frame.replace(/:\d+:\d+$/, '')
30
- if (
31
- withoutPos.startsWith('file://') ||
32
- withoutPos.startsWith('http://') ||
33
- withoutPos.startsWith('https://')
34
- ) {
35
- return withoutPos
36
- }
37
- if (withoutPos.length > 0) {
38
- // Bare absolute path (Node CJS without `file://` prefix in some runners).
39
- return `file://${withoutPos}`
40
- }
41
- throw new Error(
42
- 'Could not resolve the Lighter WASM loader module URL. Pass an explicit ' +
43
- '`wasmBinaryUrl` and `wasmExecJsUrl` to loadLighterWasm().'
44
- )
45
- }
46
-
47
- function defaultAssetUrl(filename: string): URL {
48
- return new URL(`../../wasm/${filename}`, currentModuleUrl())
49
- }
50
-
51
- /**
52
- * Overrides for locating the Lighter Go WASM binary and its runtime loader.
53
- * Supplying explicit URLs or source is useful when a bundler does not preserve
54
- * the package's relative asset layout.
55
- *
56
- * @public
57
- */
58
- export interface LoadLighterWasmOptions {
59
- /** Override URL for the `.wasm` binary (browser: fetch; Node: fs). */
60
- wasmBinaryUrl?: string | URL
61
- /** Override URL for Go's `wasm_exec.js` runtime. */
62
- wasmExecJsUrl?: string | URL
63
- /**
64
- * Pre-fetched source of Go's `wasm_exec.js`. Preferred over
65
- * `wasmExecJsUrl` for bundlers (Vite/webpack) that may transform a `.js`
66
- * URL on serve, breaking the IIFE that installs `globalThis.Go`. Pass via
67
- * a `?raw` import (Vite) or equivalent so the original source survives
68
- * intact.
69
- *
70
- * @security This string is evaluated via `new Function(...)`. The caller is
71
- * responsible for ensuring it originates from the bundled `wasm_exec.js`;
72
- * attacker-controlled content would execute arbitrary code in the host.
73
- */
74
- wasmExecJsSource?: string
75
- }
4
+ import { WASM_EXEC_JS } from './generated/wasmExecRuntime.js'
5
+ import { lighterWasmBinaryUrl } from './wasmBinaryUrl.js'
76
6
 
77
7
  /**
78
8
  * Function table installed by the Lighter Go WASM runtime. Methods mirror the
@@ -230,109 +160,60 @@ type GoClass = new () => {
230
160
 
231
161
  let cachedExports: Promise<LighterWasmExports> | undefined
232
162
 
233
- // `node:fs/promises` and `node:url` are Node-only. Static imports force browser
234
- // bundlers (Vite/Rollup/esbuild) to resolve them up-front, which fails. Dynamic
235
- // `import('node:...')` lets bundlers leave the branch unreachable in browsers
236
- // while Node still resolves it at runtime when asked for a `file://` URL.
163
+ // `node:fs/promises` is Node-only and reached solely for a `file://` asset URL,
164
+ // which never happens in a browser. Both ignore comments are required: without
165
+ // `webpackIgnore` a Next.js build fails with `UnhandledSchemeError: Reading
166
+ // from "node:fs/promises" is not handled by plugins`, and Vite would otherwise
167
+ // warn while externalising it. Node's `readFile` accepts the `file://` URL
168
+ // directly, so no `node:url` hop is needed.
237
169
  async function readNodeFile(url: URL): Promise<Uint8Array> {
238
- const [{ readFile }, { fileURLToPath }] = await Promise.all([
239
- import(/* @vite-ignore */ 'node:fs/promises'),
240
- import(/* @vite-ignore */ 'node:url'),
241
- ])
242
- return readFile(fileURLToPath(url))
243
- }
244
-
245
- /**
246
- * Resolve a possibly-relative URL string against the current document/page
247
- * origin. Bundlers like Vite hand out absolute paths (e.g. `/node_modules/…`)
248
- * for `?url` imports, which `new URL(string)` rejects without a base.
249
- */
250
- function toResolvedUrl(url: string | URL): URL {
251
- if (url instanceof URL) {
252
- return url
253
- }
254
- const base =
255
- typeof globalThis !== 'undefined' &&
256
- (globalThis as { location?: { href?: string } }).location?.href
257
- ? (globalThis as { location: { href: string } }).location.href
258
- : undefined
259
- return new URL(url, base)
170
+ const { readFile } = await import(
171
+ /* webpackIgnore: true */ /* @vite-ignore */ 'node:fs/promises'
172
+ )
173
+ return readFile(url)
260
174
  }
261
175
 
262
- async function readUrlBytes(url: string | URL): Promise<ArrayBuffer> {
263
- const u = toResolvedUrl(url)
264
- if (u.protocol === 'file:') {
265
- const buf = await readNodeFile(u)
176
+ async function readWasmBinary(url: URL): Promise<ArrayBuffer> {
177
+ if (url.protocol === 'file:') {
178
+ const bytes = await readNodeFile(url)
266
179
  // Copy the view into a fresh ArrayBuffer — `Buffer.buffer` is a shared
267
180
  // ArrayBuffer in Node and the wasm instantiator expects a plain one.
268
- return buf.slice().buffer as ArrayBuffer
181
+ return bytes.slice().buffer as ArrayBuffer
269
182
  }
270
- const response = await fetch(u)
183
+ const response = await fetch(url)
271
184
  if (!response.ok) {
272
185
  throw new Error(
273
- `Failed to fetch ${u.href}: ${response.status} ${response.statusText}`
186
+ `Failed to fetch ${url.href}: ${response.status} ${response.statusText}`
274
187
  )
275
188
  }
276
189
  return response.arrayBuffer()
277
190
  }
278
191
 
279
- async function readUrlText(url: string | URL): Promise<string> {
280
- const u = toResolvedUrl(url)
281
- if (u.protocol === 'file:') {
282
- const buf = await readNodeFile(u)
283
- return new TextDecoder('utf-8').decode(buf)
284
- }
285
- const response = await fetch(u)
286
- if (!response.ok) {
287
- throw new Error(
288
- `Failed to fetch ${u.href}: ${response.status} ${response.statusText}`
289
- )
290
- }
291
- return response.text()
292
- }
293
-
294
192
  /**
295
- * Load the Lighter WASM signer. Memoized per-process: subsequent calls return
296
- * the cached exports. The Go runtime keeps a long-running goroutine to service
297
- * JS calls — we start it once and never stop it.
298
- * @public
193
+ * Load the Lighter WASM signer from the binary shipped with this package.
194
+ * Memoized per-process: subsequent calls return the cached exports. The Go
195
+ * runtime keeps a long-running goroutine to service JS calls — we start it
196
+ * once and never stop it.
197
+ * @internal
299
198
  */
300
- export async function loadLighterWasm(
301
- options?: LoadLighterWasmOptions
302
- ): Promise<LighterWasmExports> {
199
+ export async function loadLighterWasm(): Promise<LighterWasmExports> {
303
200
  if (!cachedExports) {
304
- cachedExports = loadWasmUncached(options)
201
+ cachedExports = loadWasmUncached()
305
202
  }
306
203
  return cachedExports
307
204
  }
308
205
 
309
- async function loadWasmUncached(
310
- options?: LoadLighterWasmOptions
311
- ): Promise<LighterWasmExports> {
312
- const wasmBinaryUrl =
313
- options?.wasmBinaryUrl ?? defaultAssetUrl('lighter-signer.wasm')
314
-
315
- // Prefer a pre-fetched source string (bundler `?raw` imports) over a URL —
316
- // bundlers may transform a `.js` URL on serve, breaking the IIFE that sets
317
- // `globalThis.Go`.
318
- const wasmExecSourcePromise: Promise<string> =
319
- options?.wasmExecJsSource !== undefined
320
- ? Promise.resolve(options.wasmExecJsSource)
321
- : readUrlText(options?.wasmExecJsUrl ?? defaultAssetUrl('wasm_exec.js'))
322
-
323
- const [wasmExecSource, wasmBytes] = await Promise.all([
324
- wasmExecSourcePromise,
325
- readUrlBytes(wasmBinaryUrl),
326
- ])
206
+ async function loadWasmUncached(): Promise<LighterWasmExports> {
207
+ const wasmBytes = await readWasmBinary(lighterWasmBinaryUrl)
327
208
 
328
209
  // wasm_exec.js is an IIFE that installs `globalThis.Go = class { ... }` plus
329
- // fs/process/crypto polyfills. Evaluating it as a string keeps Go's runtime
210
+ // fs/process/crypto polyfills. Evaluating the packaged text keeps Go's runtime
330
211
  // opaque to consumer bundlers — it references require/process/fs/crypto, which
331
- // Vite/webpack choke on if they try to parse it as a module. The default-path
332
- // source is our build-time-vendored, trusted wasm_exec.js — see the `@security`
333
- // note on `LoadLighterWasmOptions.wasmExecJsSource` for the caller-override boundary.
212
+ // Vite/webpack choke on if they try to parse it as a module. The text is
213
+ // generated from this package's vendored wasm_exec.js at build time and is
214
+ // never caller-supplied.
334
215
  // nosec
335
- const installGo = new Function(`${wasmExecSource}; return globalThis.Go`)
216
+ const installGo = new Function(`${WASM_EXEC_JS}; return globalThis.Go`)
336
217
  const Go = installGo() as GoClass
337
218
 
338
219
  const go = new Go()
@@ -374,7 +255,7 @@ async function yieldToGoRuntime(): Promise<void> {
374
255
  /**
375
256
  * Testing helper — drop the cached WASM instance so the next load reinitializes.
376
257
  *
377
- * @public
258
+ * @internal
378
259
  */
379
260
  export function resetLighterWasmCache(): void {
380
261
  cachedExports = undefined
@@ -1,11 +0,0 @@
1
- export type { CreateAuthTokenInputs } from './createAuthToken.js';
2
- export { createAuthToken, isReadOnlyTokenExpiringSoon, } from './createAuthToken.js';
3
- export type { LighterApiKey } from './LighterKeyStore.js';
4
- export { LighterKeyStore } from './LighterKeyStore.js';
5
- export type { ApproveReadOnlyTokenInputs, ApproveReadOnlyTokenResult, LighterCreateTokenResponse, LighterReadOnlyToken, LighterReadOnlyTokenManagerOptions, LighterTokenFetcher, } from './LighterReadOnlyTokenManager.js';
6
- export { DEFAULT_READ_ONLY_TOKEN_NAME, defaultLighterTokenFetcher, LighterReadOnlyTokenManager, } from './LighterReadOnlyTokenManager.js';
7
- export type { ApiKeyPair, ChangePubKeyResult, LighterSignedBlob, LighterSignerConfig, LighterSignerContext, } from './LighterSigner.js';
8
- export { LighterSigner } from './LighterSigner.js';
9
- export type { LighterWasmExports, LoadLighterWasmOptions, } from './wasmLoader.js';
10
- export { loadLighterWasm, resetLighterWasmCache } from './wasmLoader.js';
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/signers/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EACL,eAAe,EACf,2BAA2B,GAC5B,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,EACpB,kCAAkC,EAClC,mBAAmB,GACpB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAA;AACzC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resetLighterWasmCache = exports.loadLighterWasm = exports.LighterSigner = exports.LighterReadOnlyTokenManager = exports.defaultLighterTokenFetcher = exports.DEFAULT_READ_ONLY_TOKEN_NAME = exports.LighterKeyStore = exports.isReadOnlyTokenExpiringSoon = exports.createAuthToken = void 0;
4
- var createAuthToken_js_1 = require("./createAuthToken.js");
5
- Object.defineProperty(exports, "createAuthToken", { enumerable: true, get: function () { return createAuthToken_js_1.createAuthToken; } });
6
- Object.defineProperty(exports, "isReadOnlyTokenExpiringSoon", { enumerable: true, get: function () { return createAuthToken_js_1.isReadOnlyTokenExpiringSoon; } });
7
- var LighterKeyStore_js_1 = require("./LighterKeyStore.js");
8
- Object.defineProperty(exports, "LighterKeyStore", { enumerable: true, get: function () { return LighterKeyStore_js_1.LighterKeyStore; } });
9
- var LighterReadOnlyTokenManager_js_1 = require("./LighterReadOnlyTokenManager.js");
10
- Object.defineProperty(exports, "DEFAULT_READ_ONLY_TOKEN_NAME", { enumerable: true, get: function () { return LighterReadOnlyTokenManager_js_1.DEFAULT_READ_ONLY_TOKEN_NAME; } });
11
- Object.defineProperty(exports, "defaultLighterTokenFetcher", { enumerable: true, get: function () { return LighterReadOnlyTokenManager_js_1.defaultLighterTokenFetcher; } });
12
- Object.defineProperty(exports, "LighterReadOnlyTokenManager", { enumerable: true, get: function () { return LighterReadOnlyTokenManager_js_1.LighterReadOnlyTokenManager; } });
13
- var LighterSigner_js_1 = require("./LighterSigner.js");
14
- Object.defineProperty(exports, "LighterSigner", { enumerable: true, get: function () { return LighterSigner_js_1.LighterSigner; } });
15
- var wasmLoader_js_1 = require("./wasmLoader.js");
16
- Object.defineProperty(exports, "loadLighterWasm", { enumerable: true, get: function () { return wasmLoader_js_1.loadLighterWasm; } });
17
- Object.defineProperty(exports, "resetLighterWasmCache", { enumerable: true, get: function () { return wasmLoader_js_1.resetLighterWasmCache; } });
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/signers/index.ts"],"names":[],"mappings":";;;AAGA,2DAG6B;AAF3B,qHAAA,eAAe,OAAA;AACf,iIAAA,2BAA2B,OAAA;AAG7B,2DAAsD;AAA7C,qHAAA,eAAe,OAAA;AASxB,mFAIyC;AAHvC,8IAAA,4BAA4B,OAAA;AAC5B,4IAAA,0BAA0B,OAAA;AAC1B,6IAAA,2BAA2B,OAAA;AAS7B,uDAAkD;AAAzC,iHAAA,aAAa,OAAA;AAKtB,iDAAwE;AAA/D,gHAAA,eAAe,OAAA;AAAE,sHAAA,qBAAqB,OAAA"}
@@ -1,11 +0,0 @@
1
- export type { CreateAuthTokenInputs } from './createAuthToken.js';
2
- export { createAuthToken, isReadOnlyTokenExpiringSoon, } from './createAuthToken.js';
3
- export type { LighterApiKey } from './LighterKeyStore.js';
4
- export { LighterKeyStore } from './LighterKeyStore.js';
5
- export type { ApproveReadOnlyTokenInputs, ApproveReadOnlyTokenResult, LighterCreateTokenResponse, LighterReadOnlyToken, LighterReadOnlyTokenManagerOptions, LighterTokenFetcher, } from './LighterReadOnlyTokenManager.js';
6
- export { DEFAULT_READ_ONLY_TOKEN_NAME, defaultLighterTokenFetcher, LighterReadOnlyTokenManager, } from './LighterReadOnlyTokenManager.js';
7
- export type { ApiKeyPair, ChangePubKeyResult, LighterSignedBlob, LighterSignerConfig, LighterSignerContext, } from './LighterSigner.js';
8
- export { LighterSigner } from './LighterSigner.js';
9
- export type { LighterWasmExports, LoadLighterWasmOptions, } from './wasmLoader.js';
10
- export { loadLighterWasm, resetLighterWasmCache } from './wasmLoader.js';
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/signers/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EACL,eAAe,EACf,2BAA2B,GAC5B,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,EACpB,kCAAkC,EAClC,mBAAmB,GACpB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAA;AACzC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1,7 +0,0 @@
1
- // biome-ignore-all lint/performance/noBarrelFile: package-internal barrel.
2
- export { createAuthToken, isReadOnlyTokenExpiringSoon, } from './createAuthToken.js';
3
- export { LighterKeyStore } from './LighterKeyStore.js';
4
- export { DEFAULT_READ_ONLY_TOKEN_NAME, defaultLighterTokenFetcher, LighterReadOnlyTokenManager, } from './LighterReadOnlyTokenManager.js';
5
- export { LighterSigner } from './LighterSigner.js';
6
- export { loadLighterWasm, resetLighterWasmCache } from './wasmLoader.js';
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/signers/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAG3E,OAAO,EACL,eAAe,EACf,2BAA2B,GAC5B,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAStD,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAA;AAQzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAKlD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1,11 +0,0 @@
1
- export type { CreateAuthTokenInputs } from './createAuthToken.js';
2
- export { createAuthToken, isReadOnlyTokenExpiringSoon, } from './createAuthToken.js';
3
- export type { LighterApiKey } from './LighterKeyStore.js';
4
- export { LighterKeyStore } from './LighterKeyStore.js';
5
- export type { ApproveReadOnlyTokenInputs, ApproveReadOnlyTokenResult, LighterCreateTokenResponse, LighterReadOnlyToken, LighterReadOnlyTokenManagerOptions, LighterTokenFetcher, } from './LighterReadOnlyTokenManager.js';
6
- export { DEFAULT_READ_ONLY_TOKEN_NAME, defaultLighterTokenFetcher, LighterReadOnlyTokenManager, } from './LighterReadOnlyTokenManager.js';
7
- export type { ApiKeyPair, ChangePubKeyResult, LighterSignedBlob, LighterSignerConfig, LighterSignerContext, } from './LighterSigner.js';
8
- export { LighterSigner } from './LighterSigner.js';
9
- export type { LighterWasmExports, LoadLighterWasmOptions, } from './wasmLoader.js';
10
- export { loadLighterWasm, resetLighterWasmCache } from './wasmLoader.js';
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/signers/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EACL,eAAe,EACf,2BAA2B,GAC5B,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,EACpB,kCAAkC,EAClC,mBAAmB,GACpB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAA;AACzC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA"}