Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
transport agnostic strongly typed duplex rpc interfaces
npm i alice-bob
|
pnpm add alice-bob
|
yarn add alice-bob
|
Alice
– Alice class.
local
– The local Agent.{
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
agents
(local, remote) – Returns the agents tuple [alice, bob]
.
Example:
const [alice, bob] = new Alice<Local, Remote>().agents()
// to enable debugging on local (alice)
const [alice, bob] = new Alice<Local, Remote>().agents({ debug: true })
// use different names:
const [alice, bob] = new Alice<Local, Remote>().agents(
{ name: 'server', debug: true },
{ name: 'client' }
)
agents(local, remote) =>
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
AgentBA
AliceBob
– AliceBob class.
local
– The local Agent.{
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
agents
(local, remote) – Returns the agents tuple [alice, bob]
.
Example:
const [alice, bob] = new Alice<Local, Remote>().agents()
// to enable debugging on local (alice)
const [alice, bob] = new Alice<Local, Remote>().agents({ debug: true })
// use different names:
const [alice, bob] = new Alice<Local, Remote>().agents(
{ name: 'server', debug: true },
{ name: 'client' }
)
agents(local, remote) =>
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
AgentBA
Bob
– Bob class.
local
– The local Agent.{
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
agents
(local, remote) – Returns the agents tuple [alice, bob]
.
Example:
const [alice, bob] = new Alice<Local, Remote>().agents()
// to enable debugging on local (alice)
const [alice, bob] = new Alice<Local, Remote>().agents({ debug: true })
// use different names:
const [alice, bob] = new Alice<Local, Remote>().agents(
{ name: 'server', debug: true },
{ name: 'client' }
)
agents(local, remote) =>
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
AgentBA
Agent
– Agent.{
name
– The name of the agent. Defaults to either 'alice' or 'bob' depending
on the constructor used, Alice or Bob.string
send
– The send method overriden by the user to any transport.PayloadMethod<Agent<B, A>>
deferredSend
() – Returns the send method. Used in contexts where it might
change between sessions, like browser refresh/hot/livereload.
deferredSend() =>
log
(args) – Overridable logging function. Defaults to console.log()
and prepends agent.name
.
args
unknown []
log(args) =>
All contributions are welcome!
FAQs
transport agnostic strongly typed duplex rpc interfaces
The npm package alice-bob receives a total of 5 weekly downloads. As such, alice-bob popularity was classified as not popular.
We found that alice-bob demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.