<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Peter</title>
    <description>The latest articles on DEV Community by Peter (@z5208980).</description>
    <link>https://dev.to/z5208980</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1212580%2Ff4835693-8af8-4b86-a4da-4f05d5bf06af.png</url>
      <title>DEV Community: Peter</title>
      <link>https://dev.to/z5208980</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/z5208980"/>
    <language>en</language>
    <item>
      <title>Soroban Snippets: Basic of Building Dapp Part 2</title>
      <dc:creator>Peter</dc:creator>
      <pubDate>Wed, 13 Dec 2023 09:34:09 +0000</pubDate>
      <link>https://dev.to/z5208980/soroban-snippets-basic-of-building-dapp-part-2-2jpl</link>
      <guid>https://dev.to/z5208980/soroban-snippets-basic-of-building-dapp-part-2-2jpl</guid>
      <description>&lt;h1&gt;
  
  
  Validating Stellar/Soroban Information
&lt;/h1&gt;

&lt;p&gt;In this section, we will explore straightforward validation methods available in the Soroban SDK, specifically designed to authenticate and validate public keys, secret keys, and contract IDs. These methods serve as essential tools to ensure the authenticity and validity of inputs in various contexts within your decentralized application (dApp). Whether validating a public key for an &lt;code&gt;Address&lt;/code&gt; or confirming its suitability for a &lt;code&gt;xdr.ScVal&lt;/code&gt; object, these techniques establish a robust foundation for data integrity, empowering your dApp with reliable and secure information handling.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=0adc6dfb0b29f3ab2991d2700e54fcc6e74333c8d2bdf8e6c9b4f8b0ee4821c0"&gt;Validating Stellar/Soroban Information&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Emitting and Retrieving Events
&lt;/h1&gt;

&lt;p&gt;The provided React component appears to be a part of a larger project that involves emitting and retrieving events using Soroban on the Stellar network. The code snippet focuses on showcasing the process of emitting events in the Soroban smart contract. The &lt;code&gt;increment&lt;/code&gt; method within the contract increments a counter, saves the updated count to the storage, and publishes an event with relevant details, including the count. The accompanying code demonstrates how to use the &lt;code&gt;stellar-sdk&lt;/code&gt; library and the RPC API for interacting with the Soroban testnet. Additionally, the component includes a sample event query, allowing users to try out the code and retrieve contract events. The UI provides buttons for executing specific actions, such as getting events or triggering an increment event, and a console log for displaying the output. This component serves as a valuable resource for developers seeking hands-on experience with Soroban events on the Stellar network.&lt;br&gt;
&lt;a href="https://dev.toLINK"&gt;Emitting and Retrieving Events&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Migration between &lt;code&gt;soroban-client&lt;/code&gt; to &lt;code&gt;stellar-sdk&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;Within the realm of dapp development, two libraries are actively maintained—&lt;code&gt;soroban-client&lt;/code&gt; and &lt;code&gt;stellar-sdk&lt;/code&gt;. The primary emphasis in this context is streamlining the migration process from &lt;code&gt;soroban-client&lt;/code&gt; to &lt;code&gt;stellar-sdk&lt;/code&gt; for Soroban application development. The introductory section highlights the coexistence of these two JavaScript libraries and recommends opting for the more actively maintained &lt;code&gt;stellar-sdk&lt;/code&gt; when constructing a Soroban/Stellar application. This superior library not only mirrors all the features of &lt;code&gt;soroban-client&lt;/code&gt; but also integrates its implementation. The migration process between the two is straightforward, and the subsequent guide furnishes illustrative examples for transitioning key features, specifically focusing on &lt;code&gt;Server&lt;/code&gt;, &lt;code&gt;SorobanRpc&lt;/code&gt;, and &lt;code&gt;AssembleTransaction&lt;/code&gt; functionalities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=006c32373d4763fded868582d4b15e586bcd05f3dba80c037b39d8fc4e509b3f"&gt;Migration between &lt;code&gt;soroban-client&lt;/code&gt; to &lt;code&gt;stellar-sdk&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Soroban PRNG
&lt;/h1&gt;

