SEP-10
Installation
deno add jsr:@colibri/sep10Quick Start
import { Sep10Client } from "@colibri/sep10";
import { StellarToml } from "@colibri/core";
import { Keypair } from "stellar-sdk";
// Fetch and parse stellar.toml
const toml = await StellarToml.fromDomain("anchor.example.com");
// Create client directly from StellarToml instance
const client = Sep10Client.fromToml(toml);
const keypair = Keypair.fromSecret("S...");
const jwt = await client.authenticate({
account: keypair.publicKey(),
signer: keypair,
});
// Use jwt.token for authenticated requestsSep10Client
Constructor
fromToml(toml, networkPassphrase?)
fromToml(toml, networkPassphrase?)authenticate(options)
authenticate(options)getChallenge(options)
getChallenge(options)submitChallenge(challenge)
submitChallenge(challenge)SEP10Challenge
fromXDR(xdr, networkPassphrase)
fromXDR(xdr, networkPassphrase)build(options)
build(options)Properties
Property
Type
Description
Methods
Verify Options
Sep10Jwt
fromToken(token)
fromToken(token)Properties
Property
Type
Description
Error Handling
Last updated