Download src/pairing/pairing-store-sqlite.test-helpers.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 854 Bytes
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/pairing/pairing-store-sqlite.test-helpers.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/pairing/pairing-store-sqlite.test-helpers.ts
-
curl -L -o pairing-store-sqlite.test-helpers.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/pairing/pairing-store-sqlite.test-helpers.ts
854 Bytes
| import { runOpenClawStateWriteTransaction } from "../state/openclaw-state-db.js"; | |
| import { | |
| readChannelPairingState, | |
| sqliteOptionsForEnv, | |
| writeChannelPairingStateToDatabase, | |
| } from "./pairing-store-sqlite.js"; | |
| import type { PairingChannel } from "./pairing-store.types.js"; | |
| type ChannelPairingState = ReturnType<typeof readChannelPairingState>; | |
| export function readChannelPairingStateSnapshot( | |
| channel: PairingChannel, | |
| env: NodeJS.ProcessEnv = process.env, | |
| ): ChannelPairingState { | |
| return readChannelPairingState(channel, env); | |
| } | |
| export function writeChannelPairingStateSnapshot( | |
| channel: PairingChannel, | |
| state: ChannelPairingState, | |
| env: NodeJS.ProcessEnv = process.env, | |
| ): void { | |
| runOpenClawStateWriteTransaction( | |
| (database) => writeChannelPairingStateToDatabase(database, channel, state), | |
| sqliteOptionsForEnv(env), | |
| ); | |
| } | |