1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1776],{2987:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blaze",function(){return n(8176)}])},8176:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return c}});var r=n(5893),t=n(2673),o=n(7913),a=n(2702);n(9128);var i=n(2643),l=n(9013);let c=[{depth:2,value:"Overview",id:"overview"},{depth:2,value:"Features",id:"features"},{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Sample Usage",id:"sample-usage"},{depth:3,value:"Step 1: Import Blaze SDK and UTxORPC Provider",id:"step-1-import-blaze-sdk-and-utxorpc-provider"},{depth:3,value:"Step 2: Create a New U5C Provider",id:"step-2-create-a-new-u5c-provider"},{depth:3,value:"Step 3: Create a New Wallet from a Mnemonic",id:"step-3-create-a-new-wallet-from-a-mnemonic"},{depth:3,value:"Step 4: Create a Blaze Instance from the Wallet and Provider",id:"step-4-create-a-blaze-instance-from-the-wallet-and-provider"},{depth:3,value:"Step 5: Create an Example Transaction",id:"step-5-create-an-example-transaction"},{depth:3,value:"Step 6: Sign the Transaction",id:"step-6-sign-the-transaction"},{depth:3,value:"Step 7: Submit the Transaction to the Blockchain Network",id:"step-7-submit-the-transaction-to-the-blockchain-network"},{depth:2,value:"Conclusion",id:"conclusion"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",strong:"strong",a:"a",h2:"h2",ul:"ul",li:"li",pre:"pre",code:"code",span:"span",h3:"h3"},(0,i.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Blaze UTxORPC Provider"}),"\n",(0,r.jsxs)(s.p,{children:["This provides instructions on using the ",(0,r.jsx)(s.strong,{children:"UTxORPC (u5c)"})," provider for the ",(0,r.jsx)(s.a,{href:"https://github.com/butaneprotocol/blaze-cardano",children:"Blaze"})," library."]}),"\n",(0,r.jsx)(s.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.a,{href:"https://github.com/butaneprotocol/blaze-cardano",children:"Blaze"})," is a library designed to simplify the process of creating ",(0,r.jsx)(s.strong,{children:"Cardano transactions"})," and interacting with ",(0,r.jsx)(s.strong,{children:"Cardano smart contracts"})," using JavaScript/TypeScript. Blaze requires access to blockchain state information (e.g., UTxOs, protocol parameters) to build and sign transactions."]}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.strong,{children:"UTxORPC (u5c)"})," provider facilitates access to this state in a standardized and efficient manner through ",(0,r.jsx)(s.strong,{children:"gRPC"}),", using a compact and high-performance binary format."]}),"\n",(0,r.jsx)(s.h2,{id:"features",children:"Features"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Standardized Interface"}),": Implements the UTxORPC specification to ensure compatibility and interoperability across UTxO-based blockchains."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Performance Optimized"}),": Utilizes gRPC for efficient communication with blockchain nodes, minimizing network overhead and message size."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Flexible Provider Options"}),": Suitable for use with hosted services, local nodes like ",(0,r.jsx)(s.strong,{children:"Dolos"}),", or any UTxORPC-compliant service."]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(s.p,{children:"To install the UTxORPC provider, use npm:"}),"\n",(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@utxorpc/blaze-provider"})]})})}),"\n",(0,r.jsxs)(s.p,{children:["You also need to install the ",(0,r.jsx)(s.strong,{children:"Blaze SDK"})," if you havenât already:"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"bash","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"bash","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@blaze-cardano/sdk"})]})})}),"\n",(0,r.jsx)(s.h2,{id:"sample-usage",children:"Sample Usage"}),"\n",(0,r.jsx)(s.h3,{id:"step-1-import-blaze-sdk-and-utxorpc-provider",children:"Step 1: Import Blaze SDK and UTxORPC Provider"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"javascript","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Bip32PrivateKey"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" mnemonicToEntropy"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" wordlist"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@blaze-cardano/core"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" HotWallet"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Core"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Blaze"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"} "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@blaze-cardano/sdk"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" { U5C } "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@utxorpc/blaze-provider"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})]})}),"\n",(0,r.jsx)(s.h3,{id:"step-2-create-a-new-u5c-provider",children:"Step 2: Create a New U5C Provider"}),"\n",(0,r.jsxs)(l.UW,{type:"note",children:[(0,r.jsxs)(s.p,{children:["The following code samples assume that the UTxORPC node is running locally on ",(0,r.jsx)(s.code,{children:"localhost:50051"}),". If your node is hosted remotely or on a different server, replace ",(0,r.jsx)(s.code,{children:'"http://localhost:50051"'})," with the appropriate server URL and port for your environment."]}),(0,r.jsxs)(s.p,{children:["For more details on configuring your node, refer to the ",(0,r.jsx)(s.a,{href:"/servers",children:"UTxORPC Ecosystem Servers Documentation"}),"."]})]}),"\n",(0,r.jsx)(s.p,{children:"Here's how to create the U5C Provider:"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"javascript","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"provider"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"U5C"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" url"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"http://localhost:50051"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" headers"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"api-key"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"<api-key>"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,r.jsx)(s.p,{children:"This sample is structured in a way that can be used if your UTxORPC node comes from a provider and you need to attach needed information to your header."}),"\n",(0,r.jsx)(s.h3,{id:"step-3-create-a-new-wallet-from-a-mnemonic",children:"Step 3: Create a New Wallet from a Mnemonic"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"javascript","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"mnemonic"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"your 24-word mnemonic here"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"entropy"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"mnemonicToEntropy"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(mnemonic"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" wordlist);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"masterkey"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Bip32PrivateKey"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".fromBip39Entropy"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Buffer"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(entropy)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'""'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"wallet"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"HotWallet"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".fromMasterkey"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"masterkey"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".hex"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"}
1,children:"()"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" provider);"})]})]})}),"\n",(0,r.jsx)(s.h3,{id:"step-4-create-a-blaze-instance-from-the-wallet-and-provider",children:"Step 4: Create a Blaze Instance from the Wallet and Provider"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"blaze"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Blaze"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(provider"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" wallet);"})]})})}),"\n",(0,r.jsx)(s.p,{children:"Optional: Print the wallet address"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Wallet address"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"wallet"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"address"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".toBech32"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"());"})]})})}),"\n",(0,r.jsx)(s.p,{children:"Optional: Print the wallet balance"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Wallet balance"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"wallet"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".getBalance"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"())"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".toCore"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"());"})]})})}),"\n",(0,r.jsx)(s.h3,{id:"step-5-create-an-example-transaction",children:"Step 5: Create an Ex
1ample Transaction"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"javascript","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"tx"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" blaze"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".newTransaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".payLovelace"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Core"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Address"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".fromBech32"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"addr_test1qrnrqg4s73skqfyyj69mzr7clpe8s7ux9t8z6l55x2f2xuqra34p9pswlrq86nq63hna7p4vkrcrxznqslkta9eqs2nsmlqvnk"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5_000_000"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"n"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" )"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".complete"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"();"})]})]})}),"\n",(0,r.jsx)(s.h3,{id:"step-6-sign-the-transaction",children:"Step 6: Sign the Transaction"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"signedTx"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"blaze"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".signTransaction"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(tx);"})]})})}),"\n",(0,r.jsx)(s.h3,{id:"step-7-submit-the-transaction-to-the-blockchain-network",children:"Step 7: Submit the Transaction to the Blockchain Network"}),"\n",(0,r.jsx)(s.pre,{"data-language":"javascript","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"javascript","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"txId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"blaze"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"provider"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".postTransactionToChain"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(signedTx);"})]})})}),"\n",(0,r.jsx)(s.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.strong,{children:"UTxORPC (u5c)"})," provider for ",(0,r.jsx)(s.a,{href:"https://github.com/butaneprotocol/blaze-cardano",children:"Blaze"})," enables seamless interaction with the Cardano blockchain, integrating effectively with the Blaze library to facilitate the creation, signing, and submission of transactions. By following this guide, you should be able to set up and use the U5C provider with Blaze, allowing you to leverage Cardano blockchain in your JavaScript/TypeScript applications."]}),"\n",(0,r.jsxs)(s.p,{children:["For further customization and advanced usage, refer to the documentation for ",(0,r.jsx)(s.a,{href:"https://github.com/butaneprotocol/blaze-cardano",children:"Blaze"}),". By understanding and utilizing these tools, you can develop robust applications that interact with Cardano and other UTxO-based blockchains efficie
1ntly."]})]})}let h={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,i.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/blaze.mdx",route:"/blaze",timestamp:1734436376e3,pageMap:[{kind:"Meta",data:{index:{title:"UTxO RPC",type:"page",display:"hidden",theme:{layout:"full"}},"-- Basics --":{type:"separator",title:"About"},introduction:"Introduction","-- Modules --":{type:"separator",title:"Specification"},query:"Query Module",submit:"Submit Module",sync:"Sync Module",watch:"Watch Module",playground:{display:"hidden",title:"Playground"},"-- Ledgers --":{type:"separator",title:"Ledgers"},cardano:"Cardano Module",bitcoin:"Bitcoin Module","-- SDK --":{type:"separator",title:"SDK"},rust:"Rust",python:"Python",go:"Go",nodejs:"NodeJS",deno:"Deno",dotnet:".NET","-- Ecosystem --":{type:"separator",title:"Ecosystem"},servers:"Servers",clients:"Clients",teams:"Teams","-- Guides --":{type:"separator",title:"Guides"},grpcurl:"Using grpcurl",blaze:"Blaze Provider"}},{kind:"MdxPage",name:"bitcoin",route:"/bitcoin"},{kind:"MdxPage",name:"blaze",route:"/blaze"},{kind:"MdxPage",name:"cardano",route:"/cardano"},{kind:"MdxPage",name:"clients",route:"/clients"},{kind:"MdxPage",name:"deno",route:"/deno"},{kind:"MdxPage",name:"dotnet",route:"/dotnet"},{kind:"MdxPage",name:"go",route:"/go"},{kind:"MdxPage",name:"grpcurl",route:"/grpcurl"},{kind:"MdxPage",name:"index",route:"/"},{kind:"MdxPage",name:"introduction",route:"/introduction"},{kind:"MdxPage",name:"nodejs",route:"/nodejs"},{kind:"MdxPage",name:"playground",route:"/playground"},{kind:"MdxPage",name:"python",route:"/python"},{kind:"Folder",name:"query",route:"/query",children:[{kind:"MdxPage",name:"intro",route:"/query/intro"},{kind:"MdxPage",name:"spec",route:"/query/spec"},{kind:"Meta",data:{intro:"Intro",spec:"Spec"}}]},{kind:"MdxPage",name:"rust",route:"/rust"},{kind:"MdxPage",name:"servers",route:"/servers"},{kind:"Folder",name:"submit",route:"/submit",children:[{kind:"MdxPage",name:"intro",route:"/submit/intro"},{kind:"MdxPage",name:"spec",route:"/submit/spec"},{kind:"Meta",data:{intro:"Intro",spec:"Spec"}}]},{kind:"Folder",name:"sync",route:"/sync",children:[{kind:"MdxPage",name:"intro",route:"/sync/intro"},{kind:"MdxPage",name:"spec",route:"/sync/spec"},{kind:"Meta",data:{intro:"Intro",spec:"Spec"}}]},{kind:"MdxPage",name:"teams",route:"/teams"},{kind:"Folder",name:"watch",route:"/watch",children:[{kind:"MdxPage",name:"intro",route:"/watch/intro"},{kind:"MdxPage",name:"spec",route:"/watch/spec"},{kind:"Meta",data:{intro:"Intro",spec:"Spec"}}]}],flexsearch:{codeblocks:!0},title:"Blaze UTxORPC Provider",headings:c},pageNextRoute:"/blaze",nextraLayout:o.ZP,themeConfig:a.Z};s.default=(0,t.j)(h)},2702:function(e,s,n){"use strict";var r=n(5893);s.Z={logo:(0,r.jsx)("img",{style:{height:"30px"},src:"/logo-dark.svg"}),navbar:{extraContent:(0,r.jsxs)("div",{className:"flex items-center nx-gap-2",style:{marginLeft:"4px"},children:[(0,r.jsxs)("a",{href:"/playground",rel:"noopener noreferrer",className:"nx-text-current bg-gradient-to-tl text-sm from-emerald-600 to-cyan-600 hover:from-emerald-300 hover:to-cyan-500 font-medium flex items-center justify-between gap-2",style:{padding:"6px 12px",lineHeight:1.25,borderRadius:"6px"},children:[(0,r.jsx)("span",{children:"Playground"}),(0,r.jsx)("img",{style:{height:"21.5px"},src:"/playground.svg"})]}),(0,r.jsxs)("div",{className:"flex items-center",style:{gap:"4px"},children:[(0,r.jsx)("a",{href:"https://github.com/utxorpc",target:"_blank",rel:"noopener noreferrer",className:"nx-p-1 nx-text-current",children:(0,r.jsx)("svg",{width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}),(0,r.jsx)("a",{href:"https://discord.gg/Vc3x8N9nz2",target:"_blank",rel:"noopener noreferrer",className:"nx-p-1 nx-text-current",children:(0,r.jsx)("svg",{width:"24",height:"24",fill:"
1currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M20.317 4.369a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37.07.07 0 0 0 3.647 4.4C.533 9.046-.32 13.58.099 17.961a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})})]})]})},sidebar:{defaultMenuCollapseLevel:1},head:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("link",{rel:"icon",type:"image/x-icon",href:"/favicon.ico"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"})]}),docsRepositoryBase:"https://github.com/utxorpc/docs/blob/main",useNextSeoProps:()=>({titleTemplate:"%s â UTxO RPC",description:"gRPC interface for UTxO blockchains",canonical:"https://utxorpc.org",siteName:"UTxO RPC",openGraph:{url:"https://utxorpc.org",title:"UTxO RPC",description:"gRPC interface for UTxO blockchains",images:[{url:"https://utxorpc.org/og-image.png",width:761,height:508,alt:"UTxO RPC",type:"image/png"}]},twitter:{site:"@utxorpc",card:"summary_large_image"}}),footer:{text:"UTxO RPC"},primaryHue:178,darkMode:!1}},5789:function(){}},function(e){e.O(0,[4543,9774,2888,179],function(){return e(e.s=2987)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.