Classes (5)

kiosk.Box (9)
kiosk.Env (10)
kiosk.ErgoUtil (7)
kiosk.Script (5)
kiosk.Wallet (5)
Total methods found: 36

This is front-end for Kiosk, which is a library for interacting with the Ergo blockchain.
Kiosk is built on top of Ergo-AppKit and provides the ability to send transactions by spending
arbitrary boxes (provided their script allows them to be spent) and creating boxes with arbitrary guard scripts.
In order to create a script that hard-wires constants (such as a group element), first create a named constant
in the environment of the correct type. Then reference that name in the script code. To add that constant to a
register, use that name as part of the registerKeys array when creating a box.

This is a multi-tenant version of Kiosk, where each URL uniquely determines an environment. Variables and
boxes in one environment are independent of those in other environments. Thus, multiple users may use Kiosk without
mixing up their environments as long as they use different URLs.
When visiting the bare base URL, the system automatically redirects to a randomly generated new URL.

To get a new environment, simply use a new end-URL, either by visiting the bare base URL or manually creating one.
Note that environments are not saved to disk so the garbage collector may clear unused environments.

kiosk.Box (9)

Displayed Name Original Name Parameters Return Type
createBoxFromAddresscreateBoxFromAddress(boxName:String, address:String, registerKeys:String[], tokenIDs:String[], tokenAmts:long[], value:long)kiosk.ergo.KioskBox
createBoxFromScriptcreateBoxFromScript(boxName:String, script:org.sh.easyweb.Text, registerKeys:String[], tokenIDs:String[], tokenAmts:long[], value:long)kiosk.ergo.KioskBox
createTxcreateTx(inputBoxIds:String[], dataInputBoxIds:String[], outputBoxNames:String[], fee:long, changeAddress:String, proveDlogSecrets:String[], proveDhtDataNames:String[], broadcast:boolean)String
deleteAllBoxesdeleteAllBoxes(reallyDelete:boolean)String
deleteBoxdeleteBox(boxName:String)scala.collection.mutable.Map
dhtDataAdddhtDataAdd(name:String, g:String, h:String, u:String, v:String, x:scala.math.BigInt)void
dhtDataDeleteAlldhtDataDeleteAll(reallyDelete:boolean)String
dhtDataGetAlldhtDataGetAllkiosk.box.KioskBoxCreator$Named[]
getAllBoxesgetAllBoxeskiosk.box.KioskBoxCreator$Named[]

kiosk.Box.createBoxFromAddress

Info:
1. Number of elements in the arrays tokenIDs and tokenAmts must be same. If you don't want to use tokens, set these array to empty (i.e., [])
2. registerKeys must refer to keys of Env. Registers will be populated with the corresponding values starting with R4

As an example, to set R4 to Int 1 and R5 to Coll[Byte] 0x1234567890abcdef, first set these values in Env using setInt and setCollByte
Let the keys for the Int and Coll[Byte] be, say, a and b respectively. Then set registerKeys value as [a,b]
The default address 4MQyML64GnzMxZgm corresponds to the script {1 < 2}

top parent

kiosk.Box.createBoxFromScript

Info:
1. Number of elements in the arrays tokenIDs and tokenAmts must be same. If you don't want to use tokens, set these array to empty (i.e., [])
2. registerKeys must refer to keys of Env. Registers will be populated with the corresponding values starting with R4

As an example, to set R4 to Int 1 and R5 to Coll[Byte] 0x1234567890abcdef, first set these values in Env using setInt and setCollByte
Let the keys for the Int and Coll[Byte] be, say, a and b respectively. Then set registerKeys value as [a,b]

top parent

kiosk.Box.createTx

Yes No

top parent

kiosk.Box.deleteAllBoxes

Info: To prevent accidental clicking, please select 'yes' from the radio button

Yes No

top parent

kiosk.Box.deleteBox

top parent

kiosk.Box.dhtDataAdd

top parent

kiosk.Box.dhtDataDeleteAll

Info: To prevent accidental clicking, please select 'yes' from the radio button

Yes No

top parent

kiosk.Box.dhtDataGetAll

top parent

kiosk.Box.getAllBoxes

top parent

kiosk.Env (10)

