@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/CHANGELOG.md +17 -0
- package/dist/env.js +0 -1
- package/dist/index.cjs +5 -1815
- package/dist/index.js +5 -11
- package/dist/objects/index.js +0 -1
- package/package.json +3 -3
- package/src/webhooks.ts +2 -7
- package/dist/chunk-FTA5RKYX.js +0 -8
- package/dist/text-encoding-3OZOB4NR.js +0 -1805
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.
|
|
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.
|
|
238
|
-
"@lightsparkdev/crypto-wasm": "0.1.
|
|
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 =
|
|
2531
|
-
|
|
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],
|
package/dist/objects/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightsparkdev/lightspark-sdk",
|
|
3
|
-
"version": "1.8.
|
|
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.
|
|
86
|
-
"@lightsparkdev/crypto-wasm": "0.1.
|
|
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 =
|
|
32
|
-
|
|
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 {
|
package/dist/chunk-FTA5RKYX.js
DELETED