Skip to content

iotaledger/iota-names

Repository files navigation

Note

By using this service, you agree to the Terms & Conditions.

IOTA-Names

This repository holds the IOTA-Names contracts (both the core and all system packages).

Packages

The packages folder contains a list of all the packages that are being used for IOTA-Names, as well as their tests.

Scripts

The scripts folder is more like a "scratchpad" for different actions we want to build for various multi-sig operations.

Multi-sig Operations (Admin operations)

For combining signatures in order to execute a multi-sig operation, you can follow this link to have a pre-completed link in the multi-sig toolkit.

Local setup for testing

Prerequisites:

  1. Start a local IOTA network in one terminal:
iota start --force-regenesis --with-faucet
  1. In another terminal, create a new environment for the local network and switch to it:
iota client new-env --alias localnet --rpc http://127.0.0.1:9000 --graphql http://127.0.0.1:9125
iota client switch --env localnet
  1. Request funds from the faucet:
iota client faucet
  1. Install the dependencies:
pnpm i
  1. Build and publish the packages:
cd scripts && pnpm ts-node init/init.ts localnet
  1. Get environment variables for the IOTA CLI:
pnpm run envs localnet

Set the resulting environment variables in your terminal.

Done, IOTA-Names is now ready for use 🚀

Register your first name with:

iota name register first.iota

All in one:

docker start postgres || docker run -d --name postgres -e POSTGRES_PASSWORD=postgrespw -e POSTGRES_INITDB_ARGS="-U postgres" -p 5432:5432 postgres:15 -c max_connections=1000
# Run network in the background without logs
iota start --force-regenesis --with-faucet --faucet-amount 100000000000000 --with-indexer --with-graphql > /dev/null 2>&1 &
iota client new-env --alias localnet --rpc http://127.0.0.1:9000 --graphql http://127.0.0.1:9125
iota client switch --env localnet
# wait for the network to start
sleep 10
iota client faucet
# wait for the faucet tx
sleep 2
pnpm i
cd scripts && pnpm ts-node init/init.ts localnet
pnpm run envs localnet
cd ..

To stop the local network in the background, run: kill %1 or kill <job-number> that was printed when it was started.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 16