{"id":49682547,"url":"https://github.com/CorvidLabs/swift-mint","last_synced_at":"2026-05-23T21:00:51.959Z","repository":{"id":326733295,"uuid":"1099379594","full_name":"CorvidLabs/swift-mint","owner":"CorvidLabs","description":"🌿 Mint NFTs from Swift, because why not","archived":false,"fork":false,"pushed_at":"2026-03-21T06:04:28.000Z","size":38,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-18T14:21:47.305Z","etag":null,"topics":["algorand","blockchain","minting","nft","swift"],"latest_commit_sha":null,"homepage":"https://corvidlabs.github.io/swift-mint/documentation/mint/","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/CorvidLabs.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-18T23:21:04.000Z","updated_at":"2026-03-08T23:46:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/CorvidLabs/swift-mint","commit_stats":null,"previous_names":["corvidlabs/swift-mint"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/CorvidLabs/swift-mint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvidLabs%2Fswift-mint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvidLabs%2Fswift-mint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvidLabs%2Fswift-mint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvidLabs%2Fswift-mint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CorvidLabs","download_url":"https://codeload.github.com/CorvidLabs/swift-mint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorvidLabs%2Fswift-mint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33412082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T18:09:33.147Z","status":"ssl_error","status_checked_at":"2026-05-23T18:09:31.380Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["algorand","blockchain","minting","nft","swift"],"created_at":"2026-05-07T08:00:26.875Z","updated_at":"2026-05-23T21:00:51.952Z","avatar_url":"https://github.com/CorvidLabs.png","language":"Swift","funding_links":[],"categories":["Development \u0026 Tools"],"sub_categories":["Language SDKs \u0026 Tools"],"readme":"# swift-mint\n\n[![macOS](https://img.shields.io/github/actions/workflow/status/CorvidLabs/swift-mint/macOS.yml?label=macOS\u0026branch=main)](https://github.com/CorvidLabs/swift-mint/actions/workflows/macOS.yml)\n[![Ubuntu](https://img.shields.io/github/actions/workflow/status/CorvidLabs/swift-mint/ubuntu.yml?label=Ubuntu\u0026branch=main)](https://github.com/CorvidLabs/swift-mint/actions/workflows/ubuntu.yml)\n[![License](https://img.shields.io/github/license/CorvidLabs/swift-mint)](https://github.com/CorvidLabs/swift-mint/blob/main/LICENSE)\n[![Version](https://img.shields.io/github/v/release/CorvidLabs/swift-mint)](https://github.com/CorvidLabs/swift-mint/releases)\n\n\u003e **Pre-1.0 Notice**: This library is under active development. The API may change between minor versions until 1.0.\n\nA Swift library for minting NFTs on Algorand. Built with Swift 6 and async/await.\n\n## Features\n\n- **ARC-19** - Mutable NFT metadata via reserve address (IPFS CID encoding)\n- **ARC-69** - Mutable NFT metadata via transaction notes\n- **ARC-3** - Standard NFT metadata structure\n- **CID Support** - Parse and encode IPFS CIDv0 and CIDv1\n- **Swift 6** - Full concurrency support with `Sendable` types\n\n## Installation\n\n### Swift Package Manager\n\nAdd Mint to your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/CorvidLabs/swift-mint.git\", from: \"0.0.1\")\n]\n```\n\nThen add the dependency to your target:\n\n```swift\n.target(\n    name: \"YourApp\",\n    dependencies: [\n        .product(name: \"Mint\", package: \"swift-mint\")\n    ]\n)\n```\n\nOr add it via Xcode:\n1. File \u003e Add Package Dependencies\n2. Enter: `https://github.com/CorvidLabs/swift-mint.git`\n\n## Quick Start\n\n### Minting an ARC-19 NFT\n\n```swift\nimport Mint\n\n// Create minter with algod client\nlet config = try MinterConfiguration(\n    algodURL: \"https://testnet-api.algonode.cloud\"\n)\nlet minter = Minter(configuration: config)\n\n// Create metadata\nlet metadata = ARC3Metadata(\n    name: \"My NFT\",\n    description: \"A unique digital collectible\",\n    image: \"ipfs://QmYourImageCID\"\n)\n\n// Parse your metadata CID from IPFS\nlet cid = try CID(\"bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi\")\n\n// Mint the NFT\nlet result = try await minter.mintARC19(\n    account: account,\n    metadata: metadata,\n    cid: cid,\n    unitName: \"MYNFT\",\n    assetName: \"My NFT #1\"\n)\n\nprint(\"Asset ID: \\(result.assetID)\")\nprint(\"Transaction: \\(result.transactionID)\")\n```\n\n### Minting an ARC-69 NFT\n\n```swift\n// Create ARC-69 metadata (stored in transaction note)\nlet metadata = ARC69Metadata(\n    description: \"An ARC-69 NFT\",\n    properties: [\n        \"trait\": AnyCodable(\"rare\"),\n        \"power\": AnyCodable(100)\n    ]\n)\n\n// Mint with metadata in note field\nlet result = try await minter.mintARC69(\n    account: account,\n    metadata: metadata,\n    unitName: \"ARC69\",\n    assetName: \"My ARC-69 NFT\",\n    url: \"https://example.com/image.png\"\n)\n```\n\n### Updating NFT Metadata\n\n```swift\n// Update ARC-19 metadata by changing reserve address\nlet newCid = try CID(\"QmNewMetadataCID...\")\ntry await minter.updateARC19(\n    account: account,\n    assetID: result.assetID,\n    newCID: newCid\n)\n\n// Update ARC-69 metadata via zero-amount transfer\nlet newMetadata = ARC69Metadata(\n    description: \"Updated description\",\n    properties: [\"trait\": AnyCodable(\"legendary\")]\n)\ntry await minter.updateARC69(\n    account: account,\n    assetID: result.assetID,\n    newMetadata: newMetadata\n)\n```\n\n## Core Concepts\n\n### CID (Content Identifier)\n\nIPFS Content Identifiers for referencing metadata:\n\n```swift\n// Parse CIDv0 (starts with \"Qm\")\nlet cidV0 = try CID(\"QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG\")\nprint(cidV0.version)  // 0\nprint(cidV0.codec)    // \"dag-pb\"\n\n// Parse CIDv1 (starts with \"bafy\" or \"bafk\")\nlet cidV1 = try CID(\"bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi\")\nprint(cidV1.version)  // 1\nprint(cidV1.codec)    // \"dag-pb\"\n\n// Convert to reserve address for ARC-19\nlet reserveAddress = try cid.toReserveAddress()\n\n// Generate ARC-19 template URL\nlet url = cid.toARC19URL()\n// \"template-ipfs://{ipfscid:1:dag-pb:reserve:sha2-256}\"\n\n// Get gateway URLs\nprint(cid.gatewayURL())  // \"https://ipfs.io/ipfs/...\"\nprint(cid.ipfsURI)       // \"ipfs://...\"\n```\n\n### ARC-3 Metadata\n\nThe base metadata format for Algorand NFTs:\n\n```swift\nlet metadata = ARC3Metadata(\n    name: \"NFT Name\",\n    description: \"Description\",\n    image: \"ipfs://...\",\n    imageMimetype: \"image/png\",\n    externalUrl: \"https://example.com\",\n    properties: [\n        \"trait_type\": AnyCodable(\"value\")\n    ]\n)\n```\n\n### ARC-69 Metadata\n\nMetadata stored in transaction notes:\n\n```swift\nlet metadata = ARC69Metadata(\n    description: \"Description\",\n    mediaUrl: \"https://example.com/image.png\",\n    properties: [\n        \"trait\": AnyCodable(\"rare\")\n    ]\n)\n\n// Encode to note data\nlet noteData = try metadata.toNoteData()\n```\n\n### IPFS Pinning Integration\n\nImplement the `IPFSPinningProvider` protocol for automatic pinning:\n\n```swift\nstruct MyPinataProvider: IPFSPinningProvider {\n    func pinJSON(_ metadata: ARC3Metadata) async throws -\u003e CID {\n        // Upload to Pinata/IPFS and return CID\n    }\n\n    func pinFile(data: Data, name: String, mimeType: String) async throws -\u003e CID {\n        // Upload file to IPFS\n    }\n\n    func unpin(_ cid: CID) async throws {\n        // Remove pin\n    }\n}\n\n// Mint with automatic pinning\nlet result = try await minter.mintARC19WithPinning(\n    account: account,\n    metadata: metadata,\n    pinningProvider: MyPinataProvider(),\n    unitName: \"MYNFT\",\n    assetName: \"My NFT\"\n)\n```\n\n## Architecture\n\nThe library is organized into several key components:\n\n- **Core Types**: `CID`, `ARC3Metadata`, `ARC69Metadata`, `AnyCodable`\n- **Minting**: `Minter`, `MinterConfiguration`, `MintResult`\n- **Pinning**: `IPFSPinningProvider`, `PinResult`\n- **Errors**: `MintError`\n\nThe `Minter` is implemented as an `actor` for thread safety.\n\n## ARC Standards\n\n| Standard | Metadata Location | Update Method |\n|----------|------------------|---------------|\n| ARC-19 | IPFS (off-chain) | Change reserve address |\n| ARC-69 | Transaction note (on-chain) | Zero-amount transfer |\n| ARC-3 | Metadata format | N/A (format spec) |\n\n## Requirements\n\n- Swift 6.0+\n- iOS 15.0+ / macOS 12.0+ / tvOS 15.0+ / watchOS 8.0+ / visionOS 1.0+\n\n## License\n\nMIT License - See [LICENSE](LICENSE) file for details.\n\n## Resources\n\n- [ARC-3: NFT Metadata Standard](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0003.md)\n- [ARC-19: Mutable Asset URL](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0019.md)\n- [ARC-69: Community NFT Standard](https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0069.md)\n- [Algorand Developer Portal](https://developer.algorand.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCorvidLabs%2Fswift-mint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCorvidLabs%2Fswift-mint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCorvidLabs%2Fswift-mint/lists"}