UNPKG

sendingnetwork-bot-sdk

Version:
27 lines (26 loc) 1.24 kB
/** * Functions for interacting with SDN prior to having an access token. Intended * to be used for logging in/registering to get a SDNClient instance. * * By design, this limits the options used to create the SDNClient. To specify * custom elements to the client, get the access token from the returned client * and create a new SDNClient instance. Due to the nature of SDN, it is * also recommended to use the nodeUrl from the generated SDNClient as * it may be different from that given to the SDNAuth class. */ export declare class SDNAuth { private nodeUrl; /** * Creates a new SDNAuth class for creating a SDNClient * @param {string} nodeUrl The node URL to authenticate against. */ constructor(nodeUrl: string); /** * Generate a client with no access token so we can reuse the doRequest * logic already written. */ private createTemplateClient; didPreLogin(address: string): Promise<any>; didLogin(address: string, did: string, message: string, token: string, nonce: string, update_time: string): Promise<any>; didLoginWithAppToken(address: string, did: string, message: string, token: string, appToken: string, nonce: string, update_time: string): Promise<any>; }