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

@harmoniclabs/blockfrost-pluts

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@harmoniclabs/blockfrost-pluts

@blockfrost/blockfrost-js extension based on plu-ts types

  • 0.1.14
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@harmoniclabs/blockfrost-pluts

wrapper over the @blockfrost/blockfrost-js SDK based on the @harmoniclabs/cardano-ledger-ts types.

Installation

npm install @harmoniclabs/blockfrost-pluts

Quick start

Build you blockfrost provider and wrap it in a BlockfrostPluts instance

import { BlockFrostAPI } from "@blockfrost/blockfrost-js";
import { BlockfrostPluts } from "@harmoniclabs/blockfrost-pluts";

const api = new BlockFrostAPI({
    projectId: "YOUR API KEY HERE", // see: https://blockfrost.io
});

const provider = new BlockfrostPluts( api );

or directly pass the arguments to the wrapper class

import { BlockfrostPluts } from "@harmoniclabs/blockfrost-pluts";

const provider = new BlockfrostPluts({
    projectId: "YOUR API KEY HERE", // see: https://blockfrost.io
});

Usage with @harmoniclabs/plu-ts

the provider can be used with the transaction builder to get a TxBuilderRunner instance:

import { TxBuilder, defaultProtocolParameters } from "@harmoniclabs/plu-ts";
import { BlockfrostPluts } from "@harmoniclabs/blockfrost-pluts";

const txBuilder = new TxBuilder( defaultProtocolParameters );

const provider = new BlockfrostPluts({
    projectId: "YOUR API KEY HERE", // see: https://blockfrost.io
});

const txRunner = txBuilder.runWithProvider( provider );

which you can use to easly build transacitons

const tx = await txRunner
    .addInput(
        contractUtxo,
        "40" // redeemer ( CBOR for empty bytestring )
    )
    .attachValidator( contractSource ) // `Script` instance
    .payTo( myAddress, 5_000_000 ) // send 5 ADA
    .build()

Keywords

FAQs

Package last updated on 02 Aug 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