From e63006863a3d8382887573402873632a25594464 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Wed, 12 Apr 2023 20:58:00 -0500 Subject: [PATCH] meta: update version and docs --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de55456..68378e7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # `@urbit/aura` -This 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 +This 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 ## API @@ -8,5 +8,54 @@ This NPM package is intended to ease the flow of developing FE applications for // @da manipulation function parseDa(da: string): BigInteger function formatDa(da: BigInteger): string + +// @p manipulation +// Convert a number to a @p-encoded string. +function patp(arg: string | number | BigInteger): string +function hex2patp(hex: string): string +function patp2hex(name: string): string +function patp2bn(name: string): BigInteger +function patp2dec(name: string): string +// Determine the ship class of a @p value. +function clan(who: string): string +// Determine the parent of a @p value. +function sein(name: string): strin +// Validate a @p string. +function isValidPatp(str: string): boolean +// Ensure @p is sigged. +function preSig(ship: string): string +// Remove sig from @p +function deSig(ship: string): string +// Trim @p to short form +function cite(ship: string): string | null + +// @q manipulation +// Convert a number to a @q-encoded string. +function patq(arg: string | number | BigInteger): string +function hex2patq(arg: string): string +function patq2hex(name: string): string +function patq2bn(name: string): BigInteger +function patq2dec(name: string): string +// Validate a @q string. +const isValidPatq = (str: string): boolean +// Equality comparison on @q values. +function eqPatq(p: string, q: string): boolean + +// @ud manipulation +function parseUd(ud: string): BigInteger +function formatUd(ud: BigInteger): string + +// @uv manipulation +function parseUv(x: string): BigInteger +function formatUv(x: BigInteger | string): string + +// @uw manipulation +function parseUw(x: string): BigInteger +function formatUw(x: BigInteger | string): string + +// @ux manipulation +function parseUx(ux: string): string +function formatUx(hex: string): string `` +``` diff --git a/package.json b/package.json index 26d8563..df67423 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.6.0", + "version": "1.0.0", "license": "MIT", "name": "@urbit/aura", "author": "Liam Fitzgerald",