{"id":13788614,"url":"https://github.com/Aquila-Network/AquilaJS","last_synced_at":"2025-05-12T03:30:35.454Z","repository":{"id":47205398,"uuid":"330215350","full_name":"Aquila-Network/AquilaJS","owner":"Aquila-Network","description":" JavaScript client library to access Aquila Network Neural Search Engine.","archived":false,"fork":false,"pushed_at":"2022-09-03T09:05:38.000Z","size":244,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-18T02:38:19.568Z","etag":null,"topics":["neural-search","personal-search","search-engine","vector-search-engine"],"latest_commit_sha":null,"homepage":"https://aquila.network","language":"TypeScript","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/Aquila-Network.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":"2021-01-16T17:16:37.000Z","updated_at":"2022-09-01T22:06:23.000Z","dependencies_parsed_at":"2023-01-17T19:46:51.128Z","dependency_job_id":null,"html_url":"https://github.com/Aquila-Network/AquilaJS","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aquila-Network%2FAquilaJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aquila-Network%2FAquilaJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aquila-Network%2FAquilaJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aquila-Network%2FAquilaJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aquila-Network","download_url":"https://codeload.github.com/Aquila-Network/AquilaJS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253667928,"owners_count":21944940,"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":["neural-search","personal-search","search-engine","vector-search-engine"],"created_at":"2024-08-03T21:00:51.036Z","updated_at":"2025-05-12T03:30:35.125Z","avatar_url":"https://github.com/Aquila-Network.png","language":"TypeScript","funding_links":[],"categories":["Official Implementations","TypeScript"],"sub_categories":["AquilaDB client libraries"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://aquila.network\"\u003e\n    \u003cimg\n      src=\"https://user-images.githubusercontent.com/19545678/133918727-5a37c6be-676f-427b-8c86-dd50f58d1287.png\"\n      alt=\"Aquila Network Logo\"\n      height=\"64\"\n    /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003cp\u003e\n    \u003ch3\u003e\n      \u003cb\u003e\n        Aquila JS\n      \u003c/b\u003e\n    \u003c/h3\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003cb\u003e\n      Javascript client to access Aquila Network Neural Search Engine\n    \u003c/b\u003e\n  \u003c/p\u003e\n  \u003cbr/\u003e\n\u003c/div\u003e\n\nHere is a bird's eye view of where Aquila Client Libraries fit in the entire ecosystem:\n\u003cdiv align=\"center\"\u003e\n  \u003cimg\n    src=\"https://user-images.githubusercontent.com/19545678/133918436-63c39f8a-aa6c-4d7c-939a-20e35cc8b2c2.png\"\n    alt=\"Aquila client libraries\"\n    height=\"400\"\n  /\u003e\n \u003cbr/\u003e\n\u003c/div\u003e\n\n## Connect to Database and Hub\n```ts\nimport { AquilaClient, Wallet, Db, Hub } from 'aquila-js';\n\nconst wallet = new Wallet('DB_PRIVATE_KEY_PATH-HERE');\nconst dbUrl = 'DB_URL-HERE';\nconst dbPort = 'DB_PORT--HERE';\nconst hubWallet = new Wallet('HUB_PRIVATE_KEY_PATH-HERE');\nconst hubUrl = 'HUB_URL-HERE';\nconst hubPort = 'HUB_PORT-HERE';\n\n// connecting to aquila db server\nAquilaClient.getDbServer(dbUrl, dbPort, wallet).then(db =\u003e {\n\t// connected\n});\n// connecting to aquila hub server\nAquilaClient.getHubServer(hubUrl, hubPort, hubWallet).then(hub =\u003e {\n\t// connected\n});\n```\n\n## Create Database\n\n```ts\nconst schema: Schema = {\n\tdescription: \"description of db\",\n\tunique: \"r8and0mse---\",\n\tencoder: \"ftxt:https://encoder-url\",\n\tcodelen: 500,\n\tmetadata: {\n\t\t\t\"key\": \"value\",\n\t}\n};\ndb.createDatabase(schema).then(dbName =\u003e {\n\t// done\n})\nhub.createDatabase(schema).then(dbNameHub =\u003e {\n\t// done\n})\n```\n\n## Create Document\n\n```ts\nconst dbName = 'db-name';\nconst data = ['Amazon', 'Google'];\nconst generatedCode = hub.compressDocument(dbName, data).then((generatedCode: as number[][]) =\u003e {\nconst docs: Document\u003cDocMetaData\u003e[] = [\n\t{\n\t\tmetadata: {\n\t\t\t\tname: \"name test\",\n\t\t\t\tage: 20\n\t\t},\n\t\tcode: generatedCode[0],\n\t},{\n\t\tmetadata: {\n\t\t\t\tname: \"name2 test\",\n\t\t\t\tage: 32\n\t\t},\n\t\tcode: generatedCode[1],\n\t}\n];\n\treturn db.createDocuments(dbName, docs)\n}).then(docs =\u003e {\n\t// succes\t\n});\n\t\n```\n\n## Search Documents\n\n```ts\nconst searchData = [[0.06443286, 0.106639  , 0.81865615]];\nconst resultCount = 10;\ndb.searchKDocuments\u003cDocMetaData\u003e(dbName[0], searchData, resultCount).then(result =\u003e {\n\t// success\n});\n```\n\n## Delete Document\n\n```ts\ndb.deleteDocuments(dbName[0], deleteIds).then(result =\u003e {\n// success\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAquila-Network%2FAquilaJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAquila-Network%2FAquilaJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAquila-Network%2FAquilaJS/lists"}