1.0.9 • Published 3 years ago

lit-pkp-cosmos v1.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago