aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ark.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-13 15:14:43 -0700
committerAdam Soltys <[email protected]>2026-03-13 15:14:51 -0700
commit76f886edde74e8a77d62ecf7caa0b7bd8232a2fe (patch)
tree5dabc65df532520f9e35abbd7e4ff82e1bdfaede /lib/ark.ts
parent7a241cfb13395ba2218411cb56d2b0a73e758a06 (diff)
downloadcoinos-server-76f886edde74e8a77d62ecf7caa0b7bd8232a2fe.tar.gz
coinos-server-76f886edde74e8a77d62ecf7caa0b7bd8232a2fe.zip
persist vtxos to valkey
Diffstat (limited to 'lib/ark.ts')
-rw-r--r--lib/ark.ts11
1 files changed, 10 insertions, 1 deletions
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;
};