@portal-hq/utils 4.8.0 → 4.9.0

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.
@@ -5,6 +5,7 @@ class HttpError extends Error {
5
5
  super(`${status} - ${statusText}: ${message}`);
6
6
  // Set the prototype explicitly.
7
7
  Object.setPrototypeOf(this, HttpError.prototype);
8
+ this.status = status;
8
9
  }
9
10
  }
10
11
  exports.default = HttpError;
@@ -64,6 +64,8 @@ var Events;
64
64
  Events["EvmAccountType7702BuildAuthorizationList"] = "Evm Account Type 7702 BuildAuthorizationList";
65
65
  Events["EvmAccountType7702BuildUpgradeTx"] = "Evm Account Type 7702 BuildUpgradeTx";
66
66
  Events["EvmAccountType7702Upgrade"] = "Evm Account Type 7702 Upgrade";
67
+ Events["UserOperationsBuildBatched"] = "UserOperations BuildBatched";
68
+ Events["UserOperationsBroadcastBatched"] = "UserOperations BroadcastBatched";
67
69
  Events["NoahInitiateKyc"] = "Noah Initiate KYC";
68
70
  Events["NoahInitiatePayin"] = "Noah Initiate Payin";
69
71
  Events["NoahSimulatePayin"] = "Noah Simulate Payin";
@@ -1 +1 @@
1
- { "version": "4.8.0" }
1
+ { "version": "4.9.0" }
@@ -3,6 +3,7 @@ class HttpError extends Error {
3
3
  super(`${status} - ${statusText}: ${message}`);
4
4
  // Set the prototype explicitly.
5
5
  Object.setPrototypeOf(this, HttpError.prototype);
6
+ this.status = status;
6
7
  }
7
8
  }
8
9
  export default HttpError;
@@ -62,6 +62,8 @@ var Events;
62
62
  Events["EvmAccountType7702BuildAuthorizationList"] = "Evm Account Type 7702 BuildAuthorizationList";
63
63
  Events["EvmAccountType7702BuildUpgradeTx"] = "Evm Account Type 7702 BuildUpgradeTx";
64
64
  Events["EvmAccountType7702Upgrade"] = "Evm Account Type 7702 Upgrade";
65
+ Events["UserOperationsBuildBatched"] = "UserOperations BuildBatched";
66
+ Events["UserOperationsBroadcastBatched"] = "UserOperations BroadcastBatched";
65
67
  Events["NoahInitiateKyc"] = "Noah Initiate KYC";
66
68
  Events["NoahInitiatePayin"] = "Noah Initiate Payin";
67
69
  Events["NoahSimulatePayin"] = "Noah Simulate Payin";
@@ -1 +1 @@
1
- { "version": "4.8.0" }
1
+ { "version": "4.9.0" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/utils",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
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": "c67b5068d5245eeab6b760ee01298d88965bf386"
29
+ "gitHead": "e4a470a7df8ccc90ff074f1e67d7d23bf436cbdc"
30
30
  }
@@ -9,6 +9,7 @@ import {
9
9
  BuildSolanaTransactionResponse,
10
10
  FundParams,
11
11
  FundResponse,
12
+ GenerateApiResponse,
12
13
  NFTAsset,
13
14
  YieldXyzEnterRequest,
14
15
  YieldXyzEnterYieldResponse,
@@ -231,6 +232,10 @@ export interface IPortalApi {
231
232
  traceId?: string,
232
233
  ): Promise<BuildEip155TransactionResponse | BuildSolanaTransactionResponse>
233
234
  fund(chainId: string, params: FundParams): Promise<FundResponse>
235
+ generatePreGeneratedShares(
236
+ metadataStr: string,
237
+ traceId?: string,
238
+ ): Promise<GenerateApiResponse>
234
239
  getBackupSharesMetadata(chainId?: string): Promise<BackupSharePairMetadata[]>
235
240
  getBalances(chainId?: string, traceId?: string): Promise<Balance[]>
236
241
  getClient(traceId?: string): Promise<ClientResponse>
@@ -1,11 +1,16 @@
1
1
  import { type HttpErrorOptions } from '../../types'
2
2
 
3
3
  class HttpError extends Error {
4
+ /** The HTTP status code that produced this error, so callers can distinguish retryable (5xx) from terminal (4xx) failures. */
5
+ public status: number
6
+
4
7
  constructor({ message, status, statusText }: HttpErrorOptions) {
5
8
  super(`${status} - ${statusText}: ${message}`)
6
9
 
7
10
  // Set the prototype explicitly.
8
11
  Object.setPrototypeOf(this, HttpError.prototype)
12
+
13
+ this.status = status
9
14
  }
10
15
  }
11
16
 
@@ -68,6 +68,9 @@ enum Events {
68
68
  EvmAccountType7702BuildUpgradeTx = 'Evm Account Type 7702 BuildUpgradeTx',
69
69
  EvmAccountType7702Upgrade = 'Evm Account Type 7702 Upgrade',
70
70
 
71
+ UserOperationsBuildBatched = 'UserOperations BuildBatched',
72
+ UserOperationsBroadcastBatched = 'UserOperations BroadcastBatched',
73
+
71
74
  NoahInitiateKyc = 'Noah Initiate KYC',
72
75
  NoahInitiatePayin = 'Noah Initiate Payin',
73
76
  NoahSimulatePayin = 'Noah Simulate Payin',
@@ -1 +1 @@
1
- { "version": "4.8.0" }
1
+ { "version": "4.9.0" }