Options
All
  • Public
  • Public/Protected
  • All
Menu

@moonlight-io/asteroid-sdk-js

Index

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

Address

Address: string

AttributeClaimState

AttributeClaimState: "pending" | "needs attention" | "verified"

AttributeDateStatus

AttributeDateStatus: "" | "current"

ClaimTaskResponse

ClaimTaskResponse: EmptyObject

ConnectionNetworkType

ConnectionNetworkType: "stage" | "production"

CreateAttributesResponse

CreateAttributesResponse: UserAttributesResponse

DeleteAttributesResponse

DeleteAttributesResponse: UserAttributesResponse

DeleteProfilePrivResponse

DeleteProfilePrivResponse: EmptyObject

DeleteProfileResponse

DeleteProfileResponse: EmptyObject

EncryptionMethod

EncryptionMethod: "unencrypted" | "root_ecies" | "holder_ecies" | "symmetric_aes256"

GetAttributeHeadersByTypesResponse

GetAttributeHeadersByTypesResponse: UserAttributeHeadersResponse

GetAttributesByIdsResponse

GetAttributesByIdsResponse: UserAttributesResponse

GetPrivViewsRequest

GetPrivViewsRequest: GetPrivUniqueViewsRequest

GetPrivViewsResponse

GetPrivViewsResponse: GetPrivUniqueViewsResponse

GetPrivViewsSeriesRequest

GetPrivViewsSeriesRequest: GetPrivUniqueViewsRequest

GetProfileUniqueViewsResponse

GetProfileUniqueViewsResponse: GetPrivUniqueViewsResponse

GetProfileViewsRequest

GetProfileViewsRequest: GetProfileUniqueViewsRequest

GetProfileViewsResponse

GetProfileViewsResponse: GetPrivUniqueViewsResponse

GetProfileViewsSeriesRequest

GetProfileViewsSeriesRequest: GetProfileUniqueViewsRequest

GetProfileViewsSeriesResponse

GetProfileViewsSeriesResponse: GetPrivViewsSeriesResponse

GetTaskByIdResponse

GetTaskByIdResponse: ClaimTaskItem

GetUnclaimedTaskResponse

GetUnclaimedTaskResponse: ClaimTaskItem

Identity

Identity: string

LoginEmailResponse

LoginEmailResponse: LoginResponse

LoginOauthResponse

LoginOauthResponse: LoginResponse

LogoutResponse

LogoutResponse: EmptyObject

MailingListUnsubscribeResponse

MailingListUnsubscribeResponse: EmptyObject

PlatformType

PlatformType: "neo"

ProfileType

ProfileType: "personal_profile" | "application_profile" | "business_profile"

PublicKey

PublicKey: string

QuarantineTaskResponse

QuarantineTaskResponse: EmptyObject

RegisterEmailResponse

RegisterEmailResponse: EmptyObject

RegisterInterestResponse

RegisterInterestResponse: EmptyObject

RegisterWorkerResponse

RegisterWorkerResponse: EmptyObject

ReissueClaimResponse

ReissueClaimResponse: EmptyObject

RequestPasswordResetResponse

RequestPasswordResetResponse: EmptyObject

ResetTaskResponse

ResetTaskResponse: EmptyObject

ResolveTaskResponse

ResolveTaskResponse: EmptyObject

ScriptHash

ScriptHash: string

ScriptInvocationResponse

ScriptInvocationResponse: any

SendProfileTokenByEmailResponse

SendProfileTokenByEmailResponse: EmptyObject

SetDisableRegistrationResponse

SetDisableRegistrationResponse: EmptyObject

SetUserGroupByEmailResponse

SetUserGroupByEmailResponse: EmptyObject

UnclaimTaskResponse

UnclaimTaskResponse: EmptyObject

UpdateAttributesResponse

UpdateAttributesResponse: UserAttributesResponse

UpdatePasswordJwtResponse

UpdatePasswordJwtResponse: EmptyObject

UpdatePasswordResponse

UpdatePasswordResponse: EmptyObject

UpdatePasswordTokenType

UpdatePasswordTokenType: "NewAccount" | "PasswordReset"

UpdateProfilePrivResponse

UpdateProfilePrivResponse: EmptyObject

UpdateProfileResponse

UpdateProfileResponse: EmptyObject

UserAcademicAttribute

UserAccomplishmentAttribute

UserAddressAttribute

UserAliasAttribute

UserAttribute

UserAttributesLog

UserAvatarAttribute

UserDescriptionAttribute

UserEmailAttribute

UserExtracurricularAttribute

UserLog

UserMembershipAttribute

UserNameAttribute

UserOauthAttribute

UserOverviewAttribute

UserPositionAttribute

UserPreferencesAttribute

UserServiceOauthAttribute

UserSessionLog

UserSkillAttribute

UserSocialLinkAttribute

UserStatementAttribute

UserTelephoneAttribute

UserTitleAttribute

VividCreateProfilePrivCodeResponse

VividCreateProfilePrivCodeResponse: VividCreateProfileResponse

VividRegisterEmailResponse

