JSPM

aleo-address-derivation

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q28275F
  • License MIT

Aleo address derivation from signature

Package Exports

  • aleo-address-derivation
  • aleo-address-derivation/dist/js/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aleo-address-derivation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Aleo Address Derivation

This package is a simple WASM module used for deriving addresses from Aleo signatures.

Installation

npm install aleo-address-derivation

Usage

const { initializeWasm, getAddressFromSignature } = require('aleo-address-derivation');

async function deriveAddress() {
  await initializeWasm();

  const signature = 'your_aleo_signature_here';
  try {
    const address = getAddressFromSignature(signature);
    console.log('Derived address:', address);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

deriveAddress();

API

initializeWasm()

Initializes the WASM module. This function must be called before using other functions.

getAddressFromSignature(signature: string): string

Derives an address from the given Aleo signature.

  • signature: Aleo signature (string)
  • Returns: Derived Aleo address (string)

Development

Requirements

  • Node.js (v14 or higher)
  • Rust
  • wasm-pack

Building the Project

  1. Clone the repository:

    git clone https://github.com/hoodrunio/aleo-address-derivation.git
    cd aleo-address-derivation
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Testing

node test.js

License

MIT

Contributing

We welcome contributions! Please open an issue before submitting a pull request.