@getpara/core-sdk 0.1.0 → 0.2.1
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 +247 -158
- package/dist/cjs/definitions.js +1 -3
- package/dist/cjs/external/userManagementClient.js +16 -1
- package/dist/cjs/types/events.js +17 -0
- package/dist/cjs/types/index.js +1 -0
- package/dist/esm/ParaCore.js +250 -161
- package/dist/esm/definitions.js +0 -2
- package/dist/esm/external/userManagementClient.js +14 -0
- package/dist/esm/types/events.js +14 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/types/ParaCore.d.ts +218 -157
- package/dist/types/definitions.d.ts +0 -2
- package/dist/types/external/userManagementClient.d.ts +1 -0
- package/dist/types/types/events.d.ts +47 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/params.d.ts +34 -0
- package/package.json +3 -3
package/dist/esm/definitions.js
CHANGED
|
@@ -108,8 +108,6 @@ export function getParaConnectBaseUrl({ env }, useLocalIp) {
|
|
|
108
108
|
}
|
|
109
109
|
return `https://${domain}`;
|
|
110
110
|
}
|
|
111
|
-
export const EXTERNAL_WALLET_CHANGE_EVENT = 'paraExternalWalletChange';
|
|
112
|
-
export const CURRENT_WALLET_IDS_CHANGE_EVENT = 'paraCurrentWalletIdsChange';
|
|
113
111
|
export function toAssetInfoArray(data) {
|
|
114
112
|
const result = [];
|
|
115
113
|
Object.keys(data).forEach(walletType => {
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import Client from '@getpara/user-management-client';
|
|
2
2
|
import { Environment } from '../definitions.js';
|
|
3
|
+
export function getBaseOAuthUrl(env) {
|
|
4
|
+
switch (env) {
|
|
5
|
+
case Environment.DEV:
|
|
6
|
+
return 'http://localhost:8080/';
|
|
7
|
+
case Environment.SANDBOX:
|
|
8
|
+
return 'https://api.sandbox.usecapsule.com/';
|
|
9
|
+
case Environment.BETA:
|
|
10
|
+
return 'https://api.beta.usecapsule.com/';
|
|
11
|
+
case Environment.PROD:
|
|
12
|
+
return 'https://api.usecapsule.com/';
|
|
13
|
+
default:
|
|
14
|
+
throw new Error(`unsupported env: ${env}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
3
17
|
export function getBaseUrl(env) {
|
|
4
18
|
switch (env) {
|
|
5
19
|
case Environment.DEV:
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const EVENT_PREFIX = 'para';
|
|
2
|
+
export var ParaEvent;
|
|
3
|
+
(function (ParaEvent) {
|
|
4
|
+
ParaEvent["LOGIN_EVENT"] = "paraLogin";
|
|
5
|
+
ParaEvent["ACCOUNT_CREATION_EVENT"] = "paraAccountCreation";
|
|
6
|
+
ParaEvent["ACCOUNT_SETUP_EVENT"] = "paraAccountSetup";
|
|
7
|
+
ParaEvent["LOGOUT_EVENT"] = "paraLogout";
|
|
8
|
+
ParaEvent["SIGN_MESSAGE_EVENT"] = "paraSignMessage";
|
|
9
|
+
ParaEvent["SIGN_TRANSACTION_EVENT"] = "paraSignTransaction";
|
|
10
|
+
ParaEvent["EXTERNAL_WALLET_CHANGE_EVENT"] = "paraExternalWalletChange";
|
|
11
|
+
ParaEvent["WALLETS_CHANGE_EVENT"] = "paraWalletsChange";
|
|
12
|
+
ParaEvent["WALLET_CREATED"] = "paraWalletCreated";
|
|
13
|
+
ParaEvent["PREGEN_WALLET_CLAIMED"] = "paraPregenWalletClaimed";
|
|
14
|
+
})(ParaEvent || (ParaEvent = {}));
|
package/dist/esm/types/index.js
CHANGED