
Dash Platform Walkthroughs Part 10 - Jim Fisk
Jim Fisk joins Anthony Campolo and Rion Gull to build a decentralized app on Dash Platform with identities, data contracts, and CRUD operations.
Episode Description
Web developer Jim Fisk joins Anthony Campolo and Rion Gull to walk through building a decentralized app on Dash Platform, covering identities, data contracts, and CRUD operations.
Episode Summary
In the tenth installment of the Dash Platform walkthrough series, web developer and Svelte framework creator Jim Fisk works through Anthony Campolo's tutorial alongside Rion Gull, building a decentralized application from scratch. The session begins with foundational setup—funding a testnet wallet via faucet, registering an identity, and topping up credits—before Rion provides extended explanations of the underlying architecture, including the distinction between proof-of-work and proof-of-stake blockchains, the rationale behind Dash's hybrid two-chain model, and how the Dash DAO funds development through masternode-voted proposals. Jim then progresses through registering a username, creating a data contract that functions like a database schema, submitting documents against that contract, and performing standard CRUD operations including updates and deletions. The conversation explores Dash Platform's positioning as a "SPA for SPAs" (Storage, Payments, Authentication for single-page applications), with Rion noting it suits applications needing public, provable data without requiring developers to set up their own backend infrastructure. The walkthrough concludes by wiring up an Express API and a Next.js frontend that queries the platform for identity information, demonstrating a complete end-to-end decentralized application stack.
Speakers
- Anthony Campolo
- Jim Fisk
- Rion Gull
Chapters
00:00:00 - Introductions and Jim's Background
Anthony Campolo opens the tenth Dash Platform walkthrough by welcoming Jim Fisk, who introduces himself as a web developer with a background spanning CMS work for governments and nonprofits, Jamstack technology, and Go-based microservices. Jim mentions he built an early Svelte-based static site generator dating back to the Sapper era, describing himself somewhat ironically as "the least JavaScripty JavaScript guy" who built the framework partly out of frustration with the broader JavaScript ecosystem.
The conversation turns to Jim's framework architecture, where Svelte handles SSR and DOM rendering while his system manages routing, hydration, and a built-in CMS that uses OAuth to write back to GitHub or GitLab repositories. Rion Gull connects this philosophy to the broader appeal of decentralization, noting that static sites give users genuine ownership rather than locking them into corporate platforms, and frames this as a natural pairing with Web3 technology like Dash Platform.
00:04:13 - Crypto Philosophy and Initial Setup Issues
Jim shares his perspective on cryptocurrency, emphasizing that he's drawn to Dash specifically because of its transactional focus rather than the store-of-wealth narrative dominating much of the space. He expresses hope for a future where crypto functions as everyday payment infrastructure and where decentralized application platforms become viable alternatives to centralized services.
The team then attempts to start the tutorial, but Jim reports issues with the testnet faucet—a 500 error and a temporary lockout. Rion acknowledges that the testnet infrastructure isn't always reliable, with the block explorer sometimes failing to display transactions even when they succeed. They decide to proceed under the assumption that funds did arrive, with a backup plan of running a local Dashmate node if needed. Jim confirms he successfully registered an identity, indicating the funds were in fact present.
00:09:31 - Identity Concepts and Credit Denominations
Jim asks what an identity actually represents on the network, and Rion explains that it functions as a public-private key pair tied to a balance, used for all interactions on Dash Platform including registering names, deploying data contracts, and submitting documents. After running the retrieve identities script and capturing the identity ID into an environment variable, Jim probes deeper into the relationship between Dash and credits.
Rion walks through the denomination system: one Dash equals 100 million satoshis, which further subdivides into credits at a rate of 100 billion credits per Dash. The reasoning is that platform operations—storage, computation, data registration—need granular pricing, and using extremely small whole-number units avoids the awkwardness of tiny decimal calculations. Every action on the platform consumes credits according to its computational and storage costs.
00:14:42 - Proof of Work, Proof of Stake, and Dash's Hybrid Architecture
Rion delivers an extended primer on consensus mechanisms, starting with Bitcoin's proof-of-work model where miners perform computational work both to secure the network through Sybil resistance and to bring new currency into circulation. He emphasizes Satoshi's insight that miners must be incentivized rather than expected to volunteer, and that the work function exists specifically to prevent attackers from cheaply spinning up thousands of fake nodes.
He then explains proof-of-stake as an alternative where participants prove ownership of native tokens rather than computational work, noting the common misconception that Ethereum pioneered this—it was actually a relatively late adopter. Dash occupies a hybrid position: it remains primarily a proof-of-work chain but introduced masternodes (collateralized by 1,000 Dash) years ago to perform specialized functions like InstantSend and PrivateSend. Dash Platform extends this by using a subset of masternodes as validators on a separate proof-of-stake chain, with top-up transactions moving value between the two layers.
00:20:54 - Why Two Blockchains and Introduction to DAOs
Jim asks why the architecture splits into two chains rather than consolidating, and Rion explains that proof-of-work chains aren't well-suited for storing and indexing data with cryptographic proofs, while proof-of-stake chains based on Tendermint-derived infrastructure are purpose-built for that workload. Rather than abandoning proof-of-work's security and fairness properties, Dash marries the two approaches to get the strengths of each.
This leads into a discussion of Decentralized Autonomous Organizations. Anthony characterizes a DAO as "a corporation and a government had a baby written in code," describing the proposal-and-voting mechanism where Dash holders or masternode operators direct treasury funds toward development, marketing, and infrastructure work. Rion expands on Dash's pioneering role here, noting that the Dash DAO predates Ethereum's famous "The DAO" by years and has functioned continuously for roughly eight years through C++ functions baked into the node software.
00:25:18 - DAO Governance in Practice
Rion walks through how proposals work mechanically: masternode operators vote yes, no, or abstain on each cycle's submissions, and successful funding proposals automatically pay out to the proposer's specified address. Beyond funding, the DAO handles governance questions—Rion contrasts Bitcoin's years-long, unresolved block size debate with Dash's ability to settle similar questions within a month by polling actual stakeholders rather than relying on Reddit and Twitter discussion.
He emphasizes the openness of the system: anyone with 1,000 Dash can run a masternode and become a voter, and anyone can submit a proposal regardless of credentials. The funding itself comes from a 20% allocation of each block reward, which Dash carves out specifically because compensating miners alone leaves core developers, community contributors, and marketers unfunded. Rion notes that the current call itself is paid for through this proposal system, with his quarterly report having been delivered just hours earlier.
00:30:54 - Topping Up Credits and Privacy of Identifiers
Jim returns to the tutorial and creates the top-up identities script, which converts testnet Dash from layer one into platform credits on the proof-of-stake chain. Anthony explains his script handles multiple identities within a single wallet, but notes that on mainnet developers will want more granular control rather than blindly topping up everything at once.
A practical question follows about which pieces of information are sensitive. Anthony confirms the mnemonic phrase is the critical secret since it controls the entire wallet, while wallet addresses and identity IDs are public by design—the wallet address is what you'd hand someone to receive funds, and identity IDs are openly visible on the platform explorer. Jim successfully runs the top-up and sees the credit balance reflected in his terminal output.
00:35:30 - Registering a Name and the System Contract Concept
Jim creates a register name script and successfully registers "Jim123" as his platform username. Rion takes the opportunity to clarify an important conceptual point: name registration is technically just a specific instance of submitting a document to a particular data contract called Dash Pay (or DPNS), which Dash Core Group authored and shipped as a system contract alongside the platform itself.
This means the username system isn't a separate primitive—it's an application of the same data contract and document mechanics that any developer can use for their own projects. Rion suggests the tutorial ordering might benefit from introducing data contracts conceptually before name registration, while Anthony defends the current grouping as keeping all identity-related operations together before pivoting to storage concepts.
00:39:33 - Authentication Use Cases and Data Contracts
Jim asks whether a typical platform developer would maintain one name or many, prompting Rion to outline the authentication use case: applications can let their users register Dash Platform usernames and use the platform itself as the auth layer, eliminating the need to integrate a separate identity provider. Alternatively, a single developer might register multiple personas controlled by one identity for personal projects.
This leads to Rion's framing of Dash Platform as "a SPA for SPAs"—Storage, Payments, and Authentication for single-page applications. The pitch is that solo developers and small teams can avoid integrating Auth0, Stripe, and AWS S3 separately, instead getting all three primitives from one SDK. Jim then begins working through data contracts proper, creating a register contract script that defines a simple "note" schema with a message field of type string.
00:46:14 - Submitting and Retrieving Documents
After successfully registering his contract and confirming it appears in the platform explorer, Jim runs into the recurring issue that the contract ID needs to be added to his environment variables before the retrieve and update scripts will work. Anthony walks him through extracting the ID from earlier terminal output and pasting it in proper environment variable format.
Jim then updates the contract schema to add an author field, demonstrating that contracts aren't immutable—developers can extend them as application requirements evolve. He also updates his client configuration to use the contract ID, enabling the cleaner contract.documentName syntax for subsequent queries. The tutorial then moves into actually creating documents against the schema, with Jim submitting his first "hello from Jim123" note and capturing the resulting document ID for later operations.
00:58:50 - Update, Delete, and Transaction History
Jim runs the update and delete scripts, modifying his note's message and then removing the document entirely. He encounters an SPV error during the delete operation, which Anthony attributes to network-level issues that can be worked around by setting an explicit IP address but aren't worth diving into for the tutorial.
A thoughtful question emerges about whether updates wipe history on the blockchain. Rion explains that while the current platform state reflects the latest version of the document, indexing services and the platform explorer preserve the full sequence of state transitions. Jim navigates to his identity page in the explorer and sees every action he's taken—identity creation, top-ups, name registration against the DPNS contract, his own contract creation, and document submissions—each recorded as a distinct state transition.
01:07:44 - Platform Niche and Performance Considerations
Jim asks what kinds of applications Dash Platform is best suited to host. Rion frames the niche around public, provably-present data, noting that while client-side encryption can enable private data storage, that's not the platform's sweet spot. He cites a hypothetical decentralized Twitter as an example—not necessarily one that would overtake the centralized version, but valuable for use cases involving controversial speech or censorship-resistant publishing.
Jim raises Wikipedia as a potential fit, which Rion endorses while emphasizing that the technology is the substrate and entrepreneurs need to identify the actual products. On performance, Rion clarifies that the underlying consensus and node software are highly performant—the bottlenecks Jim experienced are SDK-level issues like missing retry logic, lack of history caching, and poor node selection, all of which are tractable engineering problems rather than fundamental architectural limits.
01:14:18 - SDK Languages and Building the Express Backend
The conversation turns to language support. Anthony confirms everything operates over gRPC under the hood, and Rion notes that the Rust SDK is currently the most capable option, with internal debate ongoing about whether to wrap Rust with a JavaScript binding or invest in maturing the standalone JS SDK. REST endpoints exposed directly on nodes would enable language-independent client work, but that hasn't been prioritized yet.
Jim then transitions into the final tutorial section, building an Express server that exposes a name lookup endpoint. Rion notes the backend is technically optional since the JS SDK can run client-side, but the tutorial uses Express to demonstrate a more conventional architecture. After installing Express and copying the boilerplate, Jim hits the endpoint via curl and sees identity information returned successfully through the new API layer.
01:19:21 - Next.js Frontend and Wrap-Up
Jim spins up a Next.js application that fetches from the Express endpoint, accepting the TypeScript and default configuration options through the scaffold. After dropping in the page.js logic and creating a .env.local file with his label, he runs into an initial issue where the app can't retrieve the identity—Anthony diagnoses that the Express server had been stopped and needs to be running concurrently for the frontend to query through it.
Anthony also mentions Jimmy Wales' interest in a blockchain-enabled Wikipedia, which Rion jokes might land him as the next platform walkthrough guest. Once Express is restarted, the Next.js app successfully renders the identity data with its default gradient styling. Rion congratulates Jim on having built a complete dApp, and Jim closes by thanking both hosts for the walkthrough and praising the tutorial's clarity. The session ends at 01:25:32 with plans for another stream to follow shortly.
Transcript
00:00:02 - Anthony Campolo
Alright, we are at part 10. Made it to the double digits of Dash Platform walkthroughs with my good old buddy Jim Fisk. What's up, Jim?
00:00:12 - Jim Fisk
Hey, how's it going?
00:00:13 - Anthony Campolo
Good. Why don't you introduce yourself to our audience?
00:00:16 - Jim Fisk
Sure. So I'm Jim. I'm a web developer. I've had a kind of a meandering career of doing different things. I mainly started in CMS technology, building websites for governments and nonprofits. I got excited about Jamstack technology. That's how I met Anthony back in the day. Like static site generators and, you know, beyond. And, you know, just a whole general gamut of things. So, through that work I was doing on static sites, everything is kind of microservice architected. So, building microservices with Go has been something I've been doing for the last few years. And yeah, I'm a crypto enthusiast, but I'm a newbie in terms of like blockchain and decentralization. I like, I love the idea of that stuff, but it's like I've never really, really dove too deeply myself into that world. So I'm excited to connect with you guys, learn a little bit about Dash, which is something that's been on my radar for a little bit, but to actually get some brass tacks knowledge is really exciting.
00:01:18 - Anthony Campolo
And you, you built a Svelte framework. I'm not sure if you mentioned that. And so part of this, these walkthroughs, is to get JavaScript developers and like front-end framework kind of people on. So Ryan, this is your Svelte guy right here.
00:01:31 - Jim Fisk
Well, yeah, it's funny, I'm actually— so, so yeah, I, I built the Svelte framework. It's, uh, it's like a static site generator. Um, but yeah, it's funny because I'm like the least JavaScripty JavaScript guy. I actually built that out of like spite of a lot of the JavaScript ecosystem.
00:01:46 - Anthony Campolo
So I'm like the oldest Svelte framework there is now.
00:01:50 - Jim Fisk
Yeah, it was pretty early. That was like back in the Sapper days. Yeah.
00:01:56 - Rion Gull
Svelte framework. What does that even mean? Svelte is a framework. So how do you build a Svelte framework without building Svelte?
00:02:02 - Jim Fisk
What does that sound like? Yeah, that's a good point. So, yeah, I mean, Svelte is still doing the heavy lifting of, you know, SSR and DOM targets. But we're basically just handling all the things like routing and hydration. And, um, we actually built a little CMS into the system itself. So if people are familiar with static site generators, the whole thing that's cool about that is you can deploy them on like GitHub Pages or GitLab Pages. And what we do is we ship basically a small Svelte app that uses OAuth to connect back to those platforms. And then, so what you can do is you can log into your website, which is a static site, you can make changes, and then that basically writes back to your repo, CI rebuilds it, and then deploys it. So it feels like a CMS, but there's no server on the backend.
00:02:46 - Rion Gull
Yes, that's very cool. And that's actually kind of near and dear to my heart because I personally, I have this thing with corporations running the world and I don't like that trend. And I think static sites are a good solution, technical solution to have people build sites And like you own the site. And if we could just get people— like, it's not— you don't have to— I understand there's a very small connection there, but it's an important small connection in that when you are interacting with servers, by nature, you're kind of like assumed into like into the Borg to some degree. Whereas if you can just author static sites, you know, that's something that you own. And as long as you can deploy it to any number of— it's just a more decentralized option overall, in general, is what I'm trying to get at. So yeah, I like that trend, and I think it pairs well with Web3, which is what we're here to talk about today. Dash specifically, Dash Platform will also hopefully— not hopefully, it will work with Static Site because it's just an SDK that you import into your, into your site. And let's go ahead and get your screen share going.
00:04:13 - Anthony Campolo
And also, we're going to talk about you've used that, you've had, you've owned Dash before.
00:04:18 - Rion Gull
Did you mention that? Yeah, yeah, you mentioned it on a pre-show, but I said, oh, hold that, let's, let's share that with the folks.
00:04:27 - Jim Fisk
Yeah, so I mean, this was a while ago. I, but I can't actually even remember the date when I purchased my first Dash, but I, you know, I had heard some kind of, you know, murmuring about some of the advantages of Dash over something like Bitcoin for being a transactional product in terms of, you know—
00:04:44 - Anthony Campolo
The message reached you somehow.
00:04:46 - Jim Fisk
Yeah, yeah. So, I mean, that was exciting to me because I actually— I know a lot of people think of crypto as this investment product, like the store of wealth that grows. I'm less interested in that. I like the idea of it being a transactional product, something that people actually use. And so that was exciting to me, so I just wanted to have some. And I would love to live in a world where that's something that I'm using on a day-to-day basis, whether it's using that as a crypto payment process or doing something like we're going to talk about today, about using it as a Dash platform to actually build products and things. That sounds exciting to me too. I think decentralization is the future. I hope that it succeeds and people embrace it. So I'm excited to learn more.
00:05:29 - Anthony Campolo
Cool, very cool.
00:05:30 - Rion Gull
I'm glad to hear that the message got to you somehow. We'll add you to the screen. Um, the, uh, looks like you— so you've, you got a little bit started, which is awesome because everybody's seen these, these first steps, uh, several times.
00:05:47 - Anthony Campolo
Probably want to start at create wallet and identity, I think, is about where you're at. Yeah, let's add your table of contents.
00:05:54 - Jim Fisk
Yeah, so I'm— so yeah, I'm not super far along. So basically I've done a couple things here, right? So I've set up some of the scaffolding. Um, I tried to do my first transaction via the— this faucet, um, thing that you guys had, or I don't know if you guys have set it up, or, um, who runs this? What's that?
00:06:12 - Anthony Campolo
How'd that go?
00:06:14 - Jim Fisk
So it, it didn't, uh— so I had trouble. So when I, um, when I went through and I, I did the transaction Um, I got like a, like a 500 error and the server seemed like it went down for a brief second.
00:06:23 - Anthony Campolo
So it worked? Yeah.
00:06:25 - Jim Fisk
Oh, it did. Okay, well, I don't see it. And so I'm supposed to be able to confirm this in my— via this address, right? But I don't see any transaction, so I don't know if it did work. Um, okay. And it did, it did lock me out for, uh, it said, uh, try back in an hour too. So it said both those things. And so I figured instead of spamming this and having it not work when you guys are on the, um, call, I might as well wait for you and we can take a look. This was over an hour ago, so Um, we should be good to try again if you want me to start here.
00:06:52 - Rion Gull
Yeah, let's do it, let's do it. Okay, so you already have an address then?
00:06:56 - Jim Fisk
Yeah, so this is— this is my API. I can't remember where this is.
00:07:00 - Rion Gull
Uh, all right, um, great.
00:07:02 - Jim Fisk
So I'll grab my address and let's put this in here. Okay, so that's my address. I gotta see— this is my— the thing I always struggle with is passing these. Okay, so Bridges, we're looking at— that looks like that's I think that's a bridge. That's always ambiguous. Bridge, bridge, bridge. Is that a bridge? I don't know.
00:07:23 - Rion Gull
Good question.
00:07:24 - Jim Fisk
I'm gonna say yeah. Um, more bridges. That's a bridge. That's a bridge. That's probably a bridge.
00:07:33 - Anthony Campolo
Okay, and then I'm gonna tell you the same thing. If it already gave you a message saying no more Dash for you, but that usually means that it gave you Dash, it's probably just not showing up in the block explorer.
00:07:44 - Jim Fisk
Okay, should I, should I click it? Coins now?
00:07:47 - Rion Gull
Let's go ahead and forward the coins and see what happens this time. And then Anthony, if, if you could do this, um, on your side, we may have to send him some coins instead of getting them from the faucet. I think that we're still running on the same testnet that we did last time, so if you already have some from last time by chance, Anthony, we could just, uh, try sending him some.
00:08:11 - Anthony Campolo
Yeah, I can also get him set up with Dashmate on a local node pretty easily now.
00:08:17 - Rion Gull
Okay, so we might end up going that route.
00:08:20 - Anthony Campolo
Let's just try— let's go forward like we have funds and see what happens when we try and register the identity, because I think it's— the funds are probably in there.
00:08:30 - Rion Gull
Oh well, I'm not so sure about that if the block explorer is not showing any, because usually I know this is buggy too, but We'll find out, I guess. So, so, Jim, just so you know, our testnet infrastructure isn't top-notch here. But so sometimes the Explorer doesn't show us what we're looking to see, and sometimes the faucet doesn't work.
00:08:54 - Jim Fisk
Okay.
00:08:55 - Rion Gull
But we have a— we have an alternate plan if that— if it's not working.
00:09:00 - Jim Fisk
Sure.
00:09:01 - Rion Gull
Which we want to test anyway. So it might be a good time to do that. Okay, let's go ahead and go through the— go back to the tutorial and then we'll, we'll act like we have funds. And if it in fact shows that we don't, then we'll, we'll go with the local route.
00:09:17 - Jim Fisk
Okay. Um, okay, so you want me to skip ahead here? So this would be the transaction link that's not appearing, but we'll get that in a minute. It sounds like, um, some more about that. Okay, then I, I did register and retrieve an identity.
00:09:31 - Anthony Campolo
Um, oh, okay, then you already had the funds. You can't do that without funds.
00:09:36 - Jim Fisk
Okay, okay. So, and this is my identifier, is— so this is— this means I have a valid identity with credits?
00:09:43 - Anthony Campolo
Yeah, the credits were because you loaded the funds from the faucet and then transferred that when you created the identity.
00:09:50 - Jim Fisk
Oh, okay, okay, that makes sense. Um, and I was able to verify that balance. I know there was a, like, a step here of Where is it? Doing the retrieve identities. I did this and I can see like a balance when I run that script. So I got, I got something like this.
00:10:11 - Anthony Campolo
That script was failing last time we were doing it, so that's good.
00:10:14 - Jim Fisk
Yeah, it seemed to work for me. I can run it.
00:10:16 - Anthony Campolo
I don't know if it— you should have your identity ID in your.env also.
00:10:21 - Jim Fisk
Oh, okay.
00:10:22 - Rion Gull
I don't think I run that retrieve identities and then We'll see if it— is this, is this where it spits out the, uh, yeah, the whole object?
00:10:35 - Jim Fisk
Yeah, it took a second the last time I did it, but it did spit out the balance. Um, here, actually, I copied it over to a text file just in case. Um, so it looked like this.
00:10:47 - Anthony Campolo
Nice.
00:10:48 - Jim Fisk
And it gave me this.
00:10:51 - Anthony Campolo
Okay, so you just copy that identity ID and create a Environment variable.
00:10:56 - Jim Fisk
Is it called identity ID?
00:10:58 - Anthony Campolo
Snake, screaming snake case.
00:11:01 - Jim Fisk
Okay. Right. All caps? Yeah.
00:11:17 - Rion Gull
We want that snake to be screaming.
00:11:19 - Jim Fisk
Yeah. I've never heard that, screaming snakes case. I like that.
00:11:23 - Anthony Campolo
Yeah.
00:11:25 - Rion Gull
Um, okay, uh, let's see, that command probably finished by now. Cool.
00:11:30 - Anthony Campolo
Yep.
00:11:31 - Jim Fisk
Oh cool, so we have this here. Yep, cool.
00:11:34 - Rion Gull
Same identity, right?
00:11:35 - Jim Fisk
Uh, yep. So that's the— yeah, 7br6pa.
00:11:40 - Anthony Campolo
All right, you're cooking, you're ready to go.
00:11:42 - Jim Fisk
Okay. Yeah. All right, um, back to the tutorial.
00:11:47 - Rion Gull
Yep.
00:11:47 - Jim Fisk
Okay. Okay. So we have an identity. Actually, maybe this is a good time to explain. So the identity, this is like a personal identifier for myself on the network. Is this like a, like a username for me or what's this? What is the identity?
00:12:02 - Rion Gull
It's like a public-private key pair. And what you see that was outputted is like the, the public part of it. And I, this is something I keep telling myself to look into. Specifically so that I can have a more confident answer. But what you, what you would need to know about this is that it's kind of like a public-private key pair where, or in fact it is exactly that. And the identity is what you use to do all of your interactions with the Dash platform. So it holds a balance as well. And you can register names, which we'll do, and you can register data contracts and submit documents all through this identity.
00:12:50 - Jim Fisk
Okay. And then this balance is not actually Dash. This is like some kind of equivalent credit that relates to a Dash?
00:12:58 - Rion Gull
Yes. So, um, one Dash, uh, if you're familiar with Bitcoin, Bitcoin, in Bitcoin you have one Bitcoin there are 100 million satoshis, is the smallest unit of Bitcoin. So a lot of people in the early days used to think you could only buy one Bitcoin, but now you can buy like subparts of Bitcoin. It's the same in Dash. So 100 million satoshis in Dash is one Dash, and then that gets further divided into 1,000 credits. So 100 instead of million, it's 100 1 billion credits is 1 Dash. So you get a bunch of credits. They're a very small unit. And that's how you— and the reason for that is that like the smallest unit of computation, all the things that you do on Dash platform is either it's computation like any cloud service. You would have storage costs and you would have compute costs and things like that. And the smallest unit of computation is a credit. Um, well, there's like a price list which we haven't shown or gone through, but you can imagine that everything that you do, whether it's storing data or registering data which has computation along with that, would cost a certain amount of credits.
00:14:18 - Jim Fisk
Gotcha.
00:14:18 - Rion Gull
So instead of using very, very small decimal points, we just use very small units.
00:14:24 - Jim Fisk
Gotcha. And, and so obviously, you know, through this process, we— I got some credits from, from the Faucet app, but like If I were to do something in production, I would basically— would I exchange Dash for the credits, or what? Could I buy these with US dollars, or how would I obtain these to start a platform? Yep, yep.
00:14:42 - Rion Gull
So you, you exchange Dash for the credits, exactly. And that's, that's like a, like a built-in exchange feature of Dash. So there are, um, high-level, uh, architecturally Dash consists of two blockchains. You have a proof-of-work blockchain and then you have a proof-of-stake blockchain. Do these terms mean anything to you, um, with the level of, uh, knowledge that you have with crypto?
00:15:08 - Jim Fisk
Do you know, I'm vaguely familiar with the terms, but I'd love a, like, a quick recap if— sure, if you're able to.
00:15:13 - Rion Gull
Yeah, so proof-of-work is where, um, so every cryptocurrency has to get, uh, created and put into circulation somehow. And in Bitcoin, since that was the first cryptocurrency, that's always a good place to start. In Bitcoin, Satoshi defined it so that you would have to do some work. So he was like killing two birds with one stone. One, one thing that he needs to do is he has to incentivize the node operators on the network. And another thing he needs to do is get his currency into circulation. And so might as well do those pair— like pair those up and have those all be done with one process, and that's the mining process. So the mining process is you have a bunch of transactions that happen on the peer-to-peer network. Somebody has to assemble these transactions and put them into a block of transactions and put a stamp on it that says these are all valid transactions. That's what the whole process of mining is. And because that is a process that takes computation power, and Satoshi recognized that you can't just let this be a volunteer thing, you have to incentivize and compensate the miners for doing this work. Otherwise, it's a non-sustainable network.
00:16:33 - Jim Fisk
Yep.
00:16:34 - Rion Gull
And so the method that which he used to allow miners to be the one miner on the network, and because it's an open network, anybody can choose to be a miner. So he decided that we're just going to have this, this work, this work function where you're just crunching a bunch of numbers to show that you've done some work. And so that the whole purpose behind that is Sybil protection, because you don't want, you don't want an attacker to be able to spin up like, let's say, 1,000 miners and just like take over the network. And so to protect against that, there was this work function that had to be performed so that you could, um, proportional to the work that you're putting into the network, you could be, uh, chosen to be that miner that, that, uh, gets to append the blockchain with new data of transactions that are occurring on the network. And so that's proof of work, and it goes a lot deeper than that. I just barely skimmed the surface, but that's proof of work. Now then, later came along proof of stake, where, um, some people recognize, hey, like, there's another way to secure this network, um, and we call it proof of stake. And it's basically, instead of people showing, proving that they've done a bunch of work to be able to participate in the network, uh, let's just prove that they own a bunch of the stake of the network, meaning the, the native tokens of that cryptocurrency. Also, contrary to popular belief, Ethereum was not the first proof-of-stake blockchain. It was actually very, very far behind in the list of proof-of-stake blockchains. It's now a proof-of-stake blockchain, but it wasn't until just recently.
00:18:17 - Jim Fisk
Yeah.
00:18:18 - Rion Gull
So proof-of-stake is similar in concept, but instead of doing a bunch of work, you just have to prove that you own a bunch of coins. And so Dash came along after Bitcoin and said, hey, there's this hybrid model where we can mine coins through proof-of-work, but we can also introduce some kind of staking elements into this. And we call that a masternode, where a masternode is a certain node on the network that's running this— a node meaning somebody running the computer, running the software that relays transactions and validates them and things like that. If we have this— if we have a node that proves that they have 1,000 Dash, then we can assign these specific special nodes certain responsibilities to perform. And because they're backed by stake, we can trust them. And so every masternode on the Dash network is collateralized by this 1,000 Dash stake. And they perform things like private send functions and instant send confirmations so that you can get instantly confirmed transactions, things like that. So that's not necessarily proof of stake, but it's proof, uh, we pioneered that concept of staking some coins to do some service. And then later on, we wanted usernames on our blockchain, and so we Long story short, we developed this product called Dash Platform. And we wanted this to be a Proof of Stake blockchain because we already have this set of validators that we already know and trust. And so we use a subset of the masternodes to be the stakers on the Proof of Stake network. So yeah, you have these two different blockchains and then there are ways to move funds from the proof-of-work chain to the proof-of-stake chain. And that's what we're doing when we're doing this top-up identities transaction. So that's a long answer to your question about, like, moving— how do you get credits? So yeah, you do this special transaction called the top-up transaction that moves the coins, and then there's also going to be a withdrawal function as well that will do the opposite and move it back from, from the proof-of-stake platform chain back to the proof-of-work core payments chain.
00:20:54 - Jim Fisk
Hmm. And anyway, this is done for, for an efficiency standpoint, is that to not waste compute, or what is the, what is the basic, like, what is the impetus behind that structure?
00:21:07 - Rion Gull
Yeah, like, why, why have two different blockchains? So proof-of-stake blockchains, uh, proof-of-work blockchains, I'll, I guess I'll start with that. They're not, um, they're not really designed to, to be able to hold data and, uh, have like indexing and proofs and stuff like that. If you, you can store data in proof-of-work blockchains, a lot of, uh, people have done that. You store data in like the op return field is what it's called. But it's not specially designed for that. Um, so the proof-of-work blockchain, which is based on Tendermint, um, if you've heard of, uh, blockchains like Cosmos or things like that, they, they developed a blockchain that you could basically just, uh, like kind of like a white-labeled blockchain almost. Like it just, it's got the bare-bones minimum infrastructure that you need to create a blockchain, and then you can just anybody can pretty easily spin up their own blockchain. Well, we took that and we modified it, but basically at the end of the day, the, the purpose behind that is because we— the purpose behind having two blockchains is that we have two main different types of functions, um, storing data and retrieving data. This is better done on a proof-of-stake blockchain that has um, like, yeah, it's, it's just better tailored for that.
00:22:40 - Anthony Campolo
Okay.
00:22:40 - Rion Gull
Whereas we don't want to get rid of the proof-of-work chain because there are certain security, um, properties that that has. And actually, not just security, but some people think it's even more fair, um, ways to distribute coins. So we have both. So we have— if we, if we want certain properties of one, we can use the one. If we want certain properties of the other, we can use together. So it's kind of like a marriage between these two different types of blockchains.
00:23:12 - Jim Fisk
Okay.
00:23:12 - Rion Gull
And those are really like the main two. And you also have proof of authority chains where it's like, uh, you know, very indistinguishable from just a centrally controlled corporation. So we're not too interested in that anyway.
00:23:24 - Jim Fisk
But, um, yeah, but yeah, in, in the we that you're talking about, this is like a— what is the term— DAO? Is that decentralized organization?
00:23:33 - Rion Gull
Yeah, so, so DAOs— decentralized autonomous organization— it's just a kind of a funny term for an organization that's open for anybody to participate in. So do you know much about DAOs or, or DAOs?
00:23:50 - Jim Fisk
Or besides the name and yeah, the general concept, but no, I don't know functionally how they work.
00:23:57 - Rion Gull
Well, there are a ton of them. Um, there are a lot of them on on the Ethereum, uh, in the Ethereum ecosystem and other proof-of-stake ecosystems. It's basically— Anthony, I've been talking quite a bit. Why don't you— and you, you're pretty familiar with this topic, so why don't you give Jim your explanation of, of a DAO?
00:24:20 - Anthony Campolo
Yeah, so a DAO is like a corporation and a government had a baby written in code. No, it's like a bunch of contracts that allow funding to be set aside to basically build new stuff or maintain the network. That is then decided on by people submitting proposals that are voted on, and then it gets paid out to the network. So if you own Dash, you can vote on like where the Dash funds should go. So, um, it kind of is more transparent in terms of everyone sees where the money is, who's the— who the money is going to. And it's, um, it's really interesting system. A lot of them are pretty dysfunctional, but, um, this one is— they're like going for a while and seems to— I mean, I always get paid.
00:25:12 - Jim Fisk
So is it a register? Is it registered with any government body or anything like that?
00:25:18 - Rion Gull
No, not that— not the DAO itself is not. Uh, so the DAO itself, or any DAO for that matter, is just software. I mean, okay, at the end of the day it's just software, and what that software does is depends on the specific DAO. But in, in our DAO, um, what it is, is it— our DAO is mostly part of our proof-of-work chain. So that's— I mean, obviously we, we started as a proof-of-work chain. We don't even have any proof-of-stake chains on the mainnet yet. That's— this is still in testnet. Um, but yeah, like, our DAO is essentially a function in the C++ code, or a set of functions in the C++ code of the, uh, of the, of the, uh, that's synonymous with a node. It just happens to be written in C++. It's just certain functions there that say, hey, um, there's a certain cycle where we're accepting proposals on our network, and those proposals can be requesting funds, they can be asking a question, and then the node operators, or specifically the masternode operators, are allowed to then vote yes, no, abstain on those proposals. And if it's a funding proposal, then if it reaches— if that specific proposal reaches a certain amount of votes, then The funds are then created and then sent to the owner of that proposal, which, you know, putting the address to pay out to is part of the proposal creation process. If it's a— if it's just a question, like sometimes people— like, as a very classic example of a governance question would be like, hey, should we raise the block size limit from 1 megabyte to 2 megabytes? That was something that the Bitcoin community got mired in for many, many years, and people still look back on that huge debate, and people are still actually having that debate. But in Dash, we actually had that question, and somebody just submitted a proposal to the network, and the stakeholders, meaning the masternode owners, they voted on it, and it was done within a month, you know. So it's just a very easy way for your network to come to decisions on specific, on important matters, uh, instead of going back and forth on Reddit. You know, there's, there's some importance of going back and forth and having discussions on Reddit and Twitter and things like that, but at the end of the day, you want to know what the stakeholders, uh, view as their opinion. So he actually pioneered the whole concept of DAOs as well in, uh, in that sense, where we were the first functional DAO back over— not over 10 years. Our blockchain has gone on for over 10 years, but our DAO is probably 8 or so years old now. So it was the first one even before the quote "the DAO" in the Ethereum land, which is a little bit more popular but wasn't the first. Anyway, so yeah, that's the Dash DAO and that's DAOs in general. It's just like Anthony was saying, if you had governments which operate by polling and voting and things like that for the most part, and married that with corporations which have funding and all that stuff. That's what a DAO is. And it's— the distinguishing feature is that it's open. So anybody can make a proposal, anybody can join. You know, if you have 1,000 Dash, you can operate a masternode and become a voter. Nobody's going to say no. Because it's just software.
00:28:58 - Jim Fisk
Yep. And the funding itself is the— what's coming from the blockchain, right? Like, the funding is Dash.
00:29:04 - Rion Gull
Yes.
00:29:05 - Anthony Campolo
Cool.
00:29:06 - Jim Fisk
Yep.
00:29:06 - Rion Gull
So where in Bitcoin, 100% of the newly issued Bitcoin on a daily, monthly, yearly basis, that's all going to pay miners, which is important. But in Dash, we recognize that's not the most important— it's not the only important thing to fund. It's also important to fund your core developers. It's also important to fund community developers. It's also important to fund marketers. And so we split out a portion of the block reward, 20% actually, to this generalized fund that can pay anybody who submits a proposal and has a successful proposal. Including yourself, Jim. Like, you could make your own proposal to the network and try to ask for funding if you wanted to work for Dash more. in the future.
00:29:54 - Jim Fisk
And then I could— if— so I assume like someone who's well respected in the community can probably propose something larger, and then they might get funding that they then allocate, allocate to other developers or other people to help them like carry out that vision. Okay, cool. Yeah, that's exactly—
00:30:09 - Anthony Campolo
that's where we are.
00:30:10 - Rion Gull
That's what we're doing. So I get funding from the, from the proposal system. I actually just, a few hours ago, we, we had our call to, um give our quarterly report from last quarter and, and ask for more funds for the, for Q3. And, um, yeah, so I, I receive those funds and then I pay out because not everybody has to have their own specific proposal. Sure, there's a certain balance to take. You don't want too many people, uh, having proposals and then it becomes hard to manage and for the stakeholders to read 100 proposals. But you also don't want one proposal So yeah, we try to strike a balance. That's, that's what we're paying for. That's how we pay for this specific effort right here. So, yep.
00:30:54 - Jim Fisk
Nice. That sounds, sounds great. Should I start sharing my screen again? Go back to the tutorial? Yeah. Okay. Let's see here. Oh, are you with me?
00:31:10 - Rion Gull
Oh, we need to add— yeah, there you go.
00:31:12 - Jim Fisk
Um, yeah, and then so I think, um, this kind of like this next section looks like it's going back to what we were talking about. So, um, looks like we're heading to converting Dash to credit. So that kind of goes to that initial question, um, I had there. So, uh, looks like I need to do my top-up identity script. Can pop over here, I'll create that file, and then That will create a script file called top-up identities. Okay, and there's probably some code we want to put in here. Okay, let's grab this. And then, Anthony, I don't know if you want to walk through this, but, uh, it looks like we're getting our wallet, we're getting our identities, and then we're running a top-up And so with this, this here, are we just adding—
00:32:07 - Anthony Campolo
yeah, that's, that's the credits. Yeah, so you're— that's the amount, and that's what we're talking about with the, the smaller denominations. You just need the identity ID, and then you feed that to the, to the top up. And the way I have this written is that you can end up with multiple identity IDs within a single wallet if you create more than one, and this just tops up all of them because it's It's all just Monopoly money right now, but you would want more granular control of that once this is on mainnet.
00:32:37 - Jim Fisk
Okay, so because this is a test environment, like, that's, that's what's allowing me to do— because I don't actually have any real money right now, but because we're in a test environment, it's allowing me to do this. Is that the case?
00:32:48 - Anthony Campolo
Yeah, because you got the funds from the faucet, and so that you can transfer into credits, and so If you have like 3 identity IDs, you could top up each of them and it's not going to be very much.
00:33:02 - Jim Fisk
Gotcha. Okay, so it's convert— so the credits I got from the faucet were— are being converted here. That's what we're doing, the, the money I got from the faucet?
00:33:10 - Anthony Campolo
Yeah, that's moving from the layer 1, the original chain, to the platform chain, which is where the identity and all that stuff lives.
00:33:18 - Jim Fisk
So what I got from the faucet was, was that credits or was that Dash? Like, what did I actually get from the faucet?
00:33:24 - Anthony Campolo
That was Dash. And then that is turned into the credits once you move on to the platform functionality, which is the identities and the storage and all that.
00:33:33 - Jim Fisk
Okay, cool. And that's the process we're doing here. We're converting that. Okay. Um, so run this script here.
00:33:41 - Anthony Campolo
Yeah, I have another tutorial I'm working on and I made it even simpler to where the, the function that you need the credits, I just had a top-up run right before anyway. So it's just kind of does it automatically. But this is all stuff where you actually want granular control once this is real money. You don't want to be just throwing random money in different places.
00:34:04 - Jim Fisk
Yep. Um, and while we're waiting for this to complete, um, how, how sensitive is the information in this? Is this all considered private if I was in a real world environment? Like, should my wallet address— do I need to worry about this?
00:34:17 - Anthony Campolo
The mnemonic is the most important thing. If this had real funds on it, that's the thing that gives you control of the whole wallet.
00:34:24 - Jim Fisk
Okay. But this is like a public address, so this is something I could actually use to receive funds from someone I didn't know or necessarily trust?
00:34:32 - Rion Gull
Yep. Yep.
00:34:32 - Anthony Campolo
That's what you do when you claim things in the DAO for tasks. You give your wallet address, the thing you did.
00:34:39 - Jim Fisk
Okay. And then my identity ID, that— is that private or public?
00:34:45 - Rion Gull
That's public.
00:34:46 - Jim Fisk
Okay. Great. Um, let's see here, see if I can— okay, so looks like— I'm sorry, let me just close my mini map here.
00:34:58 - Anthony Campolo
Um, okay, get rid of the thing on the bottom too that says hi.
00:35:01 - Jim Fisk
Oh yes, yeah, thank you. Um, so okay, the block height handler is already set. My identity credit balance for my ID is this, so that just topped up. It converted my Dash to the credits. Okay. Then is this reflected over in my browser? Should I look at that or is that reflected here? This is the top-up we just did. Here you go. Yeah. I can take a look at this. Cool. Next step. We got our output here. Okay, so now we want to register and retrieve name, create a file. Okay, we're going to create register name. Is this like a username I'm creating right now?
00:35:53 - Anthony Campolo
Yeah, it's kind of like a domain slash username.
00:35:56 - Jim Fisk
Okay, so I create that script and then we're going to create a label in our env and replace your name here with my name. Okay. And do I need this, this comment? This looks like a— oh, it's just actually doing it. Gotcha. Um, grab this.
00:36:15 - Rion Gull
I'm just realizing now, Anthony, um, you go ahead and keep working if you want, uh, Jim, but I'm just realizing now that like introducing the name is actually conceptually should be subsequent to some of the other stuff that we do in this because the name registering a name is just one type of one type of a document submission. And so what we'll do in the later steps of this, uh, tutorial, Jim, is we're going to create a data contract, and you can think of that very similar to a database schema.
00:36:55 - Jim Fisk
Okay.
00:36:55 - Rion Gull
And then we're going to— after that, we're going to submit documents that adhere to that schema that are called documents. So we have these two concepts in Dash Platform: data contracts and documents. And it's just like I said, the data contract is just like a platform version of a database schema for a document database. And then the Dash Pay There is a certain data contract that will be enabled on mainnet soon-ish and is already on testnet as well called Dash Pay. That's a certain data contract that the developers of Dash Core Group have written, and that was one of the reasons that we built Dash Platform is to have this username system. But it's really just— it's the same as any other data contract that you or I or Anthony could make. But it is a so-called system contract, which means it's kind of like launched with Dash platform, and it's kind of like a blessed data contract. But it's the same things conceptually as any contract that we would be making. So Um, yeah, conceptually we should probably actually put registering a name down a little further, maybe, as I'm thinking about it, because you don't have the— we haven't yet talked about the data contracts and the documents yet at this point in the tutorial.
00:38:38 - Jim Fisk
But anyway, do you want, do you want me to skip ahead so we can do it in the sequence of what you're describing?
00:38:42 - Rion Gull
We can, we can keep doing it in this sequence. I just, I wanted, since it seems like you're pretty inquisitive. I wanted you to get the idea of what this, uh, registering of a data— of a name is. It's just one instance of registering a data contract.
00:39:01 - Anthony Campolo
Yeah, I think the— you're right that there should be a section where we just kind of talk about that there's pre-made contracts already. I think right now the way it's grouped is to keep all the identity stuff together So you like have the concept of identity and then the concept of storage. And so that I think kind of makes sense. But I think once then the data contract is introduced, you can be like, oh, by the way, here are these other contracts you've already been working with under the hood. Yeah.
00:39:31 - Rion Gull
So anyway, we'll work that out.
00:39:33 - Jim Fisk
Yeah. Yeah. And as we get there, I think I have a few questions on it, but just, just real quick. So as If I was a platform developer, would I have multiple names registered or would I have like one? It sounds like I would possibly have multiple.
00:39:48 - Anthony Campolo
As many as you want.
00:39:48 - Jim Fisk
Yeah, gotcha. Okay. But would that be typical, like, like to carry out, you know?
00:39:54 - Rion Gull
It really depends on, on what you're doing. Like if you had an application where you had some kind of, you know, you have some kind of business idea in mind and Just like any application, you're going to have users and those users are going to be doing something on your application. Well, in the Dash Platform world, you might set up an easy way for your users to register for Dash Platform usernames and just use that as your authentication method.
00:40:30 - Jim Fisk
Yep.
00:40:31 - Rion Gull
And in that case, you would have your users, you would have an application that exposed the ability for your for your users to register as Dash Platform users. And in that case, you'd be giving a user— you would be creating a username for each of your users. But, you know, that's just one version. You could also— another application is you personally just want to register your own, you know, Jim Fisk name. But you might want a private one in addition to that. And you could use the same identity that controls these two different private— or these two different personas. So there's— that's a different application.
00:41:14 - Jim Fisk
Okay. And so if I were— so just the same way that I ran this register name script, I would be— I would potentially use the same mechanism for registering all my users of an application I might build. Yep.
00:41:27 - Rion Gull
Okay. Yeah. If in fact you wanted your users to leverage Dash Platform as your authentication method, And that's— I've told this to Anthony before— one way to kind of easily remember what Dash Platform is good for is it's kind of like a spa for spas. And by SPA, I mean— it's a different acronym. So SPA meaning Storage, Payments, and Authentication.
00:41:55 - Jim Fisk
Different than the spa that I'm used to. Okay. Yeah.
00:41:58 - Rion Gull
But SPA for spas, meaning Storage, Payments, and Auth. For single-page applications. It's like, oh gosh, single-page application, you don't want to deal with Auth0 for your auth, and you don't want to deal with Stripe for your payments, and you don't want to deal with AWS for your cloud storage. You can use Dash Platform for all of those.
00:42:19 - Jim Fisk
Gotcha. Okay. Um, okay, so I'm over here, uh, it looks like That succeeded. Um, I registered my Jim123. Um, cool.
00:42:36 - Rion Gull
So you're on the platform now.
00:42:38 - Jim Fisk
Great. Okay, so following along here. Um, so it looks like that's what I got there. Um, this is, I think, just screenshotting basically what we were just looking at there. Um, So, now we're gonna create a file to retrieve name. So, I think this is basically just using the API to get the same information. Is that what we're doing here?
00:43:01 - Anthony Campolo
Yeah.
00:43:01 - Jim Fisk
Mm-hmm. Okay. Let's create that file. And we have retrieve name. And let's see. We have a script here. Okay.
00:43:19 - Rion Gull
Okay, so, so the, the application that you just went to earlier, the platform, um, platformexplorer.com, this guy that made this, he, he's basically doing functions similar to what you're doing to find the names on the platform. He's just doing a generalized approach where he's kind of capturing all the different transactions that go through, and so This is— that's this concept of an explorer, is that you, you scour the whole blockchain and you're listening for all the events on the blockchain and you're dumping it into this explorer that anybody can just see if what they did was working. But yeah, you're doing the same thing with the code.
00:44:05 - Jim Fisk
Oh, gotcha. Yep. Yep. He's given us like a GUI for the same basic API transaction. Yeah. Okay. That makes sense.
00:44:15 - Rion Gull
Great.
00:44:17 - Jim Fisk
I just added that there and then it looks like we're just going to run it to test it. Let's give that a test. Let me expand that. It's basically, this looks like maybe they're exposing more information here, but it's the same information as we're seeing here. It looks like—
00:44:41 - Anthony Campolo
yeah, and you can see there, there's the data contract. Um, so this has all that information in there.
00:44:48 - Jim Fisk
Okay, okay, great. And okay, and so yep, we got our object, our name object. Our data contract info. Um, yeah, so I guess the tutorial I'm sure is going to get into this. Okay, data contracts. Um, I know we were just— Ryan, you're just discussing this. Is it helpful for me to try to go through this, or you want me to skip ahead?
00:45:24 - Rion Gull
Um, let's see. Um, I switched off. I was looking at data contracts. Yes. Yeah, we'll go through this.
00:45:31 - Jim Fisk
I'll breeze it. So it serves as a blueprint for the structure of data that an application intends to store on the decentralized network. Okay, it defines the schema, documents database records, and you had described this as kind of like a database schema for the decentralized network. Um, contracts enable the platform to validate data against these schemas to ensure consistency and integrity. Okay, they are crucial for decentralized apps. They provide a structured and predictable way to interact with the Dash blockchain. Data contracts facilitate data storage, retrieval, manipulation in a trustless environment. You can create data contracts through an online user interface, Dashpay. Okay, should I look at this? This is just an example.
00:46:14 - Anthony Campolo
Oh, you can check it out. Yeah, it's a cool little app.
00:46:16 - Rion Gull
Yeah, we won't, we won't go too much into this, but if you did, if you had no idea what, how to create a data contract, this is, this uses AI to help structure your, uh, your contract and give you a good starting point.
00:46:29 - Jim Fisk
Oh cool. Great, I can see that being useful. Okay, register, retrieve, and update contract. So create a file, register contract. Okay, and then we're going to add a way to create new contracts. And so, um, that first name retrieval, uh, it, it it displayed some information about a data contract. So was it— a data contract was created through that process and now we're creating another one? Is that what we're doing?
00:47:03 - Rion Gull
Yep.
00:47:04 - Jim Fisk
Okay, let's see, uh, what did I just create? I just created register contract.
00:47:12 - Rion Gull
Okay, yeah, so now, so now you're, you're creating your own contract.
00:47:21 - Jim Fisk
And what— and what is the purpose of this contract that I'm creating here?
00:47:26 - Rion Gull
Anthony, you want to describe that?
00:47:28 - Jim Fisk
It's just— it's just hello.
00:47:29 - Anthony Campolo
Okay, it's just like the contract document has a note. The note is type object. The object has a message. The message is type string.
00:47:37 - Jim Fisk
Okay, yep. And okay, cool. So we created that. We're gonna run the script. Let's give that a run. And this will probably appear over here as well. If I come back here. Oop. I guess it doesn't like— it doesn't like that.
00:48:10 - Anthony Campolo
It should give you the output in the terminal anyway.
00:48:12 - Jim Fisk
Yeah, okay.
00:48:14 - Rion Gull
Um, so let's, uh, done.
00:48:16 - Anthony Campolo
So give it a second. This is— go, that's another thing to do.
00:48:19 - Rion Gull
Go over to the Platform Explorer and go to contracts, data contracts.
00:48:24 - Jim Fisk
Okay.
00:48:26 - Rion Gull
And you see the, the latest one was 7/9, so that was like several days ago.
00:48:33 - Jim Fisk
Yeah.
00:48:34 - Rion Gull
In theory, if we refresh this after it's done, you'll see it Yours.
00:48:39 - Anthony Campolo
Yeah.
00:48:39 - Jim Fisk
Yep. So this is me.
00:48:40 - Rion Gull
Yep.
00:48:42 - Jim Fisk
Okay. Did it— was this supposed to say something, Anthony, or was it a blank message?
00:48:52 - Anthony Campolo
Um, go back to your terminal.
00:48:57 - Jim Fisk
Okay, let's see here.
00:48:59 - Anthony Campolo
Um, sorry, what part were you talking about the blank message?
00:49:04 - Jim Fisk
Does this say hello world?
00:49:07 - Anthony Campolo
No, not yet. This creates the schema that allows you to have a message type. This is the thing. There's data contracts, there's documents.
00:49:17 - Jim Fisk
Data contract says we want a string. Yeah. Okay. I get it now.
00:49:20 - Anthony Campolo
Gotcha.
00:49:21 - Jim Fisk
Yeah. Okay. So, yeah, we specified. Okay. Yep. Message type string.
00:49:29 - Anthony Campolo
Okay.
00:49:29 - Jim Fisk
And now we're gonna— put a document on this contract, which is the actual data.
00:49:33 - Anthony Campolo
That's right. Yeah.
00:49:34 - Jim Fisk
Okay. Um, so I continue on.
00:49:38 - Anthony Campolo
Yep.
00:49:38 - Rion Gull
Okay.
00:49:39 - Jim Fisk
All right. So this was basically what we saw in the terminal, I believe. Um, okay. We looked at the Platform Explorer. Great. And now we're going to do retrieve, uh, retrieve contract.
00:49:53 - Anthony Campolo
Okay.
00:49:58 - Jim Fisk
And retrieve contract. Copy this. Okay.
00:50:09 - Anthony Campolo
Oops.
00:50:10 - Jim Fisk
Okay. Now we have that and we're going to run the script, retrieve contract. Okay, and this is, um, retrieve contract is— again, we're directly hitting the—
00:50:38 - Anthony Campolo
yeah, it's the same output that you got when you created it.
00:50:42 - Jim Fisk
Okay, cool. Yeah, some—
00:50:47 - Anthony Campolo
this, this one throws an error sometime. I think, I think I actually know what I need to do to fix this, but we can move on to the next, next part.
00:50:54 - Jim Fisk
Okay, just breeze ahead a little bit. Okay, so view on the platform. Okay, then we'll be able to check this out. And, um, next we're going to create update. Okay, so we're going to update the contract. And so we're gonna update the schema of the contract, is that what we're doing?
00:51:17 - Anthony Campolo
Yeah, so it's like if you decide, oh, actually my customers need, uh, you know, country information or something like that, you could go back and modify it.
00:51:28 - Jim Fisk
Okay, um, I should be able to just do this in another window real quick. Um, I'll let that continue running. And I'll go to update contract. And we'll copy this code here. And I'll save it. Let me see if that's still going. It looks like—
00:51:56 - Anthony Campolo
you could just kill that, actually.
00:51:58 - Jim Fisk
Oh, just let this kill it?
00:52:00 - Anthony Campolo
Yeah, you can kill that.
00:52:01 - Jim Fisk
Yeah. Okay.
00:52:01 - Anthony Campolo
It's erroring out.
00:52:03 - Jim Fisk
Oh, gotcha. Okay. Okay, so update contract is in there. We're probably going to run the script, these handy-dandy scripts.
00:52:13 - Anthony Campolo
And so this just adds an author information to the note.
00:52:18 - Jim Fisk
Gotcha. Um, great. So yeah, coming through here. Uh-huh. Get note. Okay. And so basically we're just— yep, adding the author in this This is not affecting the message string that we had already put in here. It's just adding to that. Yeah. Okay. Great. So, then the next thing would be run this. Did I run this? No, I don't think I did. Okay. So that's updated. I should be able to probably check that out here in my schema, right? If I come here.
00:53:02 - Anthony Campolo
So that actually also errored out.
00:53:04 - Jim Fisk
Oh, okay. Let's see here.
00:53:07 - Anthony Campolo
Oh, actually, check your.env real quick.
00:53:15 - Jim Fisk
Oh, yeah.
00:53:23 - Anthony Campolo
I think you— let's see, there's a part where you update— go to your client also.
00:53:34 - Rion Gull
The contract ID, I think it needs.
00:53:38 - Anthony Campolo
Yeah. Sorry, I'm looking at two things at once. So, there's a part in the tutorial where we update the client. Okay. Actually, that—
00:53:57 - Jim Fisk
I think I— yeah, because I wrote the client as one thing and then I—
00:54:01 - Anthony Campolo
that's right after the update contract part, actually.
00:54:05 - Jim Fisk
Oh, okay. I missed it.
00:54:06 - Anthony Campolo
Oh, wait. No, you need to have the contract ID in the update contract. So, you need the contract ID in your.env.
00:54:12 - Jim Fisk
The contract ID in here? Okay.
00:54:14 - Anthony Campolo
Yes. Uh-huh.
00:54:15 - Jim Fisk
Um, in my contract—
00:54:16 - Anthony Campolo
I am— that's also why the retrieve contract was failing.
00:54:19 - Jim Fisk
Okay. And my contract ID is this? Uh, yeah, go back to your—
00:54:28 - Anthony Campolo
go back to your terminal output and just scroll, scroll up to whenever you did the create contract.
00:54:37 - Jim Fisk
Yeah, yeah, right there.
00:54:38 - Anthony Campolo
Contract ID.
00:54:39 - Jim Fisk
Go—
00:54:40 - Anthony Campolo
it's up a little higher actually.
00:54:41 - Jim Fisk
Oh, is this not it?
00:54:42 - Anthony Campolo
It's lost in the— so right above Oh, actually, it's kind of the warning kind of obscures it. So higher— sorry, too far. Go back down.
00:54:55 - Jim Fisk
This here—
00:54:56 - Anthony Campolo
go back down.
00:54:57 - Rion Gull
It's gonna be in the format of, of an end, uh, an environment variable.
00:55:03 - Anthony Campolo
So it'll scroll down a little bit. Keep scrolling, keep scrolling. Okay, right there.
00:55:10 - Rion Gull
There it is.
00:55:11 - Anthony Campolo
Up a little higher above the board. Oh, gotcha, gotcha. Yeah, yeah. Just copy paste that.
00:55:17 - Jim Fisk
Got— oh, same ID, but you want the form. I get what you're saying. Okay. Um, yep, gotcha.
00:55:24 - Anthony Campolo
There we go.
00:55:25 - Jim Fisk
Uh, and then run this update contract again.
00:55:29 - Rion Gull
Yep. Okay, he might— he may need to update the client at this point, right, Anthony?
00:55:41 - Anthony Campolo
After this, you update the client. Yeah.
00:55:42 - Jim Fisk
Okay. So, let's give this a second. And then— okay. So, we updated the contract. Hopefully we get something like this back. Okay. And then add an apps object to the client options and pass the contract ID to enable contract name. Contract document syntax while accessing contract documents, for example. Okay, uh, tutorialContract.no. So is this a, is this a document?
00:56:16 - Anthony Campolo
It's like a query syntax kind of.
00:56:19 - Jim Fisk
Okay, um, okay, so we're adding our contract ID here. Yeah, let's, uh, see if this finishes. Oh, it did. Okay, so that looks good. And then I should probably be able to see that over Is it here? Okay. Yep. We have our author. All right. Cool. So, let's go to client.js. Let's just get rid of this whole thing. Oh, and I got to recopy this actually. Okay. So, I updated the client to use our contract ID, and then we're going to submit and retrieve documents. So we're going to submit our first document. Let's create a file that does that, and then we're gonna put some boilerplate in that file. Um, so it was called create document, uh, submit note document. Okay. And then we're probably gonna run it, right? Okay. Submit note document. Run that. Okay. And that would appear on— so, right now there's no documents, but we have our schema and then documents in this explorer. I assume we'll get it over here.
00:57:53 - Anthony Campolo
This is where the magic happens. This is what makes it all worth it, right?
00:57:58 - Jim Fisk
I actually didn't even check what we're writing over here. Anything good? Hello from a label.
00:58:10 - Rion Gull
You can change that if you want. Oh yeah, you can say howdy.
00:58:14 - Jim Fisk
Yeah, get crazy, get crazy with it. Um, Yeah, it'll get crazy. We'll write another one after this. If I just keep running the script, it'll just keep adding new ones, I assume?
00:58:27 - Anthony Campolo
Yes, and then you're also going to see how you can edit an already submitted one.
00:58:32 - Jim Fisk
Oh cool, all right. Um, I'll let this go running. Yeah, I'll let it finish before I get too crazy here. Oops. So, okay, so we're letting our submit document note run.
00:58:49 - Anthony Campolo
And once this does run, you're going to want to save that document ID, this ID here, and put this in our env.
00:58:55 - Jim Fisk
Okay.
00:58:55 - Anthony Campolo
Yep.
00:58:56 - Jim Fisk
Um, okay, it should be done by now. Let's take a look. Okay, looks done. I just want to check over here, get the validation of having it All right, cool. All right, and I can look at this document and I can see it grabbed my registered name, picked a date. Cool, that's great. Um, all right, I could just add another one here, right? So I could just run this again. Um, all right, so now we're gonna do get documents again, right?
00:59:34 - Anthony Campolo
Document ID to your.env.
00:59:36 - Jim Fisk
Oh yeah, yeah, sorry. I already forgot. My document ID is here. Okay. And we want to go to—
00:59:56 - Anthony Campolo
and then real quick, you go to the error that you got from trying to submit the other one. Scroll up just a little bit. Uh, okay, sometimes this just is an issue, I think, with the network.
01:00:10 - Jim Fisk
But, um, if I run—
01:00:11 - Anthony Campolo
want to run again? Um, let's go on to the edit. Okay, next one.
01:00:18 - Jim Fisk
Okay, uh, get the documents first. Yeah, I don't think we've— okay, um, okay. That was called get documents, and then we'll test it. Okay, so we get something like that, and then we're going to remove it. Or update it first. Okay, got hello, great. Um, update note document, update, or update. Um, do you— I don't know, for your tutorial's sake, if you guys want to be going through, stepping through this code anymore.
01:01:17 - Rion Gull
I'm kind of just going through the most Yeah, you can, you can take a look at it. Uh, we don't, we don't have to go over it too much.
01:01:25 - Jim Fisk
Okay. Yeah, I mean, yeah, get the gist of what's happening.
01:01:29 - Anthony Campolo
The where part is what's important because that's basically grabbing the ID with the document ID, and you can in theory use that to search based on like the, the message and other stuff.
01:01:43 - Jim Fisk
Okay. Uh, yep. So yep, right here. Gotcha.
01:01:48 - Anthony Campolo
And it just loops through and gives you all of them.
01:01:52 - Jim Fisk
Okay.
01:01:54 - Anthony Campolo
Actually, sorry, that's the get one, the loop. This is just grabs a specific message.
01:02:00 - Jim Fisk
Yeah. And so, so I guess, um, are we resetting— like, how are we resetting just one specific note here? Okay, we're gonna—
01:02:10 - Anthony Campolo
for the document ID, because each document you submit has its own ID separate from the contract ID.
01:02:16 - Jim Fisk
Aha. Okay. Okay. So, then we probably want to run this, I imagine. Update. Okay. So, we're going to run that. So, we're basically adding in again to our message here?
01:02:40 - Anthony Campolo
Yep.
01:02:41 - Jim Fisk
So our message will go— I forget where I was actually.
01:02:48 - Anthony Campolo
It was the one you were just on.
01:02:50 - Jim Fisk
Is this one here? Okay. Oh yeah, here we are. So yeah, so change from this to hello again. When's this done?
01:03:03 - Rion Gull
Yeah, it should, it should be 2 at that point, I think.
01:03:06 - Anthony Campolo
Oh, it appears as like it'll only, it'll only be 1 because it's just modifying the one that was already in there.
01:03:12 - Rion Gull
Okay, gotcha.
01:03:13 - Jim Fisk
Yeah, um, yeah. And then there's like— so this is, um, since this is an update, like, I, I don't know how blockchains work with like data history. Like, is this initial message scrubbed completely, or is that something that stays somehow in, in history?
01:03:35 - Rion Gull
Um, it would probably remain, remain on indexing services, but as far as the platform goes, it's scrubbed because you can be able to make transitions that basically say, you know, submit note.
01:03:50 - Anthony Campolo
Like if you go back to your main identity page in the Platform Explorer where it shows like all the different things you've done.
01:03:58 - Jim Fisk
Mm-hmm. Oh, was I there?
01:04:02 - Rion Gull
Search.
01:04:02 - Anthony Campolo
Yeah, just try searching for your identity. Wherever that was.
01:04:06 - Jim Fisk
So, like grab my ID from—
01:04:09 - Anthony Campolo
yeah.
01:04:10 - Jim Fisk
Okay. This identity ID here? Gotcha. Okay. And then if I just search this here.
01:04:24 - Anthony Campolo
Yeah. So, you see there's all those things you've done. So, that saves the history.
01:04:29 - Jim Fisk
Hmm. Nice. Okay.
01:04:30 - Anthony Campolo
For each state, uh, state transition.
01:04:32 - Jim Fisk
Uh-huh. And this is like the blockchain transactions, right? So like creating identity, topping up. Yeah.
01:04:38 - Anthony Campolo
Okay.
01:04:39 - Rion Gull
So you can click through each of those little tabs and see, uh, let's see, I'm not sure which tab you clicked.
01:04:47 - Jim Fisk
I clicked the identity create.
01:04:49 - Rion Gull
Oh, okay.
01:04:50 - Jim Fisk
Um, so like go click on documents, uh, one of the batches, or Oh, documents. Got you. Got you. So, this was the create. Oh, this was maybe the second time I tried to create it.
01:05:07 - Rion Gull
Oh, that's your— that's your dash DPNS. That's your dash name document. That was a document against somebody else's schema.
01:05:23 - Jim Fisk
Okay, a document against someone else's schema, meaning the Dash Pay contract.
01:05:28 - Rion Gull
So you didn't create the Dash Pay contract, it existed before we did this tutorial, but you created a name on that contract. Okay, and then this is the document that you created on your own contract.
01:05:42 - Jim Fisk
Mm-hmm, gotcha. Okay. So we ran the update, we got the update, it looks like that's all good. Um, we have our update again. Um, the ID should be the same, so I don't have to update the environment variable at all. Um, we got this. Okay, now we can create, read, and update our notes. All we have left to do is delete. Okay, so we're just going to create a new file called delete, and let's see here. Create the file. Delete note document. And we will copy the boilerplate. Okay. And so, it's getting our document ID from our environment variable. And it's running some code here to run a delete action on that. And let's give it a shot.
01:06:54 - Rion Gull
So if you haven't noticed, we're just basically doing the CRUD operations that you would typically do.
01:07:02 - Jim Fisk
Yep. And then so that should affect my data over here, I'd imagine.
01:07:10 - Rion Gull
We'll see.
01:07:13 - Jim Fisk
Okay, that looks— oh, this had an error, so I tried it again.
01:07:23 - Rion Gull
SPV error. Um, Anthony, do you know, do you know what that one's about? I don't think we fully—
01:07:31 - Anthony Campolo
yeah, that's the one that is usually just a network thing. Adam, setting the IP address can help, but I don't think it's really worth it to go through that whole thing.
01:07:42 - Rion Gull
Yeah, we'll just keep moving on.
01:07:44 - Jim Fisk
Okay. Um, and I guess a question that's coming to mind is, uh, you know, what, what kind of applications do you expect to be built on the platform? Like, what is the— is there like a certain type shines, or is the hope that the whole internet moves towards building applications on a decentralized platform like Dash Platform, or what's, what's the goal, I guess?
01:08:08 - Rion Gull
Yeah, yeah. So every, every piece of software and every platform has its, has its niche, and I would say the niche for, for Dash Platform is where you want Public data. Okay, so first of all, public data is what it's mostly designed for. Now you can encrypt things client-side and store them, store the encrypted versions on the platform. But, you know, if you're going to do private data, then this may not be the perfect use case. It may, but it may not. So in at a high level, platform is kind of like a clean slate, you could say. It's just anything that you can think of. But in practice, I would guess it's going to be applications where you want public data and you want it to be provably, um, provably present, uh, data. So like, you could think of, you could think of a decentralized Twitter. Um, I don't expect a decentralized version of Twitter to overtake Twitter anytime soon, let alone Dash Platform's version of that. However, it is possible, and to the degree that, you know, Elon Musk continues to allow free speech, you know, it would make decentralized versions less appealing because why do you need decentralized free speech if, if you have centralized free speech kind of thing. But for things that are more controversial, you know, you might have to turn to this or something like that. But my hope is that this just makes creating applications more streamlined and easier. So I'm hoping to get to a point where Dash Platform is performant enough and cheap enough, meaning expensive, not, not expensive, yeah, to make it appealing to just developers who they just want to spin up a proof of concept and they don't want to register with yet another cloud service. They just want to put their, dump their data on Dash Platform just like they would dump data onto any, any other service, but you don't have to register for it. You don't have to put contact information in. You don't have to pull out your credit card and, and sign up to, you know, I just hope it makes it easier to develop applications that need some kind of global state storage and some kind of authentication. So that's what, that's why I say SPA for SPAs, uh, storage, payments, authentication for single-page applications is kind of the niche sweet spot. If we can nail down the performance and the cost.
01:11:08 - Jim Fisk
Yeah.
01:11:08 - Rion Gull
And that's, you know, that's yet to be seen. And I will be— we'll be seeing that in the coming months, whether it's cost efficient. Yes. Time is money, right? If you can do all this stuff very quickly and easily with just an SDK, then that could be a lot cheaper when you factor in the time it takes to spin up your own database and, you know, create your own server and all that stuff. If you can just create a single-page application, now you got your global state storage and auth and payments and all that stuff integrated. That's where I see it shining.
01:11:44 - Jim Fisk
Yeah. The first example that comes to mind for me is like Wikipedia. It seems like it would be the perfect thing for something like that, right? Right, where it's, it's a generalized, like, public service that potentially, you know, collecting payments through donations and whatever for people's time. And it seems like it'd be great for that.
01:12:01 - Rion Gull
Um, yeah, but it's kind of up to the entrepreneurs, you know. We, we're building the technology, and I'm, I'm hoping the entrepreneurs will see opportunities somewhere. But yeah, I just always come back to those three things: if your application needs storage, payments, and authentication, then, and you don't want to create your own server and database system, this is something you should look into.
01:12:22 - Jim Fisk
Yeah, or people with, you know, um, censorship, uh, oriented governments. I feel like this potentially would be a very liberating platform for them. Um, I, I do— I'm— I am of the mind that, uh, you know, I like to have like the trust built into the actual contract. So like the idea, like I, you know, there's— there are great free speech platforms all over the place, but I think, you know, nothing speaks like the technology that, you know, guarantees those type of things. So yes, yeah, it's very exciting that there is options out there for this. Um, in going through this tutorial, the one thing that comes to mind is what you mentioned about performance. It does seem like certain type of applications would be fine where it's not critical, like real-time transactions. Is there— is that something that you expect to like improve over time? Is it something with just this, this tutorial setup in the sandboxing we're doing it, or, or I guess what's the thought?
01:13:21 - Rion Gull
The network, the network is actually in theory extremely performant. Um, the, the software is, is very performant. The issues that we've been seeing are network and SDK related, so they're not necessarily limits to underlying consensus mechanisms or things like that that are at the node level. They have to do with like, oh, the SDK isn't doing retries or it's—
01:13:56 - Anthony Campolo
it doesn't cache the history.
01:13:58 - Rion Gull
It doesn't cache the history. It's contacting a node that's not really operational. And it should find another one that's better. That kind of stuff. That's all fixable pretty easily. We just have to look into it. That's actually one of the things that I'm going to be looking into this quarter.
01:14:18 - Jim Fisk
Great. Right now, obviously some of this stuff is abstracted with some of the prep work that Anthony did with the scripts. I assume these are just like— are these like POST requests, like REST requests right now, or what's the mechanism for actually How does that—
01:14:34 - Anthony Campolo
It's all gRPC under the hood.
01:14:37 - Jim Fisk
It's gRPC. That was my next question, actually. I was wondering if— I've been doing some Go development and I was just wondering what kind of things are available. So gRPC is what's actually being used. Okay.
01:14:49 - Rion Gull
Yeah. There has been talk to expose some of it via REST. Right now, yeah, we are focused on just using the the SDKs. But I would like to expose some REST endpoints on the nodes themselves, so that it can be client independent and language independent. But that's not something that we've focused on yet. Right now, actually, the best SDK to use is the Rust SDK.
01:15:18 - Jim Fisk
Oh, interesting. Yeah.
01:15:20 - Rion Gull
And there's talk about whether we should just wrap that in with a JavaScript wrapper and use that since it's a little bit better than the JavaScript SDK or whether it's better to have a better— fix up the JS SDK. But we haven't decided really on that. But yeah, it's under the hood. It is mostly gRPC.
01:15:40 - Jim Fisk
Interesting. And yeah, actually, that was— so my other question was like, is Node the way, the only way to really interact? It sounds like Rust even has a better like way to do it. Other languages that are supported: Go, PHP.
01:15:54 - Rion Gull
We haven't done client libraries for Go or PHP. The only ones we've done is JS and Rust. But if people— yeah, like that is kind of the debate right now is do we need multiple clients or do we just need one all-powerful Rust client as wrappers?
01:16:11 - Jim Fisk
Yeah, no, that's a great question. I mean, just an aside, like as for my project that we were talking about in the beginning with Svelte compilations, we were at one point wondering like, okay, like if someone's doing this in Rust, like could we just like call out to to that instead. And yeah, it's hard to— it's hard to tell, right? Because, you know, you lose some flexibility of being able to build your API in a certain way, but you might just get performance and ease of use and portability across different technologies. So I think it's definitely a good debate to be had there. Um, so I want to check in with you guys timewise. Are we coming up towards the end here? I don't know. Do you want to get into Express stuff? What are we looking at timeline?
01:16:51 - Anthony Campolo
Oh, I think we have another half hour.
01:16:53 - Jim Fisk
Oh, we have another half hour.
01:16:54 - Rion Gull
Okay, well I think that these steps will probably only take like 10 minutes.
01:16:59 - Anthony Campolo
Okay.
01:17:00 - Rion Gull
So let's— we could, we could just go ahead and finish those real quick.
01:17:04 - Jim Fisk
Okay. Um, all right, so, so it looks like we're getting into setting up a backend server with Express. So, uh, I'll just read here, I guess. Now we've learned how to run individual scripts and perform all the main functionality on the Dash platform. Like any JavaScript library, we can extend this functionality with a backend and frontend. Let's create an Express server that will return information on a given identity name. So we're basically creating a full web app to interact with the API stuff that we've set up. That's what it sounds like.
01:17:31 - Rion Gull
That's what this is doing. We technically don't need a backend for this since the JavaScript SDK can be used on the client front end itself. But, but yeah, this is how we do it in the, uh, in the tutorial right now.
01:17:45 - Jim Fisk
And now, is this like a different project entirely? Are we branching?
01:17:48 - Anthony Campolo
Uh, it's, it was all the same project. Yeah, because you're gonna connect to the same client file.
01:17:53 - Jim Fisk
Okay. All right, so install Express and then we'll create more time.
01:18:01 - Anthony Campolo
I'd have you build out a Svelte front end. I can tell you there is, there is one actually, because I, I built the same thing in all the, all the frameworks. I haven't run it in like a year.
01:18:12 - Jim Fisk
You, you're one of the most well-versed technologists I know, so I'm sure you, you've run the gamut with frameworks there. Okay. So, yep. So, we have our server file. We're gonna copy some boilerplate here. And our server file actually, that's in our API. Okay. Do you want to run through this at all, Anthony? Let's just—
01:18:38 - Anthony Campolo
let's just blow through it as quick as you can at this point. You know how an Express server works.
01:18:43 - Jim Fisk
Okay. So, we're gonna run it.
01:18:46 - Anthony Campolo
Yeah. It's just creating an endpoint for the name specifically. So, your— whatever name you give the endpoint, it'll feed in as basically the query. So, the whole page will return the output.
01:19:01 - Jim Fisk
Is that not what I wanted to do?
01:19:05 - Anthony Campolo
Yes. There's a curl— go back to the tutorial. It'll tell you the specific.
01:19:10 - Jim Fisk
Gotcha. Okay. All right. So, we're gonna—
01:19:15 - Anthony Campolo
So, this localhost:2001/name/jim, whatever your—
01:19:21 - Jim Fisk
Okay. Gotcha. All right. Wow. Beautiful. Did you design this? Nice, this is great. Okay.
01:19:40 - Anthony Campolo
Yeah, then the next step is just a Next.js app that fetches from that endpoint.
01:19:44 - Jim Fisk
Cool. All right.
01:19:47 - Anthony Campolo
Um, and by the way, Jimmy Wales, the— one of the original creators of Wikipedia, has like this vision of creating a new Wikipedia that is blockchain enabled. So you're actually right on the money with that.
01:20:00 - Jim Fisk
I think I actually think I might have saw an interview with him about that.
01:20:03 - Rion Gull
So that might be, um, he's next on the platform walkthroughs.
01:20:12 - Jim Fisk
Oh yeah, nice. Yeah, that'd be cool. Um, yeah, I don't know what, what his intention there is, leveraging an existing project or, or what, but it would be nice to, yeah, get more people rowing in the same direction, right?
01:20:27 - Anthony Campolo
Yeah.
01:20:30 - Jim Fisk
Okay. Oh, I didn't look at what you wanted me to put in. I just did all the defaults. Hopefully that's— Yeah, that's fine.
01:20:39 - Anthony Campolo
Okay. And you can actually skip this part and just go to the next because this just sets you up with your main app. You can just— so scroll down a little further to the page.js. It'll give you all the logic.
01:20:52 - Jim Fisk
This stuff here?
01:20:53 - Anthony Campolo
Yeah.
01:20:54 - Anthony Campolo
Just grab that one.
01:20:54 - Jim Fisk
Yeah.
01:20:57 - Rion Gull
Cut to the chase.
01:20:59 - Jim Fisk
Get the good stuff. All right. Next. All right. Page.js. Oh, did you not want to TypeScript the—
01:21:10 - Anthony Campolo
That's fine. Just blow all that away. And then you're gonna need a.env.local file with your name.
01:21:20 - Jim Fisk
Okay.
01:21:23 - Anthony Campolo
And that's gonna be inside of your Next project.
01:21:27 - Jim Fisk
Okay. This— this here?
01:21:30 - Anthony Campolo
Yeah.
01:21:31 - Jim Fisk
Okay. All right. So, we have— so, I have to create one here?
01:21:40 - Anthony Campolo
Yeah.
01:21:41 - Jim Fisk
Okay. Sorry,.m.local, you say?
01:21:46 - Anthony Campolo
Yeah.
01:21:49 - Jim Fisk
Okay.
01:21:51 - Anthony Campolo
And then just same label that you were using. And then cd into the next directory and run npm run start.
01:22:01 - Jim Fisk
Okay. All right.
01:22:11 - Anthony Campolo
Actually, dev. Sorry, not start. Npm run dev.
01:22:18 - Jim Fisk
Sweet.
01:22:19 - Anthony Campolo
Okay, and then localhost:3000.
01:22:21 - Jim Fisk
Okay, oh, it wants to go to Firefox. How about that? Whoops, that's— I'm running a different application there. Um, do you know what? I thought I had stopped— stop that. Maybe it's cache. Okay, let me see here. Okay, that seems to be fine. Um, let me just—
01:22:45 - Anthony Campolo
you just open a browser and go to localhost.
01:22:47 - Rion Gull
You should choose a different port, man.
01:22:49 - Jim Fisk
Name—
01:22:49 - Anthony Campolo
yes, that's the next default. It's definitely not super convenient.
01:22:56 - Jim Fisk
Let's see if I can get us there. Okay, here we are.
01:23:03 - Anthony Campolo
Um, I think you have to, uh It's not getting your identity. Identity for sure. Oh, I know why. What's that? Go look at your page again.
01:23:13 - Jim Fisk
Um, okay.
01:23:14 - Anthony Campolo
Page.tsx. Next public label. Is that the correct thing?
01:23:26 - Rion Gull
Oh, uh, he did m.local.
01:23:28 - Jim Fisk
Oh yeah, what is it? What am I supposed to do?
01:23:30 - Rion Gull
Does it translate it behind the scenes from Next or?
01:23:34 - Anthony Campolo
Yeah, that's fine. Yeah.
01:23:37 - Jim Fisk
Next public label. Next.
01:23:39 - Anthony Campolo
You might have to restart your Express server maybe. Are you still running the Express server?
01:23:43 - Jim Fisk
Maybe I didn't save that. Let me just try that again. Oh, I turned my Express server off. Should that be running?
01:23:49 - Anthony Campolo
Yeah, so that needs to be running.
01:23:50 - Jim Fisk
Yeah. Okay. I forget what we were actually— how we were running that. Was it—
01:23:56 - Anthony Campolo
Um, just npm run express.
01:24:00 - Jim Fisk
Okay, there you go. Okay, all right, give it a second.
01:24:08 - Anthony Campolo
I would restart your— oh, there it is actually.
01:24:10 - Jim Fisk
Yeah, there you go. Sweet.
01:24:13 - Anthony Campolo
All right, there's your app.
01:24:14 - Jim Fisk
Hey, it looks good. You got a background color.
01:24:16 - Rion Gull
Is it—
01:24:16 - Jim Fisk
it's got like a fade to it. I like it.
01:24:20 - Rion Gull
It's the Next default, I guess.
01:24:22 - Jim Fisk
Oh yeah, nice. Um, cool.
01:24:26 - Rion Gull
So that's it. Wow, you've— you just built a, uh, a dApp. You built a dApp. There you go.
01:24:33 - Jim Fisk
I mean, yeah, I think a lot of that was just going over core concepts, which was super helpful for me, but honestly, it wasn't so strenuous of a thing to, to get up and running with a completely new paradigm, um, that, that I'm used to. So I think that's, that's great. I think this is Thank you both for taking the time to show me. And also, Anthony, I think this blog post is awesome. You did a great job.
01:24:55 - Anthony Campolo
Thanks.
01:24:56 - Rion Gull
Yep. Cool.
01:25:00 - Anthony Campolo
We—
01:25:02 - Rion Gull
yeah, we have another stream coming up soon here. So I think we'll jump off here. And thanks, Jim. It was a pleasure to meet you. And maybe we can stay on the show for a little bit after we go off the live show. Sure, and we'll, we'll get you squared away. And, and, uh, for everybody else, tune in in probably 15-20 minutes or so for the next show. We've had 2 already, so— all right, keep going. All right, see everyone.
01:25:30 - Anthony Campolo
All right, later.