@rotateprotocol/sdk 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/README.md +453 -0
- package/dist/catalog.d.ts +112 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +210 -0
- package/dist/catalog.js.map +1 -0
- package/dist/components/CheckoutForm.d.ts +86 -0
- package/dist/components/CheckoutForm.d.ts.map +1 -0
- package/dist/components/CheckoutForm.js +332 -0
- package/dist/components/CheckoutForm.js.map +1 -0
- package/dist/components/HostedCheckout.d.ts +57 -0
- package/dist/components/HostedCheckout.d.ts.map +1 -0
- package/dist/components/HostedCheckout.js +414 -0
- package/dist/components/HostedCheckout.js.map +1 -0
- package/dist/components/PaymentButton.d.ts +80 -0
- package/dist/components/PaymentButton.d.ts.map +1 -0
- package/dist/components/PaymentButton.js +210 -0
- package/dist/components/PaymentButton.js.map +1 -0
- package/dist/components/RotateProvider.d.ts +115 -0
- package/dist/components/RotateProvider.d.ts.map +1 -0
- package/dist/components/RotateProvider.js +264 -0
- package/dist/components/RotateProvider.js.map +1 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +27 -0
- package/dist/components/index.js.map +1 -0
- package/dist/embed.d.ts +85 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +313 -0
- package/dist/embed.js.map +1 -0
- package/dist/hooks.d.ts +156 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +280 -0
- package/dist/hooks.js.map +1 -0
- package/dist/idl/rotate_connect.json +2572 -0
- package/dist/index.d.ts +505 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1197 -0
- package/dist/index.js.map +1 -0
- package/dist/marketplace.d.ts +257 -0
- package/dist/marketplace.d.ts.map +1 -0
- package/dist/marketplace.js +433 -0
- package/dist/marketplace.js.map +1 -0
- package/dist/platform.d.ts +234 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +268 -0
- package/dist/platform.js.map +1 -0
- package/dist/react.d.ts +140 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +429 -0
- package/dist/react.js.map +1 -0
- package/dist/store.d.ts +213 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +404 -0
- package/dist/store.js.map +1 -0
- package/dist/webhooks.d.ts +149 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +371 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +114 -0
- package/src/catalog.ts +299 -0
- package/src/components/CheckoutForm.tsx +608 -0
- package/src/components/HostedCheckout.tsx +675 -0
- package/src/components/PaymentButton.tsx +348 -0
- package/src/components/RotateProvider.tsx +370 -0
- package/src/components/index.ts +26 -0
- package/src/embed.ts +408 -0
- package/src/hooks.ts +518 -0
- package/src/idl/rotate_connect.json +2572 -0
- package/src/index.ts +1538 -0
- package/src/marketplace.ts +642 -0
- package/src/platform.ts +403 -0
- package/src/react.ts +459 -0
- package/src/store.ts +577 -0
- package/src/webhooks.ts +506 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rotate Protocol SDK
|
|
3
|
+
*
|
|
4
|
+
* Non-custodial P2P payment protocol for Solana.
|
|
5
|
+
* Your keys, your money. We never touch your funds.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { Connection, PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
10
|
+
import * as anchor from '@coral-xyz/anchor';
|
|
11
|
+
import IDL from './idl/rotate_connect.json';
|
|
12
|
+
/** Rotate Protocol Program ID */
|
|
13
|
+
export declare const PROGRAM_ID: PublicKey;
|
|
14
|
+
/** Protocol fee in basis points (3%) */
|
|
15
|
+
export declare const PROTOCOL_FEE_BPS = 300;
|
|
16
|
+
/** Maximum platform fee in basis points (6%) */
|
|
17
|
+
export declare const MAX_PLATFORM_FEE_BPS = 600;
|
|
18
|
+
/** Minimum payment in USD (micro-USD, 6 decimals) - $5.00 */
|
|
19
|
+
export declare const MIN_PAYMENT_USD = 5000000;
|
|
20
|
+
/** Minimum payment in lamports (~$5 at ~$100/SOL) */
|
|
21
|
+
export declare const MIN_PAYMENT_LAMPORTS = 50000000;
|
|
22
|
+
/** Minimum payment in tokens (USDC/USDT) - $5.00 */
|
|
23
|
+
export declare const MIN_PAYMENT_TOKENS = 5000000;
|
|
24
|
+
/** Basis points denominator */
|
|
25
|
+
export declare const BPS = 10000;
|
|
26
|
+
/** Solana Memo Program ID */
|
|
27
|
+
export declare const MEMO_PROGRAM_ID: PublicKey;
|
|
28
|
+
/** 7-digit ID range for platforms and merchants (sequential starting at 1000000) */
|
|
29
|
+
export declare const MIN_RANDOM_ID = 1000000;
|
|
30
|
+
export declare const MAX_RANDOM_ID = 9999999;
|
|
31
|
+
/** PDA Seeds */
|
|
32
|
+
export declare const SEEDS: {
|
|
33
|
+
readonly PROTOCOL: Buffer<ArrayBuffer>;
|
|
34
|
+
readonly PLATFORM: Buffer<ArrayBuffer>;
|
|
35
|
+
readonly MERCHANT: Buffer<ArrayBuffer>;
|
|
36
|
+
readonly LINK: Buffer<ArrayBuffer>;
|
|
37
|
+
};
|
|
38
|
+
/** Token mint addresses by network */
|
|
39
|
+
export declare const TOKEN_MINTS: {
|
|
40
|
+
readonly devnet: {
|
|
41
|
+
readonly USDC: PublicKey;
|
|
42
|
+
readonly USDT: PublicKey;
|
|
43
|
+
};
|
|
44
|
+
readonly 'mainnet-beta': {
|
|
45
|
+
readonly USDC: PublicKey;
|
|
46
|
+
readonly USDT: PublicKey;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type Network = 'devnet' | 'mainnet-beta';
|
|
50
|
+
export type PaymentCurrency = 'SOL' | 'USDC' | 'USDT';
|
|
51
|
+
export interface RotateConfig {
|
|
52
|
+
/** Solana network */
|
|
53
|
+
network: Network;
|
|
54
|
+
/** Custom RPC endpoint (optional) */
|
|
55
|
+
rpcEndpoint?: string;
|
|
56
|
+
/** Program ID override (optional) */
|
|
57
|
+
programId?: PublicKey;
|
|
58
|
+
/** Custom payment page base URL (default: https://rotate.app) */
|
|
59
|
+
paymentBaseUrl?: string;
|
|
60
|
+
/** Custom price API URL for SOL/USD conversion (default: CoinGecko) */
|
|
61
|
+
priceApiUrl?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Custom QR code API URL template (optional).
|
|
64
|
+
* Use `{url}` as placeholder for the encoded payment URL, and `{size}` for the pixel dimension.
|
|
65
|
+
* Default: `https://api.qrserver.com/v1/create-qr-code/?size={size}x{size}&data={url}`
|
|
66
|
+
*/
|
|
67
|
+
qrApiUrl?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Number of retry attempts for link creation when a PDA collision occurs
|
|
70
|
+
* due to concurrent sequential ID assignment. Each retry re-fetches the
|
|
71
|
+
* protocol to get the latest `link_count`. Default: 3.
|
|
72
|
+
*/
|
|
73
|
+
linkCreationRetries?: number;
|
|
74
|
+
}
|
|
75
|
+
export interface Protocol {
|
|
76
|
+
authority: PublicKey;
|
|
77
|
+
treasury: PublicKey;
|
|
78
|
+
usdcMint: PublicKey;
|
|
79
|
+
usdtMint: PublicKey;
|
|
80
|
+
platformCount: number;
|
|
81
|
+
merchantCount: number;
|
|
82
|
+
linkCount: number;
|
|
83
|
+
bump: number;
|
|
84
|
+
}
|
|
85
|
+
export interface Platform {
|
|
86
|
+
id: number;
|
|
87
|
+
admin: PublicKey;
|
|
88
|
+
wallet: PublicKey;
|
|
89
|
+
feeBps: number;
|
|
90
|
+
active: boolean;
|
|
91
|
+
bump: number;
|
|
92
|
+
}
|
|
93
|
+
export interface Merchant {
|
|
94
|
+
id: number;
|
|
95
|
+
platformId: number;
|
|
96
|
+
wallet: PublicKey;
|
|
97
|
+
active: boolean;
|
|
98
|
+
bump: number;
|
|
99
|
+
}
|
|
100
|
+
export interface PaymentLink {
|
|
101
|
+
id: number;
|
|
102
|
+
merchantId: number;
|
|
103
|
+
tokenType: 'Sol' | 'Usdc' | 'Usdt' | 'Usd';
|
|
104
|
+
tokenMint: PublicKey;
|
|
105
|
+
status: 'Pending' | 'PartiallyPaid' | 'Paid' | 'Cancelled';
|
|
106
|
+
allowTips: boolean;
|
|
107
|
+
allowPartial: boolean;
|
|
108
|
+
amount: bigint;
|
|
109
|
+
amountPaid: bigint;
|
|
110
|
+
expiresAt: number;
|
|
111
|
+
orderRef: string;
|
|
112
|
+
bump: number;
|
|
113
|
+
}
|
|
114
|
+
export interface CreatePlatformParams {
|
|
115
|
+
/** Platform fee in basis points (max 600 = 6%) */
|
|
116
|
+
feeBps: number;
|
|
117
|
+
/** Platform wallet address */
|
|
118
|
+
wallet: PublicKey;
|
|
119
|
+
}
|
|
120
|
+
export interface CreateMerchantParams {
|
|
121
|
+
/** Platform ID the merchant belongs to */
|
|
122
|
+
platformId: number;
|
|
123
|
+
/** Merchant's wallet address */
|
|
124
|
+
wallet: PublicKey;
|
|
125
|
+
}
|
|
126
|
+
export interface CreateLinkParams {
|
|
127
|
+
merchantId: number;
|
|
128
|
+
platformId: number;
|
|
129
|
+
/** Amount in lamports (SOL) or micro-units (tokens/USD) */
|
|
130
|
+
amount: bigint;
|
|
131
|
+
/** Expiration timestamp (0 = no expiration) */
|
|
132
|
+
expiresAt?: number;
|
|
133
|
+
allowTips?: boolean;
|
|
134
|
+
allowPartial?: boolean;
|
|
135
|
+
orderRef?: string;
|
|
136
|
+
/** Optional description stored as a memo on-chain (recoverable after cache clear) */
|
|
137
|
+
description?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface PayLinkParams {
|
|
140
|
+
linkId: number;
|
|
141
|
+
merchantId: number;
|
|
142
|
+
platformId: number;
|
|
143
|
+
amount: bigint;
|
|
144
|
+
tip?: bigint;
|
|
145
|
+
}
|
|
146
|
+
export interface DirectPayParams {
|
|
147
|
+
merchantId: number;
|
|
148
|
+
platformId: number;
|
|
149
|
+
/** Amount in lamports (SOL) or micro-units (tokens) */
|
|
150
|
+
amount: bigint;
|
|
151
|
+
/** Your order reference ID */
|
|
152
|
+
orderRef?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface CreateLinkTokenParams extends CreateLinkParams {
|
|
155
|
+
/** Token currency for the link */
|
|
156
|
+
currency: 'USDC' | 'USDT';
|
|
157
|
+
}
|
|
158
|
+
export interface UpdatePlatformParams {
|
|
159
|
+
platformId: number;
|
|
160
|
+
feeBps: number;
|
|
161
|
+
active: boolean;
|
|
162
|
+
/** New wallet address for fee collection */
|
|
163
|
+
newWallet: PublicKey;
|
|
164
|
+
}
|
|
165
|
+
export interface UpdateMerchantParams {
|
|
166
|
+
merchantId: number;
|
|
167
|
+
platformId: number;
|
|
168
|
+
active: boolean;
|
|
169
|
+
/** New wallet address */
|
|
170
|
+
newWallet: PublicKey;
|
|
171
|
+
}
|
|
172
|
+
export declare function getProtocolPda(programId?: PublicKey): [PublicKey, number];
|
|
173
|
+
export declare function getPlatformPda(platformId: number, programId?: PublicKey): [PublicKey, number];
|
|
174
|
+
export declare function getMerchantPda(merchantId: number, programId?: PublicKey): [PublicKey, number];
|
|
175
|
+
export declare function getLinkPda(linkId: number, programId?: PublicKey): [PublicKey, number];
|
|
176
|
+
/**
|
|
177
|
+
* Generate a sample 7-digit ID within the valid range.
|
|
178
|
+
* For testing and display only — on-chain IDs are assigned
|
|
179
|
+
* automatically and sequentially by the protocol.
|
|
180
|
+
*/
|
|
181
|
+
declare function generateSampleId(): number;
|
|
182
|
+
/**
|
|
183
|
+
* Validate that an ID is within the valid 7-digit range
|
|
184
|
+
*/
|
|
185
|
+
declare function isValidId(id: number): boolean;
|
|
186
|
+
/** Memo prefix used by Rotate for on-chain descriptions */
|
|
187
|
+
export declare const MEMO_PREFIX = "rotate:";
|
|
188
|
+
/**
|
|
189
|
+
* Create a memo instruction with a Rotate-prefixed description.
|
|
190
|
+
* Used internally by createLink* methods when `description` is provided.
|
|
191
|
+
*/
|
|
192
|
+
export declare function createMemoInstruction(description: string, signer: PublicKey): TransactionInstruction;
|
|
193
|
+
/**
|
|
194
|
+
* Recover a link description from its creation transaction memo.
|
|
195
|
+
* Returns null if no memo found or if the transaction doesn't have a Rotate memo.
|
|
196
|
+
*
|
|
197
|
+
* @param connection - Solana RPC connection
|
|
198
|
+
* @param linkId - The payment link ID
|
|
199
|
+
* @param programId - Optional custom program ID (defaults to PROGRAM_ID)
|
|
200
|
+
*/
|
|
201
|
+
export declare function getLinkDescription(connection: Connection, linkId: number, programId?: PublicKey): Promise<string | null>;
|
|
202
|
+
/**
|
|
203
|
+
* Calculate fees for a payment.
|
|
204
|
+
* Fees are split 50/50 between buyer and seller.
|
|
205
|
+
*
|
|
206
|
+
* **Rounding note:** When `totalFees` is odd, integer division means the
|
|
207
|
+
* seller share rounds down and the buyer pays one extra micro-unit.
|
|
208
|
+
* At worst this is a fraction of a cent and matches standard financial
|
|
209
|
+
* rounding conventions.
|
|
210
|
+
*
|
|
211
|
+
* @param amount - Payment amount in smallest unit (lamports or micro-USD/tokens).
|
|
212
|
+
* @param platformFeeBps - Platform fee in basis points (0-600).
|
|
213
|
+
*/
|
|
214
|
+
export declare function calculateFees(amount: number, platformFeeBps: number): {
|
|
215
|
+
amount: number;
|
|
216
|
+
protocolFee: number;
|
|
217
|
+
platformFee: number;
|
|
218
|
+
totalFees: number;
|
|
219
|
+
buyerFeeShare: number;
|
|
220
|
+
sellerFeeShare: number;
|
|
221
|
+
buyerPays: number;
|
|
222
|
+
merchantReceives: number;
|
|
223
|
+
};
|
|
224
|
+
export declare class RotateSDK {
|
|
225
|
+
private connection;
|
|
226
|
+
private programId;
|
|
227
|
+
private network;
|
|
228
|
+
private program;
|
|
229
|
+
private paymentBaseUrl;
|
|
230
|
+
private priceApiUrl;
|
|
231
|
+
private qrApiUrl;
|
|
232
|
+
private linkCreationRetries;
|
|
233
|
+
constructor(config: RotateConfig);
|
|
234
|
+
/**
|
|
235
|
+
* Initialize with a wallet (required for transactions)
|
|
236
|
+
*/
|
|
237
|
+
initWithWallet(wallet: anchor.Wallet): void;
|
|
238
|
+
/**
|
|
239
|
+
* Get the Anchor program instance.
|
|
240
|
+
* Throws if `initWithWallet()` has not been called.
|
|
241
|
+
*
|
|
242
|
+
* Returns `any` because the IDL is loaded from JSON at runtime.
|
|
243
|
+
* For full type safety, generate types with `anchor idl type` and
|
|
244
|
+
* cast the return value to `Program<RotateConnect>`.
|
|
245
|
+
*/
|
|
246
|
+
getProgram(): any;
|
|
247
|
+
/**
|
|
248
|
+
* Get connection
|
|
249
|
+
*/
|
|
250
|
+
getConnection(): Connection;
|
|
251
|
+
/**
|
|
252
|
+
* Get protocol data
|
|
253
|
+
*/
|
|
254
|
+
getProtocol(): Promise<Protocol | null>;
|
|
255
|
+
/**
|
|
256
|
+
* Get platform data
|
|
257
|
+
*/
|
|
258
|
+
getPlatform(platformId: number): Promise<Platform | null>;
|
|
259
|
+
/**
|
|
260
|
+
* Get merchant data
|
|
261
|
+
*/
|
|
262
|
+
getMerchant(merchantId: number): Promise<Merchant | null>;
|
|
263
|
+
/**
|
|
264
|
+
* Get payment link data
|
|
265
|
+
*/
|
|
266
|
+
getPaymentLink(linkId: number): Promise<PaymentLink | null>;
|
|
267
|
+
/**
|
|
268
|
+
* Check if a payment link is paid
|
|
269
|
+
*/
|
|
270
|
+
isLinkPaid(linkId: number): Promise<boolean>;
|
|
271
|
+
/**
|
|
272
|
+
* Poll for payment status
|
|
273
|
+
*/
|
|
274
|
+
waitForPayment(linkId: number, timeoutMs?: number): Promise<PaymentLink | null>;
|
|
275
|
+
/**
|
|
276
|
+
* Internal helper: retry a link-creation callback when a PDA collision
|
|
277
|
+
* occurs (e.g. two concurrent `createLink*` calls compute the same
|
|
278
|
+
* `nextLinkId`). On each retry the protocol is re-fetched to pick up
|
|
279
|
+
* the incremented `link_count`.
|
|
280
|
+
*/
|
|
281
|
+
private _retryLinkCreation;
|
|
282
|
+
/**
|
|
283
|
+
* Detect whether an error is a PDA-collision ("account already in use").
|
|
284
|
+
*
|
|
285
|
+
* Checks multiple signals so the heuristic survives Anchor / runtime
|
|
286
|
+
* message changes:
|
|
287
|
+
* 1. Error message substrings (Anchor & system program phrasing).
|
|
288
|
+
* 2. Anchor structured error codes (`err.error.errorCode`).
|
|
289
|
+
* 3. Transaction logs emitted by the runtime.
|
|
290
|
+
*
|
|
291
|
+
* @internal
|
|
292
|
+
*/
|
|
293
|
+
private static _isPdaCollision;
|
|
294
|
+
/**
|
|
295
|
+
* Create a new platform with a random 7-digit ID
|
|
296
|
+
* @returns Transaction signature and the generated platform ID
|
|
297
|
+
*/
|
|
298
|
+
createPlatform(params: CreatePlatformParams): Promise<{
|
|
299
|
+
tx: string;
|
|
300
|
+
platformId: number;
|
|
301
|
+
}>;
|
|
302
|
+
/**
|
|
303
|
+
* Create a new merchant with a random 7-digit ID
|
|
304
|
+
* @returns Transaction signature and the generated merchant ID
|
|
305
|
+
*/
|
|
306
|
+
createMerchant(params: CreateMerchantParams): Promise<{
|
|
307
|
+
tx: string;
|
|
308
|
+
merchantId: number;
|
|
309
|
+
}>;
|
|
310
|
+
/**
|
|
311
|
+
* Create a USD-denominated payment link.
|
|
312
|
+
*
|
|
313
|
+
* Automatically retries on PDA collision (concurrent link creation).
|
|
314
|
+
*/
|
|
315
|
+
createLinkUsd(params: CreateLinkParams): Promise<{
|
|
316
|
+
tx: string;
|
|
317
|
+
linkId: number;
|
|
318
|
+
}>;
|
|
319
|
+
/**
|
|
320
|
+
* Create a SOL payment link.
|
|
321
|
+
*
|
|
322
|
+
* Automatically retries on PDA collision (concurrent link creation).
|
|
323
|
+
*/
|
|
324
|
+
createLinkSol(params: CreateLinkParams): Promise<{
|
|
325
|
+
tx: string;
|
|
326
|
+
linkId: number;
|
|
327
|
+
}>;
|
|
328
|
+
/**
|
|
329
|
+
* Pay a SOL link
|
|
330
|
+
*/
|
|
331
|
+
payLinkSol(params: PayLinkParams): Promise<string>;
|
|
332
|
+
/**
|
|
333
|
+
* Pay a USD link with SOL
|
|
334
|
+
*
|
|
335
|
+
* Includes on-chain price oracle slippage protection. If `expectedLamports` is provided,
|
|
336
|
+
* the contract validates that `lamportsAmount` is within 5% of the expected value.
|
|
337
|
+
* Pass 0n or omit to skip on-chain slippage validation (backwards-compatible).
|
|
338
|
+
*/
|
|
339
|
+
payLinkUsdSol(params: PayLinkParams & {
|
|
340
|
+
lamportsAmount: bigint;
|
|
341
|
+
tipUsd?: bigint;
|
|
342
|
+
tipLamports?: bigint;
|
|
343
|
+
expectedLamports?: bigint;
|
|
344
|
+
}): Promise<string>;
|
|
345
|
+
/**
|
|
346
|
+
* Pay a USD link with token (USDC/USDT)
|
|
347
|
+
*/
|
|
348
|
+
payLinkUsdToken(params: PayLinkParams & {
|
|
349
|
+
tipUsd?: bigint;
|
|
350
|
+
currency: 'USDC' | 'USDT';
|
|
351
|
+
}): Promise<string>;
|
|
352
|
+
/**
|
|
353
|
+
* Cancel a payment link
|
|
354
|
+
*/
|
|
355
|
+
cancelLink(linkId: number, merchantId: number): Promise<string>;
|
|
356
|
+
/**
|
|
357
|
+
* Fetch all merchant accounts belonging to a specific platform using
|
|
358
|
+
* `getProgramAccounts` with a `memcmp` filter.
|
|
359
|
+
*
|
|
360
|
+
* This is **significantly** faster than iterating through every merchant
|
|
361
|
+
* ID sequentially, especially for platforms with many merchants.
|
|
362
|
+
*
|
|
363
|
+
* The filter matches the `platform_id` field at byte offset 12 inside
|
|
364
|
+
* the Merchant account data (8-byte discriminator + 4-byte `id`).
|
|
365
|
+
*
|
|
366
|
+
* @param platformId - The platform ID to filter by.
|
|
367
|
+
* @param activeOnly - If true, only return active merchants (default: false).
|
|
368
|
+
*/
|
|
369
|
+
getMerchantsByPlatform(platformId: number, activeOnly?: boolean): Promise<Merchant[]>;
|
|
370
|
+
/**
|
|
371
|
+
* Update the protocol treasury address (authority only).
|
|
372
|
+
* Only the original protocol authority can call this.
|
|
373
|
+
*/
|
|
374
|
+
updateProtocol(newTreasury: PublicKey): Promise<string>;
|
|
375
|
+
/**
|
|
376
|
+
* Close a completed/cancelled link and reclaim rent SOL back to the merchant wallet.
|
|
377
|
+
* Only works on links with status Paid or Cancelled.
|
|
378
|
+
*/
|
|
379
|
+
closeLink(linkId: number, merchantId: number): Promise<string>;
|
|
380
|
+
/**
|
|
381
|
+
* Create a token (USDC/USDT) payment link.
|
|
382
|
+
*
|
|
383
|
+
* Automatically retries on PDA collision (concurrent link creation).
|
|
384
|
+
*/
|
|
385
|
+
createLinkToken(params: CreateLinkTokenParams): Promise<{
|
|
386
|
+
tx: string;
|
|
387
|
+
linkId: number;
|
|
388
|
+
}>;
|
|
389
|
+
/**
|
|
390
|
+
* Pay a token (USDC/USDT) link
|
|
391
|
+
*/
|
|
392
|
+
payLinkToken(params: PayLinkParams & {
|
|
393
|
+
currency: 'USDC' | 'USDT';
|
|
394
|
+
}): Promise<string>;
|
|
395
|
+
/**
|
|
396
|
+
* Pay with SOL directly (no payment link)
|
|
397
|
+
*/
|
|
398
|
+
paySol(params: DirectPayParams): Promise<string>;
|
|
399
|
+
/**
|
|
400
|
+
* Pay with token (USDC/USDT) directly (no payment link)
|
|
401
|
+
*/
|
|
402
|
+
payToken(params: DirectPayParams & {
|
|
403
|
+
currency: 'USDC' | 'USDT';
|
|
404
|
+
}): Promise<string>;
|
|
405
|
+
/**
|
|
406
|
+
* Update platform settings (admin only)
|
|
407
|
+
*/
|
|
408
|
+
updatePlatform(params: UpdatePlatformParams): Promise<string>;
|
|
409
|
+
/**
|
|
410
|
+
* Update merchant settings (wallet owner only)
|
|
411
|
+
*/
|
|
412
|
+
updateMerchant(params: UpdateMerchantParams): Promise<string>;
|
|
413
|
+
/**
|
|
414
|
+
* Generate payment URL for a link.
|
|
415
|
+
*
|
|
416
|
+
* URL format: `{base}/checkout/?link={id}&network={network}`
|
|
417
|
+
*
|
|
418
|
+
* The checkout page reads query parameters to load payment data from on-chain.
|
|
419
|
+
* Merchant and platform IDs are resolved from the on-chain link automatically,
|
|
420
|
+
* but can be provided explicitly for faster loading.
|
|
421
|
+
*
|
|
422
|
+
* @param linkId - The payment link ID.
|
|
423
|
+
* @param options - Optional overrides for base URL, merchant/platform IDs, and brand.
|
|
424
|
+
*/
|
|
425
|
+
getPaymentUrl(linkId: number, baseUrl?: string): string;
|
|
426
|
+
/**
|
|
427
|
+
* Generate QR code URL for a payment link.
|
|
428
|
+
* Uses the configurable `qrApiUrl` template (default: api.qrserver.com).
|
|
429
|
+
*/
|
|
430
|
+
getQRCodeUrl(linkId: number, baseUrl?: string, size?: number): string;
|
|
431
|
+
/**
|
|
432
|
+
* Get current SOL price in USD.
|
|
433
|
+
* Uses the configurable `priceApiUrl` (defaults to CoinGecko).
|
|
434
|
+
*
|
|
435
|
+
* **Throws** if the price API is unreachable or returns an unexpected
|
|
436
|
+
* format, rather than silently falling back to a stale hardcoded value.
|
|
437
|
+
* Callers that need a fallback should catch the error themselves.
|
|
438
|
+
*
|
|
439
|
+
* @throws {Error} If the price API request fails or returns no price.
|
|
440
|
+
*/
|
|
441
|
+
getSolPrice(): Promise<number>;
|
|
442
|
+
/**
|
|
443
|
+
* Get current SOL price in USD, with a fallback value on failure.
|
|
444
|
+
*
|
|
445
|
+
* Use this when a best-effort price is acceptable (e.g. UI display).
|
|
446
|
+
* For payment-critical paths, prefer `getSolPrice()` which throws on
|
|
447
|
+
* failure so you can surface the error to the user.
|
|
448
|
+
*
|
|
449
|
+
* @param fallback - Price to return if the API call fails (default: 100).
|
|
450
|
+
*/
|
|
451
|
+
getSolPriceSafe(fallback?: number): Promise<number>;
|
|
452
|
+
/**
|
|
453
|
+
* Convert USD to lamports.
|
|
454
|
+
*
|
|
455
|
+
* @throws {Error} If the SOL price cannot be fetched (propagated from `getSolPrice`).
|
|
456
|
+
*/
|
|
457
|
+
usdToLamports(usdAmount: number): Promise<bigint>;
|
|
458
|
+
/**
|
|
459
|
+
* Convert micro-USD to lamports.
|
|
460
|
+
*
|
|
461
|
+
* @throws {Error} If the SOL price cannot be fetched (propagated from `getSolPrice`).
|
|
462
|
+
*/
|
|
463
|
+
microUsdToLamports(microUsd: bigint): Promise<bigint>;
|
|
464
|
+
/**
|
|
465
|
+
* Get token mint address for currency
|
|
466
|
+
*/
|
|
467
|
+
getTokenMint(currency: 'USDC' | 'USDT'): PublicKey;
|
|
468
|
+
/**
|
|
469
|
+
* Get token balance
|
|
470
|
+
*/
|
|
471
|
+
getTokenBalance(walletAddress: PublicKey, currency: 'USDC' | 'USDT'): Promise<number>;
|
|
472
|
+
/**
|
|
473
|
+
* Anchor account discriminators: `sha256("account:<Name>")[0..8]`.
|
|
474
|
+
* Used by `getProgramAccounts` filters and for decode-time validation.
|
|
475
|
+
*
|
|
476
|
+
* To regenerate:
|
|
477
|
+
* ```ts
|
|
478
|
+
* import { createHash } from 'crypto';
|
|
479
|
+
* createHash('sha256').update('account:Merchant').digest().slice(0, 8);
|
|
480
|
+
* ```
|
|
481
|
+
*/
|
|
482
|
+
private static readonly DISCRIMINATORS;
|
|
483
|
+
/** Expected on-chain account sizes (discriminator included). */
|
|
484
|
+
private static readonly ACCOUNT_SIZES;
|
|
485
|
+
/** Validate buffer length and (optionally) discriminator before decoding. */
|
|
486
|
+
private static assertAccountData;
|
|
487
|
+
private decodeProtocol;
|
|
488
|
+
private decodePlatform;
|
|
489
|
+
private decodeMerchant;
|
|
490
|
+
private decodePaymentLink;
|
|
491
|
+
/**
|
|
492
|
+
* Recover a payment link description from its on-chain memo.
|
|
493
|
+
* Returns null if no description was embedded.
|
|
494
|
+
*/
|
|
495
|
+
getLinkDescription(linkId: number): Promise<string | null>;
|
|
496
|
+
}
|
|
497
|
+
export { RotateStore, RotateCart } from './store';
|
|
498
|
+
export type { Currency, Product, ProductInput, LineItem, Discount, DiscountInput, CartTotals, CheckoutResult, BatchLinkResult, StoreConfig, } from './store';
|
|
499
|
+
export { RotateMarketplace, MarketplaceCart } from './marketplace';
|
|
500
|
+
export { RotatePlatformManager } from './platform';
|
|
501
|
+
export type { PlatformManagerConfig, OnboardMerchantInput, OnboardMerchantResult, BulkOnboardResult, MerchantInfo, PlatformStats, } from './platform';
|
|
502
|
+
export type { Vendor, VendorInput, MarketplaceProduct, MarketplaceProductInput, MarketplaceLineItem, VendorSubtotal, MarketplaceCartTotals, MarketplaceCheckoutResult, MarketplaceConfig, } from './marketplace';
|
|
503
|
+
export default RotateSDK;
|
|
504
|
+
export { IDL, generateSampleId, isValidId };
|
|
505
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,UAAU,EACV,SAAS,EACT,sBAAsB,EAGvB,MAAM,iBAAiB,CAAC;AAKzB,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAI5C,OAAO,GAAG,MAAM,2BAA2B,CAAC;AAI5C,iCAAiC;AACjC,eAAO,MAAM,UAAU,WAAgE,CAAC;AAExF,wCAAwC;AACxC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,gDAAgD;AAChD,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,6DAA6D;AAC7D,eAAO,MAAM,eAAe,UAAY,CAAC;AAEzC,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,WAAa,CAAC;AAE/C,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,UAAY,CAAC;AAE5C,+BAA+B;AAC/B,eAAO,MAAM,GAAG,QAAQ,CAAC;AAEzB,6BAA6B;AAC7B,eAAO,MAAM,eAAe,WAA+D,CAAC;AAE5F,oFAAoF;AACpF,eAAO,MAAM,aAAa,UAAU,CAAC;AACrC,eAAO,MAAM,aAAa,UAAU,CAAC;AAErC,gBAAgB;AAChB,eAAO,MAAM,KAAK;;;;;CAKR,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,WAAW;;;;;;;;;CASd,CAAC;AAIX,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,cAAc,CAA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