-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LNC Receiver (w/ microservice) #1763
Open
riccardobl
wants to merge
9
commits into
stackernews:master
Choose a base branch
from
riccardobl:lncrecvV2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1a2176e
support generated fields on serverside wallets
riccardobl a897745
lnc receiver
riccardobl 5e2035e
Merge branch 'master' into lncrecvV2
riccardobl 5f8d596
use sn fork
riccardobl e6b846b
auth and tls
riccardobl 04b959f
add certs
riccardobl c2dac7a
update health check
riccardobl a236054
Update Dockerfile
riccardobl be3c3e1
Merge branch 'master' into lncrecvV2
riccardobl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM debian:bookworm-slim | ||
RUN useradd -u 1000 -m lncd | ||
|
||
ARG VERSION=0.3.2 | ||
ARG REPO=stackernews/lncd | ||
ARG DOWNLOAD_URL=https://github.com/$REPO/releases/download/$VERSION/lncd | ||
|
||
RUN mkdir -p /home/lncd | ||
ADD certs /home/lncd/certs | ||
|
||
ENV LNCD_TLS_CERT_PATH=/home/lncd/certs/cert.pem | ||
ENV LNCD_TLS_KEY_PATH=/home/lncd/certs/key.pem | ||
|
||
RUN chown 1000:1000 -Rvf /home/lncd/ &&\ | ||
apt-get update && apt-get install -y curl &&\ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
USER lncd | ||
RUN curl --proto '=https' --tlsv1.2 -LsSf $DOWNLOAD_URL -o /home/lncd/lncd && chmod +x /home/lncd/lncd | ||
WORKDIR /home/lncd | ||
EXPOSE 7167 | ||
|
||
CMD ["./lncd"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDqzCCApOgAwIBAgIUJhr5a7rfqexg9w7fZ7Y02N7hjUswDQYJKoZIhvcNAQEL | ||
BQAwZTELMAkGA1UEBhMCSFUxETAPBgNVBAgMCEJ1ZGFwZXN0MREwDwYDVQQHDAhC | ||
dWRhcGVzdDENMAsGA1UECgwETE5DRDENMAsGA1UECwwETE5DRDESMBAGA1UEAwwJ | ||
bG9jYWxob3N0MB4XDTI0MTIzMTIwMjc1MVoXDTI1MTIzMTIwMjc1MVowZTELMAkG | ||
A1UEBhMCSFUxETAPBgNVBAgMCEJ1ZGFwZXN0MREwDwYDVQQHDAhCdWRhcGVzdDEN | ||
MAsGA1UECgwETE5DRDENMAsGA1UECwwETE5DRDESMBAGA1UEAwwJbG9jYWxob3N0 | ||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvlWcQY5hJczRzwxwR7AW | ||
L1mx9g1CEl61hRUP4CbEUhzUY+p3C4gkxjOFLafn00DZnV957gv2pMeNbDIv/I5p | ||
Cu64qQ66+5QfNP4HT5GZsvi1rb4oVTwuYI2hJROBr1LzXupm1DmCxmVYD0Ga8J7Z | ||
R9cOJGDq6op1nmd8qvNj2xjwA7NqNl9d/i8ME26dnHJz3NqpLa4K/EPrzuDxr+Tj | ||
N6X7JFAWGjP83rnsqJzswO6K6fOvm1duPIIaPNr1c4gVxUnw7tIlKoDfJUFQxhTb | ||
LxzHFnMkEKAWHUH4mDFtQb1oMCZMpMhSA17H2bPjvUxNfWSBPOv5alvN8qX/nvAv | ||
fwIDAQABo1MwUTAdBgNVHQ4EFgQUSxMr8l6WJ0I3tiSkWU6/IHQkHkQwHwYDVR0j | ||
BBgwFoAUSxMr8l6WJ0I3tiSkWU6/IHQkHkQwDwYDVR0TAQH/BAUwAwEB/zANBgkq | ||
hkiG9w0BAQsFAAOCAQEAhDR8vku6Jpl1JzQtJbcNJDlHpV6ShvpSFzrR1exXBKf3 | ||
2OAAgSU5Wpb5LuEkZpvZNhLOaGWllkgmSBq+ya4GZ8iXOoOMN1PvPUn2NFHkRTve | ||
7Fd/GcVhDDuLQ2eGfJtS/g4ebmiIPSbdV1bqWSlLaQHsg1J0WPCGJEKwNp26NwjG | ||
YCn1SxYKIm5F1lPDB9HGsRvcJYrGjxZDohvN/Sm3ZRAjy+cy1VrGUz1v1jns8kYk | ||
xdADuJJn0xIf2G48SaToyn/IC5DKO6Vwaqo1ZOhEF3n86iQI9i70eGw8sbjAx8Cb | ||
aRwaeqksb8ht09bVn3LHMnLbEBH43I+tdTVuZW7t6A== | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEG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WNTORBwwKHBp9+GYqSSGNQ | ||
EvK8MUYo2XI6snWBdapayoaXNlO5KCiLtY+s46FYtW9Y3vUabZP8Khc9K0hyl3+r | ||
KZq6hmbJUwKBgQC0SRvm32WFEr2moUJTubBSlyX1VzAqA7Dno80K17uotYlP/sYX | ||
o3keE9bGE9Xr+y3vy5f5egc/bYRlBCtiQOiGg3SQetJxEbSn4JxSRtAK440gioPT | ||
6rvXN621PiXrW204L4C3Jqd+ljQ3jmCDGohI0sbzBerkPWCHimOp6q6n0QKBgDnW | ||
MH0Lg2hjWAfC1GyMZmtFwe8Z9OXEyL65vnnLHWamLwCapCDEkUEs84GDvlzB0xbv | ||
RvF9DjOD3MqAGl3+BartQezagTfl+5ZKvzwYlI0GRzaMQn9JFpTYZIj2427sPJsr | ||
jyiGRTzXHb9nHe5iia32eJ4DhoaQQvUtSeNdT2blAoGBANjREQBuA46nllFondmI | ||
G5/XGOGYJAT7BiJ/hqq0XK9k+EHVhkJoLwC6DxomNAdySo11BSrSgKS83QXMLpam | ||
8kznu/OOtG2+V4uCdR4X2/cQRNLDXUAr107QbAuQoWy05mfXy6HEchLv0Cwtz9s7 | ||
jdMAG8IYu7kUvokgc+/Uc4sh | ||
-----END PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- CreateTable | ||
CREATE TABLE "WalletLNC" ( | ||
"id" SERIAL NOT NULL, | ||
"walletId" INTEGER NOT NULL, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"pairingPhraseRecv" TEXT NOT NULL, | ||
"localKeyRecv" TEXT, | ||
"remoteKeyRecv" TEXT, | ||
"serverHostRecv" TEXT, | ||
CONSTRAINT "WalletLNC_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "WalletLNC_walletId_key" ON "WalletLNC"("walletId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "WalletLNC" ADD CONSTRAINT "WalletLNC_walletId_fkey" FOREIGN KEY ("walletId") REFERENCES "Wallet"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
CREATE TRIGGER wallet_lnc_as_jsonb | ||
AFTER INSERT OR UPDATE ON "WalletLNC" | ||
FOR EACH ROW EXECUTE PROCEDURE wallet_wallet_type_as_jsonb(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ export function useWalletConfigurator (wallet) { | |
throw err | ||
} | ||
} else if (canReceive({ def: wallet.def, config: serverConfig })) { | ||
const transformedConfig = await validateWallet(wallet.def, serverConfig) | ||
const transformedConfig = await validateWallet(wallet.def, serverConfig, { skipGenerated: true }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes in this file are not related to this pr specifically. |
||
if (transformedConfig) { | ||
serverConfig = Object.assign(serverConfig, transformedConfig) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file are not related to this pr specifically.
See #1769
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this means this PR is based on #1769?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes