npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@utxorpc/lucid-evolution-provider

v0.1.2

Published

lucid evolution provider for UTxORPC

Downloads

121

Readme

Forks Stars Contributors Issues Issues Closed

The Lucid Evolution UTxO RPC Provider offers a JavaScript/TypeScript interface for interacting with UTxO-based blockchains using Lucid Evolution. By leveraging gRPC and UTxO RPC, it allows developers to seamlessly integrate Cardano blockchain interactions into their decentralized applications (dApps).

🌟 Features

  • 🔗 Seamless Integration with Lucid: Works with the Lucid Evolution framework, providing a high-level API to build and sign Cardano transactions.
  • ⚡️ Efficient gRPC Communication: Uses gRPC for fast and efficient communication with UTxO blockchains.
  • 🛠 Flexible Provider Options: Can be used with a local node, hosted services, or any UTxO RPC-compliant provider.
  • 🔒 Secure Wallet Integration: Easily integrate wallets and securely sign transactions.
  • 🏗 Transaction Building: Create and sign complex transactions with the Lucid framework.

📦 Installation

To install the Lucid UTxO RPC Provider, use npm:

npm i @utxorpc/lucid-evolution-provider

You'll also need to install Lucid Evolution if you haven't already:

npm i @lucid-evolution/lucid

💡 Basic Usage

Here’s a simple example demonstrating how to use the Lucid UTxO RPC Provider with the Lucid SDK to interact with a Cardano blockchain:

import { U5C } from "@utxorpc/lucid-evolution-provider";
import { Lucid } from "@lucid-evolution/lucid";

async function main() {
    // Step #1: Set up the U5C provider with your server URL and API key
    const provider = new U5C({
        url: "http://localhost:50051", // Use your local or hosted UTxO RPC service
    });

    // Step #2: Initialize Lucid with the U5C provider and network (for now we'll use Preview network)
    const lucid = await Lucid(provider, "Preview");

    // Step #3: Select a wallet using a seed phrase (here's a sample working wallet)
    lucid.selectWallet.fromSeed("end link visit estate sock hurt crucial forum eagle earn idle laptop wheat rookie when hard suffer duty kingdom clerk glide mechanic debris jar");

    // Step #4: Get UTxOs from the wallet (Optional)
    const utxos = await lucid.wallet().getUtxos();
    console.log("UTxOs: ", utxos);

    // Step #5: Build and sign a transaction
    const tx = await lucid
        .newTx()
        .pay.ToAddress(await lucid.wallet().address(), { lovelace: 5000000n })
        .complete();

    const signedTx = await tx.sign.withWallet().complete();

    // Step #6: Submit the transaction to the blockchain
    const txHash = await signedTx.submit();
    console.log("Transaction Submitted: ", txHash);
}

main().catch(console.error);

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

👥 Join the Conversation

If you want to discuss UTxO RPC or get involved in the community, join the TxPipe Discord! There's a dedicated channel for UTxO RPC where you can connect with other developers, share ideas, and get support. You an also learn more about the Lucid Evolution communitiy with the link below!

👉 Join the TxPipe Discord here! 💬

👉 Join the Lucid Discord 💬