@fairmint/wrapped-assets-daml-js
v0.0.3
Published
WrappedAssets-v01 DAML contracts with generated JavaScript/TypeScript bindings (Canton Token Standard holdings, mint/burn, compliance enforcement, BurnOffer redeem).
Readme
canton-assets
Apache-2.0 repository for the WrappedAssets-v01 DAML package — reserve-backed holdings
implementing Canton Token Standard V1 (holding, burn-mint, transfer, and allocation interfaces),
with transfer-agent compliance enforcement (holding freeze / instrument pause) and recovery.
Holdings require distinct operator and transfer-agent signatures (two-party authorization).
Published npm bindings: @fairmint/wrapped-assets-daml-js (generated JS/TS only — not an
application SDK). First real release is 0.0.1 (npm placeholder was 0.0.0).
For contract structure, redeem, and instrument pause, see docs/.
Install JS bindings
npm install @fairmint/wrapped-assets-daml-jsPeer dependencies: @daml/[email protected] and @daml/[email protected] (also listed as runtime
dependencies for convenience).
import { WRAPPED_ASSETS_TEMPLATES, WrappedAssets, Splice } from '@fairmint/wrapped-assets-daml-js';
console.log(WRAPPED_ASSETS_TEMPLATES.burnMintFactory);Minimal mint → enforce/release or BurnOffer.Accept sample:
examples/mint-burn/.
Layout
docs/contract-overview.md— structural template/choice map and workflow diagramsdocs/redeem.md— owner-initiated redemption viaBurnOfferdocs/instrument-pause.md— pause gate and recovery pathsdocs/— docs indexWrappedAssets-v01/— Token Standard V1 contractsTest/— in-memory Daml Script teststest/localnet/— live-ledger integration testsexamples/mint-burn/— JS bindings sampledars/— backed-up DARs (dars.lockfor integrity)generated/— build / codegen output (not hand-edited)multi-package.yaml— active package graph
Build and test
npm install
npx canton-dev-tools install-dpm-sdks
export PATH="$HOME/.dpm/bin:$PATH"
npm run lint
npm run build
npm test
npm run codegen
npm run verify-package
npm run typecheck:samplenpm run build fetches pinned Splice interface DARs via the packaged default in
@fairmint/canton-dev-tools before compiling with dpm. LocalNet runtime Splice/quickstart pins
live in that package as well. Optional repo-root splice-dars.json overrides the shared pin when
needed.
Generic DAML→JS codegen (codegen-js, bundle-dependencies, create-root-index, package stamping,
collapse-manifest, prepare-release) lives in @fairmint/canton-dev-tools. Bundle presets and the
merged published lib/ (including WRAPPED_ASSETS_TEMPLATES) are configured in repo-root
daml-js-bundle.json. This repo keeps product-specific verify lists and samples.
Publish on main uses GitHub Actions OIDC trusted publishing (publish.yml); do not put
NPM_TOKEN on the publish step.
LocalNet integration
Live-ledger tests upload the built DAR and smoke WrappedAssetsBurnMintFactory on Canton LocalNet
(Docker required; first start ~10–15 min):
npm run build
npm run localnet:verifyLocalNet lifecycle and DAML package tooling come from
@fairmint/canton-dev-tools. What this repo's suite
asserts is in test/localnet/README.md.
License
Apache-2.0. See LICENSE.
