@xshare-402/sdk
v0.0.3
Published
x402 communication protocol to place bids on a decentralized ads network running on X
Downloads
10
Readme
xShare-402 SDK
A lightweight SDK to interact with the xShare402's Ad Network on Solana.
It allows anyone to create, list, bid, and delete ads directly from JavaScript, by calling an x402 server.
Installation
npm install @xshare-402/sdkMethods
myAds({ loadMetadatas?: boolean })
Fetches all ads owned by the connected wallet. Optionally loads full metadata for each ad.
createAd({ metadata })
Creates a new ad on-chain, with attached metadata hosted on Arweave or any other data gateway.
deleteAd({ ad })
Deletes an existing ad owned by the wallet.
billboards({ currency?: string | null })
Lists all available billboard spaces where ads can be placed.
bidOnBillboard({ billboard, ad, budget, maxViewsPerDay })
Places a bid for a specific ad on a selected billboard.
