@injectivelabs/wallet-cosmostation 1.16.10 → 1.16.11-alpha.0
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.
|
@@ -2,6 +2,7 @@ import { TxResponse, AminoSignResponse, DirectSignResponse } from '@injectivelab
|
|
|
2
2
|
import { ChainId, EvmChainId, CosmosChainId, AccountAddress } from '@injectivelabs/ts-types';
|
|
3
3
|
import { StdSignDoc, WalletDeviceType, BaseConcreteStrategy, ConcreteWalletStrategy } from '@injectivelabs/wallet-base';
|
|
4
4
|
import { CosmosTxV1Beta1Tx } from '@injectivelabs/sdk-ts';
|
|
5
|
+
import { OfflineSigner } from '@cosmjs/proto-signing';
|
|
5
6
|
export declare class Cosmostation extends BaseConcreteStrategy implements ConcreteWalletStrategy {
|
|
6
7
|
private cosmostationWallet?;
|
|
7
8
|
chainName: string;
|
|
@@ -35,5 +36,6 @@ export declare class Cosmostation extends BaseConcreteStrategy implements Concre
|
|
|
35
36
|
signArbitrary(signer: string, data: string | Uint8Array): Promise<string>;
|
|
36
37
|
getEthereumChainId(): Promise<string>;
|
|
37
38
|
getEvmTransactionReceipt(_txHash: string): Promise<string>;
|
|
39
|
+
getOfflineSigner(chainId: string): Promise<OfflineSigner>;
|
|
38
40
|
private getCosmostationWallet;
|
|
39
41
|
}
|
|
@@ -11,6 +11,7 @@ const extension_client_1 = require("@cosmostation/extension-client");
|
|
|
11
11
|
const proto_signing_1 = require("@cosmjs/proto-signing");
|
|
12
12
|
const cosmos_js_1 = require("@cosmostation/extension-client/cosmos.js");
|
|
13
13
|
const wallet_js_1 = require("./../wallet.js");
|
|
14
|
+
const cosmos_client_1 = require("@cosmostation/cosmos-client");
|
|
14
15
|
const getChainNameFromChainId = (chainId) => {
|
|
15
16
|
const [chainName] = chainId.split('-');
|
|
16
17
|
if (chainName.includes('cosmoshub')) {
|
|
@@ -177,6 +178,9 @@ class Cosmostation extends wallet_base_1.BaseConcreteStrategy {
|
|
|
177
178
|
context: wallet_base_1.WalletAction.GetEvmTransactionReceipt,
|
|
178
179
|
});
|
|
179
180
|
}
|
|
181
|
+
async getOfflineSigner(chainId) {
|
|
182
|
+
return (await (0, cosmos_client_1.getOfflineSigner)(chainId));
|
|
183
|
+
}
|
|
180
184
|
async getCosmostationWallet() {
|
|
181
185
|
if (this.cosmostationWallet) {
|
|
182
186
|
return this.cosmostationWallet;
|
|
@@ -2,6 +2,7 @@ import { TxResponse, AminoSignResponse, DirectSignResponse } from '@injectivelab
|
|
|
2
2
|
import { ChainId, EvmChainId, CosmosChainId, AccountAddress } from '@injectivelabs/ts-types';
|
|
3
3
|
import { StdSignDoc, WalletDeviceType, BaseConcreteStrategy, ConcreteWalletStrategy } from '@injectivelabs/wallet-base';
|
|
4
4
|
import { CosmosTxV1Beta1Tx } from '@injectivelabs/sdk-ts';
|
|
5
|
+
import { OfflineSigner } from '@cosmjs/proto-signing';
|
|
5
6
|
export declare class Cosmostation extends BaseConcreteStrategy implements ConcreteWalletStrategy {
|
|
6
7
|
private cosmostationWallet?;
|
|
7
8
|
chainName: string;
|
|
@@ -35,5 +36,6 @@ export declare class Cosmostation extends BaseConcreteStrategy implements Concre
|
|
|
35
36
|
signArbitrary(signer: string, data: string | Uint8Array): Promise<string>;
|
|
36
37
|
getEthereumChainId(): Promise<string>;
|
|
37
38
|
getEvmTransactionReceipt(_txHash: string): Promise<string>;
|
|
39
|
+
getOfflineSigner(chainId: string): Promise<OfflineSigner>;
|
|
38
40
|
private getCosmostationWallet;
|
|
39
41
|
}
|
|
@@ -8,6 +8,7 @@ import { InstallError } from '@cosmostation/extension-client';
|
|
|
8
8
|
import { makeSignDoc } from '@cosmjs/proto-signing';
|
|
9
9
|
import { SEND_TRANSACTION_MODE } from '@cosmostation/extension-client/cosmos.js';
|
|
10
10
|
import { CosmostationWallet } from './../wallet.js';
|
|
11
|
+
import { getOfflineSigner } from '@cosmostation/cosmos-client';
|
|
11
12
|
const getChainNameFromChainId = (chainId) => {
|
|
12
13
|
const [chainName] = chainId.split('-');
|
|
13
14
|
if (chainName.includes('cosmoshub')) {
|
|
@@ -174,6 +175,9 @@ export class Cosmostation extends BaseConcreteStrategy {
|
|
|
174
175
|
context: WalletAction.GetEvmTransactionReceipt,
|
|
175
176
|
});
|
|
176
177
|
}
|
|
178
|
+
async getOfflineSigner(chainId) {
|
|
179
|
+
return (await getOfflineSigner(chainId));
|
|
180
|
+
}
|
|
177
181
|
async getCosmostationWallet() {
|
|
178
182
|
if (this.cosmostationWallet) {
|
|
179
183
|
return this.cosmostationWallet;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-cosmostation",
|
|
3
3
|
"description": "Cosmostation strategy for use with @injectivelabs/wallet-core.",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.11-alpha.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": {
|
|
@@ -57,18 +57,19 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@cosmjs/proto-signing": "^0.32.3",
|
|
60
|
+
"@cosmostation/cosmos-client": "^0.0.5",
|
|
60
61
|
"@cosmostation/extension-client": "^0.1.15",
|
|
61
|
-
"@injectivelabs/exceptions": "1.16.
|
|
62
|
-
"@injectivelabs/sdk-ts": "1.16.
|
|
63
|
-
"@injectivelabs/ts-types": "1.16.
|
|
64
|
-
"@injectivelabs/utils": "1.16.
|
|
65
|
-
"@injectivelabs/wallet-base": "1.16.
|
|
62
|
+
"@injectivelabs/exceptions": "1.16.11-alpha.0",
|
|
63
|
+
"@injectivelabs/sdk-ts": "1.16.11-alpha.0",
|
|
64
|
+
"@injectivelabs/ts-types": "1.16.11-alpha.0",
|
|
65
|
+
"@injectivelabs/utils": "1.16.11-alpha.0",
|
|
66
|
+
"@injectivelabs/wallet-base": "1.16.11-alpha.0",
|
|
66
67
|
"@walletconnect/ethereum-provider": "2.18.1"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
70
|
"shx": "^0.3.4"
|
|
70
71
|
},
|
|
71
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "640edf06e57aa38d3176e38fa03dddfc72e901cf",
|
|
72
73
|
"typedoc": {
|
|
73
74
|
"entryPoint": "./src/index.ts",
|
|
74
75
|
"readmeFile": "./README.md",
|