&lt;p&gt;In Preview 11, Soroban has implemented a Pseudo Random Generator (PRNG) in their smart contract SDK in &lt;code&gt;Rust&lt;/code&gt;. This segment will take a look at Soroban Rust PRNG library, particularly relevant for Stellar smart contract development and adaptable for dapps seeking a reliable pseudorandom number generation (PRNG) solution. The library facilitates on-chain randomness and includes techniques for vector shuffling and generating random numbers within defined intervals. While it assures simplicity and reliability in generating randomness within the Stellar ecosystem, it's essential to note its unsuitability for security-sensitive applications or those with low risk tolerance. Further details and usage guidelines can be explored in the comprehensive documentation. The provided Rust code snippets offer practical demonstrations of these functionalities. Users can interactively experience the PRNG capabilities, such as rolling a dice and shuffling a provided list, through the demonstrated usage sections and associated buttons.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=c82e3da492308675b16f5122ff0980a54b5377805b51eb2a0466a6ef7f612578"&gt;Soroban PRNG&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Generating and Deriving Stellar Accounts with Seed Phrases
&lt;/h1&gt;

&lt;p&gt;Stellar incorporates a key derivation protocol known as &lt;code&gt;SEP-0005&lt;/code&gt;. This protocol plays a crucial role in enhancing key storage, fostering interoperability across wallets, supporting hardware wallets, and facilitating mnemonic code-based cold storage. The demonstration will leverage Bitcoin's BIP-0039 standard to generate a 12-word or 24-word seed phrase, serving as a standard for &lt;code&gt;SEP-0005&lt;/code&gt;. The protocol utilizes the &lt;code&gt;m/44'/148'/0'&lt;/code&gt; as the primary key. The article not only explores Stellar Ecosystem Proposal &lt;code&gt;SEP-0005&lt;/code&gt; but also demonstrates how to generate word phrases for a Stellar account and derive them into Soroban's &lt;code&gt;KeyPair&lt;/code&gt; for transaction use. This comprehensive overview equips developers with the knowledge and tools necessary for secure key management within the Stellar network, serving as a valuable guide for creating and integrating Stellar Wallets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=8aac24da58aef76a88c54a9f6970d854f535402aebfeaf7300f4f2326a51e19b"&gt;Generating and Deriving Stellar Accounts with Seed Phrases&lt;/a&gt;&lt;/p&gt;

</description>
      <category>stellar</category>
      <category>soroban</category>
      <category>javascript</category>
      <category>web3</category>
    </item>
    <item>
      <title>Soroban Snippets: Understanding Assets with Smart Contracts</title>
      <dc:creator>Peter</dc:creator>
      <pubDate>Mon, 04 Dec 2023 23:48:15 +0000</pubDate>
      <link>https://dev.to/z5208980/soroban-snippets-understanding-assets-with-smart-contracts-56n3</link>
      <guid>https://dev.to/z5208980/soroban-snippets-understanding-assets-with-smart-contracts-56n3</guid>
      <description>&lt;h1&gt;
  
  
  1. Create Stellar Asset
&lt;/h1&gt;

&lt;p&gt;Assets play a fundamental role in Stellar, representing tokens, liquidity pools, or even NFTs that can be both created and transferred. Identification of Stellar Assets is based on an &lt;strong&gt;Asset Code&lt;/strong&gt; and the &lt;strong&gt;issuer's public key&lt;/strong&gt;. Creating a Stellar Asset is a straightforward process with numerous tutorials available, such as the one provided by the Stellar Development Foundation (SDF) titled &lt;a href="https://developers.stellar.org/docs/issuing-assets/how-to-issue-an-asset"&gt;Issue an Asset&lt;/a&gt;. In essence, the creation involves two public keys, namely an issuer and a distributor. The procedure includes establishing a trustline before transferring funds and assets to the destination address through a payment operation. The tutorial further introduces the crucial concept of unique asset identification, underscoring the significance of combining asset codes and issuer public keys. By following this guide, you can enhance your comprehension and gain hands-on experience in the creation and management of assets on the Stellar network.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=a35eb9ec7dc3a51e56477fdb045592564668702e6ff1d6d8847a4c9a7d29fc20"&gt;Create Stellar Asset&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Create Soroban Wrapped Asset
&lt;/h1&gt;

