{"id":32110187,"url":"https://github.com/minterteam/minter-ios-core","last_synced_at":"2026-02-21T17:02:08.199Z","repository":{"id":62447826,"uuid":"131418012","full_name":"MinterTeam/minter-ios-core","owner":"MinterTeam","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-12T15:43:43.000Z","size":7001,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-14T04:47:04.511Z","etag":null,"topics":["blockchain","cocoapod","ios","minter","sdk","swift"],"latest_commit_sha":null,"homepage":"http://www.minter.network","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MinterTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-04-28T14:47:09.000Z","updated_at":"2025-12-27T22:27:22.000Z","dependencies_parsed_at":"2023-10-13T05:18:53.053Z","dependency_job_id":null,"html_url":"https://github.com/MinterTeam/minter-ios-core","commit_stats":{"total_commits":160,"total_committers":1,"mean_commits":160.0,"dds":0.0,"last_synced_commit":"3a9b583be384864b8cfac641d253707738432fe0"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/MinterTeam/minter-ios-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinterTeam%2Fminter-ios-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinterTeam%2Fminter-ios-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinterTeam%2Fminter-ios-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinterTeam%2Fminter-ios-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MinterTeam","download_url":"https://codeload.github.com/MinterTeam/minter-ios-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinterTeam%2Fminter-ios-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29688216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","cocoapod","ios","minter","sdk","swift"],"created_at":"2025-10-20T13:57:55.332Z","updated_at":"2026-02-21T17:02:08.192Z","avatar_url":"https://github.com/MinterTeam.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" background=\"black\"\u003e\u003cimg src=\"minter-logo.svg\" width=\"400\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/MinterTeam/minter-ios-core/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/tag/MinterTeam/minter-ios-core.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://travis-ci.org/MinterTeam/minter-ios-core\"\u003e\u003cimg src=\"http://img.shields.io/travis/MinterTeam/minter-ios-core.svg?style=flat\" alt=\"CI Status\"\u003e\u003c/a\u003e \n\u003ca href=\"http://cocoapods.org/pods/MinterCore\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/MinterCore.svg?style=flat\" alt=\"Version\"\u003e\u003c/a\u003e\n\u003ca href=\"http://cocoapods.org/pods/MinterCore\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/p/MinterCore.svg?style=flat\" alt=\"Platform\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/MinterTeam/minter-ios-core/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/MinterTeam/minter-ios-core.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/MinterTeam/minter-ios-core/commits/master\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/MinterTeam/minter-ios-core.svg\" alt=\"Last commit\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# MinterCore\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Installation\n\n\nMinterCore is available through [CocoaPods](http://cocoapods.org). To install\n\nit, simply add the following line to your Podfile:\n\n\n```ruby\n\npod 'MinterCore'\n\n```\n## About\n\nThis is a pure Swift SDK for working with \u003cb\u003eMinter\u003c/b\u003e blockchain\n\n* [Installation](#installing)\n* [Minter Api](#using-minterapi)\n    - Methods:\n      - [address](#address)\n      - [nonce](#nonce)\n      - [send](#send)\n      - [status](#status)\n      - [getValidators](#validators)\n      - [estimateCoinBuy](#estimatecoinbuy)\n      - [estimateCoinSell](#estimatecoinsell)\n      - [Coin Info](#info)\n      - [Block](#block)\n      - [Events](#events)\n      - [Transaction](#transaction)\n      - [Candidate](#candidate)\n      - [Candidates](#Candidates)\n      - [estimateTxCommission](#estimatetxcommission)\n      - [Transactions](#transactions)\n  \n* [Minter SDK](#using-mintersdk)\n  - [Sign transaction](#sign-transaction)\n    - [SendCoin](#example-3)\n    - [SellCoin](#example-4)\n    - [SellAllCoin](#example-5)\n    - [BuyCoin](#example-6)\n    - [CreateCoin](#example-7)\n    - [DeclareCandidacy](#example-8)\n    - [Delegate](#example-9)\n    - [SetCandidateOn](#example-10)\n    - [SetCandidateOff](#example-11)\n    - [RedeemCheck](#example-12)\n    - [Unbond](#example-13)\n    - [EditCandidate](#example-15)\n  - [Minter Check](#create-minter-check)\n  - [Minter Wallet](#minter-wallet)\n\n## Using MinterAPI\n\nYou can get all valid responses and full documentation at [Minter Node Api](https://minter-go-node.readthedocs.io/en/latest/api.html)\n\nInitializing SDK\n\n```swift\n///Minter SDK initialization\nimport MinterCore\n\nlet nodeUrlString = \"https://minter-node-1.testnet.minter.network:8841\" // example of a node url\n\nMinterCoreSDK.initialize(urlString: nodeUrlString)\n```\n\n### address\n\nReturns coins list, balance and transaction count (for nonce) of an address.\n\n```swift\npublic func address(_ address: String, height: String = \"0\", with completion: (([String: Any]?, Error?) -\u003e ())?)\n```\n\n###### Example\n\n```Swift\nAccountManager.default.address(\"Mxfe60014a6e9ac91618f5d1cab3fd58cded61ee99\", with: { (data, err) in\n  //[\"balance\": [\"MNT\":\"10000000000\"], \"transaction_count\":0]\n})\n```\n\n### nonce\n\nUse [address](#address) method of AccountManager to get nonce\n\n### send\n\nReturns the result of sending \u003cb\u003esigned\u003c/b\u003e tx.\n\n```swift\npublic func send(tx: String, completion: ((String?, String?, Error?) -\u003e ())?)\n```\n\n###### Example\n\n```swift\nTransactionManager.default.send(tx: \"Mt...\") { (hash, statusText, error) in\n\n}\n```\n\n### status\n\nReturns node status info.\n\n```swift\npublic func status(with completion: (([String : Any]?, Error?) -\u003e ())?)\n```\n\n### validators\n\nReturns list of active validators.\n\n```swift\npublic func validators(height: Int, with completion: (([[String: Any]]?, Error?) -\u003e ())?)\n```\n\n### estimateCoinBuy\n\nReturn estimate of buy coin transaction.\n\n```swift\npublic func estimateCoinBuy(fromId: Int, toId: Int, amount: Decimal, completion: ((Decimal?, Decimal?, Error?) -\u003e ())?)\n```\n\n### estimateCoinSell\n\nReturn estimate of sell coin transaction.\n\n```swift\npublic func estimateCoinSell(fromId: Int, toId: Int, amount: Decimal, completion: ((Decimal?, Decimal?, Error?) -\u003e ())?)\n```\n\n### coin info\n\nReturns information about coin.\nNote: this method does not return information about base coins (MNT and BIP).\n\n```swift\npublic func info(symbol: String, height: String = \"0\", completion: ((Coin?, Error?) -\u003e ())?)\n```\n\n### block\n\nReturns block data at given height.\n\n```swift\npublic func blocks(height: String = \"0\", with completion: (([String : Any]?, Error?) -\u003e ())?)\n```\n\n### events\n\nReturns events at given height.\n\n```swift\npublic func events(height: String = \"0\", with completion: (([String : Any]?, Error?) -\u003e ())?)\n```\n\n### transaction\n\nReturns transaction info.\n\n```swift\npublic func transaction(hash: String, completion: ((Transaction?, Error?) -\u003e ())?)\n```\n\n### candidate\n\nReturns candidate’s info by provided public_key. It will respond with 404 code if candidate is not found.\n\n```swift\npublic func candidate(publicKey: String, height: String = \"0\", completion: (([String : Any]?, Error?) -\u003e ())?)\n```\n\n### candidates\n\nReturns list of candidates.\n\nheight is optional parameter.\n\n```swift\npublic func candidates(height: String = \"0\", includeStakes: Bool = false, completion: (([[String : Any]]?, Error?) -\u003e ())?)\n```\n\n### estimateTxCommission\n\nReturn estimate of transaction.\n\n```swift\npublic func estimateCommission(for rawTx: String, height: String = \"0\", completion: ( (Decimal?, Error?) -\u003e ())?)\n```\n\n### transactions\n\nReturn transactions by query.\n\n```swift\npublic func transaction(query: String, completion: (([Transaction]?, Error?) -\u003e ())?)\n```\n\n### unconfirmedTransactions\n\nReturns unconfirmed transactions.\n\n```swift\npublic func unconfirmedTransaction(limit: String = \"0\", completion: (([String : Any]?, Error?) -\u003e ())?)\n```\n\n## Using MinterSDK\n\n### Sign transaction\n\nReturns a signed tx.\n\n###### Example\n\n* Sign the \u003cb\u003eSendCoin\u003c/b\u003e transaction\n\n```swift\nlet sendData = SendCoinRawTransactionData(to: \"Mx6b6b3c763d2605b842013f84cac4d670a5cb463d\", value:\nBigUInt(decimal: 1 * TransactionCoinFactorDecimal)!, coinId: 0).encode()\n\nlet rawTransaction = SendCoinRawTransaction(nonce: BigUInt(1), chainId: 2, gasCoinId: 0, data: sendData!)\n\nlet mnemonic = \"adjust correct photo fancy knee lion blur away coconut inform sun cancel\"\n\nlet seed = String.seedString(mnemonic)!\nlet pk = PrivateKey(seed: Data(hex: seed))\n\nguard let key = try! pk.derive(at: 44, hardened: true).derive(at: 60, hardened: true).derive(at: 0, hardened: true).derive(at: 0).derive(at: 0).raw.toHexString()\n\n/// Signing raw transaction\nlet signedTx = RawTransactionSigner.sign(rawTx: rawTransaction, privateKey: key)!\n\n/// Sending raw transaction\ntransactionManager.send(tx: \"Mt\" + signedTx) { (txHash, resultText, error) in\n  print(txHash)\n  print(resultText)\n  print(error)\n}\n```\n\n###### Example\n* Sign the \u003cb\u003eSellCoin\u003c/b\u003e transaction\n\n```swift\nlet gasCoinId = 0\nlet nonce = BigUInt(1)\nlet coinFromId = 0\nlet coinToId = 1\nlet value = BigUInt(1)\nlet minimumValue = BigUInt(0)\nlet tx = SellCoinRawTransaction(nonce: nonce, chainId: 2, gasCoinId: gasCoinId, coinFromId: coinFromId, coinToId: coinToId, value: value, minimumValueToBuy: minimumValue)\n```\n\n###### Example\n* Sign the \u003cb\u003eSellAllCoin\u003c/b\u003e transaction\n\n```swift\nlet gasCoinId = 0\nlet nonce = BigUInt(1)\nlet coinFromId = 0\nlet coinToId = 1\nlet minimumValue = BigUInt(0)\nlet tx = SellAllCoinsRawTransaction(nonce: nonce, chainId: 2, gasCoinId: gasCoinId, coinFromId: coinFromId, coinToId: coinToId, minimumValueToBuy: minimumValue)\n```\n\n###### Example\n* Sign the \u003cb\u003eBuyCoin\u003c/b\u003e transaction\n\n```swift\nlet gasCoinId = 0\nlet nonce = BigUInt(1)\nlet coinFromId = 0\nlet coinToId = 1\nlet value = BigUInt(1)\nlet maximumValue = BigUInt(0)\nlet tx = BuyCoinRawTransaction(nonce: nonce, chainId: 2, gasCoinId: gasCoinId, coinFromId: coinFromId, coinToId: coinToId, value: value, maximumValueToSell: maximumValue)\n```\n\n###### Example\n* Sign the \u003cb\u003eCreateCoin\u003c/b\u003e transaction\n\n```swift\nlet name = \"Name\"\nlet symbol = \"SYMBOL\"\nlet amount = BigUInt(1000)\nlet reserve = BigUInt(300000000000000000000000)\nlet ratio = BigUInt(70)\nlet maxSupply = BigUInt(1000000000000000) \n\nlet data = CreateCoinRawTransactionData(\n  name: name,\n  symbol: symbol,\n  initialAmount: initialAmount,\n  initialReserve: initialReserve,\n  reserveRatio: reserveRatio,\n  maxSupply: maxSupply\n)\nlet tx = CreateCoinRawTransaction(nonce: nonce, chainId: 2, gasCoinId: 0, data: data.encode()!)\n```\n\n###### Example\n* Sign the \u003cb\u003eDeclareCandidacy\u003c/b\u003e transaction\n\n```swift\nlet nonce = BigUInt(1)\nlet gasCoinId = 0\nlet coinId = 0\nlet address = \"Mx7633980c000139dd3bd24a3f54e06474fa941e16\"\nlet publicKey = \"Mp91cab56e6c6347560224b4adaea1200335f34687766199335143a52ec28533a5\"\nlet commission = BigUInt(1)\nlet stake = BigUInt(2)\nlet model = DeclareCandidacyRawTransaction(\n  nonce: nonce,\n  chainId: 2,\n  gasCoinId: gasCoinId,\n  address: address,\n  publicKey: publicKey,\n  commission: commission,\n  coinId: coinId,\n  stake: stake\n)\n```\n\n###### Example\n* Sign the \u003cb\u003eDelegate\u003c/b\u003e transaction\n\n```swift\nlet tx = DelegateRawTransaction(\n  nonce: BigUInt(1),\n  chainId: 2,\n  gasCoinId: 0,\n  publicKey: \"Mp91cab56e6c6347560224b4adaea1200335f34687766199335143a52ec28533a5\",\n  coinId: 0,\n  value: BigUInt(1000)\n)\n```\n\n###### Example\n* Sign the \u003cb\u003eSetCandidateOn\u003c/b\u003e transaction\n\n```swift\nlet nonce = BigUInt(1)\nlet gasCoinId = 0\nlet publicKey = \"Mpeadea542b99de3b414806b362910cc518a177f8217b8452a8385a18d1687a80b\"\nlet model = SetCandidateOnlineRawTransaction(nonce: nonce, chainId: 2, gasCoinId: gasCoinId, publicKey: publicKey)\n```\n\n###### Example\n* Sign the \u003cb\u003eSetCandidateOff\u003c/b\u003e transaction\n\n```swift\nlet nonce = BigUInt(1)\nlet gasCoinId = 0\nlet publicKey = \"Mpeadea542b99de3b414806b362910cc518a177f8217b8452a8385a18d1687a80b\"\nlet model = SetCandidateOfflineRawTransaction(nonce: nonce, chainId: 2, gasCoinId: gasCoinId, publicKey: publicKey)\n```\n\n###### Example\n* Sign the \u003cb\u003eRedeemCheck\u003c/b\u003e transaction\n\n```swift\nlet tx = RedeemCheckRawTransaction(\n  nonce: BigUInt(1),\n  chainId: 2,\n  gasCoinId: 0,\n  rawCheck: \u003cCheck data\u003e,\n  proof: \u003cProof Data\u003e)\n```\n\n###### Example\n* Sign the \u003cb\u003eUnbond\u003c/b\u003e transaction\n\n```swift\nlet coinId = 0\nlet publicKey = \"91cab56e6c6347560224b4adaea1200335f34687766199335143a52ec28533a5\"\nlet value = BigUInt(2)\nlet model = UnbondRawTransactionData(publicKey: publicKey, coinId: coinId, value: value)\n```\n\n###### Example\n* Sign the \u003cb\u003eEditCandidate\u003c/b\u003e transaction\n\n```swift\nlet pk = \"Mpc5b635cde82f796d1f8320efb8ec634f443e6b533a973570e4b5ea04aa44e96d\"\nlet address1 = \"Mxe7ca647d17599d3e83048830fbb2df3726a7d22c\"\nlet address2 = \"Mxa8ca647d17599d3e83048830fbb2df3726a7d215\"\nlet model = EditCandidateRawTransaction(nonce: BigUInt(1), chainId: 2, gasCoinId: 0, publicKey: pk, rewardAddress: address1, ownerAddress: address2)\n```\n\n### Create Minter Check\n\n###### Example\n\n* Create check\n\n```swift\nlet nonce = \"1\"\nlet dueBlock = BigUInt(99)\nlet coinId = 0\nlet value = BigUInt(1)\nlet phrase = \"123\"\nlet tx = IssueCheckRawTransaction(nonce: nonce, dueBlock: dueBlock, coinId: coinId, value: value, gasCoinId: coinId, passPhrase: phrase)\ntx.data = data.encode()!\nlet result = RawTransactionSigner.sign(rawTx: tx, privateKey: \u003cPrivate Key\u003e)\n```\n\n* Create proof\n\n```swift\nlet proof = RawTransactionSigner.proof(address: \"Mxe7ca647d17599d3e83048830fbb2df3726a7d22c\", passphrase: \"some pass phrase\")\n```\n\n### Minter Wallet\n\n* Generate mnemonic.\n\n```swift\nlet mnemonics = String.generateMnemonicString()\n```\n\n* Get seed from mnemonic.\n\n```swift\nlet res = RawTransactionSigner.seed(from: mnemonic, passphrase: \"\", language: .english)\n```\n\n* Get private key from seed.\n\n```swift\nlet privateKey = PrivateKey(seed: Data(hex: seed))\nlet key = try? privateKey\n  .derive(at: 44, hardened: true)\n  .derive(at: 60, hardened: true)\n  .derive(at: 0, hardened: true)\n  .derive(at: 0)\n  .derive(at: 0)\n```\n\n* Get public key from private key.\n\n```swift\nlet publicKey = RawTransactionSigner.publicKey(privateKey: privateKey!.raw, compressed: false)!.dropFirst()\n```\n\n* Get Minter address from public key.\n\n```swift\nlet address = RawTransactionSigner.address(publicKey: publicKey)\n```\n\n****\n\n## Author\n\nsidorov.panda, ody344@gmail.com\n\n\n## License\n\n\nMinterCore is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminterteam%2Fminter-ios-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminterteam%2Fminter-ios-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminterteam%2Fminter-ios-core/lists"}