iota-basic > "impl/IotaBasic" > Iota
implementation of the IIotaBasic interface
⊕ 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
● ccurlProvider: ICurlHash
Defined in impl/IotaBasic.ts:18
● iota: any
Defined in impl/IotaBasic.ts:22
● seed: string
Defined in impl/IotaBasic.ts:21
● seedGenerator: ISeedGenerator
Defined in impl/IotaBasic.ts:19
► 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(): Promise
.<number
>
Implementation of IIotaBasic.getBalance
Defined in impl/IotaBasic.ts:107
returns the balance of your seed
Returns: Promise
.<number
>
► 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(): 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(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
>