&lt;p&gt;Soroban, a smart contract platform for Stellar, introduces a unique asset management approach by enabling the creation and funding of Stellar Assets that can be wrapped into Soroban tokens. This process incorporates smart contracts, representing wrapped assets similarly to Classic Assets. Additionally, Soroban supports the issuance of tokens as Stellar Assets or as custom Soroban Tokens, providing flexibility in logic implementation. The "Stellar Asset Contract" (SAC) (Like the ERC-20), further enhances interoperability by allowing users to utilize their (classic) Stellar account and trustline balances in Soroban. The &lt;code&gt;soroban lab token wrap&lt;/code&gt; command facilitates experimentation with wrapping. However in this comprehensive tutorial guides users incoporate the wrapping functionality in their dapps (JS/TS) through HostFunction creation, Operation generation, and the use of Freighter to wrap assets and integrate them into the wallet. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=129c27e42b75339d45ba6b15de88a0a6eee41fae01fe4da955ac0032b51cd3ad"&gt;Create Soroban Wrapped Asset&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Get Contract from Wrapped Asset
&lt;/h1&gt;

&lt;p&gt;Once a token is created and wrapped, understanding how to retrieve its information becomes crucial. There are scenarios where assessing the token contract becomes necessary to invoke its methods. This section elaborates on the process of transforming Stellar Assets into Soroban contracts, offering insights into two distinct methods for this conversion. The resulting contract ID, beginning with "C," represents a hashed version of the asset's details. It's important to note that these contract IDs are hypothetical and &lt;strong&gt;may not exist if the asset is not wrapped&lt;/strong&gt; or created. In the tutorials, developers have the opportunity to input the asset code and issuer details, exploring and comprehending the process of obtaining Soroban contracts from Wrapped Stellar Assets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=40659fceff422b8aa0fedea0f8ad836dcf5189e20b5ae316607227b5c1d75e49"&gt;Get Contract from Wrapped Asset&lt;/a&gt;&lt;/p&gt;

</description>
      <category>soroban</category>
      <category>stellar</category>
      <category>javascript</category>
      <category>web3</category>
    </item>
    <item>
      <title>Soroban Snippets: Guide to Soroban Smart Contracts for Web3 DApps</title>
      <dc:creator>Peter</dc:creator>
      <pubDate>Fri, 01 Dec 2023 05:00:00 +0000</pubDate>
      <link>https://dev.to/z5208980/soroban-snippets-guide-to-soroban-smart-contracts-for-web3-dapps-1hpi</link>
      <guid>https://dev.to/z5208980/soroban-snippets-guide-to-soroban-smart-contracts-for-web3-dapps-1hpi</guid>
      <description>&lt;h1&gt;
  
  
  1. Installing Contract/WASM to Soroban
&lt;/h1&gt;

&lt;p&gt;One of the first things to do when needing to deploy a Soroban contract is to deploy its &lt;code&gt;.wasm&lt;/code&gt; file on the Soroban blockchain. The following tutorial guides developers through essential steps for ensuring their smart contracts are deployment-ready on Soroban. Notably, it distinguishes between installing and deploying a smart contract, shedding light on the former. The document introduces the use &lt;code&gt;soroban-client&lt;/code&gt; tool and delves into the critical role of &lt;code&gt;hostFunctionTypeUploadContractWasm&lt;/code&gt; in JavaScript. Practical usage is demonstrated through code snippets, explaining the interaction with the Soroban blockchain, transaction building, and signing process with &lt;strong&gt;Freighter&lt;/strong&gt;. Overall, it stands as a valuable resource for developers navigating the intricacies of smart contract installation on the Soroban blockchain in a web environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=79c9750ceb633dc23e58617e71a88761650cebee00383b9237adefec3c6debe0"&gt;Installing Contract/WASM to Soroban&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Soroban Contract Deployment
&lt;/h1&gt;

