From 76f886edde74e8a77d62ecf7caa0b7bd8232a2fe Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 13 Mar 2026 15:14:43 -0700 Subject: persist vtxos to valkey --- lib/ark.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/ark.ts') diff --git a/lib/ark.ts b/lib/ark.ts index 3fc33ef6..5f695f6e 100644 --- a/lib/ark.ts +++ b/lib/ark.ts @@ -3,6 +3,7 @@ if (!globalThis.EventSource) globalThis.EventSource = EventSource as any; import config from "$config"; import { SingleKey, Wallet, Ramps, RestArkProvider, VtxoManager } from "@arkade-os/sdk"; +import { ValkeyWalletRepository, ValkeyContractRepository } from "$lib/arkRepository"; import { db } from "$lib/db"; import { l, warn } from "$lib/logging"; @@ -21,7 +22,15 @@ const getWallet = async () => { const { arkPrivateKey, arkServerUrl, esploraUrl } = config.ark; const identity = SingleKey.fromHex(arkPrivateKey); - wallet = await Wallet.create({ identity, arkServerUrl, esploraUrl }); + wallet = await Wallet.create({ + identity, + arkServerUrl, + esploraUrl, + storage: { + walletRepository: new ValkeyWalletRepository(), + contractRepository: new ValkeyContractRepository(), + }, + }); return wallet; }; -- cgit v1.2.3