Skip to content

Commit c860aff

Browse files
committed
chore(typescript-sdk): publish v0.0.57
1 parent 290e4b4 commit c860aff

File tree

2 files changed

+13
-47
lines changed

2 files changed

+13
-47
lines changed

typescript-sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@unionlabs/client",
3-
"version": "0.0.56",
3+
"version": "0.0.57",
44
"homepage": "https://union.build",
55
"description": "Union Labs cross-chain transfers client",
66
"type": "module",

typescript-sdk/patches/@cosmjs+tendermint-rpc+0.33.0.patch

+12-46
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/@cosmjs/tendermint-rpc/build/comet38/adaptor/responses.js b/node_modules/@cosmjs/tendermint-rpc/build/comet38/adaptor/responses.js
2-
index 29ec063..56d44e3 100644
2+
index 29ec063..28a5c02 100644
33
--- a/node_modules/@cosmjs/tendermint-rpc/build/comet38/adaptor/responses.js
44
+++ b/node_modules/@cosmjs/tendermint-rpc/build/comet38/adaptor/responses.js
55
@@ -72,7 +72,7 @@ function decodePubkey(data) {
@@ -24,57 +24,23 @@ index 29ec063..56d44e3 100644
2424
+ return {
2525
+ algorithm: "bn254",
2626
+ data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)),
27-
+ };
28-
default:
29-
throw new Error(`unknown pubkey type: ${data.type}`);
30-
}
31-
diff --git a/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js b/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js
32-
index 9e50f2b..161629f 100644
33-
--- a/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js
34-
+++ b/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js
35-
@@ -39,11 +39,17 @@ function decodeAbciQuery(data) {
36-
};
37-
}
38-
function decodeAttribute(attribute) {
39-
- return {
40-
- key: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(attribute.key)),
41-
- value: (0, encoding_1.fromBase64)((0, encodings_1.assertString)(attribute.value ?? "")),
42-
- };
43-
+ try {
44-
+ return {
45-
+ key: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(attribute.key ?? "")),
46-
+ value: (0, encoding_1.fromBase64)((0, encodings_1.assertString)(attribute.value ?? "")),
47-
+ };
48-
+ }
49-
+ catch {
50-
+ return { key: "", value: "" };
51-
+ }
52-
}
53-
+
54-
function decodeAttributes(attributes) {
55-
return (0, encodings_1.assertArray)(attributes).map(decodeAttribute);
56-
}
57-
@@ -91,6 +97,16 @@ function decodePubkey(data) {
58-
algorithm: "secp256k1",
59-
data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)),
60-
};
61-
+ case "tendermint/PubKeyBn254":
62-
+ return {
63-
+ algorithm: "bn254",
64-
+ data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)),
65-
+ };
66-
+ case "cometbft/PubKeyBn254":
67-
+ return {
68-
+ algorithm: "bn254",
69-
+ data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)),
7027
+ };
7128
default:
7229
throw new Error(`unknown pubkey type: ${data.type}`);
7330
}
7431
diff --git a/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js b/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js
75-
index 19df9de..09ca2ed 100644
32+
index 19df9de..0015044 100644
7633
--- a/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js
7734
+++ b/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js
35+
@@ -72,7 +72,7 @@ function decodePubkey(data) {
36+
if ("Sum" in data) {
37+
// we don't need to check type because we're checking algorithm
38+
const [[algorithm, value]] = Object.entries(data.Sum.value);
39+
- (0, utils_1.assert)(algorithm === "ed25519" || algorithm === "secp256k1", `unknown pubkey type: ${algorithm}`);
40+
+ (0, utils_1.assert)(algorithm === "ed25519" || algorithm === "secp256k1" || algorithm === "bn254", `unknown pubkey type: ${algorithm}`);
41+
return {
42+
algorithm,
43+
data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(value)),
7844
@@ -91,6 +91,16 @@ function decodePubkey(data) {
7945
algorithm: "secp256k1",
8046
data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)),
@@ -93,7 +59,7 @@ index 19df9de..09ca2ed 100644
9359
throw new Error(`unknown pubkey type: ${data.type}`);
9460
}
9561
diff --git a/node_modules/@cosmjs/tendermint-rpc/build/tendermintclient.js b/node_modules/@cosmjs/tendermint-rpc/build/tendermintclient.js
96-
index 257b104..6626da9 100644
62+
index 257b104..dbf2240 100644
9763
--- a/node_modules/@cosmjs/tendermint-rpc/build/tendermintclient.js
9864
+++ b/node_modules/@cosmjs/tendermint-rpc/build/tendermintclient.js
9965
@@ -28,7 +28,7 @@ async function connectComet(endpoint) {

0 commit comments

Comments
 (0)