@gnolang/tm2-js-client 1.1.6 → 1.2.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.
|
@@ -129,7 +129,7 @@ export declare const Any: {
|
|
|
129
129
|
} & {
|
|
130
130
|
typeUrl?: string | undefined;
|
|
131
131
|
value?: Uint8Array | undefined;
|
|
132
|
-
} & { [K in Exclude<keyof I, keyof Any>]: never; }>(base?: I
|
|
132
|
+
} & { [K in Exclude<keyof I, keyof Any>]: never; }>(base?: I): Any;
|
|
133
133
|
fromPartial<I_1 extends {
|
|
134
134
|
typeUrl?: string | undefined;
|
|
135
135
|
value?: Uint8Array | undefined;
|
package/bin/proto/tm2/tx.d.ts
CHANGED
|
@@ -170,7 +170,7 @@ export declare const Tx: {
|
|
|
170
170
|
signature?: Uint8Array | undefined;
|
|
171
171
|
}[]>]: never; }) | undefined;
|
|
172
172
|
memo?: string | undefined;
|
|
173
|
-
} & { [K_7 in Exclude<keyof I, keyof Tx>]: never; }>(base?: I
|
|
173
|
+
} & { [K_7 in Exclude<keyof I, keyof Tx>]: never; }>(base?: I): Tx;
|
|
174
174
|
fromPartial<I_1 extends {
|
|
175
175
|
messages?: {
|
|
176
176
|
typeUrl?: string | undefined;
|
|
@@ -393,7 +393,7 @@ export declare const TxFee: {
|
|
|
393
393
|
xor: (other: string | number | Long) => Long;
|
|
394
394
|
} & { [K in Exclude<keyof I["gasWanted"], keyof Long>]: never; }) | undefined;
|
|
395
395
|
gasFee?: string | undefined;
|
|
396
|
-
} & { [K_1 in Exclude<keyof I, keyof TxFee>]: never; }>(base?: I
|
|
396
|
+
} & { [K_1 in Exclude<keyof I, keyof TxFee>]: never; }>(base?: I): TxFee;
|
|
397
397
|
fromPartial<I_1 extends {
|
|
398
398
|
gasWanted?: string | number | Long | undefined;
|
|
399
399
|
gasFee?: string | undefined;
|
|
@@ -493,7 +493,7 @@ export declare const TxSignature: {
|
|
|
493
493
|
value?: Uint8Array | undefined;
|
|
494
494
|
} & { [K in Exclude<keyof I["pubKey"], keyof Any>]: never; }) | undefined;
|
|
495
495
|
signature?: Uint8Array | undefined;
|
|
496
|
-
} & { [K_1 in Exclude<keyof I, keyof TxSignature>]: never; }>(base?: I
|
|
496
|
+
} & { [K_1 in Exclude<keyof I, keyof TxSignature>]: never; }>(base?: I): TxSignature;
|
|
497
497
|
fromPartial<I_1 extends {
|
|
498
498
|
pubKey?: {
|
|
499
499
|
typeUrl?: string | undefined;
|
|
@@ -520,7 +520,7 @@ export declare const PubKeySecp256k1: {
|
|
|
520
520
|
key?: Uint8Array | undefined;
|
|
521
521
|
} & {
|
|
522
522
|
key?: Uint8Array | undefined;
|
|
523
|
-
} & { [K in Exclude<keyof I, "key">]: never; }>(base?: I
|
|
523
|
+
} & { [K in Exclude<keyof I, "key">]: never; }>(base?: I): PubKeySecp256k1;
|
|
524
524
|
fromPartial<I_1 extends {
|
|
525
525
|
key?: Uint8Array | undefined;
|
|
526
526
|
} & {
|
|
@@ -10,7 +10,7 @@ export declare const newRequest: (method: string, params?: any[]) => RPCRequest;
|
|
|
10
10
|
* @param {Result} result the response result, if any
|
|
11
11
|
* @param {RPCError} error the response error, if any
|
|
12
12
|
*/
|
|
13
|
-
export declare const newResponse: <Result>(result?: Result
|
|
13
|
+
export declare const newResponse: <Result>(result?: Result, error?: RPCError) => RPCResponse<Result>;
|
|
14
14
|
/**
|
|
15
15
|
* Parses the base64 encoded ABCI JSON into a concrete type
|
|
16
16
|
* @param {string} data the base64-encoded JSON
|
package/bin/wallet/wallet.js
CHANGED
|
@@ -183,7 +183,7 @@ var Wallet = /** @class */ (function () {
|
|
|
183
183
|
* encoded message values to be decoded for sorting
|
|
184
184
|
*/
|
|
185
185
|
this.signTransaction = function (tx, decodeTxMessages) { return __awaiter(_this, void 0, void 0, function () {
|
|
186
|
-
var status, chainID, address, accountNumber, accountSequence, publicKey,
|
|
186
|
+
var status, chainID, address, accountNumber, accountSequence, publicKey, signPayload, signBytes, wrappedKey, txSignature;
|
|
187
187
|
var _b;
|
|
188
188
|
return __generator(this, function (_c) {
|
|
189
189
|
switch (_c.label) {
|
|
@@ -211,7 +211,6 @@ var Wallet = /** @class */ (function () {
|
|
|
211
211
|
return [4 /*yield*/, this.signer.getPublicKey()];
|
|
212
212
|
case 5:
|
|
213
213
|
publicKey = _c.sent();
|
|
214
|
-
defaultSigTimestamp = '0001-01-01T00:00:00Z';
|
|
215
214
|
signPayload = {
|
|
216
215
|
chain_id: chainID,
|
|
217
216
|
account_number: accountNumber.toString(10),
|
|
@@ -222,7 +221,6 @@ var Wallet = /** @class */ (function () {
|
|
|
222
221
|
},
|
|
223
222
|
msgs: decodeTxMessages(tx.messages), // unrolled message objects
|
|
224
223
|
memo: tx.memo,
|
|
225
|
-
time: defaultSigTimestamp,
|
|
226
224
|
};
|
|
227
225
|
signBytes = (0, utility_1.stringToUTF8)((0, utility_1.encodeCharacterSet)((0, signdoc_1.sortedJsonStringify)(signPayload)));
|
|
228
226
|
wrappedKey = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnolang/tm2-js-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Tendermint2 JS / TS Client",
|
|
5
5
|
"main": "./bin/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -26,22 +26,22 @@
|
|
|
26
26
|
"registry": "https://registry.npmjs.org/"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/jest": "^29.5.
|
|
29
|
+
"@types/jest": "^29.5.12",
|
|
30
30
|
"@types/long": "^5.0.0",
|
|
31
|
-
"@types/node": "^20.
|
|
32
|
-
"@types/ws": "^8.5.
|
|
31
|
+
"@types/node": "^20.12.5",
|
|
32
|
+
"@types/ws": "^8.5.10",
|
|
33
33
|
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
|
34
34
|
"@typescript-eslint/parser": "^5.59.5",
|
|
35
35
|
"eslint": "^8.56.0",
|
|
36
36
|
"eslint-config-prettier": "^9.0.0",
|
|
37
37
|
"eslint-plugin-prettier": "5.1.2",
|
|
38
|
-
"jest": "^29.
|
|
38
|
+
"jest": "^29.7.0",
|
|
39
39
|
"jest-mock-extended": "^3.0.4",
|
|
40
40
|
"jest-websocket-mock": "^2.4.0",
|
|
41
41
|
"prettier": "^3.2.2",
|
|
42
42
|
"ts-jest": "^29.1.0",
|
|
43
|
-
"ts-proto": "^1.
|
|
44
|
-
"typescript": "^5.
|
|
43
|
+
"ts-proto": "^1.172.0",
|
|
44
|
+
"typescript": "^5.4.4"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@cosmjs/amino": "^0.32.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"long": "^5.2.3",
|
|
53
53
|
"protobufjs": "^7.2.3",
|
|
54
54
|
"uuid": "^9.0.1",
|
|
55
|
-
"ws": "^8.
|
|
55
|
+
"ws": "^8.16.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"tsc": "tsc",
|