Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
keplervital committed Oct 23, 2024
1 parent 8129f75 commit b64aec5
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 122 deletions.
2 changes: 1 addition & 1 deletion tools/didc-js/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification
within third-party archives.

Copyright 2024 DFINITY Foundation
Copyright 2024 DFINITY Stiftung

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
Expand Down
20 changes: 9 additions & 11 deletions tools/didc-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const IDL = `
// Gets the service methods from the IDL and returns an array of the methods.
//
// Example returned value: ['store_number', 'get_number']
const methods = get_service_methods(IDL);
const methods = getServiceMethods(IDL);

// Encodes a candid text representation of a value to a hex representation.
//
Expand Down Expand Up @@ -56,15 +56,13 @@ For web usage, you need to initialize the async wasm module before using the fun
```javascript
import init, { encode } from "@dfinity/didc";
(async function() {
await init();
await init();
// then you can use the functions
const encoded = encode({
idl: IDL,
input: "(record { number=90; })",
serviceMethod: "store_number",
targetFormat: "hex",
});
})();
// then you can use the functions because the wasm will be initialized
const encoded = encode({
idl: IDL,
input: "(record { number=90; })",
serviceMethod: "store_number",
targetFormat: "hex",
});
```
4 changes: 2 additions & 2 deletions tools/didc-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"test": "pnpm run -r test"
},
"devDependencies": {
"@types/jest": "29.5.13",
"@types/node": "22.7.6",
"@types/jest": "29.5.14",
"@types/node": "22.7.9",
"jest": "29.7.0",
"terser": "5.36.0",
"ts-jest": "29.2.5",
Expand Down
Loading

0 comments on commit b64aec5

Please sign in to comment.