RPC server implementation to easily connect to ARK blockchain
All calls should be made from the server where RPC is running at ( i.e.,
127.0.0.1 ). The RPC server should never be publicly accessible. If you wish to access ark-rpc from a remote address, you can whitelist the address with
--allow <address>. Addresses allow you to use wildcards, eg.
If you do want to allow access from all remotes, start ark-rpc with the
--allow-remote commandline switch. This can be dangerous.
How To Use It
- install Node.JS ( https://nodejs.org/en/download/package-manager/)
- install forever
npm install -g forever
- install ark-rpc:
npm install arkecosystem/ark-rpc#master
- start RPC server:
ark-rpc --port 8000(default port is 8080)
If you would like to run from a docker environment, you will first need to build the container by running:
docker build -t ark-rpc .
You will need to run the container with the
--allow-remote option to allow the host machine to access the container.
docker run -d -p 8080:8080 ark-rpc --allow-remote
Supported networks are
devnet all calls should start with the network you want to address, for instance,
/mainnet/account/AUDud8tvyVZa67p3QY7XPRUTjRGnWQQ9Xv we call it
:network in the API description.
- Get account balance from
- Create account from
- Create (or get if already existing) account and encrypt using bip38:
bip38(password for encrypted WIF),
userid(to identify a user)
- Get backup from
If you want to create several accounts for one user, you need to use a different userid.
- Get last 50 transactions from
- Create a transaction:
- Create a transaction using
bip38(password to encode wif),
- Broadcast transaction:
idof the transaction
Note that if the transaction has been created via the RPC it has been stored internally, as such only the transaction
id is needed to broadcast/rebroadcast it. Otherwise if created outside of this RPC server, pass the whole transaction body as the POST payload.
If you discover a security vulnerability within this project, please send an e-mail to firstname.lastname@example.org. All security vulnerabilities will be promptly addressed.
The MIT License (MIT)