Building Private Compliant Tokens: Aleo Workshop
Privacy & Compliance Summit Buenos Aires 2025 · 19 Nov 2025 · 1:34:20
Aleo's developer relations lead and an engineering manager teach how to build a private, compliant fungible token on Aleo, a zero-knowledge layer 1. They argue that privacy and compliance can coexist: Aleo's records hold private state, public mappings hold onchain state, and an OFAC-style sanctions check can run without revealing sender or recipient. The session covers KYC and AML at network entry points, Leo programs, a first look at the Galileo wallet, and a buildathon, then a hands-on coding walkthrough in the Leo Playground.
Speakers
Topics
From Privacy & Compliance Summit Buenos Aires 2025, hosted by Stable Summit.
Transcript
All right, I think we're going to get started here in just a second. Um, so let me go back to this title slide. Is everyone have the Wi-Fi password? He's doing the workshop. Want to just copy that down? Take a screenshot. Um, please feel free. Uh, I'll go back through if I see some people trickling in. But, uh, hi everyone. Welcome, uh, to the Alo building private compliant tokens workshop. Um, first off, congratulations. uh you guys are early. Most people don't know a lot about building on Leo, but I think once you realize how powerful it is, especially for privacy and programmable privacy, uh I think you're going to you're going to realize how how impactful this is going to be. Uh as you
can see, my name is Alex. I'm the Devril lead at Alio. Uh joined by my colleague Christie, who's the engineering manager. Um yeah, thank you for thank you for coming. So kind of going to go through our logist or agenda here and go through some logistics, talk about what resources you'll need. U give you the Wi-Fi password again and so on so forth. Then we'll go into kind of a high level thing. I'm sure a lot of you are probably blockchain native devs or or pretty experienced devs. Uh but we're just going to cover very briefly basics. What is a token? How do these things work? Um we'll go into a bit about privacy and compliance. What do those look like, you know, in general and in practice? And then we'll cover like who we are, who is Alio, how what do tokens
look like on Alo, what does compliance look like on Alo, do a bit of Q&A, and then we'll go into the actual hands-on portion where you can get rewards. So, uh, logistics again, if you're looking for the Wi-Fi password, um, take a picture, you know, get get it locked down. Um, you'll probably you'll need it later in the M workshop. Um, but we'll for for now just, uh, get get connected. Okay. So, uh we you should have gotten an email blast if you registered for the workshop with all these links already.
Um if you didn't, no worries. Uh again, feel free to take a screenshot, copy it down. Um otherwise, you can um we can figure out how to get it to you later on in the workshop. But um the biggest things you'll probably end up needing is the first one, which is the Leo Playground. That's our kind of online IDE. So you won't have to install any packages locally or or anything. It's all set up in the browser for you. Uh the GitHub is a link to the actual workshop code. We kind of give you a skeleton code file, a template to to start filling in and then um you know get get you started that you can actually load that directly into the playground which I'll show you later. We have our docs page if you're trying to
just learn about the language. Uh we'll have our faucet which we'll use to get tokens later on the workshop and then our discord and telegram is just if you want to join get connected uh talk with other devs and see what's going on. Yes. So rewards um please don't copy these down. Uh we already there's a link in the GitHub repo and and in the Luma link so you can just click on those. Uh it's just just for reference. You can earn up to 100 AO. These are these are mainet tokens. Our mainet is live. um they have actual intrinsic value. Um so yeah, you can earn up to 100 for successfully completing the workshop.
Okay, let's talk about tokens. I'm sure again many of you already know what tokens are, but for for you know complete coverage, we'll we'll go over briefly. So again, tokens onchain digital assets representing some value or utility. Um these can be funible, nonfgeible, unique, um any kind of value or utility. Um, and then usually when you talk about tokconomics, minting is when you generate new tokens. Burning is when you remove them from circulation, usually by just like completely deleting the data, and transferring, pretty self-explanatory.
So, when you hear about fungeible tokens, it means the units are interchangeable with one another. So, you can think of things like Bitcoin, Ether, ERC20 tokens, uh, stable coins. One unit of of a stable coin is equivalent to any other. So you can there there's no inherent difference. NFTTS are non-f fungeible tokens. So units are unique. They have some kind of distinct characteristic or value. Uh we're not going to cover that in this workshop. We're purely going to cover fungeible tokens for for revity. So we cover tokens. Probably most people are here to cover privacy. So what does privacy actually mean? The problem with every other blockchain is they're all
fully public ledgers. So if I try to do anything on Ethereum, BA, Salana, if someone can see my address and attribute that to my identity, they can view all of my holdings and all of my transactions in perpetuity. And if if I don't know that they've attributed that to me, I will never know that they're surveilling me, you know, in perpetuity. >> So what does that look like in practice? I just went on to Ether Scan, picked out a random address, and this is what I found. It's I'm not entirely sure who this is, but I can see every transaction they're doing. I can see their entire token holdings, how much ETH they have, um when when they created their account, like when it was funded, and it's a
total break in in the user experience of privacy cuz there's no expectation that I will be able to have some some non-disclosure of my, you know, if in the future if we're talking about salary, people will be able to see me getting paid in in tokens and that's that's not viable. So, I'm sure most of you are in privacy pill, but why is it important? If you're going to go to a coffee shop and let's say we live in this ideal world where you can pay with stable coins, they'll when you pay with something like ETH or or or on base or anything, the barista or the coffee shop owners will necessarily see your address because they'll see where they got paid from. Then they can go, you know, check all your holdings and all your balances
and they also attri and anyone on chain if they know that the coffee shop's address they can see whoever's paying to them and thus they can attribute that location data to that account. So it's a total leakage of any any kind of not just you know financial information but actual geographic location. Um you know if you're doing onchain payroll it'll leak your salary. So, you know, you'd be able to see your co-workers salaries or uh people who are trying to maybe spy on you will see how much money you're making, which is, you know, again, unacceptable. And businesses will, you know, in um institutions will show their finances and expenditures to all their competitors. So um you know Amazon for example will be able to see where Apple
is allocating all their resources and funds for the next quarter or next uh year which is a non-starter for most institutions. So I want to clarify private does not mean illegal and most people like there's been a lot of stigma for many years around that especially around tornado cash and and Samurai wallet and we can have both. So we we don't necessarily have to sacrifice legality or or or or compliance in order to get user privacy.
So you have to have some level of compliance for any kind of payment infrastructure. That's that's the world we live in. And I I think an expectation that we're, you know, going to get rid of any of these compliance protocols with this new crypto world is is um just a wrong assumption. So usually you'll see these terms KYC, AML. KYC is know your customer. AML is anti-moneyaundering. And essentially the entire purpose of it is to prevent illicit activity and you know uh establish um kind of a risk profile so you prevent any fraud and it's really the way you do that is you verify someone's identity.
So the question is again these have all always been kind of diametrically opposed concepts privacy and compliance. How do we get the best of both worlds? How do we is there a protocol where you can have both maximum user privacy and self-s sovereignty and compliance with with regulators? And there is and it's called Alo. So that's essentially what we do. We are a layer one blockchain that has privacy as a first class citizen. So it's powered by zero knowledge proofs.
Uh we don't use you know TEES or or FE were purely um CK proof based and essentially you you have programmable privacy. So you can do the similar things like private transactions shielding funds um but you can also do public transactions and it's totally programmable by the developer and by the the user what what they want to use. Yeah. So again, privacy is programmable. So developers can choose what gets revealed. So you can bake in these kind of ZK compliance mechanisms without sacrificing the user privacy.
So this is what our model looks like. Uh the colors are a little faded. Sorry about that. But um we the way we achieve this is by essentially by separating out the off-chain world with the onchain world. So off-chain you do some kind of half of the execution where the part you want to keep private and you may have some private inputs that you want to keep encrypted or you may have some public inputs that you don't really care if it gets revealed or not. Uh that's again totally up to the developer how they implement it. But what happens is when you want to keep a transaction and and data private the off-chain part you know locally on your device will execute this generate a zero knowledge proof that you know this function was e
executed correctly you didn't you know make up funds out of thin air all the rules of the proof system have been followed so on so forth and it will publish a zero knowledge proof that this was all fine once that's published it get um any remaining operations that we want to want to be public, you know, updating account mappings and things like that. That'll get sent to the onchain world along with the proof and the onchain compute will verify that your proof was correct and then execute any of the the public functions. So, it's it's a separation of these two worlds, but composed together so you can have privacy, compliance, and programmability.
So in practice, this is actually a screenshot from our explorer. You can see um our kind of native token program is called credits.alio. That's the name. Uh the function is called transfer public to private. So as you imagine, you're transferring your public funds and then you wherever it ends up, you want it to be private, shielded, whether that's to another user or you just want to convert it for yourself. So, um you can see that the public input is just the amount because you want to transfer some public funds and the private input is the recipient address, whoever whoever you're sending it to. And you notice it just says cipher text with a bunch of random characters. And you know, that's essentially saying the
recipient on chain will be encrypted. No one will be able to to know who that is other than obviously the person generating and the person receiving the transaction but the rest of the chain will not see anything about who it is other than but they'll be able to check and verify that you know this is a real address this is a real transaction u funds were were sent accordingly and then the output is some kind of a you know denomination of private um private funds and then this part is actually the onchain u code that's all public that um there's some extra functionality there.
[snorts] Again, we'll get into more detail about this in a second. Yeah. So, in separating these two kind of off-chain onchain world, you can think of off-chain as the private state world and the onchain as the public state world. And we have kind of a hybrid model of the kind of Ethereum account model and similar to like a Bitcoin UTXO model. So our private state is similar more similar to UTXOs. We consider them they're called records and essentially they're individual units of private state. In this case you can have a token record. Uh every record has an owner field because you have to know who who owns this this denomination.
And you know optionally you can program in whatever additional field. So in this case there's a balance which is some integer and or you could program any any kind ofruct structure or or you know boolean integer whatever fields you want in there. It's totally up to the developer how they how they implement it. But this is kind of just the basic uh token structure. And in particular the one critical thing that all records need to have is the owner because only the owner of the record is allowed to actually spend it and consume that record. Yeah. So this is how it usually happens.
So the way you spend records is you kind of pass it into this function. We call it a transition function. It's quite literally a state transition. And they're much like UTXOs like once you consume a record, it's marked as as used. It can't use it again. So usually how these transition functions work is if you want to pass in this record just to check something within it. Um it obviously consumes it but if you want to give it back to the user and have them have the same record data just you just want to check some information in it uh it'll output another record with this a copy of the data essentially and that'll effectively be re like giving you the same record over again or the same private state.
Yeah. So this is what it actually looks like in practice for something like transferring tokens in particular how you transfer like the ALO credits work. So you have some encrypted record owned by Alice. It has some balance. In this case it has 10 whatever the unit is. And you'll say okay Alice provides her encrypted record who she wants to send it to which is Bob and the amount she wants to send which is three units. And what it'll do is she'll execute this off-chain transition generate the zero knowledge proof which is that um pi down there. And in part in in addition she'll output two new records. One is a private state for Bob with the amount she wants
to give him. In this case at the bottom it's three. And she'll also need to generate a new record for herself with um the change amount basically. So she provided 10 input. She gave three to Bob. She needs the seven back. And the function will do all like she doesn't need to manually do these in separate transactions. The function if it's implemented correctly should do all of this you know in one shot. So that previously was the private state. In addition we have again the onchain line is the public state. Um it's very similar to to an Ethereum.
It's the concept of mappings. So um some input type you know mapped to some output type. In this case, if it's like a balances mapping, uh it's literally just some address has some corresponding uh integer value on chain. So, how do you modify public state? The way we modify private state is obviously through those transition functions, but you'll need um modifying that public state, you need to tell it to act in the onchain land as we like to call it. And the way you do that is these same transition functions, but you denote it as async transition. And the why the reason why it's called async is when you execute things offchain, you're doing it
at the time, you know, you generate the proof. It's very much in real time. When you do things onchain, that code won't get executed until a later time until it actually gets to the network and the validators have time to check that the proof was correct and then they'll execute the onchain code which is so that's why we're calling it because it's literally asynchronous when you when you um use the function. So the async transition will again do the same thing as the regular transition offchain CK proof and when you again it will return something called a future again same idea as the the async um the future is literally a call to onchain code essentially which is this um I believe there's
actually a typo here but um async function um that essentially is an onchain computation Um we're again if because it's onchain it's all public so all the inputs um will be revealed. So if you want to keep things private you'll have to do it in the offchain land. If you wanted to keep it public it'll happen on the onchain land. Yeah. So this is kind of a clear kind of diagram of what what each of these mean. So async transition is the offchain. Uh it will has a corresponding async function which is the onchain. And they're usually tied very closely together. You can't have just an async function. You'll have to have a transition that calls that async
function. And even if it's like you don't want to do anything private, you'll still have to have an async transition that doesn't do anything except call the onchain. And this is actually what it looks like in the code. So you'll have async transition, some function name, and it will return a future. You may be able to do some kind of um extra logic in there, but this in this one it's l just bare bones um call the onchain code which is bar and the icing function is bar which represents the onchain code. Yeah. And a couple of just you know minor points on compliance. Um there's usually this thing called the sanctioned address list if you're from the US. Um
it's maintained by the Treasury Department or it's called specifically called OFAC which is Office of Foreign Asset Control and pretty much it's just a list of known bad actors and illegal um illicit groups that are you know doing bad things that we don't want funds to be transferred to. And in the crypto context, it's actually just a list of cryptocurrency addresses that um regulators are telling exchanges and other groups that do not allow funds to be transferred to and from these these addresses. Uh more commonly it's called a freeze list because it's a little bit more descriptive.
So how would this look this kind of um of sanctioned list? How would that look on Alio? How would you be able to like check transactions for it? So you can imagine that a list of all these sanctioned addresses are stored in this mapping concept on chain and every time you have a transfer function, it will in the within the code will check that mapping to make sure that whoever the sender and recipient is isn't a sanctioned entity. And so the only way for the transaction to succeed is if that entity is not part of the sanctioned uh addresses. That's how you know compliance might look in practice.
So any questions. Yeah. Oh. Yeah. Thanks. uh about the compliance uh I saw that is the just the addresses that are in this freezing list but at the end you don't know who is doing the transaction so there is no like KYC uh before this checklist >> yeah so I mean there again there's obviously other KYC mechanisms especially like it's it's kind of up in flux at the moment especially when we have things like ZK KYC there's no clear guidelines and what that might look like
>> for us in particular. A lot of our KYC AML measures happen actually at the entry and exit points of the network. So the bridges and the on-ramps and off-ramps, basically in order to get funds onto the network, you have to go through that KYC AML process. But if you were to do it in this context with your token, um there's many different ways essentially to do it. You could do um if you're familiar with the the group ZK passport, they're doing something similar on another network where um you kind of have a onchain verification of your passport. That's it's essentially a zero knowledge proof of that. So you verify your identity without revealing your identity. That's one way to do it.
I think it's a little bit outside the scope of this workshop. Um but I'm happy to chat about it offline. >> Thanks. Uh I have another question. Uh two slice before or one slice later. Yeah. In where is the mapping the transaction? Maybe one after >> no >> there. There. >> Yeah. >> Um the the a synchronized function bar. >> Mhm.
um you are defining it there or when you define return bar is where the function is defined I mean >> yeah you you'll define the mapping actually at the top like top level of the file and then the async function is where you'll access it either writing to it reading from it modifying it so on so forth >> okay so the the mapping is giving the information to the assigned uh function that bar exist >> correct >> okay >> yeah so the mapping will accessible from any function within the program as well as actually other programs who call your external programs who call your program.
They'll be able to access your mapping as well. They won't be able to write to it, but anyone can read from a mapping in a program. Uh but only the program that owns that mapping will be actually have able to have functions that you know modify it. >> Thanks. >> Good morning. Uh my name is Lucas. I'm Brazilian and I I have two question. The first is about um you you teach about um the off offchain side. Yeah. For execution uh TK. My my question is about um this offchain side is is is a client that that can that who execute the zk or alo
have a one layer of chain for executing zk and other part of layer is onchain that verify this. This is a a first question and >> just and the second question is about um the decay. what type of decade do you use and what um curves uh are you have in in the layer one protocol? >> Yeah, so the network itself is all one one protocol. The offchain is just um our VM that that executes these proofs. So this language here is is LEO which is our highle language that gets compiled down into this intermediate representation of like kind of like op codes and that gets through our VM.
Those op codes get executed. uh we have the proofs like basically circuits already made for each of these op codes that um it'll execute the proof and generate the proof with that. So the users are effectively generating it on their local machine by running this compiler that that we have written. Um there is obviously an extra layer where you could do like delegated proving. So it's like I have this function I want to execute. Maybe my hardware isn't good enough. So I just send it off to a trusted party that will generate this proof. uh there's actually a way to even do that privately. So like you can generate a proof for somebody else even if you don't know what what the inputs are. Um that's actually a very active area of research and it's something we're we're working on very very
closely. Uh in terms of you know the ZK tech and the proof system we're it's purely ZK snarks. Um so if you're familiar with the proving system Marlin um ours is kind of an improvement and a modification of Marlin we call it Veruna. Um, and the curves, I don't have the names of the curves off the top of my head. It's we have two curves cuz it's pairing based cryptography. Um, happy to chat about it offline after this. But, uh, yeah, great question. >> Nice. Nice, man. Thank you. >> Anything else? Any other questions?
>> Yep. >> Hi, thanks for the talk. So, you mentioned that you're going to be L1, right? Oh, we are in L1. We're live. We're live. You're live. Okay. >> Yeah, our mainet went live last year. >> And so I'm curious what kind of um interaction you have with other blockchains or other like um so I'm I'm not familiar with with your one. So since it's private, do you have the same kind of addresses as MetaMask? Is it compatible with MetaMask? I mean, how do you expect that people will come to your L1 coming from other blockchain? like how do you how will you vampire every other chain to come to and have a big network effect let's say
>> yeah I mean it's always that's always the biggest challenge with any L1 is is you know you have to essentially redefine your user base your customer base you don't have the ex access to the existing liquidity so on so forth uh we have a couple bridges that we can bridge from Ethereum and the I believe it's Binance Binance smart chain we actually have a couple partners here who developed the bridge um uh what else yeah so we're working on Es we have um a couple integrations with so we to answer your question we don't have MetaMask yet um we kind of have a unique wallet structure um that we haven't gotten to MetaMask yet so we have our own um wallet provider basically the grantee projects we're actually working with
dynamic wallet if you're familiar with them to have these embedded wallets um yeah just our big focus now is we we're trying to get the privacy tech locked down and like make like you know private transactions work. I think we're pretty pretty satisfied with that. So a big push for us over the past few months and into the next year is maximizing interop and the user experience through wallets. Okay. And I just have a second question about compliance since it's a big part of the it's it's like a companion to privacy because you cannot have privacy without compliance and be um let's say effective >> and attract institutions. So, how are you working with compliance companies?
Like you mentioned OFAC, but I I'm not sure that there are any are there already LEO addresses that are sanctioned by OAC for instance and do you have a way to um inside already um um to be connected with sanctioned address like have an oracle that are ex Yeah. So, we don't we don't have any real oracle providers right now. Again, that's another part of thing we're trying to really maximize over the next year. Uh we do work with Predicate if you're familiar with them for a lot of our KYC AML stuff. Uh they're actually hooked into a lot of the bridges and on-ramps and off-ramps. So they do a lot of our um compliance, you know, solutions for that. And we are we are a US-based company and all our all our employees are US-based. were very
closely tied into a lot of the regulators in the US um and kind of advising them on like what you know KYC is is kind of an outdated concept and it's very archaic and needs to be overhauled um and what that will look like with things like ZK and ZK you know ID and stuff like that um it's kind of an evolving landscape >> I I just want to add a few words on the interoperability uh so if you wanted to bridge today from Ethereum you can actually do at uh on a website called barrier link. Uh that's a bridge that's live bridging from Ethereum to Alo and back to Ethereum. And what's really cool is you can bridge uh USDC or just ETH from Al uh from from Ethereum and then
on Alo you can be sending completely private transfers. Um, and that's uh vu l i n k.com verink. And the developers were sitting right here if you want to talk to them how they did that. >> Yeah. So effectively you can today you can take your ETH or USDC or USDT and shield it via AO and do all your private transactions with with you know USDT USDC on Alio. Any other questions?
Hey, how's it going? Um, yeah, just curious to know what kind of projects you're looking to bring on board or are you still at a invite only stage? We're working on a new type of stable coin. Um, we haven't chosen EVM or or any specific chain yet. We just have a product and a hackathon complete, but yeah, what's the process involved with um let's say applying with you guys or what are you open to? So the network is completely open source. Uh so anyone could come and build on our platform. We have the docs up. We have support and all that. But if you're looking for more kind of serious support and like more of a more of a partnership, we have a grants program. You can go on our website and you know you fill out an application. We'll kind of open that dialogue, figure out like what what do
you need? Are we in a right spot to to support that kind of project? Um and then also just events like this like getting in touch with us and then we can if you have a real serious partnership idea uh we can have that dialogue. >> Cool. Okay. Thank you. >> So I think let me see if it the slides >> any more questions from the audience. >> Okay. >> I need to unhide these slides because um we have some free alpha alert if you guys are interested in exclusive information.
So, as I mentioned earlier, we're trying to get more of the kind of better wallet experience. It's pretty tough with our chain in particular because we have that kind of dual public fund, private fund, and there's a lot of different like competing parts you have to kind of manage. And you know, again, we have our grantee wallets, but in particular, we have been developing our own wallet. So, this is called Galileo. uh names TBD, but it's kind of a brand new wallet experience on Alio. It's the first time we're showing it off in public. Uh it was developed by Provable, which is our labs company. So, it's developed essentially in-house and we're really trying to maximize privacy and speed as a first class citizen. So, private fully
private transactions pretty much, you know, as you know, fast finality instantaneous. You can shield any of your tokens. So again, Alo, USDC, any of your your, you know, uh, tokens you develop on the network. Um, one of the biggest challenges with that kind of record UTXO model is, you know, trying to find them throughout the network, especially if they're encrypted. So there's kind of this accelerated scanning and private fund syncing within the wallet. So it should be, you know, as seamless as a regular wallet. And in particular, that delegated CK proving that he was asking about, um, we have that baked into the wallet as well. You can if you don't feel confident your machine can can generate these ZK proofs as fast as you want. We have a de
delegated service that will you know it's designed to to maximize that speed. And in particular it's also going to ship alongside a JavaScript TypeScript SDK. So any developers who want to integrate this wallet can do so from day one. And Christine, I'm gonna >> do you want to do a demo? >> Yeah. So, I have the wallet right here. Yeah. So, this is what the wallet's going to look like, at least in the browser. We'll have a mobile version as well. Um, we chose to kind of go more to the sidebar view rather than the actual original pop-up view. You can switch to um switch to that if that's what you prefer, but I think I think this looks a
little bit nicer. So, you can kind of see here you have all your your funds and things like that. Um, you can see things like here's our AIO. Um, here's kind of the price tracker, market cap, supply, so on so forth. Um, and then we have some like USDC. Um, in this case, I don't actually have any in my wallet right now, but um, you can do send, receive, uh, split and join because if you think, um, it's kind of a unique feature because again, we have those UTXO records. And so if you have a bunch of like little change records essentially like you've gotten some, you know, minor denominations of individual records, you you don't want to manage all like thousands of different of these. So you can merge them all into
one kind of uh compressed version. And in particular, the big one is you can shield uh your assets. So any tokens um actually don't let me switch over to a different account. Yeah. One one sec. >> Yes. Uh these are test net tokens by the way. This is not real money. [laughter] I wish a bunch of money. I I I have a question. You can answer it later. I I want to know more about the tokconomics, uh how you create the tokens, what determinize the the price and if you are looking to have a a small price. So the
the price of the transactions will be less or what what is that tokconomics that you want to that do you define and you want to motivate? >> Yeah, you know there's a lot of nuance that's gone into that obviously over the over the years and we've had different kind of fee models um as network upgrades have happened but we can probably chat about that offline. Um but yeah so you can see here I kind of have a lot of public tokens and then some private. I can kind of filter between uh you know different types. This case I have 24 private tokens and 100,000 public tokens again testing tokens. So if I wanted to shield these and say this
is obviously my public balance I can pick a particular amount. So I'll do 100 for example and then I will shield them. It'll say okay here's um the network you're on the fee if you want to do a priority fee. Here's what your balance be will be before. Here's what it is after the change and stuff like that. And these are the it actually splits the changes between public and private so you know what um what's changing. So you can essentially just do shield. This is the activity tab where you can see everything that's going on. It'll do be pending moment.
Yeah. And there we go. accepted basically instantaneously. So again, you can track your date, your your changes, what network you're on, and you can actually view it on our explorer. Um the transaction second, the internet's a little slow if Yeah, there it is. So, and this will be all the details. You can confirm that it has been accepted by the network and everything's going in there. So, I essentially shielded it, which is privately transferring it to myself. And you'll notice on the explorer, there's no um you can see the sender because they were public
funds. So, I had that necessarily reveals me because I'm have to interact with public funds. But the recipient, you have no idea who it got sent to. So, it could be I could have shielded to myself or I could have shielded or sent it privately to any other address on the network. And other than obviously us in the audience, nobody on the network can see what the details of this were. And that's kind of the the huge uh superpower of of this. So now in the wallet I can see yeah I now have uh private funds. So should be an extra 100 here.
Yeah 124 from 24 earlier. So basically nearly instantaneous shielding, unshielding, private swaps, private transfers, public to private um first again privacy as a first class citizen in this wallet and a lot of the experience should be similar. You can export your private key, your seed phrase, check your connected DAPs, um and all all things like that. So let me pull up here Oh, it's interesting.
We have a sign up form for early access if you're interested in kind of getting early access to this, you know, privacy first. Um, Galileo wallet, again, named TBD. Um, please, yes, scan the QR code. Uh, you fill out the form and then you'll be the first ones to to know when, uh, it's available for, um, users to try out. Yeah, and just to add on uh set more context here is uh this is this is a new wallet. We have been working um to make a to make the private transaction experience very smooth and you can contrast that to all the existing wallets um that we have. Um so if you
want to use Alo today, you already have a couple choices. You can use the Leo wallet, you can use puzzle wallet. Um, and those are all available and you can download um, them today. But if you have if but if you actually try out those wallets, one of the biggest pain points for private transaction is because um, because it's enabled by zero knowledge proofs, what happens is you have to generate, you know, the the the the zero knowledge proof which takes a while. Um but with this new wallet and the infrastructure that we built um like delegated proving um and record scanning those services in the back end that users really don't have to know anything
about um that experience has shrunk down to a matter of seconds and um I think that's really where the direction where we're going with uh privacy and um private transfers and all the private applications we're building. Uh so that's really exciting. Yeah. And the idea is essentially the biggest hang-up for a lot of users with there's a many privacy protocols that have existed before this and then are in development now. People only care about privacy up until the point where it starts to inconvenience them. So in order to really maxim like get fullcale privacy adoption, there needs to be essentially no difference in using this fully like a fully public wallet like MetaMask and
including these private transactions because essentially if the user can tell no difference then you know it's the same experience but I also get privacy. Why would I not choose the privacy focused wallet? And that's that's been the goal with the development of this wallet is make that UX and user journey as seamless and as as you know native as possible >> question. >> Hi, thanks for for the demo. Uh you talked about uh record scanning. Can you talk more about it and how did you accelerate it? Like do you use some kind of technology like the graph or How do you manage it?
>> So, I actually don't have the specifics of that for me. I know that's kind of a, you know, research, you know, development, but maybe we can chat about that offline. I can I can get you more information on that. >> I can speak and and and like at a high level. Uh, so it's obviously done in the cloud. So, so for context, records are the the building blocks that holds the private information. So, all the for context, all the records um are encrypted, right? So you're dealing with and each record has an owner um has an ALO account. So only that owner is able to decrypt the this particular record that belong to the user. And if you think about it from the start of the chain and so so far we have 16 million
records. And so if you the part of the challenge with maintaining private state is that for each user you have to keep track of all the records that belong to this user. So essentially you kind of need to scan there are some tricks you can do but essentially you need to scan over the 16 million records in order for one user to find all of all of their private records to show the private balance on your wallet. So that's a very challenging problem uh from an engineering perspective and so uh our labs company have been building this service called the record scanning service um and there are certain tricks that they're doing uh you know including having many um having a lot of compute
running at the same time paralyzing the work um I won't go into the details but uh yeah it's been a huge engineering challenge that we are dealing with um I'm happy to put you in touch with the engineer who actually worked on this problem. But at a high at a high level, I just wanted to kind of emphasize um like the the kind of the infrastructure that's needed in order to power um the UX that's smooth to the user, which which is uh very cool.
>> Yeah. Sorry, bit of a roundabout way of explaining that. Um, yeah. So, everyone got the QR code? We're good. Uh, we have one more announcement we want to share. >> Yeah, there's there's one more announcement uh that uh we're announcing actually very for the very first time, we are going to partner with Kindo to run a buildathon. Um, and if you're a developer uh in this room or maybe uh later on uh in the video, um this is we have $50,000 up for grabs for a period of um four or five months. Uh and so let me first explain what a buildathon is.
So I'm sure all of you are familiar with the hackathon where you participate and in a hackathon for 36 hours and then you build a project and then you're done and then you go to the next hackathon right and then all all of your great ideas never actually get built into an actual product which is you know the whole point of having hackathons. So the idea is that we will have a buildathon which is which lasts for months and um you can build continuously you can enter at any time you can stop at any time and there will be 10 waves within the buildathon and um every two weeks is a wave where $5,000 are are are up for grabs and so essentially judging will happen every
two weeks and then you can participate in any wave throughout these months. you can participate in 10 weeks or you can sorry 10 waves uh to win 50,000 or you can participate in one and the idea is that you you build your idea out and then you keep iterating on it. Um, so even if you didn't win the first wave, you can see what are people building for for you know for people in the ecosystem and then you can build something better and for the next wave um and you can continue doing that and iterate and perfect your product throughout the five months. And so we're going to run this we're going to launch this program uh at the beginning of December um December.
So, the program rented this December 2025 to April 2026 uh with two demo days um at East Denver and ECC. So, East Denver obviously is going to be in Denver in the United States and then ECC is going to be in Ken's in France next year. So uh what demo day is is that we partner with the Kindo and uh the idea is that at the demo day you demo your product to to essentially uh VCs that will fund your product. So what we're trying to do is help builders build a a product and find users. At the same time we want to
help them fund raise to find the VCs that invest in these startups. So uh I I think that it's a great opportunity. Uh if you're interested uh watch out for our announcements on Twitter. This is the very first time that we are mentioning in public. Uh we actually don't have the page build out in a Kindle yet but this is again alpha alert. So it's up and coming and then we're going to announce it uh probably next week on Twitter >> and I believe akindo at their event tomorrow is will be announcing it as well.
>> Yeah. So, Akindo also has a demo day. Um, they call it like a VC matching founder day. Actually, I don't know what it's called, but it's on Friday. Um, and uh, actually, I don't have the link, but I I can if for people interested, find me afterwards. I'll share the event with you. It's on Friday. We're going to announce at their event as well. Um, and then you can go to that event and see what people are building and what VCs are funding. Uh it's it's really fun. Uh essentially it's kind of a pitching competition and then there's a certain amount of for grabs and VCs that's where VCs find founders as well. So >> and just to know we we're not going to
leave you like hanging you out to dry. Like we're not going to say oh build another platform then not help you. Like we have a lot of forums for support answering questions. We have a weekly developer office hours I I run um you can come get help, come bounce ideas off people, learn about the the ecosystem from other devs. Um yeah, and so we're gonna we're kind of gonna, you know, help help anyone who wants to build on Alio along through this process. >> Yeah, absolutely. Um we also have a grants program, but we have shifted or perfected our grants program to be more investing in uh products rather than just like oneoff ideas. And this is kind of along the same line. We want people to be continuously building um actual businesses um and you know products that
people actually use and so uh I think this is a great opportunity to get started and uh perfect or start something and then iterate along the way. Um if you have any you have any ideas you can just you know build one out if not then try something out. Um yeah anyway there's like 50,000 up for grabs. Thanks Christie. Um, so if there's no other questions, let's get into the workshop. So what is the mission for this workshop? We're going to build out a token program in LEO. Pretty rudimentary, but um it will get the point across. We're going to have basically a mint in a p in a transfer function, but in particular, we're going
to take advantage of public and private. So we have mint public, mint private, transfer public, transfer private, and we also have an actual deployed OFAC demo program essentially. Um, you don't need to worry about deploying that. I I've already deployed that on chain. You'll just, you know, basically import it and access it. Um, once we kind of have that that program ready to go, you can deploy it to test net. I'll show you how to get some credits to deploy it. Um, we have it. And then once we've deployed it, we're going to need to interact with that program on chain. So basically call all the functions you you've just implemented so we can check to make sure it actually works. Once we do that um we have a submission form.
You just fill out you know name your the GitHub repo that you have your code in um and you know your kind of transaction ids and then um you'll get your your rewards. So I'll kind of guide you along the process and we'll do the kind of walk through the first uh function or two together just so you can get used to the Leo language. So, first thing we're going to need to do, the environment we're going to use is called the Leo Playground. It's play.lelang.org. Yeah. So, this is our browserbased development environment. Um, this is not, you know, the only way to do it like like a lot of if you're really getting into LEO, we actually have a VS
Code extension. We have you can download the compiler through through cargo. Um, but this is like for onboarding people. because we do tend to prefer this just it's a little bit easier. So it will spin up just this template program. This is called auction. Um we're not going to end up using this. But what we're going to do is if you go to my the git repo that I shared, this is the workshop. So the private token workshop, we're going to go to this this sub module called token template here. And what you're going to need to do is actually fork this repo. So um it'll really help us actually it helps us track different developer metrics if you fork it and then once you do the commits. So fork it make your own copy
what I'm going to do is uh I don't think it's actually going to let me fork my own repo but um yeah. So once you we'll give everyone a second to do this but once you have this I'll show you uh how to import it. And the workshop link is in the email that was sent out yet yesterday. >> Yes. Yes. The workshop link was I can put it back on the screen if anyone needs it or it's in the email I sent out um to the workshop registrants yesterday.
Everyone good? Anyone need it? I think we're good. All right. So in the Leo playground we actually have uh GitHub integration. So let me disconnect. So you can log in with your GitHub account. Um here I'll just sign in with as myself. Uh it may give you a popup saying you need to authorize the bot to um uh authorize the bot to access it and then it might give you a warning but just ignore that. So once you see this part um it should should be easy to move forward.
at any point. By the way, just raise your hand if you're having any issues or it's not working for you? We all good? Anybody? Okay. So once once you have there, you can actually load any of your repos from from GitHub. So just hit load from GitHub. You can pick whichever repository. You'll need to pick this template repository and then clone. It should say successful.
And you should be able to see um this template program ready to go. In particular, if you check the file explorer, it should have everything um ready to go. So, so first step you need to fork the template workshop in your own into your own repo. That's the first step. And then second step, go to the playground and connect to GitHub. Then third step is to clone the repo. Select the the one that you just forked.
>> Anyone stuck? the ripple are send it to to us um in the email. Yeah. >> I can let me put the link back up just uh [snorts] >> Yeah. So, you need to fork the one the module. Uh >> yeah. So, you need to go into So, you need to go into the template module and fork the module. >> Yeah. It is the it's not this main repo.
There's actually a sub folder called the temp token template. That's the one you need to fork. Not the not the higher higher repo. Do you like it? >> We all good. Everyone solid?
>> The bot. >> Uh that's so that's just part of the GitHub integration. Um just to make it so we can access your repositories and have permission to clone it. Um I think anyone you pick you'll have to like expressively like hit the clone button, but um it'll it'll be able to look at what your repos are. Um I'm not sure if it actually will be able to access private repos. I think it might only be public. >> Yeah, it might just be public. Um I'd have to double check on that.
Okay. So, >> let's give a people a second. There's some of them are still loading in. >> Oh, okay. Gotcha. [snorts] >> Nice. Awesome. >> Uhhuh. Uhhuh. >> Okay. Gotcha. I must already have it installed. Gotcha. Okay. Yeah, it's We've had a couple changes recently, so I think that might have been something we just added.
Then click on >> contain. Ah um yeah so it's um if you go to your >> this is the one >> this is this is the module [snorts] >> yeah so I'll go back just to double double clarify with people this is the link I sent you to this repo the one you need to clone and fork and then clone is this internal one this subm module um The larger repo is just kind of the the highle explaining and like any
additional resources but the actual template itself is this internal one here. Anyone stuck? Need help?
Yeah, you can create a wallet. Create a new >> I'll go over that. >> Okay. Yeah. Uh I think Sophia is there. Uh but if you want to go Thank you. >> Yeah. Yeah. Okay. Yeah, I think it's fine.
It's called back. Oh, sorry. That's That's Yeah. So, any other hang-ups? Thank you.
Okay. So, can everyone kind of see I mean I have it zoomed in here, but does everyone see the code in their Leo Playground ready to go um source something of this of this format? So this is the skeleton code program essentially um that um we'll kind of code along here. Each of the functions have kind of been mapped out with different sections. I've commented them out just so you don't get a bunch of red squiggly lines for errors. Uh they're just it's just the function headers right now.
And we'll go through each step individually. So the first step uh you have to name your token because program names, smart contract names, whatever you want to call them, have to be unique on Alo. So we can't just call it token.alo because I'm sure somebody has taken that. So um try to make we tend to make it longer than 10 characters because there's an extra fee you have to pay for short program names. I think that was just to prevent people from squatting on program names. Um and just make sure it doesn't conflict with anything on the network. just try to make it, you know, some unique string of characters, whatever you want to call it. Uh, like Dogecoin token 123 or something like that. Uh, up to you.
Whatever you choose to change it to, uh, you're going to need to update it in the LEO program to, you know, let it know that it's a the correct program name. So, you'll update it here where it says program. Um, you can think of programs as smart contracts. That's our our version of it. But, you'll name it whatever you named it. And then if you go to the file section, this program.json here, this is called the program manifest. Um it just kind of tells the compiler what's going on, where the imports are, things like that. But what you'll need to change is actually the name here as well. So I'll call it DevCon
123. Sorry. Yeah, exactly. There you go. Um, so go back to >> here and we'll just change it here. I'm used to VS code in control S. So, it should be um where did they go? Yeah. >> Sorry.
>> For compiling the contract. Um it should be in this terminal. It'll be Leo build. So, like literally type in Leo u build. Like the compiler itself is something you'll have to install. If you're doing on your machine, it'll be uh something you have to install via cargo. You're familiar with Rust. So you do cargo install Leo. Um yeah, cargo. You install Leo and then you can just do Leo build and then car install Leo will install the Leo CLI which has all the build, execute, uh test, devet, robust kind of suite of features. Um I'm happy to go through like what that looks like um like on your local machine after this.
Um yeah. So everyone good so far? And pretty simple. Name your program. Okay. So at the top you'll see two these two kind of um critical data structures. We'll have this mapping called balances. Pretty straightforward. It's a mapping from some address to some U64 integer. So again you can think of some address and its actual public balance and then we just like the slide showed we have the token record. These are your private balances. So you'll have some set of records that of token records
that correspond to you each with some amount and your some private amount and your total private balance is just the sum of all these records private records that you own. Um, don't worry too much about the this constructor function. Uh, it's kind of an advanced feature. Um, we have program upgradability actually on on Alio if you're familiar with that. Um, it's pretty big feature we added recently. For now, we're not really going to mess with it. Um, again, happy to chat about it if you're curious.
And this dummy transition was just here um because every program has to have at least one transition and or else it will the compiler will complain. I put this here because the code was commented out, but you can just get rid of that. Okay, so first task, we're going to do a public mint very much in line. It should function exactly like it does on on in Solidity or in Ethereum. um you should just mint new public tokens by updating the mapping value the balances mapping value in particular though we're actually going to add an additional feature this compliance thing
so that you know OFAC demo program I mentioned uh if you want to check I believe here um again you won't need you don't need to do anything about cloning this but I just I provided it here for reference. Um yes, so this is the OFAC program. Essentially, it just has a mapping um called sanction that checks uh some data type to to bool. And normally you'd think why isn't it checking an address?
Why wouldn't you know we just see if address that necessarily sacrifices privacy. So if I just purely tried to check an address of recipient sender on chain then anyone could see even if I'm doing a private transfer if I still have to do that OFAC check it would leak who's who's the sender and recipient it would defeat the purpose of privacy. The reason it's this type called field, if you're familiar with cryptography and math, that's one of the data primitive types we have is like field elements. And essentially all it does is when you do this address check function, it'll take in whatever address you've provided, we've denoted it as private um just to make like this is the offchain
transition. It'll has a private address and it actually just hashes the address. So, and it will check the mapping against the address hash rather than the actual address itself. Um, again, this is this is kind of a mock OFAC. This is not actually um officially how it's implemented anywhere. But the point still gets across. Again, you don't need to do any like mess with any of this stuff. It's all implemented for you. you could simply treat it as a black box and says um you know when I implement my any of my functions I'll just call this address check from externally and it will just make sure it's all good.
how do we what does this look like? So we're going to go down to this code along section. This is where we're going to put our code. So knowing that we're going to have to, you know, normally when you were if you're only doing offchain stuff, you could just do that transition syntax I was I mentioned earlier, but because knowing we have to do some onchain irregardless because we're going to have to call the OFAC check, we're going to call we're going to end up using that async keyword. So yeah. So we'll start off doing async We may have some parameters
and then we'll do the curly braces to um show that it's a function. In particular, we got to take do a name for this. So again, mint public is what we'll call it. So it's going to be an async transition called mint public. Now, what do we need to um what fields do we need to access for a mint public? You know, barebones, we need to know who to mint it to and how much to mint. Pretty pretty straightforward.
Um it depends on actually how you want to implement it. If you want to do a fixed amount, have it hardcoded in there, or if you want people to just request however much they want to mint, we'll we'll do the the simple um just pass it in as a field. So we'll do so we'll say the first field is going to be recipient of type address and the second field is going to be amount type let's check what the mapping is type U64. So the type they should um request is a U64 obviously.
Okay. And you'll notice we can actually provide quantifiers to the arguments. [snorts] So either private or public and that'll basically when that code gets transaction gets executed on chain it'll provide a proof of this but anything that's marked as public will also get revealed again that's by your choice. If you don't provide any quantifiers, it automatically defaults to private because it's all private by default and you have the choice whether or not you want to which points you want to reveal. So, uh we'll leave it out for now just for brevity, but um if you're interested,
you can add it yourself. >> that's I guess yeah, that's true. But I guess it it gets revealed when you pass it to the onchain party. It'll get revealed anyway. Um so it's up to you whether or not you want to make it public here. Um it'll get revealed that like on during the onchain section anyway. So we can add it public here. Um it doesn't make that much of a difference. So what we'll end up doing is um because we don't actually need to deal with the
record type here because again it's all public, we can essentially just move on to the onchain part. The one last caveat is when you want to like tell the transition we need to get to the onchain part at the end, it has to return this type called um a future. So it's a function takes in an address takes in an amount and should do something onchain afterward with these amounts.
Yes, it is case dependent. So it has to be capital F future. So before we do any of the implementation, since we know that there's going to be some onchain part, let's write the rest of the the function header here. So this should be uh an async function and we'll call it, you know, a different name, but it will be closely tied to this function. We've defined the async function. You
can name it whatever you want. Uh just this common convention I like to do whatever the function name is underscore onchain. that just kind of makes it pretty clear what what it's doing and what it's what function it's tied or what transition it's tied to and what you know where it falls. Um so in particular we're going to we're still going to need the same fields as before. So we'll do recipient and amount and there's no um no option to provide any you know public private quantifiers here because it's onchain. So it's it's it has to be public.
Okay. So this is baseline. Let's kind of work um you know we'll work through just a baseline how this would work without the OFAC check and then we'll add in the OFAC check um as kind of the extra um feature on top. So we know that the mint public all it needs to do is just say call mint public on chain. So what we'll do essentially is just return a call to the future which case it's our function mint public onchain and we just want to pass through the recipient and the amount we had
and that's all. So essentially all it's doing is saying I'm not really doing anything with privacy here. I'm just going to forward it on to the onchain public land. Everyone good so far? Okay. So, in onchain land, we're going to want to update this balances mapping and with the recipient and whatever their new amount is. Uh, so what you'll need to do essentially is first figure out what the whoever this address is. You want to figure out what amount they currently have because you don't want to overwrite if they're minting and they already have funds. You don't want to overwrite their current funds. You want to add to it. So
the way you do that is we'll do let current balance uh we have type inference but for for clarity we'll do U64 and the name of the mapping is balances so we'll say balances.get get if the recipient.
>> So we declared the mapping up here and and the functions in here like when the program gets deployed on the network the mapping will get initialized and then these functions will be able to be called after the program is deployed. So we know the mapping exists. No, it's it's it's just a data storage on on chain that like you know has a literally a direct direct mapping from you know an address or of any type to a different type. So in this case it's just like correlating an address to a number that we're saying is the balance >> like building the private state to work with it.
>> So this has nothing to do with the private state. This is just public state. Okay. >> Um in the come to to the instantiation of the balance please. Uh yeah. Uh balances.get you you this this functions he turn um a literal number. Yeah. Yes. >> But if recipient don't exist is crash is a fail is a panic. >> That is a great question. I was just about to get to that.
>> Or options. Uh do >> you have a hope? >> Let me let me get to that. Um yes and yes. So um as he just mentioned what happens if recipient here doesn't exist in the mapping yet. In this case if we just use get program will crash. It will say oh I couldn't find this. It will return a null value and it will it will break. we have an additional field called or additional method called get or use and it says okay I'm going to go to the balance mapping fetch this recipient if it doesn't exist I have a fallback option in this case we'll just say the fallback is use is zero so if they don't exist yet we'll have a zero
>> for option types it's bit of an advanced feature we actually just added that like two weeks ago >> and we upgrade massively upgraded the language we we now have native option types so you can have just like Rust uh option types. Uh we don't have it in this workshop yet because again it's a pretty brand new feature essentially. Um but yeah, happy to chat about it afterward. >> Thank you man. >> Yep. So we get the current balance of the recipient. Otherwise, if it doesn't exist, we just say it's zero. And then we will want to take this current balance, add the amount minted, and then set that as the user's new balance. So
we'll do we can do that all in one shot. We'll do balances set and the key we'll set is the recipient and the amount we'll set is current balance oops try to do this with one hand current balance plus amount And that's it. Pretty much just few lines of code and you have essentially a a mint public for for your token. Uh question is now how do we over are there
any questions? Yeah, >> maybe just keep the mic. [snorts] Do you have something like um updating like um I I am a surrogar developer. Yeah. >> And we have some some some function called update that you use simple pass recipient and amount and internally this update function get your balance and uh plus with some do you have? No, that's actually a pretty good idea. I might I'll send that over to the team, but no,
you have to do it in two two different instructions right now. Um, but yeah, that could be a could be a good feature to add. >> Yeah, because because we have uh another language we have this upgrade that you you can pass one function for executing storage. >> Yeah. No, we actually we have part of what came with the option type is like a more robust storage system like just generalized storage. Um, again, I'll I'll I'll run you through the whole thing afterward. Um, yeah. So, this is barebones how you do a public mint. How do we want to access this OFFAC program?
So, if you notice back at the top, there's this import here for importing workshack workshop uh of.alio. actually believe it's been changed. Well, actually, I think it's still deployed as workshop. So um yeah, so what you'll do essentially is that's an external program. We just want to treat it as a black box and use its functions. So if we look back here, notice how the address check is um this is actually a pretty advanced syntax, but norm like for explanation, we have the async transition async
function. Once you get to kind of be an advanced developer, we actually have the shorthand syntax where you can just call it as an async block within the transition and then run it all at once. This is mainly this is just a compression of um to make it more readable. But essentially we know this is going to have some offchain onchain. So if you want to call an external program and you know it has both those components, you need to call that function in your transition offchain. execute the off-chain part, all the different off-chain parts together and then pass the the onchain call all the parts to your onchain, you know, greater function and then it will chain all those together once it's,
you know, on on the network. So, kind of a convoluted explanation. I'll show you exactly how that works. Yeah. So what I've done here is essentially called this transition uh address check in the external program.
Just pass it the address of the recipient to make sure. And what this returns is a future again the call to the onchain code. You can think of a future almost like an object that you can manipulate. So here this value that's being returned from the address check is a future in itself. So what you can do is actually pass um this future as part of like inside of another future and then await it in here. So what this looks like is Yeah. So you if you edit the function
signature, one of the types you can actually have as your input is a future. So it's literally a call to another function that you can await. So essentially you call the transition part here. You get some you know call like note that says we need to call this external address check at some point and we'll pass it to our onchain land where it will be able to access that and and await it for it. So we'll add need to add one more line once we have this address check. There's a specific syntax to use it.
So if you're familiar with the async await [snorts] model in things like TypeScript, pretty much the same thing. It's a future and you have to await that future. Does that kind of make sense to everybody? any any other, you know, hang-ups on that. Good. Okay. Cool. So, this is what mint public is essentially with. you have some kind of, you know, again, public mint function just like on other chains, but you have the
compliant OFAC check baked in as as part of it. So that's public. You're probably asking, what about private? How do how do we do privacy here? So we're going to do the exact same thing but with private. So I've actually given you the function signature here. Uh we'll just uncomment it. Oops. So, very similar layout as before. Um, async transition mint private. We have the recipient. We have the amount. Uh, we have the address check in the onchain land. Uh, we return the future type. The
one difference here is instead of uh just returning the future, we actually return this thing called token. And remember token is this private record type that we have we've declared. this is where we'll start to get into the offchain land and like creating these records offchain and it will all be private. So the way we'll do it is essentially all you have to do is declare the token. So new token and we'll say it's of type and
you'll have to essentially construct it. So in this case it'll be literally just the token caller and the owner should be this recipient because you want to mint it to them. And the amount or I believe it is amount. What's the name of the field? Yes, amount. The amount should be uh the amount passed in. And it it the compiler is smart enough to know that like amount here is the name of the field and amount here is the actual argument passed in.
So this initializes the new private record, private token record that says it belongs to the recipient and has some denomination what we'll do is essentially all you have to do then is return new token and it will generate the zero knowledge proof that this new token is in fact valid. It is a valid record you could spend on the network, but the actual data of the record itself will be entirely encrypted, totally private, entirely offchain. So only you will be able to decrypt its information and have permission to spend it.
>> Uh no, it's not necessary, but uh it's it's yeah, I I have it. I put it there. Um yeah. 90 >> 90 we we need to put um comma in the final of line >> this one >> like like no no no and anything hit return hit return >> oh yeah so yeah let me let me >> or it's like a rest that you just just put the return value and return >> you just put the return value >> oh okay but but don't need dot dot common for in the final the >> Oh, the future you're talking about or >> the dot dot
>> dot comma semicolon. >> Oh, no. No, you don't. Yeah, you do not need the semicolon. >> Okay. Okay. >> Uh well, uh actually, yes, you do. Sorry, that was a good point. But I Let me finish filling this in. >> Uh so, yeah, again, we're going to need this future type as well. It's going to be exactly the same as um as above. We're just going to call this workshop address check and then await for it. So same as before, this is our address check and the two things we'll return are um this new token.
Actually need to return it as a tupole uh just and a call to mint private on chain with this future past as an argument. Good so far. Okay. Yeah. And the only so in this case because we did everything offchain privately, the only thing that should happen onchain is literally just awaiting this address check which again as I said doesn't actually use the real address. It will actually hash it first and then the only thing the check will see on chain is the actual hash. So, all we'll do is do um address check.wait.
And that's it. And then you have your mint public and mint private ready to go. Questions? Yeah. So if we can actually uh if this will cooperate. So if we do here um actually do we compile it?
I have to do it here. Leo build. Oops. Oh, I cannot see. I think I forgot a s. Yes, when you declare the token, you do need the semicolon afterward. Yeah. So, if all goes well, it should build. It'll tell you some compiler statistics if you're interested. It'll give you the check sum for the program, uh, if you're familiar with what that is. And it should have built correctly.
Um, and if you want to check to see how things work, you can do uh leo run and then give it the name of uh function. So we'll do, you know, mint private for example. And I'll need to give it a uh particular address. I'll just use this one. Doesn't really matter because this is actually just for testing. uh the LEO run it purely just execute like runs your program to check and gives you the output to see what it would be. If you want to actually execute and broadcast the network, there's a different command for that. But um >> yeah, say same as as in the public
context. So you'll see down at the bottom here uh it's a little hard to see but uh the output of the program was this is remember this is mint private you can see the record that was output this is
not like real it hasn't been broadcast to chain this is just a sample like what the execution would look like. Uh you see the record the amount um there's these uh identifier fields that you don't have to worry about programming gets added for you but it's like the nons and the version and um the call to the external function like workshop of you can see what what was passed there and this what would show up on chain. Is anybody um having problems with Okay, I think people are still compiling. So >> yeah.
>> Compare is correct. >> Okay. So normally we would get through the transfer public, transfer private. I think we're running short on time. So I'll just I'll show you guys how to deploy your program and interact with it. What I was doing here with Leo run is essentially just how you test it locally, how you just check check the output. But what we can do is me zoom out here now that if it so long as it compiles correctly what you can do is you'll need some tokens to deploy. So what you can do is the website is called faucet.alo.org.
Um and that's essentially how you're going to get tokens. Otherwise, I can actually just send them to you if if this doesn't work. But, um, you'll have to actually install one of our wallet partners to to access the faucet. Again, if you just want to generate an address, I can I can send you some tokens as well. >> Uh, both are great. We actually, so the Alio Labs company just acquired Leo wallet, so this is technically an official Alo product now. Um, so yeah, happy to happy to show you to do how to do that.
Yeah. If you don't want to do that, I can just if you just want to generate an alio address, I can just send you the tokens. >> Yeah. Yeah. So, you can you can do it just from the terminal and I'll just send it to you. Um Yeah. So, if you go on the sidebar here, you can do it in the terminal or you can just do it from here. >> Yeah. You can just create a new account straight through. >> Yeah. Yeah. And you can do all your account management as well. So loading from keys, signing messages, all that. It's all it's all all done for you.
>> Um Yeah. >> And then you want to quickly run over the submission form. >> Yeah. So when once you get your test net tokens, you'll just need to come over here and deploy your program. And then you'll get a transaction ID. And um if you go this this link by the way and this stuff is in um it's in the Luma link. It's in the actual the bottom of the readme of the GitHub and it's here. Uh just let me know what the most convenient way to get this to you is. You can always go back and reference the email later, the Luma link, or even, you know, the re the replay you just forked has it in the
read
Related talks
- Privacy in a Digital Age
- Why Privacy Matters | Ameen Soleimani | ETHDam 2023
- Privacy-First CBDCs
- DappCon 2023: The Future of Privacy and Proof of Innocence - Ekrem Bal
- The Privacy Stack: Who Sees What, When, and With Whose Consent
- 135 - Crypto Wars 2.0 with Zooko
- Central Bank Digital Currencies: How Should Privacy Be Built In? - Ep.206
- Compliance and the next wave of privacy applications
- Privacy and Compliance: From Tornado Cash to Privacy Pools
