I tried to run the example code in examples/example-using-LPI-V2.js, but got an error:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'expiresAt' of undefined at Object.serializeIldcpRequest ($PROJECT_DIR\node_modules\ilp-protocol-ildcp\src\index.ts:47:24)
Analysis
In line 25 of example-using-LPI-V2.js, sendData() accepts the return value of Ildcp.serializeIldcpRequest() as its parameter, which needs to input a IldcpRequest object. However, there is not any object input.
Excepted Behaviour
Code run successfully and log It worked! in console, as line 35 says.
Description
I tried to run the example code in
examples/example-using-LPI-V2.js
, but got an error:UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'expiresAt' of undefined at Object.serializeIldcpRequest ($PROJECT_DIR\node_modules\ilp-protocol-ildcp\src\index.ts:47:24)
Analysis
In line 25 of
example-using-LPI-V2.js
,sendData()
accepts the return value ofIldcp.serializeIldcpRequest()
as its parameter, which needs to input aIldcpRequest
object. However, there is not any object input.Excepted Behaviour
Code run successfully and log
It worked!
in console, as line 35 says.