@0xsequence/provider 0.43.31 → 0.43.33
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/0xsequence-provider.cjs.dev.js +3 -0
- package/dist/0xsequence-provider.cjs.prod.js +3 -0
- package/dist/0xsequence-provider.esm.js +3 -0
- package/dist/declarations/src/transports/wallet-request-handler.d.ts +1 -0
- package/package.json +9 -9
- package/src/transports/wallet-request-handler.ts +4 -0
|
@@ -451,6 +451,7 @@ class WalletRequestHandler {
|
|
|
451
451
|
this._defaultNetworkId = void 0;
|
|
452
452
|
this._chainId = void 0;
|
|
453
453
|
this.events = new eventemitter2.EventEmitter2();
|
|
454
|
+
this.onConnectOptionsChange = undefined;
|
|
454
455
|
this.promptConnect = async function (options) {
|
|
455
456
|
if (!options && !_this._connectOptions) {
|
|
456
457
|
// this is an unexpected state and should not happen
|
|
@@ -1029,7 +1030,9 @@ class WalletRequestHandler {
|
|
|
1029
1030
|
return this._connectOptions;
|
|
1030
1031
|
}
|
|
1031
1032
|
setConnectOptions(options) {
|
|
1033
|
+
var _this$onConnectOption;
|
|
1032
1034
|
this._connectOptions = options;
|
|
1035
|
+
(_this$onConnectOption = this.onConnectOptionsChange) == null ? void 0 : _this$onConnectOption.call(this, options);
|
|
1033
1036
|
}
|
|
1034
1037
|
get defaultNetworkId() {
|
|
1035
1038
|
return this._defaultNetworkId;
|
|
@@ -451,6 +451,7 @@ class WalletRequestHandler {
|
|
|
451
451
|
this._defaultNetworkId = void 0;
|
|
452
452
|
this._chainId = void 0;
|
|
453
453
|
this.events = new eventemitter2.EventEmitter2();
|
|
454
|
+
this.onConnectOptionsChange = undefined;
|
|
454
455
|
this.promptConnect = async function (options) {
|
|
455
456
|
if (!options && !_this._connectOptions) {
|
|
456
457
|
// this is an unexpected state and should not happen
|
|
@@ -1029,7 +1030,9 @@ class WalletRequestHandler {
|
|
|
1029
1030
|
return this._connectOptions;
|
|
1030
1031
|
}
|
|
1031
1032
|
setConnectOptions(options) {
|
|
1033
|
+
var _this$onConnectOption;
|
|
1032
1034
|
this._connectOptions = options;
|
|
1035
|
+
(_this$onConnectOption = this.onConnectOptionsChange) == null ? void 0 : _this$onConnectOption.call(this, options);
|
|
1033
1036
|
}
|
|
1034
1037
|
get defaultNetworkId() {
|
|
1035
1038
|
return this._defaultNetworkId;
|
|
@@ -447,6 +447,7 @@ class WalletRequestHandler {
|
|
|
447
447
|
this._defaultNetworkId = void 0;
|
|
448
448
|
this._chainId = void 0;
|
|
449
449
|
this.events = new EventEmitter2();
|
|
450
|
+
this.onConnectOptionsChange = undefined;
|
|
450
451
|
this.promptConnect = async function (options) {
|
|
451
452
|
if (!options && !_this._connectOptions) {
|
|
452
453
|
// this is an unexpected state and should not happen
|
|
@@ -1025,7 +1026,9 @@ class WalletRequestHandler {
|
|
|
1025
1026
|
return this._connectOptions;
|
|
1026
1027
|
}
|
|
1027
1028
|
setConnectOptions(options) {
|
|
1029
|
+
var _this$onConnectOption;
|
|
1028
1030
|
this._connectOptions = options;
|
|
1031
|
+
(_this$onConnectOption = this.onConnectOptionsChange) == null ? void 0 : _this$onConnectOption.call(this, options);
|
|
1029
1032
|
}
|
|
1030
1033
|
get defaultNetworkId() {
|
|
1031
1034
|
return this._defaultNetworkId;
|
|
@@ -21,6 +21,7 @@ export declare class WalletRequestHandler implements ExternalProvider, JsonRpcHa
|
|
|
21
21
|
private _defaultNetworkId?;
|
|
22
22
|
private _chainId?;
|
|
23
23
|
private events;
|
|
24
|
+
onConnectOptionsChange: ((connectOptions: ConnectOptions | undefined) => void) | undefined;
|
|
24
25
|
constructor(signer: Signer | null | undefined, prompter: WalletUserPrompter | null, mainnetNetworks: NetworkConfig[], testnetNetworks?: NetworkConfig[]);
|
|
25
26
|
signIn(signer: Signer | null, options?: WalletSignInOptions): Promise<void>;
|
|
26
27
|
signOut(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/provider",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.33",
|
|
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",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"author": "Horizon Blockchain Games",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@0xsequence/abi": "^0.43.
|
|
13
|
-
"@0xsequence/auth": "^0.43.
|
|
14
|
-
"@0xsequence/config": "^0.43.
|
|
15
|
-
"@0xsequence/network": "^0.43.
|
|
16
|
-
"@0xsequence/relayer": "^0.43.
|
|
17
|
-
"@0xsequence/transactions": "^0.43.
|
|
18
|
-
"@0xsequence/utils": "^0.43.
|
|
19
|
-
"@0xsequence/wallet": "^0.43.
|
|
12
|
+
"@0xsequence/abi": "^0.43.33",
|
|
13
|
+
"@0xsequence/auth": "^0.43.33",
|
|
14
|
+
"@0xsequence/config": "^0.43.33",
|
|
15
|
+
"@0xsequence/network": "^0.43.33",
|
|
16
|
+
"@0xsequence/relayer": "^0.43.33",
|
|
17
|
+
"@0xsequence/transactions": "^0.43.33",
|
|
18
|
+
"@0xsequence/utils": "^0.43.33",
|
|
19
|
+
"@0xsequence/wallet": "^0.43.33",
|
|
20
20
|
"eventemitter2": "^6.4.5",
|
|
21
21
|
"webextension-polyfill": "^0.10.0"
|
|
22
22
|
},
|
|
@@ -55,6 +55,8 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
|
|
|
55
55
|
|
|
56
56
|
private events: TypedEventEmitter<ProviderEventTypes> = new EventEmitter() as TypedEventEmitter<ProviderEventTypes>
|
|
57
57
|
|
|
58
|
+
onConnectOptionsChange: ((connectOptions: ConnectOptions | undefined) => void) | undefined = undefined
|
|
59
|
+
|
|
58
60
|
constructor(
|
|
59
61
|
signer: Signer | null | undefined,
|
|
60
62
|
prompter: WalletUserPrompter | null,
|
|
@@ -664,6 +666,8 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
|
|
|
664
666
|
|
|
665
667
|
setConnectOptions(options: ConnectOptions | undefined) {
|
|
666
668
|
this._connectOptions = options
|
|
669
|
+
|
|
670
|
+
this.onConnectOptionsChange?.(options)
|
|
667
671
|
}
|
|
668
672
|
|
|
669
673
|
get defaultNetworkId(): string | number | undefined {
|