&lt;p&gt;Having successfully deployed a contract WASM on Soroban, the next step involves creating a contract instance. This tutorial explores the deployment process, emphasizing the utilization of the &lt;code&gt;soroban-client&lt;/code&gt; js library to contract deployment on Soroban. It focuses on key elements such as the creation of a &lt;strong&gt;contract ID preimage&lt;/strong&gt; and the construction of contract arguments. The guides will help web3 developers through the process of building a host function transaction. To enhance practical understanding there is also a working demo allowing users to interactively deploy a &lt;strong&gt;Soroban token&lt;/strong&gt;, equipping developers with the knowledge and tools required for proficient Soroban smart contract deployment in JavaScript and TypeScript.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=be958880d0b612c39ab42b2dce78173f645c908449fe4eedbd744cd388eddfa3"&gt;Soroban Contract Deployment&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Execute Soroban Smart Contract
&lt;/h1&gt;

&lt;p&gt;There are several approaches to invoking methods of a Soroban contract, and this demonstration introduces the capabilities of the &lt;code&gt;Contract&lt;/code&gt; class in the &lt;code&gt;soroban-client&lt;/code&gt; library. With interactive examples, it provides insights into seamless communication with smart contracts. Similar to the token contract discussed in Part 2, we'll implement a TypeScript code snippet that demonstrates the invocation process and transaction building using the &lt;code&gt;contract.call()&lt;/code&gt; method for Soroban. This guide aims to showcase the practical application of the &lt;code&gt;Contract&lt;/code&gt; class, enabling developers to effectively interact with and execute transactions on Soroban smart contracts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=8caa307d786a1afcf370be5a8f037f637bccefe46e012584ef0374ca69636c2f"&gt;Execute Soroban Smart Contract&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Retrieve WebAssembly (WASM) Code from Smart Contract
&lt;/h1&gt;

&lt;p&gt;You can do many things in your web application with the &lt;code&gt;soroban-client&lt;/code&gt;. One of which is retrieving the WebAssembly (Wasm) code from a Soroban contract. Beyond gaining insights into the contract, its modules, and imports/exports, developers can leverage this feature for deploying an identical contract to Soroban without the need for recompilation or for inspecting the contract code. The &lt;strong&gt;contractData&lt;/strong&gt; and &lt;strong&gt;contractCode&lt;/strong&gt; steps outline a streamlined two-step procedure for obtaining the Wasm file associated with a Soroban smart contract. This entails querying the Soroban blockchain to retrieve the &lt;strong&gt;Wasm ID&lt;/strong&gt; and subsequently using that ID to fetch the corresponding Wasm file. Soroban Snippet introduces a comprehensive function, elucidated in the code below, that facilitates the retrieval of the Wasm file from the blockchain as a &lt;strong&gt;downloadable file&lt;/strong&gt;, providing developers with a powerful tool for a deeper understanding of Soroban contract intricacies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=2fc6a1c736f314c52393754b6e74ebccce0a973847768c2a1e75f045f4a886bd"&gt;Retrieve WebAssembly (WASM) Code from Smart Contract&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Access Soroban Contract Storage State
&lt;/h1&gt;

&lt;p&gt;In addition, Soroban has many storage types to avoid storage bloats and manage efficiency data on the chain. The provided tutorial will focus on the &lt;strong&gt;storage state&lt;/strong&gt; and information of a Soroban smart contract, this guide sheds light on the key-value pairs stored within the contract. Specifically, it delves into the &lt;code&gt;Instance&lt;/code&gt; storage, accessible through the &lt;code&gt;Env.storage().instance()&lt;/code&gt; code in your Dapps. Subsequently, we again introduce again to &lt;code&gt;contractData&lt;/code&gt; in the &lt;code&gt;soroban-client&lt;/code&gt; JS library. This step involves constructing a &lt;code&gt;LedgerKey&lt;/code&gt; for contract data, fetching &lt;strong&gt;ledger entries&lt;/strong&gt; from the Soroban server, and extracting relevant information, such as instance storage. Of course, every tutorial will provide a snippet and runnable example to see what you can expect when using these methods.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=88834785d0f3929a0efbd5220ebd7b7a9c39a0434186455ea70607670d1b249a"&gt;Access Soroban Contract Storage State&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  6. Construct Soroban Contract ABI in JavaScript/TypeScript
&lt;/h1&gt;

