4

According to iota.lib.js documents,

iota.api.getInputs(seed, [, options], callback)

the getInputs() have a options argument. options object have four members, start, end, security and inclusionStates.

i try to given the start value as 100. i expect to show only these transactions which address key index is greater than 100.

However, it still displays all transactions.

Do I misinterpret this function?


For @mihi. Sure. please check the following code.

const IOTA = require('iota.lib.js');
const iota = new IOTA ({});
const dir = require('./directory.js');

iota.api.getTransfers(dir.ivy_seed, [{start: 100}], (e, s) => {
    console.log("trans:", s); 
});
0

1 Answer 1

3

The options argument is just an object, not an array (that goes for both getInputs and getTansfers). It should work if you remove the square brackets. The confusion is understandable since the docs have square brackets around it, i have made similar mistakes.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.