{"id":25590684,"url":"https://github.com/nemtus/symbol-sdk-openapi-generator-typescript-fetch","last_synced_at":"2025-04-12T22:45:37.818Z","repository":{"id":52309320,"uuid":"519963504","full_name":"nemtus/symbol-sdk-openapi-generator-typescript-fetch","owner":"nemtus","description":"Symbol SDK for TypeScript with OpenAPI Generator typescript-fetch","archived":false,"fork":false,"pushed_at":"2023-03-15T04:14:03.000Z","size":612,"stargazers_count":5,"open_issues_count":66,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T22:45:10.073Z","etag":null,"topics":["blockchain","cdn","fetch","javascript","npm-package","openapi-generator","sdk","symbol","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@nemtus/symbol-sdk-openapi-generator-typescript-fetch","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/nemtus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2022-08-01T04:31:23.000Z","updated_at":"2025-02-08T13:06:44.000Z","dependencies_parsed_at":"2023-02-08T08:31:04.852Z","dependency_job_id":null,"html_url":"https://github.com/nemtus/symbol-sdk-openapi-generator-typescript-fetch","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemtus%2Fsymbol-sdk-openapi-generator-typescript-fetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemtus%2Fsymbol-sdk-openapi-generator-typescript-fetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemtus%2Fsymbol-sdk-openapi-generator-typescript-fetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nemtus%2Fsymbol-sdk-openapi-generator-typescript-fetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nemtus","download_url":"https://codeload.github.com/nemtus/symbol-sdk-openapi-generator-typescript-fetch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643047,"owners_count":21138353,"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":["blockchain","cdn","fetch","javascript","npm-package","openapi-generator","sdk","symbol","typescript"],"created_at":"2025-02-21T09:22:53.353Z","updated_at":"2025-04-12T22:45:37.785Z","avatar_url":"https://github.com/nemtus.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# symbol-sdk-openapi-generator-typescript-fetch\n\nSymbol SDK for TypeScript with OpenAPI Generator typescript-fetch\n\nNote: Currently, This is a very experimental level.\n\n## For package users\n\n### Install\n\n```bash\nnpm install @nemtus/symbol-sdk-openapi-generator-typescript-fetch\n```\n\n### Usage\n\nExample with no requestParameters\n\n```typescript\nimport {\n  Configuration,\n  ConfigurationParameters,\n  NodeInfoDTO,\n  NodeRoutesApi,\n} from '@nemtus/symbol-sdk-openapi-generator-typescript-fetch';\n\nconst configurationParameters: ConfigurationParameters = {\n  basePath: 'https://symbol-sakura-16.next-web-technology.com:3001',\n};\nconst configuration: Configuration = new Configuration(configurationParameters);\nconst nodeRoutesApi: NodeRoutesApi = new NodeRoutesApi(configuration);\nconst response: NodeInfoDTO = await nodeRoutesApi.getNodeInfo();\nconsole.dir(response, { depth: null });\n/* Example: \n{\n  version: 16777987,\n  publicKey: 'B86304B01045894ED9250B3DCD6313DC2EC0DD529B4E864EA376A2F341D3CFD4',\n  networkGenerationHashSeed: '57F7DA205008026C776CB6AED843393F04CD458E0AA2D9F1D5F31A402072B2D6',\n  roles: 3,\n  port: 7900,\n  networkIdentifier: 104,\n  host: 'symbol-sakura-16.next-web-technology.com',\n  friendlyName: 'next-web-technology',\n  nodePublicKey: '9545F928A1B2FB4AC944BC1EC2F01FB84A503F6449B6BE3451B3F7A0F06B5BCF'\n}\n*/\n```\n\nExample with requestParameters\n\n```typescript\nimport {\n  AccountInfoDTO,\n  AccountRoutesApi,\n  AccountRoutesApiGetAccountInfoRequest,\n  Configuration,\n  ConfigurationParameters,\n} from '@nemtus/symbol-sdk-openapi-generator-typescript-fetch';\n\nconst configurationParameters: ConfigurationParameters = {\n  basePath: 'https://symbol-sakura-16.next-web-technology.com:3001',\n};\nconst configuration: Configuration = new Configuration(configurationParameters);\nconst accountRoutesApi: AccountRoutesApi = new AccountRoutesApi(configuration);\nconst requestParameters: AccountRoutesApiGetAccountInfoRequest = {\n  accountId: 'NCSIOEWE2364XXP65426W3RUGBRYOAGR3KMMCIA',\n};\nconst response: AccountInfoDTO = await accountRoutesApi.getAccountInfo(requestParameters);\nconsole.dir(response, { depth: null });\n// Example: \n/*\n{\n  account: {\n    version: 1,\n    address: '68A48712C4D6FDCBDDFEEF35EB6E3430638700D1DA98C120',\n    addressHeight: '1',\n    publicKey: 'B86304B01045894ED9250B3DCD6313DC2EC0DD529B4E864EA376A2F341D3CFD4',\n    publicKeyHeight: '447',\n    accountType: 1,\n    supplementalPublicKeys: {\n      linked: {\n        publicKey: '5F87A37D1EAD570F4D0FD4C11A9D5EED5ABE82EF2E992B97CCDAC84F241470E0'\n      },\n      vrf: {\n        publicKey: '806E9448598C922B371DA8CFD7E16E8F5F53594B3AECE13F0708778A4480A752'\n      }\n    },\n    activityBuckets: [\n      {\n        startHeight: '1447200',\n        totalFeesPaid: '0',\n        beneficiaryCount: 0,\n        rawScore: '476538883720'\n      },\n      {\n        startHeight: '1446480',\n        totalFeesPaid: '0',\n        beneficiaryCount: 1,\n        rawScore: '476509686441'\n      },\n      {\n        startHeight: '1445760',\n        totalFeesPaid: '0',\n        beneficiaryCount: 1,\n        rawScore: '476481049034'\n      },\n      {\n        startHeight: '1445040',\n        totalFeesPaid: '0',\n        beneficiaryCount: 1,\n        rawScore: '476353869759'\n      },\n      {\n        startHeight: '1444320',\n        totalFeesPaid: '0',\n        beneficiaryCount: 1,\n        rawScore: '476325431930'\n      }\n    ],\n    mosaics: [\n      { id: '6BED913FA20223F8', amount: '516203401572' },\n      { id: '24F7CF825DBCDD42', amount: '499999886' },\n      { id: '310378C18A140D1B', amount: '923' },\n      { id: '6AE25FA5E8CA0646', amount: '1000000000' }\n    ],\n    importance: '476509686441',\n    importanceHeight: '1447200'\n  },\n  id: '60517BE5CCA17918A561056D'\n}\n*/\n```\n\nExample with CDN\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\" /\u003e\n    \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eDocument\u003c/title\u003e\n    \u003c!-- Load from CDN or a single file bundled with webpack --\u003e\n    \u003cscript src=\"https://cdn.jsdelivr.net/npm/@nemtus/symbol-sdk-openapi-generator-typescript-fetch@0.1.0/index.min.js\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cscript\u003e\n      (async () =\u003e {\n        const symbolSdk = window.symbolSdkOpenAPIGeneratorTypeScriptFetch;\n        const configurationParameters = {\n          basePath: 'http://symbol-sakura-16.next-web-technology.com:3000',\n        };\n        const configuration = new symbolSdk.Configuration(configurationParameters);\n\n        const nodeRoutesApi = new symbolSdk.NodeRoutesApi(configuration);\n        const responseNodeInfo = await nodeRoutesApi.getNodeInfo();\n        console.log(responseNodeInfo);\n\n        const accountRoutesApi = new symbolSdk.AccountRoutesApi(configuration);\n        const requestParameters = {\n          accountId: 'NCSIOEWE2364XXP65426W3RUGBRYOAGR3KMMCIA',\n        };\n        const responseAccountInfo = await accountRoutesApi.getAccountInfo(requestParameters);\n        console.log(responseAccountInfo);\n      })();\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## For Developers\n\nIf you don't have java installed, you need to install it.\n\n### 1. Build openapi3.yml\n\nIf necessary update git submodule of `symbol-openapi`.\n\n```bash\ncd symbol-openapi\nnpm install\nnpm run build\n```\n\nUse symbol-openapi/_build/openapi3.yml to generate REST API client code.\n\n### 2. Generate REST API Client Code\n\n```bash\ncd ..\nnpm install\nnpm run openapi:set:version\nnpm run openapi:generate\nnpm run build\n```\n\nThen, REST API client code will be generated in `src/api`.\nDo not edit `src/api` manually.\n\n## We use\n\n- [symbol/symbol-openapi](https://github.com/symbol/symbol-openapi) to generate openapi3.yml\n- [OpenAPI Generator](https://openapi-generator.tech/) to generate REST API client codes\n  - Especially [typescript-fetch Generator](https://openapi-generator.tech/docs/generators/typescript-fetch)\n- [cosmos-client/cosmos-client-ts](https://github.com/cosmos-client/cosmos-client-ts) as a reference of package structure\n\nWe would like to thank all the contributors to the above tools.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemtus%2Fsymbol-sdk-openapi-generator-typescript-fetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnemtus%2Fsymbol-sdk-openapi-generator-typescript-fetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemtus%2Fsymbol-sdk-openapi-generator-typescript-fetch/lists"}