Preview of Pi Network App Platform SDK and Documentation

A.K. Hoang
3 min readJul 14, 2020

Ever since the Pi Network platform launched summer of 2019, I’ve been following closely on their development, particularly on their SDK for app developers.

About almost a year later, they finally have a limited SDK and Documentation. I’ve decided to take a look on their developers.minepi.com site:

The two current SDK features:

  1. Authenticate user through Pi:
// authenticate the current user
try {
const user = await PiNetworkClient.Authenticate()
console.log(`Hello ${user.username}`)
} catch (err) {
// Not able to fetch the user
console.log(‘Fail to fetch the user.’)
}

2. Request transfer from users directly inside your app:


const transferRequest = await PiNetworkClient.RequestTransfer(3.14, "Demo transfer request")

It was a bit underwhelming to be honest. I mean, come on Pi Network. It’s been a year!

Awww come on Pi Network!

What stands out to me:

  1. The entire SDK is a script that you can plug into your client application:
<script src="https://downloads.minepi.com/sdk/v1/prod.js"></script>

2. The only language it currently supports are Javascript and Typescript.

3. The sandbox version is allows you to test transfers with fake user account. I like the bookmark url save option so I return to the same app sandbox.

My personal wish list on future features:

  1. Query a list users in my network and obtain their username and real name (if they chosen to reveal them).
  2. Python, Java, Ruby, and more language support.
  3. Actually be able to use the library to test on my localhost and not on the Pi Developer Sandbox.
  4. More stable developer sandbox, since the last time I visited, their demo app was down (documented in July 13th, 2020, 10:35PM ET):

Nevertheless, the nascent launch of Pi Network SDK marks another important milestone. Don’t let me down Pi Network!

My Sample Implementation in Next.js

I quickly brew up a page in Next.js to test the PiNetwork SDK to grab the username.

Once the SDK is more stable, I’ll do a full demo implementation app in another post. Stay tuned!

If you like to join my Pi Network and private chat forum for news on SDK development, visit https://minepi.com/codergrr

Feel free to use my code, “codergrr” after installing the app.

If you are still on the fence or want more background info read my other post on 4 Reasons Why You Should and Should Not Jump on the new Pi Coin Cryptocurrency Craze.

--

--