{"_id":"@atomiqlabs/storage-memory-indexed-kv","_rev":"9-f2c2cfacc478fa14158a9f75492b8ecb","name":"@atomiqlabs/storage-memory-indexed-kv","dist-tags":{"next":"2.0.3","latest":"2.0.5"},"versions":{"1.0.0":{"name":"@atomiqlabs/storage-memory-indexed-kv","version":"1.0.0","keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"author":{"name":"adambor"},"license":"ISC","_id":"@atomiqlabs/storage-memory-indexed-kv@1.0.0","maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"dist":{"shasum":"233e848dda6ec2c097b30f3ab699fdb8876731b1","tarball":"https://registry.npmjs.org/@atomiqlabs/storage-memory-indexed-kv/-/storage-memory-indexed-kv-1.0.0.tgz","fileCount":17,"integrity":"sha512-Po4NM0TifYiBF2lH+EOo7HkQXOekKYTkIjQjtNvHO9fxSBYpM/I3kjmUfmBeiNFPiUD5pSi+vhYtMtzM5BXinQ==","signatures":[{"sig":"MEUCIQCBcRKf6JOSXThIHSthW+w0glyyruRfwFlgLst0KV1h8gIgPt9Rl/jiPkjpwCWGIs5/ggC+lMaUvq9DjoSgwcoacVk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":174901},"main":"./dist/index.js","types":"./dist/index.d.ts","types:":"./dist/index.d.ts","scripts":{"test":"jest"},"_npmUser":{"name":"adambor","email":"adamborcany@gmail.com"},"_npmVersion":"10.5.0","description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","directories":{},"_nodeVersion":"18.20.2","dependencies":{"@atomiqlabs/base":"^11.0.0","promise-queue-ts":"^1.0.0","@atomiqlabs/sdk-lib":"^15.0.16"},"_hasShrinkwrap":false,"devDependencies":{"ts-jest":"^29.4.4","typescript":"4.9.5","@types/jest":"^30.0.0","@types/node":"22.9.3"},"_npmOperationalInternal":{"tmp":"tmp/storage-memory-indexed-kv_1.0.0_1760009942711_0.23645250264812834","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@atomiqlabs/storage-memory-indexed-kv","version":"1.0.1","keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"author":{"name":"adambor"},"license":"ISC","_id":"@atomiqlabs/storage-memory-indexed-kv@1.0.1","maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"dist":{"shasum":"12c22373956304eb4f29b1c7ff78c9725de542af","tarball":"https://registry.npmjs.org/@atomiqlabs/storage-memory-indexed-kv/-/storage-memory-indexed-kv-1.0.1.tgz","fileCount":17,"integrity":"sha512-rYZwfgE1iCCHHgpjiKJi08xy3kzVgjggo2X+JY+TErUytbEwHGAeofJTkwzM8rBF6RYRt5AzGZlayAjeFV75hg==","signatures":[{"sig":"MEUCIQCjWDs3himhVrqPLA7xikO7RhOcc+NsVyxR1vgUKYm6/QIgaNGBj9degG7llIG7dQFcN0wx4f04FpLgS1+xNGOE1kA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":175004},"main":"./dist/index.js","types":"./dist/index.d.ts","types:":"./dist/index.d.ts","scripts":{"test":"jest"},"_npmUser":{"name":"adambor","email":"adamborcany@gmail.com"},"_npmVersion":"10.5.0","description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","directories":{},"_nodeVersion":"18.20.2","dependencies":{"promise-queue-ts":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-jest":"^29.4.4","typescript":"4.9.5","@types/jest":"^30.0.0","@types/node":"22.9.3"},"peerDependencies":{"@atomiqlabs/base":">=11.0.0 <13.0.0","@atomiqlabs/sdk-lib":">=15.0.16 <17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-memory-indexed-kv_1.0.1_1760048674558_0.8689102702329803","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@atomiqlabs/storage-memory-indexed-kv","version":"2.0.0","keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"author":{"name":"adambor"},"license":"ISC","_id":"@atomiqlabs/storage-memory-indexed-kv@2.0.0","maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"dist":{"shasum":"9795f5abe1c0db9bbc57e2b021732fe93a6336d9","tarball":"https://registry.npmjs.org/@atomiqlabs/storage-memory-indexed-kv/-/storage-memory-indexed-kv-2.0.0.tgz","fileCount":17,"integrity":"sha512-VOlJzu0czmnq7aV5dCpgxo9Vm2QHX3klPMJVAJz2z5FQLBvAnS60YXMIfcNKoybiwyUyZABjVoA75g+ovRvpnw==","signatures":[{"sig":"MEUCIQDKDKhp3Z8kROe+mJLMI6rUVrdCjNqMAX7CtYKOlbjqwgIgcUNZIWJSsRmtN/7PjJOhJl1ozw6rD3w36ej8lvtQQ6o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":178192},"main":"./dist/index.js","types":"./dist/index.d.ts","types:":"./dist/index.d.ts","gitHead":"9aa73a3ee1f839a07f1026ff854fe35f505d1235","scripts":{"test":"jest"},"_npmUser":{"name":"adambor","email":"adamborcany@gmail.com"},"_npmVersion":"11.6.0","description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","directories":{},"_nodeVersion":"24.9.0","dependencies":{"promise-queue-ts":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ts-jest":"^29.4.4","typescript":"4.9.5","@types/jest":"^30.0.0","@types/node":"22.9.3"},"peerDependencies":{"@atomiqlabs/sdk":">=8.0.0 <9.0.0","@atomiqlabs/base":">=11.0.0 <14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-memory-indexed-kv_2.0.0_1769622026907_0.9662994563223701","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@atomiqlabs/storage-memory-indexed-kv","version":"2.0.1","keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"author":{"name":"adambor"},"license":"ISC","_id":"@atomiqlabs/storage-memory-indexed-kv@2.0.1","maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"dist":{"shasum":"01ee45c91820ba581c6e2eb0c077f84ac7e2c945","tarball":"https://registry.npmjs.org/@atomiqlabs/storage-memory-indexed-kv/-/storage-memory-indexed-kv-2.0.1.tgz","fileCount":17,"integrity":"sha512-1St9QWphtEgbEUAJrGGMFapr52W3Mm05sSHsVp1WwV6kluBsxEEEHqGAxK8Pq5X+vCkrAjAXxaE9oavGWTQKtQ==","signatures":[{"sig":"MEQCIHxUPTgtjsOfuXTKh7mDukHNxurvjzFiMCluFYSo0+bxAiALmUVxvocd5MhztcbT1RetPstDNpcUUc0jbCtJupD9zg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":178300},"main":"./dist/index.js","types":"./dist/index.d.ts","types:":"./dist/index.d.ts","gitHead":"dc46f92604c26ecf620a09f0cc7d0c2d2a174436","scripts":{"test":"jest","build:ts4":"npx -p typescript@4.9 tsc --noEmit","build:ts5":"npx -p typescript@5 tsc --noEmit"},"_npmUser":{"name":"adambor","email":"adamborcany@gmail.com"},"_npmVersion":"11.6.0","description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","directories":{},"_nodeVersion":"24.9.0","dependencies":{"promise-queue-ts":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ts-jest":"^29.4.4","typescript":">=4","@types/jest":"^30.0.0","@types/node":"22.9.3"},"peerDependencies":{"@atomiqlabs/sdk":">=8.0.0 <9.0.0","@atomiqlabs/base":">=11.0.0 <14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-memory-indexed-kv_2.0.1_1769622188388_0.541130004283014","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@atomiqlabs/storage-memory-indexed-kv","version":"2.0.2","keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"author":{"name":"adambor"},"license":"ISC","_id":"@atomiqlabs/storage-memory-indexed-kv@2.0.2","maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"dist":{"shasum":"baec3201f10d362250b8feaf491a1fa83a5a2380","tarball":"https://registry.npmjs.org/@atomiqlabs/storage-memory-indexed-kv/-/storage-memory-indexed-kv-2.0.2.tgz","fileCount":17,"integrity":"sha512-Sildr0A2RvNn19XKcuQyLPPCc77tMQfD7FBvFPJnsrXsvGw8EozPaPx3PZ9FSjyv3ALkcS2qPyrgbr9l9NQIvQ==","signatures":[{"sig":"MEUCIQCR9wWfVkIqHSJiLEubmt5kYOwIv8bHaejYrbdJy//K3AIgHA3TeWZ3OjGM5uh4/+8hM8GBzeLCowKy2C+MimFQh3I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":179917},"main":"./dist/index.js","types":"./dist/index.d.ts","types:":"./dist/index.d.ts","gitHead":"dc46f92604c26ecf620a09f0cc7d0c2d2a174436","scripts":{"test":"jest","build:ts4":"npx -p typescript@4.9 tsc --noEmit","build:ts5":"npx -p typescript@5 tsc --noEmit"},"_npmUser":{"name":"adambor","email":"adamborcany@gmail.com"},"_npmVersion":"11.6.0","description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","directories":{},"_nodeVersion":"24.9.0","dependencies":{"promise-queue-ts":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ts-jest":"^29.4.4","typescript":">=4","@types/jest":"^30.0.0","@types/node":"22.9.3"},"peerDependencies":{"@atomiqlabs/sdk":">=8.0.0 <9.0.0","@atomiqlabs/base":">=11.0.0 <14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-memory-indexed-kv_2.0.2_1769622479734_0.3823450875301164","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@atomiqlabs/storage-memory-indexed-kv","version":"2.0.3","keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"author":{"name":"adambor"},"license":"ISC","_id":"@atomiqlabs/storage-memory-indexed-kv@2.0.3","maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"dist":{"shasum":"5c56039eef40a446ea38de1016e11b18d5b1084f","tarball":"https://registry.npmjs.org/@atomiqlabs/storage-memory-indexed-kv/-/storage-memory-indexed-kv-2.0.3.tgz","fileCount":17,"integrity":"sha512-Z4PkEIHdInrEuFmWys1DvK+ax394N+FHEnaPaJ15VUY7ZJt40oRJH4DKC+jtQdfU1OPGi7mVjaVQ86+KChgLrg==","signatures":[{"sig":"MEQCIFpiZq+v2tQMELXSbStN4Ia3AXGA++zCNA89xK7KXqMRAiBIZxqbrZoh18E3eGyZESQqkfAE5pWNmfCBiff6fPvG1w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":179949},"main":"./dist/index.js","types":"./dist/index.d.ts","types:":"./dist/index.d.ts","gitHead":"25681b56f11f6ab87afb35d976f8f6bbc5676874","scripts":{"test":"jest","build:ts4":"npx -p typescript@4.9 tsc --noEmit","build:ts5":"npx -p typescript@5 tsc --noEmit"},"_npmUser":{"name":"adambor","email":"adamborcany@gmail.com"},"_npmVersion":"11.6.0","description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","directories":{},"_nodeVersion":"24.9.0","dependencies":{"promise-queue-ts":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ts-jest":"^29.4.4","typescript":">=4","@types/jest":"^30.0.0","@types/node":"22.9.3"},"peerDependencies":{"@atomiqlabs/sdk":">=8.0.0 <9.0.0","@atomiqlabs/base":">=11.0.0 <14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-memory-indexed-kv_2.0.3_1769622690554_0.07266537360092085","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@atomiqlabs/storage-memory-indexed-kv","version":"2.0.4","keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"author":{"name":"adambor"},"license":"ISC","_id":"@atomiqlabs/storage-memory-indexed-kv@2.0.4","maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"dist":{"shasum":"2a46efae42f930c3bfc3ac277c62d8b827b95c61","tarball":"https://registry.npmjs.org/@atomiqlabs/storage-memory-indexed-kv/-/storage-memory-indexed-kv-2.0.4.tgz","fileCount":17,"integrity":"sha512-DILh5VfNZ4cdiKjbcp0FLuvNw6e0+4uQrG9BVpCzrZKQKrsVjJU4oyCfySRxTZnN5XpdB1ttesQgHuUYr7DaOA==","signatures":[{"sig":"MEYCIQDDWTi80PB4ymfQyieIPI4w8AJb39ZrsU5ZkTX4hf/mOAIhAMvq9y5WXFnkQ6+iTbMZVK3QoamZLZT4rTzOImkvpVHA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":204298},"main":"./dist/index.js","types":"./dist/index.d.ts","types:":"./dist/index.d.ts","gitHead":"b822dbfec277744fd794de5fa934fffad97b5879","scripts":{"test":"jest","build:ts4":"npx -p typescript@4.9 tsc --noEmit","build:ts5":"npx -p typescript@5 tsc --noEmit"},"_npmUser":{"name":"adambor","email":"adamborcany@gmail.com"},"_npmVersion":"11.6.0","description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","directories":{},"_nodeVersion":"24.9.0","dependencies":{"promise-queue-ts":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-jest":"^29.4.4","typescript":">=4","@types/jest":"^30.0.0","@types/node":"22.9.3"},"peerDependencies":{"@atomiqlabs/sdk":">=8.0.0 <9.0.0","@atomiqlabs/base":">=11.0.0 <14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storage-memory-indexed-kv_2.0.4_1773147818382_0.1908961411662211","host":"s3://npm-registry-packages-npm-production"}},"2.0.5":{"name":"@atomiqlabs/storage-memory-indexed-kv","version":"2.0.5","description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","main":"./dist/index.js","types:":"./dist/index.d.ts","scripts":{"test":"jest","build:ts4":"npx -p typescript@4.9 tsc --noEmit","build:ts5":"npx -p typescript@5 tsc --noEmit"},"keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"author":{"name":"adambor"},"license":"ISC","dependencies":{"promise-queue-ts":"^1.0.0"},"peerDependencies":{"@atomiqlabs/sdk":">=8.0.0 <9.0.0","@atomiqlabs/base":">=11.0.0 <14.0.0"},"devDependencies":{"@types/jest":"^30.0.0","@types/node":"22.9.3","ts-jest":"^29.4.4","typescript":">=4"},"_id":"@atomiqlabs/storage-memory-indexed-kv@2.0.5","gitHead":"e9169e300b40d60307ae71cb8a4417d7377f6fa3","types":"./dist/index.d.ts","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-0mzsnzqqW0JD573N3cO5doCKAjxIxun7V2HvsaJNxF21ZEdDa4XGT6mQhxE2zYX/fmmkqu0ibi/d6Fmu6Wn7ow==","shasum":"5584d4716c92720514e11f9a790125c27eabe596","tarball":"https://registry.npmjs.org/@atomiqlabs/storage-memory-indexed-kv/-/storage-memory-indexed-kv-2.0.5.tgz","fileCount":17,"unpackedSize":169600,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCthA72bs0I7tQVRs48lpdU/ujsiLeq/VDbhaYuzUB3DAIhANBk2cT0eIdzqCiy4YIiTHHxsH0CF5O5rg9hcdK/1iD4"}]},"_npmUser":{"name":"adambor","email":"adamborcany@gmail.com"},"directories":{},"maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/storage-memory-indexed-kv_2.0.5_1773150517929_0.25707433911191035"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-09T11:39:02.616Z","modified":"2026-03-10T13:48:38.212Z","1.0.0":"2025-10-09T11:39:02.915Z","1.0.1":"2025-10-09T22:24:34.744Z","2.0.0":"2026-01-28T17:40:27.058Z","2.0.1":"2026-01-28T17:43:08.545Z","2.0.2":"2026-01-28T17:47:59.900Z","2.0.3":"2026-01-28T17:51:30.707Z","2.0.4":"2026-03-10T13:03:38.572Z","2.0.5":"2026-03-10T13:48:38.095Z"},"author":{"name":"adambor"},"license":"ISC","keywords":["Bitcoin","Cross-chain","Cryptocurrency","Bridge","Trustless"],"description":"An abstract storage implementation for atomiqlabs SDK, uses in-memory indexes and any provided key-value store as a backend","maintainers":[{"name":"adambor","email":"adamborcany@gmail.com"}],"readme":"# @atomiqlabs/storage-memory-indexed-kv\n\n`@atomiqlabs/storage-memory-indexed-kv` provides key-value-backed storage adapters for the Atomiq SDK.\n\n- swaps are persisted as plain key-value records in your backend\n- during `init()`, the adapter reads the stored swaps and rebuilds the required simple and composite indexes in memory\n- queries are then served from those in-memory indexes\n- writes are serialized through a single write queue and update both the backend and the in-memory indexes\n\nBecause the indexes live in RAM, this adapter is intended for single-user, client-side datasets. In practice this means it is suitable for swap stores with fewer than roughly `10,000` saved swaps.\n\n\n## What this package provides\n\n- `MemoryIndexedKeyValueUnifiedStorage`: SDK-compatible unified swap storage built on top of any key-value backend that implements `IKeyValueStorage`.\n- `KeyValueStorageManager`: simple `IStorageManager` adapter for chain storage built on top of `IKeyValueStorage`.\n- `IKeyValueStorage<Async>`: the backend interface you implement for your own persistent key-value store.\n\n## When to use\n\nUse this package when you:\n\n- want to plug the Atomiq SDK into a custom persistent key-value store\n- are storing swaps for a single client or device\n- expect a relatively small local swap history\n- need a lightweight adapter for browser-like, mobile, or embedded client environments\n\nDo not use this package for:\n\n- backend services with many users\n- shared databases\n- long-lived services where swap counts can grow large\n- environments where multiple processes need to coordinate on the same storage\n\nFor backend-scale storage, prefer `@atomiqlabs/storage-sqlite` or another adapter with database-native indexing.\n\n## Installation\n\n```bash\nnpm install @atomiqlabs/sdk @atomiqlabs/base @atomiqlabs/storage-memory-indexed-kv\n```\n\nMost applications should not need this package directly unless they are implementing a custom storage backend.\n\n## How to use\n\n### Implement `IKeyValueStorage`\n\nWrap your storage backend with the `IKeyValueStorage` interface:\n\n```typescript\nexport interface IKeyValueStorage<Async extends boolean> {\n    async: Async;\n\n    init(): Promise<void>;\n\n    get(key: string): Async extends true ? Promise<string | null> : (string | null);\n    set(key: string, value: string): Async extends true ? Promise<void> : void;\n    remove(key: string): Async extends true ? Promise<void> : void;\n    getKeys(): Async extends true ? Promise<string[]> : string[];\n\n    //Batch methods are optional, but implementing them is recommended because they reduce read and write overhead.\n    getAll?(keys: string[]): Async extends true ? Promise<(string | null)[]> : (string | null)[];\n    setAll?(values: { key: string, value: string }[]): Async extends true ? Promise<void> : void;\n    removeAll?(keys: string[]): Async extends true ? Promise<void> : void;\n}\n```\n\nThe interface supports both synchronous and asynchronous storage backends, hence the `Async` generic.\n\n### Example custom backend\n\n```typescript\nimport {\n    IKeyValueStorage,\n    KeyValueStorageManager,\n    MemoryIndexedKeyValueUnifiedStorage\n} from \"@atomiqlabs/storage-memory-indexed-kv\";\n\nclass MyKeyValueStorage implements IKeyValueStorage<true> {\n    readonly async = true as const;\n\n    constructor(private readonly prefix: string) {}\n\n    async init(): Promise<void> {\n        // Initialize your backend if needed.\n    }\n\n    async get(key: string): Promise<string | null> {\n        return myKeyValueBackend.get(this.prefix + key);\n    }\n\n    async set(key: string, value: string): Promise<void> {\n        await myKeyValueBackend.set(this.prefix + key, value);\n    }\n\n    async remove(key: string): Promise<void> {\n        await myKeyValueBackend.remove(this.prefix + key);\n    }\n\n    async getKeys(): Promise<string[]> {\n        const keys = await myKeyValueBackend.getKeysWithPrefix(this.prefix);\n        return keys.map(key => key.substring(this.prefix.length));\n    }\n\n    async getAll(keys: string[]): Promise<(string | null)[]> {\n        return Promise.all(keys.map(key => this.get(key)));\n    }\n\n    async setAll(values: { key: string; value: string }[]): Promise<void> {\n        await Promise.all(values.map(value => this.set(value.key, value.value)));\n    }\n\n    async removeAll(keys: string[]): Promise<void> {\n        await Promise.all(keys.map(key => this.remove(key)));\n    }\n}\n\nconst swapStorage = new MemoryIndexedKeyValueUnifiedStorage(\n    new MyKeyValueStorage(\"atomiq_sdk_chain_SOLANA_\")\n);\nconst storageManager = new KeyValueStorageManager(\n    new MyKeyValueStorage(`atomiq_sdk_store_SOLANA_`)\n);\n```\n\n### SDK Usage\n\nUse your custom storage as the SDK's `swapStorage`:\n\n```typescript\nimport {BitcoinNetwork, SwapperFactory, TypedSwapper} from \"@atomiqlabs/sdk\";\nimport {MemoryIndexedKeyValueUnifiedStorage} from \"@atomiqlabs/storage-memory-indexed-kv\";\n\nconst chains = [SolanaInitializer] as const;\ntype SupportedChains = typeof chains;\n\nconst Factory = new SwapperFactory<SupportedChains>(chains);\n\nconst swapper: TypedSwapper<SupportedChains> = Factory.newSwapper({\n    chains: {\n        ...\n    },\n    bitcoinNetwork: BitcoinNetwork.MAINNET,\n    swapStorage: chainId => new MemoryIndexedKeyValueUnifiedStorage(\n        new MyKeyValueStorage(`atomiq_sdk_chain_${chainId}_`)\n    ),\n    chainStorageCtor: name => new KeyValueStorageManager(\n        new MyKeyValueStorage(`atomiq_sdk_store_${name}_`)\n    )\n});\n\nawait swapper.init();\n```\n\n## Options\n\n`MemoryIndexedKeyValueUnifiedStorage` accepts optional configuration:\n\n- `maxBatchItems`: maximum number of items processed per batch during initialization, reads, and bulk writes. Default: `100`.\n- `allowQueryWithoutIndexes`: allows fallback full-scan queries when no configured index matches. Default: `false`.\n\nLeaving `allowQueryWithoutIndexes` disabled is usually the right choice, because full scans negate the point of the in-memory index model and can become expensive as the stored swap count grows.\n","readmeFilename":"README.md"}