@injectivelabs/wallet-core 1.15.17 → 1.15.19
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.
|
@@ -21,6 +21,7 @@ export default class BaseWalletStrategy implements WalletStrategyInterface {
|
|
|
21
21
|
getEthereumChainId(): Promise<string>;
|
|
22
22
|
getEthereumTransactionReceipt(txHash: string): Promise<void>;
|
|
23
23
|
getSessionOrConfirm(address?: AccountAddress): Promise<string>;
|
|
24
|
+
getWalletClient<T>(): Promise<T>;
|
|
24
25
|
sendTransaction(tx: DirectSignResponse | TxRaw, options: SendTransactionOptions): Promise<TxResponse>;
|
|
25
26
|
sendEthereumTransaction(tx: any, options: {
|
|
26
27
|
address: AccountAddress;
|
|
@@ -71,6 +71,15 @@ class BaseWalletStrategy {
|
|
|
71
71
|
async getSessionOrConfirm(address) {
|
|
72
72
|
return this.getStrategy().getSessionOrConfirm(address);
|
|
73
73
|
}
|
|
74
|
+
async getWalletClient() {
|
|
75
|
+
if (this.getStrategy()?.getWalletClient) {
|
|
76
|
+
const result = (this.getStrategy()?.getWalletClient)?.();
|
|
77
|
+
if (result) {
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
throw new exceptions_1.WalletException(new Error('Wallet client not found. Please check your wallet strategy.'));
|
|
82
|
+
}
|
|
74
83
|
async sendTransaction(tx, options) {
|
|
75
84
|
return this.getStrategy().sendTransaction(tx, options);
|
|
76
85
|
}
|
|
@@ -21,6 +21,7 @@ export default class BaseWalletStrategy implements WalletStrategyInterface {
|
|
|
21
21
|
getEthereumChainId(): Promise<string>;
|
|
22
22
|
getEthereumTransactionReceipt(txHash: string): Promise<void>;
|
|
23
23
|
getSessionOrConfirm(address?: AccountAddress): Promise<string>;
|
|
24
|
+
getWalletClient<T>(): Promise<T>;
|
|
24
25
|
sendTransaction(tx: DirectSignResponse | TxRaw, options: SendTransactionOptions): Promise<TxResponse>;
|
|
25
26
|
sendEthereumTransaction(tx: any, options: {
|
|
26
27
|
address: AccountAddress;
|
|
@@ -69,6 +69,15 @@ export default class BaseWalletStrategy {
|
|
|
69
69
|
async getSessionOrConfirm(address) {
|
|
70
70
|
return this.getStrategy().getSessionOrConfirm(address);
|
|
71
71
|
}
|
|
72
|
+
async getWalletClient() {
|
|
73
|
+
if (this.getStrategy()?.getWalletClient) {
|
|
74
|
+
const result = (this.getStrategy()?.getWalletClient)?.();
|
|
75
|
+
if (result) {
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
throw new WalletException(new Error('Wallet client not found. Please check your wallet strategy.'));
|
|
80
|
+
}
|
|
72
81
|
async sendTransaction(tx, options) {
|
|
73
82
|
return this.getStrategy().sendTransaction(tx, options);
|
|
74
83
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-core",
|
|
3
3
|
"description": "Core wallet strategy",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.19",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": {
|
|
@@ -56,16 +56,16 @@
|
|
|
56
56
|
"start": "node dist/index.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@injectivelabs/exceptions": "^1.15.
|
|
60
|
-
"@injectivelabs/networks": "^1.15.
|
|
61
|
-
"@injectivelabs/sdk-ts": "^1.15.
|
|
62
|
-
"@injectivelabs/ts-types": "^1.15.
|
|
63
|
-
"@injectivelabs/utils": "^1.15.
|
|
64
|
-
"@injectivelabs/wallet-base": "^1.15.
|
|
59
|
+
"@injectivelabs/exceptions": "^1.15.16",
|
|
60
|
+
"@injectivelabs/networks": "^1.15.17",
|
|
61
|
+
"@injectivelabs/sdk-ts": "^1.15.19",
|
|
62
|
+
"@injectivelabs/ts-types": "^1.15.17",
|
|
63
|
+
"@injectivelabs/utils": "^1.15.17",
|
|
64
|
+
"@injectivelabs/wallet-base": "^1.15.19",
|
|
65
65
|
"@keplr-wallet/types": "^0.12.159"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"shx": "^0.3.3"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "fdf4de5ba62e2cd9fa95daba61a327d9a0b2a037"
|
|
71
71
|
}
|