This is a guide on how to quickly start using the SDK to build your idea, so it is more a guide for clients of the SDK rather than for contributors to the SDK, although anyone can benefit from it.
Warning
- The steps below are only suitable for development environments.
- Postgres username and password are placeholders and should be changed.
The project is divided into two main parts:
- cardano-services consists of several backend applications: - Provider server: a REST API server that can query Cardano data and submit transactions. - Projector: chain follower that projects blocks into PostgreSQL database.
- Libraries meant to help with concepts like: key management, cryptography high level helpers, input selection, and many more.
Two important libraries worth mentioning are:
- wallet: provides an opinionated, ready-to-use light wallet abstraction. It uses pretty much all of the other client libraries.
- web-extension: has the ingredients to build your idea as a web extension.
This section covers how to get cardano-services
started on the preprod
testnet, and begin building your idea or just explore.
Starting mainnet
or preview
is a more advanced topic, and is discouraged in the 'Getting Started' phase as it requires additional settings.
- Docker compose V2 or later
cardano-js-sdk
project is cloned locally. No need to install or build.- An x86-64 machine. It will not work on an ARM computer (like Apple M1 chips). This guide is tested on Ubuntu.
- This option uses
docker compose
to start the bare minimum services. - Start Preprod network services:
$ ./scripts/preprod-network.sh up
- Stop Preprod network services:
$ ./scripts/preprod-network.sh down
- Dump the rendered docker compose file:
$ ./scripts/preprod-network.sh dump
If you are already comfortable with yarn, and have gone through the System Requirements, you can run one of the commands defined in cardano-services package.json,
# Start preprod network services
yarn preprod:up -d
# Stop preprod network services
yarn preprod:down
- Wait for all services to be healthy.
- Each provider from
cardano-services
has an openApi spec describing the REST interface. For example: - More advanced examples of using the SDK are in the e2e tests. Explore these examples on how to use the wallet and the client libraries.