Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RadixRemoteIdentity

Hierarchy

Implements

Index

Constructors

Private constructor

Properties

account

account: RadixAccount

address

address: RadixAddress

Private remoteUrl

remoteUrl: string

Private socket

socket: Client

Private token

token: string

Methods

decryptECIESPayload

  • decryptECIESPayload(payload: Buffer): Promise<Buffer>

decryptECIESPayloadWithProtectors

  • decryptECIESPayloadWithProtectors(protectors: Buffer[], payload: Buffer): Promise<Buffer>

getPublicKey

  • getPublicKey(): Buffer

Private getSocketConnection

  • getSocketConnection(): Client

signAtom

Static createNew

  • createNew(name: string, description: string, permissions?: string[], host?: string, port?: string): Promise<RadixRemoteIdentity>
  • Creates a new instance of a RadixRemoteIdentity

    Parameters

    • name: string

      The name of the application that wants to use the remote identity

    • description: string

      The description of the application that wants to use the remote identity

    • Default value permissions: string[] = ['sign_atom', 'decrypt_ecies_payload', 'get_public_key']
    • Default value host: string = "localhost"
    • Default value port: string = "54345"

    Returns Promise<RadixRemoteIdentity>

    A promise with an instance of a RadixRemoteIdentity

Static getRemotePublicKey

  • getRemotePublicKey(token: any, host?: string, port?: string): Promise<Buffer>
  • Returns the public key of this identity asynchronously

    Parameters

    • token: any
    • Default value host: string = "localhost"
    • Default value port: string = "54345"

    Returns Promise<Buffer>

    A promise with the public key of the identity

Static isServerUp

  • isServerUp(host?: string, port?: string): Promise<boolean>
  • Determines whether the server is up or down

    Parameters

    • Default value host: string = "localhost"
    • Default value port: string = "54345"

    Returns Promise<boolean>

    A promise with true or false whether the server is up or down

Static register

  • register(name: string, description: string, permissions: string[], host?: string, port?: string): Promise<string>
  • Registers a RadixRemoteIdentity to the wallet

    Parameters

    • name: string

      The name of the application that wants to use the remote identity

    • description: string

      The description of the application that wants to use the remote identity

    • permissions: string[]
    • Default value host: string = "localhost"
    • Default value port: string = "54345"

    Returns Promise<string>

    A promise with a valid token to interact with the wallet

Generated using TypeDoc