Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wingriders/dex-serializer

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wingriders/dex-serializer

Includes support for smart contract datum types for WingRiders. Uses `@dcspark/cardano-multiplatform-lib` as a serializer and for support for cardano-specific datum types. (it's a drop-in replacemenet for `cardano-serialization-lib`)

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

EXPERIMENTAL WingRiders serializer

Includes support for smart contract datum types for WingRiders. Uses @dcspark/cardano-multiplatform-lib as a serializer and for support for cardano-specific datum types. (it's a drop-in replacemenet for cardano-serialization-lib)

Installation

Install the package with:

npm install @wingriders/dex-serializer

Usage

import { LiquidityPoolDatum } from "@wingriders/dex-serializer";

const lpDatumHexString = await fetch(/* fetch the lp datum corresponding to an LP utxo */);
try {
  const lp = LiquidityPoolDatum.from_hex(lpDatumHex);

  // get the concatenated policyId and token name (subject) for the asset - can be looked up in explorers
  const assetBSubject = lp.assetB.to_subject();

  /* ... */
} catch (err) {
  // invalid lp datum
}

Known issues

  • serialization lib conflicting types between nodejs and browser versions (the es module is built for browers, the commonjs is built for nodejs)
  • Orders: only swap is supported for now

Development

npm install
npm run build

FAQs

Package last updated on 11 Sep 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc