{"id":1916,"url":"https://github.com/Awalz/SwiftyArk","last_synced_at":"2025-08-02T05:33:09.008Z","repository":{"id":62456837,"uuid":"103990152","full_name":"Awalz/SwiftyArk","owner":"Awalz","description":"A Swift Framework build for the Ark Ecosystem","archived":false,"fork":false,"pushed_at":"2018-04-18T19:12:01.000Z","size":1968,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T21:56:48.567Z","etag":null,"topics":["ad"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Awalz.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}},"created_at":"2017-09-18T20:46:05.000Z","updated_at":"2019-05-12T19:01:40.000Z","dependencies_parsed_at":"2022-11-02T00:01:22.144Z","dependency_job_id":null,"html_url":"https://github.com/Awalz/SwiftyArk","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Awalz%2FSwiftyArk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Awalz%2FSwiftyArk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Awalz%2FSwiftyArk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Awalz%2FSwiftyArk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Awalz","download_url":"https://codeload.github.com/Awalz/SwiftyArk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":215388043,"owners_count":15871808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ad"],"created_at":"2024-01-05T20:15:58.929Z","updated_at":"2024-08-14T18:30:54.434Z","avatar_url":"https://github.com/Awalz.png","language":"JavaScript","funding_links":[],"categories":["SDK"],"sub_categories":["Unofficial","Other free courses"],"readme":"\u003cimg src=\"SwiftyArkLogo.jpg\"  align=\"center\"\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/platform-iOS%208%2B-blue.svg?style=flat\" alt=\"Platform: iOS 8+\"/\u003e\n    \u003ca href=\"https://developer.apple.com/swift\"\u003e\u003cimg src=\"https://img.shields.io/badge/swift-4.0-orange.svg?style=flat)](https://developer.apple.com/swift/\" alt=\"Language: Swift 4\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://cocoapods.org/pods/SwiftyArk\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/SwiftyArk.svg?style=flat\" alt=\"CocoaPods compatible\" /\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-BE90D4.svg?style=flat)](http://creativecommons.org/licenses/by-sa/4.0/t\" alt=\"License: MIR\" /\u003e \u003cbr\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n# Introduction\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://arkcommunity.fund/\"\u003e\u003cimg src=\"https://arkcommunity.fund/media-kit/funded/banner.png\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\nSwiftyArk is a simple, lightweight framework for the [Ark Ecosystem](https://ark.io). SwiftyArk provides a simple wrapper for accessing Ark accounts, delegates, block, and transaction information.\n\nSwiftyArk's networking component is fully asynchronous and have extensive error handling. SwiftyArk data structures are type-safe and favor immutability.\n\n\n## Requirements\n* iOS 8.0+\n* mac OSX 10.10+\n* Swift 3.0\n\n## Documentation\n\nSwiftyArk is 100% documented and available [here]()\n\n### Getting Started:\n\nThe Ark APi is accessed with the `ArkManager`:\n\n```swift\nlet manager = ArkManager()\n```\n\n`ArkManager` handles all network calls and returns results asynchronous in a closure:\n\n```swift\nmanager.delegates { (error, delegates) in\n   if let arkError = error {\n        print(arkError.localizedDescription)\n           return\n    }\n\n    if let currentDelegates = delegates {\n    \t// List of delegates\n     }\n}\n```\n\n\nWith the manager instance, you can access an account:\n\n```swift\nmanager.account(address: \"AUexKjGtgsSpVzPLs6jNMM6vJ6znEVTQWK\") { (error, arkAccount) in\n  if let account = arkAccount {\n       // Account(address: \"AUexKjGtgsSpVzPLs6jNMM6vJ6znEVTQWK\",\n       // unconfirmedBalance: 16118512.398923151,\n       // balance: 16118512.398923151,\n       // publicKey: \"02ff171adaef486b7db9fc160b28433d20cf43163d56fd28fee72145f0d5219a4b\",\n       // unconfirmedSignature: Optional(0),\n       // secondSignature: Optional(0),\n       // multisignatures: Optional([]),\n       // secondPublicKey: nil,\n       // unconfirmedMultisignatures: Optional([]))\n   }\n}\n```\n\nThe manager instance can store a session for easy accessing of an address/delegate:\n\n```swift\nmanager.delegate(\"jarunik\") { (error, delegate) in\n   if let arkDelegate = delegate {\n\t\t// Delegate(username: \"jarunik\", \n\t\t// address: \"Aasu14aTs9ipZdy1FMv7ay1Vqn3jPskA8t\", \n\t\t// publicKey: \"02c7455bebeadde04728441e0f57f82f972155c088252bf7c1365eb0dc84fbf5de\",\n\t\t// votes: 1246983.70585494,\n\t\t// producedblocks: \n\t\t// 28670, \n\t\t// missedblocks: 61, \n\t\t// rate: 47, \n\t\t// approval: 0.970000029, \n\t\t// productivity: 99.7900009)\n       // Update the session settings with delegate\n       manager.updateSettings(delegate: arkDelegate)\n   }\n}\n```\n\nWith the stored session credentials, you can easily access acccount information:\n\n```swift\n manager.lastBlock { (error, block) in\n    if let lastBlock = block {\n    \t // Block(id: \"3725283905614253778\",\n    \t // version: 0,\n    \t // timestamp: 2017-09-19 00:48:48 +0000,\n    \t // height: 1948928,\n    \t // previousBlock: \"17490567348134875423\",\n    \t // numberOfTransactions: 0,\n    \t // totalAmount: 0.0,\n    \t // totalFee: 0.0,\n    \t // reward: 2.0,\n    \t // payloadLength: 0,\n    \t // payloadHash: \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\n    \t // generatorPublicKey: \"#{key}\",\n    \t // generatorId: \"ARAq9nhjCxwpWnGKDgxveAJSijNG8Y6dFQ\",\n    \t // blockSignature: \"#{signature}\",\n    \t // confirmations: 27,\n    \t // totalForged: 2.0)\n    }\n }\n```\n\n`SwiftyArk` supports creating and sending new transactions:\n\n```swift\n manager.sendTransaction(\"recipientAddress\", amount: 100.0, passphrase: \"passphrase\", secondPassphrase: \"secondPassphrase\", vendorField: \"my message\") { (error, response) in\n     // response\n}\n```\n\nWith `SwiftyArk`, you can also vote/unvote for a delegate:\n\n```swift\nmanager.delegate(\"jarunik\") { (error, delegate) in\n    if let jarunik = delegate {\n        manager.sendVote(jarunik, passphrase: \"passphrase\", secondPassphrase: \"optionalSecondPassphrase\") { (error, response) in\n        \t// response\n        }\n    }\n}\n```\n\n\n`SwiftyArk` also has a built in Ark Ticker provided by [CoinMarketCap](https://coinmarketcap.com) with support for **31 currencies**:\n\n```swift\nmanager.ticker(currency: .cad) { (error, ticker) in\n   if let canadianTicker = ticker {\n        // Ticker(currency: SwiftyArk.Currency.cad,\n        // id: \"ark\",\n        // name: \"Ark\",\n        // symbol: \"ARK\",\n        // rank: 20,\n        // price: 4.3638476501000003,\n        // bitcoinPrice: 0.00088648999999999998,\n        // volume24Hour: 5406421.2865599999,\n        // marketCap: 426120847.0,\n        // availableSupply: 97647966.0,\n        // totalSupply: 128897966.0,\n        // percentChange1h: -3.7999999999999998,\n        // percentChange24h: 1.8700000000000001,\n        // percentChange7d: -1.1100000000000001)\n   }\n}\n```\n\n## Installation\n\n### Cocoapods:\n\nSwiftyArk is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"SwiftyArk\"\n```\n\nIn your project, be sure to import `SwiftyArk` in your project header:\n\n```swift\nimport SwiftyArk\n```\n\n### Manual Installation:\n\nSimply copy the contents of the `Source` folder into your project.\n\n## License\n\nSwiftyArk is available under the MIT license. See the LICENSE file for more info.\n\n## Author\n\nIf you have any questions, requests, or enhancements, feel free to submit a pull request, create an issue, or contact me in person:\n\n**Andrew Walz**\n**andrewjwalz@gmail.com**\n\n## Support\n\n`SwiftyArk` is 100% open source and made with :heart:. If you would like to contribute:\n\nArk Address: `AYdHH5TsZF796pv7gxVU1tK6DLkUxMK1VL`\n\nBitcoin Address: `16HPSJkzaQWWYyATrAnzCiLCQ2GSJETJbL`\n\n## Sponsors\n\nDelegate Sponsor - [Jarunik](https://forum.ark.io/topic/251/jarunik-delegate-proposal-80-voters-20-reserves-10-costs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAwalz%2FSwiftyArk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAwalz%2FSwiftyArk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAwalz%2FSwiftyArk/lists"}