# Dash Platform Walkthroughs Part 3 with Noah Hein

> Noah Hein joins Anthony Campolo and Rion Gull to speedrun a Dash Platform tutorial from wallet creation to a Next.js notes app.

- **Collection:** Video
- **Published:** 2024-06-15
- **Author:** Anthony Campolo
- **Canonical URL:** https://ajcwebdev.com/videos/2024-06-15-dash-platform-walkthroughs-part-3-with-noah-hein/
- **Markdown URL:** https://ajcwebdev.com/videos/2024-06-15-dash-platform-walkthroughs-part-3-with-noah-hein/index.md
- **JSON URL:** https://ajcwebdev.com/videos/2024-06-15-dash-platform-walkthroughs-part-3-with-noah-hein/index.json
- **Channel:** [Dash Incubator](https://www.youtube.com/channel/UCZVi0jeaBJ-bYcXQabnE9jA)
- **Original URL:** https://www.youtube.com/watch?v=lGfFgD85U8c
- **Original Label:** Watch original

---

## Episode Description

Noah Hein joins Anthony Campolo and Rion Gull to speedrun the Dash Platform tutorial, building a notes app from wallet creation through a Next.js frontend in real time.

## Episode Summary

In this third installment of the Dash Platform walkthrough series, Anthony Campolo and Rion Gull host Noah Hein, an AI engineer with a background in crypto developer relations at QuickNode and Phantom, for a rapid-fire run through the full Dash Platform tutorial. Noah introduces himself and his current work at Small AI before diving into the hands-on portion, where he installs the Dash SDK, creates a wallet, funds it through the testnet faucet, and registers an identity on the proof-of-stake platform chain. The conversation weaves technical execution with conceptual explanations, as Rion clarifies the relationship between Dash's two chains, the role of identities and credits, and how data contracts function as JSON schemas that documents must adhere to. Along the way, the trio troubleshoots Platform Explorer indexing issues, discusses homograph attack mitigation in name normalization, and explores schema definitions in the JSON Schema spec. The session culminates in building an Express backend that exposes identity data and a Next.js frontend that consumes it, demonstrating end-to-end how a developer might construct a decentralized notes application. Noah praises the tutorial's ergonomic structure and offers a positive comparison to his Solana experience, with Rion noting opportunities for paid contribution work for those interested in continuing.

## Speakers

- Anthony Campolo
- Noah Hein
- Rion Gull

## Chapters

### 00:00:00 - Meeting Noah and His Path Through Crypto

The episode opens with Anthony welcoming Noah Hein and Rion asking him to share his background. Noah recounts how he transitioned from managing fast-food restaurants for seven years into tech by teaching himself to code, meeting Anthony through tech Twitter, and eventually hiring him at QuickNode, an RPC provider often described as AWS for blockchains. He describes spending roughly two and a half years in crypto developer relations across QuickNode and Phantom.

Noah explains Phantom's position as the largest wallet on Solana and the second largest on Ethereum, with recent Bitcoin support and likely Move-language expansion ahead. The conversation drifts into the technical headaches of multi-wallet coexistence on Ethereum, where every wallet clobbers window.ethereum and impersonates MetaMask flags to get picked up by dApps that haven't explicitly integrated them.

### 00:06:00 - From Web3 to AI and Setting Up the Tutorial

Noah pivots to describing his current role at Small AI, a pre-product company building AI-powered data summarization tools. He references the AI News newsletter run by Swyx as an example of the platform in action, pulling daily content from curated Twitter lists, subreddits, and Discords to generate summaries that help readers stay current without doomscrolling three services.

Rion frames Noah as the kind of Web2-friendly developer the show seeks out and proposes an accelerated walkthrough given Noah's technical fluency. They settle on running Dash version dev.12 rather than dev.15, since Platform Explorer and the network appear better tuned to the older version despite the SDK having advanced. Noah copies the package.json scripts, nukes node_modules, and reinstalls to begin the tutorial properly.

### 00:11:00 - Wallet Creation and Funding from the Testnet Faucet

Noah works through the initial scripts, importing Dash, generating a wallet with a twelve-word mnemonic, and saving it to the .env file. A brief detour covers Node version managers, with Anthony advocating for Volta over NVM and Rion mentioning Webby as another alternative. Noah encounters the env-file flag error and resolves it by switching to Node 20.

The funding step requires the testnet faucet, which Noah jokingly identifies as his favorite part. After working around an unsecured-domain warning and trying the masternode promo code for extra coins, his transaction shows as unconfirmed in the Block Explorer. Rion explains that Dash transactions use InstantSend for near-immediate confirmation, separate from the 2.5-minute block confirmations, contrasting this with Bitcoin's ten-minute blocks.

### 00:18:00 - Creating Identities and the Two-Chain Architecture

Noah runs the createIdentity script while Rion explains the structural distinction between Dash's two blockchains: a proof-of-work chain for the wallet and a Tendermint-based proof-of-stake chain for Platform. Both derive their key pairs from the same twelve-word mnemonic, but they operate as separate networks under the hood.

After successfully creating an identity, Noah moves through retrieving identities and topping them up, which converts funds from the L1 proof-of-work chain into platform credits usable on the L2. Rion takes a moment to explain that Dash was actually the first DAO, with a superblock that pays out to successful proposal owners, funding entities like Dash Core Group and Dash Incubator that work on Platform development and testing respectively.

### 00:24:00 - Registering Names and Understanding Documents

Noah registers the name "inhindev" through the DPNS naming service, which Anthony likens to ENS for Ethereum. The conversation turns to documents, which Anthony describes as JSON blobs persisted on Platform without needing custom smart contracts, and Rion clarifies are objects adhering to data contract schemas, similar to document database paradigms.

Noah connects this to his experience with TBD's decentralized identifier work, which uses a similar schema-pulling approach for interoperability. When the retrieved name shows the label normalized with a 1 substituted for the lowercase i, Anthony explains this mitigates homograph attacks, where bad actors might register visually similar variants to scam users. Platform Explorer shows API indexing has been disrupted, which Rion pings the maintainer about.

### 00:30:00 - Data Contracts, Schemas, and Schema Definitions

Noah creates a register-contract script defining a note document type with message and position properties, then publishes it to the network. While the contract registration takes notably longer than other operations, Rion acknowledges the slowness as a UX issue worth investigating. They confirm the contract on chain and copy its ID into the .env file.

A productive tangent explores the meaning of schemaDefs, which appears null in their output. Anthony reads from JSON Schema documentation that schemaDefs creates a section for reusable schema components that can be referenced throughout a schema, useful for protocol-level standardization where applications like a hypothetical on-chain Twitter would want shared entity definitions. The dollar-sign keys are clarified as JSON Schema reserved keywords.

### 00:36:00 - Updating Contracts and Submitting the First Document

Noah updates the contract schema and adds an apps configuration to client.js, allowing dot-notation access to contract documents. He works through submitting his first note document with a "Hello from AJC Web Dev" message, which writes successfully to the chain after a short wait. The output shows the document with all its system fields, though createdAt and updatedAt come back null.

Anthony discovers in the docs that those timestamp fields only populate when explicitly added to the contract's required properties list, something he flags as an improvement for the tutorial. Noah retrieves all his documents to see the chronological list of writes, then prepares the update flow by saving the document ID into his environment file.

### 00:59:00 - Updating, Deleting, and Inspecting Documents

Noah writes the update-note-document script and modifies his message before pushing the change to chain, with a brief joke about not plastering Anthony's name across the Dash network. He then runs the delete script, prompting a discussion of whether deletes refund credits. Rion believes Dash returns funds for state deletion similar to Solana, though the transfers list on Platform Explorer doesn't immediately confirm this in their session.

Inspecting the identity in Platform Explorer reveals the documents tab, where the deleted document shows a null current state with a revision count of two, while still appearing in historical data. Rion suspects this history lives at the explorer level rather than on-chain, with the chain itself only retaining the latest state, though he flags this as something to verify.

### 01:08:00 - Building the Express Backend and Next.js Frontend

With the chain interactions complete, Noah scaffolds an Express server that exposes the identity data via a name parameter, confirming it works by hitting localhost:3001 with his "inhindev" handle. He then bootstraps a Next.js application using create-next-app inside the same dash-examples directory, opting for App Router and accepting most defaults except TypeScript.

Rion asks why the architecture uses a server rather than a single-page application, and Anthony explains that client-side code would expose the wallet mnemonic, making a backend essential for any operations involving signing. After hardcoded localhost references are corrected to use Noah's actual name, the Next.js page successfully renders the identity data fetched through the Express endpoint, completing the full stack.

### 01:13:00 - Reflection and Closing Thoughts

Noah reflects on the experience as comparable in quality to Solana developer onboarding, noting the hoop-jumping is endemic to crypto rather than a Dash-specific issue. He appreciates that the script-by-script tutorial format gave him room to ask substantive questions like the schemaDefs investigation, something a button-clicking GUI demo wouldn't have surfaced.

Rion mentions that this kind of contribution work is paid and offers to coordinate with Noah off-stream. Noah closes by complimenting the tutorial's ergonomic design choice of pre-defining all scripts in package.json upfront rather than incrementally, which would have added cognitive overhead during learning. Rion signals that more walkthroughs are coming throughout the following week before signing off, with the episode ending at 01:18:14.

## Transcript

[00:00:01] - Anthony Campolo
And we're live. What is up, Noah?

[00:00:05] - Noah Hein
Hey, thank you so much for having me, Anthony. I really appreciate it.

[00:00:10] - Rion Gull
Yeah, yeah, good to have you, Noah, as well. I, I don't know you at all, um, so Anthony is introducing us for the first time. So, uh, I would like to, to get to know you a little bit personally, where, how Anthony roped you into this, what your interest or disinterest in crypto is. Where you're from, what you do, all that kind of good stuff. Just so whatever you would like to share about yourself.

[00:00:35] - Noah Hein
Yeah, totally. Um, so I'll start. Um, I'm from Texas. Uh, I recently moved from Austin. I'm in San Antonio currently. Um, I met Anthony, uh, as I was learning to code. Anthony was like very much my first friend ever in tech, as it were. Uh, neither of us were employed in tech at the time. We were both aspirationally, uh, coding. I pivoted from frying chicken. I worked in fast food for about 7 years as a manager in the food service industry.

[00:01:09] - Anthony Campolo
Yeah, you were frying chicken, I was driving for Uber.

[00:01:12] - Noah Hein
Yeah, and so I, I started teaching myself how to code. I got into Twitter and the whole tech Twitter kind of ecosystem as I was learning to code. Met, became friends with Anthony, and we both shortly got jobs after becoming friends with each other, and eventually I hired Anthony to come work at the company that I was working for, QuickNode. QuickNode is an RPC provider in the crypto space. So if you are looking to read or write blockchain data, they're kind of the go-to solution for things like that. AWS for blockchains, for anyone that isn't super familiar with that whole side of Node operations. So that's how I got to know Anthony and kind of got my foot in the door into tech and crypto at the same time. And so I worked in developer relations and general content, technical content creation/engineering for about 2.5 years in the crypto space. Did about a year and a half at both QuickNode and Phantom. Phantom is the best crypto wallet in the game as far as I'm concerned. Obviously I'm a bit biased there, but I think they have a really good product.

[00:02:27] - Rion Gull
Are they focused on the— what ecosystem are they focused on? Is it Cosmos or something else?

[00:02:36] - Noah Hein
No, so they're the largest wallet in Solana and then they're the second largest wallet in Ethereum and then they just added Bitcoin support recently for all the Ordinals degens. I think they announced Move. I'm not 100% sure about that. I think they're targeting Move as like the next, like Move-related languages. So what is that like Sui and Aptos, those kind of guys will probably be next on the roadmap. I don't have any insider information there. I don't work at Phantom anymore. So that's, I think, speculation on my end, but they're a multi-chain wallet. And that's like their main focus is actually making that an enjoyable experience. So you just kind of have one account and then you can have all of your addresses associated with it. So I have like one Phantom account and it has all of my Polygon, Ethereum, Bitcoin, and Solana addresses all stored in that and I can just kind of interact, interact, interoperate across chains easily. So that's kind of what they did. I did developer relations for them as well, kind of leading their, at the time, their EVM go-to-market. So I had to go in and integrate with all the various kind of like wallet suites, like WalletConnect and RainbowKit and Wagmi, all of those kind of ancillary React front-end services, 'cause nobody wants to code their own, wallet UI because the logic there is quite finicky. Um, and there's even some EIPs that are like still being shipped like 2 years later trying to fix the, the whole, uh, kind of monkey patch situation because everyone just clobbers window.ethereum. So you have like 10 different wallets that are all just trying to jump the exact same window object.

[00:04:21] - Rion Gull
Ethereum has become window.everything anybody ever wanted.

[00:04:26] - Noah Hein
Yeah, yeah. So it's, it's not great. There's, there's some technical stuff happening there.

[00:04:31] - Rion Gull
That's, um, their own namespace on that, like window.cosmos or window.dash or window.solana?

[00:04:41] - Noah Hein
'Cause one, dApp developers don't want to deal with that. Like it's already hard enough to integrate however many different wallets that you're gonna have. So it's difficult on the ecosystem as a whole to be able to adopt all of those. So you kind of need some sort of standard. So Web3 or window.ethereum is very much the standard currently. But just due to how the architecture exists currently, it's like every single wallet that the person has installed tries to go to window.ethereum and just tries to do various things. And so there was also some awkwardness in kind of the incentives for some of the wallet modals were not always aligned to being as open as possible. And so that led to people trying to impersonate MetaMask. So MetaMask tries to inject that window.ethereum .metamask, uh, there's just like an isMetaMask flag there that's set to true. And so as a new wallet that has no users, you're just like, hey, I am window.ethereum.isMetaMask true, and hopefully that'll make the other dApps pick it up whenever a user has us installed without having to go to the dApp and actually integrate with them. So there's like— it's a complicated situation and it's not great, but that story is getting better. So I did a lot of work over there. And wrapping up to the present, I now work in the AI space as an AI engineer for a company called Small AI. We're pre-product currently, and so we're just building out that product. We're going to do kind of like AI-powered data summarization. You can kind of see if you go to AI News, that's a button-down newsletter. There's a web archive. It's run by Swyx currently. That's— he makes that newsletter entirely using the platform that we're building out currently. But that is essentially a way to stay as well. So that whole process just goes through and takes— we do it daily. So it takes all of the information from a particular subset of people. So we have a Twitter list that we've kind of specially curated for this. And so we take a newsletter, or we take a Twitter list, we take some subreddits, and we take some Discords, and we just grab all of that information, and then we write a summary for it, and you get emailed that daily. So that you can get— essentially, you don't have to scroll all 3 separate services all day, every day. You can just go through and, you know, it's a longer newsletter, so you can definitely kind of pick what you're interested in or Ctrl+F for some of your interests on a given newsletter. But it's just a way to kind of stay up to date and keep your finger on the pulse of a given space, in this case for AI.

[00:07:32] - Rion Gull
Very cool. So Swyx, you mentioned Sean Wang. For anybody who isn't in the Web2 space, That is one of my goals here, is to try to find the Web2 people who are also Web3 friendly. And it's a, it's a little bit of a challenge, but it sounds like, you know, there are quite a few if you know the right corners to look in and whatnot. You're definitely, if anybody hasn't already picked that up, like, you are definitely right at that nexus. So thanks for joining us today, and I'm sure that we can probably make some good progress if our network is running well today. So we are running on a testnet right now, and I think without further ado, we will jump right into that. Because Anthony, um, correct me if I'm wrong, but, uh, I think today we should try to speed through and see how far we can get in like record time. What do you think?

[00:08:29] - Anthony Campolo
Yeah, yeah, I think we could probably get pretty far because, um, there's not going to be as many kind of like noob questions of like, what's a chain and stuff like that.

[00:08:41] - Rion Gull
There's anything wrong with that? That's just, um, but yeah, yeah, let's, uh, let's bring up your screen, Noah, and, and we'll, we'll jump right into the tutorial. And basically, yeah, Anthony, you can, you can tell them how to navigate that since you wrote it, and I will field questions when they come and add anything that I really feel like I—

[00:09:03] - Noah Hein
we should.

[00:09:03] - Rion Gull
But for the most part, I think we will let you do your thing and we'll just be a resource for you as you go.

[00:09:12] - Noah Hein
Awesome. All right, so Anthony, am I— what am I doing here? Am I just going, going through the blog post step-by-step tutorial mode?

[00:09:20] - Anthony Campolo
Pretty much, yeah. You can skip all the the preamble, just go right to creating the project. Cool.

[00:09:29] - Noah Hein
Okay, um, so I, I was a little bit, uh, ambitious here before the stream. I already made this, this Dash examples here, so I'm just gonna copy all of this and see if that, that runs through. My favorite thing is installing.

[00:09:51] - Anthony Campolo
Brian, do you— which, which Dash version do we want to do?

[00:09:57] - Rion Gull
So yesterday we did this and we were using Dash 15. I'm not seeing which one we're using.

[00:10:04] - Noah Hein
We're on 1.0. This is good. You—

[00:10:07] - Anthony Campolo
it's good. Do the same thing. It's gonna install.

[00:10:09] - Rion Gull
We'll have to look in the package.json, but it'll probably show dev 15. And I think that we should maybe try 12 today and see if, see if things run quicker that way.

[00:10:22] - Anthony Campolo
Like we—

[00:10:24] - Noah Hein
a dash says 4 for dev 15.

[00:10:28] - Anthony Campolo
Yeah, so let's change that to 12 and then nuke your Node modules and npm install again because we're— there's controversy over what version we should be using and what's going to be the, the most current.

[00:10:43] - Rion Gull
Yeah, so the SDK is up to version dev.15, but the network is kind of running tailored to dev.12 so far. And in theory, it's supposed to be compatible, but, um, one of the things we ran into yesterday suggested otherwise, at least in terms of speed. So we'll test this, um, test 12. And see if we run into issues and we'll push the 15 if we do.

[00:11:12] - Noah Hein
Okay, so we're making some new scripts here as y'all are talking. I'm just going through, I assume that is okay given you said speedrun, so I am trying to, uh, yeah, these curlies. Thank you very much. And we need a comma. There we go. Cool. Um, And so I want to create a scripts directory. Okay. So we're gonna— so this, this is telling me what— and then I'm just running this command. So essentially, I don't— I— it's one or the other. Is that right? So if I'm just— if I just copy this, I just did that. Okay, cool. Great. I have an empty API, should have a client.js, and an empty scripts folder. Okay, that is Wonderful. And so, and so I don't need to add anything yet to my scripts. I just have an empty, an empty thing. Okay, we're gonna import some Dash. Great. We haven't created a wallet yet, so yeah, my mnemonic is null. That's, that's great. And we'll just run that, and now my My scripts has a create wallet JS. And then we will put in here a new thing. That's great. And now npm run create wallet. Bad option, env file equals.env. That is peculiar.

[00:12:51] - Anthony Campolo
Check your node version again.

[00:12:54] - Noah Hein
Node -v. Oh, oh, um, npm use 20.

[00:12:58] - Anthony Campolo
Yeah, and this is, this is why you should use Volta, not NVM. NVM is the scourge of my life because of stuff like this.

[00:13:06] - Rion Gull
Well, if we're talking NVM alternatives, there's also Webby by, uh, AJ O'Neill, so I just have to throw that out there. Webby, webinstall.dev.

[00:13:18] - Noah Hein
Ah, okay, so did this script write to my.env or do I need to copy this? You gotta copy it.

[00:13:25] - Anthony Campolo
Yeah.

[00:13:26] - Noah Hein
Okay. Um, copy. Cool. And the, yeah, the space. Okay, cool. Um, I'm doing the right thing. Add some stuff into my.env.

[00:13:42] - Rion Gull
Just make sure that you have 12 words for your mnemonic, cuz, uh, for some reason this kicks out.

[00:13:47] - Noah Hein
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20. Yeah, 12. Uh, yeah, yeah, that was 12. All right, yeah, yeah, certainly not 24, that's, that's for sure. Yeah. Um, okay, or actually, let me, let me actually— I feel like I counted 14, but that could have been different.

[00:14:11] - Anthony Campolo
This is different from what's in your terminal.

[00:14:13] - Noah Hein
The terminal is, um, I, I made— so I didn't want to copy this from my terminal, so I ran another one and piped it to my clipboard. And then I copied that. So it was an additional, an additional run.

[00:14:24] - Anthony Campolo
Yeah, yeah, I could write the script so that they would write straight to your.env, but, um, yeah, said, by the way, we just created some magic in your.env file for your, your secret phrase.

[00:14:38] - Noah Hein
So that— we try not to do that. Okay, so now my favorite part, adding funds to a fresh wallet. Um, so I'm gonna go to the testnet faucet. I am unable to handle this request.

[00:14:52] - Anthony Campolo
Delete your HTTP whatever whatever and just search straight from that. This is, uh, this is—

[00:14:59] - Rion Gull
I kind of wonder if you were joking about the— this being your favorite part, but no, not just for notorious for being terrible, and we are no exception.

[00:15:08] - Noah Hein
Okay, so what did you tell me to do, Anthony?

[00:15:10] - Anthony Campolo
I need to say— so just like delete, delete the HTTP or HTTPS and just start with the beginning of the domain.

[00:15:19] - Noah Hein
Yeah, see, unsecured, unsecured. Yeah, let's see. All right, I am not a robot, and let's get some coin. Do I need to—

[00:15:30] - Anthony Campolo
oh yeah, put your wallet.

[00:15:31] - Noah Hein
Okay, this is— that, that's not entirely clear to me. Okay, so everybody—

[00:15:35] - Rion Gull
yeah, that's everybody too.

[00:15:37] - Noah Hein
Um, so let's pull that and put that in there. Oops. Oop, that is not what I want. YT-. There we go. Uh, do I have a promo code? Does this matter? Am I just getting—

[00:15:55] - Rion Gull
you can put in masternode and that will give you more coins.

[00:15:58] - Noah Hein
One word?

[00:15:59] - Rion Gull
Yep.

[00:16:00] - Noah Hein
Masternode. Hell yeah, I love getting more coins. It's my favorite thing.

[00:16:08] - Rion Gull
More free stuff.

[00:16:10] - Noah Hein
Okay, so I see some— my, my bar is loading. I've made a request of some sort.

[00:16:18] - Rion Gull
Yeah, this is likely getting very far where it will probably crash, and then that generally means that you probably have some coins.

[00:16:27] - Noah Hein
Verification expired.

[00:16:29] - Anthony Campolo
Okay, that's a new one.

[00:16:31] - Noah Hein
Try that again.

[00:16:37] - Rion Gull
Anthony, do you have some coins that you can send him?

[00:16:40] - Noah Hein
No more Dash for me, come back in 1 hour. Okay, great.

[00:16:44] - Anthony Campolo
Well, you might— that means you might have gotten it.

[00:16:46] - Noah Hein
I believe that is what that means. Here, I'm going to pull up this again. Sorry, I don't want to share all of that. Let's see, we can open this back up and scroll. Scroll, scroll. We did this, we did this. Okay, so we want to go to the Dash Block Explorer. Okay, I wish we should make these link a new tab. And so I want to put in my address, yeah, and see what I've got. I have no— I have an unconfirmed transaction balance.

[00:17:25] - Anthony Campolo
Okay, that's good. That means you're good.

[00:17:28] - Noah Hein
Okay, so even though it's on— how long should it take to confirm?

[00:17:32] - Rion Gull
Um, this, it'll confirm— basically it's already confirmed. Um, it generally— this, um, this block explorer doesn't recognize our instant send feature, which, uh, it did, but, um, it's probably already confirmed.

[00:17:50] - Noah Hein
Okay, cool.

[00:17:51] - Rion Gull
You can refresh. It's the difference between, uh, transaction confirmation the way that Dash does it, which is an instant send feature and block confirmations. If you're familiar with Bitcoin, which you are, you know that the blocks confirm every 10 minutes.

[00:18:05] - Noah Hein
Yeah, that shit sucks. 10 minutes. That's tough. That's tough.

[00:18:09] - Rion Gull
Our blocks confirm every 2.5 minutes or so, but the transactions actually confirm instantly, and so they're instantly usable.

[00:18:18] - Noah Hein
Okay, cool. So do you want me to walk through the transaction that I got sent, or am I just scrolling down to more code?

[00:18:24] - Anthony Campolo
Keep going to the next script.

[00:18:26] - Noah Hein
Keep going. So this is my client.js, and so now I need to make some adjustments. So I am just gonna paste that in and we'll kill— we'll kill that. That's fine. Great. And we're gonna create a file called Interesting. What was, what was that? Excuse me. Okay, that was weird. Okay, so in createEntity.js, we're going to create an identity. That's great. We're gonna log out some stuff. My identity's ID along with my platform block explorer. Okay, that's great. And then we're gonna run it. We're gonna npm run createIdentity.

[00:19:22] - Anthony Campolo
This is where we find out whether the network works or not. Do you want to talk a little bit about what an identity is, Ryan, while this is running?

[00:19:34] - Noah Hein
Are you tracking my identity on the blockchain? I don't appreciate that. I'm supposed to be anonymous at all times.

[00:19:41] - Rion Gull
Yeah, it's a, uh, it's a permissionless identity. Um, so Yeah, I'll use this time, I guess, to talk about the difference, the two different blockchains in Dash. So we have a proof-of-work blockchain and a proof-of-stake blockchain. What we're dealing with with this tutorial is the proof-of-stake blockchain.

[00:20:03] - Anthony Campolo
Hey, Ran, awesome.

[00:20:06] - Rion Gull
Yeah, so it's a Tendermint, it's based loosely on Tendermint. Proof of stake, but we have some pretty heavy modifications to that. And the identity that we just made is basically the first step to interacting with DApp platform, which is the product that we're going to be using here.

[00:20:35] - Anthony Campolo
I spelled identity wrong.

[00:20:39] - Noah Hein
Identity. Okay, I'm just gonna copy this. Cool. Um, great.

[00:20:52] - Anthony Campolo
So maybe we'll need to do the whole thing then at this rate.

[00:20:55] - Noah Hein
I've got my identity ID. I need to make another. I'm curious, what, uh, why you have echo instead of Touch? Oh no, it seems that's like totally, uh, I don't think Touch is cross-platform. Ah, see, things, things that you definitely have to think about. Yeah, so that's a big one.

[00:21:16] - Rion Gull
Scroll up a little bit actually, and let's, let's check out that, um, Platform Explorer thing that it was talking about.

[00:21:23] - Noah Hein
It did, uh, yeah, my— it did generate a thing. However, uh, my current environment is very prone to crashing when I tried to copy directly from the terminal. That's what I did. I rolled the dice, uh, so I could run the command again if you want to see it. Is there another way that I could just—

[00:21:41] - Anthony Campolo
okay, you just need to go look at the link that is being console logged out. So go back to your file, like the create identities file, and then copy paste that URL. Just pop your— the identity ID in there.

[00:21:56] - Noah Hein
Gotcha. Um, Select this and then we're going to do this. But we actually, that's not going to work. I need to go here. Over here, identity/wabam. Do I have two devs? Fantastic. No data contracts created yet. Let's see, is this a good URL?

[00:22:35] - Anthony Campolo
It shouldn't be data contract, it should be identity, I think.

[00:22:39] - Noah Hein
Yeah, it's just platformexplorer.com/identity/identity ID or whatever. Yeah, your identity ID. Yeah, this is, this is right.

[00:22:53] - Anthony Campolo
Weird. Not sure why that's not working.

[00:22:55] - Noah Hein
I have no transfers, no documents.

[00:22:58] - Rion Gull
Oh, um, did we— did the script finish, Anthony? Uh, and Noah, did—

[00:23:03] - Noah Hein
yeah, the, the thing I assumed, because it, it logged out my—

[00:23:06] - Rion Gull
it logged out, but sometimes is there anything that happens afterwards?

[00:23:11] - Noah Hein
Review on the block explorer? No, that's the last thing that happens.

[00:23:15] - Anthony Campolo
Yeah, no, that—

[00:23:15] - Noah Hein
you're—

[00:23:16] - Anthony Campolo
that was the— that was the other one. Okay, that was a different, um, script that finicky. Or might just have— might be—

[00:23:26] - Noah Hein
I will chalk this up to block explorers. Yeah, and so we just go to the, the next thing and assume all of that worked, or is that odd?

[00:23:35] - Anthony Campolo
Let's keep going. The retrieve identities one is finicky, so this one may or may not work. So we'll see what happens.

[00:23:43] - Noah Hein
Okay, okay. So we can retrieve identities.

[00:23:47] - Anthony Campolo
Confirm that we're good.

[00:23:50] - Noah Hein
Excuse me. Oh, oops. Um, there we go. Fantastic. Uh, and so what this is doing is it's grabbing my account and it's grabbing my ID, and then it is going through all of my IDs and it's logging out the identity's ID and the balance. Okay, great. That seems reasonable. npm run retrieve identities. npm use 20. Yeah, sorry, it's been, uh, I am thankfully not using Node on a regular basis currently, so I have not been dealing with—

[00:24:41] - Anthony Campolo
Yeah, you're in that Python, Python life, right?

[00:24:45] - Noah Hein
Uh, no, I'm actually in that Elixir life because I could not complain about Node's ecosystem at all if I was living in Python land because Node is way better than Python as far as environments go. It's— yeah, Python is, is quite— it's, it's bad.

[00:25:00] - Anthony Campolo
What are you, what are you doing? What are you writing Elixir for?

[00:25:03] - Noah Hein
Uh, everything actually. Like, I'm, I'm Elixir front, front to back currently. And I—

[00:25:08] - Anthony Campolo
oh great, the retrieve identity's worked.

[00:25:11] - Noah Hein
Worked fantastic, uh, and I have a balance here. I have one identity and I have some balance there. Okay, um, so now I'm gonna keep going. I'm gonna top up my identities. That's, that's my favorite thing. So we're gonna make a new script here and then we're gonna copy my top-up identities. And here it seems like The same thing, but I'm gonna call this top-up command. I assume this is like a request for more testnet funds. Is that, is that what we're doing here?

[00:25:47] - Rion Gull
So this is topping up the funds in your identity, and it's going to convert funds from the proof-of-work chain to the platform chain, essentially.

[00:26:00] - Noah Hein
Interesting. Okay, so my wallet lives on the proof-of-work chain and my identities live on the platform chain, and so I'm moving one, one to the other. Is that what's happening?

[00:26:12] - Rion Gull
Yeah, the wallet, the wallet is associated with the L1 blockchain, um, and then everything actually is derived from those 12 words, both, um, the L1 block proof-of-work blockchain wallet, you know, public-private key pairs and the platform identity. They're both derived from the same thing, but they are interacting with separate chains technically under the hood.

[00:26:37] - Noah Hein
Yeah, so the identity lives on the L2 even though it's derived from my, from my mnemonic. Yeah, that makes sense. Okay, cool. And so we're gonna run some top-up identities. Setting the TLS server name to an IP address is not permitted. This will be ignored in the future version.

[00:27:00] - Anthony Campolo
Great. Yeah, it said that for as long as I've been doing this, so I have no idea what's up with that error.

[00:27:06] - Noah Hein
It's like you boot up a new React project and it's like, can I use Lite? It's not going to be, you know, it's out of date or whatever. I'm just like, okay, sure, whatever, dude.

[00:27:15] - Rion Gull
Yeah, and this, uh, this running without a specific adapter thing has been here for years also. So I guess we'll, we'll get around to cleaning that up at some point too.

[00:27:26] - Anthony Campolo
Yeah, there's a—

[00:27:27] - Rion Gull
I mean, Dash Core Group. So just while we're waiting here, Dash is and was actually the first DAO, believe it or not. It's a very rudimentary DAO, but we, we have what's called a superblock, and that pays out to proposal owners that have successful proposals. And Dash Core Group is one of those organizations that gets funding from the Dash DAO and Dash Incubator as well. But we're separate entities and we're dealing mostly with products that were built with Dash Core Group and by Dash Core Group. So Dash Platform has been the big project that they've been working on for several years and we are helping test it.

[00:28:14] - Noah Hein
Interesting. Very cool.

[00:28:15] - Rion Gull
So what did we— we have an identity credit balance.

[00:28:20] - Noah Hein
Yeah, this is, this is great. I want to preserve— I don't want to run into the copy issue I did again. Did I get enough funds to run this again and still go through the rest of this tutorial? I assume I'm not like starving for tokens. Okay.

[00:28:33] - Rion Gull
Plenty of money.

[00:28:35] - Noah Hein
Okay. Yeah. So we're going to run that again. So that'll take a minute while that runs. Since it ran correctly last time, it'll surely run correctly again. So while that runs, I will just go over to our register name. We can just -examples and we can make a new script. And then we'll just register— register name, npm use 20. And this is the register name here. That's great. I've skipped this because I don't quite have my thing yet. Before we run the name, I guess I'll stop here.

[00:29:20] - Anthony Campolo
You can just go to your.env and pick a name.

[00:29:26] - Noah Hein
The label is different than what was the output from top of it. Did I need to actually copy that, my identity credit balance?

[00:29:33] - Anthony Campolo
No, you didn't. You don't need that.

[00:29:34] - Noah Hein
That's just my bad. My bad.

[00:29:38] - Rion Gull
Okay, but Anthony, you wrote it in all caps, which means it has to go in the.env.

[00:29:45] - Noah Hein
Yeah, I guess I didn't need to run that again. Oh well. Uh, so my label— what, what am I labeling exactly here?

[00:29:52] - Anthony Campolo
What is your, your name? It's like your, your, um, like your, like your Ethereum name service kind of thing. -dpns-platform-nameservice.

[00:30:01] - Noah Hein
I want to be in hind dev. let's go. Okay, cool. So I'm going to the register name. I already made this. And so is this what I did? Yeah, yeah, yeah. Okay. So I can npm run register name. Ba ba ba dum ba ba ba bum. And so this is another write action to the blockchain on saying like, hey, here's my label along with my pubkey. Please validate my label.

[00:30:34] - Anthony Campolo
Yes.

[00:30:35] - Rion Gull
Um, yep.

[00:30:37] - Noah Hein
Cool.

[00:30:37] - Rion Gull
I'll skip the details on that.

[00:30:39] - Noah Hein
I, I know, I know stuff about blockchains. I know what's happening here. Okay. Um, and so this document here, what is a document? Is this the output from my label? Is there going to be some—

[00:30:55] - Anthony Campolo
here's where it gets interesting. This is pretty Dash-specific, so You want to go for it, Anthony? Explain that a little bit, or, uh, I mean, yeah, so what's, what's happening here is you can kind of think of the Dash platform as a way to persist data without needing to write your own smart contracts because the, the read-write-update functionality is built into the platform. So the document is going to be the data you persist onto the blockchain. So right now you're creating a name so that you can associate yourself with the documents you're going to create. The documents are just kind of like JSON blobs that are going to be stored on Dash platform.

[00:31:37] - Rion Gull
So it's very much— the terminology is using the term document in the sense of document databases where you have JSON-like objects that are stored in, in the database. Um, so there are, there are what we call data contracts, and that's essentially what you can think of as a schema that certain documents must adhere to that write against that schema. So you could think of a basic schema as like a blog post, and the blog has a title and the description and text, and that would be your schema. And then documents would be all the things that adhere to that schema.

[00:32:26] - Noah Hein
Yeah, TBD does something similar to that for the decentralized identifiers, but the DIDs, they, they have a similar thing like that. You define some schema from, I think, it's some very old web standard. I think it's like schema.org or whatever, has a bunch of records, but it's just like you yank some schema from there, uh, For compatibility, I think. Yeah.

[00:32:49] - Rion Gull
Is it JSON Schema?

[00:32:51] - Noah Hein
That, that doesn't ring a bell, but it's something very similar to that where it's just like it has a bunch of entities and you just declare like, hey, here's the entity, and it goes to the website and yanks the schema and expects that to be the, the kind of object that it works with. So it's a very similar idea. I'm sure there's variations in the actual implementation, but it's a— I think that's a good approach to things, allows pretty good interoperability as long as everyone can see like, hey, this is what the blog looks like, so I can, you know, kind of have an idea on what, what keys I have to the object. Going to the document that got logged out here, I, I don't have any data here. This is, um, this is the—

[00:33:32] - Anthony Campolo
yeah, I just went and looked on Platform Explorer and it's only showing stuff up to June 13th, so I think, um, something's happening with the Platform Explorer.

[00:33:42] - Noah Hein
Okay.

[00:33:43] - Rion Gull
Let me, let me ping, um, Miguel and see if there's anything that he knows about. He's the one that wrote that. So let's, uh, let's keep going and see. Technically, we can keep doing stuff without knowing from the—

[00:33:57] - Noah Hein
yeah, it seems to all be working. Um, just we don't see, see it on the block explorer. But so in theory, I should see something kind of— whoa, I just wanted to get a bit— can I, can I do this? Yeah, I should kind of looking at. Come on, come on now. Something like this. That's, that's what I should be looking at, where my— I would have some unique identity by ID, but my label would be in HeinDev that I put in. Is that right? Okay, yeah, cool. Um, so now I want to make a retrieve name. I created my name, I registered it. Now in retrieve name, we're going to make you a little bit smaller and move back over here. Move back over here. That is crazy. What is happening? That was wild. I've never seen that before. Let's see, retrieve name. Cool. Um, so this is grabbing my, my label.dash in hindev.dash, and then we're grabbing the name from that document, uh, and then we're saying that, hey, we grabbed our name and here's your name ID. Okay, cool, that seems good. Um, and so we can run that retrieve name. And then we can— I'm going to assume that this doesn't work if the Platform Explorer is down, but we will, we will click anyways. Error loading data.

[00:35:36] - Rion Gull
Let's go, let's go to the Platform Explorer and just go to the main home page and see if anything is showing up there.

[00:35:43] - Anthony Campolo
That's what I was looking at. It only shows up to June 13th, so latest block was 296 minutes ago.

[00:35:51] - Noah Hein
Okay. I assume that should be 2 minutes approximately, 2 to 3 minutes.

[00:35:57] - Rion Gull
Yeah, let's see.

[00:35:58] - Anthony Campolo
Yeah, I would click the API thing. There's a—

[00:36:03] - Rion Gull
seems to be working in that case.

[00:36:06] - Noah Hein
API indexing is disrupted.

[00:36:08] - Anthony Campolo
There you go, that's the issue. Yeah, okay.

[00:36:11] - Rion Gull
All right, well, that's good to know.

[00:36:13] - Noah Hein
Um, but I know my server is failing as the blockchain continues to chug along.

[00:36:18] - Rion Gull
There you go, there you go.

[00:36:19] - Anthony Campolo
This is the first time this has happened with Platform Explorer. That's usually— it's usually pretty reliable.

[00:36:23] - Rion Gull
So, um, Mikhail is on it.

[00:36:28] - Noah Hein
He—

[00:36:28] - Rion Gull
I pinged him about it. He's, he's looking into it.

[00:36:31] - Noah Hein
But we can see, um, we got some stuff logged out here. So while I can view it on the Block Explorer, I have my owner ID. I don't have any schema definitions. That's null. But I've got some document schemas that have domains and pre-orders. I have a lot of null objects here, but I do have my normalized label doesn't like my I. It now has a 1. That's interesting. Oh wow.

[00:36:59] - Anthony Campolo
Um, there's something in the docs about that. It, it has something— it's some security mechanism, but it's also like O's turn to zeros or something like that. I think it's so people can't like give, create different links that look like a thing that would actually steal someone's crap, you know?

[00:37:18] - Rion Gull
Yeah, I, I think that, yeah, exactly. There, that may or may not be temporary, um, but there is that measure that they're, they're trying to prevent people from, you know, if I, if I register Ryan, R-I-O-N, and somebody else registers R-1-O-N, then they could try to be scamming people.

[00:37:40] - Anthony Campolo
It mitigates homograph attacks.

[00:37:43] - Rion Gull
Ah, okay, nice, fancy. Um, so yeah, that's interesting that we ran into that.

[00:37:50] - Noah Hein
Cool. All right, so that's, that's why we explore, we explore the outputs. Um, so I just retrieved my name. That's the result name object. Cool. That's, that's what I looked like. We're not going to click on the block explorer. Now we have a data contract, so I'm gonna create my first data contract, which is a blueprint for the structure of data that an application tends to store on the decentralized network. It defines the schema of documents within the JSON. Okay, that, that seems good. So we'll make a register contract, and then in register— register contract, we will create some new stuff. Um, let's see. So we're grabbing my identity. I'm gonna make a contract document. So is this the shape of my JSON schema? Is this like implicit that I'm like, this, this is the schema? Is that what's happening? Okay. Uh, so I'm creating a note with some properties and those messages have a type string and a position with them. Okay. Um, register contract. And so we want to run. We want to run this and then we should get something like this put out. Fantastic.

[00:39:07] - Rion Gull
Now here's—

[00:39:08] - Anthony Campolo
here's— want to make sure.

[00:39:10] - Rion Gull
Yeah, it's not finished yet despite the fact that you got the string and it may take a while.

[00:39:17] - Noah Hein
So we'll see. Yeah, this is where we're publishing the contract right now in the script. And so that takes a minute to go up to the network. Yep, yep, yeah, okay.

[00:39:28] - Anthony Campolo
Yeah, so far the network seems to be running pretty, pretty well, so maybe you're right, maybe -12 is the one to use. That's what, um, uh, the Platform Explorer is running. It's running version 12.

[00:39:39] - Noah Hein
Yep, much to its chagrin, it would appear.

[00:39:43] - Rion Gull
This is long, to be fair. This is still not a great user experience, so I'll, I'll have to look into this and see if this is known that it's this slow, or if there's some issue. But I mean, not, not terrible. It's done now.

[00:39:57] - Noah Hein
So cool. And so we, we have another thing where we have my format version, and then here's my document schema that I, that I already talked about with my note and my type and my properties. That's, that's great. We'd love to see that. That's cool.

[00:40:11] - Anthony Campolo
Um, what is, um, and then here we need to grab your contract ID and put that in your.env.

[00:40:19] - Noah Hein
Okay, I, I can— I will grab that. Um, what's— what is this dollar sign stuff? What, what, what is that?

[00:40:28] - Rion Gull
That's above my pay grade. I'm not actually sure why they have a key with a dollar on it.

[00:40:32] - Noah Hein
Um, okay, because I saw a bunch of them in the one up.

[00:40:37] - Rion Gull
It may, maybe something. So this is adhering to JSON schema. I looked up schema.org and that's different from what we're using, which is Uh, you know, you said schema.org was the other—

[00:40:49] - Noah Hein
yeah, I'm, uh, I think that's what I'm not 100% sure, but it's something similar, similar to that.

[00:40:56] - Rion Gull
So we use, we use JSON schema, and I don't know if the dollar thing has special meaning in JSON schema. That's an off to look into.

[00:41:06] - Noah Hein
Hello, can I— there we go. Um, so I want this, the contract ID. Okay. And so where do I want to put that, Mr. Anthony? I need to put this in my, in my.env.

[00:41:25] - Anthony Campolo
Yeah. Then you don't grab the one from the blog.

[00:41:27] - Noah Hein
Yeah. Yeah. Yeah. I just highlighted it. Contract ID. So I need to go back here and kill that. Cool. So we did that.

[00:41:44] - Anthony Campolo
Yeah, the dollar sign is the JSON schema thing specifically. It's to denote specific keywords that are used in JSON schema, things like schema, ref, ID.

[00:42:01] - Rion Gull
That's what I was thinking.

[00:42:04] - Noah Hein
Okay. So we registered the contract. And that gives us a contract ID. Cool. And so now we can retrieve the contract using that ID. Is that what we're doing here? Yep. Okay. So we're gonna retrieve the contract. So yeah, from the contract ID and we want a Okay. Contract to JSON, depth of 5. And then we view that on the block explorer. Okay, cool. That seems reasonable. So we can run retrieve contract. Ba-da-ba-bum, ba-da-ba-bum. Cool. And this is the same URL where it's like, hey, here's the data contract.

[00:42:53] - Rion Gull
Let's try it now and see if it works. Oh, you need to do your pbcopy, I guess.

[00:42:59] - Noah Hein
No, my links work. My terminal is smart enough to see the link, but if it's just the whatever— yeah, cool. So we can see it.

[00:43:08] - Anthony Campolo
That's like we're back up and running. Cool.

[00:43:10] - Noah Hein
So I have my identifier, which is my contract ID, and my.env, and this, this is me. I'm, I'm the owner. We've done some stuff. We've done some creates and some top-ups. We did two top-ups on accident. Oh well.

[00:43:25] - Anthony Campolo
Cool.

[00:43:26] - Noah Hein
And that's, that's my transaction revision. If like I make an edit to this, does my revision go up? Yes.

[00:43:34] - Rion Gull
Yeah, I think that's part of the tutorial, right, Anthony?

[00:43:37] - Anthony Campolo
Yeah, the update tutorials, update contracts, the next, next thing to add in authors.

[00:43:43] - Noah Hein
We retrieve the contract and now we're going to update it. Fantastic. My update contract, update. Um, update contract. Cool. And then we're gonna update it. So what is— what am I doing here? I am setting my document schema to note, and that goes to that— would you say you guys use JSON schema? And so in the JSON schema website, there is a, a note Oh, that's where we're adhering to that.

[00:44:23] - Rion Gull
That's free text. That's, that's your—

[00:44:25] - Anthony Campolo
what you're, you're defining. Yeah.

[00:44:29] - Rion Gull
Oh, that's like my note.

[00:44:33] - Noah Hein
Okay, gotcha. Interesting. Okay, so we update the contract by running, running this script.

[00:44:41] - Rion Gull
So in other words, the tutorial is making a notes-taking app. Yeah.

[00:44:51] - Noah Hein
And we will get essentially this same thing. This is just a contract object 'cause we got, I've spit out 2 or 3 of these now already and they just get, I should see something similar to this 'cause I had the other one. Is it expected that my schemaDefs is still null even though I have the document schema? What, what is schemaDefs at that point? What is—

[00:45:24] - Anthony Campolo
that's a good question.

[00:45:25] - Noah Hein
Let's see, because, because I feel like that should point to like some JSON schema, maybe some JSON schema spec on like, hey, here's a note or a blog or something. So I'm poking, I'm poking holes in your thing. I'm asking, asking all the questions. We don't just run scripts.

[00:45:44] - Rion Gull
No, no, no. Uh, yeah, I, I don't know right offhand. Um, it's not in the, your tutorial text either, Anthony, so it looks like we're, we're at least not tracking.

[00:45:54] - Anthony Campolo
Yeah, the, yeah, I'm not sure about that. I mean, it's been all of them looking in the bash It's looking at the Dash docs, all of the examples they have, schema depth is set to null.

[00:46:09] - Rion Gull
We can look at— let's actually do that because part of the— I know that we're steamrolling through here, but let's at least bring up the Dash docs. Go to docs.dash.org.

[00:46:20] - Noah Hein
All right.

[00:46:22] - Rion Gull
And there is a reference section, so let's see if if we can figure this out through the docs.

[00:46:31] - Noah Hein
So I'm in the API reference.

[00:46:34] - Rion Gull
Um, now we'll go to, go to platform docs.

[00:46:36] - Noah Hein
So that's platform docs. Yep. I have the protocol, the reference. Here we go. Yep. Uh, we're, we're over here now, so we're making this big. And I'm schema defs. We'll just do schema, uh, def. Uh, capital D-E-F-S, schemaDefs. Okay, so that's just another— these are just examples. Uh, and I assume from what Anthony said, if I do schemaDefs, it's just going to be null. Yep. Interesting. Okay, well, so not— no, no clear, clear explanation. Let's see. What about the contract? The contract object? A data contract object. And what about schema defs? Schema? Okay. A lot of schema. No schema defs. And— okay.

[00:47:45] - Anthony Campolo
It's saying here— Um, it's used as a convention to organize and reference schema definitions. With the JSON schema document, you create a section where reusable schema components are defined, which can then be referenced throughout the schema.

[00:48:00] - Noah Hein
That's exactly what I thought it was. Okay, cool.

[00:48:02] - Rion Gull
So Anthony, did you read that from— is that ChatGPT? Um, and is this a, a JSON schema concept then?

[00:48:13] - Anthony Campolo
Uh, yeah, that's basically what I was saying. Yeah, so like if you wanted to create— like I say here, you could create a user object and then you could reference that within your schema. So it's kind of like creating kind of composable units. And I guess they, they don't really use that very much in the Dash docs, so I guess they're not really pushing you towards that direction.

[00:48:38] - Rion Gull
Well, any, any kind of application that that would be useful, I would guess, would need this. So it's something good to note that we should probably have some documentation about it.

[00:48:50] - Noah Hein
Because if you're making Twitter on, on-chain where you wanted to let anybody like, uh, like Farcaster or whatever, some, some protocol, you would want to say like, hey, this is all of our schema definitions that we expect you to adhere to, to be in spec to the protocol. And having that explicit is, is a nice thing to have and allows everyone to, to reference the same thing. So that's cool. That's what I thought it was. I just thought it was interesting because we, we clearly have a schema here in, in my note. So I should create a note schema definition and then just use that everywhere.

[00:49:27] - Anthony Campolo
Cool.

[00:49:28] - Noah Hein
Um, okay, so my, my rabbit hole has, has been officially, uh, we've, we've answered that one. Um, I just updated my contract, and so now I want to add an application here to my client. Okay. Client.js. So I have my unsafeOptions, my wallet. So I'm just gonna yoink the apps here. I'm grabbing my contract ID. So I need to also add my contract ID. Cool. Um, skip synchronization before height. Interesting. Okay, so this is just making sure, like, I don't grab everything from the history of the chain. Is that— yeah, um, yep, great. So we are submitting a note document, um, and so a note is— has been defined by us. Okay, great. So So note document. And so let's read through this. We have— we're grabbing our identity again. We're creating a new document. And we're calling it a tutorial contract note. What is this? Is this a label? The label of our contract? What is this?

[00:51:00] - Rion Gull
Uh, so it's not the label of a contract, it's the label of a document.

[00:51:05] - Noah Hein
The label of a document. Would it, uh, sorry, I thought a document was a form of contract. Is that not— is it just its own thing? It's entirely separate? They're, they're both primitives, contracts and documents?

[00:51:18] - Rion Gull
Yes, they're both primitives. Uh, the contract is like the schema and the document is an object that adheres to the schema.

[00:51:26] - Noah Hein
Ah, okay. All right, so we give it— what did you call that again? This is a document label for like a— it's the name, the name of a document.

[00:51:38] - Rion Gull
Um, I'm actually not sure what the arguments technically are, but, um, Anthony, do you— let's see.

[00:51:47] - Anthony Campolo
Yeah, so what this is— so if you scroll back up to your client, the, the reason why you had to put your contract ID in your client was because this allows you to basically define specific methods that then you can pass in as you're submitting the documents. There's information about this in the— I think I said something about this in the tutorial, but there's also a doc.

[00:52:16] - Noah Hein
Yes, sorry, I've completely omitted all of the actual explanation that you do in your tutorial. Shut up, just copy paste code.

[00:52:23] - Anthony Campolo
Yeah, so just if you scroll through, it's right above the part where you put the client in. It explains this part, so just scroll up a little bit more.

[00:52:30] - Noah Hein
Yeah, right there. Yeah, add apps object to the client options and pass the contract ID to enable contract name dot contract document syntax while accessing contract documents. Okay, so this is the tutorial contract, and then we have the note that we will, uh, that we had established earlier. That's, that's what we've been calling it. Okay, that's cool. I will not dig deeper than that.

[00:52:53] - Anthony Campolo
I don't—

[00:52:54] - Noah Hein
100. I think, I think I get that there's a message, but on this we had a message. Do we not add a position? Do we do that later? Because there was definitely a position key on the messages. So I guess it can just be null.

[00:53:13] - Anthony Campolo
I think it will know that because you defined the, the position is going to make that the first position or the zero position.

[00:53:21] - Noah Hein
Interesting.

[00:53:21] - Rion Gull
It should be zero, I believe. If we, if we do need to write it, it should be zero.

[00:53:26] - Anthony Campolo
Yeah, it was zero. Yeah.

[00:53:29] - Noah Hein
Okay. Submit note document. Oh, I already, I already wrote that. Okay. And then we create, and then we have like the— this is the protocol essentially if we wanted to replace or delete things. Okay, cool. Um, we have The submit note documents, and we're going to have an output of my document ID and then a bunch of other stuff. Okay, yeah, you're going to want to send the document ID to your.env. Gotcha.

[00:54:01] - Anthony Campolo
This is— we're actually writing to the chain. This is our, our hello world right here.

[00:54:04] - Noah Hein
Yeah, yeah, I'm sending a message to my— so I created my my contract, and then I created my documents, and now I am updating one of my documents with my note schema stuff. Okay, cool. Yeah, my document schemas are of type note. That makes sense. That's a whole lot of null and false. Just every— everything is non-existent except for immutable contract. We, we can do that. And can be deleted contract. Okay, interesting. And it's of type note. That's cool, I like that. So we're writing to the chain, and then we want to be able to get my document. Whenever I write to this, I have my— is this the same document ID that I got earlier? This should still be the same document, right? Like, it should log out whatever. Um, I'll probably answer this question myself.

[00:55:07] - Rion Gull
Did it finish that script or no?

[00:55:10] - Noah Hein
Yeah. We just got it. So, there's my ID, my owner's ID.

[00:55:17] - Rion Gull
Hello from AJC Web Dev is the message. Oh, yeah.

[00:55:22] - Noah Hein
I should have changed that to— you should make this dynamic to be my label.

[00:55:27] - Anthony Campolo
Ah, that would be good.

[00:55:28] - Noah Hein
Yeah. Yeah. At Friday. June 13th, June 14th, sorry, whatever GMT. Okay, great. I am going to do that again. We're going to pb copy. While that runs again, that's cool. I like this. That's great.

[00:55:48] - Anthony Campolo
It has—

[00:55:49] - Rion Gull
What did the Explorer choke on there?

[00:55:52] - Noah Hein
This was, I'm sure it's probably running now. Yeah, this was just from before I hadn't updated it. Yeah, so I have my label and my records. That's all cool. To, to, and oh yeah, my owner ID is right here. That's cool. My document. Okay, so I'll close these two, um, and whenever that's done running again, I will go ahead. So as that runs, I'll create a new script and we will call this the get documents. And then we will copy this in here. And then we'll go to my.env. And what did we call it? My document. Do I need this? Does this need to go in my.env?

[00:56:48] - Anthony Campolo
I think so, yeah.

[00:56:49] - Noah Hein
I don't think— you don't say that I do. You just say that the document ID—

[00:56:55] - Rion Gull
I doubt it, um, because that's just a reference to the— that specific instance of the— you're getting—

[00:57:01] - Anthony Campolo
you're going to use it in the update note document.

[00:57:06] - Noah Hein
Yeah, so in here, but where do you— you don't get to—

[00:57:13] - Anthony Campolo
that's get documents. The next one, the next script, you're going to need it.

[00:57:17] - Noah Hein
Okay. Is this— oh, this is get documents. Okay, I'm gonna go a little bit ahead. Yeah, so the tutorial, the document, you have to know which document. Yeah, just noting you do not tell me that I need to do this in here as far as I can tell.

[00:57:34] - Anthony Campolo
I think there's a—

[00:57:35] - Noah Hein
you like it's from here. Yeah, like it's like we said before, it's in all caps, it needs to go in there, but that was not true for all of them. Well, I must honestly say, because the—

[00:57:49] - Anthony Campolo
yeah, I didn't know the— but there's one part where the ones you thought you had to copy, it had something in all caps, but it wasn't like equal to a thing. So, but yeah, I— oh, okay, because there's a point in the thing where I say copy this and place them in your.env. We'll do the same throughout the rest of this tutorial, but I'll make sure to specify each time, like, to make sure to take this specific environment variable.

[00:58:17] - Noah Hein
Okay, and I did some— something— I blew away my clipboard, unfortunately. So I'm running that one more time. Apologies here. We're chugging through. This is a beefy tutorial. We're doing a lot here.

[00:58:30] - Anthony Campolo
Yeah, totally.

[00:58:30] - Rion Gull
This is, I think, the furthest we've got so far, right?

[00:58:34] - Anthony Campolo
Oh yeah, yeah, yeah, we're good. And then half the, half the episodes.

[00:58:41] - Noah Hein
Okay, so I need to— whoa, I'm gonna go back here and we're gonna do this, uh, we're gonna kill— whoa, there's a letter that I don't want. Wow, that was interesting. Transaction sync worker. Did I— this is probably an— is this an error? Block height changed handler. Is already set. Interesting. Okay, whatever. I have my document ID. That's all I care about. Forget all that. That didn't exist. All this in my.env, get out of here. Okay, cool. We have my document ID. Um, and I'm still a bit ahead of myself because I need to do my get documents call. Okay, so I need to save this. I need to npm run get documents. And I didn't need the ID for that. I could have done that earlier, but cool. Uh, since I ran it 3 times, we've got 3 of them and we're about 2 minutes apart on each of them. I, um, interesting. Is that from whenever I ran it or from whenever it gets confirmed on chain? The time, I assume it's from when I ran it. Yeah.

[00:59:49] - Anthony Campolo
And then that just, yeah, that's, that's definitely how it should be when you get money. Yeah.

[00:59:53] - Noah Hein
Yeah. Um, okay. So we got all of our dodges on date. And now I want to get a single document. So we'll create a new script where I update note document, update note document. And we'll grab my tutorial contract note where my ID is my document ID. That's great. What, what is this an array of? What, this is not just a single document?

[01:00:26] - Anthony Campolo
I mean, you could create multiple documents, I guess, but right now there's only one. There's multiple notes in the document, but you could create multiple documents, I think.

[01:00:35] - Noah Hein
Like, but this is getting, uh, uh, oh, uh, documents. Yeah, yeah, if I had just multiple, multiple things.

[01:00:44] - Anthony Campolo
If—

[01:00:45] - Noah Hein
okay, all right, all right, that, that makes sense. Cool. Um, and then we're setting a message. This is gonna—

[01:01:09] - Rion Gull
he's off script, guys.

[01:01:11] - Noah Hein
I'm not plastering your name all over the Dash internet, Anthony. Absolutely not. I will, I will make I will make my mark here on the Dash, on the Dash network. Let's see, update node document. Yes, that should do it. I will get the document updated and we'll have our message with the current time because we're calling new, new date to UTC string again.

[01:01:48] - Rion Gull
So I'm kind of surprised that the created_at and the updated_at are null. Honestly, I'll have to look into that because that's supposed to be a system, you know, system variable that, that populates.

[01:02:04] - Noah Hein
Yeah, is it not in the We had— oop, so that finished running. I thought it had to do with, um, wow, have I already gone through that much? All right, I'm not gonna go through it. There was like some— I had all of the arrays of like the createdAt and the deleted and the updated, and I think one of the notes earlier. Okay, so we updated the note document.

[01:02:30] - Anthony Campolo
Oh, I see that. I see a thing right here. The createdAt and updatedAt fields will only be present in documents that add add them to a list of required properties. So I need to update my contract to actually include that.

[01:02:42] - Noah Hein
Yeah, because those are just empty arrays in the tutorial, right? So you'd need to put the document in there so they populate. Is that right? Something like that. But cool. We said hello from Inhine Dev again. Great. We love to see it. I have successfully updated it. And now we're gonna delete it. Oh, no, dude. I just put my name on there.

[01:03:04] - Rion Gull
Okay, we can create it if you really want to.

[01:03:08] - Noah Hein
Okay, so we created it, we updated it, and now we're gonna delete it. So we can delete note document where my ID is the document ID, and then we will delete it. Does deleting it also take, uh, resources? Like, do I need tokens to delete something on the network?

[01:03:34] - Rion Gull
I don't think so. In fact, I, I'm pretty sure that you actually get money back.

[01:03:39] - Noah Hein
Back. Yeah, that's, that's how it works on Solana. That's why I ask is like on Solana, if you like delete state from the, the chain, it's like, oh, here you go, have some dust back essentially.

[01:03:49] - Rion Gull
Yeah, I think that's how we've, we've done it too.

[01:03:53] - Noah Hein
That's always a feel-good one. Oh, there's nothing bad if we want.

[01:03:58] - Rion Gull
Um, let's, let's see, like on, on the explore Platform Explorer website, um, there should be a history of an identity's balance and see if it's going up and down.

[01:04:14] - Noah Hein
Um, so in my.env, what would I look up for that? Would I be my identity or my wallet address?

[01:04:21] - Rion Gull
Identity, I believe.

[01:04:26] - Noah Hein
Okay, so here I did just delete it. So what was it? Identity. Identity slash this. Oop.

[01:04:43] - Rion Gull
If you just pop it in the search bar, does that work?

[01:04:46] - Noah Hein
Oh, that would be probably smarter. Yeah. Yeah.

[01:04:49] - Anthony Campolo
And if you just go to the forward slash identity, you'll— it'll be the the first one. You're right on top. It's the only one that's been created today.

[01:04:57] - Noah Hein
Oh, interesting. Or is it identities?

[01:05:00] - Anthony Campolo
Identity. Just identity.

[01:05:02] - Noah Hein
Just singular identity. Am I misspelling it?

[01:05:07] - Anthony Campolo
Try using the hamburger menu.

[01:05:12] - Noah Hein
Identities. Fantastic. Oh yeah, the only one created today. Look at me. Fantastic. Um, Let's see.

[01:05:22] - Rion Gull
Transaction transfers.

[01:05:24] - Noah Hein
Transfers.

[01:05:24] - Rion Gull
There you go.

[01:05:27] - Noah Hein
Absolutely. Okay, so those were from— none of these were just now. This was whenever I just created it.

[01:05:35] - Rion Gull
You're funding. Yeah, yeah.

[01:05:37] - Noah Hein
Okay, so I didn't get anything back for deleting it. It would, it would appear.

[01:05:43] - Rion Gull
Did we do—

[01:05:43] - Noah Hein
does the delete show up yet on, uh, oh well, I suppose that would be a good Let's see. So we did delete it. Yeah, we have revisions of 2. Although this kind of just returns the contract. Okay. It says document deleted.

[01:06:04] - Rion Gull
That's just Anthony that said that, though.

[01:06:07] - Noah Hein
Yeah. Yeah.

[01:06:08] - Anthony Campolo
Yeah.

[01:06:08] - Noah Hein
And the console log. So it's not necessarily apparent. So maybe in another 2-minute— whoa. Identity create.

[01:06:15] - Anthony Campolo
Yeah, so there's one issue here, which is that it starts at the earliest one and then it caps out after 10. So you're not going to be able to see it.

[01:06:23] - Rion Gull
Oh, it caps out after 10?

[01:06:26] - Noah Hein
Yeah, how do you know the transactions? Interesting. I'd also probably want that to be, uh, descending instead of, instead of ascending. You want the most recent stuff first. Oh well. Maybe, maybe under transfer. No, I will assume that doesn't work that way for now.

[01:06:47] - Rion Gull
What about data consumption at the end and documents tabs?

[01:06:52] - Noah Hein
Uh, documents, let's see, at 1:14 we did this. This document here is null because we killed it. I imagine that that would make sense to me, whereas this one should still be alive. Yeah, cool. Okay. Um, and data contracts, I have the one, uh, I have 3 documents. So the document ID persists, it just kills out the data within it. Okay. Yes, that, that tracks to me. And yeah, revision count of 2 because we created it and we—

[01:07:31] - Rion Gull
I believe that that's probably happening at the block explorer level though. I would be surprised if a history of the documents exists on the chain itself, but yeah.

[01:07:47] - Noah Hein
Oh, you think like it completely obliterates it and like I wouldn't be able to query for it and the block explorer just has the historical data and is holding on to it?

[01:07:58] - Rion Gull
That's my guess, but I have to look into that.

[01:08:03] - Anthony Campolo
Okay.

[01:08:04] - Noah Hein
Moving on.

[01:08:04] - Anthony Campolo
Let's keep going. We're close to the end. We got 10 minutes left.

[01:08:10] - Noah Hein
We will run this command.

[01:08:15] - Anthony Campolo
We got through all the scripts. Scenario, create a backend.

[01:08:24] - Noah Hein
In my API, in my— was this my server? We're going to toss all of that in there. And we're going to npm run express. Running on localhost:3001. What is my— is my name the label?

[01:08:44] - Anthony Campolo
That's nhindiv. Yeah, exactly.

[01:08:46] - Noah Hein
nhindiv. That's my— okay. Yeah. Make this big. So, here I want to say, in hindustan.

[01:09:06] - Anthony Campolo
Tweet.

[01:09:07] - Noah Hein
Cool. Fantastic.

[01:09:11] - Anthony Campolo
So, now basically you have an Express server that will serve you this data.

[01:09:17] - Noah Hein
This data. Very cool. Let's see here. Then we can create a Next app. God help me. Let's see. Is this in a new folder or should this still be in dash examples?

[01:09:33] - Anthony Campolo
Still in dash examples. Yeah. Then keep your server running.

[01:09:36] - Noah Hein
Yes. Yes. Yes. Yes. Do I want an src directory? Yes, I do. Yes, I want to use App Router.

[01:09:53] - Anthony Campolo
Yep.

[01:09:54] - Noah Hein
Let's see. Would you like to customize the default alias? No? No.

[01:10:01] - Anthony Campolo
Yes and no. I don't think that it matters either way. But no should be fine. Okay.

[01:10:10] - Noah Hein
Now in my next step, I want to go to my page. Page. Okay, we're just gonna do page.js. Oh, but I have all my node_modules. Damn it. Let's see. Next src app. Oh, yeah. It's not even— so what do I want? I want my page.tsx because it's not JS. Pretty sure this would be JSX anyways, even if I said no. I think this is— because this is JSX. Although my home looks quite a bit different than yours.

[01:10:50] - Anthony Campolo
Yeah, no, it actually is.js if you select not to use TypeScript.

[01:10:55] - Noah Hein
Interesting.

[01:10:56] - Anthony Campolo
That's just how the create-next-app does it, you know.

[01:10:59] - Noah Hein
Yeah. npm run dev. Okay. And so— Identity. Where am I getting identity from?

[01:11:08] - Anthony Campolo
So yeah, so that's just to make sure that your Next app is running. And then after that, we're gonna actually include the logic to fetch it.

[01:11:19] - Noah Hein
Completed. Hey, there we go. Page.tsx. Okay. Oh, this is like the— okay. So I'm gonna kill a bunch, a bunch of this. I'll just say hello Dash. Okay, cool. Um, that's much less confusing.

[01:11:43] - Anthony Campolo
Um, yeah, so you just skip that one and just grab the next one.

[01:11:48] - Noah Hein
Um, so I want to— am I not using client currently? I'm not using client currently. Okay, so we're just gonna—

[01:11:55] - Anthony Campolo
yeah, just grab the whole thing.

[01:11:58] - Noah Hein
See, make sure I didn't get any errors here. Okay, fantastic. My identity is null.

[01:12:08] - Anthony Campolo
That's because I hardcoded in my name in there. You want to change where it says localhost:3001 in your code for /name. Yeah, I need to fix that.

[01:12:22] - Noah Hein
Local.

[01:12:24] - Anthony Campolo
So change that to ntime-dev. Yeah. Haha! Hell yeah!

[01:12:36] - Noah Hein
Success! Yeah, my Next.js app. I'm using some clients. I'm rendering some data. Add a fetch button. Okay. Sure. Why not?

[01:12:57] - Anthony Campolo
Use.

[01:12:57] - Noah Hein
Okay. Uh, oh, that's not what I want to do.

[01:12:59] - Anthony Campolo
I would just blow away the whole thing and copy paste it in.

[01:13:03] - Noah Hein
Yeah.

[01:13:06] - Rion Gull
So Anthony, was there, was there a reason that you chose to go with, um, having a server instead of just a client-side, uh, single page application?

[01:13:19] - Anthony Campolo
Because then you would be exposing your wallet mnemonic.

[01:13:23] - Rion Gull
Yeah.

[01:13:24] - Anthony Campolo
Yeah.

[01:13:25] - Noah Hein
That is a very good reason. If I have to say so myself.

[01:13:30] - Rion Gull
Yeah, and the single page application can use, you know, it can prompt the user for things like that.

[01:13:38] - Anthony Campolo
Yeah, you could keep it in like local storage. Yeah.

[01:13:43] - Rion Gull
Or have a wall button there.

[01:13:46] - Noah Hein
Yeah, that's data.

[01:13:48] - Anthony Campolo
Okay, we did it. We got to the end. Everything worked. Hell yeah. We got 5 minutes to spare.

[01:13:53] - Rion Gull
Noah, you're like, you receive an A, Noah, because we'll only have—

[01:13:59] - Noah Hein
let's go, let's go, dude. So I'm gonna quit. Gotta do that. There we go. I did it. We got, we got through it all. You love to see it.

[01:14:11] - Anthony Campolo
That was epic, dude.

[01:14:12] - Rion Gull
That was epic.

[01:14:13] - Noah Hein
Yeah, yeah, yeah.

[01:14:15] - Rion Gull
So that's, that's Dash Platform in a nutshell. It allows you to store data on the Dash Platform blockchain, proof-of-stake blockchain, and it uses credits, which is just a different denomination of Dash. So yeah, that's— how does that compare with things that you've seen in the Solana ecosystem?

[01:14:39] - Noah Hein
Noah? Good, I would say, without knowing more about like how to get Dash and the monetary value, like how much money I would have spent for that to be on-chain and to do all of that, it's hard to do a straight compare contrast, but overall that was a pleasant experience. Like, definitely meets the bar to me for, for things. As far as like, I, I don't want to do so many hoops. That's about the— I say so many hoops, that's a lot of hoops to jump through, but that's just like where the space is at currently. I cannot hold that against Dash.

[01:15:21] - Rion Gull
Um, so yeah, just for learning, um, you know, we could have went straight to the app, for example, and just popped it in.

[01:15:30] - Noah Hein
But, uh, yeah, that could have been a web app where it said, here, create contract, create identity, create stuff, update it, delete it, and I could been like, cool, I clicked some buttons, I ran the web app, and I'm done. Uh, but I feel like I have a good holistic view of it. And going through each example, um, like, I was able to ask questions of y'all and be like, hey, what— like, schema duffs, that's a good one, where it's just like, what the hell is going on here? Why are there dollar signs in my JSON? Um, so like, you don't get that from just like a GUI web app clicking around and being like, cool, I did some stuff on-chain, I'm a degen, thanks for the airdrop. Uh, I'll be looking for that later. You know, that was like an actual— I did an actual thing.

[01:16:10] - Rion Gull
That felt good. Yeah, we will, uh, this is, this is something that we, uh, we do paid, paid work. So, uh, we'll, we'll do that, coordinate that off stream, Anthony, uh, and I will, will walk you through how to make your claim on that. But, uh, yeah, thanks for, thanks for coming on, getting right through all the way to the end, uh, Noah, and Yeah, we'll— if there's anything else that you're interested in, if it's kind of piqued your interest, then there's more that you could do as well.

[01:16:41] - Noah Hein
So just let us know. Yeah, of course. That was awesome. Thank you guys so much for having me. That was definitely an enjoyable experience. Always fun to do some live coding with friends. Thanks, Anthony. I'm sure that tutorial was a thing and a half to set up. That was a lot to just go through, much less write all of it and make sure that it actually goes like that. Look, if I made that, I'd be like, dude, this is so— this is so much. Um, so that was— that was a lot of code that we went through. I appreciated like going through step by step. I think that scripts, just additionally adding scripts and going through felt pretty good. Um, I appreciate the ergonomics of defining all of the scripts up front in the package.json. That would have been very— it was like already a thing, like, hey, create the script in your— in your scripts folder and then update it and then put something in your environment and then do it again. That felt a learning process if it was also, by the way, add this script to your package.json. That would have been— that would have been a lot. So I appreciate the design decisions made in my learning journey. That was good. Uh, Anthony, who would have thought, he is in fact a professional tutorialer. Uh, so that's— that's, uh, shows in the work. Um, but yeah, thank you guys so much for having me. That was a blast.

[01:17:52] - Rion Gull
Yep, yep. Thank you, and thank you, uh, for the listeners, uh, for tuning in. We will probably have several of these next week as well, maybe even one every day depending on what you've scheduled. I know I've got some half lined up, so tune in next week and we'll do it again. Thanks everyone.

[01:18:12] - Noah Hein
Awesome. Bye.

[01:18:13] - Anthony Campolo
Bye.
