Skip to content

IO-AtelierTech/adx402-npmsdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adx402 SDK

Vanilla JavaScript SDK for frictionless, on-chain advertising via Adx402

npm MIT License

Adx402 SDK enables web publishers to embed dynamic, rewarded ads powered by the Adx402 protocol. Built on Solana + x402 without requiring users to create accounts or wallets.


Features

  • Lightweight, framework-agnostic (Vanilla JS)
  • Configurable ad targeting (tags, aspect ratio)
  • No cookies or signups, wallet as identity
  • Impression and click tracking with fraud protection

Installation

npm install @ateliertech/adx402-sdk

Or include directly in a webpage:

<script src="https://unpkg.com/@ateliertech/adx402-sdk/dist/adx402.umd.js"></script>

Usage

<div id="adx-slot"></div>

<script type="module">
  import { adx402 } from '@ateliertech/adx402-sdk';

  adx402.init({
    wallet: 'F1a2b3...c9D0',           // Publisher wallet
    tags: ['tech', 'gaming']           // Optional targeting tags
  });

  adx402.render('#adx-slot', {
    aspectRatio: '16x9',                // Optional (defaults to '16x9')
    fallback: '/img/ad-placeholder.png' // Optional fallback image
  });
</script>

The render() call fetches a matched ad from the backend, displays it as an image, and tracks verified impressions and clicks.

Development

npm install
npm run dev      # Start local dev
npm run build    # Compile for production

License

MIT © IO AtelierTech

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors