🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@stricahq/typhonjs

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stricahq/typhonjs

Pure JS Cardano Wallet library

3.0.0
latest
Source
npm
Version published
Weekly downloads
9.7K
-6.95%
Maintainers
0
Weekly downloads
 
Created
Source

@stricahq/typhonjs

Pure javascript Cardano wallet library.

  • Generate and work with Cardano addresses
  • Build complex transactions
  • Automatic UTXO selection
  • Metadata support
  • Plutus support
  • and much more

Installation

yarn/npm

yarn add @stricahq/typhonjs

Browser

<script src="[use jsDelivr or Unpkg]"></script>

// access typhonjs global variable

Key generation & Signing

Use @stricahq/bip32ed25519 for deriving keys and signing transaction with mnemonics

// see tests for building `transaction`
const txHash = transaction.getTransactionHash();
const requiredSignatures = transaction.getRequiredWitnesses();

// `accountPrivateKey` derive using @stricahq/bip32ed25519
for (const [, bipPath] of requiredSignatures) {
  const privateKey = accountPrivateKey.derive(bipPath.chain).derive(bipPath.index).toPrivateKey();
  const witness = {
    publicKey: privateKey.toPublicKey().toBytes(),
    signature: privateKey.sign(txHash),
  };
  transaction.addWitness(witness);
}

Usage Example

Checkout tests and API doc

API Doc

Find the API documentation here

Used by

Typhon Wallet

License

Copyright 2022 Strica

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Keywords

typhon

FAQs

Package last updated on 15 Feb 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