[Shipped] Incognito Javascript SDK

1. What privacy problem are you solving?
Building an application that can communicate with the Incognito chain is not very easy. Currently, developers need to collect a lot of info and send it to the chain via RPC (a protocol to communicate with the chain). The path for developers to build or integrate their applications with the Incognito chain is currently difficult.

2. What is the solution?
Develop a library (SDK) that includes essential functions like:

  • Create wallet
  • Create/manage accounts
  • Create/manage tokens
  • Create/send transactions
  • Get information: accounts, tokens, UTXO,…

3. Who are you?
I’m @keresh93v, a software engineer from the Incognito core dev team. I’m part of the wallet team that built the Incognito Mobile app.

4. What’s your plan? What’s your schedule?
We will have an SDK that can be run on these environments:

  • Browser (ship on 04 March 2020)
  • Node (ship on 04 March 2020)
  • React Native (ship on 04 March 2020)
  • Incognito Wallet Template (ship on 04 March 2020)
  • Maintain update ( 31 March 2020)

5. What’s your budget?

Resource Quantity Cost
Software engineer 1 1,000 PRV (x 1 months)
Maintain update 1 500 PRV (x 1 months)
TOTAL 1000 PRV
8 Likes

To remove ambiguities in date, I think we should use a more clear format such as “3 April 2020” for date. A pinned topic may be better. @ning

1 Like

Finish:

To do next:

  • Documentation
  • Testing/maintenance

The SDK page

Thanks for your update, @keresh93v

This project was funded in Feb 1st so I moved it into the right category “work in progress”.

Funding for Feb has been disbursed and will continue to be disbursed every subsequent week dependent on progress.

1 Like

:ok_hand: added example formatting to the pinned post in the proposals category.

2 Likes

Update: week of March 02 - 06, 2020:

Hi team !
Can we add Deposit/Withdrawal functionality, and if yes, what would be the timelime for it?

Yes, @andrey the team’s discussing about the way to implement Deposit/Withdrawal functionality to the SDK. Currently, we have no timeline for it

1 Like

Update: week of March 09 - 13, 2020:
Finish:

  • Completed and tested iOS React Native SDK
  • Incognito SDK:
    • Published a Error handler loader for Webpack: automatically generate Error codes and write to file.
    • Logger.
    • User input validation.
    • Get bridge tokens from API
    • Make deposit requests (Shield).
    • Load and cancel deposit history.
    • Documentations (view in README.md).

To do next:

  • Make withdrawal requests (centralized and decentralized).
  • Withdrawal history.
  • Documentations and maintenance.
5 Likes

Hi @keresh93v do you have any estimations when we could expect deposit/withdrawal functionality ?

Deposit and withdrawal were done, but I need more time for testing and documentation. I’ll update the status here once done @andrey .

1 Like

Update: week of March 16 - 20, 2020:
Finish:

  • Incognito SDK
    • Make withdrawal requests and documentation (see bridgeWithdraw function)
    • Withdrawal history.
  • Wallet App:
    • Implement user feedback.
    • Enable pApps again.
    • Implement Price chart for all pairs.

To do next:

  • Keep working on Price chart.
3 Likes

thanks @keresh93v. i would suggest to do the sdk documentation similar to stripe. they provide the best “developer experience”. cc @binh

clear use cases:

when a developer clicks on a use case, there is a clear walkthrough:

4 Likes

Update: week of March 23 - 27, 2020:
Finish:

  • Incognito SDK
  • Wallet App:
    • Implement Price chart for all pairs on pDex.
    • Show Power Node button at Home.
3 Likes

Hey @keresh93v, can I send more than one privacy coins in one tx? For example, I want to send 0.5 pBTC and 2 pETH in single transaction. Is this possible via API or RPC?

It sounds bad that this can not @abduraman. We only send 1 type token and PRV. That mean we will send couple of (PRV & pBTC), or (PRB & pETH), …

1 Like

We have any updating for api of withdraw/deposit bridge which base on portal v2. I think we need to have some updating about it, or make a new proposal for this api on portal v2

NativeTokenInstances have a method called “getAvaiableBalance”

Not just in the doc, the implemented method has the same name.

The correct name would be: getAvailableBalance

3 Likes

Hi @keresh93v

I cannot find the way to initialize a pApp

I see the following methods:

  1. checkSDKCompatible: Ć’ ()
  2. onPaymentAddressChange: Ć’ (e)
  3. onSupportedTokenListChange: Ć’ (e)
  4. setListSupportTokenById: Ć’ (e)
  5. onTokenInfoChange: Ć’ (e)
  6. onExtraInfoChange: Ć’ (e)
  7. changePrivacyTokenById: Ć’ (e)
  8. requestSendTx: Ć’ (e$jscomp$0)
  9. getStore: Ć’ m()
  10. resetStore: Ć’ ()
  11. Validator: Ć’ e$jscomp$0(n,t)
  12. sdkError: Ć’ (e,n)

but SDK.start is not present.

I found it here: https://github.com/incognitochain/papp-sdk/blob/d11308b60fb0b1fcb49e8650523db5df6e889545/src/sdk.js