9f4d5e13aa
* 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>
26 lines
810 B
SQL
26 lines
810 B
SQL
-- AlterEnum
|
|
ALTER TYPE "WalletType" ADD VALUE 'CLN';
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "WalletCLN" (
|
|
"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,
|
|
"socket" TEXT NOT NULL,
|
|
"rune" TEXT NOT NULL,
|
|
"cert" TEXT,
|
|
|
|
CONSTRAINT "WalletCLN_pkey" PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "WalletCLN_walletId_key" ON "WalletCLN"("walletId");
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE "WalletCLN" ADD CONSTRAINT "WalletCLN_walletId_fkey" FOREIGN KEY ("walletId") REFERENCES "Wallet"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
|
|
CREATE TRIGGER wallet_cln_as_jsonb
|
|
AFTER INSERT OR UPDATE ON "WalletCLN"
|
|
FOR EACH ROW EXECUTE PROCEDURE wallet_wallet_type_as_jsonb();
|