[{"data":1,"prerenderedAt":275},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcore-tech\u002Fbeamx-getting-started":3,"docs-surround-\u002Fdocs\u002Fcore-tech\u002Fbeamx-getting-started":264},{"id":4,"title":5,"body":6,"description":255,"extension":256,"image":257,"meta":258,"navTitle":257,"navigation":259,"path":260,"seo":261,"stem":262,"__hash__":263},"docs\u002Fdocs\u002Fcore-tech\u002FBeamX-Getting-Started.md","Welcome to BeamX",{"type":7,"value":8,"toc":243},"minimark",[9,13,22,25,30,35,40,43,46,66,69,73,76,84,87,91,94,102,107,110,121,124,136,139,143,146,149,157,160,163,168,175,178,186,189,193,196,199,205,208,211,214,217],[10,11,5],"h1",{"id":12},"welcome-to-beamx",[14,15,16,17,21],"p",{},"Hi and Welcome to ",[18,19,20],"strong",{},"BeamX",", Confidential DeFi Experimental Platform based on Beam Confidential blockchain.",[14,23,24],{},"We invite you to build BeamX together with us and actively contribute both as a user and as developer.\nThis document contains everything you need to get started with BeamX",[26,27,29],"h2",{"id":28},"before-we-start","Before we start",[14,31,32],{},[18,33,34],{},"IMPORTANT",[14,36,37],{},[18,38,39],{},"BeamX is very new and experimental project, it is currently in public testnet, so all the assets on it including Beam are for play only.",[14,41,42],{},"You can expect a lot of things to be broken quite frequently",[14,44,45],{},"Here are two Telegram groups for user and developer support:",[47,48,49,59],"ul",{},[50,51,52,58],"li",{},[53,54,55],"a",{"href":55,"rel":56},"https:\u002F\u002Ft.me\u002FBeamXSupport",[57],"nofollow"," - for general issues related to BeamX",[50,60,61,65],{},[53,62,63],{"href":63,"rel":64},"https:\u002F\u002Ft.me\u002FBeamXDev",[57],"     - for developers building on BeamX",[14,67,68],{},"We recommend that you join these groups and ask any questions",[26,70,72],{"id":71},"getting-the-binaries","Getting the binaries",[14,74,75],{},"You can download BeamX compatible binaries for your platform at \u002Fdownloads",[14,77,78,79],{},"If you would like to build BeamX yourself from source code please refer to the ",[53,80,83],{"href":81,"rel":82},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Fwiki\u002FHow-to-build",[57],"Building Instructions Guide",[14,85,86],{},"We strongly recommend that you get the node and the CLI wallet in addition to the Desktop wallet even if you only intend to use BeamX. The reason for that is that many interesting contracts you might want to run will take time to provide graphical applications. Having your own node and running CLI wallet will allow you to use the newest and coolest features. It is not complicated, as we will see in a minute.",[26,88,90],{"id":89},"using-beamx-cli-wallet","Using BeamX CLI wallet",[14,92,93],{},"Once you download and unzip CLI binary, put it in a folder called 'beamx' anywhere on your machine. Once this is done, open your favorite Terminal or Command Prompt and change directory to the 'beamx' folder you have just created.",[14,95,96,97,101],{},"TIP: Since BeamX CLI wallet is an extended version of Beam CLI wallet most of the documentation ",[53,98,100],{"href":99},"\u002Fdocs\u002Fcli","here"," is applicable to BeamX CLI Wallet as well.",[103,104,106],"h3",{"id":105},"initializing-the-wallet","Initializing the wallet",[14,108,109],{},"Assuming your wallet binary is called something like beam-wallet-beamx.exe (on Windows) or beam-wallet-beamx (on Linux or Mac) run:",[14,111,112,116,117,120],{},[113,114,115],"code",{},"beam-wallet-beamx.exe init"," (for Windows)\n",[113,118,119],{},".\u002Fbeam-wallet-beamx init"," (for Linux or Mac)",[14,122,123],{},"Running this command will:",[125,126,127,130,133],"ol",{},[50,128,129],{},"Create a new wallet database in the same folder",[50,131,132],{},"Print out your seed phrase (which you should copy and keep somewhere, just in case)",[50,134,135],{},"Prompt you to setup wallet password, we recommend using something short like 123 since, remember, it's just play tokens",[14,137,138],{},"Once you are done, move to the next step",[103,140,142],{"id":141},"running-your-own-node","Running your own node",[14,144,145],{},"We highly recommend that you run your own node to play with BeamX. To do so, download the node binary and put it in the same location as BeamX CLI Wallet, namely in the 'beamx' folder you have created.",[14,147,148],{},"Before you run your own node, you will need to get your owner key by running the following command:",[14,150,151,116,154,120],{},[113,152,153],{},"beam-wallet-beamx.exe export_owner_key",[113,155,156],{},".\u002Fbeam-wallet-beamx export_owner_key",[14,158,159],{},"Running this command will print out your owner key. You will need it in a second when running your node.",[14,161,162],{},"Run:",[14,164,165],{},[113,166,167],{},"beam-node-beamx --port=8501 --owner_key=\u003Cput here the owner key from the previous step without the brackets> --peer=us-node01.beamx.beam.mw:8100,us-node02.beamx.beam.mw:8100,us-node03.beamx.beam.mw:8100",[14,169,170,171],{},"Wait for the node to synchronize to the current blockchain height which you can see here: ",[53,172,173],{"href":173,"rel":174},"http:\u002F\u002Fbeamx.explorer.beam.mw\u002F",[57],[14,176,177],{},"You are ready to start using your wallet. To make sure everything works you can start by running:",[14,179,180,116,183,120],{},[113,181,182],{},"beam-wallet-beamx.exe info",[113,184,185],{},".\u002Fbeam-wallet-beamx info",[14,187,188],{},"Which should show that your balance is currently 0",[103,190,192],{"id":191},"getting-the-shaders","Getting the Shaders",[14,194,195],{},"BeamX Smart Contracts are implemented with special programs called Beam Shaders. Shaders are small (or not so small) programs that can be written in several different programming languages but are eventually compiled to .wasm files (since Beam Virtual Machine runs on something called WebAssembly)",[14,197,198],{},"To get started you do not need to write or build Shaders yourself. Instead you can download the latest samples and examples from our repository here:",[14,200,201],{},[53,202,203],{"href":203,"rel":204},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Ftree\u002FbeamX\u002Fbvm\u002FShaders",[57],[14,206,207],{},"As you can see, there are several folders there called 'faucet', 'vault' and 'roulette' and maybe others. In each of those folders are two files usually called 'contract.wasm' and 'app.wasm'.",[14,209,210],{},"The reason for that is that each application comes in two parts. One part is the contract that is deployed to the blockchain (contract.wasm) and the other one is used by the wallet to interact with the contract (app.wasm)",[14,212,213],{},"We suggest to create a folder called 'shaders' under the 'beamx' folder and put the subfolder with specific apps like 'faucet' and such there.",[14,215,216],{},"Now let's see how we can run some apps!",[125,218,219,227,235],{},[50,220,221,222],{},"Get some coins from ",[53,223,226],{"href":224,"rel":225},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Fwiki\u002FUsing-BeamX-Faucet-contract-with-CLI-Wallet",[57],"Faucet contract",[50,228,229,230],{},"Put some coins in a ",[53,231,234],{"href":232,"rel":233},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Fwiki\u002FUsing-BeamX-Vault-contract-with-CLI-Wallet",[57],"Vault contract",[50,236,237,238],{},"Play Roulette with ",[53,239,242],{"href":240,"rel":241},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Fwiki\u002FUsing-BeamX-Roulette-contract-with-CLI-Wallet",[57],"Roulette contract",{"title":244,"searchDepth":245,"depth":245,"links":246},"",2,[247,248,249],{"id":28,"depth":245,"text":29},{"id":71,"depth":245,"text":72},{"id":89,"depth":245,"text":90,"children":250},[251,253,254],{"id":105,"depth":252,"text":106},3,{"id":141,"depth":252,"text":142},{"id":191,"depth":252,"text":192},"Hi and Welcome to BeamX, Confidential DeFi Experimental Platform based on Beam Confidential blockchain.","md",null,{},true,"\u002Fdocs\u002Fcore-tech\u002Fbeamx-getting-started",{"title":5,"description":255},"docs\u002Fcore-tech\u002FBeamX-Getting-Started","DDe-xzJw8lEiwwDhqc2L3la2phKeRIfGH9yci0cFG9s",[265,270],{"title":266,"path":267,"stem":268,"description":269,"children":-1},"Beam Wallet Protocol SWAP API (BETA)","\u002Fdocs\u002Fcore-tech\u002Fbeam-wallet-protocol-swap-api-(beta)","docs\u002Fcore-tech\u002FBeam-wallet-protocol-SWAP-API-(BETA)","Swap API extends Beam wallet protocol API",{"title":271,"path":272,"stem":273,"description":274,"children":-1},"Blocks, Headers, System States Concept, Relevant Structures And Values","\u002Fdocs\u002Fcore-tech\u002Fblocks-headers-system-states.-concept-relevant-structures-and-values","docs\u002Fcore-tech\u002FBlocks,-headers,-system-states.-Concept,-relevant-structures-and-values","First let's define terminology.",1783006063942]