Skip to content
by Unity Nodes
NEAR Protocol

[REDACTED] Online Hackathon workshop w Proximity Labs

about 1:00:13 long

Nothing is loaded from YouTube until you press play, and then without tracking cookies.

About this video

Proximity Labs x.com/proximityfi proximity.dev

Chain Abstraction is NEAR.

Proximity is a research and development firm focused on NEAR Protocol. We provide financial, strategic, technical, and other bespoke support to talented teams building with the NEAR Chain Abstraction stack.

Register for Online hackathon redacted.devpost.com

Live DevRel and Community Support: NEAR Dev Support Channels (Telegram): t.me/neardev DevHub Announcements: t.me/NEARDevHub

Final Submissions Due:October 31th, 2024 Judging Oct 31 - Nov 8th

Transcript

8,162 words

Captions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.

  1. 0:24

    what you want you want you want you want what you want what you want what you want oh what you want what you want what you want what you want me what you want what you want what you

  2. 1:32

    want you want n

  3. 2:44

    hey we are back live again uh we were just here 20 minutes ago now and we are back here again with another awesome absolutely this has been a whirlwind of content there is so much great stuff uh we've had proximity on once before we had Matt here talking about chain abstractions in general we have an awesome workshop for you today uh oh you want to kind of introduce what we're going to be doing

  4. 3:07

    today we are the topic is Bitcoin and not just Bitcoin by itself but Bitcoin with n and how you can use n and chain signatures to do more on bitcoin but um I won't spoil anything I I think we can let the dev speak for themselves they can probably speak better about it than I can so let's let's get them up here so we today we have Greg and Edson from proximity uh thanks guys thanks for

  5. 3:38

    coming on devhub live hey guys hey hi thank you for having us our pleasure our pleasure so um let's talk a little bit about um kind of what you guys have in store for us for the workshop today and where you want to get started yes so I'm going to start and I'm going to to share with with you guys how some of the strategies that we are working on in order to develop in BTC because um let's be honest developing in BTC is super hard um but right now I

  6. 4:15

    think we are coming up with some strategies that are going to make super easy for developers to create apps with near and Bitcoin awesome uh yeah and if you want to share your screen feel free to do that as well okay yeah I was playing with with some Bitcoin a few months ago and I had never really like touched it before and then I was like wait I have to sign all these utxos and I got confused and then then gave up so I'm excited to learn more

  7. 4:52

    here can you guys see my your screen yeah we'll bring it up here we go infinite perfect okay there we literally me so this is a yeah I mean we know developing in Bitcoin is is super hard and yeah that's that's Owen um and right now uh in order to to explain um yeah just to create a small mental model what we are going to do so basically we have in some of the tooling that exist in the Bitcoin war is this the Bitcoin core note that they have particular modality

  8. 5:31

    called the rec test mode that basically allows you to run a Bitcoin now locally in developing mode and you can do things like generate new addresses move blocks and and mine uh some Bitcoin to that particular address and that's that's very helpful but there are other particularities here because we have the MPC signer in here and this is living basically in two places right now we

  9. 6:04

    have a test net where we have this MPC sign and we can request signatures and also the main net so how do we do something with this two pieces in order to to to facilitate the developing of BTC apps in particular because like Owen mention one of the main problems with the BTC war is the faets how do you get bigger amounts how how you can create um more utxo and and test more complex

  10. 6:37

    scenarios so yeah um but the cool thing about this is that you literally can sign um in the MPC signer site and you can propagate that transaction to the BTC node in R test mode in your local computer so because the signatures cre by the MPC signer are valid in the BTC Noe in that way you can uh basically derve the address of Junior smart contract give some utx souls to that address you can give any amount of utxo that you want and then basically sign

  11. 7:23

    that you want to spend some amount of money and you propagate in this BTC note so I'm going to show you how I'm currently working with that and the best place to look on that is the the Omni Library if people is aware what is the Omni Library the Omni Library what we are trying to do is um a small set of utilities and like the name says a library where you can create transactions for multiple blockchains

  12. 7:58

    right now we for Bitcoin um evm in this case for ethereum and and for Mir so what you can do is essentially within a near smart contract you can create a payload of a transaction and immediately sign with the NPC signer and then you simply return the payload that is already signed and you can propagate that to the different networks so um in order to to to ensure that this encoding is working we have this set of integration tests in the

  13. 8:36

    test folder so we have for evm for near and also for Bitcoin and here I'm going to walk through a bit H how what I explained before here it's uh is helping us to to ensure that what we are doing is correct so like I like I mentioned we have um um well we are using actually some tooling from Bitcoin there is a Ross Bitcoin implementation is still um yeah is is very useful but is still under development um but still is um

  14. 9:12

    what they have is very useful for us and it's been saing our life so we are basically what we do here is we set up the Bitcoin note um and what is doing is literally downloading the Bitcoin cor node and running behind the scenes and I thought the other day that there might be something about security because I'm basically downloading Bitcoin core node and executing it however you can just run

  15. 9:43

    you can install the Bitcoin core note in your computer and this utility will recognize that it's installed and then it's just going to run it in rep test mode and then we just create an instance of that particular client and we can do things like set up an account for Bob and another for Alice here in this particular example this is for pay to witness public key hash um and you basically can set up accounts for

  16. 10:15

    different type of address because in the BTC world we had these different types of types of addresses uh right now we support these Beach um Bach 32 which is uh the the ones that are use for set with transactions in BTC but we also have support for legacy transactions and then um um we generate blocks to a particular address in this case and giving utxos to Bob and then I basically have some helpers to get okay I already gave

  17. 10:53

    UT exos to Bob and I'm not limited to do this I can do more generate more utxo and as as I as I wish and then so in this in this environment are you able to like control the economy then uh and like how many utxos and whatnot yeah exactly and you can assign to to any particular address so right now I'm just assigning to Bob uh and here this is something because in order to have there has to be

  18. 11:26

    100 uh blocks per um propagation so there has to pass sorry confirmation blocks so that's why we have 100 one but after 100 and one blocks Bob is going to have utxos and this is how then I access and in this case because this is a very simple example I'm testing with a single utxo and then I get the utxo and this is the this functions there are some wrappers and we are actually working also in what we call Omni testing utilities where we are going to encapsulate all these logic

  19. 12:07

    that we are adding here like you're going to be able to and obviously to improve how um the naming and to make easier for developers to test but essentially we're going to have more head utilities um where you can set up accounts even assign names but also to to immediately get the UT ex and and even filter like let's say I want one utxo I want 10 and so on before you go for I want to just kind

  20. 12:36

    of set for for some developers here so if you are a little bit new to developing with Bitcoin just use the evm what's the equivalent of a utxo like so what does that actually mean and what how is that what's similar to that I guess in evm land people understand yes so uh I like to give the analogy that actually re that is present here he gave to me and I think that was a very very nice explanation but yeah if you're coming from the ebn world like like I do

  21. 13:10

    you know that you can simply say um let's say get the back to get the balance of a particular person you just call the Json RPC and you can get the balance or even if you are in a smart Contra let's say a token you have access to this balance of a particular um token so you can get your a particular address but in the Bitcoin War um the best analogy is to in mind that you have bills and these bills are of different

  22. 13:40

    value so let's say um someone sent me at some point on time a utx a transaction that is saying that I can spend um one BTC so that's a bill of one BTC and that is a utx so so that's why here we are generating so the analogy is that we are generating bills then I want to get those bills to be able to expend them does that does that make sense yeah that's a great analogy I like that yep and and I think when you

  23. 14:20

    uh when you want to spend these say you have like two utxos of one Bitcoin and you want say like two Bitcoin or or some like non decimal amount then you have to you have to like merge these utxos right or or or send like multiple of the yes so H in this example if you here we are listing the utxo then I get the first one and then I create the the input so this is I'm going to expand this utxo but also um like you mentioned there could be certain it's like I'm

  24. 14:59

    playing one with one one BTC but I I need some change so you need to also program that um utxo and add it to the transaction so in that case I'm saying okay I'm going to yeah I create the input because okay so a small break a BTC transaction contains the following information you have inputs and output the inputs is you need to tell um it's like okay I have my one BTC bill this is

  25. 15:37

    what I can spend and then you need to say okay what what is the output of this build that I'm inserting in um vending machine let's say well it is more complex than a vending machine but yeah let's say you want to expend that and then you need to specify the outputs of this transaction and one of these outputs could be okay I'm getting um five five cents or from that particular Bill does that make

  26. 16:09

    sense yeah I'm with you yep makes sense okay so yeah and then we are using here the so since I'm reading that utxo from the Bitcoin cor Noe so it's basically you are interacting directly with that I need to extract a bit of information like the transaction ID and other information and then I create the inputs the outputs and with that input with that set of inputs and outputs in this case it's just simple it's just a a single input but then we generate the

  27. 16:50

    the transaction using the Omni library now in the BTC World there there are this type of um scripts that are kind of a way to verify um inside the Bitcoin cor note and um we also have different types of addresses like um Legacy addresses set withd addresses and so on so depending the version that you are using you need to um encode different information that is going to be added to

  28. 17:28

    the transaction that is going to be used to be verified by the node so in this case because this example is um pay to witness public key hash we basically need to create a witness and how um do we do that um we use these utilities and then um okay so before going deeper in the BTC work there is something called Sash and if you are coming I mean by the way this is very very low level um but yeah in the BTC in

  29. 18:09

    in the evm world you basically have a transaction hash that is signed by let's say in this case you can sign it with the NPC signer but also if I have my private key I can sign a transaction hash and then I can propagate this to an ethereum Network let's say to an ebm Network and because I sign it then this is going to be veryy in the evbm right so in the BTC something like that exists but instead of a transaction hash I think an analogy could be a s hash and

  30. 18:49

    this s hash um could be generated in different ways depending the version of the of the of Bitcoin of the Bitcoin transaction that you are using and um in this case we generate the sash in this way I use the omn I say okay I want to build for build for signing swick which is building the sash for swick and then it generates that Sash and that sash is the the one that we need to sign okay and how how difficult is it for someone to swap between like seg and

  31. 19:38

    Legacy uh type transactions or do you recommend that someone just stick with like seg yeah so sewi is an improvement to the version one of them of um Bitcoin transactions in theory is cheaper for people to do it um to be quite Frank I don't see any reason why I mean there might be some particular reasons for people to choose Legacy maybe for some wallet restrictions but if you are

  32. 20:10

    starting in this BTC war and near the recommendation is just go directly with sewi and and that's it yeah and I think if you're you're running it on like a Bitcoin testet it's a lot easier most of the faets support SEC rather than than Legacy wallets yes so that's another yeah definitely that's another uh reason to to better use that with um so yes we generate the Sash and this is um something that we also do because we are

  33. 20:50

    um basically doing the full encoding and but we are taking a lot of inspiration from other libraries like Ross Bitcoin and basically we need to compare that what we are doing is analogous to what they are doing so here uh this is because remember that this is within the Omni Library so this is an integration test we do I I finish here doing it with the Omni library but then I continue um doing with the with the Ross Bitcoin and I basically repeat the

  34. 21:25

    process but the idea is that at the end I'm basically comparing that the encoded um that the sash by Omni and the sash by Bitcoin by the official Bitcoin Library are the same so in this way we are more secure and okay we feel um yeah honestly the other day there was someone telling me Oh yeah because we have this for all the librar so even for even M we are doing the comparison against aloy for new we're also comparing against Ross

  35. 22:06

    primitive so yeah we we know that the coding can is okay and it's funny because the other day a person told me um I think there is a problem with encoding and I'm like no I'm sure encoding is good H and the error turns out to be another thing I mean definitely there can be errors but that particular case I saw the payload and I was like I'm sure it's okay but obviously that's not like arrogance it's simply that we are adding some test here and yeah this gives you just a lot of

  36. 22:40

    piece of mind and yeah we we feel very very happy because of that um okay so you can tell that this this Bitcoin file is is quite a bit larger than like the evm and near one oh yes yes is is is very large because we added more test also we are adding here for um for uh pay to public key hat which is the Legacy one and pay to witness public key has uh which is using swick and we added

  37. 23:14

    more more tests and 19 more tests are coming but yeah also for the buing we're adding a lot of utilities because it's difficult for for people to debug if there is an error um it's super complicated but by little we are finding strategies to to to do this in a better way so yeah here I I repeated a bit the process of to calculate the S has but yeah you you have the S hash then you

  38. 23:43

    sign it and here we simply use um assign e DSA which is simulating that I mean this this part right now I'm signing locally with the private key that the address that I generated is giving me so this private key is really inside the node that is currently running in my local environment so I have access to that private key and then I can verify but um uh here what we are doing

  39. 24:20

    in the so the example that example is still not updated but I'm adding an example here where I'm basically signing here I'm signing in the oh here you can see that I'm calculating the sash in the near contract so this is a near contract where I'm I'm generating the sash directly and then I'm signing that in the in the contract but here uh but this is a still uh I mean I need to clean a bit the the code but yeah it's working

  40. 25:01

    actually but here this is yes sorry this is so this is the part where you first showed and everyone's aware of like this is where the MPC comes into play right this is that connection between leveraging the MPC and what you're doing here in in this code correct correct yes so I I I I want to emphasize that here I'm signing with a private key that I have in my Lo local Bitcoin core nodes okay remember that I'm running in the

  41. 25:33

    beginning I I started this Bitcoin note locally so it's running there and then I'm this Bitcoin core Noe is also giving me um some accounts but this account also has a private key then here I'm signing but if I'm signing here with my private key really there is not difference if I'm signing in the NPC signer which is what I'm doing here in this um example I'm where it is let's find it I calculate the S has and then

  42. 26:13

    I'm calling the near contract here I'm creating the near action and I'm calling sign s has and then basically the signer I get the result and and I I send the transaction and I extract the information but I have a signature that is also Ed ecdsa okay but yeah that is very important I can sign in the MPC signer I can sign locally for the Bitcoin note is the same okay but for us it's a very

  43. 26:50

    good first step because imagine you are trying to do a a library and you are trying to interact with this external component the the NPC signer so it's adding more noise to your local development and makes more complicated so you go step by step and the first step okay I'm s i I understand the principle that I can sign remotely I can sign locally but at the end of the day it's a private key and it's a and I'm signing with the E DSA and and that's it at the end so

  44. 27:25

    basically you're you're like proving that signing with the NPC and and using the library is the same same as just like signing with a standard Bitcoin private key exactly and so are you suggesting that when people are like developing in in a local environment they should be uh they they can like safely assume and use the the local private key in their testing um and then once it's like ready and they they're ready to test it on like testet or something they go ahead and use the

  45. 28:06

    MPC so that that depend I mean yes I know it depends because um if you are talking about a near contract that is interacting with the MPC signer um once you call let's say here once you call this function that is calling the MPC contract you are basically signing over there um and then you need to deploy this to a test but I I I I'll show the flow that I have here because actually this example is quite good

  46. 28:44

    because I'm basically deploying this contract to testnet so this contract uh Bitcoin signing with propagation I'm developing my new contract and I create an integration test where starting my Bitcoin noes then I deploy actually where is the FL where oh yeah here you can see that if I say deploy I'm compiling this contract deploying to a testnet and signing in the testnet so um that is

  47. 29:24

    also possible now I know that there are some efforts for some I know a particular team that is working in a MPC signer to be able to work locally so you can be working with your new contract locally and you are going to have a testing environment like this one and you basically can point with your new contract locally to that local instance of the MPC sign up in like near integration tests or yeah in a near inte very nice yeah

  48. 30:00

    but okay so just to answer your question it depends if you need to sign outside you can always assume that either I'll control the private key or I um sign remotely but if you if your logic is calling directly the NPC signer here then you can use a pattern like this where you basically deploy the you kind of working locally uh with your Bitcoin Noe but signing remotely and then the result is propagated locally so you test um that

  49. 30:40

    everything works perfect does that make sense and actually this example the the one of the ex Bitcoin preparation example is this exactly I create my BTC locally I I deploy my near contract and then I also call the MPC signer okay actually um this example will be like this sorry because I forgot test and and here you are um in your local environment and you have the BTC Noe plus the near contract source code that you are developing but in the integration test

  50. 31:28

    I deploy to testet the near contract and of course when you deploy to to testnet you have that the near contract is going to be here let's say um a contract. testet so your contract is going to be there and then this one is going to call the NPC signer and this result comes here and you deploy here so it's um a bit tricky but I I think right now this is the best way that you can develop BTC apps in here because you

  51. 32:06

    have control of the utxo and you are testing the real contract developing developing in testet and using the MPC sign up yes does this pattern apply to when you then move to production um I think you could do that too there is really nothing stopping you to sign this NPC signer basically could be main but I mean I guess the best answer always is it depends like when you say move to production like why would you like to test in production not not not

  52. 32:48

    test but is this if I am developing in this and I'm ready and say okay how much of this uh set up needs to also then move to main net um okay the only problem okay you doing test net you will be basically spending real near money here in order to get signatures just to deploy in a BTC node in local mode so that wouldn't I mean you could do it if you want to but I guess um I don't know why would you spend near really near right

  53. 33:28

    uh to deploy in a local test net um I think maybe maybe what you were trying to say was like how much needs to change to go from like this local node to like uh to like real real Bitcoin is that what you saying yeah yeah no nothing I I think that's what I like this environment because you this is the closest thing to reality like right now you are deploying here but we I'm going to show you here when I propagating the transaction so here this is uh the BTC

  54. 34:07

    client but in it is right now in rep test mode but it could be in another client because at the end of the day what we get from Omni is this encoded Omni transaction that is a payload that you can prop so you can give this to your to your brother to your C know okay here is the payload I already signed it you propagate that to any network so you just so it's just like the relaying step

  55. 34:38

    that that basically changes and and this is like happening off chain anyway like you you're not going to relay it from the contract right although there is one particular thing to mention that when you create addresses um you need to specify for which network in BTC because then they change a prefix but if you let's say change here the code and generate the BTC addresses for mainnet and you

  56. 35:08

    propagate to a BTC client and that's what we are using the closest you know send row transaction this is like the lowest level you're going to get to send a transaction to the BTC network but we are doing like this because we understand that number one actually I think is the only way to to do it well not the only way but it's the lowest level uh possible way to do it and you are sending a row you're sending exad decimal to and and then you just

  57. 35:39

    propagate to any BTC client got it um and yeah so I I think something that I didn't mention is okay we get the signator and then we simply create the witness we use a still Omni to build the transaction with the witness and then that's it we propagate that and that's pretty much um the process that we are current currently following you are going to find the same similarity here in this

  58. 36:15

    example but this example is more elaborated because and this is another decision that we took for this example we are using the near Jon RPC client like what we are trying to do is basically the closest thing like how are you going to communicate and here you get the Json RPC and we are doing real transaction like here you're going to see I'm calling the smart contract creating the transaction you know

  59. 36:49

    calling my near smart contract I sign and then send the transaction and then with that information we do basically okay get the signature then build the witness and then propagate the transaction to the BTC Network so this is the the same approach but here it's more elaborated because we are interacting with a real contract in here that's why you see the calls to the Json RPC client but um also

  60. 37:25

    and we're also signing with the NPC M I have that very confusing it's a it's a lot of code but it's it's really cool I think to zoom out like this this is all written in Rust right and I think the apart from rust being a beautiful language I think the main reason it being in Rust is that n Mar contracts are primar primarily written in Russ so you could do like all of this on the front end and and like request a signature from the MPC directly from like your account just

  61. 38:07

    in the front end with no sort of proxy contract in between that's generating these uh transactions and utxos but I think the the powerful thing of having this logic in the contract is that you can Implement smart contract logic like on top of on top of Bitcoin so you can have some sort of logic that decides when like a transaction can be generated which allows you to like lock Bitcoin or or or like sell an or and all on a

  62. 38:42

    Marketplace all on top of on top of n yes that's that's totally correct um and I just want to emphasize that where it's still early the toing is continue is evolving but but we are going to add these um Omni testing utilities that are going to reduce a lot of boiler plate and yeah we're trying to make developers lives easier easy yeah um I've well I've me messaged ESS quite a bit uh about this library because I've been playing it with around with it on like the near side rather

  63. 39:23

    than the Bitcoin side and uh I've Loved using the library to be honest um after getting to learn it I had a few hiccups but now like it's it's pretty pretty easy to use oh yeah I by the way I I'm already implementing your feedback so yeah nice I'm glad you're listening to my feedback it's it's hopefully valuable then awesome 100% but yeah awesome Library I I love the work you've been doing um thank you um do you guys have another do you guys have another

  64. 40:04

    question no not right now where's the so I want to make sure was wrong wrong person I want to make sure we the right the uh the right GitHub here so it's uh GitHub Omni RS correct yes if you look in the if you're on Twitter and you look on the um in like the comments you'll see I I've pinned the well not pinned but I've commented the library down there so you can take a look if you're on

  65. 40:36

    Twitter great cool uh Greg uh yeah let me uh present my screen yeah well Greg's going to load up there's plenty of bounties here related to James traction and building across other chains and so uh great opportunity for the hackathon but also too if you're just interested in building with this stuff uh this is all available here uh so yeah take take it away Greg okay uh yeah so I'm gonna go over a lot of the same stuff that Edson did except from an application uh developer perspective and

  66. 41:27

    so um I have this uh BTC example that is sending Bitcoin transactions uh with a near wallet uh in the browser um and so it's pretty simple um I'm GNA give a uh live demo uh in mainnet um but uh yeah it's pretty simple basically you can choose between segwit or Legacy uh you can choose the uh the path which changes your address um and and then I've got a balance of uh 5400 satoshis and so I'm going to send uh a small transaction to

  67. 42:05

    my S and so this is signing with my near wallet oops that didn't work let me try again uh okay so there's the uh let's try this okay this looks good um so it constructed the transaction it uh got the signature back from the MPC using the uh near wallet uh it finalized the Bitcoin transaction and now it is broadcasting it to the um Bitcoin main net well as going question that I know I've heard people ask before so oh no

  68. 42:54

    failed again even as as always on live demos oh of course so actually main net it is main net yeah we try again this worked just a minute ago sorry for cutting you off Joe I was just uh just surprised this was M that um well it was working earlier let me let me show you the uh uh um one that I just sent so this one is uh something that I just sent from this address uh so it does

  69. 43:36

    work yeah um but uh yeah um I was going to walk through the uh the Bitcoin code uh and the parts that uh confuse people uh so in a lot of ways like we're uh we're building like a Bitcoin wallet because we need to generate the addresses and we need to like manually create these transactions uh and so like over here is the uh the kdf script this is what we use to generate the um the Bitcoin addresses and so my uh like react code

  70. 44:09

    just calls generate BTC address and uh depending on the path uh if it's test net and the address type it'll uh generate um a Bitcoin address so that's the uh the part oops that didn't work um so like oops doesn't like Legacy uh but but yeah this is like changing the path it's calling that method um and um then when you uh send the Bitcoin transaction um the react code calls um

  71. 44:58

    um this method uh get and broadcast signature and um so uh something that kind of confuses people sometimes is um uh there's actually like uh it it constructs the Bitcoin transaction twice and there's a dry run uh and so the get signature is um the dry run and uh this is uh what initiates the near transaction and uh actually like gets uh the signal and so um the way this works is you

  72. 45:30

    construct the uh psbt uh and does all all this stuff um creates a partially signed Bitcoin transaction that's what that means uh which just um it's like an object that uh has all of the uh Bitcoin inputs or all of the utxo uh inputs and the um outputs uh because um like Edson uh described earlier um the utxo model is like um it's more like cash than uh an account model uh in ethereum and so you

  73. 46:04

    have like all of these um like dollar bills uh except for they can be any denomination and So like um right here um you can see I have a utxo with 32,000 SATs um and so that's what this construct psbt object is just doing it's it's uh inputting that um utxl and then it's adding the output which is the address that you want to send to uh and so once you have that um transaction

  74. 46:35

    constructed uh you can well um this is also kind of confusing so we're using um Bitcoin JS lib uh and the way that we get the uh the transaction hash is we pass in this like key pair object uh to the psbt sign input async so this is just the object that contains the public key and this sign method and so uh we need to do it this way because uh this is um how you get the transaction hash from uh Bitcoin JS

  75. 47:08

    lib and so once you have the transaction hash uh you create the payload and that's what you need to send to the MPC to get the signature and so um once we have the signature uh like right here then we can actually finalize the uh psbt and send the uh transaction and so it goes over to the uh um the broadcast method and so here we're passing in the uh signature manually typically um this like sign method would uh call um um like a local signer but because

  76. 47:45

    we're using like a remote signing service um we have to break it up into these like dry run and then like this uh broadcast run so once we have the Sig um we essentially uh pass in this like fake signer it's not calling anything it's just essentially uh returning the um signature that we received in the uh the first first run and then once uh once everything is finalized um we can broadcast the uh transaction and so it sends this to uh

  77. 48:18

    blockstream and um then it returns whether or not it failed which is what happened earlier or it returns um a link to the uh like the com the successful transaction um and that's that's pretty much it you guys have any questions cool I I think the the front end on once we've talked about it in like a a contract setting I I think the front end becomes a bit more more simple you know um so I I don't particularly have any questions myself about this

  78. 49:00

    this any from you no I don't have any questions I do though um just curious like your thoughts and doesn't have to be overly specific but like where do you start to see people actually implementing this into products is it just purely different defi things or can you start to actually build apps that are leveraging Bitcoin in different ways yeah you can absolutely uh build uh an app that interacts with Bitcoin using

  79. 49:31

    uh something like this um anything that would involve like uh interacting the the uh the Bitcoin uh network uh and uh and you want to use um like near on top of that uh this sort of approach could be useful um like um it it's it sort of like uh provides a way to like write smart contracts that um uh well write an app that interacts with um smart contracts on the near chain and then can also send um Bitcoin transactions yeah I think one of the

  80. 50:17

    most interesting use cases I've seen so far um I can't remember his name but one of the devs at at pagod um was creating a like Bitcoin wallet but all you need is a Google account to sign up and it like generates a proof that you have the the front end generates a proof that you own like this Google account which then you make a call to like a near contract to verify that you own the Google account and then from there you can sign like whatever uh message

  81. 50:56

    message to the the NPC service um through the contract with like any Bitcoin transaction uh so you have you can like send Bitcoin to anyone just by having like an email address um and I think yeah that's just like one of the the many interesting use cases yeah yeah yeah exactly yeah it opens up a ton of use cases uh and you notice I actually got a successful trans action here let's go yeah so here it is it actually works saved uh fees on uh

  82. 51:35

    segue was this a main net one yeah yeah nice how much how much gas was it well it's not gas in Bitcoin is it uh 1100 satoshi's it looks like I'm overpaying too I could tweak that another question just to clarify for people are new to building on this so maybe they've done CH traction with just evm or maybe they're just new to this whole thing from a timing standpoint uh everyone usually is aware

  83. 52:07

    that um the Bitcoin network is a lot slower because it's doing proof of work uh how does it all fit into what you're doing here and how this works with chain of traction um sorry could you you say again sure so the the the timing of of making calls and using a network um so if people are new to working with Bitcoin and maybe they at least understand that because proof of work it's a little bit slower for

  84. 52:41

    confirmation messages and things like that but how does that fit into this are you are they still let developers know they still Bound by you know having to go through that there's some things that are happening here in the back end that are um speeding anything up is you know for people who who are new to this yeah absolutely um well yeah um coming from uh like a chain like near uh Bitcoin transactions are a lot slower um you saw how long it took it was like 10

  85. 53:13

    something seconds 15 seconds uh for the Bitcoin part uh but the near uh transaction probably only takes about a second or two seconds um so I guess it's just something to be aware of uh you're going to have to um make sure that your code can handle uh like a like a long timeout um and uh yeah at at times it can like various parts of this can time out too so it's just something to be aware of yeah I I think like a model some

  86. 53:46

    people are trying to work towards is instead of sending like Bitcoin transactions themselves you have like an account with Bitcoin on and you send like access to the account through the MPC to different people so then you're like sort of sending Bitcoin but with nears like finality and and and gas so you can sort of avoid some of those problems but then you're restricted by well the accounts somewh become utxos themselves where you have to like merge Bitcoin from from different accounts to

  87. 54:26

    split it up if you want to send an amount that isn't the amount that's on that account yeah exactly I think it becomes more interesting with things like like nfts and I don't know anything about I keep hearing the word runes I don't know what a rune is but yeah runes an ordinals do I you know what I I'm familiar what an ordinal is I think but do you actually know what Rune is either of

  88. 54:59

    you it's um it's like tokens uh it's it's a way to build the tokens on bitcoin right well like fun tokens yeah yeah exactly oh okay cool so yeah you could use an approach like this to build a uh a runes or an ordinal app uh you'd uh be able to um use uh a near account uh and uh you'd be able to interact like like purchase a uh um a ordinal or Rune or uh you know make trades um yeah

  89. 55:39

    whatever you want awesome well uh gr I really appreciate that you taking the time today walking us through all of that and uh what's the the best place for people to go to ask questions if they have any um I'm on Telegram um and uh on GitHub perfect so we're just right into the different repos to jump in ask questions yeah I'll drop a link to the the chain abstraction uh chat Below in the uh the

  90. 56:20

    the the Twitter comments so you can join this chat if you have have more questions about building this sort of stuff I'll try and help but uh this Bitcoin stuff probably won't be able to oh perfect uh great this this was uh super helpful uh definitely appreciate Greg you taking time we'll add this stuff all to the show notes people watching this on a replay uh and kind of get involved

  91. 56:50

    and we encourage people to start start building on this uh thanks for your time today Greg thanks guys thanks thank you thank you so uh again uh if you are not already signed up you can leverage all of this stuff that you just learned here in the rudak hackathon it is going on for a few more days uh there are tons of great great prizes here uh here I'll bring up the page real quick and go through because there are some chain of

  92. 57:22

    traction related ones a lot chain abstraction ones isn't there yeah there's a lot of different stuff you can do here so there's best of chain abstraction um you know uh there is some stuff around defi here so obviously the all fits into that uh proximity has their own separate Bounty as well related related to this uh there's a bunch of stuff that again you can start to mix and match here of

  93. 57:46

    leveraging different pieces so you could take maybe the workshop that we saw the end of last week with BTE using an agent build an agent tied into something that's doing with like the uh Omni Library here and now you're really mixing matching and you're eligible for all the different categories that your product fits in uh you can you can leverage and so you can actually apply

  94. 58:08

    to all of those win multiple prizes which is uh really exciting uh if you if you sign up you have until uh the pretty much the end of the Working Day depending on where you are in the world uh on October 31st uh there are so many project project especially if you go back and you look at some of the different AI agent ones and things like that that you can get done in a few hours to just get started so you could spend a day or two and uh get something ready to actually

  95. 58:39

    submit there $700,000 in prizes uh it's it's a great way to get involved and learn about more about the near community and stuff like that and there will be support all the way up until the deadlined and Beyond uh through our different support channels uh and all of those are all listed here here as well uh off of Dev post if you go to resources everything is right there for you uh come say hi in the different telegram groups and uh start building uh oh and you want to end with

  96. 59:09

    anything this was another good Workshop here around uh building with Bitcoin yeah I I I learned a lot on this one um really interesting stuff Bitcoin is quite complex I would say to deal with and not that many people building it so I think there's some cool opportunities there of what you can build um and I'll be really interested to see if many people build with Bitcoin on this um

  97. 59:42

    like I said I'm not I'm not too familiar so maybe people are going to come up with stuff that I have I have no clue about and it would just be awesome yeah yeah yeah know for sure definitely excited to see what what comes out of all of this uh we will be back again our normal time Thursday uh at 4M UTC uh we have a kind of combo episode Workshop you know building with privacy uh so uh Sandy from Calo will be back on again uh if

  98. 1:00:13

    you've been watching the Fridays with frol he'll be back on it should be a really fun one uh talking about building around privacy and everything else like that that is Thursday at 4M UTC same place uh but until then keep building and we will see you Thursday bye folks