@harmony-js/core
Advanced tools
Comparing version 0.1.28 to 0.1.29
@@ -65,2 +65,6 @@ import { Messenger, NewPendingTransactions, NewHeaders, LogSub, Syncing } from '@harmony-js/network'; | ||
}): Promise<any>; | ||
getCxReceiptByHash({ txnHash, shardID }: { | ||
txnHash: string; | ||
shardID: number; | ||
}): Promise<any>; | ||
/** | ||
@@ -67,0 +71,0 @@ * |
@@ -177,2 +177,16 @@ "use strict"; | ||
}; | ||
Blockchain.prototype.getCxReceiptByHash = function (_a) { | ||
var txnHash = _a.txnHash, shardID = _a.shardID; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.messenger.send("hmy_getCXReceiptByHash" /* GetCXReceiptByHash */, [txnHash], this.messenger.chainPrefix, shardID)]; | ||
case 1: | ||
result = _b.sent(); | ||
return [2 /*return*/, this.getRpcResult(result)]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
@@ -497,2 +511,11 @@ * | ||
utils_1.assertObject({ | ||
txnHash: ['isString', "required" /* required */], | ||
shardID: ['isNumber', "required" /* required */], | ||
}), | ||
tslib_1.__metadata("design:type", Function), | ||
tslib_1.__metadata("design:paramtypes", [Object]), | ||
tslib_1.__metadata("design:returntype", Promise) | ||
], Blockchain.prototype, "getCxReceiptByHash", null); | ||
tslib_1.__decorate([ | ||
utils_1.assertObject({ | ||
address: ['isValidAddress', "required" /* required */], | ||
@@ -499,0 +522,0 @@ blockNumber: ['isBlockNumber', "optional" /* optional */], |
@@ -308,2 +308,16 @@ /** | ||
}; | ||
Blockchain.prototype.getCxReceiptByHash = function (_a) { | ||
var txnHash = _a.txnHash, shardID = _a.shardID; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.messenger.send("hmy_getCXReceiptByHash" /* GetCXReceiptByHash */, [txnHash], this.messenger.chainPrefix, shardID)]; | ||
case 1: | ||
result = _b.sent(); | ||
return [2 /*return*/, this.getRpcResult(result)]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
@@ -628,2 +642,11 @@ * | ||
utils.assertObject({ | ||
txnHash: ['isString', "required" /* required */], | ||
shardID: ['isNumber', "required" /* required */], | ||
}), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [Object]), | ||
__metadata("design:returntype", Promise) | ||
], Blockchain.prototype, "getCxReceiptByHash", null); | ||
__decorate([ | ||
utils.assertObject({ | ||
address: ['isValidAddress', "required" /* required */], | ||
@@ -630,0 +653,0 @@ blockNumber: ['isBlockNumber', "optional" /* optional */], |
@@ -7,3 +7,3 @@ /** | ||
import * as utils from '@harmony-js/utils'; | ||
import { assertObject, defaultConfig, HarmonyCore, hexToNumber, Unit } from '@harmony-js/utils'; | ||
import { assertObject, defaultConfig, HarmonyCore, Unit, hexToNumber } from '@harmony-js/utils'; | ||
import * as crypto from '@harmony-js/crypto'; | ||
@@ -307,2 +307,16 @@ import { getAddress } from '@harmony-js/crypto'; | ||
}; | ||
Blockchain.prototype.getCxReceiptByHash = function (_a) { | ||
var txnHash = _a.txnHash, shardID = _a.shardID; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.messenger.send("hmy_getCXReceiptByHash" /* GetCXReceiptByHash */, [txnHash], this.messenger.chainPrefix, shardID)]; | ||
case 1: | ||
result = _b.sent(); | ||
return [2 /*return*/, this.getRpcResult(result)]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
@@ -627,2 +641,11 @@ * | ||
assertObject({ | ||
txnHash: ['isString', "required" /* required */], | ||
shardID: ['isNumber', "required" /* required */], | ||
}), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [Object]), | ||
__metadata("design:returntype", Promise) | ||
], Blockchain.prototype, "getCxReceiptByHash", null); | ||
__decorate([ | ||
assertObject({ | ||
address: ['isValidAddress', "required" /* required */], | ||
@@ -629,0 +652,0 @@ blockNumber: ['isBlockNumber', "optional" /* optional */], |
@@ -303,2 +303,16 @@ /** | ||
}; | ||
Blockchain.prototype.getCxReceiptByHash = function (_a) { | ||
var txnHash = _a.txnHash, shardID = _a.shardID; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var result; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.messenger.send("hmy_getCXReceiptByHash" /* GetCXReceiptByHash */, [txnHash], this.messenger.chainPrefix, shardID)]; | ||
case 1: | ||
result = _b.sent(); | ||
return [2 /*return*/, this.getRpcResult(result)]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
@@ -623,2 +637,11 @@ * | ||
utils.assertObject({ | ||
txnHash: ['isString', "required" /* required */], | ||
shardID: ['isNumber', "required" /* required */], | ||
}), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [Object]), | ||
__metadata("design:returntype", Promise) | ||
], Blockchain.prototype, "getCxReceiptByHash", null); | ||
__decorate([ | ||
utils.assertObject({ | ||
address: ['isValidAddress', "required" /* required */], | ||
@@ -625,0 +648,0 @@ blockNumber: ['isBlockNumber', "optional" /* optional */], |
{ | ||
"name": "@harmony-js/core", | ||
"version": "0.1.28", | ||
"version": "0.1.29", | ||
"description": "harmony core package", | ||
@@ -21,10 +21,10 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@harmony-js/account": "0.1.28", | ||
"@harmony-js/contract": "0.1.28", | ||
"@harmony-js/account": "0.1.29", | ||
"@harmony-js/contract": "0.1.29", | ||
"@harmony-js/crypto": "0.1.28", | ||
"@harmony-js/network": "0.1.28", | ||
"@harmony-js/transaction": "0.1.28", | ||
"@harmony-js/network": "0.1.29", | ||
"@harmony-js/transaction": "0.1.29", | ||
"@harmony-js/utils": "0.1.28" | ||
}, | ||
"gitHead": "1ccc7071aee39a4597caa1019c36104420499af9" | ||
"gitHead": "2e3bd054b8a87030574b20397cc73256b264feef" | ||
} |
@@ -258,2 +258,16 @@ import { | ||
} | ||
@assertObject({ | ||
txnHash: ['isString', AssertType.required], | ||
shardID: ['isNumber', AssertType.required], | ||
}) | ||
async getCxReceiptByHash({ txnHash, shardID }: { txnHash: string; shardID: number }) { | ||
const result = await this.messenger.send( | ||
RPCMethod.GetCXReceiptByHash, | ||
[txnHash], | ||
this.messenger.chainPrefix, | ||
shardID, | ||
); | ||
return this.getRpcResult(result); | ||
} | ||
/** | ||
@@ -260,0 +274,0 @@ * |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
507009
5919
+ Added@harmony-js/account@0.1.29(transitive)
+ Added@harmony-js/contract@0.1.29(transitive)
+ Added@harmony-js/network@0.1.29(transitive)
+ Added@harmony-js/transaction@0.1.29(transitive)
- Removed@harmony-js/account@0.1.28(transitive)
- Removed@harmony-js/contract@0.1.28(transitive)
- Removed@harmony-js/network@0.1.28(transitive)
- Removed@harmony-js/transaction@0.1.28(transitive)
Updated@harmony-js/account@0.1.29
Updated@harmony-js/contract@0.1.29
Updated@harmony-js/network@0.1.29