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

@canvas-js/chain-atp

Package Overview
Dependencies
Maintainers
0
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvas-js/chain-atp

The Bluesky/AT Protocol session signer prompts the user for an app password, and uses it to generate a new signed post on Bluesky, authenticating a new session. The posted authentication message is then immediately deleted.

  • 0.13.0-next.1
  • npm
  • Socket score

Version published
Weekly downloads
109
decreased by-22.14%
Maintainers
0
Weekly downloads
 
Created
Source

@canvas-js/chain-atp

The Bluesky/AT Protocol session signer prompts the user for an app password, and uses it to generate a new signed post on Bluesky, authenticating a new session. The posted authentication message is then immediately deleted.

It also handles verification of messages matching this authentication method.

Table of Contents

  • Installation
  • API

Installation

npm i @canvas-js/chain-atp

API

import type { Action, Message, Session, SessionSigner, Signature } from "@canvas-js/interfaces"
import { Operation } from "./operation.js"

export type ATPSessionData = {
  verificationMethod: string
  plcOperationLog: Operation[]
  recordArchive: Uint8Array
  recordURI: string
}

export interface ATPSignerOptions {
  login?: () => Promise<{
    identifier: string
    password: string
  }>
}

export declare class ATPSigner implements SessionSigner<ATPSessionData> {
  constructor(options?: ATPSignerOptions)

  static createAuthenticationMessage(topic: string, publicKey: string, address: string): string

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

FAQs

Package last updated on 09 Oct 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