{"id":29068867,"url":"https://github.com/aspectron/sia-api","last_synced_at":"2025-08-27T03:03:10.080Z","repository":{"id":57359118,"uuid":"58813682","full_name":"aspectron/sia-api","owner":"aspectron","description":null,"archived":false,"fork":false,"pushed_at":"2016-06-29T23:12:01.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T16:02:06.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aspectron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-14T14:59:04.000Z","updated_at":"2022-05-17T14:38:10.000Z","dependencies_parsed_at":"2022-09-06T22:21:59.863Z","dependency_job_id":null,"html_url":"https://github.com/aspectron/sia-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aspectron/sia-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspectron%2Fsia-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspectron%2Fsia-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspectron%2Fsia-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspectron%2Fsia-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aspectron","download_url":"https://codeload.github.com/aspectron/sia-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspectron%2Fsia-api/sbom","scorecard":{"id":212784,"data":{"date":"2025-08-11","repo":{"name":"github.com/aspectron/sia-api","commit":"2ffdb0989005f0cb9671662d4ed07a9d86c032b3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 1/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T01:03:50.590Z","repository_id":57359118,"created_at":"2025-08-17T01:03:50.591Z","updated_at":"2025-08-17T01:03:50.591Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272144624,"owners_count":24881140,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-06-27T11:09:31.733Z","updated_at":"2025-08-27T03:03:10.051Z","avatar_url":"https://github.com/aspectron.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sia API\r\n\r\n[![dependencies Status](https://david-dm.org/aspectron/sia-api.svg)](https://david-dm.org/aspectron/sia-api#info=dependencies)\r\n[![license:mit](https://img.shields.io/badge/license-mit-blue.svg)](https://opensource.org/licenses/MIT)\r\n\r\nNodeJs API for [Sia](http://sia.tech) - the decentralized cloud storage platform.\r\n\r\nThis module converts HTTP API paths exposed by the Sia REST API to NodeJs function calls arranged in an object hierarchy.\r\n\r\n## Installation\r\n\r\n`npm install sia-api`\r\n\r\n\r\n## Documentation\r\n\r\nEach Sia REST API call is enveloped into a function call using `request` module. API paths are converted to hierarchy of objects containing API function calls as follows:\r\n\r\n```\r\nGET: /renter/allowance\r\n\r\nbecomes\r\n\r\nsia.renter.allowance(\u003ccallback\u003e)\r\n```\r\n\r\nBy default, each function call is bount to `HTTP GET` method.  So `sia.renter.allowance()` executes `HTTP GET /renter/allowance`.  Each function call, however, can be overridden by explicitly calling `.get()` or `.post()` on the function as follows:\r\n\r\n```\r\nsia.renter.allowance(\u003ccallback\u003e)  \t\t// default GET\r\nsia.renter.allowance.get(\u003ccallback\u003e)\t// explicit GET\r\nsia.renter.allowance.post(\u003cpost args object\u003e, \u003ccallback\u003e)\t// explicit POST\r\n```\r\n\r\nIf an API call requires a sub-path to be provided to the HTTP call, the first argument to the function must be the string containing this sub-path.  For example:\r\n\r\n```\r\nGET: /wallet/transaction/bcf9922a9be02b0b4d1b3a2379054fb1c7113b1ac7006c03f93d7af6b440d172\r\n\r\n```\r\nmust be called as follows:\r\n```\r\nsia.wallet.transaction(\"bcf9922a9be02b0b4d1b3a2379054fb1c7113b1ac7006c03f93d7af6b440d172\", \r\n\tfunction(err, resp) { ... })\r\n```\r\n\r\n`headers` and `timeout` arguments to the underlying `request` calls can be specified by an additional argument to the function before the callback argument:\r\n\r\n```\r\nsia.wallet.unlock({ timeout : 5 * 60 * 1000 }, \u003ccallback\u003e)\r\n```\r\n\r\n## Creating Sia Module Instance\r\n\r\nTo create Sia module instance you must do the following:\r\n\r\n```\r\nvar Sia = require(\"sia-api\");\r\n\r\nvar sia = new Sia({\r\n\thost : \"http://localhost:9980\",\r\n\t// other constructor arguments\r\n})\r\n```\r\n\r\nOther constructor arguments:\r\n\r\n* `verbose` - Outputs request arguments and return data to console\r\n* `timeout` - Default timeout value for request HTTP calls (milliseconds)\r\n* `rpcServer` - iris-rpc server object (for iris-rpc relay)\r\n* `rpcClient` - iris-rpc client object (for iris-rpc relay)\r\n* `rpcUUID` - iris-rpc UUID when using iris-rpc multiplexer\r\n\r\nThis Sia API module supports call routing through iris-rpc, an RPC library that is a part of an [IRIS Application Framework](https://github.com/aspectron/iris-app)\r\n\r\n\r\n## Usage Example\r\n\r\n```\r\nvar sia = new Sia({\r\n\thost : \"http://localhost:9980\",\r\n})\r\n\r\n\r\nsia.daemon.version(function(err, resp) {\r\n\tif(err)\r\n\t\tconsole.log(err);\r\n\telse\r\n\t\tconsole.log(\"Sia daemon version:\", resp.version);\r\n})\r\n\r\n```\r\n\r\nSample script listing active Sia hosts and average network pricing: https://github.com/aspectron/sia-hosts\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspectron%2Fsia-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faspectron%2Fsia-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspectron%2Fsia-api/lists"}