Skip to content

Latest commit

 

History

History
278 lines (103 loc) · 5.66 KB

_impl_iotabasic_.iota.md

File metadata and controls

278 lines (103 loc) · 5.66 KB

iota-basic > "impl/IotaBasic" > Iota

Class: Iota

implementation of the IIotaBasic interface

Implements

Index

Constructors

Properties

Methods


Constructors

new Iota(seed: string, node?: string, testClient?: any, pow?: boolean): Iota

Defined in impl/IotaBasic.ts:22

init function takes the iotaclient and overrides attachToTangle constructor:

Parameters:

Param Type Default value Description
seed string - the seed to initialize with.
node string "https://iotanode.us:443" the uri for the provider within iota.lib.js client, defaults to 'https://iotanode.us:443'
testClient any - this parameter is strictly to make writing unit tests against this class easier and is not meant to be used'
pow boolean true this parameter assumes you want to do pow locally and if not you can override it to false

Returns: Iota


Properties

ccurlProvider

● ccurlProvider: ICurlHash

Defined in impl/IotaBasic.ts:18


«Private» iota

● iota: any

Defined in impl/IotaBasic.ts:22


«Private» seed

● seed: string

Defined in impl/IotaBasic.ts:21


seedGenerator

● seedGenerator: ISeedGenerator

Defined in impl/IotaBasic.ts:19


Methods

getAccountData

getAccountData(): Promise.<IAccountData>

Implementation of IIotaBasic.getAccountData

Defined in impl/IotaBasic.ts:121

returns the account data in the form of IAccountData from iota.lib.js for your seed

Returns: Promise.<IAccountData>


getBalance

getBalance(): Promise.<number>

Implementation of IIotaBasic.getBalance

Defined in impl/IotaBasic.ts:107

returns the balance of your seed

Returns: Promise.<number>


getChecksum

getChecksum(): string

Implementation of IIotaBasic.getChecksum

Defined in impl/IotaBasic.ts:139

generate a checksum for the seed to verify you entered it correctly. shamelessly stolen from official wallet

Returns: string


getReceiveAddress

getReceiveAddress(): Promise.<string>

Implementation of IIotaBasic.getReceiveAddress

Defined in impl/IotaBasic.ts:50

Generate the most recent receive address with no send transactions on it

Returns: Promise.<string>


sendTransaction

sendTransaction(receivingAddress: string, value: number, data?: any): Promise.<any>

Implementation of IIotaBasic.sendTransaction

Defined in impl/IotaBasic.ts:78

sendTransaction for sending value from your seed to another address or just sending data

Parameters:

Param Type Description
receivingAddress string -
value number the amount in iota to send
data any json object representing any data you want to send with the transaction

Returns: Promise.<any>