@injectivelabs/wallet-cosmostation 1.17.2-alpha.2 → 1.17.2-alpha.4
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/cjs/index.cjs +9 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +9 -2
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
|
|
2
|
-
let __cosmjs_proto_signing = require("@cosmjs/proto-signing");
|
|
3
2
|
let __injectivelabs_ts_types = require("@injectivelabs/ts-types");
|
|
4
3
|
let __injectivelabs_sdk_ts = require("@injectivelabs/sdk-ts");
|
|
5
4
|
let __injectivelabs_sdk_ts_utils = require("@injectivelabs/sdk-ts/utils");
|
|
@@ -114,6 +113,14 @@ var CosmostationWallet = class CosmostationWallet {
|
|
|
114
113
|
}
|
|
115
114
|
};
|
|
116
115
|
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/strategy/lib.ts
|
|
118
|
+
let cachedMakeSignDoc = null;
|
|
119
|
+
const loadMakeSignDoc = async () => {
|
|
120
|
+
if (!cachedMakeSignDoc) cachedMakeSignDoc = (await import("@cosmjs/proto-signing")).makeSignDoc;
|
|
121
|
+
return cachedMakeSignDoc;
|
|
122
|
+
};
|
|
123
|
+
|
|
117
124
|
//#endregion
|
|
118
125
|
//#region src/strategy/strategy.ts
|
|
119
126
|
/**
|
|
@@ -292,7 +299,7 @@ var Cosmostation = class extends __injectivelabs_wallet_base.BaseConcreteStrateg
|
|
|
292
299
|
}
|
|
293
300
|
});
|
|
294
301
|
return {
|
|
295
|
-
signed: (
|
|
302
|
+
signed: (await loadMakeSignDoc())(signDirectResponse.signed_doc.body_bytes, signDirectResponse.signed_doc.auth_info_bytes, signDirectResponse.signed_doc.chain_id, parseInt(signDirectResponse.signed_doc.account_number, 10)),
|
|
296
303
|
signature: { signature: signDirectResponse.signature }
|
|
297
304
|
};
|
|
298
305
|
} catch (e) {
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OfflineSigner } from "@cosmjs/proto-signing";
|
|
2
1
|
import { AccountAddress, ChainId, CosmosChainId, EvmChainId, TestnetCosmosChainId } from "@injectivelabs/ts-types";
|
|
3
2
|
import { CosmosTxV1Beta1TxPb } from "@injectivelabs/sdk-ts";
|
|
4
3
|
import { TxResponse } from "@injectivelabs/sdk-ts/core/tx";
|
|
5
4
|
import { BaseConcreteStrategy, ConcreteWalletStrategy, StdSignDoc, WalletDeviceType, onAccountChangeCallback } from "@injectivelabs/wallet-base";
|
|
5
|
+
import { OfflineSigner } from "@cosmjs/proto-signing";
|
|
6
6
|
import { AminoSignResponse, DirectSignResponse } from "@injectivelabs/sdk-ts/types";
|
|
7
7
|
|
|
8
8
|
//#region src/types.d.ts
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CosmosWalletException, ErrorType, TransactionException, UnspecifiedErrorCode } from "@injectivelabs/exceptions";
|
|
2
|
-
import { makeSignDoc } from "@cosmjs/proto-signing";
|
|
3
2
|
import { CosmosChainId } from "@injectivelabs/ts-types";
|
|
4
3
|
import { CosmosTxV1Beta1TxPb } from "@injectivelabs/sdk-ts";
|
|
5
4
|
import { stringToUint8Array, uint8ArrayToBase64, uint8ArrayToHex } from "@injectivelabs/sdk-ts/utils";
|
|
@@ -114,6 +113,14 @@ var CosmostationWallet = class CosmostationWallet {
|
|
|
114
113
|
}
|
|
115
114
|
};
|
|
116
115
|
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/strategy/lib.ts
|
|
118
|
+
let cachedMakeSignDoc = null;
|
|
119
|
+
const loadMakeSignDoc = async () => {
|
|
120
|
+
if (!cachedMakeSignDoc) cachedMakeSignDoc = (await import("@cosmjs/proto-signing")).makeSignDoc;
|
|
121
|
+
return cachedMakeSignDoc;
|
|
122
|
+
};
|
|
123
|
+
|
|
117
124
|
//#endregion
|
|
118
125
|
//#region src/strategy/strategy.ts
|
|
119
126
|
/**
|
|
@@ -292,7 +299,7 @@ var Cosmostation = class extends BaseConcreteStrategy {
|
|
|
292
299
|
}
|
|
293
300
|
});
|
|
294
301
|
return {
|
|
295
|
-
signed:
|
|
302
|
+
signed: (await loadMakeSignDoc())(signDirectResponse.signed_doc.body_bytes, signDirectResponse.signed_doc.auth_info_bytes, signDirectResponse.signed_doc.chain_id, parseInt(signDirectResponse.signed_doc.account_number, 10)),
|
|
296
303
|
signature: { signature: signDirectResponse.signature }
|
|
297
304
|
};
|
|
298
305
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-cosmostation",
|
|
3
|
-
"version": "1.17.2-alpha.
|
|
3
|
+
"version": "1.17.2-alpha.4",
|
|
4
4
|
"description": "Cosmostation strategy for use with @injectivelabs/wallet-core.",
|
|
5
5
|
"deprecated": "Use @injectivelabs/wallet-cosmos with Wallet.Cosmostation instead",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@cosmjs/proto-signing": "0.33.0",
|
|
43
|
-
"@injectivelabs/
|
|
44
|
-
"@injectivelabs/
|
|
45
|
-
"@injectivelabs/
|
|
46
|
-
"@injectivelabs/
|
|
43
|
+
"@injectivelabs/sdk-ts": "1.17.2-alpha.4",
|
|
44
|
+
"@injectivelabs/exceptions": "1.17.2-alpha.4",
|
|
45
|
+
"@injectivelabs/wallet-base": "1.17.2-alpha.4",
|
|
46
|
+
"@injectivelabs/ts-types": "1.17.2-alpha.4"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|