-
Notifications
You must be signed in to change notification settings - Fork 170
Integration Guide
Alexander Chepurnoy edited this page Feb 8, 2021
·
12 revisions
This guide is for helping developers integrating Ergo into exchanges, wallets, pools wallets etc.
Some quick facts useful for an integration:
- like Bitcoin, a transaction in Ergo has multiple inputs and outputs. Unspent outputs are single-use entities. However, Ergo is built from scratch thus scripts and transaction format are different.
- like in Bitcoin, there are some standard scripts in Ergo associated with addresses, e.g. P2PK addresses. There's an article on address scheme available: https://ergoplatform.org/en/blog/2019_07_24_ergo_address/
- Ergo has inbuilt wallet API which is enough for most use-cases. API has Swagger interface (on 127.0.0.1:9053 by default in the mainnet, 127.0.0.1:9052 in the testnet) with descriptions and examples for API methods.
- How to set up a node: https://ergoplatform.org/en/blog/2019_12_02_how_to_setup/, https://github.com/ergoplatform/ergo/wiki/Set-up-a-full-node
Node wallet has UI available @ 127.0.0.1:9053/panel by default on the mainnet (127.0.0.1:9052/panel on the testnet). Main methods:
- /wallet/init and /wallet/restore to create a wallet (and a secret mnemonic) and restore wallet from mnemonic
- /wallet/unlock to unlock the wallet (it is unlocked after init but locked after restart)
- /wallet/lock to lock the wallet
- /wallet/payment/send to send a simple payment
- /wallet/status to get wallet status