better-auth-solana-payments 0.1.1 → 0.1.2
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 +22 -0
- package/dist/client.d.mts +1 -1
- package/dist/client.mjs +1 -1
- package/dist/{index-BQEyw7J9.d.mts → index-CH-34bt8.d.mts} +2 -2
- package/dist/{index-BQEyw7J9.d.mts.map → index-CH-34bt8.d.mts.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/version-DgYRNhTs.mjs +6 -0
- package/dist/version-DgYRNhTs.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/version-CNPQbnxd.mjs +0 -6
- package/dist/version-CNPQbnxd.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -89,3 +89,25 @@ never signs or sends a transaction on behalf of a customer.
|
|
|
89
89
|
|
|
90
90
|
This package supports one-time payments only. It does not create recurring subscriptions or
|
|
91
91
|
perform recurring charges.
|
|
92
|
+
|
|
93
|
+
## TanStack Start example
|
|
94
|
+
|
|
95
|
+
The repository includes a runnable TanStack Start example at
|
|
96
|
+
[`examples/tanstack`](./examples/tanstack). It demonstrates email/password auth, server-created
|
|
97
|
+
Solana Pay requests, wallet checkout, and server-side verification against devnet RPC.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
cd examples/tanstack
|
|
101
|
+
cp .env.example .env
|
|
102
|
+
# Set SOLANA_MINT and SOLANA_RECIPIENT to your devnet SPL token and recipient.
|
|
103
|
+
pnpm install
|
|
104
|
+
pnpm dev
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The example uses an in-memory adapter and is intended for local development only. It does not
|
|
108
|
+
store private keys or submit transactions. See its README for the repeatable RPC and on-chain
|
|
109
|
+
smoke test (`pnpm test:devnet`) and the full wallet verification flow.
|
|
110
|
+
|
|
111
|
+
For devnet, configure a devnet SPL-token mint; the built-in `SOLANA_USDT` preset is the mainnet
|
|
112
|
+
USDT mint and must not be used for devnet testing. In production, use a persistent Better Auth
|
|
113
|
+
adapter, a generated `BETTER_AUTH_SECRET`, and a dedicated RPC provider.
|
package/dist/client.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as solanaPayments } from "./index-
|
|
1
|
+
import { t as solanaPayments } from "./index-CH-34bt8.mjs";
|
|
2
2
|
import { BetterFetch, BetterFetchOption, BetterFetchResponse } from "@better-fetch/fetch";
|
|
3
3
|
import { BetterAuthClientPlugin } from "better-auth/client";
|
|
4
4
|
//#region src/client.d.ts
|
package/dist/client.mjs
CHANGED
|
@@ -42,7 +42,7 @@ interface SolanaPaymentsOptions {
|
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/version.d.ts
|
|
45
|
-
declare const PACKAGE_VERSION = "0.1.
|
|
45
|
+
declare const PACKAGE_VERSION = "0.1.2";
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region src/store.d.ts
|
|
48
48
|
type Adapter = {
|
|
@@ -240,4 +240,4 @@ declare function solanaPayments(input: SolanaPaymentsOptions): {
|
|
|
240
240
|
};
|
|
241
241
|
//#endregion
|
|
242
242
|
export { SolanaPaymentStore as a, PACKAGE_VERSION as c, SolanaPaymentsOptions as d, getSchema as f, MarkPaidResult as i, SolanaPayment as l, CreateSolanaPaymentInput as n, SolanaPaymentStoreContext as o, solanaPaymentsPluginSchema as p, MarkPaidInput as r, createSolanaPaymentStore as s, solanaPayments as t, SolanaPaymentStatus as u };
|
|
243
|
-
//# sourceMappingURL=index-
|
|
243
|
+
//# sourceMappingURL=index-CH-34bt8.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CH-34bt8.d.mts","names":[],"sources":["../src/schema.ts","../src/types.d.ts","../src/version.ts","../src/store.ts","../src/index.ts"],"mappings":";;;;KAIK,sBAAsB;EAGvB,QAAQ,8LAeN;;KA0BM,6BAA6B;cAC5B,4BAA4B;iBAEzB,UACd,SAAS,KAAK,mCACb;;;KClDS;UACK;EACb;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA,QAAQ;EACR,WAAW;EACX;;EAEA;EACA;EACA,WAAW;EACX,WAAW;;UAEE;EACb,QAAQ;EACR,WAAW;EACX;EACA,qBAAqB,SAAS,eAAe,SAAS,2BAA2B;EACjF;IACI;;EAEJ,SAAS,kBAAkB;;;;cC/BlB;;;KCIR;EACH,OAAO,GAAG;IAAS;IAAe,MAAM,KAAK;MAAa,QAAQ;EAClE,QAAQ,GAAG;IAAS;IAAe,OAAO;MAAgB,QAAQ;EAClE,OAAO,GAAG;IAAS;IAAe,QAAQ,QAAQ;IAAI,OAAO;MAAgB,QAAQ;;KAElF;EAAgB;EAAe;;UAEnB;EACf,SAAS;EACT;IAAY;MAAS;;;EACrB;EACA;;KAGU,2BAA2B,KACrC;UAIe;EACf;EACA;;UAGe;EACf,SAAS;EACT;;UAGe;EACf,eAAe;EACf,OAAO,OAAO,2BAA2B,QAAQ;EACjD,SAAS,aAAa,QAAQ;EAC9B,gBAAgB,oBAAoB,QAAQ;EAC5C,SAAS,mBAAmB,QAAQ,gBAAgB,QAAQ;EAC5D,uBAAuB,mBAAmB,QAAQ,gBAAgB,QAAQ;EAC1E,YAAY,oBAAoB,QAAQ;;iBAG1B,yBAAyB,SAAS,4BAA4B;;;iBCjB9D,eAAe,OAAO;;;;;;;;;;;;;;;;;;;YAwB0pD;YAA6C;;;;;;;;;YAAyN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAtQ;YAA6C;;;;;;;;;YAAyN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAtQ;YAA6C;;;;;;;;;YAAyN"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SolanaPaymentStore, c as PACKAGE_VERSION, d as SolanaPaymentsOptions, f as getSchema, i as MarkPaidResult, l as SolanaPayment, n as CreateSolanaPaymentInput, o as SolanaPaymentStoreContext, p as solanaPaymentsPluginSchema, r as MarkPaidInput, s as createSolanaPaymentStore, t as solanaPayments, u as SolanaPaymentStatus } from "./index-
|
|
1
|
+
import { a as SolanaPaymentStore, c as PACKAGE_VERSION, d as SolanaPaymentsOptions, f as getSchema, i as MarkPaidResult, l as SolanaPayment, n as CreateSolanaPaymentInput, o as SolanaPaymentStoreContext, p as solanaPaymentsPluginSchema, r as MarkPaidInput, s as createSolanaPaymentStore, t as solanaPayments, u as SolanaPaymentStatus } from "./index-CH-34bt8.mjs";
|
|
2
2
|
export { type CreateSolanaPaymentInput, type MarkPaidInput, type MarkPaidResult, PACKAGE_VERSION, type SolanaPayment, type SolanaPaymentStatus, type SolanaPaymentStore, type SolanaPaymentStoreContext, type SolanaPaymentsOptions, createSolanaPaymentStore, getSchema, solanaPayments, solanaPaymentsPluginSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-DgYRNhTs.mjs";
|
|
2
2
|
import { defineErrorCodes } from "better-auth";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { APIError, createAuthEndpoint, getSessionFromCtx, originCheck, sessionMiddleware } from "better-auth/api";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-DgYRNhTs.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = \"0.1.2\";\n"],"mappings":";AAAA,MAAa,kBAAkB"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version-CNPQbnxd.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = \"0.1.1\";\n"],"mappings":";AAAA,MAAa,kBAAkB"}
|