ani-ads-sdk 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Ani Ads SDK
|
|
1
|
+
# Ani Ads SDK - Implementation Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A simple guide for integrating Ani Ads into your Mini App.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -18,10 +18,8 @@ import { AniAds } from 'ani-ads-sdk'
|
|
|
18
18
|
function MyApp() {
|
|
19
19
|
return (
|
|
20
20
|
<AniAds
|
|
21
|
-
creator_code="
|
|
22
|
-
user_wallet_address="0x..."
|
|
23
|
-
api_url="https://ani-ads.vercel.app" // Optional
|
|
24
|
-
onAdClick={(adId, url) => console.log('Ad clicked:', adId, url)} // Optional
|
|
21
|
+
creator_code="YOUR_APP_CREATOR_CODE"
|
|
22
|
+
user_wallet_address="0x..."
|
|
25
23
|
/>
|
|
26
24
|
)
|
|
27
25
|
}
|
|
@@ -29,26 +27,17 @@ function MyApp() {
|
|
|
29
27
|
|
|
30
28
|
## Props
|
|
31
29
|
|
|
32
|
-
- `creator_code` (string, required): Your unique creator code from the Ani Ads platform
|
|
30
|
+
- `creator_code` (string, required): Your unique mini app creator code from the Ani Ads platform
|
|
33
31
|
- `user_wallet_address` (string, required): The wallet address of the current user viewing your app
|
|
34
|
-
- `api_url` (string, optional): API URL (defaults to production URL)
|
|
35
|
-
- `onAdClick` (function, optional): Callback function when an ad is clicked
|
|
36
|
-
|
|
37
|
-
## Ad Format
|
|
38
|
-
|
|
39
|
-
All ads are displayed in a **380x90px banner format**. The SDK automatically handles image loading and display.
|
|
40
32
|
|
|
41
33
|
## How It Works
|
|
42
34
|
|
|
43
|
-
The SDK
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- Unique user tracking (handled automatically)
|
|
50
|
-
- Payment processing (handled automatically)
|
|
51
|
-
- Ad rotation (handled automatically)
|
|
35
|
+
1. The SDK automatically fetches available ads from the Ani Ads API
|
|
36
|
+
2. Ads are displayed in a 380x90px banner format
|
|
37
|
+
3. When a user clicks an ad:
|
|
38
|
+
- The click is tracked
|
|
39
|
+
- Claim your Payment on Ani Ads Platform
|
|
40
|
+
- The destination URL opens in a new tab
|
|
52
41
|
|
|
53
42
|
## Requirements
|
|
54
43
|
|