
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@fleet-sdk/core
Advanced tools
Easily write Ergo off-chain code with a lightweight and pure JS library.
npm install @fleet-sdk/core
import { OutputBuilder, TransactionBuilder } from "@fleet-sdk/core";
const unsignedTransaction = new TransactionBuilder(creationHeight)
.from(inputs)
.to(new OutputBuilder(1000000n, "9gNvAv97W71Wm33GoXgSQBFJxinFubKvE6wh2dEhFTSgYEe783j"))
.sendChangeTo("9i2bQmRpCPLmDdVgBNyeAy7dDXqBQfjvcxVVt5YMzbDud6AvJS8")
.payMinFee()
.build();
To build a a transaction with multiple outputs you can simply pass an array of OutputBuilder as argument of to() method.
import { OutputBuilder, TransactionBuilder } from "@fleet-sdk/core";
const unsignedTransaction = new TransactionBuilder(creationHeight)
.from(inputs)
.to([
new OutputBuilder(1000000n, "9gNvAv97W71Wm33GoXgSQBFJxinFubKvE6wh2dEhFTSgYEe783j"),
new OutputBuilder(2000000n, "9fhJkRaSoPfzE9rA3e4ptK51xvyNsLKonYN1xje5LWaLukx7iX2")
])
.sendChangeTo("9i2bQmRpCPLmDdVgBNyeAy7dDXqBQfjvcxVVt5YMzbDud6AvJS8")
.payMinFee()
.build();
import { OutputBuilder, TransactionBuilder } from "@fleet-sdk/core";
const unsignedTransaction = new TransactionBuilder(creationHeight)
.from(inputs)
.to(
new OutputBuilder(1000000n, "9gNvAv97W71Wm33GoXgSQBFJxinFubKvE6wh2dEhFTSgYEe783j").addTokens([
{ tokenId: "0cd8c9f416e5b1ca9f986a7f10a84191dfb85941619e49e53c0dc30ebf83324b", amount: 100n },
{ tokenId: "36aba4b4a97b65be491cf9f5ca57b5408b0da8d0194f30ec8330d1e8946161c1", amount: 429n }
])
)
.sendChangeTo("9i2bQmRpCPLmDdVgBNyeAy7dDXqBQfjvcxVVt5YMzbDud6AvJS8")
.payMinFee()
.build();
import { OutputBuilder, TransactionBuilder } from "@fleet-sdk/core";
const unsignedTransaction = new TransactionBuilder(creationHeight)
.from(inputs)
.to(
new OutputBuilder(1000000n, "9gNvAv97W71Wm33GoXgSQBFJxinFubKvE6wh2dEhFTSgYEe783j").mintToken({
name: "TestToken",
amount: 21000000n,
decimals: 4,
description: "Just a test token"
})
)
.sendChangeTo("9i2bQmRpCPLmDdVgBNyeAy7dDXqBQfjvcxVVt5YMzbDud6AvJS8")
.payMinFee()
.build();
import { OutputBuilder, TransactionBuilder } from "@fleet-sdk/core";
const unsignedTransaction = new TransactionBuilder(creationHeight)
.from(inputs)
.burnTokens([
{ tokenId: "0cd8c9f416e5b1ca9f986a7f10a84191dfb85941619e49e53c0dc30ebf83324b", amount: 100n },
{ tokenId: "36aba4b4a97b65be491cf9f5ca57b5408b0da8d0194f30ec8330d1e8946161c1", amount: 429n }
])
.sendChangeTo("9i2bQmRpCPLmDdVgBNyeAy7dDXqBQfjvcxVVt5YMzbDud6AvJS8")
.payMinFee()
.build();
You can use configureSelector method to ensure one or more inputs to be included in the transaction. Useful when working with contracts.
import { OutputBuilder, TransactionBuilder } from "@fleet-sdk/core";
const boxId = "e56847ed19b3dc6b72828fcfb992fdf7310828cf291221269b7ffc72fd66706e";
const unsignedTransaction = new TransactionBuilder(creationHeight)
.from(inputs)
.to(new OutputBuilder(1000000n, "9gNvAv97W71Wm33GoXgSQBFJxinFubKvE6wh2dEhFTSgYEe783j"))
.sendChangeTo("9i2bQmRpCPLmDdVgBNyeAy7dDXqBQfjvcxVVt5YMzbDud6AvJS8")
.configureSelector((selector) => selector.ensureInclusion((input) => input.boxId === boxId))
.payMinFee()
.build();
FAQs
Fleet SDK core library
The npm package @fleet-sdk/core receives a total of 755 weekly downloads. As such, @fleet-sdk/core popularity was classified as not popular.
We found that @fleet-sdk/core demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.