New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@canvas-js/chain-cosmos

Package Overview
Dependencies
Maintainers
3
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvas-js/chain-cosmos - npm Package Compare versions

Comparing version 0.8.15 to 0.8.16

1

lib/CosmosSigner.d.ts

@@ -10,2 +10,3 @@ import type { Signature, SessionSigner, Action, Message, Session } from "@canvas-js/interfaces";

#private;
readonly key: string;
readonly sessionDuration: number | null;

@@ -12,0 +13,0 @@ private readonly log;

@@ -44,2 +44,3 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {

this.sessionDuration = sessionDuration ?? null;
this.key = `CosmosSigner-${signer ? "signer-" + signer.type : "burner"}`;
}

@@ -46,0 +47,0 @@ async verifySession(topic, session) {

6

package.json
{
"name": "@canvas-js/chain-cosmos",
"version": "0.8.15",
"version": "0.8.16",
"type": "module",

@@ -19,4 +19,4 @@ "author": "Canvas Technologies, Inc. (https://canvas.xyz)",

"dependencies": {
"@canvas-js/interfaces": "0.8.15",
"@canvas-js/signed-cid": "0.8.15",
"@canvas-js/interfaces": "0.8.16",
"@canvas-js/signed-cid": "0.8.16",
"@cosmjs/amino": "^0.30.1",

@@ -23,0 +23,0 @@ "@cosmjs/crypto": "^0.30.1",

# @canvas-js/chain-cosmos
TBD
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](#installation)
- [API](#api)
## Installation
```
npm i @canvas-js/chain-cosmos
```
## API
```ts
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>;
}
```
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