Fix+improve wallet README (#1269)
This commit is contained in:
parent
1ef88664d4
commit
e517abb061
|
@ -197,7 +197,7 @@ The first argument is the [BOLT11 payment request](https://github.com/lightning/
|
|||
|
||||
### server.js
|
||||
|
||||
A wallet that supports receiving file must export the following properties in server.js which are only available if this wallet is imported on the server:
|
||||
A wallet that supports receiving must export the following properties in server.js which are only available if this wallet is imported on the server:
|
||||
|
||||
- `testConnectServer: async (config, context) => Promise<void>`
|
||||
|
||||
|
@ -205,11 +205,11 @@ A wallet that supports receiving file must export the following properties in se
|
|||
|
||||
It should attempt to create a test invoice to make sure that this wallet can later create invoices for receiving.
|
||||
|
||||
Again, like `testConnectClient`, the first argument is the wallet configuration that we should validate. However, unlike `testConnectClient`, the `context` argument here contains `me` (the user object) and `models` (the Prisma client).
|
||||
Again, like `testConnectClient`, the first argument is the wallet configuration that we should validate and this should thrown an error if validation fails. However, unlike `testConnectClient`, the `context` argument here contains `me` (the user object) and `models` (the Prisma client).
|
||||
|
||||
- `createInvoice: async (amount: int, config, context) => Promise<bolt11: string>`
|
||||
|
||||
`createInvoice` will be called whenever this wallet should receive a payment. The first argument `amount` specifies the amount in satoshis. The second argument `config` is the current configuration of this wallet. The third argument `context` is the same as in `testConnectServer` except it also includes `lnd` which is the return value of [`authenticatedLndGrpc`](https://github.com/alexbosworth/ln-service?tab=readme-ov-file#authenticatedlndgrpc) using the SN node credentials.
|
||||
`createInvoice` will be called whenever this wallet should receive a payment. It should return a BOLT11 payment request. The first argument `amount` specifies the amount in satoshis. The second argument `config` is the current configuration of this wallet. The third argument `context` is the same as in `testConnectServer` except it also includes `lnd` which is the return value of [`authenticatedLndGrpc`](https://github.com/alexbosworth/ln-service?tab=readme-ov-file#authenticatedlndgrpc) using the SN node credentials.
|
||||
|
||||
|
||||
> [!IMPORTANT]
|
||||
|
|
Loading…
Reference in New Issue