coreum-js 2.17.0 → 2.17.2
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/main/client/index.d.ts +1 -1
- package/dist/main/client/index.js +25 -2
- package/dist/main/coreum/dex/index.d.ts +2 -1
- package/dist/main/coreum/dex/index.js +0 -1
- package/dist/main/types/core.d.ts +1 -1
- package/dist/main/types/core.js +1 -1
- package/dist/module/client/index.d.ts +1 -1
- package/dist/module/client/index.js +25 -2
- package/dist/module/coreum/dex/index.d.ts +2 -1
- package/dist/module/coreum/dex/index.js +1 -2
- package/dist/module/types/core.d.ts +1 -1
- package/dist/module/types/core.js +1 -1
- package/package.json +1 -1
|
@@ -108,7 +108,7 @@ export declare class Client {
|
|
|
108
108
|
* @param memo An arbitrary string to add as Memo for the transaction
|
|
109
109
|
* @returns TxRaw object to be submitted to the chain
|
|
110
110
|
*/
|
|
111
|
-
signTx(msgs: readonly EncodeObject[], memo?: string): Promise<TxRaw>;
|
|
111
|
+
signTx(msgs: readonly EncodeObject[], memo?: string, custom_sequence?: number): Promise<TxRaw>;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @param event String describing the event to subscribe to.
|
|
@@ -230,13 +230,36 @@ class Client {
|
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
+
// async signTx(msgs, memo, custom_sequence) {
|
|
234
|
+
// try {
|
|
235
|
+
// this._isSigningClientInit();
|
|
236
|
+
// const signingClient = this._client;
|
|
237
|
+
// const { accountNumber, sequence } = await this._client.getAccount(this.address);
|
|
238
|
+
// const { fee } = await this.getTxFee(msgs);
|
|
239
|
+
// const signerData = {
|
|
240
|
+
// accountNumber,
|
|
241
|
+
// sequence: custom_sequence || sequence,
|
|
242
|
+
// chainId: this.config.chain_id,
|
|
243
|
+
// };
|
|
244
|
+
// const signed = await signingClient.sign(this.address, msgs, fee, this._tx_memo
|
|
245
|
+
// ? `${this._tx_memo} ${memo ? `- ${memo}` : ""}`
|
|
246
|
+
// : memo || "", signerData);
|
|
247
|
+
// return signed;
|
|
248
|
+
// }
|
|
249
|
+
// catch (e) {
|
|
250
|
+
// throw {
|
|
251
|
+
// thrower: e.thrower || "addSignature",
|
|
252
|
+
// error: e.error || e,
|
|
253
|
+
// };
|
|
254
|
+
// }
|
|
255
|
+
// }
|
|
233
256
|
/**
|
|
234
257
|
*
|
|
235
258
|
* @param msgs An array of messages for the Transaction
|
|
236
259
|
* @param memo An arbitrary string to add as Memo for the transaction
|
|
237
260
|
* @returns TxRaw object to be submitted to the chain
|
|
238
261
|
*/
|
|
239
|
-
async signTx(msgs, memo) {
|
|
262
|
+
async signTx(msgs, memo = "", custom_sequence) {
|
|
240
263
|
try {
|
|
241
264
|
this._isSigningClientInit();
|
|
242
265
|
const signingClient = this._client;
|
|
@@ -244,7 +267,7 @@ class Client {
|
|
|
244
267
|
const { fee } = await this.getTxFee(msgs);
|
|
245
268
|
const signerData = {
|
|
246
269
|
accountNumber,
|
|
247
|
-
sequence,
|
|
270
|
+
sequence: custom_sequence || sequence,
|
|
248
271
|
chainId: this.config.chain_id,
|
|
249
272
|
};
|
|
250
273
|
const signed = await signingClient.sign(this.address, msgs, fee, this._tx_memo
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
+
export declare const dexRegistry: ReadonlyArray<[string, GeneratedType]>;
|
|
@@ -7,6 +7,5 @@ exports.dexRegistry = [
|
|
|
7
7
|
[types_1.CoreumTypeUrl.DEX + "MsgCancelOrder", tx_1.MsgCancelOrder],
|
|
8
8
|
[types_1.CoreumTypeUrl.DEX + "MsgPlaceOrder", tx_1.MsgPlaceOrder],
|
|
9
9
|
[types_1.CoreumTypeUrl.DEX + "MsgUpdateParams", tx_1.MsgUpdateParams],
|
|
10
|
-
[types_1.CoreumTypeUrl.DEX + "MsgServiceName", tx_1.MsgServiceName],
|
|
11
10
|
[types_1.CoreumTypeUrl.DEX + "MsgCancelOrdersByDenom", tx_1.MsgCancelOrdersByDenom],
|
|
12
11
|
];
|
|
@@ -10,7 +10,7 @@ export declare enum CoreumTypeUrl {
|
|
|
10
10
|
NFT = "/coreum.asset.nft.v1.",
|
|
11
11
|
FT = "/coreum.asset.ft.v1.",
|
|
12
12
|
NFTBeta = "/cosmos.nft.v1beta1.",
|
|
13
|
-
DEX = "/coreum.dex.v1"
|
|
13
|
+
DEX = "/coreum.dex.v1."
|
|
14
14
|
}
|
|
15
15
|
export interface ClientQueryClient extends QueryClient {
|
|
16
16
|
ft: ReturnType<typeof setupFTExtension>["ft"];
|
package/dist/main/types/core.js
CHANGED
|
@@ -11,7 +11,7 @@ var CoreumTypeUrl;
|
|
|
11
11
|
CoreumTypeUrl["NFT"] = "/coreum.asset.nft.v1.";
|
|
12
12
|
CoreumTypeUrl["FT"] = "/coreum.asset.ft.v1.";
|
|
13
13
|
CoreumTypeUrl["NFTBeta"] = "/cosmos.nft.v1beta1.";
|
|
14
|
-
CoreumTypeUrl["DEX"] = "/coreum.dex.v1";
|
|
14
|
+
CoreumTypeUrl["DEX"] = "/coreum.dex.v1.";
|
|
15
15
|
})(CoreumTypeUrl || (exports.CoreumTypeUrl = CoreumTypeUrl = {}));
|
|
16
16
|
// setupMintExtension,
|
|
17
17
|
// setupFeegrantExtension,
|
|
@@ -108,7 +108,7 @@ export declare class Client {
|
|
|
108
108
|
* @param memo An arbitrary string to add as Memo for the transaction
|
|
109
109
|
* @returns TxRaw object to be submitted to the chain
|
|
110
110
|
*/
|
|
111
|
-
signTx(msgs: readonly EncodeObject[], memo?: string): Promise<TxRaw>;
|
|
111
|
+
signTx(msgs: readonly EncodeObject[], memo?: string, custom_sequence?: number): Promise<TxRaw>;
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
114
114
|
* @param event String describing the event to subscribe to.
|
|
@@ -234,13 +234,36 @@ export class Client {
|
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
+
// async signTx(msgs, memo, custom_sequence) {
|
|
238
|
+
// try {
|
|
239
|
+
// this._isSigningClientInit();
|
|
240
|
+
// const signingClient = this._client;
|
|
241
|
+
// const { accountNumber, sequence } = await this._client.getAccount(this.address);
|
|
242
|
+
// const { fee } = await this.getTxFee(msgs);
|
|
243
|
+
// const signerData = {
|
|
244
|
+
// accountNumber,
|
|
245
|
+
// sequence: custom_sequence || sequence,
|
|
246
|
+
// chainId: this.config.chain_id,
|
|
247
|
+
// };
|
|
248
|
+
// const signed = await signingClient.sign(this.address, msgs, fee, this._tx_memo
|
|
249
|
+
// ? `${this._tx_memo} ${memo ? `- ${memo}` : ""}`
|
|
250
|
+
// : memo || "", signerData);
|
|
251
|
+
// return signed;
|
|
252
|
+
// }
|
|
253
|
+
// catch (e) {
|
|
254
|
+
// throw {
|
|
255
|
+
// thrower: e.thrower || "addSignature",
|
|
256
|
+
// error: e.error || e,
|
|
257
|
+
// };
|
|
258
|
+
// }
|
|
259
|
+
// }
|
|
237
260
|
/**
|
|
238
261
|
*
|
|
239
262
|
* @param msgs An array of messages for the Transaction
|
|
240
263
|
* @param memo An arbitrary string to add as Memo for the transaction
|
|
241
264
|
* @returns TxRaw object to be submitted to the chain
|
|
242
265
|
*/
|
|
243
|
-
async signTx(msgs, memo) {
|
|
266
|
+
async signTx(msgs, memo = "", custom_sequence) {
|
|
244
267
|
try {
|
|
245
268
|
this._isSigningClientInit();
|
|
246
269
|
const signingClient = this._client;
|
|
@@ -248,7 +271,7 @@ export class Client {
|
|
|
248
271
|
const { fee } = await this.getTxFee(msgs);
|
|
249
272
|
const signerData = {
|
|
250
273
|
accountNumber,
|
|
251
|
-
sequence,
|
|
274
|
+
sequence: custom_sequence || sequence,
|
|
252
275
|
chainId: this.config.chain_id,
|
|
253
276
|
};
|
|
254
277
|
const signed = await signingClient.sign(this.address, msgs, fee, this._tx_memo
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { GeneratedType } from "@cosmjs/proto-signing";
|
|
2
|
+
export declare const dexRegistry: ReadonlyArray<[string, GeneratedType]>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CoreumTypeUrl } from "../../types";
|
|
2
|
-
import { MsgCancelOrder, MsgPlaceOrder, MsgUpdateParams,
|
|
2
|
+
import { MsgCancelOrder, MsgPlaceOrder, MsgUpdateParams, MsgCancelOrdersByDenom, } from "./v1/tx";
|
|
3
3
|
export const dexRegistry = [
|
|
4
4
|
[CoreumTypeUrl.DEX + "MsgCancelOrder", MsgCancelOrder],
|
|
5
5
|
[CoreumTypeUrl.DEX + "MsgPlaceOrder", MsgPlaceOrder],
|
|
6
6
|
[CoreumTypeUrl.DEX + "MsgUpdateParams", MsgUpdateParams],
|
|
7
|
-
[CoreumTypeUrl.DEX + "MsgServiceName", MsgServiceName],
|
|
8
7
|
[CoreumTypeUrl.DEX + "MsgCancelOrdersByDenom", MsgCancelOrdersByDenom],
|
|
9
8
|
];
|
|
@@ -10,7 +10,7 @@ export declare enum CoreumTypeUrl {
|
|
|
10
10
|
NFT = "/coreum.asset.nft.v1.",
|
|
11
11
|
FT = "/coreum.asset.ft.v1.",
|
|
12
12
|
NFTBeta = "/cosmos.nft.v1beta1.",
|
|
13
|
-
DEX = "/coreum.dex.v1"
|
|
13
|
+
DEX = "/coreum.dex.v1."
|
|
14
14
|
}
|
|
15
15
|
export interface ClientQueryClient extends QueryClient {
|
|
16
16
|
ft: ReturnType<typeof setupFTExtension>["ft"];
|
|
@@ -8,7 +8,7 @@ export var CoreumTypeUrl;
|
|
|
8
8
|
CoreumTypeUrl["NFT"] = "/coreum.asset.nft.v1.";
|
|
9
9
|
CoreumTypeUrl["FT"] = "/coreum.asset.ft.v1.";
|
|
10
10
|
CoreumTypeUrl["NFTBeta"] = "/cosmos.nft.v1beta1.";
|
|
11
|
-
CoreumTypeUrl["DEX"] = "/coreum.dex.v1";
|
|
11
|
+
CoreumTypeUrl["DEX"] = "/coreum.dex.v1.";
|
|
12
12
|
})(CoreumTypeUrl || (CoreumTypeUrl = {}));
|
|
13
13
|
// setupMintExtension,
|
|
14
14
|
// setupFeegrantExtension,
|