diff --git a/lib/index.js b/lib/index.js index f94cf17..5b10ff9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -241,6 +241,7 @@ RpcClient.callspec = { getSpentInfo: 'obj', getSuperBlockBudget: 'int', getTransaction: '', + getTxChainLocks: 'array', getTxOut: 'str int bool', getTxOutProof: 'str str', getTxOutSetInfo: '', @@ -385,6 +386,12 @@ function generateRPCMethods(constructor, apiCalls, rpc) { } return arg; }, + array(arg) { + if (typeof arg === 'string') { + return JSON.parse(arg); + } + return arg; + }, }; for (const k in apiCalls) {