diff options
| author | Adam Soltys <[email protected]> | 2026-03-13 15:14:43 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-13 15:14:51 -0700 |
| commit | 76f886edde74e8a77d62ecf7caa0b7bd8232a2fe (patch) | |
| tree | 5dabc65df532520f9e35abbd7e4ff82e1bdfaede /lib/ark.ts | |
| parent | 7a241cfb13395ba2218411cb56d2b0a73e758a06 (diff) | |
| download | coinos-server-76f886edde74e8a77d62ecf7caa0b7bd8232a2fe.tar.gz coinos-server-76f886edde74e8a77d62ecf7caa0b7bd8232a2fe.zip | |
persist vtxos to valkey
Diffstat (limited to 'lib/ark.ts')
| -rw-r--r-- | lib/ark.ts | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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; }; |
