@blindpay/node 2.3.0 → 2.5.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.
- package/dist/{api-client-Cw2mNJeR.d.mts → api-client-Drd7alfK.d.mts} +2 -2
- package/dist/{api-client-Cw2mNJeR.d.ts → api-client-Drd7alfK.d.ts} +2 -2
- package/dist/{chunk-DZ4K6K32.mjs → chunk-CEJF5Y4K.mjs} +27 -24
- package/dist/{chunk-E7M4CJKR.mjs → chunk-VRA5HP7F.mjs} +7 -0
- package/dist/index.d.mts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +25 -15
- package/dist/index.mjs +10 -10
- package/dist/resources/api-keys/api-keys.test.js +25 -15
- package/dist/resources/api-keys/api-keys.test.mjs +4 -4
- package/dist/resources/api-keys/index.d.mts +1 -1
- package/dist/resources/api-keys/index.d.ts +1 -1
- package/dist/resources/available/available.test.js +25 -15
- package/dist/resources/available/available.test.mjs +4 -4
- package/dist/resources/available/index.d.mts +1 -1
- package/dist/resources/available/index.d.ts +1 -1
- package/dist/resources/bank-accounts/bank-accounts.test.js +25 -15
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +4 -4
- package/dist/resources/bank-accounts/index.d.mts +1 -1
- package/dist/resources/bank-accounts/index.d.ts +1 -1
- package/dist/resources/instances/index.d.mts +1 -1
- package/dist/resources/instances/index.d.ts +1 -1
- package/dist/resources/instances/instances.test.js +25 -15
- package/dist/resources/instances/instances.test.mjs +4 -4
- package/dist/resources/partner-fees/index.d.mts +1 -1
- package/dist/resources/partner-fees/index.d.ts +1 -1
- package/dist/resources/partner-fees/partner-fees.test.js +25 -15
- package/dist/resources/partner-fees/partner-fees.test.mjs +4 -4
- package/dist/resources/payins/index.d.mts +1 -1
- package/dist/resources/payins/index.d.ts +1 -1
- package/dist/resources/payins/payins-quotes.test.js +111 -15
- package/dist/resources/payins/payins-quotes.test.mjs +90 -4
- package/dist/resources/payins/payins.test.js +27 -17
- package/dist/resources/payins/payins.test.mjs +6 -6
- package/dist/resources/payins/quotes.d.mts +68 -3
- package/dist/resources/payins/quotes.d.ts +68 -3
- package/dist/resources/payins/quotes.js +7 -0
- package/dist/resources/payins/quotes.mjs +1 -1
- package/dist/resources/payouts/index.d.mts +1 -1
- package/dist/resources/payouts/index.d.ts +1 -1
- package/dist/resources/payouts/payouts.test.js +27 -17
- package/dist/resources/payouts/payouts.test.mjs +6 -6
- package/dist/resources/quotes/index.d.mts +1 -1
- package/dist/resources/quotes/index.d.ts +1 -1
- package/dist/resources/quotes/quotes.test.js +25 -15
- package/dist/resources/quotes/quotes.test.mjs +4 -4
- package/dist/resources/receivers/index.d.mts +1 -1
- package/dist/resources/receivers/index.d.ts +1 -1
- package/dist/resources/receivers/receivers.test.js +25 -15
- package/dist/resources/receivers/receivers.test.mjs +4 -4
- package/dist/resources/terms-of-service/index.d.mts +1 -1
- package/dist/resources/terms-of-service/index.d.ts +1 -1
- package/dist/resources/terms-of-service/terms-of-service.test.js +25 -15
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +4 -4
- package/dist/resources/virtual-accounts/index.d.mts +1 -1
- package/dist/resources/virtual-accounts/index.d.ts +1 -1
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +25 -15
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +4 -4
- package/dist/resources/wallets/blockchain.d.mts +1 -1
- package/dist/resources/wallets/blockchain.d.ts +1 -1
- package/dist/resources/wallets/blockchain.test.js +25 -15
- package/dist/resources/wallets/blockchain.test.mjs +4 -4
- package/dist/resources/wallets/offramp.d.mts +1 -1
- package/dist/resources/wallets/offramp.d.ts +1 -1
- package/dist/resources/wallets/offramp.test.js +25 -15
- package/dist/resources/wallets/offramp.test.mjs +4 -4
- package/dist/resources/webhooks/index.d.mts +1 -1
- package/dist/resources/webhooks/index.d.ts +1 -1
- package/dist/resources/webhooks/webhooks.test.js +25 -15
- package/dist/resources/webhooks/webhooks.test.mjs +4 -4
- package/package.json +5 -2
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-CEJF5Y4K.mjs";
|
|
12
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
12
13
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
18
|
import "../../chunk-5XJJKYXE.mjs";
|
|
19
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
19
20
|
import "../../chunk-RC5NN5UF.mjs";
|
|
20
21
|
import "../../chunk-W7NJUABI.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-VRA5HP7F.mjs";
|
|
22
23
|
import "../../chunk-3QQCDR3E.mjs";
|
|
23
24
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
-
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
@@ -18699,10 +18699,10 @@ function getImporter(name) {
|
|
|
18699
18699
|
var import_expect_type = __toESM(require_dist(), 1);
|
|
18700
18700
|
|
|
18701
18701
|
// src/client.ts
|
|
18702
|
-
var
|
|
18702
|
+
var import_svix = require("svix");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "2.
|
|
18705
|
+
var version = "2.5.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18928,6 +18928,13 @@ function createPayinQuotesResource(instanceId, client) {
|
|
|
18928
18928
|
getFxRate(_b) {
|
|
18929
18929
|
var data = __objRest(_b, []);
|
|
18930
18930
|
return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
|
|
18931
|
+
},
|
|
18932
|
+
get(id) {
|
|
18933
|
+
return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
|
|
18934
|
+
},
|
|
18935
|
+
list(params) {
|
|
18936
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18937
|
+
return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
|
|
18931
18938
|
}
|
|
18932
18939
|
};
|
|
18933
18940
|
}
|
|
@@ -19333,26 +19340,29 @@ var BlindPay = class {
|
|
|
19333
19340
|
});
|
|
19334
19341
|
}
|
|
19335
19342
|
/**
|
|
19336
|
-
* Verifies the BlindPay webhook signature
|
|
19343
|
+
* Verifies the BlindPay webhook signature using Svix
|
|
19337
19344
|
*
|
|
19338
19345
|
* @param params.secret The webhook secret from BlindPay dashboard
|
|
19339
|
-
* @param params.
|
|
19340
|
-
* @param params.
|
|
19341
|
-
* @param params.payload The raw request body
|
|
19342
|
-
* @param params.svixSignature The value of the `svix-signature` header
|
|
19346
|
+
* @param params.headers The webhook headers object containing svix-id, svix-timestamp, and svix-signature
|
|
19347
|
+
* @param params.payload The raw request body as a string
|
|
19343
19348
|
* @returns {boolean} True if the signature is valid, false otherwise
|
|
19344
19349
|
*/
|
|
19345
19350
|
verifyWebhookSignature({
|
|
19346
19351
|
secret,
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
payload,
|
|
19350
|
-
svixSignature
|
|
19352
|
+
headers,
|
|
19353
|
+
payload
|
|
19351
19354
|
}) {
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19355
|
+
try {
|
|
19356
|
+
const webhook = new import_svix.Webhook(secret);
|
|
19357
|
+
webhook.verify(payload, {
|
|
19358
|
+
"svix-id": headers.id,
|
|
19359
|
+
"svix-timestamp": headers.timestamp,
|
|
19360
|
+
"svix-signature": headers.signature
|
|
19361
|
+
});
|
|
19362
|
+
return true;
|
|
19363
|
+
} catch (e) {
|
|
19364
|
+
return false;
|
|
19365
|
+
}
|
|
19356
19366
|
}
|
|
19357
19367
|
};
|
|
19358
19368
|
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-CEJF5Y4K.mjs";
|
|
12
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
12
13
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
18
|
import "../../chunk-5XJJKYXE.mjs";
|
|
19
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
19
20
|
import "../../chunk-RC5NN5UF.mjs";
|
|
20
21
|
import "../../chunk-W7NJUABI.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-VRA5HP7F.mjs";
|
|
22
23
|
import "../../chunk-3QQCDR3E.mjs";
|
|
23
24
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
-
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, S as StablecoinToken, B as BlindpayApiResponse } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, S as StablecoinToken, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.mjs';
|
|
2
2
|
|
|
3
3
|
type VirtualAccount = {
|
|
4
4
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, S as StablecoinToken, B as BlindpayApiResponse } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, S as StablecoinToken, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.js';
|
|
2
2
|
|
|
3
3
|
type VirtualAccount = {
|
|
4
4
|
id: string;
|
|
@@ -18699,10 +18699,10 @@ function getImporter(name) {
|
|
|
18699
18699
|
var import_expect_type = __toESM(require_dist(), 1);
|
|
18700
18700
|
|
|
18701
18701
|
// src/client.ts
|
|
18702
|
-
var
|
|
18702
|
+
var import_svix = require("svix");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "2.
|
|
18705
|
+
var version = "2.5.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18928,6 +18928,13 @@ function createPayinQuotesResource(instanceId, client) {
|
|
|
18928
18928
|
getFxRate(_b) {
|
|
18929
18929
|
var data = __objRest(_b, []);
|
|
18930
18930
|
return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
|
|
18931
|
+
},
|
|
18932
|
+
get(id) {
|
|
18933
|
+
return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
|
|
18934
|
+
},
|
|
18935
|
+
list(params) {
|
|
18936
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18937
|
+
return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
|
|
18931
18938
|
}
|
|
18932
18939
|
};
|
|
18933
18940
|
}
|
|
@@ -19333,26 +19340,29 @@ var BlindPay = class {
|
|
|
19333
19340
|
});
|
|
19334
19341
|
}
|
|
19335
19342
|
/**
|
|
19336
|
-
* Verifies the BlindPay webhook signature
|
|
19343
|
+
* Verifies the BlindPay webhook signature using Svix
|
|
19337
19344
|
*
|
|
19338
19345
|
* @param params.secret The webhook secret from BlindPay dashboard
|
|
19339
|
-
* @param params.
|
|
19340
|
-
* @param params.
|
|
19341
|
-
* @param params.payload The raw request body
|
|
19342
|
-
* @param params.svixSignature The value of the `svix-signature` header
|
|
19346
|
+
* @param params.headers The webhook headers object containing svix-id, svix-timestamp, and svix-signature
|
|
19347
|
+
* @param params.payload The raw request body as a string
|
|
19343
19348
|
* @returns {boolean} True if the signature is valid, false otherwise
|
|
19344
19349
|
*/
|
|
19345
19350
|
verifyWebhookSignature({
|
|
19346
19351
|
secret,
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
payload,
|
|
19350
|
-
svixSignature
|
|
19352
|
+
headers,
|
|
19353
|
+
payload
|
|
19351
19354
|
}) {
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19355
|
+
try {
|
|
19356
|
+
const webhook = new import_svix.Webhook(secret);
|
|
19357
|
+
webhook.verify(payload, {
|
|
19358
|
+
"svix-id": headers.id,
|
|
19359
|
+
"svix-timestamp": headers.timestamp,
|
|
19360
|
+
"svix-signature": headers.signature
|
|
19361
|
+
});
|
|
19362
|
+
return true;
|
|
19363
|
+
} catch (e) {
|
|
19364
|
+
return false;
|
|
19365
|
+
}
|
|
19356
19366
|
}
|
|
19357
19367
|
};
|
|
19358
19368
|
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-CEJF5Y4K.mjs";
|
|
12
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
12
13
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
18
|
import "../../chunk-5XJJKYXE.mjs";
|
|
19
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
19
20
|
import "../../chunk-RC5NN5UF.mjs";
|
|
20
21
|
import "../../chunk-W7NJUABI.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-VRA5HP7F.mjs";
|
|
22
23
|
import "../../chunk-3QQCDR3E.mjs";
|
|
23
24
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
-
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-Drd7alfK.mjs';
|
|
2
2
|
|
|
3
3
|
type GetBlockchainWalletMessage = string;
|
|
4
4
|
type GetBlockchainWalletMessageResponse = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse, N as Network } from '../../api-client-Drd7alfK.js';
|
|
2
2
|
|
|
3
3
|
type GetBlockchainWalletMessage = string;
|
|
4
4
|
type GetBlockchainWalletMessageResponse = {
|
|
@@ -18699,10 +18699,10 @@ function getImporter(name) {
|
|
|
18699
18699
|
var import_expect_type = __toESM(require_dist(), 1);
|
|
18700
18700
|
|
|
18701
18701
|
// src/client.ts
|
|
18702
|
-
var
|
|
18702
|
+
var import_svix = require("svix");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "2.
|
|
18705
|
+
var version = "2.5.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18928,6 +18928,13 @@ function createPayinQuotesResource(instanceId, client) {
|
|
|
18928
18928
|
getFxRate(_b) {
|
|
18929
18929
|
var data = __objRest(_b, []);
|
|
18930
18930
|
return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
|
|
18931
|
+
},
|
|
18932
|
+
get(id) {
|
|
18933
|
+
return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
|
|
18934
|
+
},
|
|
18935
|
+
list(params) {
|
|
18936
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18937
|
+
return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
|
|
18931
18938
|
}
|
|
18932
18939
|
};
|
|
18933
18940
|
}
|
|
@@ -19333,26 +19340,29 @@ var BlindPay = class {
|
|
|
19333
19340
|
});
|
|
19334
19341
|
}
|
|
19335
19342
|
/**
|
|
19336
|
-
* Verifies the BlindPay webhook signature
|
|
19343
|
+
* Verifies the BlindPay webhook signature using Svix
|
|
19337
19344
|
*
|
|
19338
19345
|
* @param params.secret The webhook secret from BlindPay dashboard
|
|
19339
|
-
* @param params.
|
|
19340
|
-
* @param params.
|
|
19341
|
-
* @param params.payload The raw request body
|
|
19342
|
-
* @param params.svixSignature The value of the `svix-signature` header
|
|
19346
|
+
* @param params.headers The webhook headers object containing svix-id, svix-timestamp, and svix-signature
|
|
19347
|
+
* @param params.payload The raw request body as a string
|
|
19343
19348
|
* @returns {boolean} True if the signature is valid, false otherwise
|
|
19344
19349
|
*/
|
|
19345
19350
|
verifyWebhookSignature({
|
|
19346
19351
|
secret,
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
payload,
|
|
19350
|
-
svixSignature
|
|
19352
|
+
headers,
|
|
19353
|
+
payload
|
|
19351
19354
|
}) {
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19355
|
+
try {
|
|
19356
|
+
const webhook = new import_svix.Webhook(secret);
|
|
19357
|
+
webhook.verify(payload, {
|
|
19358
|
+
"svix-id": headers.id,
|
|
19359
|
+
"svix-timestamp": headers.timestamp,
|
|
19360
|
+
"svix-signature": headers.signature
|
|
19361
|
+
});
|
|
19362
|
+
return true;
|
|
19363
|
+
} catch (e) {
|
|
19364
|
+
return false;
|
|
19365
|
+
}
|
|
19356
19366
|
}
|
|
19357
19367
|
};
|
|
19358
19368
|
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-CEJF5Y4K.mjs";
|
|
12
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
12
13
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
18
|
import "../../chunk-5XJJKYXE.mjs";
|
|
19
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
19
20
|
import "../../chunk-RC5NN5UF.mjs";
|
|
20
21
|
import "../../chunk-W7NJUABI.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-VRA5HP7F.mjs";
|
|
22
23
|
import "../../chunk-3QQCDR3E.mjs";
|
|
23
24
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
-
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
@@ -18699,10 +18699,10 @@ function getImporter(name) {
|
|
|
18699
18699
|
var import_expect_type = __toESM(require_dist(), 1);
|
|
18700
18700
|
|
|
18701
18701
|
// src/client.ts
|
|
18702
|
-
var
|
|
18702
|
+
var import_svix = require("svix");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "2.
|
|
18705
|
+
var version = "2.5.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18928,6 +18928,13 @@ function createPayinQuotesResource(instanceId, client) {
|
|
|
18928
18928
|
getFxRate(_b) {
|
|
18929
18929
|
var data = __objRest(_b, []);
|
|
18930
18930
|
return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
|
|
18931
|
+
},
|
|
18932
|
+
get(id) {
|
|
18933
|
+
return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
|
|
18934
|
+
},
|
|
18935
|
+
list(params) {
|
|
18936
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18937
|
+
return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
|
|
18931
18938
|
}
|
|
18932
18939
|
};
|
|
18933
18940
|
}
|
|
@@ -19333,26 +19340,29 @@ var BlindPay = class {
|
|
|
19333
19340
|
});
|
|
19334
19341
|
}
|
|
19335
19342
|
/**
|
|
19336
|
-
* Verifies the BlindPay webhook signature
|
|
19343
|
+
* Verifies the BlindPay webhook signature using Svix
|
|
19337
19344
|
*
|
|
19338
19345
|
* @param params.secret The webhook secret from BlindPay dashboard
|
|
19339
|
-
* @param params.
|
|
19340
|
-
* @param params.
|
|
19341
|
-
* @param params.payload The raw request body
|
|
19342
|
-
* @param params.svixSignature The value of the `svix-signature` header
|
|
19346
|
+
* @param params.headers The webhook headers object containing svix-id, svix-timestamp, and svix-signature
|
|
19347
|
+
* @param params.payload The raw request body as a string
|
|
19343
19348
|
* @returns {boolean} True if the signature is valid, false otherwise
|
|
19344
19349
|
*/
|
|
19345
19350
|
verifyWebhookSignature({
|
|
19346
19351
|
secret,
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
payload,
|
|
19350
|
-
svixSignature
|
|
19352
|
+
headers,
|
|
19353
|
+
payload
|
|
19351
19354
|
}) {
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19355
|
+
try {
|
|
19356
|
+
const webhook = new import_svix.Webhook(secret);
|
|
19357
|
+
webhook.verify(payload, {
|
|
19358
|
+
"svix-id": headers.id,
|
|
19359
|
+
"svix-timestamp": headers.timestamp,
|
|
19360
|
+
"svix-signature": headers.signature
|
|
19361
|
+
});
|
|
19362
|
+
return true;
|
|
19363
|
+
} catch (e) {
|
|
19364
|
+
return false;
|
|
19365
|
+
}
|
|
19356
19366
|
}
|
|
19357
19367
|
};
|
|
19358
19368
|
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-CEJF5Y4K.mjs";
|
|
12
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
12
13
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
18
|
import "../../chunk-5XJJKYXE.mjs";
|
|
19
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
19
20
|
import "../../chunk-RC5NN5UF.mjs";
|
|
20
21
|
import "../../chunk-W7NJUABI.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-VRA5HP7F.mjs";
|
|
22
23
|
import "../../chunk-3QQCDR3E.mjs";
|
|
23
24
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
-
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.mjs';
|
|
2
2
|
|
|
3
3
|
type WebhookEvents = "receiver.new" | "receiver.update" | "bankAccount.new" | "payout.new" | "payout.update" | "payout.complete" | "payout.partnerFee" | "blockchainWallet.new" | "payin.new" | "payin.update" | "payin.complete" | "payin.partnerFee" | "tos.accept";
|
|
4
4
|
type CreateWebhookEndpointInput = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-
|
|
1
|
+
import { I as InternalApiClient, B as BlindpayApiResponse } from '../../api-client-Drd7alfK.js';
|
|
2
2
|
|
|
3
3
|
type WebhookEvents = "receiver.new" | "receiver.update" | "bankAccount.new" | "payout.new" | "payout.update" | "payout.complete" | "payout.partnerFee" | "blockchainWallet.new" | "payin.new" | "payin.update" | "payin.complete" | "payin.partnerFee" | "tos.accept";
|
|
4
4
|
type CreateWebhookEndpointInput = {
|
|
@@ -18699,10 +18699,10 @@ function getImporter(name) {
|
|
|
18699
18699
|
var import_expect_type = __toESM(require_dist(), 1);
|
|
18700
18700
|
|
|
18701
18701
|
// src/client.ts
|
|
18702
|
-
var
|
|
18702
|
+
var import_svix = require("svix");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "2.
|
|
18705
|
+
var version = "2.5.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18928,6 +18928,13 @@ function createPayinQuotesResource(instanceId, client) {
|
|
|
18928
18928
|
getFxRate(_b) {
|
|
18929
18929
|
var data = __objRest(_b, []);
|
|
18930
18930
|
return client.post(`/instances/${instanceId}/payin-quotes/fx`, data);
|
|
18931
|
+
},
|
|
18932
|
+
get(id) {
|
|
18933
|
+
return client.get(`/instances/${instanceId}/payin-quotes/${id}`);
|
|
18934
|
+
},
|
|
18935
|
+
list(params) {
|
|
18936
|
+
const queryParams = params ? `?${new URLSearchParams(params)}` : "";
|
|
18937
|
+
return client.get(`/instances/${instanceId}/payin-quotes${queryParams}`);
|
|
18931
18938
|
}
|
|
18932
18939
|
};
|
|
18933
18940
|
}
|
|
@@ -19333,26 +19340,29 @@ var BlindPay = class {
|
|
|
19333
19340
|
});
|
|
19334
19341
|
}
|
|
19335
19342
|
/**
|
|
19336
|
-
* Verifies the BlindPay webhook signature
|
|
19343
|
+
* Verifies the BlindPay webhook signature using Svix
|
|
19337
19344
|
*
|
|
19338
19345
|
* @param params.secret The webhook secret from BlindPay dashboard
|
|
19339
|
-
* @param params.
|
|
19340
|
-
* @param params.
|
|
19341
|
-
* @param params.payload The raw request body
|
|
19342
|
-
* @param params.svixSignature The value of the `svix-signature` header
|
|
19346
|
+
* @param params.headers The webhook headers object containing svix-id, svix-timestamp, and svix-signature
|
|
19347
|
+
* @param params.payload The raw request body as a string
|
|
19343
19348
|
* @returns {boolean} True if the signature is valid, false otherwise
|
|
19344
19349
|
*/
|
|
19345
19350
|
verifyWebhookSignature({
|
|
19346
19351
|
secret,
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
payload,
|
|
19350
|
-
svixSignature
|
|
19352
|
+
headers,
|
|
19353
|
+
payload
|
|
19351
19354
|
}) {
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19355
|
+
try {
|
|
19356
|
+
const webhook = new import_svix.Webhook(secret);
|
|
19357
|
+
webhook.verify(payload, {
|
|
19358
|
+
"svix-id": headers.id,
|
|
19359
|
+
"svix-timestamp": headers.timestamp,
|
|
19360
|
+
"svix-signature": headers.signature
|
|
19361
|
+
});
|
|
19362
|
+
return true;
|
|
19363
|
+
} catch (e) {
|
|
19364
|
+
return false;
|
|
19365
|
+
}
|
|
19356
19366
|
}
|
|
19357
19367
|
};
|
|
19358
19368
|
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-CEJF5Y4K.mjs";
|
|
12
|
+
import "../../chunk-UC57SCKQ.mjs";
|
|
12
13
|
import "../../chunk-FG25JHDX.mjs";
|
|
13
14
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
|
-
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
17
|
import "../../chunk-Z6EYX4D3.mjs";
|
|
18
18
|
import "../../chunk-5XJJKYXE.mjs";
|
|
19
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
19
20
|
import "../../chunk-RC5NN5UF.mjs";
|
|
20
21
|
import "../../chunk-W7NJUABI.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
+
import "../../chunk-VRA5HP7F.mjs";
|
|
22
23
|
import "../../chunk-3QQCDR3E.mjs";
|
|
23
24
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
-
import "../../chunk-U7CKUUO7.mjs";
|
|
25
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
26
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
27
27
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blindpay/node",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Official Node.js SDK for Blindpay API - Global payments infrastructure",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blindpay",
|
|
@@ -59,5 +59,8 @@
|
|
|
59
59
|
"require": "./dist/index.js"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"packageManager": "bun@1.2.18"
|
|
62
|
+
"packageManager": "bun@1.2.18",
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"svix": "1.82.0"
|
|
65
|
+
}
|
|
63
66
|
}
|