VividRegisterEmailResponse: EmptyObject

WIF

WIF: string

Variables

BuildUrl

BuildUrl: BuildUrl

Const MODULE_NAME

MODULE_NAME: "Asteroid" = "Asteroid"

Const inverseClaimEncryptionModes

inverseClaimEncryptionModes: EncryptionMethod[] = ['unencrypted', 'symmetric_aes256']

Const neonJs

neonJs: "/home/circleci/repo/node_modules/@cityofzion/neon-js/dist/index" = Neon

Functions

getDecryptedClaim

  • attempts to decrypt a claim payload using a seed for input. This method will attempt to access the seed's keychain for reference data when digesting claim attestations

    Parameters

    • claimId: string

      the claimId to decrypt

    • seed: string

      the bip39 seed requesting the data

    • Default value platform: PlatformType = "neo"

      the platform to operate on

    • Default value network: ConnectionNetworkType = "production"

      the network to operate on

    Returns Promise<ClaimInfo>

getProfileByToken

  • gets an identity profile using a token

    Parameters

    • token: string

      the identity token

    • Default value asteroidEnvironment: ConnectionNetworkType = "production"

      (optional) the asteroid environment to connect to

    Returns Promise<UserProfile>

go

  • go(appId: string, serviceId: string, state?: string, domain?: string): undefined
  • Redirects the user to the vivid login view for the requested app and service

    Parameters

    • appId: string

      the application (defined in the vivid developer app)

    • serviceId: string

      the service ID defined in the vivid

    • Default value state: string = ""

      (optional) an optional parameter for flow control

    • Default value domain: string = "https://vivid.moonlight.io"

      (optional) the vivid platform to target

    Returns undefined

Const invoke

  • invoke(rpcUrl: string, method: string, params: object, id: string, methodVersion: number, config?: AxiosRequestConfig): Promise<any>
  • throws

    {JsonRpcError}

    Parameters

    • rpcUrl: string
    • method: string
    • params: object
    • id: string
    • methodVersion: number
    • Optional config: AxiosRequestConfig

    Returns Promise<any>

    RPC response data within its results property.

loginEmail

  • authenticates and returns an asteroid user instance

    Parameters

    • email: string

      the user's email

    • password: string

      the user's password

    • Default value asteroidEnvironment: ConnectionNetworkType = "production"

      (optional) the asteroid environment to connect to.

    Returns Promise<AsteroidUser>

Object literals

Const DEFAULT_OPTIONS

DEFAULT_OPTIONS: object

accessToken

accessToken: undefined = undefined

autoUpdateTokens

autoUpdateTokens: true = true

id

id: string = "0"

loggerOptions

loggerOptions: {}

Type declaration

networkConfig

networkConfig: undefined = undefined

networkType

networkType: "production" = "production"

refreshToken

refreshToken: undefined = undefined

vividService

vividService: undefined = undefined

Const attributeTypes

attributeTypes: object

academic

academic: string = "academic"

accomplishment

accomplishment: string = "accomplishment"

address

address: string = "address"

alias

alias: string = "alias"

auth

auth: string = "auth"

avatar

avatar: string = "avatar"

description

description: string = "description"

email

email: string = "email"

extracurricular

extracurricular: string = "extracurricular"

membership

membership: string = "membership"

name

name: string = "name"

overview

overview: string = "overview"

position

position: string = "position"

preferences

preferences: string = "preferences"

s_oauth

s_oauth: string = "s_oauth"

skill

skill: string = "skill"

socialLink

socialLink: string = "social_link"

statement

statement: string = "statement"

telephone

telephone: string = "telephone"

title

title: string = "title"

Const bip32Accounts

bip32Accounts: object

firstHardenedChild

firstHardenedChild: number = 2147483648

Const bip32Coins

bip32Coins: object

neo

neo: number = 2147484536

Const bip32MasterSeeds

bip32MasterSeeds: object

neo

neo: Buffer = Buffer.from('Nist256p1 seed')

Const bip32Purposes

bip32Purposes: object

BIP44

BIP44: number = 2147483692

Const claimEncryptionModes

claimEncryptionModes: object

symmetric_aes256

symmetric_aes256: number = 1

unencrypted

unencrypted: number = 0

Const constants

constants: object

attributeTypes

attributeTypes: { academic: string; accomplishment: string; address: string; alias: string; auth: string; avatar: string; description: string; email: string; extracurricular: string; membership: string; name: string; overview: string; position: string; preferences: string; s_oauth: string; skill: string; socialLink: string; statement: string; telephone: string; title: string }

Type declaration

  • academic: string
  • accomplishment: string
  • address: string
  • alias: string
  • auth: string
  • avatar: string
  • description: string
  • email: string
  • extracurricular: string
  • membership: string
  • name: string
  • overview: string
  • position: string
  • preferences: string
  • s_oauth: string
  • skill: string
  • socialLink: string
  • statement: string
  • telephone: string
  • title: string

bip32Accounts

bip32Accounts: {}

Type declaration

  • [key: string]: number

bip32Coins

bip32Coins: {}