&lt;p&gt;If you ever find yourself needing to explore a Soroban contract's methods along with their inputs and outputs, the Soroban CLI comes with its &lt;code&gt;inspect&lt;/code&gt; command. This command, when provided with the WebAssembly (Wasm) code, returns a detailed list of contract specifications. These specifications include functions, as well as custom data types like enums and structs, associated with the Rust code. However, when working on a web app, integrating this process might pose some challenges. Therefore, this tutorial endeavours to establish an approach for obtaining comprehensive insights into a Soroban contract that goes beyond just its Wasm code. The goal is to create a method that emulates the functionality of the &lt;code&gt;inspect&lt;/code&gt; command. It's worth noting that this involves utilizing the &lt;code&gt;WebAssembly.Module&lt;/code&gt; inherent to JavaScript and the Soroban convention for storing information in the &lt;code&gt;contractspecv0&lt;/code&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=cea23fe9629b45b45de50c6d586e570d0d823d1a0326cba8844bd7c79c92493f"&gt;Construct Soroban Contract ABI in JavaScript/TypeScript&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  7. Restore Expired Contract/WASM
&lt;/h1&gt;

&lt;p&gt;As far as Testnet and Futurenet in Soroban, contract data have a lifetime. In order to maintain and use a smart contract on Soroban, there data and wasm on the network must be maintained.  The process involves retrieving expiration details and utilizing the &lt;code&gt;Operation.restoreFootprint()&lt;/code&gt; method to obtain ledger keys associated with the contract instance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=943f3f9207e07751443699f1480500be3bb3636984aa19200452d49a7886cdc5"&gt;Restore Expired Contract/WASM&lt;/a&gt;&lt;/p&gt;

</description>
      <category>soroban</category>
      <category>stellar</category>
      <category>javascript</category>
      <category>web3</category>
    </item>
    <item>
      <title>Soroban Snippets: Basic of Building Dapp</title>
      <dc:creator>Peter</dc:creator>
      <pubDate>Thu, 23 Nov 2023 21:47:17 +0000</pubDate>
      <link>https://dev.to/z5208980/soroban-snippets-basic-of-building-dapp-o0a</link>
      <guid>https://dev.to/z5208980/soroban-snippets-basic-of-building-dapp-o0a</guid>
      <description>&lt;p&gt;Welcome to the series of many where we'll be going over building in Soroban. Soroban Snippet is an application aimed to empower developers by providing comprehensive educational and interactive examples of working and building within the Stellar Network. We strive to simplify web and Dapp development on Soroban, offering practical insights and hands-on snippets in each section. Whether you're navigating the intricacies of network connections, estimating gas costs, or submitting transactions, our goal is to equip you with the knowledge and practical snippets that seamlessly integrate into your Soroban applications. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/"&gt;Soroban Snippet&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Setting soroban and Freighter in JavaScript/TypeScript
&lt;/h1&gt;

