@studiowebux/cardano@0.3.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Cardano Libs for specific use case, contains tx builder, submit api and few utils using CSL
Cardano Libs
This library is specifically crafted for a particular use case.
About
- Transaction Builder: Construct transactions with ease.
- NFT Creation (CIP-25): Mint Non-Fungible Tokens using CIP-25 standard.
- Fungible Token Creation: Create and manage Fungible Tokens.
- Royalties Setup (CIP-27): Implement royalties for tokens using CIP-27.
- CIP-86 Initialization: Partial implementation of CIP-86.
- Add transaction metadata (CIP-20): Add custom message to the transaction.
- Quick Wallet Generation: Create new wallets swiftly.
- Utilities: Includes helpful utilities to interact with CSL and Blockfrost API.
- Examples & Tests: Provides ample examples and tests for better understanding and debugging.
- Cross-Environment Compatibility: Functions smoothly across all Cardano environments, from local testnets to the mainnet.
- Submit API Usage: Utilizes Cardano Submit API for transaction submission.
- Utxo Fetching: Retrieves UTXOs using Blockfrost API (Might bring back DB Sync query).
- Policy Creation: Allows creating new policies.
- Send ADA: Send a specified amount of ada to a recipient.
- CIP-8. Expose a function and documentation to setup an authentication flow using cardano wallet.
TODO
- Finish CIP-86. (https://cips.cardano.org/cip/CIP-86)
- Receive UTXO from client wallet.
- Configure cardano network (Currently the example are hardcoded).
- Simplify the CIP/JSON Metadata format and inputs.
- Fix if possible the Multi Assets, Lock ADA and group to minimize locked ADA.
- Document the wallet variables and where to use what
- Add dummy check for the metadata (64 chars or less and required keys).
- Read the DB Sync query to get the UTXOs.
- [-] Simplify, rename and JSDoc the whole codebase.
- Normalize the asset_name (hex and standard) also with the blockfrost format, the user can put a normal string and the code will adjust.
- Rename the receiver_address variable to use something more intuitive.
- Normalize number input and casting all at the same place
- Implement ApiError everywhere
Installation and Usage
- Install deno: https://deno.com
deno add @studiowebux/cardano- Local Cardano Node: https://github.com/studiowebux/cardano-private-node
- Cardano Indexer: https://github.com/studiowebux/cardano-indexer
see __tests__/*.test.ts and examples/ for examples.
Releases and Github Actions
git tag -a X.Y.Z -m "Version X.Y.Z" git push origin tags/X.Y.Z
Contributing
- Fork the project
- Create a Feature Branch
- Commit your changes
- Push your changes
- Create a PR
Working with your local branch
Branch Checkout:
git checkout -b <feature|fix|release|chore|hotfix>/prefix-name
Your branch name must starts with [feature|fix|release|chore|hotfix] and use a / before the name; Use hyphens as separator; The prefix correspond to your Kanban tool id (e.g. abc-123)
Keep your branch synced:
git fetch origin git rebase origin/master
Commit your changes:
git add . git commit -m "<feat|ci|test|docs|build|chore|style|refactor|perf|BREAKING CHANGE>: commit message"
Follow this convention commitlint for your commit message structure
Push your changes:
git push origin <feature|fix|release|chore|hotfix>/prefix-name
Examples:
git checkout -b release/v1.15.5 git checkout -b feature/abc-123-something-awesome git checkout -b hotfix/abc-432-something-bad-to-fix
git commit -m "docs: added awesome documentation" git commit -m "feat: added new feature" git commit -m "test: added tests"
License
Distributed under the MIT License. See LICENSE for more information.
Contact
- Tommy Gingras @ tommy@studiowebux.com | Studio Webux
Add Package
deno add jsr:@studiowebux/cardano
Import symbol
import * as cardano from "@studiowebux/cardano";
Import directly with a jsr specifier
import * as cardano from "jsr:@studiowebux/cardano";
Add Package
pnpm i jsr:@studiowebux/cardano
pnpm dlx jsr add @studiowebux/cardano
Import symbol
import * as cardano from "@studiowebux/cardano";
Add Package
yarn add jsr:@studiowebux/cardano
yarn dlx jsr add @studiowebux/cardano
Import symbol
import * as cardano from "@studiowebux/cardano";
Add Package
vlt install jsr:@studiowebux/cardano
Import symbol
import * as cardano from "@studiowebux/cardano";
Add Package
npx jsr add @studiowebux/cardano
Import symbol
import * as cardano from "@studiowebux/cardano";
Add Package
bunx jsr add @studiowebux/cardano
Import symbol
import * as cardano from "@studiowebux/cardano";