@agg-build/auth 1.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/dist/siws.js ADDED
@@ -0,0 +1,219 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __export = (target, all) => {
23
+ for (var name in all)
24
+ __defProp(target, name, { get: all[name], enumerable: true });
25
+ };
26
+ var __copyProps = (to, from, except, desc) => {
27
+ if (from && typeof from === "object" || typeof from === "function") {
28
+ for (let key of __getOwnPropNames(from))
29
+ if (!__hasOwnProp.call(to, key) && key !== except)
30
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
31
+ }
32
+ return to;
33
+ };
34
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
35
+ // If the importer is in node compatibility mode or this is not an ESM
36
+ // file that has been converted to a CommonJS file using a Babel-
37
+ // compatible transform (i.e. "__esModule" has not been set), then set
38
+ // "default" to the CommonJS "module.exports" for node compatibility.
39
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
40
+ mod
41
+ ));
42
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
43
+ var __async = (__this, __arguments, generator) => {
44
+ return new Promise((resolve, reject) => {
45
+ var fulfilled = (value) => {
46
+ try {
47
+ step(generator.next(value));
48
+ } catch (e) {
49
+ reject(e);
50
+ }
51
+ };
52
+ var rejected = (value) => {
53
+ try {
54
+ step(generator.throw(value));
55
+ } catch (e) {
56
+ reject(e);
57
+ }
58
+ };
59
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
60
+ step((generator = generator.apply(__this, __arguments)).next());
61
+ });
62
+ };
63
+
64
+ // src/siws/index.tsx
65
+ var siws_exports = {};
66
+ __export(siws_exports, {
67
+ useSiwsAuthMethod: () => useSiwsAuthMethod
68
+ });
69
+ module.exports = __toCommonJS(siws_exports);
70
+ var import_react2 = require("react");
71
+
72
+ // src/siws/siws.utils.ts
73
+ var import_bs58 = __toESM(require("bs58"));
74
+ var createSiwsMessageSigner = (signMessage) => {
75
+ return (message) => __async(null, null, function* () {
76
+ const signedBytes = yield signMessage(new TextEncoder().encode(message));
77
+ return import_bs58.default.encode(signedBytes);
78
+ });
79
+ };
80
+
81
+ // src/siws/use-safe-wallet.ts
82
+ var import_react = require("react");
83
+ var import_wallet_adapter_react = require("@solana/wallet-adapter-react");
84
+ var EMPTY_WALLETS = [];
85
+ var noopConnect = () => __async(null, null, function* () {
86
+ });
87
+ var noopDisconnect = () => __async(null, null, function* () {
88
+ });
89
+ var hasWarned = false;
90
+ var warnMissingProvider = () => {
91
+ if (hasWarned) return;
92
+ hasWarned = true;
93
+ console.warn(
94
+ "[agg/auth] useSiwsAuthMethod: No Solana WalletProvider detected. SIWS auth will be unavailable. Wrap your app in a WalletProvider to enable Solana sign-in."
95
+ );
96
+ };
97
+ var FALLBACK = {
98
+ available: false,
99
+ connect: noopConnect,
100
+ connected: false,
101
+ disconnect: noopDisconnect,
102
+ publicKey: null,
103
+ select: void 0,
104
+ signMessage: void 0,
105
+ wallet: null,
106
+ wallets: EMPTY_WALLETS
107
+ };
108
+ var useSafeWallet = () => {
109
+ let walletState = null;
110
+ try {
111
+ walletState = (0, import_wallet_adapter_react.useWallet)();
112
+ } catch (e) {
113
+ warnMissingProvider();
114
+ }
115
+ return (0, import_react.useMemo)(() => {
116
+ if (!walletState) return FALLBACK;
117
+ return __spreadValues({ available: true }, walletState);
118
+ }, [walletState]);
119
+ };
120
+
121
+ // src/siws/index.tsx
122
+ var getPreferredWallet = (wallets) => {
123
+ var _a, _b;
124
+ return (_b = (_a = wallets.find((candidate) => candidate.readyState === "Installed")) != null ? _a : wallets.find((candidate) => candidate.readyState === "Loadable")) != null ? _b : wallets[0];
125
+ };
126
+ var useSiwsAuthMethod = (options = {}) => {
127
+ const {
128
+ available,
129
+ connect,
130
+ connected,
131
+ disconnect,
132
+ publicKey,
133
+ select,
134
+ signMessage,
135
+ wallet,
136
+ wallets
137
+ } = useSafeWallet();
138
+ return (0, import_react2.useMemo)(() => {
139
+ var _a, _b, _c, _d;
140
+ if (!available) {
141
+ return {
142
+ id: "siws",
143
+ kind: "wallet",
144
+ chain: "solana",
145
+ label: (_a = options.label) != null ? _a : "Solana",
146
+ description: (_b = options.description) != null ? _b : "Connect and sign in with your Solana wallet.",
147
+ iconName: "solana",
148
+ isAvailable: false,
149
+ start: () => __async(null, null, function* () {
150
+ throw new Error(
151
+ "Solana WalletProvider is not configured. Wrap your app in a ConnectionProvider and WalletProvider to enable SIWS."
152
+ );
153
+ }),
154
+ disconnect: () => __async(null, null, function* () {
155
+ })
156
+ };
157
+ }
158
+ const preferredWallet = getPreferredWallet(wallets);
159
+ const isWalletAvailable = connected || Boolean(preferredWallet);
160
+ return {
161
+ id: "siws",
162
+ kind: "wallet",
163
+ chain: "solana",
164
+ label: (_c = options.label) != null ? _c : "Solana",
165
+ description: (_d = options.description) != null ? _d : "Connect and sign in with your Solana wallet.",
166
+ iconName: "solana",
167
+ isAvailable: isWalletAvailable,
168
+ start: (_0) => __async(null, [_0], function* ({ signIn }) {
169
+ var _a2, _b2, _c2, _d2;
170
+ const resolvedWalletAdapter = (_a2 = wallet == null ? void 0 : wallet.adapter) != null ? _a2 : preferredWallet == null ? void 0 : preferredWallet.adapter;
171
+ if (!resolvedWalletAdapter) {
172
+ throw new Error("No Solana wallet adapter is configured");
173
+ }
174
+ if (!((_b2 = wallet == null ? void 0 : wallet.adapter) == null ? void 0 : _b2.name) && resolvedWalletAdapter.name && select) {
175
+ select(resolvedWalletAdapter.name);
176
+ }
177
+ if (!connected) {
178
+ yield connect();
179
+ }
180
+ const resolvedPublicKey = (_c2 = publicKey != null ? publicKey : resolvedWalletAdapter == null ? void 0 : resolvedWalletAdapter.publicKey) != null ? _c2 : null;
181
+ const resolvedSignMessage = signMessage != null ? signMessage : "signMessage" in resolvedWalletAdapter && typeof resolvedWalletAdapter.signMessage === "function" ? resolvedWalletAdapter.signMessage.bind(resolvedWalletAdapter) : void 0;
182
+ if (!resolvedPublicKey) {
183
+ throw new Error("Solana wallet address is unavailable");
184
+ }
185
+ if (!resolvedSignMessage) {
186
+ throw new Error("Solana wallet does not support message signing");
187
+ }
188
+ yield signIn({
189
+ address: resolvedPublicKey.toBase58(),
190
+ chain: "solana",
191
+ chainId: (_d2 = options.cluster) != null ? _d2 : "mainnet",
192
+ signMessage: createSiwsMessageSigner(resolvedSignMessage),
193
+ statement: options.statement
194
+ });
195
+ }),
196
+ disconnect: () => __async(null, null, function* () {
197
+ yield disconnect();
198
+ })
199
+ };
200
+ }, [
201
+ available,
202
+ connect,
203
+ connected,
204
+ disconnect,
205
+ options.cluster,
206
+ options.description,
207
+ options.label,
208
+ options.statement,
209
+ publicKey,
210
+ select,
211
+ signMessage,
212
+ wallet,
213
+ wallets
214
+ ]);
215
+ };
216
+ // Annotate the CommonJS export names for ESM import in node:
217
+ 0 && (module.exports = {
218
+ useSiwsAuthMethod
219
+ });
package/dist/siws.mjs ADDED
@@ -0,0 +1,155 @@
1
+ import {
2
+ __async,
3
+ __spreadValues
4
+ } from "./chunk-AXBFBHS2.mjs";
5
+
6
+ // src/siws/index.tsx
7
+ import { useMemo as useMemo2 } from "react";
8
+
9
+ // src/siws/siws.utils.ts
10
+ import bs58 from "bs58";
11
+ var createSiwsMessageSigner = (signMessage) => {
12
+ return (message) => __async(null, null, function* () {
13
+ const signedBytes = yield signMessage(new TextEncoder().encode(message));
14
+ return bs58.encode(signedBytes);
15
+ });
16
+ };
17
+
18
+ // src/siws/use-safe-wallet.ts
19
+ import { useMemo } from "react";
20
+ import { useWallet } from "@solana/wallet-adapter-react";
21
+ var EMPTY_WALLETS = [];
22
+ var noopConnect = () => __async(null, null, function* () {
23
+ });
24
+ var noopDisconnect = () => __async(null, null, function* () {
25
+ });
26
+ var hasWarned = false;
27
+ var warnMissingProvider = () => {
28
+ if (hasWarned) return;
29
+ hasWarned = true;
30
+ console.warn(
31
+ "[agg/auth] useSiwsAuthMethod: No Solana WalletProvider detected. SIWS auth will be unavailable. Wrap your app in a WalletProvider to enable Solana sign-in."
32
+ );
33
+ };
34
+ var FALLBACK = {
35
+ available: false,
36
+ connect: noopConnect,
37
+ connected: false,
38
+ disconnect: noopDisconnect,
39
+ publicKey: null,
40
+ select: void 0,
41
+ signMessage: void 0,
42
+ wallet: null,
43
+ wallets: EMPTY_WALLETS
44
+ };
45
+ var useSafeWallet = () => {
46
+ let walletState = null;
47
+ try {
48
+ walletState = useWallet();
49
+ } catch (e) {
50
+ warnMissingProvider();
51
+ }
52
+ return useMemo(() => {
53
+ if (!walletState) return FALLBACK;
54
+ return __spreadValues({ available: true }, walletState);
55
+ }, [walletState]);
56
+ };
57
+
58
+ // src/siws/index.tsx
59
+ var getPreferredWallet = (wallets) => {
60
+ var _a, _b;
61
+ return (_b = (_a = wallets.find((candidate) => candidate.readyState === "Installed")) != null ? _a : wallets.find((candidate) => candidate.readyState === "Loadable")) != null ? _b : wallets[0];
62
+ };
63
+ var useSiwsAuthMethod = (options = {}) => {
64
+ const {
65
+ available,
66
+ connect,
67
+ connected,
68
+ disconnect,
69
+ publicKey,
70
+ select,
71
+ signMessage,
72
+ wallet,
73
+ wallets
74
+ } = useSafeWallet();
75
+ return useMemo2(() => {
76
+ var _a, _b, _c, _d;
77
+ if (!available) {
78
+ return {
79
+ id: "siws",
80
+ kind: "wallet",
81
+ chain: "solana",
82
+ label: (_a = options.label) != null ? _a : "Solana",
83
+ description: (_b = options.description) != null ? _b : "Connect and sign in with your Solana wallet.",
84
+ iconName: "solana",
85
+ isAvailable: false,
86
+ start: () => __async(null, null, function* () {
87
+ throw new Error(
88
+ "Solana WalletProvider is not configured. Wrap your app in a ConnectionProvider and WalletProvider to enable SIWS."
89
+ );
90
+ }),
91
+ disconnect: () => __async(null, null, function* () {
92
+ })
93
+ };
94
+ }
95
+ const preferredWallet = getPreferredWallet(wallets);
96
+ const isWalletAvailable = connected || Boolean(preferredWallet);
97
+ return {
98
+ id: "siws",
99
+ kind: "wallet",
100
+ chain: "solana",
101
+ label: (_c = options.label) != null ? _c : "Solana",
102
+ description: (_d = options.description) != null ? _d : "Connect and sign in with your Solana wallet.",
103
+ iconName: "solana",
104
+ isAvailable: isWalletAvailable,
105
+ start: (_0) => __async(null, [_0], function* ({ signIn }) {
106
+ var _a2, _b2, _c2, _d2;
107
+ const resolvedWalletAdapter = (_a2 = wallet == null ? void 0 : wallet.adapter) != null ? _a2 : preferredWallet == null ? void 0 : preferredWallet.adapter;
108
+ if (!resolvedWalletAdapter) {
109
+ throw new Error("No Solana wallet adapter is configured");
110
+ }
111
+ if (!((_b2 = wallet == null ? void 0 : wallet.adapter) == null ? void 0 : _b2.name) && resolvedWalletAdapter.name && select) {
112
+ select(resolvedWalletAdapter.name);
113
+ }
114
+ if (!connected) {
115
+ yield connect();
116
+ }
117
+ const resolvedPublicKey = (_c2 = publicKey != null ? publicKey : resolvedWalletAdapter == null ? void 0 : resolvedWalletAdapter.publicKey) != null ? _c2 : null;
118
+ const resolvedSignMessage = signMessage != null ? signMessage : "signMessage" in resolvedWalletAdapter && typeof resolvedWalletAdapter.signMessage === "function" ? resolvedWalletAdapter.signMessage.bind(resolvedWalletAdapter) : void 0;
119
+ if (!resolvedPublicKey) {
120
+ throw new Error("Solana wallet address is unavailable");
121
+ }
122
+ if (!resolvedSignMessage) {
123
+ throw new Error("Solana wallet does not support message signing");
124
+ }
125
+ yield signIn({
126
+ address: resolvedPublicKey.toBase58(),
127
+ chain: "solana",
128
+ chainId: (_d2 = options.cluster) != null ? _d2 : "mainnet",
129
+ signMessage: createSiwsMessageSigner(resolvedSignMessage),
130
+ statement: options.statement
131
+ });
132
+ }),
133
+ disconnect: () => __async(null, null, function* () {
134
+ yield disconnect();
135
+ })
136
+ };
137
+ }, [
138
+ available,
139
+ connect,
140
+ connected,
141
+ disconnect,
142
+ options.cluster,
143
+ options.description,
144
+ options.label,
145
+ options.statement,
146
+ publicKey,
147
+ select,
148
+ signMessage,
149
+ wallet,
150
+ wallets
151
+ ]);
152
+ };
153
+ export {
154
+ useSiwsAuthMethod
155
+ };
@@ -0,0 +1,60 @@
1
+ import { AggAuthContextValue } from '@agg-build/hooks';
2
+ import { IconName } from '@agg-build/ui';
3
+ import { ReactNode } from 'react';
4
+
5
+ type AuthMethodId = "siwe" | "siws" | "google" | "twitter" | "apple" | "email";
6
+ type AuthMethodKind = "email" | "social" | "wallet";
7
+ type AuthMethodChain = "ethereum" | "solana";
8
+ type AuthMethodInputValue = {
9
+ email?: string;
10
+ };
11
+ type AuthMethodInputDefinition = {
12
+ type: "email";
13
+ placeholder?: string;
14
+ submitLabel?: string;
15
+ helperText?: string;
16
+ } | undefined;
17
+ type AuthMethodStartResult = {
18
+ notice?: string;
19
+ } | void;
20
+ interface AuthMethodStartContext {
21
+ signIn: AggAuthContextValue["signIn"];
22
+ startAuth: AggAuthContextValue["startAuth"];
23
+ setSession: AggAuthContextValue["setSession"];
24
+ }
25
+ interface AuthMethodAdapter {
26
+ id: AuthMethodId;
27
+ kind: AuthMethodKind;
28
+ label: string;
29
+ description: string;
30
+ iconName?: IconName;
31
+ chain?: AuthMethodChain;
32
+ input?: AuthMethodInputDefinition;
33
+ isAvailable: boolean;
34
+ start: (context: AuthMethodStartContext, input?: AuthMethodInputValue) => Promise<AuthMethodStartResult>;
35
+ disconnect?: () => Promise<void>;
36
+ }
37
+ interface AggAuthProviderProps {
38
+ autoHandleAuthCallback?: boolean;
39
+ children: ReactNode;
40
+ methods: readonly AuthMethodAdapter[];
41
+ }
42
+ interface AggAuthFlowContextValue {
43
+ activeMethodId: AuthMethodId | null;
44
+ availableMethods: readonly AuthMethodAdapter[];
45
+ challengeSiteKey: string | null;
46
+ configuredMethods: readonly AuthMethodAdapter[];
47
+ error: Error | null;
48
+ isBusy: boolean;
49
+ notice: string | null;
50
+ onChallengeError: () => void;
51
+ onChallengeVerify: (token: string) => void;
52
+ selectedMethodId: AuthMethodId | null;
53
+ startMethod: (methodId: AuthMethodId, input?: AuthMethodInputValue) => Promise<{
54
+ challengePending?: boolean;
55
+ }>;
56
+ clearFeedback: () => void;
57
+ signOut: () => Promise<void>;
58
+ }
59
+
60
+ export type { AggAuthProviderProps as A, AggAuthFlowContextValue as a, AuthMethodAdapter as b, AuthMethodId as c, AuthMethodInputDefinition as d, AuthMethodInputValue as e, AuthMethodStartContext as f, AuthMethodStartResult as g };
@@ -0,0 +1,60 @@
1
+ import { AggAuthContextValue } from '@agg-build/hooks';
2
+ import { IconName } from '@agg-build/ui';
3
+ import { ReactNode } from 'react';
4
+
5
+ type AuthMethodId = "siwe" | "siws" | "google" | "twitter" | "apple" | "email";
6
+ type AuthMethodKind = "email" | "social" | "wallet";
7
+ type AuthMethodChain = "ethereum" | "solana";
8
+ type AuthMethodInputValue = {
9
+ email?: string;
10
+ };
11
+ type AuthMethodInputDefinition = {
12
+ type: "email";
13
+ placeholder?: string;
14
+ submitLabel?: string;
15
+ helperText?: string;
16
+ } | undefined;
17
+ type AuthMethodStartResult = {
18
+ notice?: string;
19
+ } | void;
20
+ interface AuthMethodStartContext {
21
+ signIn: AggAuthContextValue["signIn"];
22
+ startAuth: AggAuthContextValue["startAuth"];
23
+ setSession: AggAuthContextValue["setSession"];
24
+ }
25
+ interface AuthMethodAdapter {
26
+ id: AuthMethodId;
27
+ kind: AuthMethodKind;
28
+ label: string;
29
+ description: string;
30
+ iconName?: IconName;
31
+ chain?: AuthMethodChain;
32
+ input?: AuthMethodInputDefinition;
33
+ isAvailable: boolean;
34
+ start: (context: AuthMethodStartContext, input?: AuthMethodInputValue) => Promise<AuthMethodStartResult>;
35
+ disconnect?: () => Promise<void>;
36
+ }
37
+ interface AggAuthProviderProps {
38
+ autoHandleAuthCallback?: boolean;
39
+ children: ReactNode;
40
+ methods: readonly AuthMethodAdapter[];
41
+ }
42
+ interface AggAuthFlowContextValue {
43
+ activeMethodId: AuthMethodId | null;
44
+ availableMethods: readonly AuthMethodAdapter[];
45
+ challengeSiteKey: string | null;
46
+ configuredMethods: readonly AuthMethodAdapter[];
47
+ error: Error | null;
48
+ isBusy: boolean;
49
+ notice: string | null;
50
+ onChallengeError: () => void;
51
+ onChallengeVerify: (token: string) => void;
52
+ selectedMethodId: AuthMethodId | null;
53
+ startMethod: (methodId: AuthMethodId, input?: AuthMethodInputValue) => Promise<{
54
+ challengePending?: boolean;
55
+ }>;
56
+ clearFeedback: () => void;
57
+ signOut: () => Promise<void>;
58
+ }
59
+
60
+ export type { AggAuthProviderProps as A, AggAuthFlowContextValue as a, AuthMethodAdapter as b, AuthMethodId as c, AuthMethodInputDefinition as d, AuthMethodInputValue as e, AuthMethodStartContext as f, AuthMethodStartResult as g };
package/package.json ADDED
@@ -0,0 +1,134 @@
1
+ {
2
+ "name": "@agg-build/auth",
3
+ "version": "1.0.0",
4
+ "description": "Modular connect/sign-in UI and auth-method adapters (SIWE, SIWS, Google, Apple, Twitter/X, email magic-link) for the AGG prediction market aggregator.",
5
+ "sideEffects": false,
6
+ "license": "MIT",
7
+ "homepage": "https://docs.agg.market/",
8
+ "keywords": [
9
+ "agg",
10
+ "agg-market",
11
+ "agg-build",
12
+ "prediction-markets",
13
+ "prediction-market",
14
+ "auth",
15
+ "authentication",
16
+ "connect-button",
17
+ "siwe",
18
+ "siws",
19
+ "oauth",
20
+ "wagmi",
21
+ "solana",
22
+ "magic-link",
23
+ "react"
24
+ ],
25
+ "main": "./dist/index.js",
26
+ "module": "./dist/index.mjs",
27
+ "types": "./dist/index.d.ts",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/Snag-Solutions/Agg.git",
31
+ "directory": "packages/auth"
32
+ },
33
+ "exports": {
34
+ ".": {
35
+ "import": {
36
+ "types": "./dist/index.d.mts",
37
+ "default": "./dist/index.mjs"
38
+ },
39
+ "require": {
40
+ "types": "./dist/index.d.ts",
41
+ "default": "./dist/index.js"
42
+ }
43
+ },
44
+ "./connect-button": {
45
+ "import": {
46
+ "types": "./dist/connect-button.d.mts",
47
+ "default": "./dist/connect-button.mjs"
48
+ },
49
+ "require": {
50
+ "types": "./dist/connect-button.d.ts",
51
+ "default": "./dist/connect-button.js"
52
+ }
53
+ },
54
+ "./oauth": {
55
+ "import": {
56
+ "types": "./dist/oauth.d.mts",
57
+ "default": "./dist/oauth.mjs"
58
+ },
59
+ "require": {
60
+ "types": "./dist/oauth.d.ts",
61
+ "default": "./dist/oauth.js"
62
+ }
63
+ },
64
+ "./email": {
65
+ "import": {
66
+ "types": "./dist/email.d.mts",
67
+ "default": "./dist/email.mjs"
68
+ },
69
+ "require": {
70
+ "types": "./dist/email.d.ts",
71
+ "default": "./dist/email.js"
72
+ }
73
+ },
74
+ "./siwe": {
75
+ "import": {
76
+ "types": "./dist/siwe.d.mts",
77
+ "default": "./dist/siwe.mjs"
78
+ },
79
+ "require": {
80
+ "types": "./dist/siwe.d.ts",
81
+ "default": "./dist/siwe.js"
82
+ }
83
+ },
84
+ "./siws": {
85
+ "import": {
86
+ "types": "./dist/siws.d.mts",
87
+ "default": "./dist/siws.mjs"
88
+ },
89
+ "require": {
90
+ "types": "./dist/siws.d.ts",
91
+ "default": "./dist/siws.js"
92
+ }
93
+ }
94
+ },
95
+ "files": [
96
+ "dist"
97
+ ],
98
+ "peerDependencies": {
99
+ "react": "^18.0.0 || ^19.0.0",
100
+ "react-dom": "^18.0.0 || ^19.0.0",
101
+ "wagmi": "^3.5.0",
102
+ "@solana/wallet-adapter-react": "^0.15.39",
103
+ "bs58": "^6.0.0",
104
+ "@agg-build/hooks": "^1.0.0",
105
+ "@agg-build/ui": "^1.0.0"
106
+ },
107
+ "peerDependenciesMeta": {
108
+ "wagmi": {
109
+ "optional": true
110
+ },
111
+ "@solana/wallet-adapter-react": {
112
+ "optional": true
113
+ },
114
+ "bs58": {
115
+ "optional": true
116
+ }
117
+ },
118
+ "dependencies": {
119
+ "@marsidev/react-turnstile": "^1.5.0"
120
+ },
121
+ "publishConfig": {
122
+ "access": "public"
123
+ },
124
+ "scripts": {
125
+ "build": "tsup",
126
+ "dev": "tsup --watch",
127
+ "test": "pnpm exec vitest run",
128
+ "test:watch": "pnpm exec vitest",
129
+ "test:coverage": "pnpm exec vitest run --coverage",
130
+ "typecheck": "tsc --noEmit",
131
+ "lint": "eslint . --max-warnings 0",
132
+ "clean": "rm -rf .turbo node_modules dist"
133
+ }
134
+ }