.do.pruf

.setColdWallet

pruf.do.pruf.updateImportStatus()

Set wallet status to cold.

Parameters

None

Example usage

1//Example pruf-js code
2
3pruf.do.node.setColdWallet()
4.send({ from: props.addr })
5.on("receipt"()=>{
6   console.log(receipt.transactionHash);
7});

.unSetColdWallet

pruf.do.pruf.unSetColdWallet()

Set wallet status to hot.

Parameters

None

Example usage

1//Example pruf-js code
2
3pruf.do.node.unSetColdWallet()
4.send({ from: props.addr })
5.on("receipt"()=>{
6   console.log(receipt.transactionHash);
7});

.transfer

pruf.do.pruf.transfer(from, to, amount)

Sends $PRUF from one wallet to another

Parameters

  1. from

    • String | Address

    • The address from which the $PRUF will be sent

  2. to

    • String | Address

    • The address to which the $PRUF will be sent

  3. amount

    • String | Uint256

    • Amount of $PRUF to send

Example usage

 1//Example pruf-js code
 2let _from = "0xBef3b0b67061CACD4E10968d8Ba23A1c864c8049";
 3let _to = "0x9094CaDBF4d35ce5FeD92eb758909fB38F7fecb1";
 4let _amount = "100000000000000000000";
 5
 6pruf.do.node.transfer
 7(
 8   _from,
 9   _to,
10   _amount
11)
12.send({ from: props.addr })
13.on("receipt"()=>{
14   console.log(receipt.transactionHash);
15});

.approve

pruf.do.pruf.approve(spender, amount)

Change the one-way import relationship between nodes.

Parameters

  1. spender

    • String | Address

    • Address of the spender to be approved

  2. amount

    • String | Uint256

    • Amount of $PRUF to approve for spender

Example usage

 1//Example pruf-js code
 2let _spender = "0x9094CaDBF4d35ce5FeD92eb758909fB38F7fecb1";
 3let _amount = "100000000000000000000";
 4
 5pruf.do.pruf.approve
 6(
 7   _spender,
 8   _amount
 9)
10.send({ from: props.addr })
11.on("receipt"()=>{
12   console.log(receipt.transactionHash);
13});

.decreaseAllowance

pruf.do.pruf.decreaseAllowance(spender, amount)

Decrease the $PRUF allowance of a spender.

Parameters

  1. spender

    • String | Address

    • Address of the spender

  2. amount

    • String | Uint256

    • Amount of $PRUF to decrease from spender’s allowance

Example usage

 1//Example pruf-js code
 2
 3let _spender = "0x9094CaDBF4d35ce5FeD92eb758909fB38F7fecb1";
 4let _amount = "100000000000000000000";
 5
 6pruf.do.pruf.decreaseAllowance
 7(
 8   _spender,
 9   _amount
10)
11.send({ from: props.addr })
12.on("receipt"()=>{
13   console.log(receipt.transactionHash);
14});

.increaseAllowance

pruf.do.pruf.increaseAllowance(spender, amount)

Increase the $PRUF allowance of a spender.

Parameters

  1. spender

    • String | Address

    • Address of the spender

  2. amount

    • String | Uint256

    • Amount of $PRUF by which to increase a spender’s allowance

Example usage

 1//Example pruf-js code
 2
 3let _spender = "0x9094CaDBF4d35ce5FeD92eb758909fB38F7fecb1";
 4let _amount = "100000000000000000000";
 5
 6pruf.do.pruf.increaseAllowance
 7(
 8   _spender,
 9   _amount
10)
11.send({ from: props.addr })
12.on("receipt"()=>{
13   console.log(receipt.transactionHash);
14});