@dodoex/wallet-web3 0.0.14-4 → 0.0.14-6
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/{blocto-48fd837c.js → blocto-80198dc9.js} +1 -1
- package/dist/cjs/{blocto-abb69bc3.cjs → blocto-f202a2fe.cjs} +1 -1
- package/dist/cjs/{index-d568868e.cjs → index-1fe8bcc1.cjs} +1 -1
- package/dist/cjs/index-30805908.cjs +1 -0
- package/dist/cjs/{index-c8259a69.cjs → index-d0ac9ac8.cjs} +1 -1
- package/dist/cjs/index-f7c4083b.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{portis-6d50e3f8.cjs → portis-645a3f2b.cjs} +1 -1
- package/dist/cjs/{provider-4731d6c3.cjs → provider-48ef62d1.cjs} +1 -1
- package/dist/cjs/providers/connector/index.d.ts +133 -1
- package/dist/cjs/providers/connector/uniPass/index.d.ts +138 -0
- package/dist/cjs/providers/connector/uniPass/provider.d.ts +137 -0
- package/dist/cjs/providers/connector/uniPass/signer.d.ts +21 -0
- package/dist/cjs/providers/connector/uniPass/utils.d.ts +25 -0
- package/dist/cjs/providers/wallets/types.d.ts +4 -5
- package/dist/cjs/{rainbow-89b50205.cjs → rainbow-e59bb39e.cjs} +1 -1
- package/dist/cjs/{uAuth-38778f12.cjs → uAuth-ab53c809.cjs} +1 -1
- package/dist/cjs/{walletConnect-438a80cd.cjs → walletConnect-548c8c20.cjs} +1 -1
- package/dist/cjs/{walletLink-41fbdfe1.cjs → walletLink-0d3cc02d.cjs} +1 -1
- package/dist/index-0595c618.js +1 -0
- package/dist/{index-fe209266.js → index-09de624a.js} +1 -1
- package/dist/{index-2266c7f0.js → index-5fc2c391.js} +1 -1
- package/dist/index-d1bb12dc.js +1 -0
- package/dist/index.js +1 -1
- package/dist/{portis-fea95dcc.js → portis-66c1638c.js} +1 -1
- package/dist/{provider-084f3dcf.js → provider-3f4451a0.js} +1 -1
- package/dist/providers/connector/index.d.ts +133 -1
- package/dist/providers/connector/uniPass/index.d.ts +138 -0
- package/dist/providers/connector/uniPass/provider.d.ts +137 -0
- package/dist/providers/connector/uniPass/signer.d.ts +21 -0
- package/dist/providers/connector/uniPass/utils.d.ts +25 -0
- package/dist/providers/wallets/types.d.ts +4 -5
- package/dist/{rainbow-49516479.js → rainbow-8baa949f.js} +1 -1
- package/dist/{uAuth-265e0fea.js → uAuth-5b2ff9a0.js} +1 -1
- package/dist/{walletConnect-3e2e20c6.js → walletConnect-e2b237a8.js} +1 -1
- package/dist/{walletLink-b287dd39.js → walletLink-bf385d3e.js} +1 -1
- package/package.json +3 -2
- package/dist/cjs/index-25a12173.cjs +0 -1
- package/dist/cjs/providers/connector/uniPass.d.ts +0 -5
- package/dist/cjs/uniPass-9da1feeb.cjs +0 -1
- package/dist/index-89f397f8.js +0 -1
- package/dist/providers/connector/uniPass.d.ts +0 -5
- package/dist/uniPass-8c99c4fa.js +0 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ConnectEvents } from '../../wallets/types';
|
|
3
|
+
import { ConnectorParams } from '../types';
|
|
4
|
+
export { createProvider } from './provider';
|
|
5
|
+
export default function connector(params: ConnectorParams, events: ConnectEvents): Promise<{
|
|
6
|
+
readonly upWallet: import("@unipasswallet/popup-sdk").UniPassPopupSDK;
|
|
7
|
+
getSigner(): import("@ethersproject/providers").JsonRpcSigner;
|
|
8
|
+
connect(): Promise<import("@unipasswallet/popup-types").UPAccount>;
|
|
9
|
+
disconnect(): Promise<void>;
|
|
10
|
+
listAccounts(): Promise<string[]>;
|
|
11
|
+
getAddress(): Promise<string | null>;
|
|
12
|
+
readonly connection: import("@ethersproject/web").ConnectionInfo;
|
|
13
|
+
_pendingFilter: Promise<number>;
|
|
14
|
+
_nextId: number;
|
|
15
|
+
_eventLoopCache: Record<string, Promise<any>>;
|
|
16
|
+
readonly _cache: Record<string, Promise<any>>;
|
|
17
|
+
detectNetwork(): Promise<import("@ethersproject/networks").Network>;
|
|
18
|
+
_uncachedDetectNetwork(): Promise<import("@ethersproject/networks").Network>;
|
|
19
|
+
getUncheckedSigner(addressOrIndex?: string | number | undefined): {
|
|
20
|
+
sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
21
|
+
readonly provider: import("@ethersproject/providers").JsonRpcProvider;
|
|
22
|
+
_index: number;
|
|
23
|
+
_address: string;
|
|
24
|
+
connect(provider: import("@ethersproject/abstract-provider").Provider): import("@ethersproject/providers").JsonRpcSigner;
|
|
25
|
+
connectUnchecked(): import("@ethersproject/providers").JsonRpcSigner;
|
|
26
|
+
getAddress(): Promise<string>;
|
|
27
|
+
sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<string>;
|
|
28
|
+
signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<string>;
|
|
29
|
+
signMessage(message: string | import("ethers").Bytes): Promise<string>;
|
|
30
|
+
_legacySignMessage(message: string | import("ethers").Bytes): Promise<string>;
|
|
31
|
+
_signTypedData(domain: import("ethers").TypedDataDomain, types: Record<string, import("ethers").TypedDataField[]>, value: Record<string, any>): Promise<string>;
|
|
32
|
+
unlock(password: string): Promise<boolean>;
|
|
33
|
+
readonly _isSigner: boolean;
|
|
34
|
+
getBalance(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<import("ethers").BigNumber>;
|
|
35
|
+
getTransactionCount(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<number>;
|
|
36
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").BigNumber>;
|
|
37
|
+
call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<string>;
|
|
38
|
+
getChainId(): Promise<number>;
|
|
39
|
+
getGasPrice(): Promise<import("ethers").BigNumber>;
|
|
40
|
+
getFeeData(): Promise<import("@ethersproject/abstract-provider").FeeData>;
|
|
41
|
+
resolveName(name: string): Promise<string>;
|
|
42
|
+
checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>;
|
|
43
|
+
populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("@ethersproject/abstract-provider").TransactionRequest>;
|
|
44
|
+
_checkProvider(operation?: string | undefined): void;
|
|
45
|
+
};
|
|
46
|
+
send(method: string, params: any[]): Promise<any>;
|
|
47
|
+
prepareRequest(method: string, params: any): [string, any[]];
|
|
48
|
+
perform(method: string, params: any): Promise<any>;
|
|
49
|
+
_startEvent(event: import("@ethersproject/providers/lib/base-provider").Event): void;
|
|
50
|
+
_startPending(): void;
|
|
51
|
+
_stopEvent(event: import("@ethersproject/providers/lib/base-provider").Event): void;
|
|
52
|
+
_networkPromise: Promise<import("@ethersproject/networks").Network>;
|
|
53
|
+
_network: import("@ethersproject/networks").Network;
|
|
54
|
+
_events: import("@ethersproject/providers/lib/base-provider").Event[];
|
|
55
|
+
formatter: import("@ethersproject/providers").Formatter;
|
|
56
|
+
_emitted: {
|
|
57
|
+
[eventName: string]: number | "pending";
|
|
58
|
+
};
|
|
59
|
+
_pollingInterval: number;
|
|
60
|
+
_poller: NodeJS.Timer;
|
|
61
|
+
_bootstrapPoll: NodeJS.Timer;
|
|
62
|
+
_lastBlockNumber: number;
|
|
63
|
+
_maxFilterBlockRange: number;
|
|
64
|
+
_fastBlockNumber: number;
|
|
65
|
+
_fastBlockNumberPromise: Promise<number>;
|
|
66
|
+
_fastQueryDate: number;
|
|
67
|
+
_maxInternalBlockNumber: number;
|
|
68
|
+
_internalBlockNumber: Promise<{
|
|
69
|
+
blockNumber: number;
|
|
70
|
+
reqTime: number;
|
|
71
|
+
respTime: number;
|
|
72
|
+
}>;
|
|
73
|
+
readonly anyNetwork: boolean;
|
|
74
|
+
disableCcipRead: boolean;
|
|
75
|
+
_ready(): Promise<import("@ethersproject/networks").Network>;
|
|
76
|
+
readonly ready: Promise<import("@ethersproject/networks").Network>;
|
|
77
|
+
ccipReadFetch(tx: import("ethers").Transaction, calldata: string, urls: string[]): Promise<string | null>;
|
|
78
|
+
_getInternalBlockNumber(maxAge: number): Promise<number>;
|
|
79
|
+
poll(): Promise<void>;
|
|
80
|
+
resetEventsBlock(blockNumber: number): void;
|
|
81
|
+
readonly network: import("@ethersproject/networks").Network;
|
|
82
|
+
getNetwork(): Promise<import("@ethersproject/networks").Network>;
|
|
83
|
+
readonly blockNumber: number;
|
|
84
|
+
polling: boolean;
|
|
85
|
+
pollingInterval: number;
|
|
86
|
+
_getFastBlockNumber(): Promise<number>;
|
|
87
|
+
_setFastBlockNumber(blockNumber: number): void;
|
|
88
|
+
waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
89
|
+
_waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
|
|
90
|
+
data: string;
|
|
91
|
+
from: string;
|
|
92
|
+
nonce: number;
|
|
93
|
+
to: string;
|
|
94
|
+
value: import("ethers").BigNumber;
|
|
95
|
+
startBlock: number;
|
|
96
|
+
}): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
97
|
+
getBlockNumber(): Promise<number>;
|
|
98
|
+
getGasPrice(): Promise<import("ethers").BigNumber>;
|
|
99
|
+
getBalance(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<import("ethers").BigNumber>;
|
|
100
|
+
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<number>;
|
|
101
|
+
getCode(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
102
|
+
getStorageAt(addressOrName: string | Promise<string>, position: import("ethers").BigNumberish | Promise<import("ethers").BigNumberish>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
103
|
+
_wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("@ethersproject/abstract-provider").TransactionResponse;
|
|
104
|
+
sendTransaction(signedTransaction: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
105
|
+
_getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").Transaction>;
|
|
106
|
+
_getFilter(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>;
|
|
107
|
+
_call(transaction: import("@ethersproject/abstract-provider").TransactionRequest, blockTag: import("@ethersproject/abstract-provider").BlockTag, attempt: number): Promise<string>;
|
|
108
|
+
call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
109
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").BigNumber>;
|
|
110
|
+
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
111
|
+
_getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("@ethersproject/abstract-provider").Block | import("@ethersproject/abstract-provider").BlockWithTransactions>;
|
|
112
|
+
getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").Block>;
|
|
113
|
+
getBlockWithTransactions(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").BlockWithTransactions>;
|
|
114
|
+
getTransaction(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
115
|
+
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
116
|
+
getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Log[]>;
|
|
117
|
+
getEtherPrice(): Promise<number>;
|
|
118
|
+
_getBlockTag(blockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").BlockTag>;
|
|
119
|
+
getResolver(name: string): Promise<import("@ethersproject/providers").Resolver | null>;
|
|
120
|
+
_getResolver(name: string, operation?: string | undefined): Promise<string>;
|
|
121
|
+
resolveName(name: string | Promise<string>): Promise<string | null>;
|
|
122
|
+
lookupAddress(address: string | Promise<string>): Promise<string | null>;
|
|
123
|
+
getAvatar(nameOrAddress: string): Promise<string | null>;
|
|
124
|
+
_addEventListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener, once: boolean): any;
|
|
125
|
+
on(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
|
|
126
|
+
once(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
|
|
127
|
+
emit(eventName: import("@ethersproject/abstract-provider").EventType, ...args: any[]): boolean;
|
|
128
|
+
listenerCount(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): number;
|
|
129
|
+
listeners(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): import("@ethersproject/abstract-provider").Listener[];
|
|
130
|
+
off(eventName: import("@ethersproject/abstract-provider").EventType, listener?: import("@ethersproject/abstract-provider").Listener | undefined): any;
|
|
131
|
+
removeAllListeners(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): any;
|
|
132
|
+
getFeeData(): Promise<import("@ethersproject/abstract-provider").FeeData>;
|
|
133
|
+
addListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
|
|
134
|
+
removeListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
|
|
135
|
+
readonly _isProvider: boolean;
|
|
136
|
+
}>;
|
|
137
|
+
export declare function disconnectWallet(): void;
|
|
138
|
+
export declare function signTypedData(data: any): Promise<string>;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ConnectorParams } from '../types';
|
|
3
|
+
import { JsonRpcProvider, JsonRpcSigner } from '@ethersproject/providers';
|
|
4
|
+
import { UniPassPopupSDK } from '@unipasswallet/popup-sdk';
|
|
5
|
+
export declare function createProvider(connectorParams: ConnectorParams): Promise<{
|
|
6
|
+
readonly upWallet: UniPassPopupSDK;
|
|
7
|
+
getSigner(): JsonRpcSigner;
|
|
8
|
+
connect(): Promise<import("@unipasswallet/popup-types").UPAccount>;
|
|
9
|
+
disconnect(): Promise<void>;
|
|
10
|
+
listAccounts(): Promise<string[]>;
|
|
11
|
+
getAddress(): Promise<string | null>;
|
|
12
|
+
readonly connection: import("@ethersproject/web").ConnectionInfo;
|
|
13
|
+
_pendingFilter: Promise<number>;
|
|
14
|
+
_nextId: number;
|
|
15
|
+
_eventLoopCache: Record<string, Promise<any>>;
|
|
16
|
+
readonly _cache: Record<string, Promise<any>>;
|
|
17
|
+
detectNetwork(): Promise<import("@ethersproject/providers").Network>;
|
|
18
|
+
_uncachedDetectNetwork(): Promise<import("@ethersproject/providers").Network>;
|
|
19
|
+
getUncheckedSigner(addressOrIndex?: string | number | undefined): {
|
|
20
|
+
sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
21
|
+
readonly provider: JsonRpcProvider;
|
|
22
|
+
_index: number;
|
|
23
|
+
_address: string;
|
|
24
|
+
connect(provider: import("@ethersproject/abstract-provider").Provider): JsonRpcSigner;
|
|
25
|
+
connectUnchecked(): JsonRpcSigner;
|
|
26
|
+
getAddress(): Promise<string>;
|
|
27
|
+
sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<string>;
|
|
28
|
+
signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<string>;
|
|
29
|
+
signMessage(message: string | import("ethers").Bytes): Promise<string>;
|
|
30
|
+
_legacySignMessage(message: string | import("ethers").Bytes): Promise<string>;
|
|
31
|
+
_signTypedData(domain: import("ethers").TypedDataDomain, types: Record<string, import("ethers").TypedDataField[]>, value: Record<string, any>): Promise<string>;
|
|
32
|
+
unlock(password: string): Promise<boolean>;
|
|
33
|
+
readonly _isSigner: boolean;
|
|
34
|
+
getBalance(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<import("ethers").BigNumber>;
|
|
35
|
+
getTransactionCount(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<number>;
|
|
36
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").BigNumber>;
|
|
37
|
+
call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<string>;
|
|
38
|
+
getChainId(): Promise<number>;
|
|
39
|
+
getGasPrice(): Promise<import("ethers").BigNumber>;
|
|
40
|
+
getFeeData(): Promise<import("@ethersproject/abstract-provider").FeeData>;
|
|
41
|
+
resolveName(name: string): Promise<string>;
|
|
42
|
+
checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>;
|
|
43
|
+
populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("@ethersproject/abstract-provider").TransactionRequest>;
|
|
44
|
+
_checkProvider(operation?: string | undefined): void;
|
|
45
|
+
};
|
|
46
|
+
send(method: string, params: any[]): Promise<any>;
|
|
47
|
+
prepareRequest(method: string, params: any): [string, any[]];
|
|
48
|
+
perform(method: string, params: any): Promise<any>;
|
|
49
|
+
_startEvent(event: import("@ethersproject/providers/lib/base-provider").Event): void;
|
|
50
|
+
_startPending(): void;
|
|
51
|
+
_stopEvent(event: import("@ethersproject/providers/lib/base-provider").Event): void;
|
|
52
|
+
_networkPromise: Promise<import("@ethersproject/providers").Network>;
|
|
53
|
+
_network: import("@ethersproject/providers").Network;
|
|
54
|
+
_events: import("@ethersproject/providers/lib/base-provider").Event[];
|
|
55
|
+
formatter: import("@ethersproject/providers").Formatter;
|
|
56
|
+
_emitted: {
|
|
57
|
+
[eventName: string]: number | "pending";
|
|
58
|
+
};
|
|
59
|
+
_pollingInterval: number;
|
|
60
|
+
_poller: NodeJS.Timer;
|
|
61
|
+
_bootstrapPoll: NodeJS.Timer;
|
|
62
|
+
_lastBlockNumber: number;
|
|
63
|
+
_maxFilterBlockRange: number;
|
|
64
|
+
_fastBlockNumber: number;
|
|
65
|
+
_fastBlockNumberPromise: Promise<number>;
|
|
66
|
+
_fastQueryDate: number;
|
|
67
|
+
_maxInternalBlockNumber: number;
|
|
68
|
+
_internalBlockNumber: Promise<{
|
|
69
|
+
blockNumber: number;
|
|
70
|
+
reqTime: number;
|
|
71
|
+
respTime: number;
|
|
72
|
+
}>;
|
|
73
|
+
readonly anyNetwork: boolean;
|
|
74
|
+
disableCcipRead: boolean;
|
|
75
|
+
_ready(): Promise<import("@ethersproject/providers").Network>;
|
|
76
|
+
readonly ready: Promise<import("@ethersproject/providers").Network>;
|
|
77
|
+
ccipReadFetch(tx: import("ethers").Transaction, calldata: string, urls: string[]): Promise<string | null>;
|
|
78
|
+
_getInternalBlockNumber(maxAge: number): Promise<number>;
|
|
79
|
+
poll(): Promise<void>;
|
|
80
|
+
resetEventsBlock(blockNumber: number): void;
|
|
81
|
+
readonly network: import("@ethersproject/providers").Network;
|
|
82
|
+
getNetwork(): Promise<import("@ethersproject/providers").Network>;
|
|
83
|
+
readonly blockNumber: number;
|
|
84
|
+
polling: boolean;
|
|
85
|
+
pollingInterval: number;
|
|
86
|
+
_getFastBlockNumber(): Promise<number>;
|
|
87
|
+
_setFastBlockNumber(blockNumber: number): void;
|
|
88
|
+
waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
89
|
+
_waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
|
|
90
|
+
data: string;
|
|
91
|
+
from: string;
|
|
92
|
+
nonce: number;
|
|
93
|
+
to: string;
|
|
94
|
+
value: import("ethers").BigNumber;
|
|
95
|
+
startBlock: number;
|
|
96
|
+
}): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
97
|
+
getBlockNumber(): Promise<number>;
|
|
98
|
+
getGasPrice(): Promise<import("ethers").BigNumber>;
|
|
99
|
+
getBalance(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<import("ethers").BigNumber>;
|
|
100
|
+
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<number>;
|
|
101
|
+
getCode(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
102
|
+
getStorageAt(addressOrName: string | Promise<string>, position: import("ethers").BigNumberish | Promise<import("ethers").BigNumberish>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
103
|
+
_wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("@ethersproject/abstract-provider").TransactionResponse;
|
|
104
|
+
sendTransaction(signedTransaction: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
105
|
+
_getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").Transaction>;
|
|
106
|
+
_getFilter(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>;
|
|
107
|
+
_call(transaction: import("@ethersproject/abstract-provider").TransactionRequest, blockTag: import("@ethersproject/abstract-provider").BlockTag, attempt: number): Promise<string>;
|
|
108
|
+
call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
109
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").BigNumber>;
|
|
110
|
+
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
111
|
+
_getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("@ethersproject/abstract-provider").Block | import("@ethersproject/abstract-provider").BlockWithTransactions>;
|
|
112
|
+
getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").Block>;
|
|
113
|
+
getBlockWithTransactions(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").BlockWithTransactions>;
|
|
114
|
+
getTransaction(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
115
|
+
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
116
|
+
getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Log[]>;
|
|
117
|
+
getEtherPrice(): Promise<number>;
|
|
118
|
+
_getBlockTag(blockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").BlockTag>;
|
|
119
|
+
getResolver(name: string): Promise<import("@ethersproject/providers").Resolver | null>;
|
|
120
|
+
_getResolver(name: string, operation?: string | undefined): Promise<string>;
|
|
121
|
+
resolveName(name: string | Promise<string>): Promise<string | null>;
|
|
122
|
+
lookupAddress(address: string | Promise<string>): Promise<string | null>;
|
|
123
|
+
getAvatar(nameOrAddress: string): Promise<string | null>;
|
|
124
|
+
_addEventListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener, once: boolean): any;
|
|
125
|
+
on(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
|
|
126
|
+
once(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
|
|
127
|
+
emit(eventName: import("@ethersproject/abstract-provider").EventType, ...args: any[]): boolean;
|
|
128
|
+
listenerCount(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): number;
|
|
129
|
+
listeners(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): import("@ethersproject/abstract-provider").Listener[];
|
|
130
|
+
off(eventName: import("@ethersproject/abstract-provider").EventType, listener?: import("@ethersproject/abstract-provider").Listener | undefined): any;
|
|
131
|
+
removeAllListeners(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): any;
|
|
132
|
+
getFeeData(): Promise<import("@ethersproject/abstract-provider").FeeData>;
|
|
133
|
+
addListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
|
|
134
|
+
removeListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
|
|
135
|
+
readonly _isProvider: boolean;
|
|
136
|
+
}>;
|
|
137
|
+
export type UniPassProvider = Awaited<Promise<ReturnType<typeof createProvider>>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Deferrable } from '@ethersproject/properties';
|
|
2
|
+
import { Bytes } from '@ethersproject/bytes';
|
|
3
|
+
import { JsonRpcProvider, JsonRpcSigner, TransactionRequest } from '@ethersproject/providers';
|
|
4
|
+
import { Signer, TypedDataDomain, TypedDataField } from '@ethersproject/abstract-signer';
|
|
5
|
+
import { UniPassPopupSDK } from '@unipasswallet/popup-sdk';
|
|
6
|
+
export declare class UniPassSigner extends Signer implements JsonRpcSigner {
|
|
7
|
+
readonly provider: JsonRpcProvider;
|
|
8
|
+
readonly upWallet: UniPassPopupSDK;
|
|
9
|
+
readonly _index: number;
|
|
10
|
+
readonly _address: string;
|
|
11
|
+
constructor(provider: JsonRpcProvider, upWallet: UniPassPopupSDK, address: string, _index?: number);
|
|
12
|
+
_legacySignMessage(message: string | Bytes): Promise<string>;
|
|
13
|
+
sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
14
|
+
unlock(password: string): Promise<boolean>;
|
|
15
|
+
getAddress(): Promise<string>;
|
|
16
|
+
signMessage(message: Bytes | string): Promise<string>;
|
|
17
|
+
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
|
|
18
|
+
signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
19
|
+
connect(provider?: any): JsonRpcSigner;
|
|
20
|
+
connectUnchecked(): UniPassSigner;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ChainType, Environment } from '@unipasswallet/popup-types';
|
|
2
|
+
export declare const ETHEREUM_MAINNET = 1;
|
|
3
|
+
export declare const ETHEREUM_GOERLI = 5;
|
|
4
|
+
export declare const POLYGON_MAINNET = 137;
|
|
5
|
+
export declare const POLYGON_MUMBAI = 80001;
|
|
6
|
+
export declare const BSC_MAINNET = 56;
|
|
7
|
+
export declare const BSC_TESTNET = 97;
|
|
8
|
+
export declare const RANGERS_MAINNET = 2025;
|
|
9
|
+
export declare const RANGERS_ROBIN = 9527;
|
|
10
|
+
export declare const SCROLL_TESTNET = 534354;
|
|
11
|
+
export declare const ARBITRUM_TESTNET = 421613;
|
|
12
|
+
export declare const ARBITRUM_MAINNET = 42161;
|
|
13
|
+
export declare const AVALANCHE_TESTNET = 43113;
|
|
14
|
+
export declare const AVALANCHE_MAINNET = 43114;
|
|
15
|
+
export declare const KCC_TESTNET = 322;
|
|
16
|
+
export declare const KCC_MAINNET = 321;
|
|
17
|
+
export declare const OKC_TESTNET = 65;
|
|
18
|
+
export declare const OKC_MAINNET = 66;
|
|
19
|
+
export declare const PLATON_TESTNET = 2206132;
|
|
20
|
+
export declare const PLATON_MAINNET = 210425;
|
|
21
|
+
export declare const SUPPORTED_CHAIN_ID: number[];
|
|
22
|
+
export declare const SUPPORTED_MAINNET_CHAIN_ID: number[];
|
|
23
|
+
export declare const SUPPORTED_TESTNET_CHAIN_ID: number[];
|
|
24
|
+
export declare const getChainNameByChainId: (id: number | string) => ChainType;
|
|
25
|
+
export declare const getENVByChainId: (id: number | string) => Environment;
|
|
@@ -11,17 +11,16 @@ export declare enum ChainId {
|
|
|
11
11
|
MAINNET = 1,
|
|
12
12
|
GOERLI = 5,
|
|
13
13
|
BSC = 56,
|
|
14
|
-
HECO = 128,
|
|
15
14
|
POLYGON = 137,
|
|
16
15
|
ARBITRUM_ONE = 42161,
|
|
17
|
-
ARBITRUM_RINKEBY = 421611,
|
|
18
16
|
AURORA = 1313161554,
|
|
19
|
-
MOONRIVER = 1285,
|
|
20
17
|
OKCHAIN = 66,
|
|
21
18
|
OPTIMISM = 10,
|
|
22
|
-
BOBA = 288,
|
|
23
19
|
AVALANCHE = 43114,
|
|
24
|
-
|
|
20
|
+
CONFLUX = 1030,
|
|
21
|
+
BASE = 8453,
|
|
22
|
+
LINEA = 59144,
|
|
23
|
+
SCROLL_ALPHA_TESTNET = 534353
|
|
25
24
|
}
|
|
26
25
|
export declare enum WalletType {
|
|
27
26
|
injected = "injected",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-30805908.cjs"),r=require("@walletconnect/ethereum-provider");require("@ethersproject/address"),require("@ethersproject/providers"),require("zustand"),require("@ethersproject/strings"),require("@ethersproject/bytes"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/keccak256"),exports.default=function({chainId:t,rpcUrl:o,rpc:n,walletConnectParams:i,darkMode:c},a){return e.__awaiter(this,void 0,void 0,(function*(){let s,d,u="wss://relay.walletconnect.com",l=!0;i&&(u=i.bridge||u,l=void 0!==i.qrcode?i.qrcode:l,i.infuraId,d=i.qrModalOptions||void 0),n?s=n:t&&o&&(s={[t]:o});const p=e.getIsMobile(),h=yield r.EthereumProvider.init({projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:t?[t]:[],showQrModal:!p,rpcMap:s,qrModalOptions:Object.assign({themeMode:c?"dark":"light"},d)});return h.on("display_uri",(e=>{(null==d?void 0:d.openCallback)&&d.openCallback(e)})),h.on("connect",a.connect),h.on("disconnect",(e=>{a.disconnect(e),a.accountsChanged([])})),h.on("accountsChanged",a.accountsChanged),h.on("chainChanged",a.chainChanged),h.on("message",(({type:e,data:r})=>a.message(e,r))),new Promise((r=>e.__awaiter(this,void 0,void 0,(function*(){p?(h.once("display_uri",(t=>{let o=t;e.getIsIOS()&&(o=`rainbow://wc?uri=${encodeURIComponent(t)}&connector=rainbowkit`),window.location.href=o,r(e.convertWeb3Provider(h))})),h.enable()):(yield h.enable(),r(e.convertWeb3Provider(h)))}))))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-30805908.cjs"),t=require("@uauth/js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@ethersproject/providers"),require("zustand"),require("@ethersproject/strings"),require("@ethersproject/bytes"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/address"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/keccak256");var i=r(t);let o,n=!1;exports.default=function(t,r){return e.__awaiter(this,void 0,void 0,(function*(){if(n)return;const{uAuthParams:s}=t;if(!(null==s?void 0:s.clientID))throw new Error("uAuthParams is not valid.");n=!0;try{const t=Object.assign(Object.assign({},s),{redirectUri:s.redirectUri||window.location.origin});let c,l;o=new i.default(t);try{c=yield o.user()}catch(e){if(!o.fallbackLoginOptions.scope.includes("wallet"))throw new Error('Must request the "wallet" scope for connector to work.');if(t.shouldLoginWithRedirect)throw yield o.login(),yield new Promise((()=>{})),new Error("Should never get here.");yield o.loginWithPopup(),c=yield o.user()}if(null==c.wallet_type_hint)throw new Error("no wallet type present");if(["web3","injected"].includes(c.wallet_type_hint))l=e.injectedConnect(void 0,r);else{if("walletconnect"!==c.wallet_type_hint||!t.walletConnect)throw new Error("Connector not supported");l=t.walletConnect()}return n=!1,l}catch(e){n=!1}}))},exports.disconnectWallet=function(){return null==o?void 0:o.logout()};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-30805908.cjs"),r=require("@walletconnect/ethereum-provider");require("@ethersproject/providers"),require("zustand"),require("@ethersproject/strings"),require("@ethersproject/bytes"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/address"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/keccak256"),exports.default=function({chainId:t,rpcUrl:n,rpc:o,walletConnectParams:c,darkMode:i},a){return e.__awaiter(this,void 0,void 0,(function*(){let s,d,u="wss://relay.walletconnect.com",p=!0;c&&(u=c.bridge||u,p=void 0!==c.qrcode?c.qrcode:p,c.infuraId,d=c.qrModalOptions||void 0),o?s=o:t&&n&&(s={[t]:n});const h=yield r.EthereumProvider.init({projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:t?[t]:[],showQrModal:!0,rpcMap:s,qrModalOptions:Object.assign({themeMode:i?"dark":"light"},d)});return h.on("display_uri",(e=>{(null==d?void 0:d.openCallback)&&d.openCallback(e)})),yield h.enable(),h.on("connect",a.connect),h.on("disconnect",(e=>{a.disconnect(e),a.accountsChanged([])})),h.on("accountsChanged",a.accountsChanged),h.on("chainChanged",a.chainChanged),h.on("message",(({type:e,data:r})=>a.message(e,r))),e.convertWeb3Provider(h)}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-30805908.cjs"),r=require("@coinbase/wallet-sdk");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@ethersproject/providers"),require("zustand"),require("@ethersproject/strings"),require("@ethersproject/bytes"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/address"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/keccak256");var n=t(r);exports.default=function({chainId:r,rpcUrl:t,appName:o,appLogoUrl:i,darkMode:a},c){return e.__awaiter(this,void 0,void 0,(function*(){if(window.ethereum&&(window.ethereum.isWalletLink||window.ethereum.isToshi))return e.injectedConnect(window.ethereum,c);if(!o)throw new Error("walletLink need appName");const s=new n.default({appName:o,appLogoUrl:i,darkMode:a}).makeWeb3Provider(t,r);return yield s.enable(),s.on("connect",c.connect),s.on("disconnect",c.disconnect),s.on("accountsChanged",c.accountsChanged),s.on("chainChanged",c.chainChanged),s.on("message",c.message),e.convertWeb3Provider(s)}))};
|