@lightsparkdev/lightspark-sdk 1.8.4 → 1.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -97,7 +97,6 @@ import {
97
97
  import {
98
98
  BitcoinNetwork_default
99
99
  } from "./chunk-K6SAUSAX.js";
100
- import "./chunk-FTA5RKYX.js";
101
100
 
102
101
  // src/auth/AccountTokenAuthProvider.ts
103
102
  import { b64encode } from "@lightsparkdev/core";
@@ -152,7 +151,7 @@ import {
152
151
  // package.json
153
152
  var package_default = {
154
153
  name: "@lightsparkdev/lightspark-sdk",
155
- version: "1.8.4",
154
+ version: "1.8.6",
156
155
  description: "Lightspark JS SDK",
157
156
  author: "Lightspark Inc.",
158
157
  keywords: [
@@ -234,8 +233,8 @@ var package_default = {
234
233
  },
235
234
  license: "Apache-2.0",
236
235
  dependencies: {
237
- "@lightsparkdev/core": "1.2.3",
238
- "@lightsparkdev/crypto-wasm": "0.1.5",
236
+ "@lightsparkdev/core": "1.2.4",
237
+ "@lightsparkdev/crypto-wasm": "0.1.7",
239
238
  "crypto-browserify": "^3.12.0",
240
239
  dayjs: "^1.11.7",
241
240
  dotenv: "^16.3.1",
@@ -2527,13 +2526,8 @@ var verifyAndParseWebhook = async (data, hexdigest, webhook_secret) => {
2527
2526
  }
2528
2527
  return parseWebhook(data);
2529
2528
  };
2530
- var parseWebhook = async (data) => {
2531
- let td = TextDecoder;
2532
- if (typeof td === "undefined") {
2533
- const tdModule = await import("./text-encoding-3OZOB4NR.js");
2534
- td = tdModule.TextDecoder;
2535
- }
2536
- const dataStr = new td().decode(data);
2529
+ var parseWebhook = (data) => {
2530
+ const dataStr = new TextDecoder().decode(data);
2537
2531
  const event = JSON.parse(dataStr);
2538
2532
  return {
2539
2533
  event_type: WebhookEventType[event.event_type],
@@ -63,7 +63,6 @@ import {
63
63
  import {
64
64
  BitcoinNetwork_default
65
65
  } from "../chunk-K6SAUSAX.js";
66
- import "../chunk-FTA5RKYX.js";
67
66
  export {
68
67
  Account_default as Account,
69
68
  BitcoinNetwork_default as BitcoinNetwork,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightsparkdev/lightspark-sdk",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "description": "Lightspark JS SDK",
5
5
  "author": "Lightspark Inc.",
6
6
  "keywords": [
@@ -82,8 +82,8 @@
82
82
  },
83
83
  "license": "Apache-2.0",
84
84
  "dependencies": {
85
- "@lightsparkdev/core": "1.2.3",
86
- "@lightsparkdev/crypto-wasm": "0.1.5",
85
+ "@lightsparkdev/core": "1.2.4",
86
+ "@lightsparkdev/crypto-wasm": "0.1.7",
87
87
  "crypto-browserify": "^3.12.0",
88
88
  "dayjs": "^1.11.7",
89
89
  "dotenv": "^16.3.1",
package/src/webhooks.ts CHANGED
@@ -28,13 +28,8 @@ export const verifyAndParseWebhook = async (
28
28
  return parseWebhook(data);
29
29
  };
30
30
 
31
- const parseWebhook = async (data: Uint8Array): Promise<WebhookEvent> => {
32
- let td = TextDecoder;
33
- if (typeof td === "undefined") {
34
- const tdModule = await import("text-encoding");
35
- td = tdModule.TextDecoder;
36
- }
37
- const dataStr = new td().decode(data);
31
+ const parseWebhook = (data: Uint8Array): WebhookEvent => {
32
+ const dataStr = new TextDecoder().decode(data);
38
33
  const event = JSON.parse(dataStr);
39
34
 
40
35
  return {
@@ -1,8 +0,0 @@
1
- var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __commonJS = (cb, mod) => function __require() {
3
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
- };
5
-
6
- export {
7
- __commonJS
8
- };