{"id":20841193,"url":"https://github.com/iotexproject/iotex-antenna-swift","last_synced_at":"2025-05-08T22:08:08.862Z","repository":{"id":35065867,"uuid":"199763977","full_name":"iotexproject/iotex-antenna-swift","owner":"iotexproject","description":"IoTeX Swift SDK","archived":false,"fork":false,"pushed_at":"2023-01-31T03:17:35.000Z","size":276,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-08T22:07:54.839Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iotexproject.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":"2019-07-31T02:37:16.000Z","updated_at":"2023-01-27T16:56:48.000Z","dependencies_parsed_at":"2023-02-16T15:15:31.183Z","dependency_job_id":null,"html_url":"https://github.com/iotexproject/iotex-antenna-swift","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fiotex-antenna-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fiotex-antenna-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fiotex-antenna-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fiotex-antenna-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iotexproject","download_url":"https://codeload.github.com/iotexproject/iotex-antenna-swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154975,"owners_count":21862622,"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":[],"created_at":"2024-11-18T01:19:09.979Z","updated_at":"2025-05-08T22:08:08.832Z","avatar_url":"https://github.com/iotexproject.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iotex-antenna-swift\n\n[![LICENSE](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\niotex-antenna-swift is our SDK allowing you to interact with a local or remote iotex blockchain node, using gRPC  connection.\nIoTeX is building the next generation of the decentralized network for IoT powered by scalability- and privacy-centric blockchains.\nPlease refer to IoTeX [whitepaper](https://iotex.io/academics) for details.\n\n## Developing\n\n### Update Proto\n\n```\nmkdir protogen\nprotoc \\\nproto/api/api.proto proto/api/read_state.proto proto/rpc/rpc.proto \\\nproto/types/action.proto proto/types/blockchain.proto proto/types/consensus.proto \\\nproto/types/election.proto proto/types/endorsement.proto proto/types/genesis.proto \\\nproto/types/node.proto proto/types/receiptstatus.proto proto/types/state_data.proto \\\nproto/types/transaction_log.proto \\\n--swift_opt=Visibility=Public \\\n--swift_out=protogen \\\n--swiftgrpc_out=Visibility=Public,Client=true,Server=false:./protogen\nfind protogen -name \"*.swift\" -exec mv {} Sources/Protogen \\;\nrm -rf protogen\n```\n\n### Install\n\n```\npod 'iotex-antenna-swift', '~\u003e 0.2.1'\npod 'iotex-antenna-swift', :git =\u003e 'https://github.com/iotexproject/iotex-antenna-swift.git', :tag =\u003e '0.2.1'\n```\n\n## Sample\n\n```swift\n// create account from private key\nlet account = try Account(privateKey: \"0806c458b262edd333a191e92f561aff338211ee3e18ab315a074a2d82aa343f\")\nlet iotx = try IOTX(provider: \"api.testnet.iotex.one:443\", secure: true, chainID: 2)\n\n// query account meta\nlet response = try iotx.currentProvider().getAccount(Iotexapi_GetAccountRequest.with {\n    $0.address = account.address\n})\nprint(response)\n\n// transfer IOTX\nlet hash = try iotx.transfer(TransferRequest(\n    nonce: nil, gasLimit: 100000, gasPrice: \"10000000000000\", account: account,\n    recipient: \"io13zt8sznez2pf0q0hqdz2hyl938wak2fsjgdeml\", amount: \"1000000000000000000\", payload: \"\".data(using: .utf8)!\n))\nprint(hash)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotexproject%2Fiotex-antenna-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiotexproject%2Fiotex-antenna-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotexproject%2Fiotex-antenna-swift/lists"}