@blindpay/node 2.1.1 → 2.3.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/README.md +5 -5
- package/dist/{chunk-CWR4B22L.mjs → chunk-DZ4K6K32.mjs} +13 -7
- package/dist/{chunk-IZYPRCCV.mjs → chunk-FG25JHDX.mjs} +8 -0
- package/dist/{chunk-QHMIK7U3.mjs → chunk-U7CKUUO7.mjs} +3 -0
- package/dist/chunk-Z6EYX4D3.mjs +29 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +31 -2
- package/dist/index.mjs +7 -6
- package/dist/resources/api-keys/api-keys.test.js +31 -2
- package/dist/resources/api-keys/api-keys.test.mjs +4 -3
- package/dist/resources/available/available.test.js +55 -2
- package/dist/resources/available/available.test.mjs +28 -3
- package/dist/resources/available/index.d.mts +13 -1
- package/dist/resources/available/index.d.ts +13 -1
- package/dist/resources/available/index.js +3 -0
- package/dist/resources/available/index.mjs +1 -1
- package/dist/resources/bank-accounts/bank-accounts.test.js +31 -2
- package/dist/resources/bank-accounts/bank-accounts.test.mjs +4 -3
- package/dist/resources/instances/instances.test.js +31 -2
- package/dist/resources/instances/instances.test.mjs +4 -3
- package/dist/resources/partner-fees/partner-fees.test.js +31 -2
- package/dist/resources/partner-fees/partner-fees.test.mjs +4 -3
- package/dist/resources/payins/payins-quotes.test.js +31 -2
- package/dist/resources/payins/payins-quotes.test.mjs +4 -3
- package/dist/resources/payins/payins.test.js +31 -2
- package/dist/resources/payins/payins.test.mjs +4 -3
- package/dist/resources/payouts/payouts.test.js +31 -2
- package/dist/resources/payouts/payouts.test.mjs +4 -3
- package/dist/resources/quotes/quotes.test.js +31 -2
- package/dist/resources/quotes/quotes.test.mjs +4 -3
- package/dist/resources/receivers/receivers.test.js +31 -2
- package/dist/resources/receivers/receivers.test.mjs +4 -3
- package/dist/resources/terms-of-service/index.d.mts +15 -0
- package/dist/resources/terms-of-service/index.d.ts +15 -0
- package/dist/resources/terms-of-service/index.js +44 -0
- package/dist/resources/terms-of-service/index.mjs +9 -0
- package/dist/resources/terms-of-service/terms-of-service.test.d.mts +2 -0
- package/dist/resources/terms-of-service/terms-of-service.test.d.ts +2 -0
- package/dist/resources/terms-of-service/terms-of-service.test.js +19671 -0
- package/dist/resources/terms-of-service/terms-of-service.test.mjs +60 -0
- package/dist/resources/virtual-accounts/virtual-accounts.test.js +31 -2
- package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +4 -3
- package/dist/resources/wallets/blockchain.d.mts +21 -1
- package/dist/resources/wallets/blockchain.d.ts +21 -1
- package/dist/resources/wallets/blockchain.js +8 -0
- package/dist/resources/wallets/blockchain.mjs +1 -1
- package/dist/resources/wallets/blockchain.test.js +96 -2
- package/dist/resources/wallets/blockchain.test.mjs +69 -3
- package/dist/resources/wallets/offramp.test.js +31 -2
- package/dist/resources/wallets/offramp.test.mjs +4 -3
- package/dist/resources/webhooks/webhooks.test.js +31 -2
- package/dist/resources/webhooks/webhooks.test.mjs +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# BlindPay Node.js SDK
|
|
2
2
|
|
|
3
|
-
The official Node.js SDK for [
|
|
3
|
+
The official Node.js SDK for [BlindPay](https://blindpay.com) - Global payments infrastructure made simple.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ bun add @blindpay/node
|
|
|
16
16
|
|
|
17
17
|
## Authentication
|
|
18
18
|
|
|
19
|
-
To get started, you will need both your API key and your instance id, you can obtain your API key and instance id from the
|
|
19
|
+
To get started, you will need both your API key and your instance id, you can obtain your API key and instance id from the BlindPay dashboard [https://app.blindpay.com/instances/{instanceId}/api-keys](https://app.blindpay.com/instances/{instanceId}/api-keys)
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
22
|
import { BlindPay } from '@blindpay/node';
|
|
@@ -94,7 +94,7 @@ console.log('Success:', data); // fully typed
|
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
For detailed API documentation, visit:
|
|
97
|
-
- [
|
|
97
|
+
- [BlindPay API documentation](https://blindpay.com/docs/getting-started/overview)
|
|
98
98
|
- [API Reference](https://api.blindpay.com/reference)
|
|
99
99
|
|
|
100
100
|
## Support
|
|
@@ -106,4 +106,4 @@ For detailed API documentation, visit:
|
|
|
106
106
|
|
|
107
107
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
108
108
|
|
|
109
|
-
Made with ❤️ by the [
|
|
109
|
+
Made with ❤️ by the [BlindPay](https://blindpay.com) team
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createBlockchainWalletsResource,
|
|
3
3
|
init_blockchain
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FG25JHDX.mjs";
|
|
5
5
|
import {
|
|
6
6
|
createOfframpWalletsResource,
|
|
7
7
|
init_offramp
|
|
@@ -18,6 +18,10 @@ import {
|
|
|
18
18
|
createReceiversResource,
|
|
19
19
|
init_receivers
|
|
20
20
|
} from "./chunk-67XECGMJ.mjs";
|
|
21
|
+
import {
|
|
22
|
+
createTermsOfServiceResource,
|
|
23
|
+
init_terms_of_service
|
|
24
|
+
} from "./chunk-Z6EYX4D3.mjs";
|
|
21
25
|
import {
|
|
22
26
|
createVirtualAccountsResource,
|
|
23
27
|
init_virtual_accounts
|
|
@@ -42,14 +46,14 @@ import {
|
|
|
42
46
|
createApiKeysResource,
|
|
43
47
|
init_api_keys
|
|
44
48
|
} from "./chunk-LRHWT4JU.mjs";
|
|
49
|
+
import {
|
|
50
|
+
createAvailableResource,
|
|
51
|
+
init_available
|
|
52
|
+
} from "./chunk-U7CKUUO7.mjs";
|
|
45
53
|
import {
|
|
46
54
|
createBankAccountsResource,
|
|
47
55
|
init_bank_accounts
|
|
48
56
|
} from "./chunk-CPOSU35L.mjs";
|
|
49
|
-
import {
|
|
50
|
-
createAvailableResource,
|
|
51
|
-
init_available
|
|
52
|
-
} from "./chunk-QHMIK7U3.mjs";
|
|
53
57
|
import {
|
|
54
58
|
createInstancesResource,
|
|
55
59
|
init_instances
|
|
@@ -65,7 +69,7 @@ import {
|
|
|
65
69
|
var version;
|
|
66
70
|
var init_package = __esm({
|
|
67
71
|
"package.json"() {
|
|
68
|
-
version = "2.
|
|
72
|
+
version = "2.3.0";
|
|
69
73
|
}
|
|
70
74
|
});
|
|
71
75
|
|
|
@@ -101,6 +105,7 @@ var init_client = __esm({
|
|
|
101
105
|
init_payouts();
|
|
102
106
|
init_quotes2();
|
|
103
107
|
init_receivers();
|
|
108
|
+
init_terms_of_service();
|
|
104
109
|
init_virtual_accounts();
|
|
105
110
|
init_blockchain();
|
|
106
111
|
init_offramp();
|
|
@@ -138,7 +143,8 @@ var init_client = __esm({
|
|
|
138
143
|
this.available = createAvailableResource(this.api);
|
|
139
144
|
this.instances = __spreadProps(__spreadValues({}, createInstancesResource(this.instanceId, this.api)), {
|
|
140
145
|
apiKeys: createApiKeysResource(this.instanceId, this.api),
|
|
141
|
-
webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api)
|
|
146
|
+
webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api),
|
|
147
|
+
tos: createTermsOfServiceResource(this.instanceId, this.api)
|
|
142
148
|
});
|
|
143
149
|
this.partnerFees = createPartnerFeesResource(this.instanceId, this.api);
|
|
144
150
|
this.payins = __spreadProps(__spreadValues({}, createPayinsResource(this.instanceId, this.api)), {
|
|
@@ -68,6 +68,14 @@ function createBlockchainWalletsResource(instanceId, client) {
|
|
|
68
68
|
mintUsdbStellar(_e) {
|
|
69
69
|
var data = __objRest(_e, []);
|
|
70
70
|
return client.post(`/instances/${instanceId}/mint-usdb-stellar`, data);
|
|
71
|
+
},
|
|
72
|
+
mintUsdbSolana(_f) {
|
|
73
|
+
var data = __objRest(_f, []);
|
|
74
|
+
return client.post(`/instances/${instanceId}/mint-usdb-solana`, data);
|
|
75
|
+
},
|
|
76
|
+
prepareSolanaDelegationTransaction(_g) {
|
|
77
|
+
var data = __objRest(_g, []);
|
|
78
|
+
return client.post(`/instances/${instanceId}/prepare-delegate-solana`, data);
|
|
71
79
|
}
|
|
72
80
|
};
|
|
73
81
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__esm
|
|
3
|
+
} from "./chunk-OBKEW4AQ.mjs";
|
|
4
|
+
|
|
5
|
+
// src/resources/terms-of-service/index.ts
|
|
6
|
+
function createTermsOfServiceResource(instanceId, client) {
|
|
7
|
+
return {
|
|
8
|
+
initiate({
|
|
9
|
+
idempotency_key,
|
|
10
|
+
receiver_id,
|
|
11
|
+
redirect_url
|
|
12
|
+
}) {
|
|
13
|
+
return client.post(`/e/instances/${instanceId}/tos`, {
|
|
14
|
+
idempotency_key,
|
|
15
|
+
receiver_id,
|
|
16
|
+
redirect_url
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
var init_terms_of_service = __esm({
|
|
22
|
+
"src/resources/terms-of-service/index.ts"() {
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
createTermsOfServiceResource,
|
|
28
|
+
init_terms_of_service
|
|
29
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createApiKeysResource } from './resources/api-keys/index.mjs';
|
|
2
2
|
export { CreateApiKeyInput, CreateApiKeyResponse, DeleteApiKeyInput, GetApiKeyInput, GetApiKeyResponse, ListApiKeysResponse } from './resources/api-keys/index.mjs';
|
|
3
3
|
import { createAvailableResource } from './resources/available/index.mjs';
|
|
4
|
-
export { BankDetailKey, GetBankDetailsResponse, GetRailsResponse } from './resources/available/index.mjs';
|
|
4
|
+
export { BankDetailKey, GetBankDetailsResponse, GetRailsResponse, GetSwiftCodeBankDetailsInput, GetSwiftCodeBankDetailsResponse } from './resources/available/index.mjs';
|
|
5
5
|
import { createBankAccountsResource } from './resources/bank-accounts/index.mjs';
|
|
6
6
|
export { AchCopDocument, ArgentinaTransfers, CreateAchInput, CreateAchResponse, CreateArgentinaTransfersInput, CreateArgentinaTransfersResponse, CreateColombiaAchInput, CreateColombiaAchResponse, CreateInternationalSwiftInput, CreateInternationalSwiftResponse, CreatePixInput, CreatePixResponse, CreateRtpInput, CreateRtpResponse, CreateSpeiInput, CreateSpeiResponse, CreateWireInput, CreateWireResponse, DeleteBankAccountInput, GetBankAccountInput, GetBankAccountResponse, ListBankAccountsInput, ListBankAccountsResponse } from './resources/bank-accounts/index.mjs';
|
|
7
7
|
import { createInstancesResource } from './resources/instances/index.mjs';
|
|
@@ -18,10 +18,11 @@ import { createQuotesResource } from './resources/quotes/index.mjs';
|
|
|
18
18
|
export { CreateQuoteInput, CreateQuoteResponse, GetFxRateInput, GetFxRateResponse } from './resources/quotes/index.mjs';
|
|
19
19
|
import { createReceiversResource } from './resources/receivers/index.mjs';
|
|
20
20
|
export { BusinessWithStandardKYB, CreateBusinessWithStandardKYBInput, CreateBusinessWithStandardKYBResponse, CreateIndividualWithEnhancedKYCInput, CreateIndividualWithEnhancedKYCResponse, CreateIndividualWithStandardKYCInput, CreateIndividualWithStandardKYCResponse, DeleteReceiverInput, GetLimitIncreaseRequestsInput, GetLimitIncreaseRequestsResponse, GetReceiverInput, GetReceiverLimitsInput, GetReceiverLimitsResponse, GetReceiverResponse, IdentificationDocument, IndividualWithEnhancedKYC, IndividualWithStandardKYC, KycType, LimitIncreaseRequestStatus, LimitIncreaseRequestSupportingDocumentType, ListReceiversResponse, Owner, OwnerRole, ProofOfAddressDocType, PurposeOfTransactions, RequestLimitIncreaseInput, RequestLimitIncreaseResponse, SourceOfFundsDocType, UpdateReceiverInput } from './resources/receivers/index.mjs';
|
|
21
|
+
import { createTermsOfServiceResource } from './resources/terms-of-service/index.mjs';
|
|
21
22
|
import { createVirtualAccountsResource } from './resources/virtual-accounts/index.mjs';
|
|
22
23
|
export { CreateVirtualAccountInput, CreateVirtualAccountResponse, GetVirtualAccountInput, GetVirtualAccountResponse, UpdateVirtualAccountInput, VirtualAccount } from './resources/virtual-accounts/index.mjs';
|
|
23
24
|
import { createBlockchainWalletsResource } from './resources/wallets/blockchain.mjs';
|
|
24
|
-
export { CreateAssetTrustlineInput, CreateAssetTrustlineResponse, CreateBlockchainWalletResponse, CreateBlockchainWalletWithAddressInput, CreateBlockchainWalletWithHashInput, DeleteBlockchainWalletInput, GetBlockchainWalletInput, GetBlockchainWalletMessage, GetBlockchainWalletMessageResponse, GetBlockchainWalletResponse, ListBlockchainWalletsInput, ListBlockchainWalletsResponse, MintUsdbStellarInput } from './resources/wallets/blockchain.mjs';
|
|
25
|
+
export { CreateAssetTrustlineInput, CreateAssetTrustlineResponse, CreateBlockchainWalletResponse, CreateBlockchainWalletWithAddressInput, CreateBlockchainWalletWithHashInput, DeleteBlockchainWalletInput, GetBlockchainWalletInput, GetBlockchainWalletMessage, GetBlockchainWalletMessageResponse, GetBlockchainWalletResponse, ListBlockchainWalletsInput, ListBlockchainWalletsResponse, MintUsdbSolanaInput, MintUsdbSolanaResponse, MintUsdbStellarInput, PrepareSolanaDelegationTransactionInput, PrepareSolanaDelegationTransactionResponse } from './resources/wallets/blockchain.mjs';
|
|
25
26
|
import { createOfframpWalletsResource } from './resources/wallets/offramp.mjs';
|
|
26
27
|
export { CreateOfframpWalletInput, CreateOfframpWalletResponse, GetOfframpWalletInput, GetOfframpWalletResponse, ListOfframpWalletsInput, ListOfframpWalletsResponse, OfframpWallet } from './resources/wallets/offramp.mjs';
|
|
27
28
|
import { createWebhookEndpointsResource } from './resources/webhooks/index.mjs';
|
|
@@ -48,6 +49,7 @@ declare class BlindPay {
|
|
|
48
49
|
readonly instances: ReturnType<typeof createInstancesResource> & {
|
|
49
50
|
apiKeys: ReturnType<typeof createApiKeysResource>;
|
|
50
51
|
webhookEndpoints: ReturnType<typeof createWebhookEndpointsResource>;
|
|
52
|
+
tos: ReturnType<typeof createTermsOfServiceResource>;
|
|
51
53
|
};
|
|
52
54
|
readonly wallets: {
|
|
53
55
|
blockchain: ReturnType<typeof createBlockchainWalletsResource>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createApiKeysResource } from './resources/api-keys/index.js';
|
|
2
2
|
export { CreateApiKeyInput, CreateApiKeyResponse, DeleteApiKeyInput, GetApiKeyInput, GetApiKeyResponse, ListApiKeysResponse } from './resources/api-keys/index.js';
|
|
3
3
|
import { createAvailableResource } from './resources/available/index.js';
|
|
4
|
-
export { BankDetailKey, GetBankDetailsResponse, GetRailsResponse } from './resources/available/index.js';
|
|
4
|
+
export { BankDetailKey, GetBankDetailsResponse, GetRailsResponse, GetSwiftCodeBankDetailsInput, GetSwiftCodeBankDetailsResponse } from './resources/available/index.js';
|
|
5
5
|
import { createBankAccountsResource } from './resources/bank-accounts/index.js';
|
|
6
6
|
export { AchCopDocument, ArgentinaTransfers, CreateAchInput, CreateAchResponse, CreateArgentinaTransfersInput, CreateArgentinaTransfersResponse, CreateColombiaAchInput, CreateColombiaAchResponse, CreateInternationalSwiftInput, CreateInternationalSwiftResponse, CreatePixInput, CreatePixResponse, CreateRtpInput, CreateRtpResponse, CreateSpeiInput, CreateSpeiResponse, CreateWireInput, CreateWireResponse, DeleteBankAccountInput, GetBankAccountInput, GetBankAccountResponse, ListBankAccountsInput, ListBankAccountsResponse } from './resources/bank-accounts/index.js';
|
|
7
7
|
import { createInstancesResource } from './resources/instances/index.js';
|
|
@@ -18,10 +18,11 @@ import { createQuotesResource } from './resources/quotes/index.js';
|
|
|
18
18
|
export { CreateQuoteInput, CreateQuoteResponse, GetFxRateInput, GetFxRateResponse } from './resources/quotes/index.js';
|
|
19
19
|
import { createReceiversResource } from './resources/receivers/index.js';
|
|
20
20
|
export { BusinessWithStandardKYB, CreateBusinessWithStandardKYBInput, CreateBusinessWithStandardKYBResponse, CreateIndividualWithEnhancedKYCInput, CreateIndividualWithEnhancedKYCResponse, CreateIndividualWithStandardKYCInput, CreateIndividualWithStandardKYCResponse, DeleteReceiverInput, GetLimitIncreaseRequestsInput, GetLimitIncreaseRequestsResponse, GetReceiverInput, GetReceiverLimitsInput, GetReceiverLimitsResponse, GetReceiverResponse, IdentificationDocument, IndividualWithEnhancedKYC, IndividualWithStandardKYC, KycType, LimitIncreaseRequestStatus, LimitIncreaseRequestSupportingDocumentType, ListReceiversResponse, Owner, OwnerRole, ProofOfAddressDocType, PurposeOfTransactions, RequestLimitIncreaseInput, RequestLimitIncreaseResponse, SourceOfFundsDocType, UpdateReceiverInput } from './resources/receivers/index.js';
|
|
21
|
+
import { createTermsOfServiceResource } from './resources/terms-of-service/index.js';
|
|
21
22
|
import { createVirtualAccountsResource } from './resources/virtual-accounts/index.js';
|
|
22
23
|
export { CreateVirtualAccountInput, CreateVirtualAccountResponse, GetVirtualAccountInput, GetVirtualAccountResponse, UpdateVirtualAccountInput, VirtualAccount } from './resources/virtual-accounts/index.js';
|
|
23
24
|
import { createBlockchainWalletsResource } from './resources/wallets/blockchain.js';
|
|
24
|
-
export { CreateAssetTrustlineInput, CreateAssetTrustlineResponse, CreateBlockchainWalletResponse, CreateBlockchainWalletWithAddressInput, CreateBlockchainWalletWithHashInput, DeleteBlockchainWalletInput, GetBlockchainWalletInput, GetBlockchainWalletMessage, GetBlockchainWalletMessageResponse, GetBlockchainWalletResponse, ListBlockchainWalletsInput, ListBlockchainWalletsResponse, MintUsdbStellarInput } from './resources/wallets/blockchain.js';
|
|
25
|
+
export { CreateAssetTrustlineInput, CreateAssetTrustlineResponse, CreateBlockchainWalletResponse, CreateBlockchainWalletWithAddressInput, CreateBlockchainWalletWithHashInput, DeleteBlockchainWalletInput, GetBlockchainWalletInput, GetBlockchainWalletMessage, GetBlockchainWalletMessageResponse, GetBlockchainWalletResponse, ListBlockchainWalletsInput, ListBlockchainWalletsResponse, MintUsdbSolanaInput, MintUsdbSolanaResponse, MintUsdbStellarInput, PrepareSolanaDelegationTransactionInput, PrepareSolanaDelegationTransactionResponse } from './resources/wallets/blockchain.js';
|
|
25
26
|
import { createOfframpWalletsResource } from './resources/wallets/offramp.js';
|
|
26
27
|
export { CreateOfframpWalletInput, CreateOfframpWalletResponse, GetOfframpWalletInput, GetOfframpWalletResponse, ListOfframpWalletsInput, ListOfframpWalletsResponse, OfframpWallet } from './resources/wallets/offramp.js';
|
|
27
28
|
import { createWebhookEndpointsResource } from './resources/webhooks/index.js';
|
|
@@ -48,6 +49,7 @@ declare class BlindPay {
|
|
|
48
49
|
readonly instances: ReturnType<typeof createInstancesResource> & {
|
|
49
50
|
apiKeys: ReturnType<typeof createApiKeysResource>;
|
|
50
51
|
webhookEndpoints: ReturnType<typeof createWebhookEndpointsResource>;
|
|
52
|
+
tos: ReturnType<typeof createTermsOfServiceResource>;
|
|
51
53
|
};
|
|
52
54
|
readonly wallets: {
|
|
53
55
|
blockchain: ReturnType<typeof createBlockchainWalletsResource>;
|
package/dist/index.js
CHANGED
|
@@ -91,7 +91,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
91
91
|
var import_node_crypto = require("crypto");
|
|
92
92
|
|
|
93
93
|
// package.json
|
|
94
|
-
var version = "2.
|
|
94
|
+
var version = "2.3.0";
|
|
95
95
|
|
|
96
96
|
// src/internal/blindpay-error.ts
|
|
97
97
|
var BlindPayError = class extends Error {
|
|
@@ -128,6 +128,9 @@ function createAvailableResource(client) {
|
|
|
128
128
|
},
|
|
129
129
|
getRails() {
|
|
130
130
|
return client.get("/available/rails");
|
|
131
|
+
},
|
|
132
|
+
getSwiftCodeBankDetails(swift) {
|
|
133
|
+
return client.get(`/available/swift/${swift}`);
|
|
131
134
|
}
|
|
132
135
|
};
|
|
133
136
|
}
|
|
@@ -418,6 +421,23 @@ function createReceiversResource(instanceId, client) {
|
|
|
418
421
|
};
|
|
419
422
|
}
|
|
420
423
|
|
|
424
|
+
// src/resources/terms-of-service/index.ts
|
|
425
|
+
function createTermsOfServiceResource(instanceId, client) {
|
|
426
|
+
return {
|
|
427
|
+
initiate({
|
|
428
|
+
idempotency_key,
|
|
429
|
+
receiver_id,
|
|
430
|
+
redirect_url
|
|
431
|
+
}) {
|
|
432
|
+
return client.post(`/e/instances/${instanceId}/tos`, {
|
|
433
|
+
idempotency_key,
|
|
434
|
+
receiver_id,
|
|
435
|
+
redirect_url
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
421
441
|
// src/resources/virtual-accounts/index.ts
|
|
422
442
|
function createVirtualAccountsResource(instanceId, client) {
|
|
423
443
|
return {
|
|
@@ -512,6 +532,14 @@ function createBlockchainWalletsResource(instanceId, client) {
|
|
|
512
532
|
mintUsdbStellar(_e) {
|
|
513
533
|
var data = __objRest(_e, []);
|
|
514
534
|
return client.post(`/instances/${instanceId}/mint-usdb-stellar`, data);
|
|
535
|
+
},
|
|
536
|
+
mintUsdbSolana(_f) {
|
|
537
|
+
var data = __objRest(_f, []);
|
|
538
|
+
return client.post(`/instances/${instanceId}/mint-usdb-solana`, data);
|
|
539
|
+
},
|
|
540
|
+
prepareSolanaDelegationTransaction(_g) {
|
|
541
|
+
var data = __objRest(_g, []);
|
|
542
|
+
return client.post(`/instances/${instanceId}/prepare-delegate-solana`, data);
|
|
515
543
|
}
|
|
516
544
|
};
|
|
517
545
|
}
|
|
@@ -608,7 +636,8 @@ var BlindPay = class {
|
|
|
608
636
|
this.available = createAvailableResource(this.api);
|
|
609
637
|
this.instances = __spreadProps(__spreadValues({}, createInstancesResource(this.instanceId, this.api)), {
|
|
610
638
|
apiKeys: createApiKeysResource(this.instanceId, this.api),
|
|
611
|
-
webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api)
|
|
639
|
+
webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api),
|
|
640
|
+
tos: createTermsOfServiceResource(this.instanceId, this.api)
|
|
612
641
|
});
|
|
613
642
|
this.partnerFees = createPartnerFeesResource(this.instanceId, this.api);
|
|
614
643
|
this.payins = __spreadProps(__spreadValues({}, createPayinsResource(this.instanceId, this.api)), {
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BlindPay,
|
|
3
3
|
init_client
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DZ4K6K32.mjs";
|
|
5
5
|
import {
|
|
6
6
|
createBlockchainWalletsResource,
|
|
7
7
|
init_blockchain
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FG25JHDX.mjs";
|
|
9
9
|
import {
|
|
10
10
|
createOfframpWalletsResource,
|
|
11
11
|
init_offramp
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
createReceiversResource,
|
|
23
23
|
init_receivers
|
|
24
24
|
} from "./chunk-67XECGMJ.mjs";
|
|
25
|
+
import "./chunk-Z6EYX4D3.mjs";
|
|
25
26
|
import {
|
|
26
27
|
createVirtualAccountsResource,
|
|
27
28
|
init_virtual_accounts
|
|
@@ -46,14 +47,14 @@ import {
|
|
|
46
47
|
createApiKeysResource,
|
|
47
48
|
init_api_keys
|
|
48
49
|
} from "./chunk-LRHWT4JU.mjs";
|
|
50
|
+
import {
|
|
51
|
+
createAvailableResource,
|
|
52
|
+
init_available
|
|
53
|
+
} from "./chunk-U7CKUUO7.mjs";
|
|
49
54
|
import {
|
|
50
55
|
createBankAccountsResource,
|
|
51
56
|
init_bank_accounts
|
|
52
57
|
} from "./chunk-CPOSU35L.mjs";
|
|
53
|
-
import {
|
|
54
|
-
createAvailableResource,
|
|
55
|
-
init_available
|
|
56
|
-
} from "./chunk-QHMIK7U3.mjs";
|
|
57
58
|
import {
|
|
58
59
|
createInstancesResource,
|
|
59
60
|
init_instances
|
|
@@ -18697,7 +18697,7 @@ var import_expect_type = __toESM(require_dist(), 1);
|
|
|
18697
18697
|
var import_node_crypto = require("crypto");
|
|
18698
18698
|
|
|
18699
18699
|
// package.json
|
|
18700
|
-
var version = "2.
|
|
18700
|
+
var version = "2.3.0";
|
|
18701
18701
|
|
|
18702
18702
|
// src/internal/blindpay-error.ts
|
|
18703
18703
|
var BlindPayError = class extends Error {
|
|
@@ -18734,6 +18734,9 @@ function createAvailableResource(client) {
|
|
|
18734
18734
|
},
|
|
18735
18735
|
getRails() {
|
|
18736
18736
|
return client.get("/available/rails");
|
|
18737
|
+
},
|
|
18738
|
+
getSwiftCodeBankDetails(swift) {
|
|
18739
|
+
return client.get(`/available/swift/${swift}`);
|
|
18737
18740
|
}
|
|
18738
18741
|
};
|
|
18739
18742
|
}
|
|
@@ -19024,6 +19027,23 @@ function createReceiversResource(instanceId, client) {
|
|
|
19024
19027
|
};
|
|
19025
19028
|
}
|
|
19026
19029
|
|
|
19030
|
+
// src/resources/terms-of-service/index.ts
|
|
19031
|
+
function createTermsOfServiceResource(instanceId, client) {
|
|
19032
|
+
return {
|
|
19033
|
+
initiate({
|
|
19034
|
+
idempotency_key,
|
|
19035
|
+
receiver_id,
|
|
19036
|
+
redirect_url
|
|
19037
|
+
}) {
|
|
19038
|
+
return client.post(`/e/instances/${instanceId}/tos`, {
|
|
19039
|
+
idempotency_key,
|
|
19040
|
+
receiver_id,
|
|
19041
|
+
redirect_url
|
|
19042
|
+
});
|
|
19043
|
+
}
|
|
19044
|
+
};
|
|
19045
|
+
}
|
|
19046
|
+
|
|
19027
19047
|
// src/resources/virtual-accounts/index.ts
|
|
19028
19048
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19029
19049
|
return {
|
|
@@ -19118,6 +19138,14 @@ function createBlockchainWalletsResource(instanceId, client) {
|
|
|
19118
19138
|
mintUsdbStellar(_e) {
|
|
19119
19139
|
var data = __objRest(_e, []);
|
|
19120
19140
|
return client.post(`/instances/${instanceId}/mint-usdb-stellar`, data);
|
|
19141
|
+
},
|
|
19142
|
+
mintUsdbSolana(_f) {
|
|
19143
|
+
var data = __objRest(_f, []);
|
|
19144
|
+
return client.post(`/instances/${instanceId}/mint-usdb-solana`, data);
|
|
19145
|
+
},
|
|
19146
|
+
prepareSolanaDelegationTransaction(_g) {
|
|
19147
|
+
var data = __objRest(_g, []);
|
|
19148
|
+
return client.post(`/instances/${instanceId}/prepare-delegate-solana`, data);
|
|
19121
19149
|
}
|
|
19122
19150
|
};
|
|
19123
19151
|
}
|
|
@@ -19214,7 +19242,8 @@ var BlindPay = class {
|
|
|
19214
19242
|
this.available = createAvailableResource(this.api);
|
|
19215
19243
|
this.instances = __spreadProps(__spreadValues({}, createInstancesResource(this.instanceId, this.api)), {
|
|
19216
19244
|
apiKeys: createApiKeysResource(this.instanceId, this.api),
|
|
19217
|
-
webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api)
|
|
19245
|
+
webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api),
|
|
19246
|
+
tos: createTermsOfServiceResource(this.instanceId, this.api)
|
|
19218
19247
|
});
|
|
19219
19248
|
this.partnerFees = createPartnerFeesResource(this.instanceId, this.api);
|
|
19220
19249
|
this.payins = __spreadProps(__spreadValues({}, createPayinsResource(this.instanceId, this.api)), {
|
|
@@ -7,20 +7,21 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
BlindPay,
|
|
9
9
|
init_client
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-DZ4K6K32.mjs";
|
|
11
|
+
import "../../chunk-FG25JHDX.mjs";
|
|
12
12
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
13
13
|
import "../../chunk-UC57SCKQ.mjs";
|
|
14
14
|
import "../../chunk-TBTA7A2P.mjs";
|
|
15
15
|
import "../../chunk-67XECGMJ.mjs";
|
|
16
|
+
import "../../chunk-Z6EYX4D3.mjs";
|
|
16
17
|
import "../../chunk-5XJJKYXE.mjs";
|
|
17
18
|
import "../../chunk-RC5NN5UF.mjs";
|
|
18
19
|
import "../../chunk-W7NJUABI.mjs";
|
|
19
20
|
import "../../chunk-E7M4CJKR.mjs";
|
|
20
21
|
import "../../chunk-3QQCDR3E.mjs";
|
|
21
22
|
import "../../chunk-LRHWT4JU.mjs";
|
|
23
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
22
24
|
import "../../chunk-CPOSU35L.mjs";
|
|
23
|
-
import "../../chunk-QHMIK7U3.mjs";
|
|
24
25
|
import "../../chunk-B5T7AQLH.mjs";
|
|
25
26
|
import {
|
|
26
27
|
__async,
|
|
@@ -18702,7 +18702,7 @@ var import_expect_type = __toESM(require_dist(), 1);
|
|
|
18702
18702
|
var import_node_crypto = require("crypto");
|
|
18703
18703
|
|
|
18704
18704
|
// package.json
|
|
18705
|
-
var version = "2.
|
|
18705
|
+
var version = "2.3.0";
|
|
18706
18706
|
|
|
18707
18707
|
// src/internal/blindpay-error.ts
|
|
18708
18708
|
var BlindPayError = class extends Error {
|
|
@@ -18739,6 +18739,9 @@ function createAvailableResource(client) {
|
|
|
18739
18739
|
},
|
|
18740
18740
|
getRails() {
|
|
18741
18741
|
return client.get("/available/rails");
|
|
18742
|
+
},
|
|
18743
|
+
getSwiftCodeBankDetails(swift) {
|
|
18744
|
+
return client.get(`/available/swift/${swift}`);
|
|
18742
18745
|
}
|
|
18743
18746
|
};
|
|
18744
18747
|
}
|
|
@@ -19029,6 +19032,23 @@ function createReceiversResource(instanceId, client) {
|
|
|
19029
19032
|
};
|
|
19030
19033
|
}
|
|
19031
19034
|
|
|
19035
|
+
// src/resources/terms-of-service/index.ts
|
|
19036
|
+
function createTermsOfServiceResource(instanceId, client) {
|
|
19037
|
+
return {
|
|
19038
|
+
initiate({
|
|
19039
|
+
idempotency_key,
|
|
19040
|
+
receiver_id,
|
|
19041
|
+
redirect_url
|
|
19042
|
+
}) {
|
|
19043
|
+
return client.post(`/e/instances/${instanceId}/tos`, {
|
|
19044
|
+
idempotency_key,
|
|
19045
|
+
receiver_id,
|
|
19046
|
+
redirect_url
|
|
19047
|
+
});
|
|
19048
|
+
}
|
|
19049
|
+
};
|
|
19050
|
+
}
|
|
19051
|
+
|
|
19032
19052
|
// src/resources/virtual-accounts/index.ts
|
|
19033
19053
|
function createVirtualAccountsResource(instanceId, client) {
|
|
19034
19054
|
return {
|
|
@@ -19123,6 +19143,14 @@ function createBlockchainWalletsResource(instanceId, client) {
|
|
|
19123
19143
|
mintUsdbStellar(_e) {
|
|
19124
19144
|
var data = __objRest(_e, []);
|
|
19125
19145
|
return client.post(`/instances/${instanceId}/mint-usdb-stellar`, data);
|
|
19146
|
+
},
|
|
19147
|
+
mintUsdbSolana(_f) {
|
|
19148
|
+
var data = __objRest(_f, []);
|
|
19149
|
+
return client.post(`/instances/${instanceId}/mint-usdb-solana`, data);
|
|
19150
|
+
},
|
|
19151
|
+
prepareSolanaDelegationTransaction(_g) {
|
|
19152
|
+
var data = __objRest(_g, []);
|
|
19153
|
+
return client.post(`/instances/${instanceId}/prepare-delegate-solana`, data);
|
|
19126
19154
|
}
|
|
19127
19155
|
};
|
|
19128
19156
|
}
|
|
@@ -19219,7 +19247,8 @@ var BlindPay = class {
|
|
|
19219
19247
|
this.available = createAvailableResource(this.api);
|
|
19220
19248
|
this.instances = __spreadProps(__spreadValues({}, createInstancesResource(this.instanceId, this.api)), {
|
|
19221
19249
|
apiKeys: createApiKeysResource(this.instanceId, this.api),
|
|
19222
|
-
webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api)
|
|
19250
|
+
webhookEndpoints: createWebhookEndpointsResource(this.instanceId, this.api),
|
|
19251
|
+
tos: createTermsOfServiceResource(this.instanceId, this.api)
|
|
19223
19252
|
});
|
|
19224
19253
|
this.partnerFees = createPartnerFeesResource(this.instanceId, this.api);
|
|
19225
19254
|
this.payins = __spreadProps(__spreadValues({}, createPayinsResource(this.instanceId, this.api)), {
|
|
@@ -19411,6 +19440,30 @@ describe("Available", () => {
|
|
|
19411
19440
|
globalExpect(data).toEqual(mockedRails);
|
|
19412
19441
|
}));
|
|
19413
19442
|
});
|
|
19443
|
+
describe("Get swift code bank details", () => {
|
|
19444
|
+
it("should get bank details of a swift code", () => __async(null, null, function* () {
|
|
19445
|
+
const mockedBankDetails = [
|
|
19446
|
+
{
|
|
19447
|
+
id: "416",
|
|
19448
|
+
bank: "BANK OF AMERICA, N.A.",
|
|
19449
|
+
city: "NEW JERSEY",
|
|
19450
|
+
branch: "LENDING SERVICES AND OPERATIONS (LSOP)",
|
|
19451
|
+
swiftCode: "BOFAUS3NLMA",
|
|
19452
|
+
swiftCodeLink: "https://bank.codes/swift-code/united-states/bofaus3nlma/",
|
|
19453
|
+
country: "United States",
|
|
19454
|
+
countrySlug: "united-states"
|
|
19455
|
+
}
|
|
19456
|
+
];
|
|
19457
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedBankDetails), {
|
|
19458
|
+
headers: {
|
|
19459
|
+
"Content-Type": "application/json"
|
|
19460
|
+
}
|
|
19461
|
+
});
|
|
19462
|
+
const { data, error } = yield blindpay.available.getSwiftCodeBankDetails("BOFAUS3NLMA");
|
|
19463
|
+
globalExpect(error).toBeNull();
|
|
19464
|
+
globalExpect(data).toEqual(mockedBankDetails);
|
|
19465
|
+
}));
|
|
19466
|
+
});
|
|
19414
19467
|
});
|
|
19415
19468
|
/*! Bundled license information:
|
|
19416
19469
|
|
|
@@ -8,20 +8,21 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
BlindPay,
|
|
10
10
|
init_client
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
11
|
+
} from "../../chunk-DZ4K6K32.mjs";
|
|
12
|
+
import "../../chunk-FG25JHDX.mjs";
|
|
13
13
|
import "../../chunk-QGNLMN6Z.mjs";
|
|
14
14
|
import "../../chunk-UC57SCKQ.mjs";
|
|
15
15
|
import "../../chunk-TBTA7A2P.mjs";
|
|
16
16
|
import "../../chunk-67XECGMJ.mjs";
|
|
17
|
+
import "../../chunk-Z6EYX4D3.mjs";
|
|
17
18
|
import "../../chunk-5XJJKYXE.mjs";
|
|
18
19
|
import "../../chunk-RC5NN5UF.mjs";
|
|
19
20
|
import "../../chunk-W7NJUABI.mjs";
|
|
20
21
|
import "../../chunk-E7M4CJKR.mjs";
|
|
21
22
|
import "../../chunk-3QQCDR3E.mjs";
|
|
22
23
|
import "../../chunk-LRHWT4JU.mjs";
|
|
24
|
+
import "../../chunk-U7CKUUO7.mjs";
|
|
23
25
|
import "../../chunk-CPOSU35L.mjs";
|
|
24
|
-
import "../../chunk-QHMIK7U3.mjs";
|
|
25
26
|
import "../../chunk-B5T7AQLH.mjs";
|
|
26
27
|
import {
|
|
27
28
|
__async,
|
|
@@ -116,6 +117,30 @@ var require_available_test = __commonJS({
|
|
|
116
117
|
globalExpect(data).toEqual(mockedRails);
|
|
117
118
|
}));
|
|
118
119
|
});
|
|
120
|
+
describe("Get swift code bank details", () => {
|
|
121
|
+
it("should get bank details of a swift code", () => __async(null, null, function* () {
|
|
122
|
+
const mockedBankDetails = [
|
|
123
|
+
{
|
|
124
|
+
id: "416",
|
|
125
|
+
bank: "BANK OF AMERICA, N.A.",
|
|
126
|
+
city: "NEW JERSEY",
|
|
127
|
+
branch: "LENDING SERVICES AND OPERATIONS (LSOP)",
|
|
128
|
+
swiftCode: "BOFAUS3NLMA",
|
|
129
|
+
swiftCodeLink: "https://bank.codes/swift-code/united-states/bofaus3nlma/",
|
|
130
|
+
country: "United States",
|
|
131
|
+
countrySlug: "united-states"
|
|
132
|
+
}
|
|
133
|
+
];
|
|
134
|
+
fetchMock.mockResponseOnce(JSON.stringify(mockedBankDetails), {
|
|
135
|
+
headers: {
|
|
136
|
+
"Content-Type": "application/json"
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
const { data, error } = yield blindpay.available.getSwiftCodeBankDetails("BOFAUS3NLMA");
|
|
140
|
+
globalExpect(error).toBeNull();
|
|
141
|
+
globalExpect(data).toEqual(mockedBankDetails);
|
|
142
|
+
}));
|
|
143
|
+
});
|
|
119
144
|
});
|
|
120
145
|
}
|
|
121
146
|
});
|
|
@@ -17,9 +17,21 @@ type GetRailsResponse = Array<{
|
|
|
17
17
|
value: Rail;
|
|
18
18
|
country: string;
|
|
19
19
|
}>;
|
|
20
|
+
type GetSwiftCodeBankDetailsInput = string;
|
|
21
|
+
type GetSwiftCodeBankDetailsResponse = Array<{
|
|
22
|
+
id: string;
|
|
23
|
+
bank: string;
|
|
24
|
+
city: string;
|
|
25
|
+
branch: string;
|
|
26
|
+
swiftCode: string;
|
|
27
|
+
swiftCodeLink: string;
|
|
28
|
+
country: string;
|
|
29
|
+
countrySlug: string;
|
|
30
|
+
}>;
|
|
20
31
|
declare function createAvailableResource(client: InternalApiClient): {
|
|
21
32
|
getBankDetails(rail: Rail): Promise<BlindpayApiResponse<GetBankDetailsResponse>>;
|
|
22
33
|
getRails(): Promise<BlindpayApiResponse<GetRailsResponse>>;
|
|
34
|
+
getSwiftCodeBankDetails(swift: GetSwiftCodeBankDetailsInput): Promise<BlindpayApiResponse<GetSwiftCodeBankDetailsResponse>>;
|
|
23
35
|
};
|
|
24
36
|
|
|
25
|
-
export { type BankDetailKey, type GetBankDetailsResponse, type GetRailsResponse, createAvailableResource };
|
|
37
|
+
export { type BankDetailKey, type GetBankDetailsResponse, type GetRailsResponse, type GetSwiftCodeBankDetailsInput, type GetSwiftCodeBankDetailsResponse, createAvailableResource };
|
|
@@ -17,9 +17,21 @@ type GetRailsResponse = Array<{
|
|
|
17
17
|
value: Rail;
|
|
18
18
|
country: string;
|
|
19
19
|
}>;
|
|
20
|
+
type GetSwiftCodeBankDetailsInput = string;
|
|
21
|
+
type GetSwiftCodeBankDetailsResponse = Array<{
|
|
22
|
+
id: string;
|
|
23
|
+
bank: string;
|
|
24
|
+
city: string;
|
|
25
|
+
branch: string;
|
|
26
|
+
swiftCode: string;
|
|
27
|
+
swiftCodeLink: string;
|
|
28
|
+
country: string;
|
|
29
|
+
countrySlug: string;
|
|
30
|
+
}>;
|
|
20
31
|
declare function createAvailableResource(client: InternalApiClient): {
|
|
21
32
|
getBankDetails(rail: Rail): Promise<BlindpayApiResponse<GetBankDetailsResponse>>;
|
|
22
33
|
getRails(): Promise<BlindpayApiResponse<GetRailsResponse>>;
|
|
34
|
+
getSwiftCodeBankDetails(swift: GetSwiftCodeBankDetailsInput): Promise<BlindpayApiResponse<GetSwiftCodeBankDetailsResponse>>;
|
|
23
35
|
};
|
|
24
36
|
|
|
25
|
-
export { type BankDetailKey, type GetBankDetailsResponse, type GetRailsResponse, createAvailableResource };
|
|
37
|
+
export { type BankDetailKey, type GetBankDetailsResponse, type GetRailsResponse, type GetSwiftCodeBankDetailsInput, type GetSwiftCodeBankDetailsResponse, createAvailableResource };
|