Skip to content

@sigilry/splice-dars

@sigilry/splice-dars provides vendored Splice DAR files with typed path exports. Use it with @sigilry/cli to generate TypeScript types from the official Splice contracts without manually downloading release artifacts.

DAR (DAML Archive) files are compiled packages of DAML smart contracts. The Splice network publishes DARs for its token standard, amulet contracts, and wallet APIs. You need these DARs to generate typed TypeScript bindings for interacting with Splice contracts on Canton Network.

Terminal window
yarn add @sigilry/splice-dars

The primary use case is feeding DAR paths to @sigilry/cli for TypeScript code generation:

sigilry.config.ts
import { defineConfig } from "@sigilry/cli/config";
import { spliceDars } from "@sigilry/splice-dars";
export default defineConfig({
dars: [spliceDars.amulet, spliceDars.apiTokenHolding, spliceDars.apiTokenTransferInstruction],
output: "./src/generated",
});

Then generate types:

Terminal window
sigilry codegen
import { allSpliceDars } from "@sigilry/splice-dars";
// Pass every Splice DAR to codegen
export default defineConfig({
dars: [...allSpliceDars],
output: "./src/generated",
});
import { SPLICE_VERSION } from "@sigilry/splice-dars";
console.log(SPLICE_VERSION); // "0.5.14"
Export KeyContract Package
amuletCore Amulet contracts (AmuletRules, TransferPreapproval)
utilShared utility modules
apiFeaturedAppFeatured app API
apiTokenAllocationToken allocation
apiTokenAllocationInstructionToken allocation instructions
apiTokenAllocationRequestToken allocation requests
apiTokenBurnMintToken burn and mint
apiTokenHoldingToken holdings
apiTokenMetadataToken metadata
apiTokenTransferInstructionToken transfer instructions
utilBatchedMarkersBatched marker utilities
utilTokenStandardWalletToken standard wallet utilities
ExportTypeDescription
spliceDarsRecord<string, string> (readonly)Named DAR file paths
allSpliceDarsreadonly string[]All DAR paths as an array
SPLICE_VERSIONstring literalUpstream Splice release version

This package follows standard semver via changesets. The SPLICE_VERSION export tells you which Splice release the bundled DARs came from — the npm version and Splice version are independent.

Package VersionSplice Version
0.3.x0.5.4
0.4.00.5.14
  1. Install @sigilry/splice-dars and @sigilry/cli
  2. Reference the DAR paths you need in sigilry.config.ts
  3. Run sigilry codegen to generate TypeScript types
  4. Import generated types in your dApp code
  5. Use @sigilry/dapp or @sigilry/react to interact with the Canton ledger

DAR artifacts are extracted from the public Splice release with SHA256 verification. Bundled DARs are redistributed under Apache License 2.0; package wrapper code is MIT.