@canvas-js/chain-atp v0.8.27-patch.18
@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
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;
}
11 days ago
11 days ago
11 days ago
11 days ago
11 days ago
12 days ago
12 days ago
11 days ago
12 days ago
11 days ago
12 days ago
10 days ago
12 days ago
10 days ago
10 days ago
10 days ago
15 days ago
15 days ago
15 days ago
15 days ago
15 days ago
19 days ago
1 month ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago