MoveOnLibra : a set of Restful APIs for Libra Programs and Move smart contracts

Hello everyone,

Excited to be here and happy to release our open API platform MoveOnLibra for Libra. This API can be used to develop Libra applications and smart contracts, aiming to make life as a Libra developer easier.

About Libra network and API server endpoint

There are three libra blockchain network supported by MoveOnLibra:

  • Mainnet, the upcoming offical libra network, NOT avaliable currently
  • Testnet, comprised of test validator nodes running Libra Core, the software which maintains the Libra cryptocurrency.
  • Devnet, a specail version of testnet maintained by MoveOnLibra instead of Libra Association, support publish and execute custom move modules and scripts.
Network API Host Status
Mainnet https://api.moveonLibra.com NOT avaliable
Testnet https://apitest.moveonLibra.com avaliable
Devnet https://devnet.apitest.moveonLibra.com avaliable

About Public API and Protected API

You can access the MoveOnLibra public API without any prerequisites, there are 3 groups of public API:

  • Address, all address API is public available.
  • Event, all events API is public available.
  • Transaction, all GET method API under Transaction group is public available.

For example, get the first transaction on Libra testnet blockchain, just run following curl command under linux shell, or click the url to open it in your favorite browser:

$curl https://apitest.moveonLibra.com/v1/transactions/1

Following API need an auth key to access:

  • Wallet, all wallet API need API token to access.
  • Move, all move API need API token to access.
  • Transaction, all POST method API under Transaction group need API token to access.

Even if you can access the public API without auth key, we still recommend that you use key to access public API. All API calls without key are throttled at high load.

Register a MoveOnLibra Account and Get Your API Auth Key

This step-by-step guide introduces you to the MoveOnLibra API.

    1. Register an account at MoveOnLibra website with your email and password.
    1. Confirm the email and activate your new account.
    1. Create an App for your application. One App can only access one network. so an App created for testnet can’t access devnet and vice vesa.
    1. Every App will have one auto generated server key. Use your server key to access the MoveOnLibra API with correct host.
    1. (Optional). If you need access API from client-side(like Android, IOS and H5), your need a client key. Client key can be generated by api call or by hand.

NOTICE: if you want to develop a smart contract application, you need create a devnet App, and the generated auth key for that app is bounded to devnet, and the api host is https://devnet.apitest.moveonLibra.com

About Libra blockchain explorer

When you develop a Libra program, you may want to see the realtime data on the blockchain. We provoid a blockchain explorer for each network.

Network Libra blockchain explorer Status
Mainnet - NOT avaliable
Testnet http://explorer.moveonLibra.com avaliable
Devnet http://devnet.explorer.moveonLibra.com avaliable

The API is still in beta, so do let me know if you run into issues, bugs or if you have any suggestions.

Thank you

3 Likes

Maybe you can register and monetize APIs in a more effective way.
That’s what i thought. a monetization scenario with libra somehow.

Thanks for your advice, I’ll try it.

1 Like

Thanks for this post! I recommend you also post in What I Made.

1 Like

After repost in ‘What I Made’, should I also delete this post?

You can just leave it in both places this time. Thanks!

I just referred to your open source. what’s wrong with this?

image

You can run

libra --help

or just run

libra

to get all commands supported. Use one of the following commands:

account | a
	Account query by address
transaction | t
	Transaction query
wallet | w
	show account information of a wallet derived from mnemonic file
ledger | lg
	show ledger info of Libra blockchain
1 Like

This could be an error or expected move?

Yes, it’s bug because the https related issue. I will fix it soon.

Hey this is great, I think I will be using it soon.

The problem is fixed.
And we add an option with ‘sigin with github’ for new user.