All Projects → NANJ-COIN → Ios Sdk

NANJ-COIN / Ios Sdk

Licence: mit

Programming Languages

swift
15916 projects

Labels

Projects that are alternatives of or similar to Ios Sdk

likecoin-contracts
Token contracts of Like Coin
Stars: ✭ 22 (+83.33%)
Mutual labels:  erc20
atomicDEX-API
This is the official AtomicAPI (atomicDEX API) repository
Stars: ✭ 65 (+441.67%)
Mutual labels:  erc20
Uniswap V1
🐍Uniswap V1 smart contracts
Stars: ✭ 313 (+2508.33%)
Mutual labels:  erc20
dala-smart-contracts
Smart contracts for the Dala token sale and ERC20 token
Stars: ✭ 19 (+58.33%)
Mutual labels:  erc20
itoken
yToken wrappers for automated investment strategy tokenization
Stars: ✭ 71 (+491.67%)
Mutual labels:  erc20
dubiex
A fully decentralized, no fees, ethereum exchange for tokens, unofficial website
Stars: ✭ 23 (+91.67%)
Mutual labels:  erc20
augmented-finance-protocol
High-yield lending and low-rate borrowing DeFi protocol
Stars: ✭ 28 (+133.33%)
Mutual labels:  erc20
Uniswap V2 Core
🎛 Core smart contracts of Uniswap V2
Stars: ✭ 889 (+7308.33%)
Mutual labels:  erc20
metronome-wallet-desktop
💻💰 Metronome wallet for desktop devices
Stars: ✭ 16 (+33.33%)
Mutual labels:  erc20
Uniswap V2 Periphery
🎚 Peripheral smart contracts for interacting with Uniswap V2
Stars: ✭ 267 (+2125%)
Mutual labels:  erc20
Setheum
Setheum Network - Islamic Finance DeFi, Multi-Stablecoins, Payments, EVM, DeFi on Rockets to Heaven => 🚀ready for hacking🚀
Stars: ✭ 15 (+25%)
Mutual labels:  erc20
tokensubscription.com
⏰💰🤠 Set-it-and-forget-it token subscriptions on the Ethereum mainnet. #Winner #WyoHackathon
Stars: ✭ 81 (+575%)
Mutual labels:  erc20
BokkyPooBahsTokenTeleportationServiceSmartContract
BokkyPooBah's Token Teleportation Service Smart Contract
Stars: ✭ 73 (+508.33%)
Mutual labels:  erc20
bitdegree-token-crowdsale
Token Website
Stars: ✭ 26 (+116.67%)
Mutual labels:  erc20
Web3j Sample
web3j 样例程序
Stars: ✭ 317 (+2541.67%)
Mutual labels:  erc20
Wallet3
A secure mobile wallet for web3
Stars: ✭ 13 (+8.33%)
Mutual labels:  erc20
ETH-transactions-storage
Indexer for Ethereum to get transaction list by ETH address
Stars: ✭ 155 (+1191.67%)
Mutual labels:  erc20
Airdrop
🍬 Multiple erc20 token airdrop consumes one time gas
Stars: ✭ 22 (+83.33%)
Mutual labels:  erc20
Upchain Wallet
以太坊钱包(支持DApp 浏览器)- A Powerful Ethereum Android Wallet & DApp Browser
Stars: ✭ 359 (+2891.67%)
Mutual labels:  erc20
Tokens
Upload yours token, coin and dApp image to get displayed in the Trust Wallet
Stars: ✭ 260 (+2066.67%)
Mutual labels:  erc20

NANJ SDK PROJECT

CODE NAME: FIERCE TIGER

Discord

## Features
  • [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

Requirements

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

Communication

  • 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.

Installation

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 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

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

Then, run the following command:

$ pod install

Usage

Initialization

  • 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

NANJWalletManager.shared.createWallet(password:"Password")

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?)

Transfer NANJCOIN

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?)

Get NANJCOIN Rate in JPY

self.currentWallet?.delegate = self
self.currentWallet?.getNANJRate()

NANJ rate will be returned over delegate method

@objc optional func didGetNANJRate(rate: Double)

Get NANJCOIN Rate in JPY or USD

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

NANJWalletManager.shared.getMinimumAmount()

Get maximum fee per transfer

NANJWalletManager.shared.getMaxFee()

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
NANJWalletManager.shared.setCurrentERC20Support(idERC20)

To retrieve current ERC20/ERC223

NANJWalletManager.shared.getCurrentERC20Support(idERC20)

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

Author

NANJCOIN, [email protected]

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].