ani-ads-sdk 1.0.4 → 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.
Files changed (2) hide show
  1. package/README.md +17 -7
  2. 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
- creator_code="YOUR_APP_CREATOR_CODE"
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
- - `creator_code` (string, required): Your unique mini app creator code from the Ani Ads platform
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 code from the Ani Ads platform
49
+ - A creator wallet address and app name registered on the Ani Ads platform
46
50
 
47
51
  ## Example
48
52
 
@@ -52,18 +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
- creator_code="ABC123XY"
66
+ creator_wallet={creatorWallet}
67
+ app_name={appName}
61
68
  user_wallet_address={userWallet}
62
- onAdClick={(adId, url) => {
63
- console.log(`Ad ${adId} clicked, opening ${url}`)
64
- }}
65
69
  />
66
70
  </div>
67
71
  )
68
72
  }
69
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": "1.0.4",
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
- "tsup": "^8.0.0",
27
- "typescript": "^5"
28
- },
29
- "peerDependencies": {
30
- "react": "^18.0.0 || ^19.0.0",
31
- "react-dom": "^18.0.0 || ^19.0.0"
32
- },
33
- "dependencies": {
34
- "react": "^19.2.0",
35
- "react-dom": "^19.2.0"
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
+ }