
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@livestore/common-cf
Advanced tools
This module provides a direct RPC communication layer for Cloudflare Durable Objects using Effect RPC. Instead of communicating over HTTP/WebSocket like traditional RPC implementations, this uses Cloudflare's native Durable Object RPC calls for efficient, low-latency communication between Durable Objects.
ReadableStream
at the transport levelclient.ts
: RPC client protocol using layerProtocolDurableObject
server.ts
: RPC server handler using toDurableObjectHandler
ReadableStream
support for multi-value responses (requires binary messages)const MyRpcs = RpcGroup.make(
Rpc.make('Add', {
payload: Schema.Struct({ a: Schema.Number, b: Schema.Number }),
success: Schema.Struct({ result: Schema.Number }),
}),
Rpc.make('Divide', {
payload: Schema.Struct({ a: Schema.Number, b: Schema.Number }),
success: Schema.Struct({ result: Schema.Number }),
error: Schema.String,
}),
Rpc.make('CountUp', {
payload: Schema.Struct({ startValue: Schema.Number }),
success: Schema.Struct({ result: Schema.Number }),
stream: true,
}),
)
// Server setup
const MyRpcsLive = MyRpcs.toLayer({
Add: ({ a, b }) => Effect.succeed({ result: a + b }),
Divide: ({ a, b }) => Effect.succeed({ result: a / b }),
CountUp: ({ startValue }) => Stream.iterate(startValue, (acc) => acc + 1).pipe(Stream.schedule(Schedule.spaced(1000))),
})
const handler = toDurableObjectHandler(MyRpcs, {
layer: MyRpcsLive
})
// In Durable Object
async rpc(payload: Uint8Array): Promise<Uint8Array | ReadableStream> {
return handler(payload).pipe(Effect.runPromise)
}
// Client setup
const client = RpcClient.make(MyRpcs, {
layer: layerProtocolDurableObject(
(payload) => serverDO.rpc(payload)
)
})
// Usage (client side)
const result = yield* client.Add({ a: 1, b: 2 })
const result2 = yield* client.Divide({ a: 1, b: 2 })
const result3 = yield* client.CountUp({ startValue: 0 }).pipe(Stream.take(10), Stream.runCollect)
FAQs
Unknown package
The npm package @livestore/common-cf receives a total of 1,418 weekly downloads. As such, @livestore/common-cf popularity was classified as popular.
We found that @livestore/common-cf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.