@daimo/pay 0.0.1 → 0.0.3

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 (51) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +28 -40
  3. package/build/index.es.js +5064 -5807
  4. package/build/index.es.js.map +1 -1
  5. package/build/packages/paykit/packages/connectkit/src/components/Common/Modal/index.d.ts +1 -1
  6. package/build/packages/paykit/packages/connectkit/src/components/{ConnectKit.d.ts → DaimoPay.d.ts} +7 -10
  7. package/build/packages/paykit/packages/connectkit/src/components/{ConnectButton → DaimoPayButton}/index.d.ts +6 -9
  8. package/build/packages/paykit/packages/connectkit/src/components/{ConnectKitThemeProvider/ConnectKitThemeProvider.d.ts → DaimoPayThemeProvider/DaimoPayThemeProvider.d.ts} +3 -3
  9. package/build/packages/paykit/packages/connectkit/src/defaultConnectors.d.ts +1 -1
  10. package/build/packages/paykit/packages/connectkit/src/hooks/useConnect.d.ts +1 -1
  11. package/build/packages/paykit/packages/connectkit/src/hooks/useModal.d.ts +0 -1
  12. package/build/packages/paykit/packages/connectkit/src/index.d.ts +5 -9
  13. package/build/packages/paykit/packages/connectkit/src/styles/types.d.ts +1 -1
  14. package/build/packages/paykit/packages/connectkit/src/types.d.ts +1 -1
  15. package/build/packages/paykit/packages/connectkit/src/utils/getPaymentInfo.d.ts +3 -73
  16. package/build/packages/paykit/packages/connectkit/src/utils/index.d.ts +1 -1
  17. package/build/packages/paykit/packages/connectkit/src/utils/trpc.d.ts +1 -956
  18. package/package.json +3 -2
  19. package/build/packages/pay-api/src/db/codegen/dbPay.d.ts +0 -69
  20. package/build/packages/pay-api/src/db/db.d.ts +0 -68
  21. package/build/packages/pay-api/src/db/migrations/0.d.ts +0 -2
  22. package/build/packages/pay-api/src/db/migrations/1.d.ts +0 -2
  23. package/build/packages/pay-api/src/db/migrations/2.d.ts +0 -2
  24. package/build/packages/pay-api/src/db/migrations/3.d.ts +0 -2
  25. package/build/packages/pay-api/src/env.d.ts +0 -10
  26. package/build/packages/pay-api/src/index.d.ts +0 -2
  27. package/build/packages/pay-api/src/server/binanceClient.d.ts +0 -14
  28. package/build/packages/pay-api/src/server/constants.d.ts +0 -3
  29. package/build/packages/pay-api/src/server/dfsQuoter.d.ts +0 -21
  30. package/build/packages/pay-api/src/server/externalPaymentOptions.d.ts +0 -21
  31. package/build/packages/pay-api/src/server/orderProcessor.d.ts +0 -48
  32. package/build/packages/pay-api/src/server/orgManager.d.ts +0 -22
  33. package/build/packages/pay-api/src/server/router.d.ts +0 -252
  34. package/build/packages/pay-api/src/server/swap.d.ts +0 -24
  35. package/build/packages/pay-api/src/server/tokenBalances.d.ts +0 -12
  36. package/build/packages/pay-api/src/server/tokenRegistry.d.ts +0 -16
  37. package/build/packages/pay-api/src/server/viemChainClient.d.ts +0 -252
  38. package/build/packages/pay-api/src/server/viemClient.d.ts +0 -19
  39. package/build/packages/pay-api/src/trpc.d.ts +0 -129
  40. package/build/packages/pay-api/src/utils/clippy.d.ts +0 -2
  41. package/build/packages/pay-api/src/utils/request.d.ts +0 -19
  42. package/build/packages/paykit/packages/connectkit/src/components/BalanceButton/index.d.ts +0 -9
  43. package/build/packages/paykit/packages/connectkit/src/components/Pages/SignInWithEthereum/index.d.ts +0 -3
  44. package/build/packages/paykit/packages/connectkit/src/components/Pages/SignInWithEthereum/styles.d.ts +0 -5
  45. package/build/packages/paykit/packages/connectkit/src/components/Standard/SIWE/index.d.ts +0 -10
  46. package/build/packages/paykit/packages/connectkit/src/components/Standard/SIWE/styles.d.ts +0 -1
  47. package/build/packages/paykit/packages/connectkit/src/siwe/SIWEContext.d.ts +0 -42
  48. package/build/packages/paykit/packages/connectkit/src/siwe/SIWEProvider.d.ts +0 -11
  49. package/build/packages/paykit/packages/connectkit/src/siwe/index.d.ts +0 -3
  50. package/build/packages/paykit/packages/connectkit/src/siwe/useSIWE.d.ts +0 -21
  51. /package/build/packages/paykit/packages/connectkit/src/components/{ConnectButton → DaimoPayButton}/styles.d.ts +0 -0
