TypeScript Types

Othent exported TypeScript types.

Events

See Events.

type OthentEventType = "auth" | "error"
type AuthListener = (
    userDetails: UserDetails | null,
    isAuthenticated: boolean,
) => void;
type ErrorListener = (err: Error | OthentError) => void;

Dispatch

See dispatch();

interface DispatchOptions {
  arweave?: Arweave;
  node?: UrlString;
}
interface ArDriveBundledTransactionResponseData {
  id: string;
  timestamp: number;
  winc: string;
  version: string;
  deadlineHeight: number;
  dataCaches: string[];
  fastFinalityIndexes: string[];
  public: string;
  signature: string;
  owner: string;
}

DataItem

See signDataItem();

See constructor() and config.

See getUserDetails().

These types are only exported for backwards compatibility with @othent/kms version 1.X.X and to facilitate the migration to version 2 for those that might have stored this BufferObject entity.

Note that the DispatchResult, AppInfo and DateItem types defined in arconnect / arconnectio/types are not exported as Othent overrides and extends them.

An enum OthentErrorID and class OthentError (extends Error) are exported from error.ts.

See Error Handling.

Last updated