Latest 1.1.0
License MIT
Platforms ios 10.0




  • [x] Create NANJ Wallet
  • [x] Import NANJ Wallet via Private Key / Key Store
  • [x] Export Private Key/ Key Store from NANJ Wallet
  • [x] Transfer NANJ Coin
  • [x] Transaction History
  • [x] Get NANJCOIN Rate in JPY
  • [x] Capture Wallet Address via QRCode
  • [x] Capture Wallet Address via NFC Tapping
  • [x] Get minimum allowed amount on transfer for specific ERC20 Token
  • [x] Get maximum transaction fee on transfer for specific ERC20 Token
  • [x] Get NANJCOIN rate in USD


  • iOS 10.0+
  • Xcode 9.3+
  • Swift 3.1+


  • If you need help or ask a general question, use
    Discord Chat
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.


CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate NANJFrameworks into your Xcode project using CocoaPods, specify it in your Podfile:

source ''
platform :ios, '10.0'

target '<Your Target Name>' do
pod 'NANJFrameworks'

Then, run the following command:

$ pod install



  • In AppDelegate.swift , import NANJFrameworks
    import NANJFrameworks
  • Add following lines to didFinishLaunchingWithOptions method
//Set Development Mode
NANJWalletManager.shared.setDevelopmentMode(isDevelopment: true)
NANJWalletManager.shared.startConfig(appId: "AppId", appSecret: "AppSecret", coinName: "CoinName")

Environment Setup

Development mode with staging server

NANJWalletManager.shared.setDevelopmentMode(isDevelopment: true)

Production mode with production server

NANJWalletManager.shared.setDevelopmentMode(isDevelopment: false)

Notes: Please call the method before startConfig

Create new Wallet

To create new wallet, use CreateWallet method via shared instance of NANJWalletManager


To receive event of successful wallet creation, assign delegate in NANJWalletManager

NANJWalletManager.shared.delegate = self

Once wallet creating, the delegate will call via method:

func didCreatingWallet(wallet: NANJWallet?)

Once wallet created, the delegate will call via method

func didCreateWallet(wallet: NANJWallet?, error: Error?) {

Import wallet

  • With Private key
    NANJWalletManager.shared.importWallet(privateKey: "Private Key")
  • With Key store (Bear in mind that we will need password to unlock keystore)
    NANJWalletManager.shared.importWallet(keyStore "Key Store", password "Password")

If wallet is imported successfully, the delegate will be invoked via method

func didImportWallet(wallet: NANJWallet?, error: Error?)

Return wallet if successful import,
error if there is an error.

Export Wallet

  • Export private key
NANJWalletManager.shared.exportPrivateKey(wallet: "NANJWallet")

Private key will be received via a method of delegate

func didExportPrivatekey(wallet: NANJWallet, privateKey: String?, error: Error?, error: nil)

return String privateKey if successful export.

And Error if there is a error.

  • Export keystore
    NANJWalletManager.shared.exportKeystore(wallet: "NANJWallet", password: "Password")

    Similar to export private key, export keystore will return over delegate with method

    func didExportKeystore(wallet: NANJWallet, keyStore: String?, error: Error?)


In order to send NANJ Coin to a specific address, Use NANJWallet instance to send like lines of code below

self.currentWallet = NANJWalletManager.shared.getCurrentWallet()
self.currentWallet?.delegate = self
self.currentWallet?.sendNANJ(toAddress: "NANJ Address", amount: "Amount send")

Outcome of sending NANJCoin will be confirmed over delegate with method

func didSendNANJCompleted(transaction: NANJTransaction?)

Or error persist via

func didSendNANJError(error: String?)


self.currentWallet?.delegate = self

NANJ rate will be returned over delegate method

@objc optional func didGetNANJRate(rate: Double)


self.walletManager.delegate = self
self.walletManager.getNANJRateWith(currency: string)

Currency symbol for input the method getNANJRateWith

US Dollar : 'usd' and JPY : 'jpy'

NANJ rate will be returned over delegate method

@objc optional func didGetNANJCurrencyRate(rate: Double, currency: String)

Get transaction list

self.currentWallet?.delegate = self
self.currentWallet?.getTransactionList(page: 1, offset: 20)

Receive via delegate call

func didGetTransactionList(transactions: Array<NANJTransaction>?)

NANJTransaction Class

public class NANJTransaction: NSObject {
public let id: UInt?
public let txHash: String?
public let status: Int?
public let from: String?
public let to: String?
public let value: String?
public let message: String?
public let txFee: String?
public let timestamp: UInt?
public let tokenSymbol: String?

Get minimum amount, max transaction fee per transfer

After set current ERC20 token. SDK can get minimum amount and maximum transaction fee. This minimum amount and maximum fee will be for chosen ERC20 token.

Get minimum amount per transfer


Get maximum fee per transfer


NANJ SDK Support mutiple ERC20/ERC223

To retreive supported ERC20/ERC223

let arrayOfERC20 = NANJWalletManager.shared.getListERC20Support()

To retreive supported ERC20/ERC223 by Identifier of ERC20

let idERC20 = 1
let arrayOfERC20 = NANJWalletManager.shared.getERC20Support(idERC20)

To use ERC20/ERC223

let idERC20 = 1

To retrieve current ERC20/ERC223


This feature allows the SDK can switch among multiple ERC20/ERC223 coins


NANJCOIN, [email protected]


please read our license at this link. LICENSE
you can change Language JP/EN

Latest podspec

    "name": "NANJFrameworks",
    "version": "1.1.0",
    "summary": "NANJCOIN SDK",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "NANJ": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.1.0"
    "platforms": {
        "ios": "10.0"
    "source_files": "NANJFrameworks/Classes/**/*",
    "default_subspecs": "NANJSubSpec",
    "subspecs": [
            "name": "NANJSubSpec",
            "dependencies": {
                "BigInt": [
                    "~> 3.0"
                "TrustCore": [
                    "~> 0.0.6"
                "TrustKeystore": [
                    "~> 0.4.0"
                "CryptoSwift": [],
                "JSONRPCKit": [],
                "KeychainSwift": [],
                "APIKit": []

Pin It on Pinterest

Share This