Skip to content

Csl examples #721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8349bc7
removed example folder
Nebyt Feb 24, 2025
30e84f7
init new project
Nebyt Feb 25, 2025
b03e910
translations
Nebyt Feb 25, 2025
225053a
added nvmrc
Nebyt Feb 25, 2025
568b005
updated console logs
Nebyt Feb 26, 2025
df26d6c
added wallet connector
Nebyt Feb 26, 2025
5937b16
added prettier config
Nebyt Mar 5, 2025
3d4777e
added buffer
Nebyt Mar 5, 2025
8d0fa0a
project reorg
Nebyt Mar 5, 2025
cbe26d9
prettified
Nebyt Mar 5, 2025
a22c050
added common style
Nebyt Mar 5, 2025
af5797e
added helpers
Nebyt Mar 5, 2025
5dcdde3
renamed folders
Nebyt Mar 14, 2025
8bab3ed
moved common styles
Nebyt Mar 17, 2025
19d9f39
added more core functions
Nebyt Mar 17, 2025
cb582bd
updated cardano api type
Nebyt Mar 17, 2025
4e7296b
updated transaction creator
Nebyt Mar 17, 2025
6a484b0
minor update for TransactioCreator
Nebyt Mar 17, 2025
8cb5778
added StakingKeyRegistrar
Nebyt Mar 17, 2025
eccc605
prettified
Nebyt Mar 17, 2025
c83f0eb
Log updates
Nebyt Mar 17, 2025
5529dec
moved certBuilder to core functions
Nebyt Mar 17, 2025
06902e3
added correct types
Nebyt Mar 17, 2025
3f39a29
added types for functions
Nebyt Mar 17, 2025
e9fe978
updated titles
Nebyt Mar 17, 2025
3c39ac2
updated id
Nebyt Mar 17, 2025
65811b3
Added staking key deregistration
Nebyt Mar 17, 2025
a969023
Merge branch 'master' into csl-examples
Nebyt Mar 17, 2025
2b220da
Merge branch 'master' into csl-examples
Nebyt Mar 17, 2025
8c1ab2c
Merge branch 'master' into csl-examples
Nebyt Apr 7, 2025
430afea
Merge remote-tracking branch 'refs/remotes/origin/csl-examples' into …
Nebyt Apr 7, 2025
4909c5d
renamed folders
Nebyt Apr 7, 2025
1ef9bd2
misprint fix
Nebyt Apr 7, 2025
805c3b0
added common functions for script hashes
Nebyt Apr 7, 2025
6248064
added vote delegation
Nebyt Apr 7, 2025
e79b667
increased timeout
Nebyt Apr 7, 2025
7c1f2ba
added README.md to the example folder
Nebyt Apr 8, 2025
d432c5f
Merge branch 'master' into csl-examples
lisicky May 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions example/.eslintrc.js

This file was deleted.

26 changes: 23 additions & 3 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
node_modules/
dist/
tsconfig.tsbuildinfo
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
7 changes: 0 additions & 7 deletions example/.mocharc.js

This file was deleted.

1 change: 1 addition & 0 deletions example/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.14.0
Empty file added example/.prettierignore
Empty file.
14 changes: 14 additions & 0 deletions example/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"printWidth": 120,
"trailingComma": "all",
"tabWidth": 2,
"useTabs": false,
"parser": "typescript",
"semi": true,
"singleQuote": true,
"bracketSpacing": true,
"arrowParens": "always",
"importOrder": ["^@(.*)$", "^[./]" ],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
42 changes: 42 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Example how to use the Cardano Serialization Lib

The example includes the dApp with four basic operations:

* Creating a simple transaction
* Registering a wallet staking public key
* Unregistering a wallet staking key
* Vote delegation

## Structure

Everything related to the user interface (UI) is located in the folder `./src/components-ui`.

The logic behind each operation is found in the folder `./src/components-logic` which has the same name.

Commonly used functions are placed in the file `./src/componets-logic/core.ts`.

### Example

Let's take a look at the file `TransactionCreator.tsx`.

It contains only UI and it is located in the folder `./src/components-ui`.

All logic related to this file is placed in the file `TransactionCreator.ts`, which is located in the `./src/components-logic` folder.

## Installation and running

### Instalation

To install the app, go to the `./example` folder. If you're reading this, you're already here.

Run the commands `nvm use` and then `npm install --force`.

That's it! The app is now ready to launch.

### Running

To start the app, simply run the command `npm start`.

## Conclusion

This is a simple and not very attractive app, but it does what it should: show you how to work with the Cardano Serialization Lib.
22 changes: 22 additions & 0 deletions example/craco.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
webpack: {
configure: (config) => {
const wasmExtensionRegExp = /\.wasm$/
config.resolve.extensions.push('.wasm')
config.experiments = {
...config.experiments,
asyncWebAssembly: true,
}

config.module.rules.forEach((rule) => {
;(rule.oneOf || []).forEach((oneOf) => {
if (oneOf.type === 'asset/resource') {
oneOf.exclude.push(wasmExtensionRegExp)
}
})
})

return config
},
},
}
116 changes: 0 additions & 116 deletions example/index.spec.ts

This file was deleted.

109 changes: 0 additions & 109 deletions example/index.ts

This file was deleted.

Loading