&lt;p&gt;The first thing we need to do is set up our connections to Soroban. In order to do so, we need the network information such as &lt;strong&gt;Passphrase&lt;/strong&gt; and &lt;strong&gt;RPC&lt;/strong&gt;. &lt;code&gt;soroban-client&lt;/code&gt; makes it easy to connect to &lt;code&gt;futurenet&lt;/code&gt; &lt;em&gt;or&lt;/em&gt; &lt;code&gt;testnet&lt;/code&gt; with the &lt;code&gt;Server&lt;/code&gt;. This guide will provide you with the necessary information to connect to all Soroban networks, and let you test out whether a connection is successful.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=4b494b00824d6be559221ddd2e36bda315250ffea230ab4ff654ed64a7a0fa12"&gt;Setting soroban and Freighter in JS/TS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Getting Gas Estimation in Soroban&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gas&lt;/strong&gt; plays a pivotal role in blockchain transactions. In the context of Soroban and Stellar's smart contracts, invoking contracts or adding operations incurs a fee, commonly referred to as gas. This tutorial introduces an uncomplicated yet powerful method for estimating transaction fees by leveraging the &lt;code&gt;simulateTransaction&lt;/code&gt; method. A trial run tailored for contract invocations. Developers can utilize this approach to assess gas costs comprehensively before executing methods on Soroban smart contracts, providing them with essential insights into optimizing transaction economics. The tutorial further exemplifies this technique through a practical demonstration, estimating the gas cost for invoking the "mint" method on a Soroban smart token written in Rust, thereby offering developers a practical tool to refine their gas cost considerations before actual transaction execution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=93e18ef1006d0d4c177a3a1ef2b955f186c9405e8ab8ede6907af0863f13c7c2"&gt;Getting Gas Estimation in Soroban&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Practical Guide Custom Types to XDR in JavaScript/TypeScript&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this following tutorial, we'll go through an interactive guide on structuring custom types for Soroban smart contracts. This includes practical implementation of Rust &lt;code&gt;enum&lt;/code&gt; and &lt;code&gt;struct&lt;/code&gt; into Soroban's &lt;code&gt;ScVal&lt;/code&gt; type. The Enum section illustrates the conversion of a Rust Enum, such as &lt;code&gt;TimeBoundKind&lt;/code&gt;, into its JavaScript/TypeScript counterpart using &lt;code&gt;scvVec&lt;/code&gt; and &lt;code&gt;scvSymbol&lt;/code&gt;. Similarly, the Struct section demonstrates the transformation of a Rust Struct, like &lt;code&gt;TimeBound&lt;/code&gt;, and an unnamed struct into Soroban's &lt;code&gt;ScVal&lt;/code&gt; using &lt;code&gt;scvMap&lt;/code&gt; and &lt;code&gt;scvVec&lt;/code&gt;. Developers can utilize these practical examples to seamlessly incorporate complex custom types into Soroban smart contract calls, enhancing the flexibility and functionality of their applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=d657cb97956a5795d092132ac8a19d1f798dc958694daf14c2aa0e0d32e0775e"&gt;Practical Guide Custom Types to XDR in JavaScript/TypeScript&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Submit Transaction Process&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When building a Blockchain Dapp, developers frequently encounter the task of submitting transactions to the network. In the context of using &lt;code&gt;soroban-client&lt;/code&gt;, this involves dispatching a transaction to the &lt;code&gt;server&lt;/code&gt;. It's crucial to note that the Soroban client doesn't wait for transaction completion. Instead, a socket-like approach is necessary to continuously read the transaction status until it reaches completion. Developers can then handle the response based on its &lt;strong&gt;status&lt;/strong&gt;. The provided demonstration delves into the fundamentals of these responses, with a specific focus on the &lt;code&gt;SorobanRpc.GetTransactionResponse&lt;/code&gt;. It illustrates how developers can extract relevant information from transactions within practical usage scenarios.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=2846ef53d171ed7ad3b47031a79168b2c98ad99f55fca1548a0899f4da0ae0c3"&gt;Submit Transaction Process&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Difference Transaction and Transaction Envelope&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Stellar, Transactions hold operations that modify the ledger, while the concept of a Transaction Envelope comes into play when a transaction is readied for signing. Essentially, it is a transaction that encompasses not only the transaction itself but also integrates a set of signatures. Diverging from raw Transaction objects, transaction envelopes circulate throughout the network and constitute essential elements of transaction sets. This differentiation elucidates their role in the Stellar ecosystem, offering a layered approach to transaction handling. Additionally, the demo provides an illustration of unwrapping XDR into its respective transaction and Transaction Envelope, facilitating their utilization with &lt;code&gt;soroban-client&lt;/code&gt; to submit to the network.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://soroban-snippet.vercel.app/?title=aaea0910c61285ba61bc296cbab141728e548fdd23623bf64d888bd39bf12508"&gt;Difference Transaction and Transaction Envelope&lt;/a&gt;&lt;/p&gt;

</description>
      <category>soroban</category>
      <category>stellar</category>
      <category>javascript</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
