@1sat/connect 0.0.70 → 0.0.72
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/index.js +6752 -4919
- package/dist/sigma-oauth.d.ts +4 -290
- package/dist/sigma-oauth.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/sigma-oauth.d.ts
CHANGED
|
@@ -31,296 +31,10 @@ type SigmaAugmentedClient = {
|
|
|
31
31
|
sigma: SigmaPluginActions['signIn']['sigma'];
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
declare const baseAuthClient: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
data: never;
|
|
39
|
-
error: import("better-auth/client").BetterFetchError | null;
|
|
40
|
-
isPending: boolean;
|
|
41
|
-
isRefetching: boolean;
|
|
42
|
-
refetch: (queryParams?: {
|
|
43
|
-
query?: import("better-auth").SessionQueryParams;
|
|
44
|
-
} | undefined) => Promise<void>;
|
|
45
|
-
}>;
|
|
46
|
-
$fetch: import("better-auth/client").BetterFetch<{
|
|
47
|
-
plugins: (import("better-auth/client").BetterFetchPlugin<Record<string, any>> | {
|
|
48
|
-
id: string;
|
|
49
|
-
name: string;
|
|
50
|
-
hooks: {
|
|
51
|
-
onSuccess(context: import("better-auth/client").SuccessContext<any>): void;
|
|
52
|
-
};
|
|
53
|
-
} | {
|
|
54
|
-
id: string;
|
|
55
|
-
name: string;
|
|
56
|
-
hooks: {
|
|
57
|
-
onSuccess: ((context: import("better-auth/client").SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
58
|
-
onError: ((context: import("better-auth/client").ErrorContext) => Promise<void> | void) | undefined;
|
|
59
|
-
onRequest: (<T extends Record<string, any>>(context: import("better-auth/client").RequestContext<T>) => Promise<import("better-auth/client").RequestContext | void> | import("better-auth/client").RequestContext | void) | undefined;
|
|
60
|
-
onResponse: ((context: import("better-auth/client").ResponseContext) => Promise<Response | void | import("better-auth/client").ResponseContext> | Response | import("better-auth/client").ResponseContext | void) | undefined;
|
|
61
|
-
};
|
|
62
|
-
})[];
|
|
63
|
-
priority?: RequestPriority | undefined;
|
|
64
|
-
cache?: RequestCache | undefined;
|
|
65
|
-
credentials?: RequestCredentials;
|
|
66
|
-
integrity?: string | undefined;
|
|
67
|
-
keepalive?: boolean | undefined;
|
|
68
|
-
method: string;
|
|
69
|
-
mode?: RequestMode | undefined;
|
|
70
|
-
redirect?: RequestRedirect | undefined;
|
|
71
|
-
referrer?: string | undefined;
|
|
72
|
-
referrerPolicy?: ReferrerPolicy | undefined;
|
|
73
|
-
signal?: (AbortSignal | null) | undefined;
|
|
74
|
-
window?: null | undefined;
|
|
75
|
-
onRetry?: ((response: import("better-auth/client").ResponseContext) => Promise<void> | void) | undefined;
|
|
76
|
-
hookOptions?: {
|
|
77
|
-
cloneResponse?: boolean;
|
|
78
|
-
} | undefined;
|
|
79
|
-
timeout?: number | undefined;
|
|
80
|
-
customFetchImpl: import("better-auth/client").FetchEsque;
|
|
81
|
-
baseURL: string;
|
|
82
|
-
throw?: boolean | undefined;
|
|
83
|
-
auth?: ({
|
|
84
|
-
type: "Bearer";
|
|
85
|
-
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
|
86
|
-
} | {
|
|
87
|
-
type: "Basic";
|
|
88
|
-
username: string | (() => string | undefined) | undefined;
|
|
89
|
-
password: string | (() => string | undefined) | undefined;
|
|
90
|
-
} | {
|
|
91
|
-
type: "Custom";
|
|
92
|
-
prefix: string | (() => string | undefined) | undefined;
|
|
93
|
-
value: string | (() => string | undefined) | undefined;
|
|
94
|
-
}) | undefined;
|
|
95
|
-
headers?: {} | {
|
|
96
|
-
[x: string]: string | undefined;
|
|
97
|
-
accept?: ((string & {}) | "application/json" | "text/plain" | "application/octet-stream") | undefined;
|
|
98
|
-
"content-type"?: ((string & {}) | "application/x-www-form-urlencoded" | "application/json" | "text/plain" | "application/octet-stream" | "multipart/form-data") | undefined;
|
|
99
|
-
authorization?: ((string & {}) | `Bearer ${string}` | `Basic ${string}`) | undefined;
|
|
100
|
-
} | undefined;
|
|
101
|
-
body?: any;
|
|
102
|
-
query?: any;
|
|
103
|
-
params?: any;
|
|
104
|
-
duplex?: "full" | "half" | undefined;
|
|
105
|
-
jsonParser: (text: string) => Promise<any> | any;
|
|
106
|
-
retry?: import("better-auth/client").RetryOptions | undefined;
|
|
107
|
-
retryAttempt?: number | undefined;
|
|
108
|
-
output?: (import("better-auth/client").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
109
|
-
errorSchema?: import("better-auth/client").StandardSchemaV1 | undefined;
|
|
110
|
-
disableValidation?: boolean | undefined;
|
|
111
|
-
disableSignal?: boolean | undefined;
|
|
112
|
-
}, unknown, unknown, {}>;
|
|
113
|
-
$store: {
|
|
114
|
-
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
115
|
-
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
116
|
-
atoms: Record<string, import("better-auth/client").WritableAtom<any>>;
|
|
117
|
-
};
|
|
118
|
-
$Infer: {
|
|
119
|
-
Session: never;
|
|
120
|
-
};
|
|
121
|
-
$ERROR_CODES: {
|
|
122
|
-
[x: string]: {
|
|
123
|
-
readonly code: string;
|
|
124
|
-
message: string;
|
|
125
|
-
};
|
|
126
|
-
USER_NOT_FOUND: {
|
|
127
|
-
readonly code: "USER_NOT_FOUND";
|
|
128
|
-
message: string;
|
|
129
|
-
};
|
|
130
|
-
FAILED_TO_CREATE_USER: {
|
|
131
|
-
readonly code: "FAILED_TO_CREATE_USER";
|
|
132
|
-
message: string;
|
|
133
|
-
};
|
|
134
|
-
FAILED_TO_CREATE_SESSION: {
|
|
135
|
-
readonly code: "FAILED_TO_CREATE_SESSION";
|
|
136
|
-
message: string;
|
|
137
|
-
};
|
|
138
|
-
FAILED_TO_UPDATE_USER: {
|
|
139
|
-
readonly code: "FAILED_TO_UPDATE_USER";
|
|
140
|
-
message: string;
|
|
141
|
-
};
|
|
142
|
-
FAILED_TO_GET_SESSION: {
|
|
143
|
-
readonly code: "FAILED_TO_GET_SESSION";
|
|
144
|
-
message: string;
|
|
145
|
-
};
|
|
146
|
-
INVALID_PASSWORD: {
|
|
147
|
-
readonly code: "INVALID_PASSWORD";
|
|
148
|
-
message: string;
|
|
149
|
-
};
|
|
150
|
-
INVALID_EMAIL: {
|
|
151
|
-
readonly code: "INVALID_EMAIL";
|
|
152
|
-
message: string;
|
|
153
|
-
};
|
|
154
|
-
INVALID_EMAIL_OR_PASSWORD: {
|
|
155
|
-
readonly code: "INVALID_EMAIL_OR_PASSWORD";
|
|
156
|
-
message: string;
|
|
157
|
-
};
|
|
158
|
-
INVALID_USER: {
|
|
159
|
-
readonly code: "INVALID_USER";
|
|
160
|
-
message: string;
|
|
161
|
-
};
|
|
162
|
-
SOCIAL_ACCOUNT_ALREADY_LINKED: {
|
|
163
|
-
readonly code: "SOCIAL_ACCOUNT_ALREADY_LINKED";
|
|
164
|
-
message: string;
|
|
165
|
-
};
|
|
166
|
-
PROVIDER_NOT_FOUND: {
|
|
167
|
-
readonly code: "PROVIDER_NOT_FOUND";
|
|
168
|
-
message: string;
|
|
169
|
-
};
|
|
170
|
-
INVALID_TOKEN: {
|
|
171
|
-
readonly code: "INVALID_TOKEN";
|
|
172
|
-
message: string;
|
|
173
|
-
};
|
|
174
|
-
TOKEN_EXPIRED: {
|
|
175
|
-
readonly code: "TOKEN_EXPIRED";
|
|
176
|
-
message: string;
|
|
177
|
-
};
|
|
178
|
-
ID_TOKEN_NOT_SUPPORTED: {
|
|
179
|
-
readonly code: "ID_TOKEN_NOT_SUPPORTED";
|
|
180
|
-
message: string;
|
|
181
|
-
};
|
|
182
|
-
FAILED_TO_GET_USER_INFO: {
|
|
183
|
-
readonly code: "FAILED_TO_GET_USER_INFO";
|
|
184
|
-
message: string;
|
|
185
|
-
};
|
|
186
|
-
USER_EMAIL_NOT_FOUND: {
|
|
187
|
-
readonly code: "USER_EMAIL_NOT_FOUND";
|
|
188
|
-
message: string;
|
|
189
|
-
};
|
|
190
|
-
EMAIL_NOT_VERIFIED: {
|
|
191
|
-
readonly code: "EMAIL_NOT_VERIFIED";
|
|
192
|
-
message: string;
|
|
193
|
-
};
|
|
194
|
-
PASSWORD_TOO_SHORT: {
|
|
195
|
-
readonly code: "PASSWORD_TOO_SHORT";
|
|
196
|
-
message: string;
|
|
197
|
-
};
|
|
198
|
-
PASSWORD_TOO_LONG: {
|
|
199
|
-
readonly code: "PASSWORD_TOO_LONG";
|
|
200
|
-
message: string;
|
|
201
|
-
};
|
|
202
|
-
USER_ALREADY_EXISTS: {
|
|
203
|
-
readonly code: "USER_ALREADY_EXISTS";
|
|
204
|
-
message: string;
|
|
205
|
-
};
|
|
206
|
-
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: {
|
|
207
|
-
readonly code: "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL";
|
|
208
|
-
message: string;
|
|
209
|
-
};
|
|
210
|
-
EMAIL_CAN_NOT_BE_UPDATED: {
|
|
211
|
-
readonly code: "EMAIL_CAN_NOT_BE_UPDATED";
|
|
212
|
-
message: string;
|
|
213
|
-
};
|
|
214
|
-
CHANGE_EMAIL_DISABLED: {
|
|
215
|
-
readonly code: "CHANGE_EMAIL_DISABLED";
|
|
216
|
-
message: string;
|
|
217
|
-
};
|
|
218
|
-
CREDENTIAL_ACCOUNT_NOT_FOUND: {
|
|
219
|
-
readonly code: "CREDENTIAL_ACCOUNT_NOT_FOUND";
|
|
220
|
-
message: string;
|
|
221
|
-
};
|
|
222
|
-
ACCOUNT_NOT_FOUND: {
|
|
223
|
-
readonly code: "ACCOUNT_NOT_FOUND";
|
|
224
|
-
message: string;
|
|
225
|
-
};
|
|
226
|
-
SESSION_EXPIRED: {
|
|
227
|
-
readonly code: "SESSION_EXPIRED";
|
|
228
|
-
message: string;
|
|
229
|
-
};
|
|
230
|
-
FAILED_TO_UNLINK_LAST_ACCOUNT: {
|
|
231
|
-
readonly code: "FAILED_TO_UNLINK_LAST_ACCOUNT";
|
|
232
|
-
message: string;
|
|
233
|
-
};
|
|
234
|
-
USER_ALREADY_HAS_PASSWORD: {
|
|
235
|
-
readonly code: "USER_ALREADY_HAS_PASSWORD";
|
|
236
|
-
message: string;
|
|
237
|
-
};
|
|
238
|
-
CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: {
|
|
239
|
-
readonly code: "CROSS_SITE_NAVIGATION_LOGIN_BLOCKED";
|
|
240
|
-
message: string;
|
|
241
|
-
};
|
|
242
|
-
VERIFICATION_EMAIL_NOT_ENABLED: {
|
|
243
|
-
readonly code: "VERIFICATION_EMAIL_NOT_ENABLED";
|
|
244
|
-
message: string;
|
|
245
|
-
};
|
|
246
|
-
EMAIL_ALREADY_VERIFIED: {
|
|
247
|
-
readonly code: "EMAIL_ALREADY_VERIFIED";
|
|
248
|
-
message: string;
|
|
249
|
-
};
|
|
250
|
-
EMAIL_MISMATCH: {
|
|
251
|
-
readonly code: "EMAIL_MISMATCH";
|
|
252
|
-
message: string;
|
|
253
|
-
};
|
|
254
|
-
SESSION_NOT_FRESH: {
|
|
255
|
-
readonly code: "SESSION_NOT_FRESH";
|
|
256
|
-
message: string;
|
|
257
|
-
};
|
|
258
|
-
LINKED_ACCOUNT_ALREADY_EXISTS: {
|
|
259
|
-
readonly code: "LINKED_ACCOUNT_ALREADY_EXISTS";
|
|
260
|
-
message: string;
|
|
261
|
-
};
|
|
262
|
-
INVALID_ORIGIN: {
|
|
263
|
-
readonly code: "INVALID_ORIGIN";
|
|
264
|
-
message: string;
|
|
265
|
-
};
|
|
266
|
-
INVALID_CALLBACK_URL: {
|
|
267
|
-
readonly code: "INVALID_CALLBACK_URL";
|
|
268
|
-
message: string;
|
|
269
|
-
};
|
|
270
|
-
INVALID_REDIRECT_URL: {
|
|
271
|
-
readonly code: "INVALID_REDIRECT_URL";
|
|
272
|
-
message: string;
|
|
273
|
-
};
|
|
274
|
-
INVALID_ERROR_CALLBACK_URL: {
|
|
275
|
-
readonly code: "INVALID_ERROR_CALLBACK_URL";
|
|
276
|
-
message: string;
|
|
277
|
-
};
|
|
278
|
-
INVALID_NEW_USER_CALLBACK_URL: {
|
|
279
|
-
readonly code: "INVALID_NEW_USER_CALLBACK_URL";
|
|
280
|
-
message: string;
|
|
281
|
-
};
|
|
282
|
-
MISSING_OR_NULL_ORIGIN: {
|
|
283
|
-
readonly code: "MISSING_OR_NULL_ORIGIN";
|
|
284
|
-
message: string;
|
|
285
|
-
};
|
|
286
|
-
CALLBACK_URL_REQUIRED: {
|
|
287
|
-
readonly code: "CALLBACK_URL_REQUIRED";
|
|
288
|
-
message: string;
|
|
289
|
-
};
|
|
290
|
-
FAILED_TO_CREATE_VERIFICATION: {
|
|
291
|
-
readonly code: "FAILED_TO_CREATE_VERIFICATION";
|
|
292
|
-
message: string;
|
|
293
|
-
};
|
|
294
|
-
FIELD_NOT_ALLOWED: {
|
|
295
|
-
readonly code: "FIELD_NOT_ALLOWED";
|
|
296
|
-
message: string;
|
|
297
|
-
};
|
|
298
|
-
ASYNC_VALIDATION_NOT_SUPPORTED: {
|
|
299
|
-
readonly code: "ASYNC_VALIDATION_NOT_SUPPORTED";
|
|
300
|
-
message: string;
|
|
301
|
-
};
|
|
302
|
-
VALIDATION_ERROR: {
|
|
303
|
-
readonly code: "VALIDATION_ERROR";
|
|
304
|
-
message: string;
|
|
305
|
-
};
|
|
306
|
-
MISSING_FIELD: {
|
|
307
|
-
readonly code: "MISSING_FIELD";
|
|
308
|
-
message: string;
|
|
309
|
-
};
|
|
310
|
-
METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: {
|
|
311
|
-
readonly code: "METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED";
|
|
312
|
-
message: string;
|
|
313
|
-
};
|
|
314
|
-
BODY_MUST_BE_AN_OBJECT: {
|
|
315
|
-
readonly code: "BODY_MUST_BE_AN_OBJECT";
|
|
316
|
-
message: string;
|
|
317
|
-
};
|
|
318
|
-
PASSWORD_ALREADY_SET: {
|
|
319
|
-
readonly code: "PASSWORD_ALREADY_SET";
|
|
320
|
-
message: string;
|
|
321
|
-
};
|
|
322
|
-
};
|
|
323
|
-
};
|
|
34
|
+
declare const baseAuthClient: import("better-auth/client").AuthClient<{
|
|
35
|
+
baseURL: string;
|
|
36
|
+
plugins: import("better-auth").BetterAuthClientPlugin[];
|
|
37
|
+
}>;
|
|
324
38
|
export declare const sigmaAuthClient: typeof baseAuthClient & SigmaAugmentedClient;
|
|
325
39
|
/**
|
|
326
40
|
* Redirect to Sigma Identity authorize endpoint.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sigma-oauth.d.ts","sourceRoot":"","sources":["../src/sigma-oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,WAAW,EACX,MAAM,uCAAuC,CAAA;AAE9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEhF,eAAO,MAAM,SAAS,mCAAmC,CAAA;AAEzD,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAChE,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAKD,KAAK,kBAAkB,GAAG,UAAU,CACnC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,YAAY,CAAC,C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AAA,MAAM,cAAc;;;EAGlB,CAAA;AAEF,eAAO,MAAM,eAAe,EAAqB,OAAO,cAAc,GACrE,oBAAoB,CAAA;AAErB;;;;GAIG;AACH,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,aAAa,CAAC,GAC5D,OAAO,CAAC,KAAK,CAAC,CAOhB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACvC,YAAY,EAAE,eAAe,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAe3B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACvC,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,mBAAmB,CAAC,CAgB9B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAEnD;AAED;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAIhF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1sat/connect",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.72",
|
|
4
4
|
"description": "Connection layer for 1Sat wallet - popup flow, events, session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@1sat/wallet": "0.0.
|
|
31
|
+
"@1sat/wallet": "0.0.87",
|
|
32
32
|
"@sigma-auth/better-auth-plugin": "^0.0.92",
|
|
33
33
|
"better-auth": "^1.6.18",
|
|
34
34
|
"eventemitter3": "^5.0.1"
|