gabidi / cyphernode-js-sdk

Isomorphic Javascript Cyphernode SDK for Bitcoin, C-lightning and OTS
MIT License
9 stars 2 forks source link

Difficulty Testing #33

Open i5hi opened 2 years ago

i5hi commented 2 years ago

Hey, we were about to start building a cyphernode sdk and found your work.

I haven't been able to test it successfully locally.

tsc breaks with many errors.

I updated the tsconfig.json with some other flags I usually use and that has brought it down from 60ish errors to 14.

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "lib": ["dom", "es6"],
    "allowJs": true,
    "sourceMap": true, 
    "strict": false,
    "strictNullChecks": false,
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  },
  "include": ["src", "src/.ts"],
  "exclude": ["node_modules"],
}
Found 14 errors in 8 files.

Errors  Files
     3  src/clients/btcClient.spec.ts:27
     1  src/clients/btcClient.ts:186
     2  src/clients/lncClient.ts:52
     3  src/clients/otsClient.spec.ts:4
     2  src/clients/otsClient.ts:16
     1  src/examples/createLnInvoice.ts:20
     1  src/lib/cryptoUtil.ts:11
     1  src/transport/cypherNodeHttpTransportNoAgent.ts:21

I'm having a go at debugging this.

Let me know if you have any pointers or info that could help.

i5hi commented 2 years ago

The README.md is also missing specifying the ENV CYPHERNODE_API_KEY_ID

gabidi commented 2 years ago

Hi @i5hi , thanks for submitting this issue. it's been quite a while since i've updated this repo. Not sure if all functions and types are still in sync with CN. I'll check the TS errors when i get the time and update you/