@omisego/omg-js-rootchain
Advanced tools
Comparing version 3.0.0-alpha.19 to 3.0.0-alpha.20
{ | ||
"name": "@omisego/omg-js-rootchain", | ||
"version": "3.0.0-alpha.19", | ||
"version": "3.0.0-alpha.20", | ||
"description": "Module to interact with the Ethereum RootChain", | ||
@@ -28,6 +28,7 @@ "keywords": [ | ||
"@hapi/joi": "^16.1.8", | ||
"@omisego/omg-js-util": "^3.0.0-alpha.19", | ||
"@omisego/omg-js-util": "^3.0.0-alpha.20", | ||
"abi-decoder": "^2.2.2", | ||
"bn.js": "^5.0.0", | ||
"debug": "^4.0.1", | ||
"ethereumjs-util": "^6.2.0", | ||
"human-standard-token-abi": "^2.0.0", | ||
@@ -39,3 +40,3 @@ "web3-utils": "^1.2.3" | ||
}, | ||
"gitHead": "9413e3b0361c10f8e2b9e3254bf2a85f808ffaca" | ||
"gitHead": "b1596d8605446bcf140762287e2dbc9dc90af59a" | ||
} |
@@ -19,2 +19,3 @@ /* | ||
const erc20abi = require('human-standard-token-abi') | ||
const ethUtil = require('ethereumjs-util') | ||
const BN = require('bn.js') | ||
@@ -35,2 +36,3 @@ const abiDecoder = require('abi-decoder') | ||
getInFlightExitIdSchema, | ||
getInFlightExitDataSchema, | ||
startInFlightExitSchema, | ||
@@ -326,2 +328,16 @@ piggybackInFlightExitOnOutputSchema, | ||
/** | ||
* Retrieves in-flight exit data from exit IDs | ||
* | ||
* @method getInFlightExitData | ||
* @param {Object} args an arguments object | ||
* @param {string[]} args.exitIds exit ids to retrieve data for | ||
* @return {Promise<Object[]>} promise that resolves with the exit data | ||
*/ | ||
async getInFlightExitData ({ exitIds }) { | ||
Joi.assert({ exitIds }, getInFlightExitDataSchema) | ||
const { contract } = await this.getPaymentExitGame() | ||
return contract.methods.inFlightExits(exitIds).call() | ||
} | ||
/** | ||
* Starts a standard withdrawal of a given output. Uses output-age priority | ||
@@ -445,3 +461,4 @@ * | ||
inputIndex, | ||
challengeTxSig | ||
challengeTxSig, | ||
ethUtil.keccak256(txOptions.from) | ||
] | ||
@@ -841,3 +858,4 @@ ), | ||
inputTx, | ||
inputUtxoPos.toString() | ||
inputUtxoPos.toString(), | ||
ethUtil.keccak256(txOptions.from) | ||
] | ||
@@ -901,3 +919,4 @@ ), | ||
challengingTxInputIndex, | ||
challengingTxWitness | ||
challengingTxWitness, | ||
ethUtil.keccak256(txOptions.from) | ||
] | ||
@@ -904,0 +923,0 @@ ), |
@@ -80,2 +80,6 @@ const Joi = require('@hapi/joi') | ||
const getInFlightExitDataSchema = Joi.object({ | ||
exitIds: Joi.array().items(Joi.string().required()) | ||
}) | ||
const startInFlightExitSchema = Joi.object({ | ||
@@ -169,2 +173,3 @@ inFlightTx: Joi.string().required(), | ||
getInFlightExitIdSchema, | ||
getInFlightExitDataSchema, | ||
startInFlightExitSchema, | ||
@@ -171,0 +176,0 @@ piggybackInFlightExitOnOutputSchema, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
972238
17926
8