Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AppConfig

Configuration data for the current app.

On browser platforms, creating an instance of this class without any arguments will use window.location.origin as the app domain. On non-browser platforms, you need to specify an app domain as the second argument.

Hierarchy

  • AppConfig

Index

Constructors

  • new AppConfig(scopes?: string[], appDomain?: undefined | string, redirectPath?: string, manifestPath?: string, coreNode?: undefined | string, authenticatorURL?: string): AppConfig
  • Parameters

    • scopes: string[] = ...

      permissions this app is requesting

    • appDomain: undefined | string = ...

      the app domain

    • redirectPath: string = ''

      path on app domain to redirect users to after authentication

    • manifestPath: string = '/manifest.json'

      path relative to app domain of app's manifest file

    • coreNode: undefined | string = undefined

      override the default or user selected core node

    • authenticatorURL: string = DEFAULT_BLOCKSTACK_HOST

      the web-based fall back authenticator (DEFAULT_BLOCKSTACK_HOST)

    Returns AppConfig

Properties

appDomain?: string

Blockstack apps are uniquely identified by their app domain.

authenticatorURL?: string

The URL of a web-based Blockstack Authenticator to use in the event the user doesn't have Blockstack installed on their machine. If this is not specified, the current default in this library will be used.

coreNode?: string

The URL of Blockstack core node to use for this app. If this is null, the core node specified by the user or default core node will be used.

manifestPath: string

Path relative to app domain of app's manifest file.

This file needs to have CORS headers set so that it can be fetched from any origin. Typically this means return the header Access-Control-Allow-Origin: *.

redirectPath: string

Path on app domain to redirect users to after authentication. The authentication response token will be postpended in a query.

scopes: string[]

An array of string representing permissions requested by the app.

Methods

  • manifestURI(): string
  • The location of the app's manifest file.

    Returns string

    • URI
  • redirectURI(): string
  • The location to which the authenticator should redirect the user.

    Returns string

    • URI

Generated using TypeDoc