{"id":13455321,"url":"https://github.com/dao-xyz/borsh-ts","last_synced_at":"2025-10-01T09:30:30.003Z","repository":{"id":46013366,"uuid":"425460137","full_name":"dao-xyz/borsh-ts","owner":"dao-xyz","description":"⚡️fast TypeScript implementation of Borsh serialization format","archived":false,"fork":true,"pushed_at":"2024-05-19T11:34:49.000Z","size":369,"stargazers_count":42,"open_issues_count":15,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T01:20:58.549Z","etag":null,"topics":["borsh","borsh-js","near","solana"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"near/borsh-js","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dao-xyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2021-11-07T09:23:05.000Z","updated_at":"2025-01-10T06:35:41.000Z","dependencies_parsed_at":"2023-02-12T15:25:19.373Z","dependency_job_id":null,"html_url":"https://github.com/dao-xyz/borsh-ts","commit_stats":null,"previous_names":["the-solvei/borsh-ts","westake/borsh-ts"],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dao-xyz%2Fborsh-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dao-xyz%2Fborsh-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dao-xyz%2Fborsh-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dao-xyz%2Fborsh-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dao-xyz","download_url":"https://codeload.github.com/dao-xyz/borsh-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234845333,"owners_count":18895741,"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":["borsh","borsh-js","near","solana"],"created_at":"2024-07-31T08:01:03.899Z","updated_at":"2025-10-01T09:30:29.996Z","avatar_url":"https://github.com/dao-xyz.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"## borsh-ts monorepo\n\n[![Project license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Project license](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![NPM @dao-xyz/borsh](https://img.shields.io/npm/v/@dao-xyz/borsh.svg?style=flat-square)](https://npmjs.com/@dao-xyz/borsh)\n[![NPM @dao-xyz/borsh-rpc](https://img.shields.io/npm/v/@dao-xyz/borsh-rpc.svg?style=flat-square)](https://npmjs.com/@dao-xyz/borsh-rpc)\n\nTwo packages:\n\n- @dao-xyz/borsh — Core Borsh serializer with decorators.\n- @dao-xyz/borsh-rpc — Lightweight RPC over Borsh.\n\nThis root README gives a quick taste. Full documentation lives in each subpackage README.\n\n## Package: @dao-xyz/borsh\n\n```ts\nimport { deserialize, field, serialize } from \"@dao-xyz/borsh\";\n\nclass User {\n\t@field({ type: \"u32\" })\n\tid: number;\n\t@field({ type: \"string\" })\n\tname: string;\n\n\tconstructor(init: User) {\n\t\tthis.id = init.id;\n\t\tthis.name = init.name;\n\t}\n}\n\nconst bytes = serialize(new User({ id: 1, name: \"alice\" }));\nconst u = deserialize(bytes, User);\n```\n\nFull docs: [./packages/borsh/README.md](./packages/borsh/README.md)\n\n## EXPERIMENTAL: Package: @dao-xyz/borsh-rpc\n\n```ts\nimport { field } from \"@dao-xyz/borsh\";\nimport {\n\tLoopbackPair,\n\tbindService,\n\tcreateProxyFromService,\n\tmethod,\n\tservice,\n} from \"@dao-xyz/borsh-rpc\";\n\nclass Payload {\n\t@field({ type: \"u8\" })\n\tx = 0;\n}\n\n@service()\nclass API {\n\t@method({ args: \"u32\", returns: \"u32\" })\n\taddOne(n: number) {\n\t\treturn n + 1;\n\t}\n}\n\nconst loop = new LoopbackPair();\nconst unsub = bindService(API, loop.a);\nconst client = createProxyFromService(API, loop.b);\nawait client.addOne(41); // 42\nunsub();\n```\n\nFull docs: [./packages/rpc/README.md](./packages/rpc/README.md)\n\n## Development\n\n```bash\nyarn install\nyarn build\nyarn workspaces:test\n```\n\n## License\n\nApache-2.0 and MIT. See LICENSE files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdao-xyz%2Fborsh-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdao-xyz%2Fborsh-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdao-xyz%2Fborsh-ts/lists"}