string
string
Optional
tokenAddressstring
BigNumber
| BN
| string
Optional
nonceBigNumber
string
, amount: BigNumber
| BN
| string
, gasPrice: BigNumber
| BN
| string
, gas: number
, tokenAddress?: string
): Promise
<string
>deposit
function but prior check to send the deposit transaction it checks for token transfer allowance of the NOCUST smart contract. If the allowance is not sufficient it sends an ERC-20 aprove
transaction. Approving token transfers is a required operation by the ERC-20 standard. If the depositor does not have sufficient allowance the deposit will fail. Note that this function will make 2 on-chain transaction (contract calls) with the specified gas price and gas limit. Approvals are not required for Ether.string
BigNumber
| BN
| string
BigNumber
| BN
| string
number
Optional
tokenAddressstring
Promise
<string
> Hash of the on-chain transaction of the deposit.string
): Promise
<void
>getSLADetail
function. This function will make a nocust transfer to pay for the SLA.string
Promise
<void
>string
, amount: BigNumber
| BN
| string
, gasPrice: BigNumber
| BN
| string
, gas: number
, tokenAddress?: string
): Promise
<string
>string
BigNumber
| BN
| string
BigNumber
| BN
| string
number
Optional
tokenAddressstring
Promise
<string
> Hash of the on-chain transaction of the deposit.Promise
<number
>Promise
<number
>string
, txHash?: string
, tokenAddress?: string
): Promise
<number
>string
Optional
txHashstring
Optional
tokenAddressstring
Promise
<number
>Promise
<number
>Promise
<number
>Promise
<number
>Promise
<number
> Erastring
, tokenAddress?: string
): Promise
<BigNumber
>string
Optional
tokenAddressstring
Promise
<BigNumber
> Nocust balancestring
, tokenAddress?: string
): Promise
<BigNumber
>string
Optional
tokenAddressstring
Promise
<BigNumber
> On-chain balance.string
, sellTokenAddress: string
): Promise
<OrderBookDataInterface
>string
string
Promise
<OrderBookDataInterface
>Promise
<SLADetailsInterface
>Promise
<SLADetailsInterface
> Object with the token address with which to pay the SLA, the cost/amount of the SLA in this token, the recipient of the SLA payment, the transaction limit per month without SLA.string
): Promise
<number
>string
Promise
<number
> 0 if not under SLA, expiry date unix timestamp in millisecond if currently enroll with a SLA.Promise
<object
[]>Promise
<object
[]> Promise that resolves with an array of objects { tokenAddress: string, name: string, shortName: string }
for each token supported by the commit-chain. Address is the address of the ERC-20 contract of the token.number
): Promise
<TransferDataInterface
>number
Promise
<TransferDataInterface
> Transaction details }`string
, tokenAddress?: string
, roundNumber?: number
): Promise
<TransferDataInterface
[]>string
Optional
tokenAddressstring
Optional
roundNumbernumber
Promise
<TransferDataInterface
[]> Array of transactionsstring
, tokenAddress?: string
): Promise
<WalletState
>WalletState
object for lower level API use.string
Optional
tokenAddressstring
Promise
<WalletState
>BigNumber
| BN
| string
): Promise
<BigNumber
>BigNumber
| BN
| string
Promise
<BigNumber
> Fee amountstring
, tokenAddress?: string
): Promise
<BigNumber
>string
Optional
tokenAddressstring
Promise
<BigNumber
> Withdrawal limit.string
, callBack: function
, tokenAddress?: any
): function
string
function
Optional
tokenAddressany
'all'
can be used to be notified for all tokens available on the commit-chain.Promise
< unsubscribe () => Void>
A promise that resolves when the callback is registered. The promise resolves with the unsubscribe function of the callback.string
, tokenAddress?: string
): Promise
<boolean
>string
Optional
tokenAddressstring
Promise
<boolean
> Return true
if the registration is successfulstring
, tokenAddress?: string
): Promise
<boolean
>string
Optional
tokenAddressstring
Promise
<boolean
>Promise
<boolean
>Promise
<boolean
> Recovery status.string
, txId: number
, gasPrice: any
, gas: any
, tokenAddress?: string
): Promise
<string
>string
number
any
any
Optional
tokenAddressstring
Promise
<string
>string
, gasPrice: any
, gas: any
, tokenAddress?: string
): Promise
<string
>string
any
any
Optional
tokenAddressstring
Promise
<string
>string
, gasPrice: any
, gas: any
, tokenAddress?: string
): Promise
<string
>string
any
any
Optional
tokenAddressstring
Promise
<string
>string
, tokenAddress?: string
): Promise
<void
>string
Optional
tokenAddressstring
Promise
<void
>string
, buyTokenAddress: string
, sellTokenAddress: string
, buyAmount: BigNumber
| BN
| string
, sellAmount: BigNumber
| BN
| string
): Promise
<number
>string
string
string
BigNumber
| BN
| string
BigNumber
| BN
| string
Optional
subWalletSeedPhrasestring
Promise
<number
>Promise
<number
>Promise
<number
> Transaction Id of the NOCUST transferstring
, subWalletSeedPhrase?: string
): Promise
<TransferDataInterface[]
>string
Optional
subWalletSeedPhrasestring
string
, tokenAddress?: string
): Promise
<void
>string
Optional
tokenAddressstring
Promise
<void
>string
, gasPrice: BigNumber
| BN
| string
, gas: number
, tokenAddress?: string
): Promise
<string
>string
BigNumber
| BN
| string
number
Optional
tokenAddressstring
Promise
<string
> Hash of the on-chain transaction of the withdrawal confirmation.string
, amount: BigNumber
| BN
| string
, gasPrice: BigNumber
| BN
| string
, gas: number
, tokenAddress?: string
): Promise
<string
>string
BigNumber
| BN
| string
BigNumber
| BN
| string
number
Optional
tokenAddressstring
Promise
<string
> Hash of the on-chain transaction of the withdrawal request.NOCUSTManager
instance throws errors that can be catch and easily handled.NOCUSTError
enum. registerAddress
function need to be called for the specific address and token. NOCUSTManager
instance. To add a private key to a web3 instance do: web3.eth.accounts.wallet.add(privateKey)
<server URL>/whitelist/
operatorUrl
parameter passed to the NOCUSTManager
instance is correct and that the URL is reachable.NOCUSTManager
instance by the parameter rpcApi
.nonce
in the transfer NOCUSTTransfer
object. The nonce
can also be set it to undefined to automatically assign a random nonce.getWithdrawalLimit
function to get your current withdrawal limit.