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

@canvas-js/chain-cosmos

Package Overview
Dependencies
Maintainers
0
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvas-js/chain-cosmos

The Cosmos session signer takes an injected Cosmos signer, which may be an `EthereumSigner`, `AminoSigner`, or `BytesSigner`, and uses it to authenticate a new session.

  • 0.12.3-next.3
  • npm
  • Socket score

Version published
Weekly downloads
365
increased by14.42%
Maintainers
0
Weekly downloads
 
Created
Source

@canvas-js/chain-cosmos

The Cosmos session signer takes an injected Cosmos signer, which may be an EthereumSigner, AminoSigner, or BytesSigner, and uses it to authenticate a new session.

It also handles verification of messages matching any of these authentication methods.

Table of Contents

  • Installation
  • API

Installation

npm i @canvas-js/chain-cosmos

API

import type { Signature, SessionSigner, Action, Message, Session } from "@canvas-js/interfaces"
import { CosmosSessionData, ExternalCosmosSigner } from "./types.js"
export interface CosmosSignerInit {
  signer?: ExternalCosmosSigner
  sessionDuration?: number
  bech32Prefix?: string
}
export declare class CosmosSigner implements SessionSigner {
  constructor({ signer, sessionDuration, bech32Prefix }?: CosmosSignerInit)

  readonly match: (address: string) => boolean
  verifySession(topic: string, session: Session): Promise<void>
  getSession(
    topic: string,
    options?: {
      timestamp?: number
      fromCache?: boolean
    },
  ): Promise<Session<CosmosSessionData>>
  sign(message: Message<Action | Session>): Signature
  clear(topic: string): Promise<void>
}

FAQs

Package last updated on 05 Nov 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