@@ -1,252 +0,0 @@
1
- import { Abi, Account, Chain, ContractFunctionName, ContractFunctionArgs, Hex, PublicClient, SendTransactionParameters, SendTransactionReturnType, Transport, WalletClient, WriteContractParameters } from "viem";
2
- /**
3
- * Loads a wallet from the local DAIMO_API_PRIVATE_KEY env var.
4
- * This account sponsors gas for account creation (and a faucet, on testnet).
5
- */
6
- export declare function getViemChainClientFromEnv(chainId: number): ViemChainClient;
7
- export declare function getEOA(privateKey: string): {
8
- address: `0x${string}`;
9
- nonceManager?: import("viem").NonceManager | undefined;
10
- sign: (parameters: {
11
- hash: `0x${string}`;
12
- }) => Promise<`0x${string}`>;
13
- experimental_signAuthorization: (parameters: import("viem/experimental").Authorization) => Promise<import("viem/accounts").SignAuthorizationReturnType>;
14
- signMessage: ({ message }: {
15
- message: import("viem").SignableMessage;
16
- }) => Promise<`0x${string}`>;
17
- signTransaction: <serializer extends import("viem").SerializeTransactionFn<import("viem").TransactionSerializable> = import("viem").SerializeTransactionFn<import("viem").TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
18
- serializer?: serializer | undefined;
19
- } | undefined) => Promise<import("viem").IsNarrowable<import("viem").TransactionSerialized<import("viem").GetTransactionType<transaction>>, `0x${string}`> extends true ? import("viem").TransactionSerialized<import("viem").GetTransactionType<transaction>> : `0x${string}`>;
20
- signTypedData: <const typedData extends Record<string, unknown> | {
21
- [x: string]: readonly import("viem").TypedDataParameter[];
22
- [x: `string[${string}]`]: undefined;
23
- [x: `function[${string}]`]: undefined;
24
- [x: `address[${string}]`]: undefined;
25
- [x: `bool[${string}]`]: undefined;
26
- [x: `bytes[${string}]`]: undefined;
27
- [x: `bytes2[${string}]`]: undefined;
28
- [x: `bytes1[${string}]`]: undefined;
29
- [x: `bytes10[${string}]`]: undefined;
30
- [x: `bytes18[${string}]`]: undefined;
31
- [x: `bytes32[${string}]`]: undefined;
32
- [x: `bytes31[${string}]`]: undefined;
33
- [x: `bytes30[${string}]`]: undefined;
34
- [x: `bytes29[${string}]`]: undefined;
35
- [x: `bytes28[${string}]`]: undefined;
36
- [x: `bytes27[${string}]`]: undefined;
37
- [x: `bytes26[${string}]`]: undefined;
38
- [x: `bytes25[${string}]`]: undefined;
39
- [x: `bytes24[${string}]`]: undefined;
40
- [x: `bytes23[${string}]`]: undefined;
41
- [x: `bytes22[${string}]`]: undefined;
42
- [x: `bytes21[${string}]`]: undefined;
43
- [x: `bytes20[${string}]`]: undefined;
44
- [x: `bytes19[${string}]`]: undefined;
45
- [x: `bytes17[${string}]`]: undefined;
46
- [x: `bytes16[${string}]`]: undefined;
47
- [x: `bytes15[${string}]`]: undefined;
48
- [x: `bytes14[${string}]`]: undefined;
49
- [x: `bytes13[${string}]`]: undefined;
50
- [x: `bytes12[${string}]`]: undefined;
51
- [x: `bytes11[${string}]`]: undefined;
52
- [x: `bytes9[${string}]`]: undefined;
53
- [x: `bytes8[${string}]`]: undefined;
54
- [x: `bytes7[${string}]`]: undefined;
55
- [x: `bytes6[${string}]`]: undefined;
56
- [x: `bytes5[${string}]`]: undefined;
57
- [x: `bytes4[${string}]`]: undefined;
58
- [x: `bytes3[${string}]`]: undefined;
59
- [x: `int[${string}]`]: undefined;
60
- [x: `int40[${string}]`]: undefined;
61
- [x: `int32[${string}]`]: undefined;
62
- [x: `int24[${string}]`]: undefined;
63
- [x: `int16[${string}]`]: undefined;
64
- [x: `int8[${string}]`]: undefined;
65
- [x: `int48[${string}]`]: undefined;
66
- [x: `int56[${string}]`]: undefined;
67
- [x: `int64[${string}]`]: undefined;
68
- [x: `int72[${string}]`]: undefined;
69
- [x: `int80[${string}]`]: undefined;
70
- [x: `int88[${string}]`]: undefined;
71
- [x: `int96[${string}]`]: undefined;
72
- [x: `int104[${string}]`]: undefined;
73
- [x: `int112[${string}]`]: undefined;
74
- [x: `int120[${string}]`]: undefined;
75
- [x: `int128[${string}]`]: undefined;
76
- [x: `int136[${string}]`]: undefined;
77
- [x: `int144[${string}]`]: undefined;
78
- [x: `int152[${string}]`]: undefined;
79
- [x: `int160[${string}]`]: undefined;
80
- [x: `int168[${string}]`]: undefined;
81
- [x: `int176[${string}]`]: undefined;
82
- [x: `int184[${string}]`]: undefined;
83
- [x: `int192[${string}]`]: undefined;
84
- [x: `int200[${string}]`]: undefined;
85
- [x: `int208[${string}]`]: undefined;
86
- [x: `int216[${string}]`]: undefined;
87
- [x: `int224[${string}]`]: undefined;
88
- [x: `int232[${string}]`]: undefined;
89
- [x: `int240[${string}]`]: undefined;
90
- [x: `int248[${string}]`]: undefined;
91
- [x: `int256[${string}]`]: undefined;
92
- [x: `uint[${string}]`]: undefined;
93
- [x: `uint40[${string}]`]: undefined;
94
- [x: `uint32[${string}]`]: undefined;
95
- [x: `uint24[${string}]`]: undefined;
96
- [x: `uint16[${string}]`]: undefined;
97
- [x: `uint8[${string}]`]: undefined;
98
- [x: `uint48[${string}]`]: undefined;
99
- [x: `uint56[${string}]`]: undefined;
100
- [x: `uint64[${string}]`]: undefined;
101
- [x: `uint72[${string}]`]: undefined;
102
- [x: `uint80[${string}]`]: undefined;
103
- [x: `uint88[${string}]`]: undefined;
104
- [x: `uint96[${string}]`]: undefined;
105
- [x: `uint104[${string}]`]: undefined;
106
- [x: `uint112[${string}]`]: undefined;
107
- [x: `uint120[${string}]`]: undefined;
108
- [x: `uint128[${string}]`]: undefined;
109
- [x: `uint136[${string}]`]: undefined;
110
- [x: `uint144[${string}]`]: undefined;
111
- [x: `uint152[${string}]`]: undefined;
112
- [x: `uint160[${string}]`]: undefined;
113
- [x: `uint168[${string}]`]: undefined;
114
- [x: `uint176[${string}]`]: undefined;
115
- [x: `uint184[${string}]`]: undefined;
116
- [x: `uint192[${string}]`]: undefined;
117
- [x: `uint200[${string}]`]: undefined;
118
- [x: `uint208[${string}]`]: undefined;
119
- [x: `uint216[${string}]`]: undefined;
120
- [x: `uint224[${string}]`]: undefined;
121
- [x: `uint232[${string}]`]: undefined;
122
- [x: `uint240[${string}]`]: undefined;
123
- [x: `uint248[${string}]`]: undefined;
124
- [x: `uint256[${string}]`]: undefined;
125
- string?: undefined;
126
- address?: undefined;
127
- bool?: undefined;
128
- bytes?: undefined;
129
- bytes2?: undefined;
130
- bytes1?: undefined;
131
- bytes10?: undefined;
132
- bytes18?: undefined;
133
- bytes32?: undefined;
134
- bytes31?: undefined;
135
- bytes30?: undefined;
136
- bytes29?: undefined;
137
- bytes28?: undefined;
138
- bytes27?: undefined;
139
- bytes26?: undefined;
140
- bytes25?: undefined;
141
- bytes24?: undefined;
142
- bytes23?: undefined;
143
- bytes22?: undefined;
144
- bytes21?: undefined;
145
- bytes20?: undefined;
146
- bytes19?: undefined;
147
- bytes17?: undefined;
148
- bytes16?: undefined;
149
- bytes15?: undefined;
150
- bytes14?: undefined;
151
- bytes13?: undefined;
152
- bytes12?: undefined;
153
- bytes11?: undefined;
154
- bytes9?: undefined;
155
- bytes8?: undefined;
156
- bytes7?: undefined;
157
- bytes6?: undefined;
158
- bytes5?: undefined;
159
- bytes4?: undefined;
160
- bytes3?: undefined;
161
- int40?: undefined;
162
- int32?: undefined;
163
- int24?: undefined;
164
- int16?: undefined;
165
- int8?: undefined;
166
- int48?: undefined;
167
- int56?: undefined;
168
- int64?: undefined;
169
- int72?: undefined;
170
- int80?: undefined;
171
- int88?: undefined;
172
- int96?: undefined;
173
- int104?: undefined;
174
- int112?: undefined;
175
- int120?: undefined;
176
- int128?: undefined;
177
- int136?: undefined;
178
- int144?: undefined;
179
- int152?: undefined;
180
- int160?: undefined;
181
- int168?: undefined;
182
- int176?: undefined;
183
- int184?: undefined;
184
- int192?: undefined;
185
- int200?: undefined;
186
- int208?: undefined;
187
- int216?: undefined;
188
- int224?: undefined;
189
- int232?: undefined;
190
- int240?: undefined;
191
- int248?: undefined;
192
- int256?: undefined;
193
- uint40?: undefined;
194
- uint32?: undefined;
195
- uint24?: undefined;
196
- uint16?: undefined;
197
- uint8?: undefined;
198
- uint48?: undefined;
199
- uint56?: undefined;
200
- uint64?: undefined;
201
- uint72?: undefined;
202
- uint80?: undefined;
203
- uint88?: undefined;
204
- uint96?: undefined;
205
- uint104?: undefined;
206
- uint112?: undefined;
207
- uint120?: undefined;
208
- uint128?: undefined;
209
- uint136?: undefined;
210
- uint144?: undefined;
211
- uint152?: undefined;
212
- uint160?: undefined;
213
- uint168?: undefined;
214
- uint176?: undefined;
215
- uint184?: undefined;
216
- uint192?: undefined;
217
- uint200?: undefined;
218
- uint208?: undefined;
219
- uint216?: undefined;
220
- uint224?: undefined;
221
- uint232?: undefined;
222
- uint240?: undefined;
223
- uint248?: undefined;
224
- uint256?: undefined;
225
- }, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<`0x${string}`>;
226
- publicKey: `0x${string}`;
227
- source: "privateKey";
228
- type: "local";
229
- };
230
- /**
231
- * All access to the chain goes through this client. Unique to a chain.
232
- */
233
- export declare class ViemChainClient {
234
- rpcURL: string;
235
- publicClient: PublicClient<Transport, Chain>;
236
- walletClient: WalletClient<Transport, Chain, Account>;
237
- chain: Chain;
238
- private lockNonce;
239
- private nextNonce;
240
- account: Account;
241
- constructor(rpcURL: string, publicClient: PublicClient<Transport, Chain>, walletClient: WalletClient<Transport, Chain, Account>, chain: Chain);
242
- private onReceiptError;
243
- waitForReceipt(hash: Hex): Promise<void>;
244
- updateNonce(): Promise<void>;
245
- runWithOverrideParams<Args extends {
246
- nonce?: number;
247
- gas?: bigint;
248
- chain?: Chain | null;
249
- }, Ret>(args: Args, fn: (args: Args) => Ret): Promise<Ret>;
250
- writeContract<const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "payable" | "nonpayable">, TArgs extends ContractFunctionArgs<TAbi, "payable" | "nonpayable", TFunctionName>, TChainOverride extends Chain | undefined = undefined>(args: WriteContractParameters<TAbi, TFunctionName, TArgs, Chain, Account, TChainOverride>): Promise<Hex>;
251
- sendTransaction<TChainOverride extends Chain | undefined = undefined>(args: SendTransactionParameters<Chain, Account, TChainOverride>): Promise<SendTransactionReturnType>;
252
- }
@@ -1,19 +0,0 @@
1
- import { Abi, Account, Chain, ContractFunctionName, ContractFunctionArgs, Hex, SendTransactionParameters, SendTransactionReturnType, WriteContractParameters } from "viem";
2
- import { ViemChainClient } from "./viemChainClient";
3
- /**
4
- * Loads a wallet from the local DAIMO_API_PRIVATE_KEY env var.
5
- * This account sponsors gas for account creation (and a faucet, on testnet).
6
- */
7
- export declare function getViemClientFromEnv(): ViemClient;
8
- /**
9
- * All access to chains goes through this client.
10
- */
11
- export declare class ViemClient {
12
- private vcs;
13
- constructor(vcs: Map<number, ViemChainClient>);
14
- getSupportedMainnetChainIds(): number[];
15
- getSupportedTestnetChainIds(): number[];
16
- getChainClient(chainId: number): ViemChainClient;
17
- writeContract<const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "payable" | "nonpayable">, TArgs extends ContractFunctionArgs<TAbi, "payable" | "nonpayable", TFunctionName>, TChainOverride extends Chain | undefined = undefined>(chainId: number, args: WriteContractParameters<TAbi, TFunctionName, TArgs, Chain, Account, TChainOverride>): Promise<Hex>;
18
- sendTransaction<TChainOverride extends Chain | undefined = undefined>(chainId: number, args: SendTransactionParameters<Chain, Account, TChainOverride>): Promise<SendTransactionReturnType>;
19
- }
@@ -1,129 +0,0 @@
1
- /// <reference types="node" />
2
- import { TRPCError } from "@trpc/server";
3
- import { CreateHTTPContextOptions } from "@trpc/server/adapters/standalone";
4
- export type TrpcRequestContext = Awaited<ReturnType<typeof createContext>>;
5
- /** Request context */
6
- export declare const createContext: (opts: CreateHTTPContextOptions) => Promise<{
7
- auth: {
8
- organizationId: string;
9
- memberId: string;
10
- } | null;
11
- req: import("http").IncomingMessage;
12
- res: import("http").ServerResponse<import("http").IncomingMessage>;
13
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
14
- }>;
15
- export declare function onTrpcError(): ({ error, ctx }: {
16
- error: TRPCError;
17
- ctx?: {
18
- auth: {
19
- organizationId: string;
20
- memberId: string;
21
- } | null;
22
- req: import("http").IncomingMessage;
23
- res: import("http").ServerResponse<import("http").IncomingMessage>;
24
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
25
- } | undefined;
26
- }) => void;
27
- /**
28
- * Initialization of tRPC backend
29
- */
30
- export declare const trpcT: {
31
- _config: import("@trpc/server/unstable-core-do-not-import").RootConfig<{
32
- ctx: {
33
- auth: {
34
- organizationId: string;
35
- memberId: string;
36
- } | null;
37
- req: import("http").IncomingMessage;
38
- res: import("http").ServerResponse<import("http").IncomingMessage>;
39
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
40
- };
41
- meta: object;
42
- errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
43
- transformer: false;
44
- }>;
45
- procedure: import("@trpc/server/unstable-core-do-not-import").ProcedureBuilder<{
46
- auth: {
47
- organizationId: string;
48
- memberId: string;
49
- } | null;
50
- req: import("http").IncomingMessage;
51
- res: import("http").ServerResponse<import("http").IncomingMessage>;
52
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
53
- }, object, object, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, typeof import("@trpc/server/unstable-core-do-not-import").unsetMarker, false>;
54
- middleware: <$ContextOverrides>(fn: import("@trpc/server/unstable-core-do-not-import").MiddlewareFunction<{
55
- auth: {
56
- organizationId: string;
57
- memberId: string;
58
- } | null;
59
- req: import("http").IncomingMessage;
60
- res: import("http").ServerResponse<import("http").IncomingMessage>;
61
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
62
- }, object, object, $ContextOverrides, unknown>) => import("@trpc/server/unstable-core-do-not-import").MiddlewareBuilder<{
63
- auth: {
64
- organizationId: string;
65
- memberId: string;
66
- } | null;
67
- req: import("http").IncomingMessage;
68
- res: import("http").ServerResponse<import("http").IncomingMessage>;
69
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
70
- }, object, $ContextOverrides, unknown>;
71
- router: {
72
- <TInput extends import("@trpc/server").TRPCRouterRecord>(input: TInput): import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
73
- ctx: {
74
- auth: {
75
- organizationId: string;
76
- memberId: string;
77
- } | null;
78
- req: import("http").IncomingMessage;
79
- res: import("http").ServerResponse<import("http").IncomingMessage>;
80
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
81
- };
82
- meta: object;
83
- errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
84
- transformer: false;
85
- }, TInput>;
86
- <TInput_1 extends import("@trpc/server/unstable-core-do-not-import").CreateRouterOptions>(input: TInput_1): import("@trpc/server/unstable-core-do-not-import").BuiltRouter<{
87
- ctx: {
88
- auth: {
89
- organizationId: string;
90
- memberId: string;
91
- } | null;
92
- req: import("http").IncomingMessage;
93
- res: import("http").ServerResponse<import("http").IncomingMessage>;
94
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
95
- };
96
- meta: object;
97
- errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
98
- transformer: false;
99
- }, import("@trpc/server/unstable-core-do-not-import").DecorateCreateRouterOptions<TInput_1>>;
100
- };
101
- mergeRouters: typeof import("@trpc/server/unstable-core-do-not-import").mergeRouters;
102
- createCallerFactory: <TRecord extends import("@trpc/server").TRPCRouterRecord>(router: Pick<import("@trpc/server/unstable-core-do-not-import").Router<{
103
- ctx: {
104
- auth: {
105
- organizationId: string;
106
- memberId: string;
107
- } | null;
108
- req: import("http").IncomingMessage;
109
- res: import("http").ServerResponse<import("http").IncomingMessage>;
110
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
111
- };
112
- meta: object;
113
- errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
114
- transformer: false;
115
- }, TRecord>, "_def">) => import("@trpc/server/unstable-core-do-not-import").RouterCaller<{
116
- ctx: {
117
- auth: {
118
- organizationId: string;
119
- memberId: string;
120
- } | null;
121
- req: import("http").IncomingMessage;
122
- res: import("http").ServerResponse<import("http").IncomingMessage>;
123
- info: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo;
124
- };
125
- meta: object;
126
- errorShape: import("@trpc/server/unstable-core-do-not-import").DefaultErrorShape;
127
- transformer: false;
128
- }, TRecord>;
129
- };
@@ -1,2 +0,0 @@
1
- /** Clippy is our Slack bot for API monitoring. */
2
- export declare function recordClippy(message: string, level?: "info" | "warn" | "error" | "celebrate"): void;
@@ -1,19 +0,0 @@
1
- export declare enum RequestMethod {
2
- POST = "POST",
3
- GET = "GET",
4
- PUT = "PUT"
5
- }
6
- export type RequestResponse<T> = {
7
- statusCode: number;
8
- body: T;
9
- };
10
- /**
11
- * Wrapper function for making requests, assumes request is idempotent
12
- * and will retry on failure and log timings
13
- */
14
- export declare function request<T>({ method, url, headers, jsonBody, }: {
15
- method: RequestMethod;
16
- url: string;
17
- headers: any;
18
- jsonBody?: any;
19
- }): Promise<RequestResponse<T>>;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { All } from './../../types';
3
- type BalanceProps = {
4
- hideIcon?: boolean;
5
- hideSymbol?: boolean;
6
- };
7
- export declare const Balance: React.FC<BalanceProps>;
8
- declare const BalanceButton: React.FC<All & BalanceProps>;
9
- export default BalanceButton;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const SignInWithEthereum: React.FC;
3
- export default SignInWithEthereum;
@@ -1,5 +0,0 @@
1
- export declare const ContentContainer: any;
2
- export declare const LogoContainer: any;
3
- export declare const StatusIcon: any;
4
- export declare const StatusGraphicBgSvg: any;
5
- export declare const StatusGraphic: any;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { SIWESession } from "./../../../siwe";
3
- type ButtonProps = {
4
- showSignOutButton?: boolean;
5
- onSignIn?: (data?: SIWESession) => void;
6
- onSignOut?: () => void;
7
- };
8
- export declare const SIWEButton: React.FC<ButtonProps>;
9
- export declare const SIWEButtonComponent: React.FC<ButtonProps>;
10
- export default SIWEButtonComponent;
@@ -1 +0,0 @@
1
- export declare const SpinnerContainer: any;
@@ -1,42 +0,0 @@
1
- /// <reference types="react" />
2
- import { useQuery } from "@tanstack/react-query";
3
- import { Address } from "viem";
4
- export declare enum StatusState {
5
- READY = "ready",
6
- LOADING = "loading",
7
- SUCCESS = "success",
8
- REJECTED = "rejected",
9
- ERROR = "error"
10
- }
11
- export type SIWESession = {
12
- address: Address;
13
- chainId: number;
14
- };
15
- export type SIWEConfig = {
16
- getNonce: () => Promise<string>;
17
- createMessage: (args: {
18
- nonce: string;
19
- address: Address;
20
- chainId: number;
21
- }) => Promise<string> | string;
22
- verifyMessage: (args: {
23
- message: string;
24
- signature: string;
25
- }) => Promise<boolean>;
26
- getSession: () => Promise<SIWESession | null>;
27
- signOut: () => Promise<boolean>;
28
- enabled?: boolean;
29
- nonceRefetchInterval?: number;
30
- sessionRefetchInterval?: number;
31
- signOutOnDisconnect?: boolean;
32
- signOutOnAccountChange?: boolean;
33
- signOutOnNetworkChange?: boolean;
34
- };
35
- export type SIWEContextValue = Required<SIWEConfig> & {
36
- nonce: ReturnType<typeof useQuery<string | null>>;
37
- session: ReturnType<typeof useQuery<SIWESession | null>>;
38
- status: StatusState;
39
- signIn: () => Promise<SIWESession | false>;
40
- resetStatus: () => void;
41
- };
42
- export declare const SIWEContext: import("react").Context<SIWEContextValue | null>;
@@ -1,11 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { SIWEConfig, SIWESession } from "./SIWEContext";
3
- type Props = SIWEConfig & {
4
- children: ReactNode;
5
- onSignIn?: (data?: SIWESession) => void;
6
- onSignOut?: () => void;
7
- };
8
- export declare const SIWE_NONCE_QUERY_KEY = "ckSiweNonce";
9
- export declare const SIWE_SESSION_QUERY_KEY = "ckSiweSession";
10
- export declare const SIWEProvider: ({ children, enabled, nonceRefetchInterval, sessionRefetchInterval, signOutOnDisconnect, signOutOnAccountChange, signOutOnNetworkChange, onSignIn, onSignOut, ...siweConfig }: Props) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,3 +0,0 @@
1
- export { useSIWE } from "./useSIWE";
2
- export { SIWEProvider, SIWE_SESSION_QUERY_KEY, SIWE_NONCE_QUERY_KEY, } from "./SIWEProvider";
3
- export { SIWEContext, SIWEConfig, SIWESession } from "./SIWEContext";
@@ -1,21 +0,0 @@
1
- import { StatusState, SIWESession } from "./SIWEContext";
2
- type HookProps = {
3
- isSignedIn: boolean;
4
- data?: SIWESession;
5
- status: StatusState;
6
- error?: Error | any;
7
- isRejected: boolean;
8
- isError: boolean;
9
- isLoading: boolean;
10
- isSuccess: boolean;
11
- isReady: boolean;
12
- reset: () => void;
13
- signIn: () => Promise<boolean>;
14
- signOut: () => Promise<boolean>;
15
- };
16
- type UseSIWEConfig = {
17
- onSignIn?: (data?: SIWESession) => void;
18
- onSignOut?: () => void;
19
- };
20
- export declare const useSIWE: ({ onSignIn, onSignOut }?: UseSIWEConfig) => HookProps | any;
21
- export {};