@0xsequence/provider 0.35.12 → 0.36.3

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.
@@ -598,7 +598,7 @@ class WalletRequestHandler {
598
598
  sig = await _this.prompter.promptSignMessage({
599
599
  chainId: chainId,
600
600
  message: message
601
- });
601
+ }, _this.connectOptions);
602
602
  }
603
603
  }
604
604
 
@@ -644,7 +644,7 @@ class WalletRequestHandler {
644
644
  sig = await _this.prompter.promptSignMessage({
645
645
  chainId: chainId,
646
646
  typedData: typedData
647
- });
647
+ }, _this.connectOptions);
648
648
  }
649
649
  }
650
650
 
@@ -670,7 +670,7 @@ class WalletRequestHandler {
670
670
  txnHash = txnResponse.hash;
671
671
  } else {
672
672
  // prompt user to provide the response
673
- txnHash = await _this.prompter.promptSendTransaction(transactionParams, chainId);
673
+ txnHash = await _this.prompter.promptSendTransaction(transactionParams, chainId, _this.connectOptions);
674
674
  }
675
675
 
676
676
  if (txnHash) {
@@ -701,7 +701,7 @@ class WalletRequestHandler {
701
701
  // we will want to resolveProperties the bignumber values to hex strings
702
702
  response.result = await signer.signTransactions(transaction, chainId);
703
703
  } else {
704
- response.result = await _this.prompter.promptSignTransaction(transaction, chainId);
704
+ response.result = await _this.prompter.promptSignTransaction(transaction, chainId, _this.connectOptions);
705
705
  }
706
706
 
707
707
  break;
@@ -1236,7 +1236,7 @@ class WalletRequestHandler {
1236
1236
  return true;
1237
1237
  }
1238
1238
 
1239
- const promptResult = await prompter.promptConfirmWalletDeploy(chainId); // if client returned true, check again to make sure wallet is deployed and up to date
1239
+ const promptResult = await prompter.promptConfirmWalletDeploy(chainId, this.connectOptions); // if client returned true, check again to make sure wallet is deployed and up to date
1240
1240
 
1241
1241
  if (promptResult) {
1242
1242
  const isPromptResultCorrect = await isWalletUpToDate(signer, chainId);
@@ -598,7 +598,7 @@ class WalletRequestHandler {
598
598
  sig = await _this.prompter.promptSignMessage({
599
599
  chainId: chainId,
600
600
  message: message
601
- });
601
+ }, _this.connectOptions);
602
602
  }
603
603
  }
604
604
 
@@ -644,7 +644,7 @@ class WalletRequestHandler {
644
644
  sig = await _this.prompter.promptSignMessage({
645
645
  chainId: chainId,
646
646
  typedData: typedData
647
- });
647
+ }, _this.connectOptions);
648
648
  }
649
649
  }
650
650
 
@@ -670,7 +670,7 @@ class WalletRequestHandler {
670
670
  txnHash = txnResponse.hash;
671
671
  } else {
672
672
  // prompt user to provide the response
673
- txnHash = await _this.prompter.promptSendTransaction(transactionParams, chainId);
673
+ txnHash = await _this.prompter.promptSendTransaction(transactionParams, chainId, _this.connectOptions);
674
674
  }
675
675
 
676
676
  if (txnHash) {
@@ -701,7 +701,7 @@ class WalletRequestHandler {
701
701
  // we will want to resolveProperties the bignumber values to hex strings
702
702
  response.result = await signer.signTransactions(transaction, chainId);
703
703
  } else {
704
- response.result = await _this.prompter.promptSignTransaction(transaction, chainId);
704
+ response.result = await _this.prompter.promptSignTransaction(transaction, chainId, _this.connectOptions);
705
705
  }
706
706
 
707
707
  break;
@@ -1236,7 +1236,7 @@ class WalletRequestHandler {
1236
1236
  return true;
1237
1237
  }
1238
1238
 
1239
- const promptResult = await prompter.promptConfirmWalletDeploy(chainId); // if client returned true, check again to make sure wallet is deployed and up to date
1239
+ const promptResult = await prompter.promptConfirmWalletDeploy(chainId, this.connectOptions); // if client returned true, check again to make sure wallet is deployed and up to date
1240
1240
 
1241
1241
  if (promptResult) {
1242
1242
  const isPromptResultCorrect = await isWalletUpToDate(signer, chainId);
@@ -594,7 +594,7 @@ class WalletRequestHandler {
594
594
  sig = await _this.prompter.promptSignMessage({
595
595
  chainId: chainId,
596
596
  message: message
597
- });
597
+ }, _this.connectOptions);
598
598
  }
