UNPKG

@radixdlt/rola

Version:

Radix TypeScript ROLA library

33 lines (28 loc) 933 B
import { ResultAsync } from 'neverthrow'; import { GatewayApiClient } from '@radixdlt/babylon-gateway-api-sdk'; type SignedChallenge = { address: string; type: 'persona' | 'account'; challenge: string; proof: { publicKey: string; signature: string; curve: 'curve25519' | 'secp256k1'; }; }; type RolaError = { reason: string; jsError?: Error; }; type VerifyOwnerKeyOnLedgerFn = (address: string, publicKeyHex: string) => ResultAsync<undefined, RolaError>; type RolaInput = { expectedOrigin: string; dAppDefinitionAddress: string; applicationName: string; networkId: number; gatewayApiClient?: GatewayApiClient; }; declare const Rola: (input: RolaInput) => { verifySignedChallenge: (signedChallenge: SignedChallenge) => ResultAsync<void, RolaError>; }; export { Rola, type RolaError, type RolaInput, type SignedChallenge, type VerifyOwnerKeyOnLedgerFn };