Wallet
Extends:
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
async create(fileName: string, password: string, language: string): Promise<{}>{}> Create a new wallet. |
|
public |
async getAddress(): Promise<GetAddressResponse> Returns the wallet's current block height. |
|
public |
async getBalance(): Promise<GetBalanceResponse> Return the wallet's balance. |
|
public |
async getHeight(): Promise<GetHeightResponse> |
|
public |
async getPayments(paymentId: *): Promise<GetPaymentsResponse> Get a list of incoming payments using a given payment id. |
|
public |
async open(fileName: string, password: string): Promise<{}>{}> Open a wallet. |
|
public |
async stop(): Promise<{}>{}> Stops the wallet, storing the current state. |
|
public |
async transfer(destinations: Destinations, mixin: uint, unlockTime: uint, priority: 0 | 1 | 2 | 3, getTxHex: boolean, paymentId: string, getTxKey: boolean, doNotRelay: boolean): Promise<TransferResponse> Send monero to a number of recipients. |
Private Methods | ||
private |
_getOptions(method: *, params: {}): * |
Public Constructors
public constructor() source
Public Methods
public async create(fileName: string, password: string, language: string): Promise<{}>{}> source
Create a new wallet. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work.
Params:
Name | Type | Attribute | Description |
fileName | string | File name. |
|
password | string | Password. |
|
language | string | Language for your wallets' seed. |
Return:
Promise<{}>{}> |
public async getAddress(): Promise<GetAddressResponse> source
Returns the wallet's current block height.
public async getPayments(paymentId: *): Promise<GetPaymentsResponse> source
Get a list of incoming payments using a given payment id.
Params:
Name | Type | Attribute | Description |
paymentId | * | Payment id. |
public async open(fileName: string, password: string): Promise<{}>{}> source
Open a wallet. You need to have set the argument "–wallet-dir" when launching monero-wallet-rpc to make this work.
Params:
Name | Type | Attribute | Description |
fileName | string | File name. |
|
password | string | Password. |
Return:
Promise<{}>{}> |
public async stop(): Promise<{}>{}> source
Stops the wallet, storing the current state.
Return:
Promise<{}>{}> |
public async transfer(destinations: Destinations, mixin: uint, unlockTime: uint, priority: 0 | 1 | 2 | 3, getTxHex: boolean, paymentId: string, getTxKey: boolean, doNotRelay: boolean): Promise<TransferResponse> source
Send monero to a number of recipients.
Params:
Name | Type | Attribute | Description |
destinations | Destinations | Array of destinations to receive XMR. |
|
mixin | uint | Number of outpouts from the blockchain to mix with (0 means no mixing). |
|
unlockTime | uint | Number of blocks before the monero can be spent (0 to not add a lock). |
|
priority | 0 | 1 | 2 | 3 | ||
getTxHex | boolean | ||
paymentId | string |
|
Random 32-byte/64-character hex string to identify a transaction. |
getTxKey | boolean |
|
|
doNotRelay | boolean |
|
Private Methods
private _getOptions(method: *, params: {}): * source
Params:
Name | Type | Attribute | Description |
method | * | ||
params | {} |
|
Return:
* |