Commit Graph

46 Commits

Author SHA1 Message Date
SatsAllDay e9aa268996
add `fund_user` sndev command (#1214)
* add `fund_user` sndev command

* update help and set msats rather than add

---------

Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-06-03 09:37:58 -05:00
keyan b81c5bcc78 make sndev pr track upstream better 2024-05-28 09:29:42 -05:00
SatsAllDay 15f9950477
Store hashed and salted email addresses (#1111)
* first pass of hashing user emails

* use salt

* add a salt to .env.development (prod salt needs to be kept a secret)
* move `hashEmail` util to a new util module

* trigger a one-time job to migrate existing emails via the worker

so we can use the salt from an env var

* move newsletter signup

move newsletter signup to prisma adapter create user with email code path
so we can still auto-enroll email accounts without having to persist the email address
in plaintext

* remove `email` from api key session lookup query

* drop user email index before dropping column

* restore email column, just null values instead

* fix function name

* fix salt and hash raw sql statement

* update auth methods email type in typedefs from str to bool

* remove todo comment

* lowercase email before hashing during migration

* check for emailHash and email to accommodate migration window

update our lookups to check for a matching emailHash, and then a matching
email, in that order, to accommodate the case that a user tries to login
via email while the migration is running, and their account has not yet been migrated

also update sndev to have a command `./sndev email` to launch the mailhog inbox in your browser

also update `./sndev login` to hash the generated email address and insert it into the db record

* update sndev help

* update awards.csv

* update the hack in next-auth to re-use the email supplied on input to `getUserByEmail`

* consolidate console.error logs

* create generic open command

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-05-04 18:06:15 -05:00
keyan 6aa5991520 litcli passthrough 2024-05-02 19:46:27 -05:00
SatsAllDay 01de4e7ba7
fix sndev to make .env.local optional in docker compose files (#1098) 2024-04-20 16:50:43 -05:00
ekzyis dd6e921e2e
Fix local env in docker-compose.yaml (#1085)
* Allow docker env override via .env.local

* Make .env.local optional

* Fix env var expansion ignoring .env.local

* Rename .env.development to .env.docker

* Use YAML anchors

* Revert rename of .env.development
2024-04-17 13:46:18 -05:00
Keyan bc85a63091
better env (#1082) 2024-04-16 19:23:36 -05:00
keyan 40e07be6d8 update sndev docs and auto-start for capture service 2024-04-14 17:43:55 -05:00
keyan d3f18c7cff get rid of docker nagware 2024-04-14 17:40:24 -05:00
ekzyis 9f4d5e13aa
CLN autowithdrawal (#1042)
* Add CLN node to docker-compose.yml

* Attach CLN wallet via CLNRest

* Remove leading space

* Implement autowithdrawal to CLN in worker

* Fix UnhandledSchemeError during build

See https://github.com/vercel/next.js/discussions/33982

* Refactor CLN invoice code into @/lib/cln

* Fix missing env vars

* Fix validation error if rune invalid

* Update header

* Add rune placeholder

* Fix missing expiry for test invoice

* Remove nonsensical comment

* Remove unnecessary async

* Show level SUCCESS as OK in logs

* Add stacker_cln commands to sndev

* fix sndev posix compliance, add cln_withdraw

* give stacker_cln larger channels

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
2024-04-14 17:34:21 -05:00
Felipe Bueno cc8b16a7e3
Fix for #1023 sndev: 317: Syntax error: redirection unexpected (#1024)
* printf -> echo

* Update sndev

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-04-05 08:40:12 -05:00
keyan a0b402b4d6 fix sndev pr (detatched version) 2024-04-04 18:31:07 -05:00
keyan a785f907cb add sndev pr tracking option 2024-04-04 15:38:27 -05:00
keyan e2c7f4aa58 sndev logs command 2024-04-02 15:00:45 -05:00
Keyan 2055ccaf41
Merge branch 'master' into mailhog 2024-03-25 17:46:56 -05:00
ekzyis 176b3ec468 Remove unused functions in sndev 2024-03-25 14:50:51 +01:00
SatsAllDay 90c9e21ac4
validate nym arg presence on `./sndev login` command (#956)
check to ensure that a nym is provided to the login command before
proceeding. if omitted, echo an error message, display the help
for the login command, then exit with a non-zero exit code
2024-03-23 20:09:45 -05:00
Felipe Bueno eef9b3de4d Add email to COMPOSE_PROFILES on sndev + Cleanup README instructions 2024-03-21 15:02:58 -03:00
ekzyis 2f9a3cc12c
Fix container with empty name not found (#935) 2024-03-19 15:44:44 -05:00
keyan a61c1f241e just use an env var for this 2024-03-18 09:27:26 -05:00
keyan 08f1db3f68 sndev profiles 2024-03-17 20:43:34 -05:00
Keyan efaa2193e0
new readme with contribution awards (#922)
* new readme

* Update README.md

* Update README.md

* move more docs to README

* add proper mapping for opensearch item index

* add sndev lint

* fix index creation
2024-03-15 14:29:42 -05:00
keyan 5065b32bde sndev login: fix identifier on conflict 2024-03-13 20:05:29 -05:00
keyan 0b8d952e78 add sndev login 2024-03-13 18:52:58 -05:00
keyan 06bde475e7 add sndev pr command 2024-03-13 15:00:58 -05:00
keyan 0f68ed379f prompt in help if docker isn't installed 2024-03-13 11:21:51 -05:00
keyan 46effa6992 use a better diff algo 2024-03-12 20:04:12 -05:00
keyan 72ecc7b266 s3 and image proxy with broken name resolution 2024-03-12 18:05:28 -05:00
keyan bb41692acc set -e 2024-03-11 15:30:35 -05:00
keyan 32bc3f18d3 add help for all commands 2024-03-11 15:27:18 -05:00
keyan 1e9d40f152 add sndev prisma 2024-03-11 08:55:02 -05:00
keyan fa3aed2386 smaller db seed 2024-03-10 19:42:07 -05:00
keyan 09a30a43c4 small script cleanup 2024-03-10 18:41:21 -05:00
keyan 4b2596f86b remove script logging 2024-03-10 18:36:00 -05:00
keyan 5572791c91 add sndev psql command 2024-03-10 18:22:54 -05:00
keyan a31d04a095 sndev passthrough to docker and containers 2024-03-10 17:30:11 -05:00
keyan 8cddbe74ff add sndev status 2024-03-10 17:10:38 -05:00
keyan 4ce413af6f ascii art 2024-03-10 16:59:15 -05:00
keyan 0500cbd2ca add sndev withdraw 2024-03-10 16:42:16 -05:00
keyan 714aecc477 add sndev payinvoice 2024-03-10 16:29:10 -05:00
keyan eb7670e5c3 fix perms of shared directories 2024-03-08 20:07:43 -06:00
keyan 215f330771 reorganize docker and add static certs/macroon to lnd 2024-03-08 13:11:58 -06:00
keyan 85c1303185 begin adding regtest network 2024-03-07 21:24:42 -06:00
keyan 1b275517fd refinements after fresh builds 2024-03-07 16:40:26 -06:00
keyan fab750352f make posix shell 2024-03-07 10:02:59 -06:00
keyan 51dba02569 sndev bash script and docker reliability stuff 2024-03-06 19:04:55 -06:00