@revealui/services 0.0.0-canary-20260401205250

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 (88) hide show
  1. package/LICENSE +22 -0
  2. package/LICENSE.commercial +111 -0
  3. package/README.md +177 -0
  4. package/dist/client/index.d.ts +11 -0
  5. package/dist/client/index.d.ts.map +1 -0
  6. package/dist/client/index.js +12 -0
  7. package/dist/client/index.js.map +1 -0
  8. package/dist/index.d.ts +34 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +44 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/revealcoin/__tests__/client.test.d.ts +2 -0
  13. package/dist/revealcoin/__tests__/client.test.d.ts.map +1 -0
  14. package/dist/revealcoin/__tests__/client.test.js +211 -0
  15. package/dist/revealcoin/__tests__/client.test.js.map +1 -0
  16. package/dist/revealcoin/__tests__/config.test.d.ts +2 -0
  17. package/dist/revealcoin/__tests__/config.test.d.ts.map +1 -0
  18. package/dist/revealcoin/__tests__/config.test.js +91 -0
  19. package/dist/revealcoin/__tests__/config.test.js.map +1 -0
  20. package/dist/revealcoin/__tests__/oracle.test.d.ts +2 -0
  21. package/dist/revealcoin/__tests__/oracle.test.d.ts.map +1 -0
  22. package/dist/revealcoin/__tests__/oracle.test.js +238 -0
  23. package/dist/revealcoin/__tests__/oracle.test.js.map +1 -0
  24. package/dist/revealcoin/__tests__/safeguards.test.d.ts +2 -0
  25. package/dist/revealcoin/__tests__/safeguards.test.d.ts.map +1 -0
  26. package/dist/revealcoin/__tests__/safeguards.test.js +571 -0
  27. package/dist/revealcoin/__tests__/safeguards.test.js.map +1 -0
  28. package/dist/revealcoin/client.d.ts +51 -0
  29. package/dist/revealcoin/client.d.ts.map +1 -0
  30. package/dist/revealcoin/client.js +211 -0
  31. package/dist/revealcoin/client.js.map +1 -0
  32. package/dist/revealcoin/config.d.ts +32 -0
  33. package/dist/revealcoin/config.d.ts.map +1 -0
  34. package/dist/revealcoin/config.js +54 -0
  35. package/dist/revealcoin/config.js.map +1 -0
  36. package/dist/revealcoin/index.d.ts +5 -0
  37. package/dist/revealcoin/index.d.ts.map +1 -0
  38. package/dist/revealcoin/index.js +5 -0
  39. package/dist/revealcoin/index.js.map +1 -0
  40. package/dist/revealcoin/oracle.d.ts +81 -0
  41. package/dist/revealcoin/oracle.d.ts.map +1 -0
  42. package/dist/revealcoin/oracle.js +211 -0
  43. package/dist/revealcoin/oracle.js.map +1 -0
  44. package/dist/revealcoin/safeguards.d.ts +92 -0
  45. package/dist/revealcoin/safeguards.d.ts.map +1 -0
  46. package/dist/revealcoin/safeguards.js +242 -0
  47. package/dist/revealcoin/safeguards.js.map +1 -0
  48. package/dist/stripe/db-circuit-breaker.d.ts +47 -0
  49. package/dist/stripe/db-circuit-breaker.d.ts.map +1 -0
  50. package/dist/stripe/db-circuit-breaker.js +223 -0
  51. package/dist/stripe/db-circuit-breaker.js.map +1 -0
  52. package/dist/stripe/index.d.ts +3 -0
  53. package/dist/stripe/index.d.ts.map +1 -0
  54. package/dist/stripe/index.js +3 -0
  55. package/dist/stripe/index.js.map +1 -0
  56. package/dist/stripe/payment-intent.d.ts +21 -0
  57. package/dist/stripe/payment-intent.d.ts.map +1 -0
  58. package/dist/stripe/payment-intent.js +87 -0
  59. package/dist/stripe/payment-intent.js.map +1 -0
  60. package/dist/stripe/stripeClient.d.ts +126 -0
  61. package/dist/stripe/stripeClient.d.ts.map +1 -0
  62. package/dist/stripe/stripeClient.js +226 -0
  63. package/dist/stripe/stripeClient.js.map +1 -0
  64. package/dist/supabase/index.d.ts +6 -0
  65. package/dist/supabase/index.d.ts.map +1 -0
  66. package/dist/supabase/index.js +5 -0
  67. package/dist/supabase/index.js.map +1 -0
  68. package/dist/supabase/resilience.d.ts +50 -0
  69. package/dist/supabase/resilience.d.ts.map +1 -0
  70. package/dist/supabase/resilience.js +166 -0
  71. package/dist/supabase/resilience.js.map +1 -0
  72. package/dist/supabase/types.d.ts +206 -0
  73. package/dist/supabase/types.d.ts.map +1 -0
  74. package/dist/supabase/types.js +19 -0
  75. package/dist/supabase/types.js.map +1 -0
  76. package/dist/supabase/utils/client.d.ts +4 -0
  77. package/dist/supabase/utils/client.d.ts.map +1 -0
  78. package/dist/supabase/utils/client.js +12 -0
  79. package/dist/supabase/utils/client.js.map +1 -0
  80. package/dist/supabase/utils/server.d.ts +10 -0
  81. package/dist/supabase/utils/server.d.ts.map +1 -0
  82. package/dist/supabase/utils/server.js +49 -0
  83. package/dist/supabase/utils/server.js.map +1 -0
  84. package/dist/supabase/utils/web.d.ts +4 -0
  85. package/dist/supabase/utils/web.d.ts.map +1 -0
  86. package/dist/supabase/utils/web.js +37 -0
  87. package/dist/supabase/utils/web.js.map +1 -0
  88. package/package.json +104 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 RevealUI Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,111 @@
