@getpara/web-sdk 2.0.0-alpha.64 → 2.0.0-alpha.66
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/ParaWeb.js +5 -4
- package/dist/WebUtils.js +2 -1
- package/dist/types/onRamp.d.ts +13 -3
- package/package.json +4 -4
package/dist/ParaWeb.js
CHANGED
|
@@ -97,11 +97,12 @@ class Para extends ParaCore {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
break;
|
|
100
|
-
case "
|
|
100
|
+
case "SYNC_WALLETS":
|
|
101
101
|
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
payload = {
|
|
103
|
+
wallets: this.wallets,
|
|
104
|
+
currentWalletIds: this.currentWalletIds
|
|
105
|
+
};
|
|
105
106
|
}
|
|
106
107
|
break;
|
|
107
108
|
}
|
package/dist/WebUtils.js
CHANGED
package/dist/types/onRamp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CurrentWalletIds, OnRampConfig, OnRampPurchase, OnRampPurchaseUpdateParams } from '@getpara/user-management-client';
|
|
2
|
-
import { OfframpDepositRequest } from '@getpara/core-sdk';
|
|
3
|
-
export type PortalMessageType = 'ONRAMPS__INIT' | 'ONRAMPS__UPDATE_PURCHASE' | 'ONRAMPS__SIGN_MOONPAY_URL' | 'ONRAMPS__SIGN_DEPOSIT_TX' | 'WALLET_SWITCH_COMPLETED';
|
|
2
|
+
import { OfframpDepositRequest, Wallet } from '@getpara/core-sdk';
|
|
3
|
+
export type PortalMessageType = 'ONRAMPS__INIT' | 'ONRAMPS__UPDATE_PURCHASE' | 'ONRAMPS__SIGN_MOONPAY_URL' | 'ONRAMPS__SIGN_DEPOSIT_TX' | 'WALLET_SWITCH_COMPLETED' | 'SYNC_WALLETS';
|
|
4
4
|
export type PortalMessageStatus = 'ERROR' | 'SUCCESS';
|
|
5
5
|
export type PortalRequestPayload<T extends PortalMessageType> = T extends 'ONRAMPS__UPDATE_PURCHASE' ? {
|
|
6
6
|
updates: OnRampPurchaseUpdateParams;
|
|
@@ -11,7 +11,7 @@ export type PortalRequestPayload<T extends PortalMessageType> = T extends 'ONRAM
|
|
|
11
11
|
depositRequest: OfframpDepositRequest;
|
|
12
12
|
} : T extends 'WALLET_SWITCH_COMPLETED' ? {
|
|
13
13
|
walletIds?: CurrentWalletIds;
|
|
14
|
-
} : never;
|
|
14
|
+
} : T extends 'SYNC_WALLETS' ? undefined : never;
|
|
15
15
|
export type PortalRequest = {
|
|
16
16
|
isPara: boolean;
|
|
17
17
|
id: string;
|
|
@@ -31,6 +31,9 @@ export type PortalRequest = {
|
|
|
31
31
|
} | {
|
|
32
32
|
type: 'WALLET_SWITCH_COMPLETED';
|
|
33
33
|
payload: PortalRequestPayload<'WALLET_SWITCH_COMPLETED'>;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'SYNC_WALLETS';
|
|
36
|
+
payload?: undefined;
|
|
34
37
|
});
|
|
35
38
|
export type PortalResponsePayload<T extends PortalMessageType> = T extends 'ONRAMPS__INIT' ? {
|
|
36
39
|
onRampPurchase: OnRampPurchase;
|
|
@@ -44,6 +47,9 @@ export type PortalResponsePayload<T extends PortalMessageType> = T extends 'ONRA
|
|
|
44
47
|
onRampPurchase: OnRampPurchase;
|
|
45
48
|
} : T extends 'WALLET_SWITCH_COMPLETED' ? {
|
|
46
49
|
walletIds?: CurrentWalletIds;
|
|
50
|
+
} : T extends 'SYNC_WALLETS' ? {
|
|
51
|
+
wallets: Record<string, Wallet>;
|
|
52
|
+
currentWalletIds?: CurrentWalletIds;
|
|
47
53
|
} : never;
|
|
48
54
|
export type PortalResponse = {
|
|
49
55
|
id: string;
|
|
@@ -74,4 +80,8 @@ export type PortalResponse = {
|
|
|
74
80
|
status: 'SUCCESS';
|
|
75
81
|
type: 'WALLET_SWITCH_COMPLETED';
|
|
76
82
|
payload: PortalResponsePayload<'WALLET_SWITCH_COMPLETED'>;
|
|
83
|
+
} | {
|
|
84
|
+
status: 'SUCCESS';
|
|
85
|
+
type: 'SYNC_WALLETS';
|
|
86
|
+
payload: PortalResponsePayload<'SYNC_WALLETS'>;
|
|
77
87
|
});
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/web-sdk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.66",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/core-sdk": "2.0.0-alpha.
|
|
6
|
-
"@getpara/user-management-client": "2.0.0-alpha.
|
|
5
|
+
"@getpara/core-sdk": "2.0.0-alpha.66",
|
|
6
|
+
"@getpara/user-management-client": "2.0.0-alpha.66",
|
|
7
7
|
"base64url": "^3.0.1",
|
|
8
8
|
"buffer": "6.0.3",
|
|
9
9
|
"cbor-web": "^9.0.2",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dist",
|
|
29
29
|
"package.json"
|
|
30
30
|
],
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "07c8b7b68aa36dec6071e3b3b3a66de2870312c8",
|
|
32
32
|
"main": "dist/index.js",
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs && yarn post-build",
|