Skip to content

Commit

Permalink
Merge pull request #67 from lightninglabs/main
Browse files Browse the repository at this point in the history
[Releases] v0.2.0-alpha
  • Loading branch information
kaloudis authored Nov 22, 2022
2 parents 1ad5a5e + 35b6489 commit 1d2228a
Show file tree
Hide file tree
Showing 65 changed files with 222 additions and 26,133 deletions.
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,31 +106,6 @@ lnd.lightning.subscribeChannelEvents(
);
```

## Updating protos

First, update the service version under the `config` block in `package.json`.

eg.

```
"config": {
"lnd_release_tag": "v0.14.2-beta",
"loop_release_tag": "v0.17.0-beta",
"pool_release_tag": "v0.5.5-alpha",
"faraday_release_tag": "v0.2.5-alpha",
"protoc_version": "3.15.8"
},
```

Then run the following commands:

```
# download schemas
npm run update-protos
# format schemas
npm run generate
```

## Further documentation

- https://docs.lightning.engineering/lightning-network-tools/lightning-terminal/lnc-npm
2 changes: 1 addition & 1 deletion lib/api/createRpc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import LNC from '../lnc';
import { subscriptionMethods } from '../types/proto/schema';
import { subscriptionMethods } from '@lightninglabs/lnc-core';

// capitalize the first letter in the string
const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1);
Expand Down
17 changes: 0 additions & 17 deletions lib/api/faraday.ts

This file was deleted.

4 changes: 0 additions & 4 deletions lib/api/index.ts

This file was deleted.

44 changes: 0 additions & 44 deletions lib/api/lnd.ts

This file was deleted.

20 changes: 0 additions & 20 deletions lib/api/loop.ts

This file was deleted.

23 changes: 0 additions & 23 deletions lib/api/pool.ts

This file was deleted.

1 change: 0 additions & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ if (!WebAssembly.instantiateStreaming) {
}

export type { LncConfig, CredentialStore } from './types/lnc';
export * from './types/proto';

export default LNC;
20 changes: 13 additions & 7 deletions lib/lnc.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { FaradayApi, LndApi, LoopApi, PoolApi } from './api';
import {
FaradayApi,
LndApi,
LoopApi,
PoolApi,
snakeKeysToCamel
} from '@lightninglabs/lnc-core';
import { createRpc } from './api/createRpc';
import { CredentialStore, LncConfig, WasmGlobal } from './types/lnc';
import LncCredentialStore from './util/credentialStore';
import { wasmLog as log } from './util/log';
import { snakeKeysToCamel } from './util/objects';

/** The default values for the LncConfig options */
const DEFAULT_CONFIG = {
wasmClientCode: 'https://lightning.engineering/lnc-v0.1.12-alpha.wasm',
wasmClientCode: 'https://lightning.engineering/lnc-v0.2.0-alpha.wasm',
namespace: 'default',
serverHost: 'mailbox.terminal.lightning.today:443'
} as Required<LncConfig>;
Expand Down Expand Up @@ -52,10 +58,10 @@ export default class LNC {
const g = global || window || self;
this.go = new g.Go();

this.lnd = new LndApi(this);
this.loop = new LoopApi(this);
this.pool = new PoolApi(this);
this.faraday = new FaradayApi(this);
this.lnd = new LndApi(createRpc, this);
this.loop = new LoopApi(createRpc, this);
this.pool = new PoolApi(createRpc, this);
this.faraday = new FaradayApi(createRpc, this);
}

private get wasm() {
Expand Down
1 change: 0 additions & 1 deletion lib/types/proto/autopilotrpc.ts

This file was deleted.

1 change: 0 additions & 1 deletion lib/types/proto/chainrpc.ts

This file was deleted.

Loading

0 comments on commit 1d2228a

Please sign in to comment.