{"id":30621343,"url":"https://github.com/syscoin/syscoin-libjs","last_synced_at":"2025-12-12T03:58:44.951Z","repository":{"id":25154634,"uuid":"28577225","full_name":"syscoin/syscoin-libjs","owner":"syscoin","description":"AngularJS service to support communicating with the daemon through the new builtin HTTP proxy server.","archived":false,"fork":false,"pushed_at":"2018-09-14T18:21:42.000Z","size":526,"stargazers_count":3,"open_issues_count":0,"forks_count":7,"subscribers_count":18,"default_branch":"develop","last_synced_at":"2025-08-08T22:54:06.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/syscoin.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":"2014-12-29T02:16:52.000Z","updated_at":"2018-08-10T01:52:44.000Z","dependencies_parsed_at":"2022-09-04T02:51:13.406Z","dependency_job_id":null,"html_url":"https://github.com/syscoin/syscoin-libjs","commit_stats":null,"previous_names":["syscoin/syscoin-client-api-typescript-angular2","syscoin/angular-syscoin"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/syscoin/syscoin-libjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syscoin%2Fsyscoin-libjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syscoin%2Fsyscoin-libjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syscoin%2Fsyscoin-libjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syscoin%2Fsyscoin-libjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syscoin","download_url":"https://codeload.github.com/syscoin/syscoin-libjs/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syscoin%2Fsyscoin-libjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272854138,"owners_count":25004388,"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-30T02:00:09.474Z","response_time":77,"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-08-30T14:28:04.355Z","updated_at":"2025-12-12T03:58:44.903Z","avatar_url":"https://github.com/syscoin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## @\n\n### Building\n\nTo install the required dependencies and to build the typescript sources run:\n```\nnpm install\nnpm run build\n```\n\n### publishing\n\nFirst build the package than run ```npm publish```\n\n### consuming\n\nNavigate to the folder of your consuming project and run one of next commands.\n\n_published:_\n\n```\nnpm install @ --save\n```\n\n_without publishing (not recommended):_\n\n```\nnpm install PATH_TO_GENERATED_PACKAGE --save\n```\n\n_using `npm link`:_\n\nIn PATH_TO_GENERATED_PACKAGE:\n```\nnpm link\n```\n\nIn your project:\n```\nnpm link \n```\n\n__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.\nPlease refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround.\nPublished packages are not effected by this issue.\n\n\n#### General usage\n\nIn your Angular project:\n\n\n```\n// without configuring providers\nimport { ApiModule } from '';\nimport { HttpClientModule } from '@angular/common/http';\n\n\n@NgModule({\n    imports: [\n        ApiModule,\n        // make sure to import the HttpClientModule in the AppModule only,\n        // see https://github.com/angular/angular/issues/20575\n        HttpClientModule\n    ],\n    declarations: [ AppComponent ],\n    providers: [],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n```\n// configuring providers\nimport { ApiModule, Configuration, ConfigurationParameters } from '';\n\nexport function apiConfigFactory (): Configuration =\u003e {\n  const params: ConfigurationParameters = {\n    // set configuration parameters here.\n  }\n  return new Configuration(params);\n}\n\n@NgModule({\n    imports: [ ApiModule.forRoot(apiConfigFactory) ],\n    declarations: [ AppComponent ],\n    providers: [],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n```\nimport { DefaultApi } from '';\n\nexport class AppComponent {\n\t constructor(private apiGateway: DefaultApi) { }\n}\n```\n\nNote: The ApiModule is restricted to being instantiated once app wide.\nThis is to ensure that all services are treated as singletons.\n\n#### Using multiple swagger files / APIs / ApiModules\nIn order to use multiple `ApiModules` generated from different swagger files,\nyou can create an alias name when importing the modules\nin order to avoid naming conflicts:\n```\nimport { ApiModule } from 'my-api-path';\nimport { ApiModule as OtherApiModule } from 'my-other-api-path';\nimport { HttpClientModule } from '@angular/common/http';\n\n\n@NgModule({\n  imports: [\n    ApiModule,\n    OtherApiModule,\n    // make sure to import the HttpClientModule in the AppModule only,\n    // see https://github.com/angular/angular/issues/20575\n    HttpClientModule\n  ]\n})\nexport class AppModule {\n\n}\n```\n\n\n### Set service base path\nIf different than the generated base path, during app bootstrap, you can provide the base path to your service. \n\n```\nimport { BASE_PATH } from '';\n\nbootstrap(AppComponent, [\n    { provide: BASE_PATH, useValue: 'https://your-web-service.com' },\n]);\n```\nor\n\n```\nimport { BASE_PATH } from '';\n\n@NgModule({\n    imports: [],\n    declarations: [ AppComponent ],\n    providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ],\n    bootstrap: [ AppComponent ]\n})\nexport class AppModule {}\n```\n\n\n#### Using @angular/cli\nFirst extend your `src/environments/*.ts` files by adding the corresponding base path:\n\n```\nexport const environment = {\n  production: false,\n  API_BASE_PATH: 'http://127.0.0.1:8080'\n};\n```\n\nIn the src/app/app.module.ts:\n```\nimport { BASE_PATH } from '';\nimport { environment } from '../environments/environment';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [ ],\n  providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }],\n  bootstrap: [ AppComponent ]\n})\nexport class AppModule { }\n```  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyscoin%2Fsyscoin-libjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyscoin%2Fsyscoin-libjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyscoin%2Fsyscoin-libjs/lists"}