
Product
Socket for ClickUp Is Now Available
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.
@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 15 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.

Product
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.

Product
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.