@portal-hq/utils 4.0.0 → 4.1.0-beta

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.
@@ -11,6 +11,7 @@ var Events;
11
11
  Events["GetBackupShareMetadata"] = "Get Backup Share Metadata";
12
12
  Events["GetBalances"] = "Get Balances";
13
13
  Events["GetClient"] = "Get Client";
14
+ Events["GetClientCipherText"] = "Get Client Cipher Text";
14
15
  Events["GetEnabledDapps"] = "Get Enabled Dapps";
15
16
  Events["GetNFTs"] = "Get NFTs";
16
17
  Events["GetNetworks"] = "Get Networks";
@@ -18,7 +19,9 @@ var Events;
18
19
  Events["GetSigningShareMetadata"] = "Get Signing Share Metadata";
19
20
  Events["GetSources"] = "Get Sources";
20
21
  Events["GetTransactions"] = "Get Transactions";
22
+ Events["PrepareClientEject"] = "Prepare Client Eject";
21
23
  Events["SimulateTransaction"] = "Simulate Transaction";
24
+ Events["StoreClientCipherText"] = "Store Client Cipher Text";
22
25
  Events["StoredClientBackupShare"] = "Stored Client Backup Share";
23
26
  Events["StoredClientBackupShareKey"] = "Stored Client Backup Share Key";
24
27
  Events["StoredClientSigningShare"] = "Stored Client Signing Share";
@@ -9,6 +9,7 @@ var Events;
9
9
  Events["GetBackupShareMetadata"] = "Get Backup Share Metadata";
10
10
  Events["GetBalances"] = "Get Balances";
11
11
  Events["GetClient"] = "Get Client";
12
+ Events["GetClientCipherText"] = "Get Client Cipher Text";
12
13
  Events["GetEnabledDapps"] = "Get Enabled Dapps";
13
14
  Events["GetNFTs"] = "Get NFTs";
14
15
  Events["GetNetworks"] = "Get Networks";
@@ -16,7 +17,9 @@ var Events;
16
17
  Events["GetSigningShareMetadata"] = "Get Signing Share Metadata";
17
18
  Events["GetSources"] = "Get Sources";
18
19
  Events["GetTransactions"] = "Get Transactions";
20
+ Events["PrepareClientEject"] = "Prepare Client Eject";
19
21
  Events["SimulateTransaction"] = "Simulate Transaction";
22
+ Events["StoreClientCipherText"] = "Store Client Cipher Text";
20
23
  Events["StoredClientBackupShare"] = "Stored Client Backup Share";
21
24
  Events["StoredClientBackupShareKey"] = "Stored Client Backup Share Key";
22
25
  Events["StoredClientSigningShare"] = "Stored Client Signing Share";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/utils",
3
- "version": "4.0.0",
3
+ "version": "4.1.0-beta",
4
4
  "main": "lib/commonjs/index",
5
5
  "module": "lib/esm/index",
6
6
  "source": "src/index",
@@ -26,5 +26,5 @@
26
26
  "ts-jest": "^29.0.3",
27
27
  "typescript": "^4.8.4"
28
28
  },
29
- "gitHead": "a1c6f51ff156d3d1922cdaa29ee43fe4cfefd932"
29
+ "gitHead": "87317816c3fb6475dc655746b2023fa84e0417d7"
30
30
  }
@@ -1,4 +1,5 @@
1
1
  import PortalConnect from '@portal-hq/connect'
2
+ import { BackupMethods } from '@portal-hq/core'
2
3
 
3
4
  import type {
4
5
  AddressesByNamespace,
@@ -55,6 +56,7 @@ export interface IPortalApi {
55
56
  getBackupSharesMetadata(chainId?: string): Promise<BackupSharePairMetadata[]>
56
57
  getBalances(chainId?: string): Promise<Balance[]>
57
58
  getClient(): Promise<ClientResponse>
59
+ getClientCipherText(backupSharePairId: string): Promise<string>
58
60
  getEnabledDapps(): Promise<Dapp[]>
59
61
  getNFTs(chainId?: string): Promise<NFT[]>
60
62
  getNetworks(): Promise<Network[]>
@@ -74,10 +76,18 @@ export interface IPortalApi {
74
76
  order?: GetTransactionsOrder,
75
77
  ): Promise<Transaction[]>
76
78
  identify(traits?: Record<string, any>): Promise<{ success: boolean }>
79
+ prepareClientEject(
80
+ walletId: string,
81
+ backupMethod: BackupMethods,
82
+ ): Promise<string>
77
83
  simulateTransaction(
78
84
  params: SimulateTransactionParam,
79
85
  chainId?: string,
80
86
  ): Promise<SimulatedTransaction>
87
+ storeClientCipherText(
88
+ backupSharePairId: string,
89
+ cipherText: string,
90
+ ): Promise<boolean>
81
91
  storedClientSigningShares(signingSharePairIds: string[]): Promise<void>
82
92
  storedClientBackupShares(backupSharePairIds: string[]): Promise<void>
83
93
  storedClientBackupSharesKey(backupSharePairIds: string[]): Promise<void>
@@ -9,6 +9,7 @@ enum Events {
9
9
  GetBackupShareMetadata = 'Get Backup Share Metadata',
10
10
  GetBalances = 'Get Balances',
11
11
  GetClient = 'Get Client',
12
+ GetClientCipherText = 'Get Client Cipher Text',
12
13
  GetEnabledDapps = 'Get Enabled Dapps',
13
14
  GetNFTs = 'Get NFTs',
14
15
  GetNetworks = 'Get Networks',
@@ -16,7 +17,9 @@ enum Events {
16
17
  GetSigningShareMetadata = 'Get Signing Share Metadata',
17
18
  GetSources = 'Get Sources',
18
19
  GetTransactions = 'Get Transactions',
20
+ PrepareClientEject = 'Prepare Client Eject',
19
21
  SimulateTransaction = 'Simulate Transaction',
22
+ StoreClientCipherText = 'Store Client Cipher Text',
20
23
  StoredClientBackupShare = 'Stored Client Backup Share',
21
24
  StoredClientBackupShareKey = 'Stored Client Backup Share Key',
22
25
  StoredClientSigningShare = 'Stored Client Signing Share',
package/types.d.ts CHANGED
@@ -52,6 +52,7 @@ interface ClientResponseCustodian {
52
52
 
53
53
  interface ClientResponseEnvironment {
54
54
  id: string
55
+ backupWithPortalEnabled?: boolean
55
56
  name: string
56
57
  }
57
58