@getpara/core-sdk 2.0.0-alpha.19 → 2.0.0-alpha.21
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/cjs/ParaCore.js +329 -66
- package/dist/cjs/constants.js +4 -1
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/types/auth.js +33 -0
- package/dist/cjs/types/coreApi.js +17 -3
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/utils/formatting.js +4 -0
- package/dist/esm/ParaCore.js +332 -67
- package/dist/esm/constants.js +3 -1
- package/dist/esm/index.js +14 -2
- package/dist/esm/types/auth.js +11 -0
- package/dist/esm/types/coreApi.js +15 -2
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/utils/formatting.js +2 -0
- package/dist/types/ParaCore.d.ts +40 -38
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/types/auth.d.ts +16 -0
- package/dist/types/types/coreApi.d.ts +82 -34
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/methods.d.ts +30 -2
- package/dist/types/types/wallet.d.ts +2 -1
- package/dist/types/utils/formatting.d.ts +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var auth_exports = {};
|
|
19
|
+
__export(auth_exports, {
|
|
20
|
+
AccountLinkError: () => AccountLinkError
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(auth_exports);
|
|
23
|
+
var AccountLinkError = /* @__PURE__ */ ((AccountLinkError2) => {
|
|
24
|
+
AccountLinkError2["NotAuthenticated"] = "No user is currently authenticated";
|
|
25
|
+
AccountLinkError2["Conflict"] = "Account already linked";
|
|
26
|
+
AccountLinkError2["Canceled"] = "Account linking was canceled";
|
|
27
|
+
AccountLinkError2["Unknown"] = "An unknown error occurred";
|
|
28
|
+
return AccountLinkError2;
|
|
29
|
+
})(AccountLinkError || {});
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
AccountLinkError
|
|
33
|
+
});
|
|
@@ -17,7 +17,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var coreApi_exports = {};
|
|
19
19
|
__export(coreApi_exports, {
|
|
20
|
-
PARA_CORE_METHODS: () => PARA_CORE_METHODS
|
|
20
|
+
PARA_CORE_METHODS: () => PARA_CORE_METHODS,
|
|
21
|
+
PARA_INTERNAL_METHODS: () => PARA_INTERNAL_METHODS
|
|
21
22
|
});
|
|
22
23
|
module.exports = __toCommonJS(coreApi_exports);
|
|
23
24
|
const PARA_CORE_METHODS = [
|
|
@@ -67,9 +68,22 @@ const PARA_CORE_METHODS = [
|
|
|
67
68
|
"signTransaction",
|
|
68
69
|
"initiateOnRampTransaction",
|
|
69
70
|
"getWalletBalance",
|
|
70
|
-
"issueJwt"
|
|
71
|
+
"issueJwt",
|
|
72
|
+
"getLinkedAccounts",
|
|
73
|
+
"accountLinkInProgress"
|
|
74
|
+
];
|
|
75
|
+
const PARA_INTERNAL_METHODS = [
|
|
76
|
+
"linkAccount",
|
|
77
|
+
"unlinkAccount",
|
|
78
|
+
"verifyEmailOrPhoneLink",
|
|
79
|
+
"verifyOAuthLink",
|
|
80
|
+
"verifyFarcasterLink",
|
|
81
|
+
"verifyTelegramLink",
|
|
82
|
+
"verifyExternalWalletLink",
|
|
83
|
+
"accountLinkInProgress"
|
|
71
84
|
];
|
|
72
85
|
// Annotate the CommonJS export names for ESM import in node:
|
|
73
86
|
0 && (module.exports = {
|
|
74
|
-
PARA_CORE_METHODS
|
|
87
|
+
PARA_CORE_METHODS,
|
|
88
|
+
PARA_INTERNAL_METHODS
|
|
75
89
|
});
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(types_exports, {
|
|
|
24
24
|
OnRampPurchaseStatus: () => import_user_management_client.OnRampPurchaseStatus
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(types_exports);
|
|
27
|
+
__reExport(types_exports, require("./auth.js"), module.exports);
|
|
27
28
|
__reExport(types_exports, require("./config.js"), module.exports);
|
|
28
29
|
__reExport(types_exports, require("./coreApi.js"), module.exports);
|
|
29
30
|
__reExport(types_exports, require("./wallet.js"), module.exports);
|
|
@@ -40,6 +41,7 @@ var import_user_management_client = require("@getpara/user-management-client");
|
|
|
40
41
|
OnRampAsset,
|
|
41
42
|
OnRampProvider,
|
|
42
43
|
OnRampPurchaseStatus,
|
|
44
|
+
...require("./auth.js"),
|
|
43
45
|
...require("./config.js"),
|
|
44
46
|
...require("./coreApi.js"),
|
|
45
47
|
...require("./wallet.js"),
|
|
@@ -27,12 +27,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
var formatting_exports = {};
|
|
29
29
|
__export(formatting_exports, {
|
|
30
|
+
compressPubkey: () => compressPubkey,
|
|
30
31
|
decimalToHex: () => decimalToHex,
|
|
31
32
|
getCosmosAddress: () => getCosmosAddress,
|
|
32
33
|
hexStringToBase64: () => hexStringToBase64,
|
|
33
34
|
hexToDecimal: () => hexToDecimal,
|
|
34
35
|
hexToSignature: () => hexToSignature,
|
|
35
36
|
hexToUint8Array: () => hexToUint8Array,
|
|
37
|
+
rawSecp256k1PubkeyToRawAddress: () => rawSecp256k1PubkeyToRawAddress,
|
|
36
38
|
truncateAddress: () => truncateAddress
|
|
37
39
|
});
|
|
38
40
|
module.exports = __toCommonJS(formatting_exports);
|
|
@@ -102,11 +104,13 @@ function truncateAddress(str, addressType, {
|
|
|
102
104
|
}
|
|
103
105
|
// Annotate the CommonJS export names for ESM import in node:
|
|
104
106
|
0 && (module.exports = {
|
|
107
|
+
compressPubkey,
|
|
105
108
|
decimalToHex,
|
|
106
109
|
getCosmosAddress,
|
|
107
110
|
hexStringToBase64,
|
|
108
111
|
hexToDecimal,
|
|
109
112
|
hexToSignature,
|
|
110
113
|
hexToUint8Array,
|
|
114
|
+
rawSecp256k1PubkeyToRawAddress,
|
|
111
115
|
truncateAddress
|
|
112
116
|
});
|