ani-ads-sdk 1.0.5 → 2.0.0
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 +17 -4
- package/package.json +38 -37
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@ import { AniAds } from 'ani-ads-sdk'
|
|
|
18
18
|
function MyApp() {
|
|
19
19
|
return (
|
|
20
20
|
<AniAds
|
|
21
|
-
|
|
21
|
+
creator_wallet="0x..."
|
|
22
|
+
app_name="My App Name"
|
|
22
23
|
user_wallet_address="0x..."
|
|
23
24
|
/>
|
|
24
25
|
)
|
|
@@ -27,8 +28,11 @@ function MyApp() {
|
|
|
27
28
|
|
|
28
29
|
## Props
|
|
29
30
|
|
|
30
|
-
- `
|
|
31
|
+
- `creator_wallet` (string, required): Your creator wallet address registered on the Ani Ads platform
|
|
32
|
+
- `app_name` (string, required): The exact app name as registered on the Ani Ads platform
|
|
31
33
|
- `user_wallet_address` (string, required): The wallet address of the current user viewing your app
|
|
34
|
+
- `api_url` (string, optional): Custom API URL (defaults to production)
|
|
35
|
+
- `onAdClick` (function, optional): Callback when an ad is clicked
|
|
32
36
|
|
|
33
37
|
## How It Works
|
|
34
38
|
|
|
@@ -42,7 +46,7 @@ function MyApp() {
|
|
|
42
46
|
## Requirements
|
|
43
47
|
|
|
44
48
|
- React 18+ or React 19+
|
|
45
|
-
- A creator
|
|
49
|
+
- A creator wallet address and app name registered on the Ani Ads platform
|
|
46
50
|
|
|
47
51
|
## Example
|
|
48
52
|
|
|
@@ -52,15 +56,24 @@ import { AniAds } from 'ani-ads-sdk'
|
|
|
52
56
|
|
|
53
57
|
function MyMiniApp() {
|
|
54
58
|
const userWallet = "0x1234..." // Get from your wallet connection
|
|
59
|
+
const creatorWallet = "0x5678..." // Your creator wallet address
|
|
60
|
+
const appName = "My Mini App" // Exact name as registered on Ani Ads platform
|
|
55
61
|
|
|
56
62
|
return (
|
|
57
63
|
<div>
|
|
58
64
|
<h1>My Mini App</h1>
|
|
59
65
|
<AniAds
|
|
60
|
-
|
|
66
|
+
creator_wallet={creatorWallet}
|
|
67
|
+
app_name={appName}
|
|
61
68
|
user_wallet_address={userWallet}
|
|
62
69
|
/>
|
|
63
70
|
</div>
|
|
64
71
|
)
|
|
65
72
|
}
|
|
66
73
|
```
|
|
74
|
+
|
|
75
|
+
## Breaking Changes (v2.0.0)
|
|
76
|
+
|
|
77
|
+
- **Removed**: `creator_code` prop
|
|
78
|
+
- **Added**: `creator_wallet` and `app_name` props
|
|
79
|
+
- The SDK now uses wallet addresses and app names instead of creator codes for better security and flexibility
|
package/package.json
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ani-ads-sdk",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Ani Ads SDK for Mini App Creators to display ads in their apps",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.esm.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "tsup",
|
|
13
|
-
"dev": "tsup --watch"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"ads",
|
|
17
|
-
"worldchain",
|
|
18
|
-
"world-app",
|
|
19
|
-
"mini-app"
|
|
20
|
-
],
|
|
21
|
-
"author": "",
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@types/react": "^19",
|
|
25
|
-
"@types/react-dom": "^19",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"react
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"react
|
|
36
|
-
|
|
37
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ani-ads-sdk",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Ani Ads SDK for Mini App Creators to display ads in their apps",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsup",
|
|
13
|
+
"dev": "tsup --watch"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"ads",
|
|
17
|
+
"worldchain",
|
|
18
|
+
"world-app",
|
|
19
|
+
"mini-app"
|
|
20
|
+
],
|
|
21
|
+
"author": "",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react": "^19",
|
|
25
|
+
"@types/react-dom": "^19",
|
|
26
|
+
"eruda": "^3.4.3",
|
|
27
|
+
"tsup": "^8.0.0",
|
|
28
|
+
"typescript": "^5"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
32
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"react": "^19.2.0",
|
|
36
|
+
"react-dom": "^19.2.0"
|
|
37
|
+
}
|
|
38
|
+
}
|