@injectivelabs/wallet-cosmos 1.15.31 → 1.15.32
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.
|
@@ -19,7 +19,7 @@ export declare class CosmosWalletStrategy extends BaseConcreteStrategy implement
|
|
|
19
19
|
disconnect(): Promise<void>;
|
|
20
20
|
getAddresses(): Promise<string[]>;
|
|
21
21
|
getSessionOrConfirm(address: AccountAddress): Promise<string>;
|
|
22
|
-
|
|
22
|
+
sendEvmTransaction(_transaction: unknown, _options: {
|
|
23
23
|
address: AccountAddress;
|
|
24
24
|
ethereumChainId: EthereumChainId;
|
|
25
25
|
}): Promise<string>;
|
|
@@ -37,7 +37,7 @@ export declare class CosmosWalletStrategy extends BaseConcreteStrategy implement
|
|
|
37
37
|
signEip712TypedData(_eip712TypedData: string, _address: AccountAddress): Promise<string>;
|
|
38
38
|
signArbitrary(signer: string, data: string | Uint8Array): Promise<string>;
|
|
39
39
|
getEthereumChainId(): Promise<string>;
|
|
40
|
-
|
|
40
|
+
getEvmTransactionReceipt(_txHash: string): Promise<string>;
|
|
41
41
|
getPubKey(): Promise<string>;
|
|
42
42
|
onAccountChange(callback: (account: AccountAddress | string[]) => void): Promise<void>;
|
|
43
43
|
getCosmosWallet(chainId: ChainId): CosmosWallet;
|
|
@@ -66,11 +66,11 @@ class CosmosWalletStrategy extends wallet_base_1.BaseConcreteStrategy {
|
|
|
66
66
|
return Promise.resolve(`0x${Buffer.from(`Confirmation for ${address} at time: ${Date.now()}`).toString('hex')}`);
|
|
67
67
|
}
|
|
68
68
|
// eslint-disable-next-line class-methods-use-this
|
|
69
|
-
async
|
|
69
|
+
async sendEvmTransaction(_transaction, _options) {
|
|
70
70
|
const { wallet } = this;
|
|
71
|
-
throw new exceptions_1.CosmosWalletException(new Error(`
|
|
71
|
+
throw new exceptions_1.CosmosWalletException(new Error(`sendEvmTransaction is not supported. ${(0, utils_1.capitalize)(wallet)} only supports sending cosmos transactions`), {
|
|
72
72
|
code: exceptions_1.UnspecifiedErrorCode,
|
|
73
|
-
context: wallet_base_1.WalletAction.
|
|
73
|
+
context: wallet_base_1.WalletAction.SendEvmTransaction,
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
async sendTransaction(transaction, options) {
|
|
@@ -146,11 +146,11 @@ class CosmosWalletStrategy extends wallet_base_1.BaseConcreteStrategy {
|
|
|
146
146
|
context: wallet_base_1.WalletAction.GetChainId,
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
async
|
|
149
|
+
async getEvmTransactionReceipt(_txHash) {
|
|
150
150
|
const { wallet } = this;
|
|
151
|
-
throw new exceptions_1.CosmosWalletException(new Error(`
|
|
151
|
+
throw new exceptions_1.CosmosWalletException(new Error(`getEvmTransactionReceipt is not supported on ${(0, utils_1.capitalize)(wallet)}`), {
|
|
152
152
|
code: exceptions_1.UnspecifiedErrorCode,
|
|
153
|
-
context: wallet_base_1.WalletAction.
|
|
153
|
+
context: wallet_base_1.WalletAction.GetEvmTransactionReceipt,
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
async getPubKey() {
|
|
@@ -19,7 +19,7 @@ export declare class CosmosWalletStrategy extends BaseConcreteStrategy implement
|
|
|
19
19
|
disconnect(): Promise<void>;
|
|
20
20
|
getAddresses(): Promise<string[]>;
|
|
21
21
|
getSessionOrConfirm(address: AccountAddress): Promise<string>;
|
|
22
|
-
|
|
22
|
+
sendEvmTransaction(_transaction: unknown, _options: {
|
|
23
23
|
address: AccountAddress;
|
|
24
24
|
ethereumChainId: EthereumChainId;
|
|
25
25
|
}): Promise<string>;
|
|
@@ -37,7 +37,7 @@ export declare class CosmosWalletStrategy extends BaseConcreteStrategy implement
|
|
|
37
37
|
signEip712TypedData(_eip712TypedData: string, _address: AccountAddress): Promise<string>;
|
|
38
38
|
signArbitrary(signer: string, data: string | Uint8Array): Promise<string>;
|
|
39
39
|
getEthereumChainId(): Promise<string>;
|
|
40
|
-
|
|
40
|
+
getEvmTransactionReceipt(_txHash: string): Promise<string>;
|
|
41
41
|
getPubKey(): Promise<string>;
|
|
42
42
|
onAccountChange(callback: (account: AccountAddress | string[]) => void): Promise<void>;
|
|
43
43
|
getCosmosWallet(chainId: ChainId): CosmosWallet;
|
|
@@ -63,11 +63,11 @@ export class CosmosWalletStrategy extends BaseConcreteStrategy {
|
|
|
63
63
|
return Promise.resolve(`0x${Buffer.from(`Confirmation for ${address} at time: ${Date.now()}`).toString('hex')}`);
|
|
64
64
|
}
|
|
65
65
|
// eslint-disable-next-line class-methods-use-this
|
|
66
|
-
async
|
|
66
|
+
async sendEvmTransaction(_transaction, _options) {
|
|
67
67
|
const { wallet } = this;
|
|
68
|
-
throw new CosmosWalletException(new Error(`
|
|
68
|
+
throw new CosmosWalletException(new Error(`sendEvmTransaction is not supported. ${capitalize(wallet)} only supports sending cosmos transactions`), {
|
|
69
69
|
code: UnspecifiedErrorCode,
|
|
70
|
-
context: WalletAction.
|
|
70
|
+
context: WalletAction.SendEvmTransaction,
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
async sendTransaction(transaction, options) {
|
|
@@ -143,11 +143,11 @@ export class CosmosWalletStrategy extends BaseConcreteStrategy {
|
|
|
143
143
|
context: WalletAction.GetChainId,
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
async
|
|
146
|
+
async getEvmTransactionReceipt(_txHash) {
|
|
147
147
|
const { wallet } = this;
|
|
148
|
-
throw new CosmosWalletException(new Error(`
|
|
148
|
+
throw new CosmosWalletException(new Error(`getEvmTransactionReceipt is not supported on ${capitalize(wallet)}`), {
|
|
149
149
|
code: UnspecifiedErrorCode,
|
|
150
|
-
context: WalletAction.
|
|
150
|
+
context: WalletAction.GetEvmTransactionReceipt,
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
async getPubKey() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-cosmos",
|
|
3
3
|
"description": "Cosmos wallet strategies for use with @injectivelabs/wallet-core.",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.32",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": {
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@cosmjs/proto-signing": "^0.32.3",
|
|
60
60
|
"@cosmjs/stargate": "^0.32.3",
|
|
61
|
-
"@injectivelabs/exceptions": "^1.15.
|
|
62
|
-
"@injectivelabs/sdk-ts": "^1.15.
|
|
63
|
-
"@injectivelabs/ts-types": "^1.15.
|
|
64
|
-
"@injectivelabs/utils": "^1.15.
|
|
65
|
-
"@injectivelabs/wallet-base": "^1.15.
|
|
61
|
+
"@injectivelabs/exceptions": "^1.15.29",
|
|
62
|
+
"@injectivelabs/sdk-ts": "^1.15.32",
|
|
63
|
+
"@injectivelabs/ts-types": "^1.15.30",
|
|
64
|
+
"@injectivelabs/utils": "^1.15.30",
|
|
65
|
+
"@injectivelabs/wallet-base": "^1.15.32",
|
|
66
66
|
"@keplr-wallet/types": "^0.12.71"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"shx": "^0.3.3"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "e8fa12c489c4b3432579c5df30fd6f939d57b442",
|
|
72
72
|
"typedoc": {
|
|
73
73
|
"entryPoint": "./src/index.ts",
|
|
74
74
|
"readmeFile": "./README.md",
|