@0xsequence/provider 0.35.11 → 0.36.2
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 -3
- package/dist/0xsequence-provider.cjs.prod.js +3 -3
- package/dist/0xsequence-provider.esm.js +3 -3
- package/dist/declarations/src/{commands → utils}/index.d.ts +1 -1
- package/dist/declarations/src/wallet.d.ts +3 -3
- package/package.json +8 -8
- package/src/{commands → utils}/index.ts +1 -1
- package/src/wallet.ts +4 -4
|
@@ -3071,7 +3071,7 @@ class BaseInjectedTransport extends eventemitter2.EventEmitter2 {
|
|
|
3071
3071
|
|
|
3072
3072
|
}
|
|
3073
3073
|
|
|
3074
|
-
class
|
|
3074
|
+
class WalletUtils {
|
|
3075
3075
|
constructor(walletProvider) {
|
|
3076
3076
|
var _this = this;
|
|
3077
3077
|
|
|
@@ -3165,7 +3165,7 @@ class Wallet {
|
|
|
3165
3165
|
constructor(defaultNetworkId, config) {
|
|
3166
3166
|
var _this = this;
|
|
3167
3167
|
|
|
3168
|
-
this.
|
|
3168
|
+
this.utils = void 0;
|
|
3169
3169
|
this.config = void 0;
|
|
3170
3170
|
this.session = void 0;
|
|
3171
3171
|
this.connectedSites = void 0;
|
|
@@ -3491,7 +3491,7 @@ class Wallet {
|
|
|
3491
3491
|
this.networks = [];
|
|
3492
3492
|
this.providers = {};
|
|
3493
3493
|
this.connectedSites = new LocalStore('@sequence.connectedSites', []);
|
|
3494
|
-
this.
|
|
3494
|
+
this.utils = new WalletUtils(this);
|
|
3495
3495
|
this.init();
|
|
3496
3496
|
}
|
|
3497
3497
|
|
|
@@ -3071,7 +3071,7 @@ class BaseInjectedTransport extends eventemitter2.EventEmitter2 {
|
|
|
3071
3071
|
|
|
3072
3072
|
}
|
|
3073
3073
|
|
|
3074
|
-
class
|
|
3074
|
+
class WalletUtils {
|
|
3075
3075
|
constructor(walletProvider) {
|
|
3076
3076
|
var _this = this;
|
|
3077
3077
|
|
|
@@ -3165,7 +3165,7 @@ class Wallet {
|
|
|
3165
3165
|
constructor(defaultNetworkId, config) {
|
|
3166
3166
|
var _this = this;
|
|
3167
3167
|
|
|
3168
|
-
this.
|
|
3168
|
+
this.utils = void 0;
|
|
3169
3169
|
this.config = void 0;
|
|
3170
3170
|
this.session = void 0;
|
|
3171
3171
|
this.connectedSites = void 0;
|
|
@@ -3491,7 +3491,7 @@ class Wallet {
|
|
|
3491
3491
|
this.networks = [];
|
|
3492
3492
|
this.providers = {};
|
|
3493
3493
|
this.connectedSites = new LocalStore('@sequence.connectedSites', []);
|
|
3494
|
-
this.
|
|
3494
|
+
this.utils = new WalletUtils(this);
|
|
3495
3495
|
this.init();
|
|
3496
3496
|
}
|
|
3497
3497
|
|
|
@@ -3067,7 +3067,7 @@ class BaseInjectedTransport extends EventEmitter2 {
|
|
|
3067
3067
|
|
|
3068
3068
|
}
|
|
3069
3069
|
|
|
3070
|
-
class
|
|
3070
|
+
class WalletUtils {
|
|
3071
3071
|
constructor(walletProvider) {
|
|
3072
3072
|
var _this = this;
|
|
3073
3073
|
|
|
@@ -3161,7 +3161,7 @@ class Wallet {
|
|
|
3161
3161
|
constructor(defaultNetworkId, config) {
|
|
3162
3162
|
var _this = this;
|
|
3163
3163
|
|
|
3164
|
-
this.
|
|
3164
|
+
this.utils = void 0;
|
|
3165
3165
|
this.config = void 0;
|
|
3166
3166
|
this.session = void 0;
|
|
3167
3167
|
this.connectedSites = void 0;
|
|
@@ -3487,7 +3487,7 @@ class Wallet {
|
|
|
3487
3487
|
this.networks = [];
|
|
3488
3488
|
this.providers = {};
|
|
3489
3489
|
this.connectedSites = new LocalStore('@sequence.connectedSites', []);
|
|
3490
|
-
this.
|
|
3490
|
+
this.utils = new WalletUtils(this);
|
|
3491
3491
|
this.init();
|
|
3492
3492
|
}
|
|
3493
3493
|
|
|
@@ -4,7 +4,7 @@ import { WalletContext, ChainIdLike } from '@0xsequence/network';
|
|
|
4
4
|
import { TypedData } from '@0xsequence/utils';
|
|
5
5
|
import { DecodedSignature, WalletConfig } from '@0xsequence/config';
|
|
6
6
|
import { Wallet } from '../wallet';
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class WalletUtils {
|
|
8
8
|
private wallet;
|
|
9
9
|
constructor(walletProvider: Wallet);
|
|
10
10
|
signMessage(message: BytesLike, chainId?: ChainIdLike, allSigners?: boolean): Promise<string>;
|
|
@@ -3,7 +3,7 @@ import { WalletConfig, WalletState } from '@0xsequence/config';
|
|
|
3
3
|
import { Web3Provider, Web3Signer } from './provider';
|
|
4
4
|
import { ProxyMessageChannelPort } from './transports';
|
|
5
5
|
import { WalletSession, ProviderEventTypes, ConnectOptions, OpenWalletIntent, ConnectDetails } from './types';
|
|
6
|
-
import {
|
|
6
|
+
import { WalletUtils } from './utils/index';
|
|
7
7
|
import { Runtime } from 'webextension-polyfill-ts';
|
|
8
8
|
export interface WalletProvider {
|
|
9
9
|
connect(options?: ConnectOptions): Promise<ConnectDetails>;
|
|
@@ -26,10 +26,10 @@ export interface WalletProvider {
|
|
|
26
26
|
getProviderConfig(): ProviderConfig;
|
|
27
27
|
on<K extends keyof ProviderEventTypes>(event: K, fn: ProviderEventTypes[K]): void;
|
|
28
28
|
once<K extends keyof ProviderEventTypes>(event: K, fn: ProviderEventTypes[K]): void;
|
|
29
|
-
|
|
29
|
+
utils: WalletUtils;
|
|
30
30
|
}
|
|
31
31
|
export declare class Wallet implements WalletProvider {
|
|
32
|
-
|
|
32
|
+
utils: WalletUtils;
|
|
33
33
|
private config;
|
|
34
34
|
private session?;
|
|
35
35
|
private connectedSites;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.2",
|
|
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.
|
|
17
|
-
"@0xsequence/auth": "^0.
|
|
18
|
-
"@0xsequence/config": "^0.
|
|
19
|
-
"@0xsequence/network": "^0.
|
|
20
|
-
"@0xsequence/transactions": "^0.
|
|
21
|
-
"@0xsequence/utils": "^0.
|
|
22
|
-
"@0xsequence/wallet": "^0.
|
|
16
|
+
"@0xsequence/abi": "^0.36.2",
|
|
17
|
+
"@0xsequence/auth": "^0.36.2",
|
|
18
|
+
"@0xsequence/config": "^0.36.2",
|
|
19
|
+
"@0xsequence/network": "^0.36.2",
|
|
20
|
+
"@0xsequence/transactions": "^0.36.2",
|
|
21
|
+
"@0xsequence/utils": "^0.36.2",
|
|
22
|
+
"@0xsequence/wallet": "^0.36.2",
|
|
23
23
|
"@ethersproject/abstract-signer": "^5.5.0",
|
|
24
24
|
"@ethersproject/hash": "^5.5.0",
|
|
25
25
|
"@ethersproject/providers": "^5.5.1",
|
|
@@ -7,7 +7,7 @@ import { Wallet } from '../wallet'
|
|
|
7
7
|
import { isValidSignature, recoverWalletConfig } from '../utils'
|
|
8
8
|
import { isValidEIP712Signature, isValidEthSignSignature } from '@0xsequence/wallet'
|
|
9
9
|
|
|
10
|
-
export class
|
|
10
|
+
export class WalletUtils {
|
|
11
11
|
private wallet: Wallet
|
|
12
12
|
|
|
13
13
|
constructor(walletProvider: Wallet) {
|
package/src/wallet.ts
CHANGED
|
@@ -31,10 +31,10 @@ import { JsonRpcProvider, JsonRpcSigner, ExternalProvider } from '@ethersproject
|
|
|
31
31
|
import { Web3Provider, Web3Signer } from './provider'
|
|
32
32
|
import { MuxMessageProvider, WindowMessageProvider, ProxyMessageProvider, ProxyMessageChannelPort } from './transports'
|
|
33
33
|
import { WalletSession, ProviderEventTypes, ConnectOptions, OpenWalletIntent, ConnectDetails } from './types'
|
|
34
|
-
import { WalletCommands } from './commands'
|
|
35
34
|
import { ethers } from 'ethers'
|
|
36
35
|
import { ExtensionMessageProvider } from './transports/extension-transport/extension-message-provider'
|
|
37
36
|
import { LocalStore } from './utils'
|
|
37
|
+
import { WalletUtils } from './utils/index'
|
|
38
38
|
|
|
39
39
|
import { Runtime } from 'webextension-polyfill-ts'
|
|
40
40
|
|
|
@@ -68,11 +68,11 @@ export interface WalletProvider {
|
|
|
68
68
|
on<K extends keyof ProviderEventTypes>(event: K, fn: ProviderEventTypes[K]): void
|
|
69
69
|
once<K extends keyof ProviderEventTypes>(event: K, fn: ProviderEventTypes[K]): void
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
utils: WalletUtils
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
export class Wallet implements WalletProvider {
|
|
75
|
-
public
|
|
75
|
+
public utils: WalletUtils
|
|
76
76
|
|
|
77
77
|
private config: ProviderConfig
|
|
78
78
|
private session?: WalletSession
|
|
@@ -116,7 +116,7 @@ export class Wallet implements WalletProvider {
|
|
|
116
116
|
this.networks = []
|
|
117
117
|
this.providers = {}
|
|
118
118
|
this.connectedSites = new LocalStore('@sequence.connectedSites', [])
|
|
119
|
-
this.
|
|
119
|
+
this.utils = new WalletUtils(this)
|
|
120
120
|
this.init()
|
|
121
121
|
}
|
|
122
122
|
|