1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9515],{4964:(s,e,i)=>{"use strict";i.d(e,{R:()=>h});var n=i(48447),t=i(1258),r=i.n(t),l=i(21462);let a={img:s=>(0,l.createElement)("object"==typeof s.src?r():"img",s)},h=s=>({...a,...(0,n.R)(s)})},35999:(s,e,i)=>{"use strict";i.d(e,{O:()=>n});let n=[{data:{docs:{type:"page",title:"Documentation"}}},{name:"docs",route:"/docs",children:[{data:{introduction:{title:"Introduction"},start:{title:"Getting Started"},"api-keys":{title:"API Keys"},"api-reference":{title:"API Reference"},"no-code-indexing":{title:"No-Code Indexing"},"gas-stations":{title:"Gas Stations"},"aptos-mcp":{title:"Aptos MCP"},admin:{title:"Admin"},faq:{title:"FAQ"},identity:{title:"Identity",href:"https://aptos.dev/en/build/guides/aptos-keyless"}}},{name:"admin",route:"/docs/admin",children:[{data:{billing:{title:"Billing"},"resource-management":{title:"Resource Management"}}},{name:"billing",route:"/docs/admin/billing",frontMatter:{sidebarTitle:"Billing"}},{name:"resource-management",route:"/docs/admin/resource-management",frontMatter:{title:"Resource Management"}}]},{name:"api-keys",route:"/docs/api-keys",children:[{data:{"frontend-keys":{title:"Frontend Keys"}}},{name:"frontend-keys",route:"/docs/api-keys/frontend-keys",frontMatter:{sidebarTitle:"Frontend Keys"}}]},{name:"api-keys",route:"/docs/api-keys",frontMatter:{sidebarTitle:"API Keys"}},{name:"api-reference",route:"/docs/api-reference",frontMatter:{title:"API Reference"}},{name:"aptos-mcp",route:"/docs/aptos-mcp",frontMatter:{title:"Aptos MCP"}},{name:"faq",route:"/docs/faq",frontMatter:{sidebarTitle:"Faq"}},{name:"gas-stations",route:"/docs/gas-stations",children:[{data:{shelby:{title:"Shelby"}}},{name:"shelby",route:"/docs/gas-stations/shelby",frontMatter:{sidebarTitle:"Shelby"}}]},{name:"gas-stations",route:"/docs/gas-stations",frontMatter:{sidebarTitle:"Gas Stations"}},{name:"introduction",route:"/docs/introduction",frontMatter:{sidebarTitle:"Introduction"}},{name:"no-code-indexing",route:"/docs/no-code-indexing",frontMatter:{sidebarTitle:"No Code Indexing"}},{name:"start",route:"/docs/start",children:[{data:{}}]},{name:"start",route:"/docs/start",frontMatter:{sidebarTitle:"Start"}}]}]},44405:(s,e,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/gas-stations/shelby",function(){return i(90244)}])},60686:(s,e,i)=>{"use strict";i.d(e,{e:()=>d});var n=i(23798),t=i(56694),r=i(29855);let l=(0,i(21462).createContext)({}),a=l.Provider;l.displayName="SSG";var h=i(4964);function d(s,e,i,n){let r=globalThis[t.VZ];return r.route=e,r.pageMap=i.pageMap,r.context[e]={Content:s,pageOpts:i,useTOC:n},o}function o({__nextra_pageMap:s=[],__nextra_dynamic_opts:e,...i}){let l=globalThis[t.VZ],{Layout:h,themeConfig:d}=l,{route:o,locale:p}=(0,r.r)(),k=l.context[o];if(!k)throw Error(`No content found for the "${o}" route. Please report it as a bug.`);let{pageOpts:x,useTOC:j,Content:y}=k;if(o.startsWith("/["))x.pageMap=s;else for(let{route:e,children:i}of s){let s=e.split("/").slice(p?2:1);(function s(e,[i,...n]){for(let t of e)if("children"in t&&i===t.name)return n.length?s(t.children,n):t})(x.pageMap,s).children=i}if(e){let{title:s,frontMatter:i}=e;x={...x,title:s,frontMatter:i}}return(0,n.jsx)(h,{themeConfig:d,pageOpts:x,pageProps:i,children:(0,n.jsx)(a,{value:i,children:(0,n.jsx)(c,{useTOC:j,children:(0,n.jsx)(y,{...i})})})})}function c({children:s,useTOC:e}){let{wrapper:i}=(0,h.R)();return(0,n.jsx)(p,{useTOC:e,wrapper:i,children:s})}function p({children:s,useTOC:e,wrapper:i,...t}){let r=e(t);return i?(0,n.jsx)(i,{toc:r,children:s}):s}},90244:(s,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>o,useTOC:()=>d});var n=i(23798),t=i(60686),r=i(35999),l=i(4964),a=i(90514),h=i(86534);function d(s){return[{value:"How It Works",id:"how-it-works",depth:2},{value:"How to create a gas station with ShelbyUSD sponsorship",id:"how-to-create-a-gas-station-with-shelbyusd-sponsorship",depth:2},{value:"Client Integration",id:"client-integration",depth:2},{value:"Using the Shelby SDK (Recommended)",id:"using-the-shelby-sdk-recommended",depth:3},{value:"Details",id:"details",depth:3}]}let o=(0,t.e)(function(s){let{toc:e=d(s)}=s,i={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",span:"span",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...s.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.h1,{children:"Shelby USD Sponsorship"}),"\n",(0,n.jsxs)(i.p,{children:[(0,n.jsx)(i.a,{href:"https://shelby.xyz",children:"Shelby"})," is a storage protocol that uses Aptos as its coordination layer. Certain Shelby operations, such as registering blobs, require payment in ShelbyUSD (in addition to the usual gas costs in APT). Normally, your users would need to hold and spend ShelbyUSD to perform these operations."]}),"\n",(0,n.jsx)(i.p,{children:"With ShelbyUSD sponsorship enabled, your gas station can cover these ShelbyUSD costs on behalf of your users, providing a smoother user experience where users donât need to hold any assets at all."}),"\n",(0,n.jsx)(i.h2,{id:e[0].id,children:e[0].value}),"\n",(0,n.jsxs)(i.ol,{children:["\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.strong,{children:"Standard Gas Sponsorship"}
1),": Your gas station pays APT gas fees for transactions."]}),"\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.strong,{children:"ShelbyUSD Sponsorship"}),": Your gas station additionally covers ShelbyUSD storage costs."]}),"\n"]}),"\n",(0,n.jsx)(i.p,{children:"When you enable ShelbyUSD sponsorship:"}),"\n",(0,n.jsxs)(i.ul,{children:["\n",(0,n.jsx)(i.li,{children:"The gas station fee payer account will be funded with ShelbyUSD in addition to APT."}),"\n",(0,n.jsxs)(i.li,{children:["Your users call Shelby functions with the ",(0,n.jsx)(i.code,{children:"_with_sponsor"})," suffix (the Shelby SDK handles this automatically)."]}),"\n",(0,n.jsx)(i.li,{children:"The gas station signs as both a fee payer (for APT gas) and a secondary signer (for ShelbyUSD sponsorship)."}),"\n"]}),"\n",(0,n.jsx)(i.h2,{id:e[1].id,children:e[1].value}),"\n",(0,n.jsx)(i.p,{children:"The option to enable ShelbyUSD sponsorship only appears when youâre configuring a gas station for the Shelby contract on shelbynet or testnet. When creating a gas station, input the contract address."}),"\n","\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.strong,{children:"Shelbynet"})}),"\n",(0,n.jsxs)(i.table,{children:[(0,n.jsx)(i.thead,{children:(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.th,{children:"Address Type"}),(0,n.jsx)(i.th,{children:"Address"})]})}),(0,n.jsxs)(i.tbody,{children:[(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:"Contract address"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"0x85fdb9a176ab8ef1d9d9c1b60d60b3924f0800ac1de1cc2085fb0b8bb4988e6a"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:"ShelbyUSD FA metadata address"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"0x1b18363a9f1fe5e6ebf247daba5cc1c18052bb232efdc4c50f556053922d98e1"})})]})]})]}),"\n",(0,n.jsx)(i.p,{children:(0,n.jsx)(i.strong,{children:"Testnet"})}),"\n",(0,n.jsxs)(i.table,{children:[(0,n.jsx)(i.thead,{children:(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.th,{children:"Address Type"}),(0,n.jsx)(i.th,{children:"Address"})]})}),(0,n.jsxs)(i.tbody,{children:[(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:"Contract address"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"0x85fdb9a176ab8ef1d9d9c1b60d60b3924f0800ac1de1cc2085fb0b8bb4988e6a"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:"ShelbyUSD FA metadata address"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"0x1b18363a9f1fe5e6ebf247daba5cc1c18052bb232efdc4c50f556053922d98e1"})})]})]})]}),"\n",(0,n.jsx)(i.p,{children:"Once you have created the gas station, record the fee payer address and API key."}),"\n",(0,n.jsx)(a.P,{type:"warning",children:(0,n.jsx)(i.p,{children:"ShelbyUSD sponsorship currently does not have built-in spending limits for ShelbyUSD itself. Any\nuser who submits a valid transaction matching your rules can consume ShelbyUSD from your fee payer\naccount. ShelbyUSD based limits (windowed and per txn) are on the roadmap."})}),"\n",(0,n.jsx)(i.h2,{id:e[2].id,children:e[2].value}),"\n",(0,n.jsx)(i.h3,{id:e[3].id,children:e[3].value}),"\n",(0,n.jsxs)(i.p,{children:["The ",(0,n.jsx)(i.a,{href:"https://www.npmjs.com/package/@shelby-protocol/sdk",children:(0,n.jsx)(i.code,{children:"@shelby-protocol/sdk"})})," has built-in support for ShelbyUSD sponsorship. When you pass ",(0,n.jsx)(i.code,{children:"usdSponsor"})," to the SDK, it automatically:"]}),"\n",(0,n.jsxs)(i.ol,{children:["\n",(0,n.jsxs)(i.li,{children:["Uses the ",(0,n.jsx)(i.code,{children:"_with_sponsor"})," variants of entry functions (e.g., ",(0,n.jsx)(i.code,{children:"register_blob_with_sponsor"})," instead of ",(0,n.jsx)(i.code,{children:"register_blob"}),")."]}),"\n",(0,n.jsx)(i.li,{children:"Includes your gas stationâs fee payer as a secondary signer in the transaction."}),"\n",(0,n.jsx)(i.li,{children:"Routes the transaction through the gas station for co-signing via the transaction submitter plugin."}),"\n"]}),"\n",(0,n.jsx)(i.p,{children:"Install the required packages:"}),"\n",(0,n.jsx)(i.pre,{icon:h.k3,tabIndex:"0","data-language":"bash","data-word-wrap":"","data-copy":"",children:(0,n.jsx)(i.code,{children:(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"pnpm"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" add"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" @shelby-protocol/sdk"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" @aptos-labs/gas-station-client"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:" @aptos-labs/ts-sdk"})]})})}),"\n",(0,n.jsx)(i.p,{children:"Set up the gas station client and Shelby blob client:"}),"\n",(0,n.jsx)(i.pre,{tabIndex:"0","data-language":"typescript","data-word-wrap":"","data-copy":"",children:(0,n.jsxs)(i.code,{children:[(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" { ShelbyBlobClient } "}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "@shelby-protocol/sdk"'}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" { GasStationClient, GasStationTransactionSubmitter } "}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "@aptos-labs/gas-station-client"'}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"import"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" { AccountAddress, Network } "}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"from"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:' "@aptos-labs/ts-sdk"'}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:";"})]}),"\n",(0,n.jsx)(i.span,{children:" "}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// 1. Create a gas station client with your API key."})}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" gasStationClient"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" new"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" GasStationClient"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"({"})]}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" network: Network."}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"SHELBYNET"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" apiKey: "}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"YOUR_GAS_STATION_API_KEY"'}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"});"})}),"\n",(0,n.jsx)(i.span,{children:" "}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// 2. Wrap it in a transaction submitter plugin."})}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" transactionSubmitter"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" new"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" GasStationTransactionSubmitter"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(gasStationClient);"})]}),"\n",(0,n.jsx)(i.span,{children:" "}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// 3. Create a ShelbyBlobClient with ShelbyUSD sponsorship enabled."})}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"const"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" blobClient"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" ="}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" new"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" ShelbyBlobClient"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("})]}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" network: Network."}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"SHELBYNET"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" aptos: {"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" pluginSettings: {"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" TRANSACTION_SUBMITTER: transactionSubmitter,"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" },"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" },"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" },"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" {"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" // The feePayerAddress is your gas station's fee payer, which you can find on the"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:" // gas station overview page."})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" usdSponsor: {"})}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" feePayerAddress: AccountAddress."}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"from"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"0x<your-fee-payer-address>"'}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"),"})]}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" },"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" },"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:");"})})]})}),"\n",(0,n.jsx)(i.p,{children:"From here, all blob operations automatically use the sponsored variants:"}),"\n",(0,n.jsx)(i.pre,{tabIndex:"0","data-language":"typescript","data-word-wrap":"","data-copy":"",children:(0,n.jsxs)(i.code,{children:[(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// The SDK calls register_blob_with_sponsor under the hood and routes"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#6A737D","--shiki-dark":"#6A737D"},children:"// the transaction through the gas station for co-signing."})}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"await"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" blobClient."}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"upload"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"({"})]}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" blobData: myData,"})}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" signer: userAccount,"})}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" blobName: "}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},children:'"example.txt"'}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,n.jsxs)(i.span,{children:[(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" expirationMicros: Date."}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:"now"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}
1,children:"() "}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"*"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" 1000"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:" +"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:" 86400_000_000"}),(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:","})]}),"\n",(0,n.jsx)(i.span,{children:(0,n.jsx)(i.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"});"})})]})}),"\n",(0,n.jsx)(i.h3,{id:e[4].id,children:e[4].value}),"\n",(0,n.jsxs)(i.p,{children:["When ShelbyUSD sponsorship is enabled, additional functions become available that end with ",(0,n.jsx)(i.code,{children:"_with_sponsor"}),". These are special variants that allow the gas station to authorize ShelbyUSD payments on behalf of the user."]}),"\n",(0,n.jsx)(i.p,{children:"For example:"}),"\n",(0,n.jsxs)(i.ul,{children:["\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.code,{children:"register_blob"})," â ",(0,n.jsx)(i.code,{children:"register_blob_with_sponsor"})]}),"\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.code,{children:"register_multiple_blobs"})," â ",(0,n.jsx)(i.code,{children:"register_multiple_blobs_with_sponsor"})]}),"\n",(0,n.jsxs)(i.li,{children:[(0,n.jsx)(i.code,{children:"increase_expiration_time"})," â ",(0,n.jsx)(i.code,{children:"increase_expiration_time_with_sponsor"})]}),"\n"]}),"\n",(0,n.jsx)(i.p,{children:"You can use both types of sponsorship simultaneously so your users donât need to hold any tokens at all."}),"\n",(0,n.jsxs)(i.table,{children:[(0,n.jsx)(i.thead,{children:(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.th,{}),(0,n.jsx)(i.th,{children:(0,n.jsx)(i.strong,{children:"APT Sponsorship"})}),(0,n.jsx)(i.th,{children:(0,n.jsx)(i.strong,{children:"ShelbyUSD Sponsorship"})})]})}),(0,n.jsxs)(i.tbody,{children:[(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:"What it pays"}),(0,n.jsx)(i.td,{children:"Gas fees (APT)"}),(0,n.jsx)(i.td,{children:"Storage fees (ShelbyUSD)"})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:"How to enable"}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"build: { withFeePayer: true }"})}),(0,n.jsx)(i.td,{children:(0,n.jsx)(i.code,{children:"usdSponsor: { feePayerAddress }"})})]}),(0,n.jsxs)(i.tr,{children:[(0,n.jsx)(i.td,{children:"Entry functions used"}),(0,n.jsxs)(i.td,{children:["Standard (",(0,n.jsx)(i.code,{children:"register_blob"}),")"]}),(0,n.jsxs)(i.td,{children:[(0,n.jsx)(i.code,{children:"_with_sponsor"})," variants"]})]})]})]}),"\n",(0,n.jsx)(i.p,{children:"When both are enabled, the gas station signs as both the fee payer (for APT gas) and a secondary signer (for costs in ShelbyUSD)."})]})},"/docs/gas-stations/shelby",{filePath:"src/pages/docs/gas-stations/shelby.mdx",pageMap:r.O,frontMatter:{},title:"Shelby USD Sponsorship"},"undefined"==typeof RemoteContent?d:RemoteContent.useTOC)},90514:(s,e,i)=>{"use strict";i.d(e,{P:()=>h});var n=i(23798),t=i(71623),r=i(86534);let l={default:"\uD83D\uDCA1",error:"\uD83D\uDEAB",info:(0,n.jsx)(r.KS,{className:"_mt-1"}),warning:"â ï¸"},a={default:(0,t.A)("_border-orange-100 _bg-orange-50 _text-orange-800 dark:_border-orange-400/30 dark:_bg-orange-400/20 dark:_text-orange-300"),error:(0,t.A)("_border-red-200 _bg-red-100 _text-red-900 dark:_border-red-200/30 dark:_bg-red-900/30 dark:_text-red-200"),info:(0,t.A)("_border-blue-200 _bg-blue-100 _text-blue-900 dark:_border-blue-200/30 dark:_bg-blue-900/30 dark:_text-blue-200"),warning:(0,t.A)("_border-yellow-100 _bg-yellow-50 _text-yellow-900 dark:_border-yellow-200/30 dark:_bg-yellow-700/30 dark:_text-yellow-200")};function h({children:s,type:e="default",emoji:i=l[e]}){return(0,n.jsxs)("div",{className:(0,t.A)("nextra-callout _overflow-x-auto _mt-6 _flex _rounded-lg _border _py-2 ltr:_pr-4 rtl:_pl-4","contrast-more:_border-current contrast-more:dark:_border-current",a[e]),children:[(0,n.jsx)("div",{className:"_select-none _text-xl ltr:_pl-3 ltr:_pr-2 rtl:_pr-3 rtl:_pl-2",style:{fontFamily:'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},children:i}),(0,n.jsx)("div",{className:"_w-full _min-w-0 _leading-7",children:s})]})}}},s=>{s.O(0,[636,6593,8792],()=>s(s.s=44405)),_N_E=s.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.