1
+ RevealUI Commercial License
2
+ Version 1.0, February 2026
3
+
4
+ Copyright (c) 2025-2026 RevealUI Studio (founder@revealui.com)
5
+
6
+ TERMS AND CONDITIONS
7
+
8
+ 1. DEFINITIONS
9
+
10
+ "Software" means the RevealUI source code, documentation, and associated
11
+ files contained in directories and packages designated as commercial,
12
+ including but not limited to: packages/ai, packages/harnesses, and any
13
+ directory named "ee" within the repository.
14
+
15
+ "License Key" means a valid RevealUI license key obtained through an active
16
+ paid subscription at https://revealui.com.
17
+
18
+ "Licensee" means the individual or organization that holds a valid License
19
+ Key through an active subscription.
20
+
21
+ "Production Use" means any use of the Software beyond local development and
22
+ evaluation, including but not limited to: deploying the Software to serve
23
+ end users, integrating the Software into a product or service, or using the
24
+ Software in a revenue-generating capacity.
25
+
26
+ 2. GRANT OF RIGHTS
27
+
28
+ Subject to the terms of this License and a valid License Key, the Licensee
29
+ is granted a non-exclusive, non-transferable, revocable license to:
30
+
31
+ (a) Use the Software for internal development and Production Use.
32
+ (b) Modify the Software for internal use.
33
+ (c) Deploy the Software on infrastructure controlled by the Licensee.
34
+
35
+ Enterprise License holders are additionally granted the right to:
36
+
37
+ (d) Deploy the Software in a self-hosted environment.
38
+ (e) Remove or replace RevealUI branding (white-label).
39
+ (f) Use the Software for multiple tenants within the Licensee's
40
+ organization or customer base.
41
+
42
+ 3. RESTRICTIONS
43
+
44
+ The Licensee SHALL NOT:
45
+
46
+ (a) Provide the Software, or any portion of it, to third parties as a
47
+ hosted or managed service that competes with RevealUI.
48
+ (b) Redistribute, sublicense, sell, or otherwise transfer the Software
49
+ or any portion of it to third parties.
50
+ (c) Remove, alter, or circumvent the license key verification
51
+ functionality of the Software.
52
+ (d) Use the Software in Production without a valid License Key.
53
+ (e) Share, publish, or make the License Key available to unauthorized
54
+ parties.
55
+
56
+ 4. EVALUATION
57
+
58
+ The Software may be used for evaluation and local development purposes
59
+ without a License Key. Evaluation use does not grant any rights to
60
+ Production Use.
61
+
62
+ 5. SUBSCRIPTION AND PAYMENT
63
+
64
+ This License is valid only during the term of an active paid subscription.
65
+ Upon cancellation or expiration of the subscription:
66
+
67
+ (a) The License terminates automatically.
68
+ (b) A grace period of fourteen (14) days is provided for the Licensee
69
+ to transition away from Production Use.
70
+ (c) After the grace period, the Licensee must cease all Production Use
71
+ of the Software.
72
+
73
+ 6. INTELLECTUAL PROPERTY
74
+
75
+ The Software is and remains the intellectual property of RevealUI Studio.
76
+ This License does not grant any ownership rights. Contributions to
77
+ commercial portions of the Software require a Contributor License Agreement.
78
+
79
+ 7. OPEN SOURCE COMPONENTS
80
+
81
+ This License applies only to files and directories designated as commercial.
82
+ Files under the MIT License (as indicated in the root LICENSE file) are not
83
+ subject to this commercial license and may be used freely under MIT terms.
84
+
85
+ 8. DISCLAIMER OF WARRANTY
86
+
87
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
88
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
89
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
90
+
91
+ 9. LIMITATION OF LIABILITY
92
+
93
+ IN NO EVENT SHALL REVEALUI STUDIO BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
94
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
95
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
96
+ DEALINGS IN THE SOFTWARE, EXCEEDING THE AMOUNT PAID BY THE LICENSEE IN
97
+ THE TWELVE (12) MONTHS PRECEDING THE CLAIM.
98
+
99
+ 10. GOVERNING LAW
100
+
101
+ This License shall be governed by the laws of the State of California,
102
+ United States of America, without regard to its conflict of law provisions.
103
+
104
+ 11. ENTIRE AGREEMENT
105
+
106
+ This License constitutes the entire agreement between the parties with
107
+ respect to the commercial portions of the Software and supersedes all
108
+ prior agreements, understandings, and communications.
109
+
110
+ For licensing inquiries: founder@revealui.com
111
+ For pricing and subscriptions: https://revealui.com/pricing
package/README.md ADDED
@@ -0,0 +1,177 @@
1
+ # @revealui/services
2
+
3
+ > **Commercial package** — requires a [RevealUI Pro license](https://revealui.com/pro). Free to install and evaluate; a license key is required for production use.
4
+
5
+
6
+ External service integrations for RevealUI — Stripe, Supabase, and Vercel.
7
+
8
+ ## Features
9
+
10
+ - **Stripe Integration**: Payment processing and billing operations
11
+ - **Supabase Integration**: Database and auth client utilities
12
+ - **Vercel Integration**: Blob storage and deployment management
13
+ - **Type-safe**: Full TypeScript support
14
+ - **Server & Client**: Separate exports for server-side and client-side usage
15
+
16
+ ## Installation
17
+
18
+ This package is private and only used within the RevealUI monorepo via `workspace:*` references.
19
+
20
+ ## Usage
21
+
22
+ ### Server-side
23
+
24
+ ```typescript
25
+ import { stripeClient } from '@revealui/services/server'
26
+
27
+ // Use Stripe
28
+ const customer = await stripeClient.customers.create({
29
+ email: 'customer@example.com',
30
+ name: 'Customer Name'
31
+ })
32
+ ```
33
+
34
+ ### Client-side
35
+
36
+ ```typescript
37
+ import { createSupabaseClient } from '@revealui/services/client'
38
+
39
+ const supabase = createSupabaseClient()
40
+
41
+ // Query data
42
+ const { data, error } = await supabase
43
+ .from('posts')
44
+ .select('*')
45
+ .eq('published', true)
46
+ ```
47
+
48
+ ## Available Exports
49
+
50
+ ### `@revealui/services/server`
51
+
52
+ Server-side integrations (Node.js/Next.js API routes only):
53
+
54
+ - Stripe client
55
+ - Supabase admin client
56
+ - Vercel API client
57
+
58
+ ### `@revealui/services/client`
59
+
60
+ Client-side integrations (browser-safe):
61
+
62
+ - Supabase client factory
63
+ - Browser-compatible utilities
64
+
65
+ ## Stripe Integration
66
+
67
+ ```typescript
68
+ import { stripeClient } from '@revealui/services/server'
69
+
70
+ // Create customer
71
+ const customer = await stripeClient.customers.create({
72
+ email: 'user@example.com'
73
+ })
74
+
75
+ // Create payment intent
76
+ const paymentIntent = await stripeClient.paymentIntents.create({
77
+ amount: 2000,
78
+ currency: 'usd',
79
+ customer: customer.id
80
+ })
81
+
82
+ // Create subscription
83
+ const subscription = await stripeClient.subscriptions.create({
84
+ customer: customer.id,
85
+ items: [{ price: 'price_xxxxx' }]
86
+ })
87
+ ```
88
+
89
+ ## Supabase Integration
90
+
91
+ ```typescript
92
+ import { createSupabaseClient } from '@revealui/services/client'
93
+
94
+ const supabase = createSupabaseClient()
95
+
96
+ // Query data
97
+ const { data: posts } = await supabase
98
+ .from('posts')
99
+ .select('*')
100
+ .order('created_at', { ascending: false })
101
+
102
+ // Insert data
103
+ const { data: newPost } = await supabase
104
+ .from('posts')
105
+ .insert({ title: 'New Post', content: 'Content here' })
106
+ .select()
107
+ .single()
108
+
109
+ // Real-time subscription
110
+ const channel = supabase
111
+ .channel('posts-changes')
112
+ .on('postgres_changes', {
113
+ event: '*',
114
+ schema: 'public',
115
+ table: 'posts'
116
+ }, (payload) => {
117
+ console.log('Change detected:', payload)
118
+ })
119
+ .subscribe()
120
+ ```
121
+
122
+ ## Environment Variables
123
+
124
+ Required environment variables:
125
+
126
+ ```env
127
+ # Stripe
128
+ STRIPE_SECRET_KEY=sk_test_...
129
+ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
130
+
131
+ # Supabase
132
+ SUPABASE_URL=https://....supabase.co
133
+ SUPABASE_ANON_KEY=eyJ...
134
+ SUPABASE_SERVICE_ROLE_KEY=eyJ...
135
+
136
+ # Vercel
137
+ VERCEL_API_KEY=vercel_...
138
+ BLOB_READ_WRITE_TOKEN=vercel_blob_...
139
+ ```
140
+
141
+ ## Development
142
+
143
+ ```bash
144
+ # Build package
145
+ pnpm --filter @revealui/services build
146
+
147
+ # Run tests
148
+ pnpm --filter @revealui/services test
149
+
150
+ # Watch mode
151
+ pnpm --filter @revealui/services dev
152
+
153
+ # Type check
154
+ pnpm --filter @revealui/services typecheck
155
+ ```
156
+
157
+ ## Testing
158
+
159
+ ```bash
160
+ # Run all tests
161
+ pnpm --filter @revealui/services test
162
+
163
+ # Run tests in watch mode
164
+ pnpm --filter @revealui/services test:watch
165
+
166
+ # Run with coverage
167
+ pnpm --filter @revealui/services test:coverage
168
+ ```
169
+
170
+ ## Related Documentation
171
+
172
+ - [Environment Variables Guide](../../docs/ENVIRONMENT_VARIABLES_GUIDE.md) - Service API keys setup
173
+ - [Architecture](../../docs/ARCHITECTURE.md) - Service integration patterns
174
+
175
+ ## License
176
+
177
+ Commercial — see [LICENSE.commercial](../../LICENSE.commercial)
@@ -0,0 +1,11 @@
1
+ /**
2
+ * services/client - Client-side Services
3
+ *
4
+ * Client-side service integrations for browser environments:
5
+ * - Browser clients
6
+ *
7
+ * These are client-side implementations for use in React
8
+ * components and browser environments.
9
+ */
10
+ export { createBrowserClient } from '../supabase/index.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * services/client - Client-side Services
3
+ *
4
+ * Client-side service integrations for browser environments:
5
+ * - Browser clients
6
+ *
7
+ * These are client-side implementations for use in React
8
+ * components and browser environments.
9
+ */
10
+ // Export browser client creation functions
11
+ export { createBrowserClient } from '../supabase/index.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,2CAA2C;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * services - Shared Services Package
3
+ *
4
+ * Provides server-side and client-side service integrations:
5
+ * - Stripe payment processing
6
+ * - Supabase database and auth
7
+ *
8
+ * ## Usage
9
+ *
10
+ * ### Full Package (Recommended)
11
+ * ```typescript
12
+ * import { protectedStripe, createServerClient, createBrowserClient } from 'services'
13
+ * ```
14
+ *
15
+ * ### Core (Server-side)
16
+ * ```typescript
17
+ * import { createServerClient, protectedStripe } from 'services/server'
18
+ * ```
19
+ *
20
+ * ### Client (Browser)
21
+ * ```typescript
22
+ * import { createBrowserClient } from 'services/client'
23
+ * ```
24
+ */
25
+ /**
26
+ * Check if payment services are licensed for use.
27
+ * Returns false with a warning log if no Pro/Enterprise license is active.
28
+ */
29
+ export declare function checkServicesLicense(): boolean;
30
+ export * from './client/index.js';
31
+ export * from './revealcoin/index.js';
32
+ export * from './stripe/index.js';
33
+ export * from './supabase/index.js';
34
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAS9C;AAGD,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,44 @@
1
+ /**
2
+ * services - Shared Services Package
3
+ *
4
+ * Provides server-side and client-side service integrations:
5
+ * - Stripe payment processing
6
+ * - Supabase database and auth
7
+ *
8
+ * ## Usage
9
+ *
10
+ * ### Full Package (Recommended)
11
+ * ```typescript
12
+ * import { protectedStripe, createServerClient, createBrowserClient } from 'services'
13
+ * ```
14
+ *
15
+ * ### Core (Server-side)
16
+ * ```typescript
17
+ * import { createServerClient, protectedStripe } from 'services/server'
18
+ * ```
19
+ *
20
+ * ### Client (Browser)
21
+ * ```typescript
22
+ * import { createBrowserClient } from 'services/client'
23
+ * ```
24
+ */
25
+ import { isFeatureEnabled } from '@revealui/core/features';
26
+ import { logger } from '@revealui/core/observability/logger';
27
+ /**
28
+ * Check if payment services are licensed for use.
29
+ * Returns false with a warning log if no Pro/Enterprise license is active.
30
+ */
31
+ export function checkServicesLicense() {
32
+ if (!isFeatureEnabled('payments')) {
33
+ logger.warn('[@revealui/services] Payment and service integrations require a Pro or Enterprise license. ' +
34
+ 'Visit https://revealui.com/pricing for details.');
35
+ return false;
36
+ }
37
+ return true;
38
+ }
39
+ // Re-export client (client-side) exports
40
+ export * from './client/index.js';
41
+ export * from './revealcoin/index.js';
42
+ export * from './stripe/index.js';
43
+ export * from './supabase/index.js';
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,MAAM,CAAC,IAAI,CACT,6FAA6F;YAC3F,iDAAiD,CACpD,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,yCAAyC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=client.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.test.d.ts","sourceRoot":"","sources":["../../../src/revealcoin/__tests__/client.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,211 @@
1
+ import { beforeEach, describe, expect, it, vi } from 'vitest';
2
+ // All mock fns must be created via vi.hoisted() so they exist when vi.mock factories run
3
+ const { mockGetTransaction, mockGetTokenAccountsByOwner, mockIsOpen, mockRecordSuccess, mockRecordFailure, mockReset, } = vi.hoisted(() => ({
4
+ mockGetTransaction: vi.fn(),
5
+ mockGetTokenAccountsByOwner: vi.fn(),
6
+ mockIsOpen: vi.fn().mockResolvedValue(false),
7
+ mockRecordSuccess: vi.fn().mockResolvedValue(undefined),
8
+ mockRecordFailure: vi.fn().mockResolvedValue(undefined),
9
+ mockReset: vi.fn().mockResolvedValue(undefined),
10
+ }));
11
+ vi.mock('@solana/kit', () => ({
12
+ address: (s) => s,
13
+ signature: (s) => s,
14
+ createSolanaRpc: () => ({
15
+ getTransaction: (...args) => ({ send: () => mockGetTransaction(...args) }),
16
+ getTokenAccountsByOwner: (...args) => ({
17
+ send: () => mockGetTokenAccountsByOwner(...args),
18
+ }),
19
+ }),
20
+ }));
21
+ vi.mock('@revealui/contracts', () => ({
22
+ RVUI_MINT_ADDRESSES: {
23
+ devnet: '4Ysb1gkz21FD2B9P8P5Pm8bHh4CAMKYU1L528e1MigPo',
24
+ 'mainnet-beta': '',
25
+ },
26
+ RVUI_TOKEN_CONFIG: { decimals: 6 },
27
+ RVUI_TOKEN_PROGRAM: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',
28
+ }));
29
+ vi.mock('@revealui/core/observability/logger', () => ({
30
+ createLogger: () => ({
31
+ debug: vi.fn(),
32
+ info: vi.fn(),
33
+ warn: vi.fn(),
34
+ error: vi.fn(),
35
+ }),
36
+ }));
37
+ vi.mock('../config.js', () => ({
38
+ getRevealCoinConfig: vi.fn(() => ({
39
+ network: 'devnet',
40
+ queryCommitment: 'confirmed',
41
+ paymentCommitment: 'finalized',
42
+ })),
43
+ resolveRpcUrl: vi.fn(() => 'https://api.devnet.solana.com'),
44
+ }));
45
+ vi.mock('../../stripe/db-circuit-breaker.js', () => ({
46
+ DbCircuitBreaker: class {
47
+ isOpen = mockIsOpen;
48
+ recordSuccess = mockRecordSuccess;
49
+ recordFailure = mockRecordFailure;
50
+ reset = mockReset;
51
+ },
52
+ }));
53
+ import { getRvuiBalance, verifyRvuiPayment } from '../client.js';
54
+ function resetMocks() {
55
+ mockGetTransaction.mockClear();
56
+ mockGetTokenAccountsByOwner.mockClear();
57
+ mockIsOpen.mockClear();
58
+ mockIsOpen.mockResolvedValue(false);
59
+ mockRecordSuccess.mockClear();
60
+ mockRecordSuccess.mockResolvedValue(undefined);
61
+ mockRecordFailure.mockClear();
62
+ mockRecordFailure.mockResolvedValue(undefined);
63
+ mockReset.mockClear();
64
+ }
65
+ /** Helper to create a mock getTokenAccountsByOwner response */
66
+ function tokenAccountResponse(amount) {
67
+ return {
68
+ value: [
69
+ {
70
+ pubkey: 'mock-ata',
71
+ account: {
72
+ data: {
73
+ parsed: { info: { tokenAmount: { amount } } },
74
+ },
75
+ },
76
+ },
77
+ ],
78
+ };
79
+ }
80
+ describe('getRvuiBalance', () => {
81
+ beforeEach(() => {
82
+ resetMocks();
83
+ });
84
+ it('returns balance for wallet with tokens', async () => {
85
+ mockGetTokenAccountsByOwner.mockResolvedValue(tokenAccountResponse('1000000000'));
86
+ const result = await getRvuiBalance('wallet-with-tokens');
87
+ expect(result.raw).toBe(1000000000n);
88
+ expect(result.uiAmount).toBe(1000);
89
+ expect(mockRecordSuccess).toHaveBeenCalled();
90
+ });
91
+ it('returns zero for wallet without token account', async () => {
92
+ mockGetTokenAccountsByOwner.mockResolvedValue({ value: [] });
93
+ const result = await getRvuiBalance('wallet-no-tokens');
94
+ expect(result.raw).toBe(0n);
95
+ expect(result.uiAmount).toBe(0);
96
+ expect(result.formatted).toBe('0');
97
+ });
98
+ it('throws when circuit breaker is open', async () => {
99
+ mockIsOpen.mockResolvedValue(true);
100
+ await expect(getRvuiBalance('any-wallet')).rejects.toThrow('circuit breaker is OPEN');
101
+ });
102
+ it('retries on timeout errors', async () => {
103
+ mockGetTokenAccountsByOwner
104
+ .mockRejectedValueOnce(new Error('timeout'))
105
+ .mockResolvedValueOnce(tokenAccountResponse('500000'));
106
+ const result = await getRvuiBalance('wallet-retry');
107
+ expect(result.raw).toBe(500000n);
108
+ expect(mockGetTokenAccountsByOwner).toHaveBeenCalledTimes(2);
109
+ });
110
+ it('does not retry non-retryable errors', async () => {
111
+ mockGetTokenAccountsByOwner.mockRejectedValue(new Error('Invalid public key input'));
112
+ await expect(getRvuiBalance('bad-wallet')).rejects.toThrow('Invalid public key input');
113
+ expect(mockGetTokenAccountsByOwner).toHaveBeenCalledTimes(1);
114
+ expect(mockRecordFailure).toHaveBeenCalled();
115
+ });
116
+ });
117
+ describe('verifyRvuiPayment', () => {
118
+ beforeEach(() => {
119
+ resetMocks();
120
+ });
121
+ const mintAddress = '4Ysb1gkz21FD2B9P8P5Pm8bHh4CAMKYU1L528e1MigPo';
122
+ const programId = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
123
+ it('returns valid for correct payment', async () => {
124
+ mockGetTransaction.mockResolvedValue({
125
+ meta: {
126
+ err: null,
127
+ preTokenBalances: [
128
+ {
129
+ mint: mintAddress,
130
+ owner: 'recipient-wallet',
131
+ programId,
132
+ uiTokenAmount: { amount: '0' },
133
+ },
134
+ ],
135
+ postTokenBalances: [
136
+ {
137
+ mint: mintAddress,
138
+ owner: 'recipient-wallet',
139
+ programId,
140
+ uiTokenAmount: { amount: '1000000' },
141
+ },
142
+ ],
143
+ },
144
+ });
145
+ const result = await verifyRvuiPayment('tx-sig-valid', 1000000n, 'recipient-wallet');
146
+ expect(result).toEqual({ valid: true });
147
+ });
148
+ it('rejects when transaction not found', async () => {
149
+ mockGetTransaction.mockResolvedValue(null);
150
+ const result = await verifyRvuiPayment('tx-sig-missing', 1n, 'recipient');
151
+ expect(result).toEqual({
152
+ valid: false,
153
+ error: 'Transaction not found or not yet finalized',
154
+ });
155
+ });
156
+ it('rejects failed transactions', async () => {
157
+ mockGetTransaction.mockResolvedValue({
158
+ meta: {
159
+ err: { InstructionError: [0, 'InsufficientFunds'] },
160
+ preTokenBalances: [],
161
+ postTokenBalances: [],
162
+ },
163
+ });
164
+ const result = await verifyRvuiPayment('tx-sig-failed', 1n, 'recipient');
165
+ expect(result.valid).toBe(false);
166
+ expect(result.error).toContain('Transaction failed');
167
+ });
168
+ it('rejects when recipient did not receive tokens', async () => {
169
+ mockGetTransaction.mockResolvedValue({
170
+ meta: {
171
+ err: null,
172
+ preTokenBalances: [],
173
+ postTokenBalances: [],
174
+ },
175
+ });
176
+ const result = await verifyRvuiPayment('tx-sig-no-transfer', 1n, 'recipient');
177
+ expect(result.valid).toBe(false);
178
+ expect(result.error).toContain('did not receive');
179
+ });
180
+ it('rejects insufficient payment amount', async () => {
181
+ mockGetTransaction.mockResolvedValue({
182
+ meta: {
183
+ err: null,
184
+ preTokenBalances: [
185
+ {
186
+ mint: mintAddress,
187
+ owner: 'recipient',
188
+ programId,
189
+ uiTokenAmount: { amount: '0' },
190
+ },
191
+ ],
192
+ postTokenBalances: [
193
+ {
194
+ mint: mintAddress,
195
+ owner: 'recipient',
196
+ programId,
197
+ uiTokenAmount: { amount: '500' },
198
+ },
199
+ ],
200
+ },
201
+ });
202
+ const result = await verifyRvuiPayment('tx-sig-low', 1000000n, 'recipient');
203
+ expect(result.valid).toBe(false);
204
+ expect(result.error).toContain('Insufficient payment');
205
+ });
206
+ it('throws when circuit breaker is open', async () => {
207
+ mockIsOpen.mockResolvedValue(true);
208
+ await expect(verifyRvuiPayment('tx', 1n, 'recipient')).rejects.toThrow('circuit breaker is OPEN');
209
+ });
210
+ });
211
+ //# sourceMappingURL=client.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.test.js","sourceRoot":"","sources":["../../../src/revealcoin/__tests__/client.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9D,yFAAyF;AACzF,MAAM,EACJ,kBAAkB,EAClB,2BAA2B,EAC3B,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,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AE,WAAW;wBAClB,SAAS;wBACT,aAAa,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE;qBAC/B;iBACF;gBACD,iBAAiB,EAAE;oBACjB;wBACE,IAAI,EAAE,WAAW;wBACjB,KAAK,EAAE,WAAW;wBAClB,SAAS;wBACT,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;qBACjC;iBACF;aACF;SACF,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,YAAY,EAAE,QAAU,EAAE,WAAW,CAAC,CAAC;QAC9E,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,MAAM,CAAE,MAA4B,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;QACnD,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAEnC,MAAM,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CACpE,yBAAyB,CAC1B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.test.d.ts","sourceRoot":"","sources":["../../../src/revealcoin/__tests__/config.test.ts"],"names":[],"mappings":""}