Home Reference Source Repository
import {CryptoWallet} from 'leofcoin-core/src/lib/wallet.js'
public class | source

CryptoWallet

Constructor Summary

Public Constructor
public

constructor(network: *)

Member Summary

Public Members
public set

address: *

public get

address: *

public set

network: *

public get

network: *

public set

private: *

public get

private: *

public get

public: *

public

wif: *

Method Summary

Public Methods
public

import(wif: *)

Get the address using the wif (wallet import format)

public

lock(secret: *): *

public

new(hash: *): *

Create a new address Returns a random address when hash is undefined.

public

receive(address: *)

Send coins to given address

public

send(address: *)

Send coins to given address

public

unlock(secret: *): *

Public Constructors

public constructor(network: *) source

Params:

NameTypeAttributeDescription
network *

Public Members

public set address: * source

public get address: * source

public set network: * source

public get network: * source

public set private: * source

public get private: * source

public get public: * source

public wif: * source

Public Methods

public import(wif: *) source

Get the address using the wif (wallet import format)

Params:

NameTypeAttributeDescription
wif *

The wif address to generate the public key from.

The wif is also set for generating the private key when sending coins.

public lock(secret: *): * source

Params:

NameTypeAttributeDescription
secret *

Return:

*

public new(hash: *): * source

Create a new address Returns a random address when hash is undefined.

Params:

NameTypeAttributeDescription
hash *

SHA256 hash to generate an address from.

Return:

*

public receive(address: *) source

Send coins to given address

Params:

NameTypeAttributeDescription
address *

The address to send the coins to.

Will move to other module probably.

public send(address: *) source

Send coins to given address

Params:

NameTypeAttributeDescription
address *

The address to send the coins to.

Will move to other module probably.

public unlock(secret: *): * source

Params:

NameTypeAttributeDescription
secret *

Return:

*