signify-ts
    Preparing search index...

    Class SignifyClient

    An in-memory key manager that can connect to a KERIA Agent and use it to receive messages and act as a proxy for multi-signature operations and delegation operations.

    Index

    Constructors

    • SignifyClient constructor

      Parameters

      • url: string

        KERIA admin interface URL

      • bran: string

        Base64 21 char string that is used as base material for seed of the client AID

      • tier: KeriaApi.Tier = Tier.low

        Security tier for generating keys of the client AID (high | mewdium | low)

      • bootUrl: string = DEFAULT_BOOT_URL

        KERIA boot interface URL

      • externalModules: ExternalModule[] = []

        list of external modules to load

      • authMode: AuthMode = AuthMode.SignedHeaders

      Returns SignifyClient

    Properties

    agent: null | Agent
    authMode: AuthMode
    authn: null | Authenticator
    bootUrl: string
    bran: string
    controller: Controller
    exteralModules: ExternalModule[]
    manager: null | IdentifierManagerFactory
    pidx: number
    url: string

    Accessors

    Methods

    • Connect to an existing KERIA Agent and restore its in-memory Controller, load agent state, and initialize authenticated client services.

      Parameters

      Returns Promise<void>

    • Create a Signed Request to fetch a resource from an external URL with headers signed by an AID

      Parameters

      • aidName: string

        Name or alias of the AID to be used for signing

      • url: string

        URL of the requested resource

      • req: RequestInit

        Request options should include: - method: HTTP method - data Data to be sent in the body of the resource. If the data is a CESR JSON string then you should also set contentType to 'application/json+cesr' If the data is a FormData object then you should not set the contentType and the browser will set it to 'multipart/form-data' If the data is an object then you should use JSON.stringify to convert it to a string and set the contentType to 'application/json' - contentType Content type of the request.

      Returns Promise<Request>

      A promise to the created Request

    • Fetch a resource from the KERIA agent

      Parameters

      • path: string

        Path to the resource

      • method: string

        HTTP method

      • Optionaldata: unknown

        Data to be sent in the body of the resource

      • OptionalextraHeaders: Headers

        Optional extra headers to be sent with the request

      Returns Promise<Response>

      A promise to the result of the fetch

    • Rotate the client AID

      Parameters

      • nbran: string

        Base64 21 char string that is used as base material for the new seed

      • aids: string[]

        List of managed AIDs to be rotated

      Returns Promise<Response>

      A promise to the result of the rotation