
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@liftedinit/many-js
Advanced tools
[](https://app.circleci.com/pipelines/gh/liftedinit/many-js) [](https://app.codecov.io/gh/liftedinit/many-js)
This library can be used by JavaScript applications to connect to networks that support the Many Protocol.
Instantiate Network and apply modules.
import { Account, Base, Events, IdStore, Ledger, Network } from "many-js"
const network = new Network("/api", identity)
network.apply([Account, Base, Events, IdStore, Ledger])
Generating key pairs.
KeyPair.fromSeedWords(string) // => KeyPair
KeyPair.fromPem(string) // => KeyPair
Managing identities.
identity = Address.fromPublicKey(key) // => Address
identity = Address.fromString(string) // => Address
anonymous = new Address() // => Anonymous Address
identity.toString(keys) // => "mw7aekyjtsx2hmeadrua5cpitgy7pykjkok3gyth3ggsio4zwa"
identity.toHex(keys) // => "01e736fc9624ff8ca7956189b6c1b66f55f533ed362ca48c884cd20065";
Encoding and decoding messages.
msg = { to, from, method, data, timestamp, version }
message = Message.fromObject(msg) // Message
message.toCborData() // => Anonymous CBOR Buffer
message.toCborData(keys) // => Signed CBOR Buffer
message.content // => Object
Sending and receiving messages from a network.
network = new Network(url, keys)
network.sendEncoded(cbor) // => Encoded Response
network.send(msg) // => Decoded Response
network.base.endpoints() // => Decoded and Parsed Response
network.ledger.info() // => Decoded and Parsed Response
import { Network, Account } from "many-js"
const network = new Network("/api", identity)
network.apply([Account])
const roles = new Map().set("ma123....", [
AccountRole[AccountRole.canMultisigApprove],
AccountRole[AccountRole.canMultisigSubmit],
])
const features = [
AccountFeatureTypes.accountLedger,
[
AccountFeatureTypes.accountMultisig,
new Map()
.set(AccountMultisigArgument.threshold, 2)
.set(AccountMultisigArgument.expireInSecs, 3600)
.set(AccountMultisigArgument.executeAutomatically, false),
],
]
await network.account.create("account name", roles, features)
network.apply([Account])
const roles = new Map().set("ma321.....", [
AccountRole[AccountRole.canLedgerTransact],
])
const features = [
[
AccountFeatureTypes.accountLedger,
AccountFeatureTypes.accountMultisig,
new Map()
.set(AccountMultisigArgument.threshold, 2)
.set(AccountMultisigArgument.expireInSecs, 3600)
.set(AccountMultisigArgument.executeAutomatically, false),
],
]
await network.account.addFeatures({ account: "ma12345.....", roles, features })
network.apply([Account])
const accountAddress = "ma987....."
await network.account.setDescription(
accountAddress,
"new account name-description",
)
network.apply([Account])
const accountAddress = "ma987....."
const roles = new Map()
.set("ma321.....", [AccountRole[AccountRole.canLedgerTransact]])
.set("ma123.....", [
AccountRole[AccountRole.canLedgerTransact],
AccountRole[AccountRole.canLedgerSubmit],
])
await network.account.addRoles(accountAddress, roles)
network.apply([Account])
const accountAddress = "ma987....."
const roles = new Map().set("ma321.....", [
AccountRole[AccountRole.canLedgerTransact],
])
await network.account.removeRoles(accountAddress, roles)
network.apply([Account])
await network.account.multisigInfo(token)
FAQs
[](https://app.circleci.com/pipelines/gh/liftedinit/many-js) [](https://app.codecov.io/gh/liftedinit/many-js)
We found that @liftedinit/many-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.