
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@onflow/encode
Advanced tools
Encoding utilities for Flow entities. Produces the values that need to be signed for successful transactions.
This package is fairly close to its first major version release. As we propogate some of the terms used in this module to other things they might break, but unless the Flow blockchain needs different things signed nothing should really change here.
npm install --save @onflow/encode
import {
encodeTransactionPayload,
encodeTransactionEnvelope,
} from "@onflow/encode"
const payloadMsg = encodeTransactionPayload({
script: `transaction { execute { log("Hello, World!") } }`,
refBlock: "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b",
gasLimit: 42,
proposalKey: {
address: "01",
keyId: 7,
sequenceNum: 10,
},
payer: "01",
authorizers: ["01"],
})
const envelopeMsg = encodeTransactionEnvelope({
script: `transaction { execute { log("Hello, World!") } }`,
refBlock: "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b",
gasLimit: 42,
proposalKey: {
address: "01",
keyId: 7,
sequenceNum: 10,
},
payer: "01",
authorizers: ["01"],
payloadSigs: [
{
address: "01",
keyId: 7,
sig: "f7225388c1d69d57e6251c9fda50cbbf9e05131e5adb81e5aa0422402f048162",
},
],
})
FAQs
Encoding utilities for Flow entities.
We found that @onflow/encode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.