{"id":20943348,"url":"https://github.com/apillon/flutter-sdk","last_synced_at":"2026-05-05T15:33:57.197Z","repository":{"id":230391989,"uuid":"779174019","full_name":"Apillon/flutter-sdk","owner":"Apillon","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-10T09:24:53.000Z","size":41,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T21:22:50.945Z","etag":null,"topics":["apillon","dart","flutter","sdk"],"latest_commit_sha":null,"homepage":null,"language":"Dart","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/Apillon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-03-29T07:55:03.000Z","updated_at":"2024-12-16T11:01:13.000Z","dependencies_parsed_at":"2024-03-29T12:45:04.398Z","dependency_job_id":"c3971bdd-33a4-4328-a6c4-dc6082d95bdb","html_url":"https://github.com/Apillon/flutter-sdk","commit_stats":null,"previous_names":["apillon/flutter-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apillon%2Fflutter-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apillon%2Fflutter-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apillon%2Fflutter-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apillon%2Fflutter-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Apillon","download_url":"https://codeload.github.com/Apillon/flutter-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243335462,"owners_count":20274904,"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":["apillon","dart","flutter","sdk"],"created_at":"2024-11-18T23:36:03.005Z","updated_at":"2026-05-05T15:33:52.180Z","avatar_url":"https://github.com/Apillon.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apillon Flutter SDK\n\nThis package provides Dart and Flutter developers with tools and libraries to interact with Apillon services, simplifying the use of Apillon's REST API by reducing boilerplate code and streamlining multi-step processes into single operations.\n\n## Requirements\n\n- Dart SDK: '\u003e=3.2.2 \u003c4.0.0'\n- An Apillon API key and secret\n- http package version 1.1.0\n\n## Getting started\n\nTo use the Apillon Flutter SDK, you must first register an account at [Apillon.io](https://app.apillon.io), create a project, and generate an API key with the appropriate permissions.\n\nThe Flutter SDK package is available as a Dart package on [pub.dev](https://pub.dev/packages/apillon_flutter) and you can also check it out directly on [GitHub](https://github.com/Apillon/flutter-sdk).\nTo include it in your project, add the following to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  apillon_flutter: ^0.0.1\n```\n\n### Initialization\n\nTo start using the SDK, you need to import it and configure it with your Apillon API key and secret. Here's an example of how to initialize the Storage module:\n\n```dart\nimport 'package:apillon_flutter/apillon_flutter.dart';\n\nvoid main() {\n  var storage = Storage(ApillonConfig(\n    key: 'yourApiKey',\n    secret: 'yourApiSecret',\n  ));\n}\n```\n\nAll modules in the Apillon Flutter SDK require the same initial configuration of `key` and `secret`.\n\n## Modules\n\nThe Apillon Flutter SDK consists of several modules, each corresponding to a specific Apillon service. Below are examples of how to use some of these modules.\n\n### Storage\n\nThe Storage module provides functionalities for interacting with the Storage service.\n\n#### Usage example\n\n```dart\nimport 'dart:io';\nimport 'package:apillon_flutter/apillon_flutter.dart';\nimport 'package:path/path.dart' as path;\n\nvoid main() async {\n  var storage = Storage(ApillonConfig(\n    key: 'yourApiKey',\n    secret: 'yourApiSecret',\n  ));\n\n  // List all buckets\n  var buckets = await storage.listBuckets(IApillonPagination());\n  print('Buckets:');\n  for (var bucket in buckets) {\n    print('${bucket.name} - ${bucket.uuid}');\n  }\n\n  var bucketUuid = 'eaff2672-3012-46fb-9278-5efacc6cb616';\n\n  // Get specific bucket details\n  var bucketDetails = await storage.bucket(bucketUuid).get();\n  print('Bucket Details: ${bucketDetails.name}, Size: ${bucketDetails.size}');\n\n  // List files in the bucket\n  var files = await storage.bucket(bucketUuid).listFiles(IBucketFilesRequest());\n  print('Files in bucket:');\n  for (var file in files) {\n    print('${file.name} - ${file.uuid}');\n  }\n\n  // Upload files from a folder\n  var uploadDir = path.join(Directory.current.path, 'my-folder');\n  print('Uploading files from $uploadDir');\n  await storage.bucket(bucketUuid).uploadFromFolder(uploadDir, IFileUploadRequest());\n\n  // Upload a single file from buffer\n  var filePath = path.join(Directory.current.path, 'file.txt');\n  var fileBytes = File(filePath).readAsBytesSync();\n  await storage.bucket(bucketUuid).uploadFiles([\n    FileMetadata(\n      fileName: 'file.txt',\n      contentType: 'text/plain',\n      content: fileBytes,\n    )\n  ], IFileUploadRequest());\n\n  // Get details of a specific file\n  var fileUuid = 'eaff2672-3012-46fb-9278-5efacc6cb616';\n  var fileDetails = await storage.bucket(bucketUuid).file(fileUuid).get();\n  print('File Details: ${fileDetails.name}, Size: ${fileDetails.size}');\n}\n```\n\n#### IPNS methods\n\nThe Storage module additionally contains methods for manipulating IPNS records for a specific storage bucket.\n\n```dart\nimport 'package:apillon_flutter/apillon_flutter.dart';\n\nvoid main() async {\n  var storage = Storage(ApillonConfig(\n    key: 'yourApiKey',\n    secret: 'yourApiSecret',\n  ));\n  var bucketUuid = 'eaff2672-3012-46fb-9278-5efacc6cb616';\n\n  // List all existing IPNS records in a bucket\n  var ipnsRecords = await storage.bucket(bucketUuid).listIpnsNames(IPNSListRequest());\n  print('IPNS Records:');\n  for (var record in ipnsRecords) {\n    print('${record.name} - ${record.uuid}');\n  }\n\n  // Create a new IPNS record\n  const name = 'Test IPNS';\n  const description = 'This is a test description';\n  const cid = 'QmUxtfFfWFguxSWUUy2FiBsGuH6Px4KYFxJqNYJRiDpemj';\n  var newIpnsRecord = await storage.bucket(bucketUuid).createIpns(ICreateIpns(\n    name: name,\n    description: description,\n    cid: cid,\n  ));\n  print('New IPNS Record: ${newIpnsRecord.uuid}');\n\n  // Publish an IPNS record to point to a new CID\n  const newCid = 'Qmakf2aN7wzt5u9H3RadGjfotu62JsDfBq8hHzGsV2LZFx';\n  await storage.bucket(bucketUuid).ipns(newIpnsRecord.uuid).publish(newCid);\n  print('IPNS record published to new CID: $newCid');\n\n  // Delete an IPNS record\n  await storage.bucket(bucketUuid).ipns(newIpnsRecord.uuid).delete();\n  print('IPNS record deleted: ${newIpnsRecord.uuid}');\n}\n```\n\n### NFTs\n\nThe NFT module encapsulates functionalities for the NFT service.\n\n#### Usage example\n\n```dart\nimport 'package:apillon_flutter/apillon_flutter.dart';\n\nvoid main() async {\n  var nft = Nft(ApillonConfig(\n    key: 'yourApiKey',\n    secret: 'yourApiSecret',\n  ));\n\n  // Create a new NFT collection\n  var collection = await nft.create(ICreateCollection(\n    chain: EvmChain.moonbase,\n    collectionType1: CollectionType.generic,\n    name: 'Space Explorers',\n    description: 'A collection of space explorers',\n    symbol: 'SE',\n    royaltiesFees: 3,\n    royaltiesAddress: '0x95B8c6b9225456107649776EF8aAF20C42d58814',\n    baseUri: 'https://test.com/metadata/',\n    baseExtension: '.json',\n    maxSupply: 50,\n    isRevokable: false,\n    isSoulbound: false,\n    drop: false,\n  ));\n  print('Collection created: ${collection.uuid}');\n  // or create a substrate collection\n  var substrateCollection = await nft.createSubstrate({\n    chain: SubstrateChain.astar,\n    collectionType1: CollectionType.generic,\n    name: 'SpaceExplorers',\n    symbol: 'SE',\n    ...\n  });\n\n  // Mint a new NFT in the collection\n  var mintResult = await nft.collection(collection.uuid).mint(IMintNftData(\n    receivingAddress: '0x5BA8B0c24bA5307b67E619ad500a635204F73bF1',\n    quantity: 1,\n  ));\n  print('Mint transaction hash: ${mintResult.transactionHash}');\n\n  // List NFT collections\n  var collections = await nft.listCollections(ICollectionFilters());\n\n  // Transfer NFT ownership to another address\n  await collection.transferOwnership('0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD');\n}\n```\n\n### Identity\n\nThe Identity module provides functionalities for validating wallet signatures and fetching identity data.\n\n#### Usage example\n\n```dart\nimport 'package:apillon_flutter/apillon_flutter.dart';\n\nvoid main() async {\n  var identity = Identity(ApillonConfig(\n    key: 'yourApiKey',\n    secret: 'yourApiSecret',\n  ));\n\n  // Generate a signing message for EVM wallet signature validation\n  const customMessage = 'Identity EVM SDK test';\n  var signingMessage = identity.generateSigningMessage(customMessage)[\"message\"];\n  print('Signing message: $signingMessage');\n\n  var walletAddress = '0xa79bg13g2...';\n  var signature = '0xYourSignature'; // signature obtained from the user's wallet by the client app\n\n  // Validate EVM wallet signature\n  var validationResult = await identity.validateEvmWalletSignature(IValidateEvmWalletSignature(\n    walletAddress: walletAddress,\n    message: signingMessage,\n    signature: signature,\n  ));\n  print('Is valid: ${validationResult.isValid}');\n  print('Address: ${validationResult.address}');\n\n  // Get wallet identity profile for a Polkadot address\n  var polkadotAddress = '5HqHQDGcHqS...',\n  var identityProfile = await identity.getWalletIdentity(polkadotAddress);\n  print('Identity Profile: ${identityProfile.subsocial['content']['name']}');\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapillon%2Fflutter-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapillon%2Fflutter-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapillon%2Fflutter-sdk/lists"}