import type { PrivateKey } from '@libp2p/interface'; import type { SqliteDb } from './db.js'; export declare const DEFAULT_PEER_KEY_NAME = "peer-private-key"; /** * Loads the persisted NativeScript peer's libp2p private key, or generates a * fresh Ed25519 key on first call, persists it, and syncs the database before * returning it, so a power cut right after first start cannot give the node a * different peer id next time. An existing key is read as it is. * * The key is stored as raw protobuf bytes in the `kv` table's `b_val` column * under `keyName`. SQLite stores BLOB natively, so there is no base64 * round-trip — unlike text-only key/value stores. * * The returned `PrivateKey` can be passed directly to * `createLibp2pNode({ privateKey })`, giving a NativeScript peer a stable, * restart-surviving identity. */ export declare function loadOrCreateNSPeerKey(db: SqliteDb, keyName?: string): Promise; //# sourceMappingURL=identity.d.ts.map