Socket
Socket
Sign inDemoInstall

lit-pkp-cosmos

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lit-pkp-cosmos

Lit Protocol PKP/Cosmos <img src="https://img.shields.io/twitter/follow/litprotocol?label=Follow&style


Version published
Maintainers
1
Created
Source

Lit Protocol PKP/Cosmos




A small, complimentary package for CosmJS that allows PKPs to sign and send transactions on the Cosmos Network.

Install:

npm install lit-pkp-cosmos
yarn add lit-pkp-cosmos

Usage:

Instantiate a signer with the PKP public key, a valid auth sig of the owning wallet, and an RPC for the Cosmos Network.

import { SigningStargateClientWithLit } from "lit-pkp-cosmos";

const pkpCosmosSigner = await SigningStargateClientWithLit.createClient(
  pkpPubKey, // uncompressed public key
  pkpOwnerAuthSig, // authSig of the owning party
  rpc
);

An introduction to Lit Actions and PKPs

Mint PKPs here

To use, pass a valid Cosmos address, an amount, and fee. The fee must be hardcoded since the transactions cannot be simulated with PKPs.

  const txRes = await pkpCosmosSigner.sendTokens(
    recipientAddress
    [{denom: "uatom", amount: "100000"}],
    {
      amount: [{denom: "uatom", amount: "1000"}],
      gas: "100000",
    }
  );
  
  console.log('txRes', txRes)

CosmJS tutorial

CosmJS on Github

FAQs

Package last updated on 10 Mar 2023

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