forked from Emurgo/cardano-serialization-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7050377
commit 9fda3d2
Showing
11 changed files
with
146 additions
and
1,701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules/ | ||
dist/ | ||
rust/target | ||
publish/ | ||
rust/target | ||
tsconfig.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[package] | ||
name = "cddl-lib" | ||
name = "cardano-serialization-lib" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
rust/pkg/cddl_lib.js.flow → rust/pkg/cardano_serialization_lib.js.flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module", | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const fs = require('fs'); | ||
const oldPkg = require('../publish/package.json'); | ||
|
||
const flowFile = 'cardano_serialization_lib.js.flow'; | ||
if (oldPkg.files.find(entry => entry === flowFile) == null) { | ||
oldPkg.files.push('cardano_serialization_lib.js.flow'); | ||
} | ||
if (oldPkg.name === 'cardano-serialization-lib') { | ||
oldPkg.name = '@emurgo/' + oldPkg.name + process.argv.slice(2)[0]; | ||
} | ||
console.log(oldPkg); | ||
fs.writeFileSync('./publish/package.json', JSON.stringify(oldPkg, null, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generating CDDL instances | ||
|
||
First you need to install `cddl` | ||
``` | ||
sudo apt install ruby | ||
sudo gem install cddl | ||
sudo gem install cbor-diag | ||
``` | ||
|
||
You can generate new tests with | ||
1) `cddl specs/shelley.cddl generate 1 > test/name_here.diag` | ||
2) `diag2cbor.rb test/name_here.diag > test/name_here.cbor` | ||
|
||
You can combine these together with `cddl specs/shelley.cddl generate 1 | diag2cbor.rb > test/name_here.cbor` |
Oops, something went wrong.