@nektarlabs/adsterix-widget 1.0.1

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 (3) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +63 -0
  3. package/package.json +48 -0
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2025 Nektar Labs SRL
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @nektarlabs/adsterix-widget
2
+
3
+ A React component that lets you embed Adsterix ads anywhere in your app.
4
+
5
+ Adsterix is a platform that lets creators monetize their visibility on Farcaster, built on Base (the chain for
6
+ creators). Creating an ad is as simple as posting a cast via the Adsterix miniapp: this generates an **ad-cast**, a
7
+ Farcaster cast with an embed whose image and link automatically update based on auction results. Ads are split into
8
+ time-based slots, and the winning bidder controls that slot’s call-to-action.
9
+
10
+ Brands and users simply browse an ad, bid for a slot, upload their creative (image + link), and they’re live.
11
+
12
+ If you’re a creator, a miniapp builder, or you want to monetize your product’s surface area (feeds, widgets, overlays,
13
+ dashboards, etc.), you can drop this component into your app and start earning from Adsterix ads on day one.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @nektarlabs/adsterix-widget
19
+ ```
20
+
21
+ or
22
+
23
+ ```bash
24
+ yarn add @nektarlabs/adsterix-widget
25
+ ```
26
+
27
+ or
28
+
29
+ ```bash
30
+ pnpm add @nektarlabs/adsterix-widget
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ```tsx
36
+ import { AdsterixWidget } from "@nektarlabs/adsterix-widget"
37
+
38
+ function App() {
39
+ return <AdsterixWidget castHash="0xbf59074b94c5fd1c6b3ee1a7201708da3f60998f" />
40
+ }
41
+ ```
42
+
43
+ ## Getting a Cast Hash
44
+
45
+ To display an ad, you need a cast hash of the corresponding Farcaster cast. Follow these steps:
46
+
47
+ 1. Create an ad using the Adsterix miniapp:
48
+ [https://farcaster.xyz/miniapps/nOlHtdHWXJ6H/adsterix](https://farcaster.xyz/miniapps/nOlHtdHWXJ6H/adsterix)
49
+ 2. Navigate to your ad's cast on Farcaster
50
+ 3. Click the three dots (⋮) in the top right corner of the cast
51
+ 4. Select "Copy cast hash"
52
+ 5. Use the copied hash as the `castHash` prop
53
+
54
+ ## Props
55
+
56
+ | Prop | Type | Default | Description |
57
+ | ---------- | ------------ | ------- | -------------------------------------------- |
58
+ | `castHash` | `string` | — | The Farcaster cast hash of the ad to display |
59
+ | `onClose` | `() => void` | — | Callback fired when the user closes the ad |
60
+
61
+ ## License
62
+
63
+ MIT © [Nektar Labs](https://nektarlabs.com)
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@nektarlabs/adsterix-widget",
3
+ "version": "1.0.1",
4
+ "private": false,
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/nektarlabs/adsterix-widget.git"
8
+ },
9
+ "main": "./dist/index.mjs",
10
+ "module": "./dist/index.mjs",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.mjs"
16
+ }
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsup",
23
+ "clean": "rm -rf dist",
24
+ "dev": "tsup --watch",
25
+ "format": "prettier --config ./.prettierrc --write \"./**/*.{ts,tsx,json,md}\"",
26
+ "semantic-release": "semantic-release"
27
+ },
28
+ "peerDependencies": {
29
+ "react": "^19.2.0",
30
+ "react-dom": "^19.2.0"
31
+ },
32
+ "devDependencies": {
33
+ "@semantic-release/changelog": "^6.0.3",
34
+ "@semantic-release/git": "^10.0.1",
35
+ "@types/react": "^19.2.0",
36
+ "@types/react-dom": "^19.2.0",
37
+ "semantic-release": "^25.0.2",
38
+ "tsup": "^8.0.0",
39
+ "typescript": "^5.0.0"
40
+ },
41
+ "dependencies": {
42
+ "framer-motion": "^12.23.24",
43
+ "lucide-react": "^0.554.0"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ }
48
+ }