raiden-api-sdk
Version:
SDK for interacting with the Raiden API
33 lines (32 loc) • 978 B
TypeScript
import { Observable } from 'rxjs';
import { Configuration, RaidenNodeApi } from './apis';
export declare class Node {
private readonly nodeApi;
static create(config?: Configuration): Node;
constructor(nodeApi: RaidenNodeApi);
/**
* Query your address
*
* @remarks
* When raiden starts, you choose an ethereum address which will
* also be your raiden address.
*
* @example
* ```typescript
* import Raiden from 'raiden-api-sdk';
*
* (async function() {
* const raiden = Raiden.create();
* const ourAddress = await raiden.node.ourAddress().toPromise();
*
* // 0xA44e09ea90eAF80DC1B59aA45687e2c4d572049D
* console.log(ourAddress);
* })()
* ```
*
* @since 0.100.3
* @throws {@link RaidenAPIError}
* @see {@link https://raiden-network.readthedocs.io/en/latest/rest_api.html#get--api-(version)-address}
*/
ourAddress(): Observable<string>;
}