Displayed Name Original Name Parameters Return Type
decodeValuedecodeValue(hex:String)String
deleteAlldeleteAll(reallyDelete:boolean)String
getAllgetAll(serialize:boolean)String[]
setBigIntsetBigInt(name:String, bigInt:String)void
setCollBytesetCollByte(name:String, bytes:byte[])void
setCollGroupElementsetCollGroupElement(name:String, coll:String[])void
setGroupElementsetGroupElement(name:String, groupElement:String)void
setIntsetInt(name:String, int:int)void
setLongsetLong(name:String, long:long)void
setStringsetString(name:String, string:String)void

kiosk.Env.decodeValue

top parent

kiosk.Env.deleteAll

Info: To prevent accidental clicking, please select 'yes' from the radio button

Yes No

top parent

kiosk.Env.getAll

Yes No

top parent

kiosk.Env.setBigInt

Info: Give the bigInt either as hex or decimal encoded (decimal tried first)

top parent

kiosk.Env.setCollByte

top parent

kiosk.Env.setCollGroupElement

Info: A group element is encoded as a public key of Bitcoin in hex (compressed or uncompressed)

top parent

kiosk.Env.setGroupElement

Info: A group element is encoded as a public key of Bitcoin in hex (compressed or uncompressed)

top parent

kiosk.Env.setInt

top parent

kiosk.Env.setLong

top parent

kiosk.Env.setString

top parent

kiosk.ErgoUtil (7)

Displayed Name Original Name Parameters Return Type
addressToGroupElementaddressToGroupElement(address:String)String
gXgX(x:scala.math.BigInt)special.sigma.GroupElement
getBoxByIdgetBoxById(id:String)kiosk.ergo.KioskBox
hXhX(h:String, x:scala.math.BigInt)special.sigma.GroupElement
hexToBase58hexToBase58(hex:String)String
hexToDecimalhexToDecimal(hex:String)scala.math.BigInt
randBigIntrandBigIntscala.math.BigInt

kiosk.ErgoUtil.addressToGroupElement

top parent

kiosk.ErgoUtil.gX

top parent

kiosk.ErgoUtil.getBoxById

top parent

kiosk.ErgoUtil.hX

top parent

kiosk.ErgoUtil.hexToBase58

top parent

kiosk.ErgoUtil.hexToDecimal

top parent

kiosk.ErgoUtil.randBigInt

top parent

kiosk.Script (5)

Displayed Name Original Name Parameters Return Type
getAddressgetAddress(ergoTree:String)String
getAddressHashgetAddressHash(address:String)byte[]
getErgoTreegetErgoTree(ergoScript:org.sh.easyweb.Text)byte[]
getP2SAddressgetP2SAddress(ergoScript:org.sh.easyweb.Text)String
getScriptHashgetScriptHash(ergoScript:org.sh.easyweb.Text)byte[]

kiosk.Script.getAddress

Info: Outputs the address corresponding to (hex encoded) ergoTree

top parent

kiosk.Script.getAddressHash

Info: Outputs the blake2b256 hash of the ErgoTree corresponding to address

top parent

kiosk.Script.getErgoTree

Info: Outputs the ErgoTree corresponding to ergoScript. This is the output of box.propositionBytes

top parent

kiosk.Script.getP2SAddress

top parent

kiosk.Script.getScriptHash

Info: Outputs the blake2b256 hash of the ErgoTree corresponding to ergoScript

top parent

kiosk.Wallet (5)

Displayed Name Original Name Parameters Return Type
balancebalancescala.collection.Seq
myAddressmyAddressString
secretKeysecretKeyscala.math.BigInt
sendsend(toAddress:String, ergs:scala.math.BigDecimal)String
txBuildertxBuilder(script:org.sh.easyweb.Text, additionalSecrets:String[], broadcast:boolean)play.api.libs.json.JsObject

kiosk.Wallet.balance

top parent

kiosk.Wallet.myAddress

top parent

kiosk.Wallet.secretKey

top parent

kiosk.Wallet.send

Info: Using 0.001 Ergs as fee

top parent

kiosk.Wallet.txBuilder

Info: This creates a transaction using the script specified in TxBuilder.
If there are any lacking Ergs or tokens in the inputs, the wallet will attempt to add its own unspent boxes.
If some of the inputs need additional (proveDlog) secrets, they should be added to Env (as BigInts) and referenced in additionalSecrets.
The wallet does not currently support proveDlog secrets.

Yes No

top parent