
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
@canton-network/core-test-token
Advanced tools
TypeScript wrapper package for the Test Token DAML codegen.
This package requires a localnet instance that relies on Splice v0.6.12 or higher. Please ensure you have the latest localnet fetched.
From src/index.ts:
TestTokenV1: shortcut to Splice.Testing.Tokens.TestTokenV1packageId: re-export from @daml.js/test-token-v1commands: command builders for Test Token templates and choicesFrom the repo root:
pnpm --filter @canton-network/core-test-token build
The build produces:
dist/index.jsdist/index.cjsdist/index.browser.jsdist/index.d.tsThis package depends on generated DAML JS artifacts under
damljs/test-token-v1.
To refresh those artifacts, run:
pnpm script:generate:test-token
Then rebuild this package.
import {
TestTokenV1,
packageId,
commands,
} from '@canton-network/core-test-token'
const template = TestTokenV1
console.log(packageId)
// Build a create command for TokenRules
const createRules = commands.create.rules({ admin: 'Alice::1220...' })
// Build an exercise command for TokenTransferOffer.Accept
const acceptTransfer = commands.exercise.transferOffer.accept({
contractId: '00a1b2c3d4...',
choiceArgument: {},
})
The commands export provides typed helpers that return
WrappedCommand<'CreateCommand'> and WrappedCommand<'ExerciseCommand'>.
Available builders:
commands.create.transferOffercommands.create.allocationcommands.create.rulescommands.exercise.transferOffer.acceptcommands.exercise.transferOffer.rejectcommands.exercise.transferOffer.withdrawcommands.exercise.transferOffer.updatecommands.exercise.allocation.executeTransfercommands.exercise.allocation.cancelcommands.exercise.allocation.withdrawcommands.exercise.rules.transfer.transfercommands.exercise.rules.transfer.publicFetchcommands.exercise.rules.allocation.allocatecommands.exercise.rules.allocation.publicFetchExample:
import { commands } from '@canton-network/core-test-token'
const createAllocation = commands.create.allocation({
allocation: {
// Fill with your AllocationSpecification payload
},
})
const executeTransfer = commands.exercise.allocation.executeTransfer({
contractId: '00f00d...',
choiceArgument: {
// Fill with Allocation_ExecuteTransfer choice argument
},
})
Apache-2.0
FAQs
daml codegen js for test-token package
The npm package @canton-network/core-test-token receives a total of 8 weekly downloads. As such, @canton-network/core-test-token popularity was classified as not popular.
We found that @canton-network/core-test-token demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.