@keldra/sdk 0.1.3 → 0.1.5
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/index.cjs +3 -2
- package/dist/index.js +3 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -236,9 +236,9 @@ var KeldraClient = class _KeldraClient {
|
|
|
236
236
|
}
|
|
237
237
|
async submit(chain, signedTx) {
|
|
238
238
|
const rawBytes = parseHex(signedTx);
|
|
239
|
-
const padded = padTransaction(rawBytes);
|
|
240
239
|
let request;
|
|
241
240
|
if (this.noisePublicKey && this.noiseKid && this.encryptFn) {
|
|
241
|
+
const padded = padTransaction(rawBytes);
|
|
242
242
|
const encrypted = await this.encryptFn(padded, this.noisePublicKey);
|
|
243
243
|
const b64 = toBase64(encrypted);
|
|
244
244
|
request = {
|
|
@@ -251,7 +251,8 @@ var KeldraClient = class _KeldraClient {
|
|
|
251
251
|
} else {
|
|
252
252
|
request = {
|
|
253
253
|
chain,
|
|
254
|
-
|
|
254
|
+
// Plain submit must keep the original signed tx bytes.
|
|
255
|
+
signed_tx: signedTx.startsWith("0x") ? signedTx : `0x${toHex(rawBytes)}`,
|
|
255
256
|
options: { delay_profile: this.defaultDelayProfile }
|
|
256
257
|
};
|
|
257
258
|
}
|
package/dist/index.js
CHANGED
|
@@ -236,9 +236,9 @@ var KeldraClient = class _KeldraClient {
|
|
|
236
236
|
}
|
|
237
237
|
async submit(chain, signedTx) {
|
|
238
238
|
const rawBytes = parseHex(signedTx);
|
|
239
|
-
const padded = padTransaction(rawBytes);
|
|
240
239
|
let request;
|
|
241
240
|
if (this.noisePublicKey && this.noiseKid && this.encryptFn) {
|
|
241
|
+
const padded = padTransaction(rawBytes);
|
|
242
242
|
const encrypted = await this.encryptFn(padded, this.noisePublicKey);
|
|
243
243
|
const b64 = toBase64(encrypted);
|
|
244
244
|
request = {
|
|
@@ -251,7 +251,8 @@ var KeldraClient = class _KeldraClient {
|
|
|
251
251
|
} else {
|
|
252
252
|
request = {
|
|
253
253
|
chain,
|
|
254
|
-
|
|
254
|
+
// Plain submit must keep the original signed tx bytes.
|
|
255
|
+
signed_tx: signedTx.startsWith("0x") ? signedTx : `0x${toHex(rawBytes)}`,
|
|
255
256
|
options: { delay_profile: this.defaultDelayProfile }
|
|
256
257
|
};
|
|
257
258
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keldra/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "TypeScript SDK for Keldra relay API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Keldra",
|
|
7
|
-
"homepage": "https://github.com/
|
|
7
|
+
"homepage": "https://github.com/keldra-org/keldra-sdk#readme",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/keldra-org/keldra-sdk.git"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/
|
|
13
|
+
"url": "https://github.com/keldra-org/keldra-sdk/issues"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"keldra",
|