599
599
  }
600
600
 
@@ -640,7 +640,7 @@ class WalletRequestHandler {
640
640
  sig = await _this.prompter.promptSignMessage({
641
641
  chainId: chainId,
642
642
  typedData: typedData
643
- });
643
+ }, _this.connectOptions);
644
644
  }
645
645
  }
646
646
 
@@ -666,7 +666,7 @@ class WalletRequestHandler {
666
666
  txnHash = txnResponse.hash;
667
667
  } else {
668
668
  // prompt user to provide the response
669
- txnHash = await _this.prompter.promptSendTransaction(transactionParams, chainId);
669
+ txnHash = await _this.prompter.promptSendTransaction(transactionParams, chainId, _this.connectOptions);
670
670
  }
671
671
 
672
672
  if (txnHash) {
@@ -697,7 +697,7 @@ class WalletRequestHandler {
697
697
  // we will want to resolveProperties the bignumber values to hex strings
698
698
  response.result = await signer.signTransactions(transaction, chainId);
699
699
  } else {
700
- response.result = await _this.prompter.promptSignTransaction(transaction, chainId);
700
+ response.result = await _this.prompter.promptSignTransaction(transaction, chainId, _this.connectOptions);
701
701
  }
702
702
 
703
703
  break;
@@ -1232,7 +1232,7 @@ class WalletRequestHandler {
1232
1232
  return true;
1233
1233
  }
1234
1234
 
1235
- const promptResult = await prompter.promptConfirmWalletDeploy(chainId); // if client returned true, check again to make sure wallet is deployed and up to date
1235
+ const promptResult = await prompter.promptConfirmWalletDeploy(chainId, this.connectOptions); // if client returned true, check again to make sure wallet is deployed and up to date
1236
1236
 
1237
1237
  if (promptResult) {
1238
1238
  const isPromptResultCorrect = await isWalletUpToDate(signer, chainId);
@@ -52,9 +52,9 @@ export declare class WalletRequestHandler implements ExternalProvider, JsonRpcHa
52
52
  private handleConfirmWalletDeployPrompt;
53
53
  }
54
54
  export interface WalletUserPrompter {
55
- promptConfirmWalletDeploy(chainId: number): Promise<boolean>;
56
55
  promptConnect(options?: ConnectOptions): Promise<PromptConnectDetails>;
57
- promptSignMessage(message: MessageToSign): Promise<string>;
58
- promptSignTransaction(txn: TransactionRequest, chaindId?: number): Promise<string>;
59
- promptSendTransaction(txn: TransactionRequest, chaindId?: number): Promise<string>;
56
+ promptSignMessage(message: MessageToSign, options?: ConnectOptions): Promise<string>;
57
+ promptSignTransaction(txn: TransactionRequest, chaindId?: number, options?: ConnectOptions): Promise<string>;
58
+ promptSendTransaction(txn: TransactionRequest, chaindId?: number, options?: ConnectOptions): Promise<string>;
59
+ promptConfirmWalletDeploy(chainId: number, options?: ConnectOptions): Promise<boolean>;
60
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/provider",
3
- "version": "0.35.12",
3
+ "version": "0.36.3",
4
4
  "description": "provider sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/provider",
6
6
  "source": "src/index.ts",
@@ -13,13 +13,13 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "@0xsequence/abi": "^0.35.12",
17
- "@0xsequence/auth": "^0.35.12",
18
- "@0xsequence/config": "^0.35.12",
19
- "@0xsequence/network": "^0.35.12",
20
- "@0xsequence/transactions": "^0.35.12",
21
- "@0xsequence/utils": "^0.35.12",
22
- "@0xsequence/wallet": "^0.35.12",
16
+ "@0xsequence/abi": "^0.36.3",
17
+ "@0xsequence/auth": "^0.36.3",
18
+ "@0xsequence/config": "^0.36.3",
19
+ "@0xsequence/network": "^0.36.3",
20
+ "@0xsequence/transactions": "^0.36.3",
21
+ "@0xsequence/utils": "^0.36.3",
22
+ "@0xsequence/wallet": "^0.36.3",
23
23
  "@ethersproject/abstract-signer": "^5.5.0",
24
24
  "@ethersproject/hash": "^5.5.0",
25
25
  "@ethersproject/providers": "^5.5.1",
@@ -313,7 +313,7 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
313
313
  } else {
314
314
  const promptResultForDeployment = await this.handleConfirmWalletDeployPrompt(this.prompter, signer, chainId)
315
315
  if (promptResultForDeployment) {
316
- sig = await this.prompter.promptSignMessage({ chainId: chainId, message: message })
316
+ sig = await this.prompter.promptSignMessage({ chainId: chainId, message: message }, this.connectOptions)
317
317
  }
318
318
  }
319
319
 
@@ -353,7 +353,7 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
353
353
  } else {
354
354
  const promptResultForDeployment = await this.handleConfirmWalletDeployPrompt(this.prompter, signer, chainId)
355
355
  if (promptResultForDeployment) {
356
- sig = await this.prompter.promptSignMessage({ chainId: chainId, typedData: typedData })
356
+ sig = await this.prompter.promptSignMessage({ chainId: chainId, typedData: typedData }, this.connectOptions)
357
357
  }
358
358
  }
