@injectivelabs/sdk-ts 1.10.53 → 1.10.54
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/core/modules/tx/broadcaster/MsgBroadcasterWithPk.d.ts +16 -1
- package/dist/cjs/core/modules/tx/broadcaster/MsgBroadcasterWithPk.d.ts.map +1 -1
- package/dist/cjs/core/modules/tx/broadcaster/MsgBroadcasterWithPk.js +40 -4
- package/dist/cjs/core/modules/tx/broadcaster/MsgBroadcasterWithPk.js.map +1 -1
- package/dist/esm/core/modules/tx/broadcaster/MsgBroadcasterWithPk.d.ts +16 -1
- package/dist/esm/core/modules/tx/broadcaster/MsgBroadcasterWithPk.d.ts.map +1 -1
- package/dist/esm/core/modules/tx/broadcaster/MsgBroadcasterWithPk.js +35 -4
- package/dist/esm/core/modules/tx/broadcaster/MsgBroadcasterWithPk.js.map +1 -1
- package/package.json +3 -3
|
@@ -24,6 +24,7 @@ interface MsgBroadcasterOptionsWithPk {
|
|
|
24
24
|
};
|
|
25
25
|
privateKey: string | PrivateKey;
|
|
26
26
|
ethereumChainId?: EthereumChainId;
|
|
27
|
+
simulateTx?: boolean;
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* This class is used to broadcast transactions
|
|
@@ -37,6 +38,7 @@ export declare class MsgBroadcasterWithPk {
|
|
|
37
38
|
endpoints: NetworkEndpoints;
|
|
38
39
|
chainId: ChainId;
|
|
39
40
|
privateKey: PrivateKey;
|
|
41
|
+
simulateTx: boolean;
|
|
40
42
|
constructor(options: MsgBroadcasterOptionsWithPk);
|
|
41
43
|
/**
|
|
42
44
|
* Broadcasting the transaction using the client
|
|
@@ -44,7 +46,7 @@ export declare class MsgBroadcasterWithPk {
|
|
|
44
46
|
* @param tx
|
|
45
47
|
* @returns {string} transaction hash
|
|
46
48
|
*/
|
|
47
|
-
broadcast(transaction: MsgBroadcasterTxOptions): Promise<import("
|
|
49
|
+
broadcast(transaction: MsgBroadcasterTxOptions): Promise<import("../types").TxResponse>;
|
|
48
50
|
/**
|
|
49
51
|
* Broadcasting the transaction using the client
|
|
50
52
|
*
|
|
@@ -63,6 +65,19 @@ export declare class MsgBroadcasterWithPk {
|
|
|
63
65
|
gasUsed: number;
|
|
64
66
|
};
|
|
65
67
|
}>;
|
|
68
|
+
/**
|
|
69
|
+
* In case we don't want to simulate the transaction
|
|
70
|
+
* we get the gas limit based on the message type.
|
|
71
|
+
*
|
|
72
|
+
* If we want to simulate the transaction we set the
|
|
73
|
+
* gas limit based on the simulation and add a small multiplier
|
|
74
|
+
* to be safe (factor of 1.1)
|
|
75
|
+
*/
|
|
76
|
+
private getTxWithStdFee;
|
|
77
|
+
/**
|
|
78
|
+
* Create TxRaw and simulate it
|
|
79
|
+
*/
|
|
80
|
+
private simulateTxRaw;
|
|
66
81
|
}
|
|
67
82
|
export {};
|
|
68
83
|
//# sourceMappingURL=MsgBroadcasterWithPk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MsgBroadcasterWithPk.d.ts","sourceRoot":"","sources":["../../../../../../src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAkBjC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EACL,OAAO,EAGP,gBAAgB,EACjB,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"MsgBroadcasterWithPk.d.ts","sourceRoot":"","sources":["../../../../../../src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAkBjC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EACL,OAAO,EAGP,gBAAgB,EACjB,MAAM,yBAAyB,CAAA;AAIhC,UAAU,uBAAuB;IAC/B,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAAA;IACnB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,2BAA2B;IACnC,OAAO,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,UAAU,EAAE,MAAM,GAAG,UAAU,CAAA;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IACxB,SAAS,EAAE,gBAAgB,CAAA;IAE3B,OAAO,EAAE,OAAO,CAAA;IAEhB,UAAU,EAAE,UAAU,CAAA;IAEtB,UAAU,EAAE,OAAO,CAAQ;gBAEtB,OAAO,EAAE,2BAA2B;IAahD;;;;;OAKG;IACG,SAAS,CAAC,WAAW,EAAE,uBAAuB;IAkEpD;;;;;OAKG;IACG,QAAQ,CAAC,WAAW,EAAE,uBAAuB;;;;;;;;;;;;IAmDnD;;;;;;;OAOG;YACW,eAAe;IAoB7B;;OAEG;YACW,aAAa;CAY5B"}
|
|
@@ -29,8 +29,10 @@ const msgs_1 = require("../../../../utils/msgs");
|
|
|
29
29
|
*/
|
|
30
30
|
class MsgBroadcasterWithPk {
|
|
31
31
|
constructor(options) {
|
|
32
|
+
this.simulateTx = false;
|
|
32
33
|
const networkInfo = (0, networks_1.getNetworkInfo)(options.network);
|
|
33
34
|
const endpoints = (0, networks_1.getNetworkEndpoints)(options.network);
|
|
35
|
+
this.simulateTx = options.simulateTx || false;
|
|
34
36
|
this.chainId = networkInfo.chainId;
|
|
35
37
|
this.endpoints = Object.assign(Object.assign({}, endpoints), (endpoints || {}));
|
|
36
38
|
this.privateKey =
|
|
@@ -64,10 +66,10 @@ class MsgBroadcasterWithPk {
|
|
|
64
66
|
const timeoutHeight = new utils_1.BigNumberInBase(latestHeight).plus(utils_1.DEFAULT_BLOCK_TIMEOUT_HEIGHT);
|
|
65
67
|
const gas = (transaction.gasLimit || (0, msgs_1.getGasPriceBasedOnMessage)(msgs)).toString();
|
|
66
68
|
/** Prepare the Transaction * */
|
|
67
|
-
const { signBytes, txRaw } =
|
|
69
|
+
const { signBytes, txRaw } = yield this.getTxWithStdFee({
|
|
68
70
|
memo: tx.memo || '',
|
|
69
|
-
fee: (0, utils_1.getStdFee)(gas),
|
|
70
71
|
message: msgs,
|
|
72
|
+
fee: (0, utils_1.getStdFee)(gas),
|
|
71
73
|
timeoutHeight: timeoutHeight.toNumber(),
|
|
72
74
|
pubKey: publicKey.toBase64(),
|
|
73
75
|
sequence: accountDetails.sequence,
|
|
@@ -79,8 +81,7 @@ class MsgBroadcasterWithPk {
|
|
|
79
81
|
/** Append Signatures */
|
|
80
82
|
txRaw.signatures = [signature];
|
|
81
83
|
/** Broadcast transaction */
|
|
82
|
-
const
|
|
83
|
-
const txResponse = yield txApi.broadcast(txRaw);
|
|
84
|
+
const txResponse = yield new TxGrpcApi_1.TxGrpcApi(endpoints.grpc).broadcast(txRaw);
|
|
84
85
|
if (txResponse.code !== 0) {
|
|
85
86
|
throw new exceptions_1.GeneralException(new Error(`Transaction failed to be broadcasted - ${txResponse.rawLog}`));
|
|
86
87
|
}
|
|
@@ -128,6 +129,41 @@ class MsgBroadcasterWithPk {
|
|
|
128
129
|
return simulationResponse;
|
|
129
130
|
});
|
|
130
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* In case we don't want to simulate the transaction
|
|
134
|
+
* we get the gas limit based on the message type.
|
|
135
|
+
*
|
|
136
|
+
* If we want to simulate the transaction we set the
|
|
137
|
+
* gas limit based on the simulation and add a small multiplier
|
|
138
|
+
* to be safe (factor of 1.1)
|
|
139
|
+
*/
|
|
140
|
+
getTxWithStdFee(args) {
|
|
141
|
+
var _a;
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
const { simulateTx } = this;
|
|
144
|
+
if (!simulateTx) {
|
|
145
|
+
return (0, tx_1.createTransaction)(args);
|
|
146
|
+
}
|
|
147
|
+
const result = yield this.simulateTxRaw(args);
|
|
148
|
+
if (!((_a = result.gasInfo) === null || _a === void 0 ? void 0 : _a.gasUsed)) {
|
|
149
|
+
return (0, tx_1.createTransaction)(args);
|
|
150
|
+
}
|
|
151
|
+
const stdGasFee = (0, utils_1.getStdFee)(new utils_1.BigNumberInBase(result.gasInfo.gasUsed).times(1.1).toFixed());
|
|
152
|
+
return (0, tx_1.createTransaction)(Object.assign(Object.assign({}, args), { fee: stdGasFee }));
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Create TxRaw and simulate it
|
|
157
|
+
*/
|
|
158
|
+
simulateTxRaw(args) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
const { endpoints } = this;
|
|
161
|
+
const { txRaw } = (0, tx_1.createTransaction)(args);
|
|
162
|
+
txRaw.signatures = [new Uint8Array(0)];
|
|
163
|
+
const simulationResponse = yield new TxGrpcApi_1.TxGrpcApi(endpoints.grpc).simulate(txRaw);
|
|
164
|
+
return simulationResponse;
|
|
165
|
+
});
|
|
166
|
+
}
|
|
131
167
|
}
|
|
132
168
|
exports.MsgBroadcasterWithPk = MsgBroadcasterWithPk;
|
|
133
169
|
//# sourceMappingURL=MsgBroadcasterWithPk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MsgBroadcasterWithPk.js","sourceRoot":"","sources":["../../../../../../src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAA2D;AAE3D,8BAAyC;AACzC,gDAA4C;AAC5C,wDAGsC;AACtC,gDAK6B;AAC7B,0DAA4D;AAC5D,8CAGyB;AAEzB,sDAKgC;AAChC,iDAAkE;
|
|
1
|
+
{"version":3,"file":"MsgBroadcasterWithPk.js","sourceRoot":"","sources":["../../../../../../src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAA2D;AAE3D,8BAAyC;AACzC,gDAA4C;AAC5C,wDAGsC;AACtC,gDAK6B;AAC7B,0DAA4D;AAC5D,8CAGyB;AAEzB,sDAKgC;AAChC,iDAAkE;AA8BlE;;;;;;;GAOG;AACH,MAAa,oBAAoB;IAS/B,YAAY,OAAoC;QAFzC,eAAU,GAAY,KAAK,CAAA;QAGhC,MAAM,WAAW,GAAG,IAAA,yBAAc,EAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACnD,MAAM,SAAS,GAAG,IAAA,8BAAmB,EAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAEtD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,KAAK,CAAA;QAC7C,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAA;QAClC,IAAI,CAAC,SAAS,mCAAQ,SAAS,GAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAE,CAAA;QACvD,IAAI,CAAC,UAAU;YACb,OAAO,CAAC,UAAU,YAAY,qBAAU;gBACtC,CAAC,CAAC,OAAO,CAAC,UAAU;gBACpB,CAAC,CAAC,qBAAU,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAC9C,CAAC;IAED;;;;;OAKG;IACG,SAAS,CAAC,WAAoC;;YAClD,MAAM,EAAE,OAAO,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AED,OAAO,kBAAkB,CAAA;QAC3B,CAAC;KAAA;CACF;AAlMD,oDAkMC"}
|
|
@@ -24,6 +24,7 @@ interface MsgBroadcasterOptionsWithPk {
|
|
|
24
24
|
};
|
|
25
25
|
privateKey: string | PrivateKey;
|
|
26
26
|
ethereumChainId?: EthereumChainId;
|
|
27
|
+
simulateTx?: boolean;
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* This class is used to broadcast transactions
|
|
@@ -37,6 +38,7 @@ export declare class MsgBroadcasterWithPk {
|
|
|
37
38
|
endpoints: NetworkEndpoints;
|
|
38
39
|
chainId: ChainId;
|
|
39
40
|
privateKey: PrivateKey;
|
|
41
|
+
simulateTx: boolean;
|
|
40
42
|
constructor(options: MsgBroadcasterOptionsWithPk);
|
|
41
43
|
/**
|
|
42
44
|
* Broadcasting the transaction using the client
|
|
@@ -44,7 +46,7 @@ export declare class MsgBroadcasterWithPk {
|
|
|
44
46
|
* @param tx
|
|
45
47
|
* @returns {string} transaction hash
|
|
46
48
|
*/
|
|
47
|
-
broadcast(transaction: MsgBroadcasterTxOptions): Promise<import("
|
|
49
|
+
broadcast(transaction: MsgBroadcasterTxOptions): Promise<import("../types").TxResponse>;
|
|
48
50
|
/**
|
|
49
51
|
* Broadcasting the transaction using the client
|
|
50
52
|
*
|
|
@@ -63,6 +65,19 @@ export declare class MsgBroadcasterWithPk {
|
|
|
63
65
|
gasUsed: number;
|
|
64
66
|
};
|
|
65
67
|
}>;
|
|
68
|
+
/**
|
|
69
|
+
* In case we don't want to simulate the transaction
|
|
70
|
+
* we get the gas limit based on the message type.
|
|
71
|
+
*
|
|
72
|
+
* If we want to simulate the transaction we set the
|
|
73
|
+
* gas limit based on the simulation and add a small multiplier
|
|
74
|
+
* to be safe (factor of 1.1)
|
|
75
|
+
*/
|
|
76
|
+
private getTxWithStdFee;
|
|
77
|
+
/**
|
|
78
|
+
* Create TxRaw and simulate it
|
|
79
|
+
*/
|
|
80
|
+
private simulateTxRaw;
|
|
66
81
|
}
|
|
67
82
|
export {};
|
|
68
83
|
//# sourceMappingURL=MsgBroadcasterWithPk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MsgBroadcasterWithPk.d.ts","sourceRoot":"","sources":["../../../../../../src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAkBjC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EACL,OAAO,EAGP,gBAAgB,EACjB,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"MsgBroadcasterWithPk.d.ts","sourceRoot":"","sources":["../../../../../../src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAkBjC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EACL,OAAO,EAGP,gBAAgB,EACjB,MAAM,yBAAyB,CAAA;AAIhC,UAAU,uBAAuB;IAC/B,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAAA;IACnB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,2BAA2B;IACnC,OAAO,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,UAAU,EAAE,MAAM,GAAG,UAAU,CAAA;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IACxB,SAAS,EAAE,gBAAgB,CAAA;IAE3B,OAAO,EAAE,OAAO,CAAA;IAEhB,UAAU,EAAE,UAAU,CAAA;IAEtB,UAAU,EAAE,OAAO,CAAQ;gBAEtB,OAAO,EAAE,2BAA2B;IAahD;;;;;OAKG;IACG,SAAS,CAAC,WAAW,EAAE,uBAAuB;IAkEpD;;;;;OAKG;IACG,QAAQ,CAAC,WAAW,EAAE,uBAAuB;;;;;;;;;;;;IAmDnD;;;;;;;OAOG;YACW,eAAe;IAoB7B;;OAEG;YACW,aAAa;CAY5B"}
|
|
@@ -19,9 +19,11 @@ export class MsgBroadcasterWithPk {
|
|
|
19
19
|
endpoints;
|
|
20
20
|
chainId;
|
|
21
21
|
privateKey;
|
|
22
|
+
simulateTx = false;
|
|
22
23
|
constructor(options) {
|
|
23
24
|
const networkInfo = getNetworkInfo(options.network);
|
|
24
25
|
const endpoints = getNetworkEndpoints(options.network);
|
|
26
|
+
this.simulateTx = options.simulateTx || false;
|
|
25
27
|
this.chainId = networkInfo.chainId;
|
|
26
28
|
this.endpoints = { ...endpoints, ...(endpoints || {}) };
|
|
27
29
|
this.privateKey =
|
|
@@ -59,10 +61,10 @@ export class MsgBroadcasterWithPk {
|
|
|
59
61
|
const timeoutHeight = new BigNumberInBase(latestHeight).plus(DEFAULT_BLOCK_TIMEOUT_HEIGHT);
|
|
60
62
|
const gas = (transaction.gasLimit || getGasPriceBasedOnMessage(msgs)).toString();
|
|
61
63
|
/** Prepare the Transaction * */
|
|
62
|
-
const { signBytes, txRaw } =
|
|
64
|
+
const { signBytes, txRaw } = await this.getTxWithStdFee({
|
|
63
65
|
memo: tx.memo || '',
|
|
64
|
-
fee: getStdFee(gas),
|
|
65
66
|
message: msgs,
|
|
67
|
+
fee: getStdFee(gas),
|
|
66
68
|
timeoutHeight: timeoutHeight.toNumber(),
|
|
67
69
|
pubKey: publicKey.toBase64(),
|
|
68
70
|
sequence: accountDetails.sequence,
|
|
@@ -74,8 +76,7 @@ export class MsgBroadcasterWithPk {
|
|
|
74
76
|
/** Append Signatures */
|
|
75
77
|
txRaw.signatures = [signature];
|
|
76
78
|
/** Broadcast transaction */
|
|
77
|
-
const
|
|
78
|
-
const txResponse = await txApi.broadcast(txRaw);
|
|
79
|
+
const txResponse = await new TxGrpcApi(endpoints.grpc).broadcast(txRaw);
|
|
79
80
|
if (txResponse.code !== 0) {
|
|
80
81
|
throw new GeneralException(new Error(`Transaction failed to be broadcasted - ${txResponse.rawLog}`));
|
|
81
82
|
}
|
|
@@ -125,5 +126,35 @@ export class MsgBroadcasterWithPk {
|
|
|
125
126
|
const simulationResponse = await new TxGrpcApi(endpoints.grpc).simulate(txRaw);
|
|
126
127
|
return simulationResponse;
|
|
127
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* In case we don't want to simulate the transaction
|
|
131
|
+
* we get the gas limit based on the message type.
|
|
132
|
+
*
|
|
133
|
+
* If we want to simulate the transaction we set the
|
|
134
|
+
* gas limit based on the simulation and add a small multiplier
|
|
135
|
+
* to be safe (factor of 1.1)
|
|
136
|
+
*/
|
|
137
|
+
async getTxWithStdFee(args) {
|
|
138
|
+
const { simulateTx } = this;
|
|
139
|
+
if (!simulateTx) {
|
|
140
|
+
return createTransaction(args);
|
|
141
|
+
}
|
|
142
|
+
const result = await this.simulateTxRaw(args);
|
|
143
|
+
if (!result.gasInfo?.gasUsed) {
|
|
144
|
+
return createTransaction(args);
|
|
145
|
+
}
|
|
146
|
+
const stdGasFee = getStdFee(new BigNumberInBase(result.gasInfo.gasUsed).times(1.1).toFixed());
|
|
147
|
+
return createTransaction({ ...args, fee: stdGasFee });
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Create TxRaw and simulate it
|
|
151
|
+
*/
|
|
152
|
+
async simulateTxRaw(args) {
|
|
153
|
+
const { endpoints } = this;
|
|
154
|
+
const { txRaw } = createTransaction(args);
|
|
155
|
+
txRaw.signatures = [new Uint8Array(0)];
|
|
156
|
+
const simulationResponse = await new TxGrpcApi(endpoints.grpc).simulate(txRaw);
|
|
157
|
+
return simulationResponse;
|
|
158
|
+
}
|
|
128
159
|
}
|
|
129
160
|
//# sourceMappingURL=MsgBroadcasterWithPk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MsgBroadcasterWithPk.js","sourceRoot":"","sources":["../../../../../../src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,SAAS,EACT,eAAe,EACf,eAAe,EACf,4BAA4B,GAC7B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAEL,cAAc,EACd,mBAAmB,GAEpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"MsgBroadcasterWithPk.js","sourceRoot":"","sources":["../../../../../../src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE3D,O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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/sdk-ts",
|
|
3
3
|
"description": "SDK in TypeScript for building Injective applications in a browser, node, and react native environment.",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.54",
|
|
5
5
|
"sideEffects": "false",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@injectivelabs/mito-proto-ts": "1.0.9",
|
|
47
47
|
"@injectivelabs/networks": "^1.10.8",
|
|
48
48
|
"@injectivelabs/test-utils": "^1.10.3",
|
|
49
|
-
"@injectivelabs/token-metadata": "^1.10.
|
|
49
|
+
"@injectivelabs/token-metadata": "^1.10.28",
|
|
50
50
|
"@injectivelabs/ts-types": "^1.10.5",
|
|
51
51
|
"@injectivelabs/utils": "^1.10.6",
|
|
52
52
|
"@metamask/eth-sig-util": "^4.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"shx": "^0.3.2",
|
|
70
70
|
"snakecase-keys": "^5.4.1"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "36a826ea2a771944708b0a7bbbd77ecc7e0457b6",
|
|
73
73
|
"typedoc": {
|
|
74
74
|
"entryPoint": "./src/index.ts",
|
|
75
75
|
"readmeFile": "./README.md",
|