{"id":18556757,"url":"https://github.com/urbit/aura-js","last_synced_at":"2025-04-10T01:31:32.680Z","repository":{"id":40791068,"uuid":"487957388","full_name":"urbit/aura-js","owner":"urbit","description":"An NPM package for working with urbit atoms. Only @da supported for now","archived":false,"fork":false,"pushed_at":"2024-05-14T16:36:30.000Z","size":811,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T14:21:24.746Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/urbit.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-02T18:56:24.000Z","updated_at":"2024-05-14T16:36:34.000Z","dependencies_parsed_at":"2024-04-16T17:29:21.396Z","dependency_job_id":"fe5f2380-42a0-4b33-81e9-58219700c428","html_url":"https://github.com/urbit/aura-js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Faura-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Faura-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Faura-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbit%2Faura-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urbit","download_url":"https://codeload.github.com/urbit/aura-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140367,"owners_count":21054287,"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":[],"created_at":"2024-11-06T21:33:10.898Z","updated_at":"2025-04-10T01:31:27.666Z","avatar_url":"https://github.com/urbit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@urbit/aura`\n\nThis NPM package is intended to ease the flow of developing FE applications for urbit, by adding parsing and formatting functions for the various urbit auras\n\n## API\n\n```typescript\n// @da manipulation\nfunction parseDa(da: string): bigint;\nfunction formatDa(da: bigint): string;\n// Given a bigint representing an urbit date, returns a unix timestamp.\nfunction daToUnix(da: bigint): number;\n// Given a unix timestamp, returns a bigint representing an urbit date\nfunction unixToDa(unix: number): bigint;\n\n// @p manipulation\n// Convert a number to a @p-encoded string.\nfunction patp(arg: string | number | bigint): string;\nfunction hex2patp(hex: string): string;\nfunction patp2hex(name: string): string;\nfunction patp2bn(name: string): bigint;\nfunction patp2dec(name: string): string;\n// Determine the ship class of a @p value.\nfunction clan(who: string): string;\n// Determine the parent of a @p value.\nfunction sein(name: string): strin;\n// Validate a @p string.\nfunction isValidPatp(str: string): boolean;\n// Ensure @p is sigged.\nfunction preSig(ship: string): string;\n// Remove sig from @p\nfunction deSig(ship: string): string;\n// Trim @p to short form\nfunction cite(ship: string): string | null;\n\n// @q manipulation\n// Convert a number to a @q-encoded string.\nfunction patq(arg: string | number | bigint): string;\nfunction hex2patq(arg: string): string;\nfunction patq2hex(name: string): string;\nfunction patq2bn(name: string): bigint;\nfunction patq2dec(name: string): string;\n// Validate a @q string.\nfunction isValidPatq(str: string): boolean;\n// Equality comparison on @q values.\nfunction eqPatq(p: string, q: string): boolean;\n\n// @ud manipulation\nfunction parseUd(ud: string): bigint;\nfunction formatUd(ud: bigint): string;\n\n// @uv manipulation\nfunction parseUv(x: string): bigint;\nfunction formatUv(x: bigint | string): string;\n\n// @uw manipulation\nfunction parseUw(x: string): bigint;\nfunction formatUw(x: bigint | string): string;\n\n// @ux manipulation\nfunction parseUx(ux: string): string;\nfunction formatUx(hex: string): string;\n``;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbit%2Faura-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furbit%2Faura-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbit%2Faura-js/lists"}