squarefi-bff-api-module 1.26.11 → 1.26.13
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/auth.d.ts +0 -0
- package/dist/api/auth.js +0 -0
- package/dist/api/counterparties.d.ts +0 -0
- package/dist/api/counterparties.js +0 -0
- package/dist/api/developer.d.ts +0 -0
- package/dist/api/developer.js +0 -0
- package/dist/api/exchange.d.ts +0 -0
- package/dist/api/exchange.js +0 -0
- package/dist/api/frontend.d.ts +0 -0
- package/dist/api/frontend.js +0 -0
- package/dist/api/index.d.ts +0 -0
- package/dist/api/index.js +0 -0
- package/dist/api/issuing.d.ts +0 -0
- package/dist/api/issuing.js +0 -0
- package/dist/api/kyc.d.ts +0 -0
- package/dist/api/kyc.js +0 -0
- package/dist/api/list.d.ts +0 -0
- package/dist/api/list.js +0 -0
- package/dist/api/orders.d.ts +0 -0
- package/dist/api/orders.js +0 -0
- package/dist/api/persona.d.ts +0 -0
- package/dist/api/persona.js +0 -0
- package/dist/api/tenants.d.ts +0 -0
- package/dist/api/tenants.js +0 -0
- package/dist/api/totp.d.ts +0 -0
- package/dist/api/totp.js +0 -0
- package/dist/api/types/autogen/apiV2.types.d.ts +42 -70
- package/dist/api/types/autogen/apiV2.types.js +0 -0
- package/dist/api/types/types.d.ts +40 -30
- package/dist/api/types/types.js +0 -0
- package/dist/api/user.d.ts +0 -0
- package/dist/api/user.js +0 -0
- package/dist/api/virtual-accounts.d.ts +0 -0
- package/dist/api/virtual-accounts.js +0 -0
- package/dist/api/wallets.d.ts +0 -0
- package/dist/api/wallets.js +0 -0
- package/dist/constants.d.ts +0 -0
- package/dist/constants.js +0 -0
- package/dist/hooks/index.d.ts +0 -0
- package/dist/hooks/index.js +0 -0
- package/dist/hooks/useCalc.d.ts +0 -0
- package/dist/hooks/useCalc.js +0 -0
- package/dist/hooks/useSupabaseSubscription/config.d.ts +0 -0
- package/dist/hooks/useSupabaseSubscription/config.js +0 -0
- package/dist/hooks/useSupabaseSubscription/index.d.ts +0 -0
- package/dist/hooks/useSupabaseSubscription/index.js +0 -0
- package/dist/hooks/useSupabaseSubscription/specialized.d.ts +0 -0
- package/dist/hooks/useSupabaseSubscription/specialized.js +0 -0
- package/dist/hooks/useSupabaseSubscription/types.d.ts +0 -0
- package/dist/hooks/useSupabaseSubscription/types.js +0 -0
- package/dist/hooks/useSupabaseSubscription/useSupabaseSubscription.d.ts +0 -0
- package/dist/hooks/useSupabaseSubscription/useSupabaseSubscription.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/utils/apiClientFactory.d.ts +0 -0
- package/dist/utils/apiClientFactory.js +0 -0
- package/dist/utils/converters.d.ts +0 -0
- package/dist/utils/converters.js +0 -0
- package/dist/utils/encrypt.d.ts +0 -0
- package/dist/utils/encrypt.js +0 -0
- package/dist/utils/storage.d.ts +0 -0
- package/dist/utils/storage.js +0 -0
- package/dist/utils/supabase.d.ts +0 -0
- package/dist/utils/supabase.js +0 -0
- package/dist/utils/tokensFactory.d.ts +0 -0
- package/dist/utils/tokensFactory.js +0 -0
- package/package.json +1 -1
- package/src/api/types/autogen/apiV2.types.ts +42 -70
- package/src/api/types/types.ts +42 -31
- package/dist/api/config.d.ts +0 -37
- package/dist/api/config.js +0 -40
- package/dist/api/fetch_api.d.ts +0 -1
- package/dist/api/fetch_api.js +0 -122
- package/dist/api/fiat_accounts.d.ts +0 -32
- package/dist/api/fiat_accounts.js +0 -51
- package/dist/api/location.d.ts +0 -6
- package/dist/api/location.js +0 -9
- package/dist/api/types.d.ts +0 -1674
- package/dist/api/types.js +0 -2
- package/dist/utils/common.d.ts +0 -5
- package/dist/utils/common.js +0 -48
package/dist/api/types.js
DELETED
package/dist/utils/common.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const generate256bitSecretKey: () => Uint8Array<ArrayBuffer>;
|
|
2
|
-
export declare const arrayBufferToBase64: (buffer: Uint8Array<ArrayBuffer>) => string;
|
|
3
|
-
export declare const decodePEMFromBase64: (base64EncodedPEM: string) => string;
|
|
4
|
-
export declare const base64ToArrayBuffer: (base64: string) => ArrayBuffer;
|
|
5
|
-
export declare const decryptSensitiveData: (encryptedData: string, iv: string, secretKey: BufferSource) => Promise<any>;
|
package/dist/utils/common.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.decryptSensitiveData = exports.base64ToArrayBuffer = exports.decodePEMFromBase64 = exports.arrayBufferToBase64 = exports.generate256bitSecretKey = void 0;
|
|
13
|
-
const generate256bitSecretKey = () => {
|
|
14
|
-
const array = new Uint8Array(32);
|
|
15
|
-
window.crypto.getRandomValues(array);
|
|
16
|
-
return array;
|
|
17
|
-
};
|
|
18
|
-
exports.generate256bitSecretKey = generate256bitSecretKey;
|
|
19
|
-
const arrayBufferToBase64 = (buffer) => {
|
|
20
|
-
return btoa(String.fromCharCode.apply(null, new Uint8Array(buffer)));
|
|
21
|
-
};
|
|
22
|
-
exports.arrayBufferToBase64 = arrayBufferToBase64;
|
|
23
|
-
const decodePEMFromBase64 = (base64EncodedPEM) => {
|
|
24
|
-
return atob(base64EncodedPEM);
|
|
25
|
-
};
|
|
26
|
-
exports.decodePEMFromBase64 = decodePEMFromBase64;
|
|
27
|
-
const base64ToArrayBuffer = (base64) => {
|
|
28
|
-
const binaryString = atob(base64);
|
|
29
|
-
const bytes = new Uint8Array(binaryString.length);
|
|
30
|
-
for (let i = 0; i < binaryString.length; i++) {
|
|
31
|
-
bytes[i] = binaryString.charCodeAt(i);
|
|
32
|
-
}
|
|
33
|
-
return bytes.buffer;
|
|
34
|
-
};
|
|
35
|
-
exports.base64ToArrayBuffer = base64ToArrayBuffer;
|
|
36
|
-
const decryptSensitiveData = (encryptedData, iv, secretKey) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
|
-
const key = yield window.crypto.subtle.importKey('raw', secretKey, { name: 'AES-CBC' }, false, ['decrypt']);
|
|
38
|
-
const encryptedBuffer = (0, exports.base64ToArrayBuffer)(encryptedData);
|
|
39
|
-
const ivBuffer = (0, exports.base64ToArrayBuffer)(iv);
|
|
40
|
-
const decryptedBuffer = yield window.crypto.subtle.decrypt({
|
|
41
|
-
name: 'AES-CBC',
|
|
42
|
-
iv: ivBuffer,
|
|
43
|
-
}, key, encryptedBuffer);
|
|
44
|
-
const decoder = new TextDecoder();
|
|
45
|
-
const jsonText = decoder.decode(decryptedBuffer);
|
|
46
|
-
return JSON.parse(jsonText);
|
|
47
|
-
});
|
|
48
|
-
exports.decryptSensitiveData = decryptSensitiveData;
|