Class Authenticate

Hierarchy

  • Authenticate

Constructors

  • Parameters

    • providers: {
          arweave?: default;
          ethereum?: Web3Provider;
          magic?: Web3Provider;
      }
      • Optional arweave?: default
      • Optional ethereum?: Web3Provider
      • Optional magic?: Web3Provider
    • Optional authOptions: AuthOptions

    Returns Authenticate

Properties

authOptions?: AuthOptions
auths: WalletAuth[] = []
providers: {
    arweave?: default;
    ethereum?: Web3Provider;
    magic?: Web3Provider;
}

Type declaration

  • Optional arweave?: default
  • Optional ethereum?: Web3Provider
  • Optional magic?: Web3Provider

Methods

  • Parameters

    • key: "ethereum" | "magic" | "arweave"
    • provider: default | Web3Provider

    Returns void

  • Deterministically produce a secret for DID production

    Parameters

    • address: string
    • connection: Connections
    • provider: {
          walletName: string;
          addToken(id: string): Promise<void>;
          connect(permissions: PermissionType[], appInfo?: AppInfo, gateway?: GatewayConfig): Promise<void>;
          decrypt(data: Uint8Array, options: {
              algorithm: string;
              hash: string;
              salt?: string;
          }): Promise<string>;
          disconnect(): Promise<void>;
          dispatch(transaction: default): Promise<DispatchResult>;
          encrypt(data: string, options: {
              algorithm: string;
              hash: string;
              salt?: string;
          }): Promise<Uint8Array>;
          getActiveAddress(): Promise<string>;
          getActivePublicKey(): Promise<string>;
          getAllAddresses(): Promise<string[]>;
          getArweaveConfig(): Promise<{
              host: string;
              port: number;
              protocol: "http" | "https";
          }>;
          getPermissions(): Promise<PermissionType[]>;
          getWalletNames(): Promise<{
              [addr: string]: string;
          }>;
          sign(transaction: default, options?: SignatureOptions): Promise<default>;
          signature(data: Uint8Array, algorithm: RsaPssParams | AlgorithmIdentifier | EcdsaParams): Promise<Uint8Array>;
      } | {
          signature: ((data: Uint8Array, algorithm: RsaPssParams) => Promise<Uint8Array>);
      }

    Returns Promise<WalletAuth>

  • Authenticate with Magic -- assumes that user is authenticated

    Create a DID for Magic Eth wallet. If no existing Magic wallet exists, create a JWK wallet and encrypt with Eth Signer Push the encrypted JWK wallet to Ceramic under a "MagicWallets" stream

    Returns Promise<WalletAuth>

Generated using TypeDoc