Type declaration

  • [key: string]: number

bip32MasterSeeds

bip32MasterSeeds: {}

Type declaration

  • [key: string]: Buffer

bip32Purposes

bip32Purposes: {}

Type declaration

  • [key: string]: number

claimEncryptionModes

claimEncryptionModes: {}

Type declaration

  • [key: string]: number

curves

curves: {}

Type declaration

  • [key: string]: any

neo2CNSHash

neo2CNSHash: { production: string; stage: string }

Type declaration

  • production: string
  • stage: string

rpcDefaults

rpcDefaults: { id: string; methodVersion: number }

Type declaration

  • id: string
  • methodVersion: number

rpcErrorCodes

rpcErrorCodes: { EmailAlreadyRegistered: number; ErrorSink: number; InvalidCredentials: number; InvalidDynamicToken: number; InvalidEmail: number; InvalidJwtToken: number; InvalidPayloadAttr: number; InvalidProviderToken: number; InvalidSessionId: number; MethodInDev: number; MissingPayloadAttr: number; RegistrationDisabled: number }

Type declaration

  • EmailAlreadyRegistered: number
  • ErrorSink: number
  • InvalidCredentials: number
  • InvalidDynamicToken: number
  • InvalidEmail: number
  • InvalidJwtToken: number
  • InvalidPayloadAttr: number
  • InvalidProviderToken: number
  • InvalidSessionId: number
  • MethodInDev: number
  • MissingPayloadAttr: number
  • RegistrationDisabled: number

urls

urls: { asteroidDomainUser: object; asteroidDomainWorker: object; blockchainNeo2: object }

Type declaration

  • asteroidDomainUser: object
    • baseUrl: object
      • dev: string
      • docker: string
      • production: string
      • stage: string
  • asteroidDomainWorker: object
    • baseUrl: object
      • dev: string
      • docker: string
      • production: string
      • stage: string
  • blockchainNeo2: object
    • baseURL: object
      • production: object
        • name: string
        • extra: object
          • neoscan: string
          • rpcServer: string
      • stage: object
        • name: string
        • extra: object
          • neoscan: string
          • rpcServer: string

Const curves

curves: object

neo

neo: ec = new elliptic.ec('p256')

Const neo2CNSHash

neo2CNSHash: object

production

production: string = "b434339f25b6f1bec68e99f620dfbf3ec27dacdc"

stage

stage: string = "b434339f25b6f1bec68e99f620dfbf3ec27dacdc"

Const rest

rest: object

user

user: AsteroidUserRest = AsteroidUserRest

worker

worker: AsteroidWorkerRest = AsteroidWorkerRest

Const rpc

rpc: object

invoke

invoke: invoke

user

user: AsteroidUserRpc = AsteroidUserRpc

worker

worker: AsteroidWorkerRpc = AsteroidWorkerRpc

Const rpcDefaults

rpcDefaults: object

id

id: string = "0"

methodVersion

methodVersion: number = 1

Const rpcErrorCodes

rpcErrorCodes: object

EmailAlreadyRegistered

EmailAlreadyRegistered: number = 2001

ErrorSink

ErrorSink: number = 1000

InvalidCredentials

InvalidCredentials: number = 2003

InvalidDynamicToken

InvalidDynamicToken: number = 2006

InvalidEmail

InvalidEmail: number = 2000

InvalidJwtToken

InvalidJwtToken: number = 2008

InvalidPayloadAttr

InvalidPayloadAttr: number = 2005

InvalidProviderToken

InvalidProviderToken: number = 2002

InvalidSessionId

InvalidSessionId: number = 2007

MethodInDev

MethodInDev: number = 1001

MissingPayloadAttr

MissingPayloadAttr: number = 2004

RegistrationDisabled

RegistrationDisabled: number = 2009

Const urls

urls: object

asteroidDomainUser

asteroidDomainUser: object

baseUrl

baseUrl: object

dev

dev: string = "http://localhost:8000"

docker

docker: string = "http://asteroid-domain-user:8000"

production

production: string = "https://user.asteroid.moonlight.io"

stage

stage: string = "https://stage-user.asteroid.moonlight.io"

asteroidDomainWorker

asteroidDomainWorker: object

baseUrl

baseUrl: object

dev

dev: string = "http://localhost:8001"

docker

docker: string = "http://asteroid-domain-worker:8001"

production

production: string = "https://worker.asteroid.moonlight.io"

stage

stage: string = "https://stage-worker.asteroid.moonlight.io"

blockchainNeo2

blockchainNeo2: object

baseURL

baseURL: object

production

production: object

name

name: string = "network"

extra

extra: object

neoscan

neoscan: string = "https://p1.neo.blockchain.moonlight.io:4001/api/main_net"

rpcServer

rpcServer: string = "https://p1.neo.blockchain.moonlight.io:60333"

stage

stage: object

name

name: string = "network"

extra

extra: object

neoscan

neoscan: string = "https://privnet.moonlight.io:4001/api/main_net"

rpcServer

rpcServer: string = "https://privnet.moonlight.io:60333"

Generated using TypeDoc