Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from rober-m/main
Browse files Browse the repository at this point in the history
feat: added applyCborEncoding
  • Loading branch information
HinsonSIDAN authored Jun 13, 2024
2 parents f58e710 + c16556f commit 2f31f11
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/csl/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@meshsdk/core-csl",
"description": "Cardano Off-chain Code APIs built on cardano-serialization-lib",
"version": "1.6.0-alpha.8",
"version": "1.6.0-alpha.9",
"license": "Apache-2.0",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
Expand Down
12 changes: 12 additions & 0 deletions packages/csl/src/utils/aiken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,15 @@ export const applyParamsToScript = (

return csl.apply_params_to_script(rawScript, cslParams, paramType);
};

/**
* Apply Cbor encoding.
*
* @param rawScript - The raw script CborHex from blueprint.
* @returns The double-cbor encoded script CborHex.
*/
export const applyCborEncoding = (
rawScript: string,
): string => {
return csl.apply_params_to_script(rawScript, csl.JsVecString.new(), csl.BuilderDataType.CBOR)
};

0 comments on commit 2f31f11

Please sign in to comment.