359
359
 
@@ -377,7 +377,7 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
377
377
  txnHash = txnResponse.hash
378
378
  } else {
379
379
  // prompt user to provide the response
380
- txnHash = await this.prompter.promptSendTransaction(transactionParams, chainId)
380
+ txnHash = await this.prompter.promptSendTransaction(transactionParams, chainId, this.connectOptions)
381
381
  }
382
382
 
383
383
  if (txnHash) {
@@ -406,7 +406,7 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
406
406
  // we will want to resolveProperties the bignumber values to hex strings
407
407
  response.result = await signer.signTransactions(transaction, chainId)
408
408
  } else {
409
- response.result = await this.prompter.promptSignTransaction(transaction, chainId)
409
+ response.result = await this.prompter.promptSignTransaction(transaction, chainId, this.connectOptions)
410
410
  }
411
411
 
412
412
  break
@@ -762,7 +762,7 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
762
762
  if (isUpToDate) {
763
763
  return true
764
764
  }
765
- const promptResult = await prompter.promptConfirmWalletDeploy(chainId)
765
+ const promptResult = await prompter.promptConfirmWalletDeploy(chainId, this.connectOptions)
766
766
  // if client returned true, check again to make sure wallet is deployed and up to date
767
767
  if (promptResult) {
768
768
  const isPromptResultCorrect = await isWalletUpToDate(signer, chainId)
@@ -778,11 +778,11 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
778
778
  }
779
779
 
780
780
  export interface WalletUserPrompter {
781
- promptConfirmWalletDeploy(chainId: number): Promise<boolean>
782
781
  promptConnect(options?: ConnectOptions): Promise<PromptConnectDetails>
783
- promptSignMessage(message: MessageToSign): Promise<string>
784
- promptSignTransaction(txn: TransactionRequest, chaindId?: number): Promise<string>
785
- promptSendTransaction(txn: TransactionRequest, chaindId?: number): Promise<string>
782
+ promptSignMessage(message: MessageToSign, options?: ConnectOptions): Promise<string>
783
+ promptSignTransaction(txn: TransactionRequest, chaindId?: number, options?: ConnectOptions): Promise<string>
784
+ promptSendTransaction(txn: TransactionRequest, chaindId?: number, options?: ConnectOptions): Promise<string>
785
+ promptConfirmWalletDeploy(chainId: number, options?: ConnectOptions): Promise<boolean>
786
786
  }
787
787
 
788
788
  const permittedJsonRpcMethods = [