@portal-hq/provider 4.1.0 → 4.1.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.
@@ -187,8 +187,8 @@ class Provider {
187
187
  * @param args The arguments of the request being made
188
188
  * @returns Promise<any>
189
189
  */
190
- request({ method, params, chainId, connect, }) {
191
- return __awaiter(this, void 0, void 0, function* () {
190
+ request(_a) {
191
+ return __awaiter(this, arguments, void 0, function* ({ method, params, chainId, connect, }) {
192
192
  chainId = chainId !== null && chainId !== void 0 ? chainId : this.chainId;
193
193
  if (!chainId) {
194
194
  throw new Error('[PortalProvider] No chainId provided');
@@ -320,8 +320,8 @@ class Provider {
320
320
  *
321
321
  * @param args The arguments of the request being made
322
322
  */
323
- getApproval({ method, params, chainId, connect, }) {
324
- return __awaiter(this, void 0, void 0, function* () {
323
+ getApproval(_a) {
324
+ return __awaiter(this, arguments, void 0, function* ({ method, params, chainId, connect, }) {
325
325
  // If autoApprove is enabled, just resolve to true
326
326
  if (this.autoApprove) {
327
327
  return true;
@@ -386,8 +386,8 @@ class Provider {
386
386
  * @param args The arguments of the request being made
387
387
  * @returns Promise<any>
388
388
  */
389
- handleGatewayRequests({ method, params, chainId, }) {
390
- return __awaiter(this, void 0, void 0, function* () {
389
+ handleGatewayRequests(_a) {
390
+ return __awaiter(this, arguments, void 0, function* ({ method, params, chainId, }) {
391
391
  const gatewayUrl = this.getGatewayUrl(chainId);
392
392
  // Pass request off to the gateway
393
393
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return
@@ -407,9 +407,9 @@ class Provider {
407
407
  * @param args The arguments of the request being made
408
408
  * @returns Promise<any>
409
409
  */
410
- handleSigningRequests({ method, params, chainId, connect, }) {
411
- var _a, _b;
412
- return __awaiter(this, void 0, void 0, function* () {
410
+ handleSigningRequests(_a) {
411
+ return __awaiter(this, arguments, void 0, function* ({ method, params, chainId, connect, }) {
412
+ var _b, _c;
413
413
  const isApproved = passiveSignerMethods.includes(method)
414
414
  ? true
415
415
  : yield this.getApproval({ method, params, chainId, connect });
@@ -440,7 +440,7 @@ class Provider {
440
440
  case 'sol_signAndSendTransaction':
441
441
  case 'sol_signMessage':
442
442
  case 'sol_signTransaction': {
443
- const result = yield ((_a = this.signer) === null || _a === void 0 ? void 0 : _a.sign({
443
+ const result = yield ((_b = this.signer) === null || _b === void 0 ? void 0 : _b.sign({
444
444
  chainId: `${namespace}:${reference}`,
445
445
  method,
446
446
  params,
@@ -450,7 +450,7 @@ class Provider {
450
450
  return result;
451
451
  }
452
452
  case 'raw_sign': {
453
- const result = yield ((_b = this.signer) === null || _b === void 0 ? void 0 : _b.sign({
453
+ const result = yield ((_c = this.signer) === null || _c === void 0 ? void 0 : _c.sign({
454
454
  chainId: '',
455
455
  method: '',
456
456
  params,
@@ -185,8 +185,8 @@ class Provider {
185
185
  * @param args The arguments of the request being made
186
186
  * @returns Promise<any>
187
187
  */
188
- request({ method, params, chainId, connect, }) {
189
- return __awaiter(this, void 0, void 0, function* () {
188
+ request(_a) {
189
+ return __awaiter(this, arguments, void 0, function* ({ method, params, chainId, connect, }) {
190
190
  chainId = chainId !== null && chainId !== void 0 ? chainId : this.chainId;
191
191
  if (!chainId) {
192
192
  throw new Error('[PortalProvider] No chainId provided');
@@ -318,8 +318,8 @@ class Provider {
318
318
  *
319
319
  * @param args The arguments of the request being made
320
320
  */
321
- getApproval({ method, params, chainId, connect, }) {
322
- return __awaiter(this, void 0, void 0, function* () {
321
+ getApproval(_a) {
322
+ return __awaiter(this, arguments, void 0, function* ({ method, params, chainId, connect, }) {
323
323
  // If autoApprove is enabled, just resolve to true
324
324
  if (this.autoApprove) {
325
325
  return true;
@@ -384,8 +384,8 @@ class Provider {
384
384
  * @param args The arguments of the request being made
385
385
  * @returns Promise<any>
386
386
  */
387
- handleGatewayRequests({ method, params, chainId, }) {
388
- return __awaiter(this, void 0, void 0, function* () {
387
+ handleGatewayRequests(_a) {
388
+ return __awaiter(this, arguments, void 0, function* ({ method, params, chainId, }) {
389
389
  const gatewayUrl = this.getGatewayUrl(chainId);
390
390
  // Pass request off to the gateway
391
391
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return
@@ -405,9 +405,9 @@ class Provider {
405
405
  * @param args The arguments of the request being made
406
406
  * @returns Promise<any>
407
407
  */
408
- handleSigningRequests({ method, params, chainId, connect, }) {
409
- var _a, _b;
410
- return __awaiter(this, void 0, void 0, function* () {
408
+ handleSigningRequests(_a) {
409
+ return __awaiter(this, arguments, void 0, function* ({ method, params, chainId, connect, }) {
410
+ var _b, _c;
411
411
  const isApproved = passiveSignerMethods.includes(method)
412
412
  ? true
413
413
  : yield this.getApproval({ method, params, chainId, connect });
@@ -438,7 +438,7 @@ class Provider {
438
438
  case 'sol_signAndSendTransaction':
439
439
  case 'sol_signMessage':
440
440
  case 'sol_signTransaction': {
441
- const result = yield ((_a = this.signer) === null || _a === void 0 ? void 0 : _a.sign({
441
+ const result = yield ((_b = this.signer) === null || _b === void 0 ? void 0 : _b.sign({
442
442
  chainId: `${namespace}:${reference}`,
443
443
  method,
444
444
  params,
@@ -448,7 +448,7 @@ class Provider {
448
448
  return result;
449
449
  }
450
450
  case 'raw_sign': {
451
- const result = yield ((_b = this.signer) === null || _b === void 0 ? void 0 : _b.sign({
451
+ const result = yield ((_c = this.signer) === null || _c === void 0 ? void 0 : _c.sign({
452
452
  chainId: '',
453
453
  method: '',
454
454
  params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/provider",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/esm/index",
@@ -19,8 +19,8 @@
19
19
  "test": "jest"
20
20
  },
21
21
  "dependencies": {
22
- "@portal-hq/connect": "^4.1.0",
23
- "@portal-hq/utils": "^4.1.0"
22
+ "@portal-hq/connect": "^4.1.1",
23
+ "@portal-hq/utils": "^4.1.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@babel/preset-typescript": "^7.18.6",
@@ -30,5 +30,5 @@
30
30
  "ts-jest": "^29.0.3",
31
31
  "typescript": "^4.8.4"
32
32
  },
33
- "gitHead": "d53139e2dae6d0ede12d647ae4d11f4915b896f1"
33
+ "gitHead": "3c03bd4a6573b23865f655856cd0161706f3f30d"
34
34
  }