@xchainjs/xchain-thorchain 0.27.9 → 0.27.11
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/lib/client.d.ts +1 -0
- package/lib/index.esm.js +9 -2
- package/lib/index.js +9 -2
- package/package.json +5 -7
package/lib/client.d.ts
CHANGED
|
@@ -205,6 +205,7 @@ declare class Client extends BaseXChainClient implements ThorchainClient, XChain
|
|
|
205
205
|
gasLimit?: BigNumber;
|
|
206
206
|
sequence?: number;
|
|
207
207
|
}): Promise<TxHash>;
|
|
208
|
+
broadcastTx(txHex: string): Promise<TxHash>;
|
|
208
209
|
/**
|
|
209
210
|
* Transfer without broadcast balances with MsgSend
|
|
210
211
|
*
|
package/lib/index.esm.js
CHANGED
|
@@ -10311,8 +10311,10 @@ class Client extends BaseXChainClient {
|
|
|
10311
10311
|
throw new Error(`Failed to get transaction logs (tx-hash: ${txId})`);
|
|
10312
10312
|
const sender = (_a = transfer[0].attributes.find((attr) => attr.key === 'sender')) === null || _a === void 0 ? void 0 : _a.value;
|
|
10313
10313
|
const senderAmount = transfer[0].attributes.filter((attr) => attr.key === 'amount')[1].value;
|
|
10314
|
-
const
|
|
10315
|
-
const
|
|
10314
|
+
const regex = /[a-zA-Z]+$/;
|
|
10315
|
+
const match = senderAmount.match(regex);
|
|
10316
|
+
const asset = match ? match[0] : null;
|
|
10317
|
+
const senderAsset = asset === 'rune' ? AssetRuneNative : assetFromStringEx(`${asset}`);
|
|
10316
10318
|
const senderAddress = sender ? sender : address;
|
|
10317
10319
|
const message = txResult.logs && txResult.logs[0].events.filter((i) => i.type === 'message');
|
|
10318
10320
|
const coinSpent = txResult.logs && txResult.logs[0].events.filter((i) => i.type === 'coin_spent');
|
|
@@ -10572,6 +10574,11 @@ class Client extends BaseXChainClient {
|
|
|
10572
10574
|
return txHash;
|
|
10573
10575
|
});
|
|
10574
10576
|
}
|
|
10577
|
+
broadcastTx(txHex) {
|
|
10578
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10579
|
+
return yield this.getCosmosClient().broadcast(txHex);
|
|
10580
|
+
});
|
|
10581
|
+
}
|
|
10575
10582
|
/**
|
|
10576
10583
|
* Transfer without broadcast balances with MsgSend
|
|
10577
10584
|
*
|
package/lib/index.js
CHANGED
|
@@ -10320,8 +10320,10 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
10320
10320
|
throw new Error(`Failed to get transaction logs (tx-hash: ${txId})`);
|
|
10321
10321
|
const sender = (_a = transfer[0].attributes.find((attr) => attr.key === 'sender')) === null || _a === void 0 ? void 0 : _a.value;
|
|
10322
10322
|
const senderAmount = transfer[0].attributes.filter((attr) => attr.key === 'amount')[1].value;
|
|
10323
|
-
const
|
|
10324
|
-
const
|
|
10323
|
+
const regex = /[a-zA-Z]+$/;
|
|
10324
|
+
const match = senderAmount.match(regex);
|
|
10325
|
+
const asset = match ? match[0] : null;
|
|
10326
|
+
const senderAsset = asset === 'rune' ? AssetRuneNative : xchainUtil.assetFromStringEx(`${asset}`);
|
|
10325
10327
|
const senderAddress = sender ? sender : address;
|
|
10326
10328
|
const message = txResult.logs && txResult.logs[0].events.filter((i) => i.type === 'message');
|
|
10327
10329
|
const coinSpent = txResult.logs && txResult.logs[0].events.filter((i) => i.type === 'coin_spent');
|
|
@@ -10581,6 +10583,11 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
10581
10583
|
return txHash;
|
|
10582
10584
|
});
|
|
10583
10585
|
}
|
|
10586
|
+
broadcastTx(txHex) {
|
|
10587
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10588
|
+
return yield this.getCosmosClient().broadcast(txHex);
|
|
10589
|
+
});
|
|
10590
|
+
}
|
|
10584
10591
|
/**
|
|
10585
10592
|
* Transfer without broadcast balances with MsgSend
|
|
10586
10593
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.11",
|
|
4
4
|
"description": "Custom Thorchain client and utilities used by XChainJS clients",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"THORChain",
|
|
@@ -36,11 +36,9 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@cosmos-client/core": "0.46.1",
|
|
38
38
|
"@types/big.js": "^6.0.0",
|
|
39
|
-
"@xchainjs/xchain-
|
|
40
|
-
"@xchainjs/xchain-
|
|
41
|
-
"@xchainjs/xchain-cosmos": "^0.20.8",
|
|
39
|
+
"@xchainjs/xchain-client": "^0.13.7",
|
|
40
|
+
"@xchainjs/xchain-cosmos": "^0.20.9",
|
|
42
41
|
"@xchainjs/xchain-crypto": "^0.2.6",
|
|
43
|
-
"@xchainjs/xchain-ethereum": "^0.27.7",
|
|
44
42
|
"@xchainjs/xchain-util": "^0.12.0",
|
|
45
43
|
"axios": "^0.25.0",
|
|
46
44
|
"bech32-buffer": "^0.2.0",
|
|
@@ -51,8 +49,8 @@
|
|
|
51
49
|
},
|
|
52
50
|
"peerDependencies": {
|
|
53
51
|
"@cosmos-client/core": "0.46.1",
|
|
54
|
-
"@xchainjs/xchain-client": "^0.13.
|
|
55
|
-
"@xchainjs/xchain-cosmos": "^0.20.
|
|
52
|
+
"@xchainjs/xchain-client": "^0.13.7",
|
|
53
|
+
"@xchainjs/xchain-cosmos": "^0.20.9",
|
|
56
54
|
"@xchainjs/xchain-crypto": "^0.2.6",
|
|
57
55
|
"@xchainjs/xchain-util": "^0.12.0",
|
|
58
56
|
"axios": "^0.25.0",
|