* Migrate vault entries to new schema (#2092) * Migrate existing vault entries to new schema * Read+write new vault schema * Drop VaultEntry table * Refactor vaultPrismaFragments * Remove wrong comment * Remove TODO * Fix possible race condition on update of vault key * Remove lib/object.js * Wallet schema v2 (#2146) * Add wallet-v2 TODOs * Update checkWallet * Wallet list * Delete almost all wallet v1 code and add some code for wallet protocol forms * Define protocol display name in JSON * Show form per protocol * Increase max-height of image in form * Add JSdoc for protocols, form validation * Use wallet cards again My wallet list was quite ugly and I couldn't look at it anymore. * Refactor hooks in wallet provider * Fix PasswordInput not used * Read encrypted wallets * Decrypt wallets * useWalletQuery now returns decrypted wallets * Refactor useIndexedDB because its only purpose will be to store the key, so no need for pagination code etc. * There is still a bug: if the wallet is not decrypted on first render, the form will not see the decrypted value. See TODO. * Rename protocolJson to protocol it no longer uses a JSON file * Fix form not updated with decrypted API key * Fix wallet template forms * Fix optional shown as hint * Rename to mapUserWalletResolveTypes * Save LNbits send and recv TODO: * implement resolvers for other protocols * fix double update required for trigger? * add missing validation on server * add missing network tests * don't import from wallets/client on server * Move definitions to lib/wallets.json and lib/protocols * Fix ProtocolWallet.updated_at not updated by trigger * Move wallet fragments into wallets/client/fragments/ * move invoice fragments to fragments/invoice.js * remove some unused fragments that I don't think I also will not use * move fragments that will be generated in own file * Move wallet resolvers into wallets/server/resolvers * Fix missing authorization check on wallet update * Run all shared code in generic wallet update function * Fix 'encrypt' flag not set for blink send currency * Add mutations for all protocols * Fix macaroon validation * Fix CLN socket value not set * Add server-side schema validation * Fix JSDoc typedef for protocols * Don't put JSDoc into separate file * Create test invoices on save * Also move type resolvers into wallets/server/resolvers * Fix unconfigured protocols of UserWallet not found * Fix Blink API key in wallet seed * Test send payment on save (except LNC) This does not include LNC because LNC cannot be saved yet * Check if window.webln is defined on save * Create new wallets from templates * Separate protocols in wallets/lib into individual files * Use justify-content-start for protocol tabs and larger margin at the top * Add LNC to client protocols * Only return wallets from useWallets * Query decrypted wallets * Payments with new wallets * More wallet logos * Fix TypeError in useIndexedDB * Add protocol attach docs * Fix undefined useWalletRecvPrompt import * Remove outdated TODOs * First successful zap to new wallets * Fix walletLogger imports * Fix sequences * the sequences for InvoiceForward and DirectPayment were still starting at 1 * when using setval() with two arguments, nextval() will return the second argument+1 (see https://www.postgresql.org/docs/current/functions-sequence.html) * Rename ProtocolWallet columns * Remove more outdated TODOs * Update wallet indicator * Fix page reset on route change * Refactor __typename checks into functions * Refactor protocol selection into own hook * Add button to detach protocol * Refetch wallet on save and detach * Refetch wallets on change * Always show all templates * Refactor WalletLink component * Also put wallet into forms context * Remove outdated TODOs * Use useMemo in wallets hooks * Passphrase modals * prompt for password if decryption failed * add button to reveal passphrase on wallet page TODO: * remove button if passphrase was revealed or imported * encrypt wallets with new key on passphrase reveal * Fix protocol missing as callback dependency * Encrypt wallets with new key on passphrase export * Update 'unlock wallets' text * Rename wallet mutation hooks * Remove 'removeWallet' mutation Wallets are automatically deleted when all protocols are deleted * Passphrase reset * Use 110px as minimum width for bip39 words longest bip39 words are 8 characters and they fit into 103px so I rounded up to 110px. * Also disable passphrase export on save * Wallet settings * Fix wallet receive prompt * Remove unused parameters from postgres function * Rename UserWallet to Wallet, ProtocolWallet to WalletProtocol * Use danger variant for button to show passphrase * Fix inconsistent imports and exports * Remove outdated TODOs * wallet logs * Remove outdated comment * Make sure wallets are used in priority order * Separate wallets from templates in reducer * Fix missing useCallback dependencies * Refactor with useWalletLogger hook * Move enabled to WalletProtocol * Add checkbox to enable/disable protocol * Fix migration with prod db dump * Parse Coinos relay URLs * Skip network tests if only enabled changed * Allow IndexedDB calls without session * Add code to migrate old CryptoKey * first try to use existing CryptoKey before generating a new one * bump IDB version to delete old object stores and create new ones * return IDB callbacks with useMemo * don't delete old IDB right away, wait until next release * Fix ghost import error *Sometimes*, I get import errors because it tries to resolve @/wallets/server to wallets/server.js instead of wallets/server/index.js. For the files in wallets/server, it kind of makes sense because it's a circular import. But I don't know why the files in worker/ have this problem. Interestingly, it only seems to happen with walletLogger imports, so I guess its related to its import chain. Anyway, this commit should make sure this never happens again ... * Skip wallets queries if not logged in * Split CUSTOM wallet into NWC and LN_ADDR * Migrate local wallets * Link to /wallets/:id/receive if send not supported * Hide separator if there are no configured wallets * Save LNC * Add one-liner to attach LNC * Update wallet priorities via DnD * Wallet logs are part of protocol resolvers * Fix logging to deleted protocol * Fix trying to fetch logs for template * also change type to Int so GraphQL layer can catch trying to fetch string IDs as is the case for templates * Fix embedded flag for wallets logs not set * Remove TODO * Decrease max-height for embedded wallet logs on big screens * Fix missing refetch on wallet priority update * Set priorities of all wallets in one tx * Fix nested state update * Add DragIcon * DnD mobile support and refactor * Add CancelButton to wallet settings * Remount form if path changes This fixes the following warning in the console: """ Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. """ * Support string and object for wallet.image JSON * Append domain to lightning address inputs * Remove outdated TODOs * Add template IDs to wallet JSON * Fix missing callback dependency * Implement lightning address save in receive prompt * Update TODOs * Fix missing check for enabled * Pay QR codes with WebLN as anon * Add logo for NWC * Fix trying to save logs for template * Add template logs * Fix inconsistent margin * Always throw on missing key * Remove misleading comment Wallets are returned even if decryption fails so we can show the unlock page if a wallet is stored as encrypted in the context. Maybe I should rethink this. * Check for existing wallets on local wallet migration * Fix local wallet migration causing duplicates * Fix protocol reattached on detach due to migration * Fix form not centered * Fix ZEUS lightning address domain * Add placeholder, help, hints etc. to wallet form inputs * Fix wallet badges not updated * Remove unused declared variables * Rename to ATTACH_PAGE * Fix 500 error if no amount was given to LNURLp endpoint * Tag log messages with wallet name * Only skip network tests if we're disabling the wallet * Rename var to networkTests * Continue to store key hash in IndexedDB * Rethink wallet state management If decryption failed, the function to decrypt the wallets didn't throw but simply returned wallets that were still encrypted. This was bad because it meant we could not rely on the wallets in the state being decrypted, even though this was the original idea behind the query hooks: hide the details of encryption and decryption inside them. Because of this, we had to check if the wallets were still encrypted before we ran the wallet migration since we want to check if a protocol already exists. This commit fixes this by making encryption and decryption always throw (and catching the errors), as well as returning a ready state from hooks. A hook might not be ready because it still needs to load something (in the case of the crypto hooks, it's loading the key from IndexedDB). Callers check that ready state before they call the function returned by the hook. So now, the wallet migration hook can itself simply check if the hook to encrypt wallets is ready and if the wallets are no longer loading to let callers know if it itself is ready. Since we also relied on wallets stored as encrypted in the context to show the unlock page, this was also changed by comparing the local and remote key hash. * Add empty line * Save new key hash during wallet reset * Only receive protocol upserts require networkTests param * Compare key hashes on server on each save * Delete old code * Fix card shows attach instead of configure * Fix empty wallets created during migration The old schema can contain '' instead of NULL in the columns of wallets for receiving. * Update reset passphrase text * Wrap passphrase reset in try/catch * Fix migrate called multiple times * Update key hash on migration if not set * Fetch local wallets in migrate * Fix missing await on setKey * Let first device set key hash * Fix indicator not shown if wallets locked * Check if IndexedDB is available * Fix inconsistent WebLN error message * Disable WebLN if not available * Remove outdated TODO * Cursor-based pagination for wallet logs * Fix log message x-overflow * Add context to wallet logs * Wrap errors are warnings in logs * Rename wallet v2 migrations * Update wallet status during logging * Fix wallet logs loading state The loading state would go from false -> true -> false because it's false when the lazy query wasn't called yet. * Add wallet search * Add Alby Go wallet * Revert "Add Alby Go wallet" This reverts commit 926c70638f1673756480c848237e52d5889dc037. * Fix wallet logs sent by client don't update protocol status * Fix mutation name * put drag icon on opposite corner * Add wallets/README.md * Fix inconsistent case in wallets/README.md * Fix autoprefixer warning about mixed support This warning was in the app logs: app | Warning app | app | (31:3) autoprefixer: end value has mixed support, consider using flex-end instead app | app | Import trace for requested module: app | ./styles/wallet.module.css app | ./wallets/client/hooks/prompt.js app | ./wallets/client/hooks/index.js app | ./wallets/client/context/hooks.js app | ./wallets/client/context/provider.js app | ./wallets/client/context/index.js * fix effect of wallet indicators on logo * Fix deleting wallet template logs * Use name as primary key of WalletTemplate * Fix wallet_clear_vault trigger not mentioned in README * Fix wallet receive prompt Also remove no longer needed templateId from wallets.json and helper functions * Use findUnique since name is now primary key * Merge Alby wallets into one * Remove unused name parameter from WalletsForm component * Fix number check to decide if wallet or template * Update wallet encryption on click, not as effect * add cashu.me and lightning address logos * add images * Use recommended typeof to check if IDB available * Also check if IDB available on delete * Use constraint triggers * Add indices on columns used for joins * Fix inconsistent CLEAR OR REPLACE TRIGGER * Attach wallet_check_support trigger to WalletProtocol table * Update wallets/README.md * Remove debugging code * Refactor reducer: replace page with status * Show 'wallets unavailable' if device does not support IndexedDB * Remove duplicate ELSIF condition * Fix hasSendWallet The useSendWallets hook was not checking if the returned send wallets are enabled. Since the components that used that hook only need to know if there is a send wallet, I replaced the useSendWallets hook with a useHasSendWallet hook. * Add Cash App wallet * fix changes loglevel enum * Fix key init race condition in strict mode if no key exists yet * Formatting * Fix key init race condition via transactions in readwrite mode * Replace Promise.withResolvers with regular promises * replace generic spinner with our usual --------- Co-authored-by: k00b <k00b@stacker.news>
187 lines
11 KiB
SQL
187 lines
11 KiB
SQL
/*
|
|
* This seed file inserts test wallets into the database to test wallet migrations.
|
|
* Only the wallets for which we could hardcode the configuration when this file was created will work to send or receive zaps.
|
|
* For example, NWC won't work for send or receive because it generates a random public key and secret every time the container is started for the first time.
|
|
*/
|
|
|
|
-- device sync passphrase: media fit youth secret combine live cupboard response enable loyal kitchen angle
|
|
COPY public."users" ("id", "name", "vaultKeyHash") FROM stdin;
|
|
21001 test_wallet_v2 0feb0e0ed8684eaf37a995c4decac6d360125d40ff3fffe26239bb7ffd810853
|
|
\.
|
|
|
|
-- triggers will update the wallet JSON column in the Wallet table when we insert rows into the other wallet tables
|
|
COPY public."Wallet" ("id", "userId", "type", "enabled") FROM stdin;
|
|
1 21001 LIGHTNING_ADDRESS true
|
|
2 21001 NWC true
|
|
3 21001 WEBLN true
|
|
4 21001 LNBITS true
|
|
5 21001 CLN true
|
|
6 21001 BLINK true
|
|
7 21001 PHOENIXD true
|
|
8 21001 LND true
|
|
9 21001 LNC true
|
|
10 21001 LIGHTNING_ADDRESS true
|
|
11 21001 LIGHTNING_ADDRESS true
|
|
12 21001 LIGHTNING_ADDRESS true
|
|
13 21001 LIGHTNING_ADDRESS true
|
|
14 21001 LIGHTNING_ADDRESS true
|
|
15 21001 LIGHTNING_ADDRESS true
|
|
16 21001 LIGHTNING_ADDRESS true
|
|
17 21001 LIGHTNING_ADDRESS true
|
|
18 21001 LIGHTNING_ADDRESS true
|
|
19 21001 LIGHTNING_ADDRESS true
|
|
20 21001 LIGHTNING_ADDRESS true
|
|
21 21001 LIGHTNING_ADDRESS true
|
|
22 21001 LIGHTNING_ADDRESS true
|
|
23 21001 LIGHTNING_ADDRESS true
|
|
24 21001 LIGHTNING_ADDRESS true
|
|
25 21001 LIGHTNING_ADDRESS true
|
|
26 21001 LIGHTNING_ADDRESS true
|
|
27 21001 LIGHTNING_ADDRESS true
|
|
28 21001 NWC true
|
|
29 21001 NWC true
|
|
\.
|
|
|
|
COPY public."WalletLightningAddress" ("id", "walletId", "address") FROM stdin;
|
|
1 1 john_doe@getalby.com
|
|
2 10 john_doe@rizful.com
|
|
3 11 john_doe@fountain.fm
|
|
4 12 john_doe@primal.net
|
|
5 13 john_doe@coinos.io
|
|
6 14 john_doe@speed.app
|
|
7 15 john_doe@tryspeed.com
|
|
8 16 john_doe@blink.sv
|
|
9 17 john_doe@zbd.gg
|
|
10 18 john_doe@strike.me
|
|
11 19 john_doe@minibits.cash
|
|
12 20 john_doe@npub.cash
|
|
13 21 john_doe@zeuspay.com
|
|
14 22 john_doe@fountain.fm
|
|
15 23 john_doe@lifpay.me
|
|
16 24 john_doe@rizful.com
|
|
17 25 john_doe@vlt.ge
|
|
19 26 john_doe@blixtwallet.com
|
|
20 27 john_doe@shockwallet.app
|
|
\.
|
|
|
|
COPY public."WalletNWC" ("id", "walletId", "nwcUrlRecv") FROM stdin;
|
|
1 2 nostr+walletconnect://8682ce552a852b5e21c8fe1235823a6f175641538f4c5431ec559a75dfb7f73a?relay=wss://relay.getalby.com/v1&secret=99669866becdbfacef4e9c3f0d00f085ee1174bc973135f158bab769f37152b9&lud16=john_doe@getalby.com
|
|
2 28 nostr+walletconnect://8682ce552a852b5e21c8fe1235823a6f175641538f4c5431ec559a75dfb7f73a?relay=wss://relay-nwc.rizful.com&secret=99669866becdbfacef4e9c3f0d00f085ee1174bc973135f158bab769f37152b9
|
|
\.
|
|
|
|
COPY public."WalletLNbits" ("id", "walletId", "url", "invoiceKey") FROM stdin;
|
|
1 4 http://localhost:5001 5deed7cd634e4306bb5e696f4a03cdac
|
|
\.
|
|
|
|
COPY public."WalletCLN" ("id", "walletId", "socket", "rune", "cert") FROM stdin;
|
|
1 5 cln:3010 Fz6ox9zLwTRfHSaKbxdr5SK4KyxAjL_UEniED6UEGRw9MCZtZXRob2Q9aW52b2ljZQ== LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tDQpNSUlCY2pDQ0FSaWdBd0lCQWdJSkFOclN2UFovWTNLRU1Bb0dDQ3FHU000OUJBTUNNQll4RkRBU0JnTlZCQU1NDQpDMk5zYmlCU2IyOTBJRU5CTUNBWERUYzFNREV3TVRBd01EQXdNRm9ZRHpRd09UWXdNVEF4TURBd01EQXdXakFXDQpNUlF3RWdZRFZRUUREQXRqYkc0Z1VtOXZkQ0JEUVRCWk1CTUdCeXFHU000OUFnRUdDQ3FHU000OUF3RUhBMElBDQpCQmptYUh1dWxjZ3dTR09ubExBSFlRbFBTUXdHWEROSld5ZnpWclY5aFRGYUJSZFFrMVl1Y3VqVFE5QXFybkVJDQpyRmR6MS9PeisyWFhENmdBMnhPbmIrNmpUVEJMTUJrR0ExVWRFUVFTTUJDQ0EyTnNib0lKYkc5allXeG9iM04wDQpNQjBHQTFVZERnUVdCQlNFY21OLzlyelMyaFI2RzdFSWdzWCs1MU4wQ2pBUEJnTlZIUk1CQWY4RUJUQURBUUgvDQpNQW9HQ0NxR1NNNDlCQU1DQTBnQU1FVUNJSENlUHZOU3Z5aUJZYXdxS2dRcXV3OUoyV1Z5SnhuMk1JWUlxejlTDQpRTDE4QWlFQWg4QlZEejhwWDdOc2xsOHNiMGJPMFJaNDljdnFRb2NDZ1ZhYnFKdVN1aWs9DQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tDQo=
|
|
\.
|
|
|
|
COPY public."WalletBlink" ("id", "walletId", "apiKeyRecv", "currencyRecv") FROM stdin;
|
|
1 6 blink_IpGjMEmlLZrb3dx1RS5pcVm7Z6uKthb2UMg5bfGxcIV4Yae BTC
|
|
\.
|
|
|
|
COPY public."WalletPhoenixd" ("id", "walletId", "url", "secondaryPassword") FROM stdin;
|
|
1 7 https://phoenixd.ekzy.is abb6dc487e788fcfa2bdaf587aa3f96a5ee4a3e8d7d8068131182c5919d974cd
|
|
\.
|
|
|
|
COPY public."WalletLND" ("id", "walletId", "socket", "macaroon", "cert") FROM stdin;
|
|
1 8 lnd:10009 0201036c6e64022f030a1089912eeaa5f434e5265170565bcce0eb1201301a170a08696e766f6963657312047265616412057772697465000006200622e95cf2fe2d9a8976cbfb824809a9a5e8af861b659e396064f6de1dc79d04 LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNoVENDQWl1Z0F3SUJBZ0lSQUp5Zkg3cEdDZEhXTVJZVGo1d1pKSkF3Q2dZSUtvWkl6ajBFQXdJd09ERWYKTUIwR0ExVUVDaE1XYkc1a0lHRjFkRzluWlc1bGNtRjBaV1FnWTJWeWRERVZNQk1HQTFVRUF4TU1NR1V5T0dVNApPREkzTmpZd01CNFhEVEkxTURZd05URTRNak15TmxvWERUSTJNRGN6TVRFNE1qTXlObG93T0RFZk1CMEdBMVVFCkNoTVdiRzVrSUdGMWRHOW5aVzVsY21GMFpXUWdZMlZ5ZERFVk1CTUdBMVVFQXhNTU1HVXlPR1U0T0RJM05qWXcKTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFUE1lb2RYYTF2eXVxYXFaNklXbXgrNDVFdjBkUgpmQkY5SXZtMU5xQVNHUGlGT1JucEtxZVBVbm0xWmZlTUNETytwcGhQMHpGYVh4ZVBUU3BwaWMrYXlLT0NBUlF3CmdnRVFNQTRHQTFVZER3RUIvd1FFQXdJQ3BEQVRCZ05WSFNVRUREQUtCZ2dyQmdFRkJRY0RBVEFQQmdOVkhSTUIKQWY4RUJUQURBUUgvTUIwR0ExVWREZ1FXQkJUYkdKMlZDejN5WkFUd1JlUG1kckdvMnhkVmFqQ0J1QVlEVlIwUgpCSUd3TUlHdGdnd3daVEk0WlRnNE1qYzJOakNDQ1d4dlkyRnNhRzl6ZElJRGJHNWtnaFJvYjNOMExtUnZZMnRsCmNpNXBiblJsY201aGJJSStOelV5ZUdWNWIyeG1jSEJqTW5SbloybDZaSEZoYW1Kb2VXZHNjRzV4ZW10bGFtVmoKWW1oeGJIQnpNMjU0ZW5aMGMyZzNkMkZ0Y1dRdWIyNXBiMjZDQkhWdWFYaUNDblZ1YVhod1lXTnJaWFNDQjJKMQpabU52Ym02SEJIOEFBQUdIRUFBQUFBQUFBQUFBQUFBQUFBQUFBQUdIQkt3U0FBY3dDZ1lJS29aSXpqMEVBd0lEClNBQXdSUUlnY2pZZ2o5YVhpQjlOOVBmQUp0cWZRbStoYVdpbmZ0RTVXdkJ3Vis4NzgzTUNJUUNyaEx2Qys3RzQKN3NneENyYnlmLy9WdmxJN3BkakRlVFM0WGc4eHB2UmVEQT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
|
\.
|
|
|
|
COPY public."VaultEntry" ("id", "key", "iv", "value", "userId", "walletId") FROM stdin;
|
|
1 nwcUrl 926622f7139d4b4506827549 b592906ea9c3ced5df077ca1ea0c787c2ea9173e39d062466b50723d8c0a568510ed42549215c6f6e15632601248f148fa18b87d7e0fe9ad667d10a12beb79e36d3cfcaa58ca65c78e8f41ee715c2b19ac8c638353cdc9098a784104eb9b1592b233d4327556de47d218f97991392105ff0868beada2667b308d544bf9e7199f056ecb8cd9c2f87a7f8f1eda7db7e80c880de12df4ce2dc5dcc16ec836d9a9f428f2c4e36f01bdbbd85084ecac308eefa1dbdfe89c2a321a3fafa1c35265a788a352c329f9e01d0988e47f05b8575fbcfb5814 21001 2
|
|
2 adminKey 1b911294853df2e94e4d9823 438ff80df2e58e3f7988ba828fab1e7def3934b908a58de9f5f16bb36e1ecc65e1cab43c0ec658f65bdccb0a241bb5614697 21001 4
|
|
3 apiKey b1f3500130b16bf4997fc370 3276869cf3d8c6d844e771688f8cd1a771279867165e4b1030b7ad90d537d5cfa0a6a82c2aaefe350db2a445b3b0c3b23a068edede3e78fe5957c1cfc6b5f1fd811786793c65aad90fe8ce 21001 6
|
|
4 currency 8174fe225f0d53957a4daced b912faacc32725b9ec01128911eb3922822fb21bdc 21001 6
|
|
5 primaryPassword 5e709c93ca34a135dad293d7 7509592ff463f886b7f7a621928a8ac0ca56b904d5835bf77ca5914a248fb70ad231f04aed893c0ef1dd7edd2d928d482d0eaeba7ae2381f3fd70ba25cb265de6091a11231a9cd3047f22ff2f838db046e67 21001 7
|
|
6 pairingPhrase 0196718758dea2bff7c89741 bd6ff716ec5b20dc74f6507b87ed0923c8b27e33204ae44cee47d8c7f78dd5976cc446f2c9dd918f2916611a71e20e87fb9245cacfdb35bbc527a42c0df765e2f9589e56b5b253c0d39f8e954b 21001 9
|
|
7 localKey 227bc46af405a40cb6697344 f4589aaca476b4905980b9dd834880926aff9e9c9217afa9b33152a74255698c9284015309ae19e10481843069a052dbe1a592e14db6aa13fce4e17fd9f5f2964720ba4686a4a45a1c72681248809e8de612 21001 9
|
|
8 remoteKey e63b62d8af6a1227129e8c7b ce97d971cdcd58b34ec2e998c6ce6df72b8c21a9cd07e69db96c9491b3d9a051cf557d721552c5cc565a4d7f1bf1ad70b20048b90e1b244e77f0b635b5dbd798e0538f85d7008b29918a7e589dc1c2bde465c50c 21001 9
|
|
9 serverHost a537d212e719810f6cbbc696 449c550ca2c24e761802087e5bc5637d0b4b231d9b771fbefbee6ed7c0a728862adc677cc283a373ec25f01003009f0c9cd18f884d08 21001 9
|
|
\.
|
|
|
|
COPY public."Invoice" ("id", "userId", "hash", "bolt11", "expiresAt", "msatsRequested") FROM stdin;
|
|
1 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a1 lnbc 2025-05-16 00:00:00 1000000
|
|
2 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a2 lnbc 2025-05-16 00:00:00 2000000
|
|
3 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a3 lnbc 2025-05-16 00:00:00 3000000
|
|
4 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a4 lnbc 2025-05-16 00:00:00 4000000
|
|
5 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a5 lnbc 2025-05-16 00:00:00 1000000
|
|
6 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a6 lnbc 2025-05-16 00:00:00 2000000
|
|
7 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a7 lnbc 2025-05-16 00:00:00 3000000
|
|
8 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a8 lnbc 2025-05-16 00:00:00 4000000
|
|
9 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82a9 lnbc 2025-05-16 00:00:00 4000000
|
|
10 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82aa lnbc 2025-05-16 00:00:00 4000000
|
|
11 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82ab lnbc 2025-05-16 00:00:00 4000000
|
|
12 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82ac lnbc 2025-05-16 00:00:00 4000000
|
|
13 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82ad lnbc 2025-05-16 00:00:00 4000000
|
|
14 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82ae lnbc 2025-05-16 00:00:00 4000000
|
|
15 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb82af lnbc 2025-05-16 00:00:00 4000000
|
|
16 21001 d1bc8d3ba4afc7e109612cb73acbdddac052c93025aa1f82942edabb7deb8210 lnbc 2025-05-16 00:00:00 4000000
|
|
\.
|
|
|
|
COPY public."Withdrawl" ("id", "userId", "walletId", "msatsPaying", "msatsFeePaying") FROM stdin;
|
|
1 21001 1 1000 0
|
|
2 21001 2 1000 0
|
|
3 21001 2 1000 0
|
|
4 21001 5 1000 0
|
|
5 21001 5 1000 0
|
|
6 21001 6 1000 0
|
|
7 21001 7 1000 0
|
|
8 21001 7 1000 0
|
|
9 21001 8 1000 0
|
|
10 21001 10 1000 0
|
|
11 21001 11 1000 0
|
|
12 21001 27 1000 0
|
|
13 21001 28 1000 0
|
|
14 21001 29 1000 0
|
|
15 21001 1 1000 0
|
|
16 21001 4 1000 0
|
|
17 21001 4 1000 0
|
|
18 21001 7 1000 0
|
|
19 21001 7 1000 0
|
|
20 21001 8 1000 0
|
|
\.
|
|
|
|
COPY public."InvoiceForward" ("id", "walletId", "bolt11", "maxFeeMsats", "invoiceId", "withdrawlId") FROM stdin;
|
|
1 1 lnbc 1000 1 1
|
|
2 2 lnbc 1000 2 2
|
|
3 4 lnbc 1000 3 3
|
|
4 4 lnbc 1000 4 4
|
|
5 5 lnbc 1000 5 5
|
|
6 6 lnbc 1000 6 6
|
|
7 7 lnbc 1000 7 7
|
|
8 8 lnbc 1000 8 8
|
|
9 27 lnbc 1000 9 9
|
|
10 28 lnbc 1000 10 10
|
|
11 29 lnbc 1000 11 11
|
|
12 4 lnbc 1000 12 12
|
|
13 4 lnbc 1000 13 13
|
|
14 5 lnbc 1000 14 14
|
|
15 6 lnbc 1000 15 15
|
|
16 7 lnbc 1000 16 16
|
|
\.
|
|
|
|
SELECT pg_catalog.setval('public."InvoiceForward_id_seq"', 16, true);
|
|
|
|
COPY public."DirectPayment" ("id", "walletId", "senderId", "receiverId", "msats") FROM stdin;
|
|
1 1 21001 21001 1000
|
|
2 2 21001 21001 1000
|
|
3 4 21001 21001 1000
|
|
4 5 21001 21001 1000
|
|
5 6 21001 21001 1000
|
|
6 7 21001 21001 1000
|
|
7 8 21001 21001 1000
|
|
8 16 21001 21001 1000
|
|
9 27 21001 21001 1000
|
|
10 28 21001 21001 1000
|
|
11 29 21001 21001 1000
|
|
12 7 21001 21001 1000
|
|
13 7 21001 21001 1000
|
|
14 5 21001 21001 1000
|
|
15 5 21001 21001 1000
|
|
16 4 21001 21001 1000
|
|
\.
|
|
|
|
SELECT pg_catalog.setval('public."DirectPayment_id_seq"', 16, true);
|