Socket
Book a DemoInstallSign in
Socket

@urbit/aura

Package Overview
Dependencies
Maintainers
10
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@urbit/aura

Hoon literal syntax parsing and rendering. Approaching two nines of parity with hoon stdlib.

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
185
41.22%
Maintainers
10
Weekly downloads
 
Created
Source

@urbit/aura

Hoon literal syntax parsing and rendering. Approaching two nines of parity with hoon stdlib.

Supports all standard auras (except @dr and @uc).

API overview

Atoms are native bigints. Top-level library functions reflect the hoon stdlib. Aliases are provided for your comfort. Summary of exports below.

Parsing

const parse = slav;
const tryParse = slaw;
function valid(:aura, :string): boolean;
function slav(:aura, :string): bigint;  //  throws on failure
function slaw(:aura, :string): bigint | null;
function nuck(:string): coin | null;

Rendering

const render = scot;
function scot(:aura, :bigint): string;
function rend(:coin): string;

Utilities

We provide some utilities for desirable operations on specific auras. These too generally match their hoon stdlib equivalents.

const da = {
  function toUnix(:bigint): number,
  function fromUnix(:number): bigint,
};
const p = {
  type rank = 'czar'   | 'king' | 'duke'   | 'earl' | 'pawn',
  type size = 'galaxy' | 'star' | 'planet' | 'moon' | 'comet',
  function cite(:bigint | string): string,
  function sein(:bigint): bigint,
  function sein(:string): string,  //  throws on bad input
  function clan(:bigint | string): rank,  //  throws on bad input
  function kind(:bigint | string): size,  //  throws on bad input
  function rankToSize(:rank): size,
  function sizeToRank(:size): rank,
};

FAQs

Package last updated on 19 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts