@rougechain/sdk 0.4.1 → 0.5.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 CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  <p align="center">
10
10
  <strong>Build quantum-safe dApps on RougeChain</strong><br />
11
- Transfers · DEX · NFTs · Shielded Transactions · Bridge · Mail · Messenger
11
+ Transfers · DEX · NFTs · Shielded Transactions · Bridge · Rollups · Mail · Messenger
12
12
  </p>
13
13
 
14
14
  <p align="center">
@@ -59,7 +59,8 @@ const { balance } = await rc.getBalance(wallet.publicKey);
59
59
  | **DEX** | `rc.dex` | AMM pools, swaps with slippage protection, liquidity |
60
60
  | **NFTs** | `rc.nft` | RC-721 collections, mint, batch mint, royalties, freeze |
61
61
  | **Shielded** | `rc.shielded` | Private transfers with zk-STARK proofs, shield/unshield XRGE |
62
- | **Bridge** | `rc.bridge` | ETH ↔ qETH, USDC ↔ qUSDC, XRGE bridge (Base Sepolia) |\r
62
+ | **Bridge** | `rc.bridge` | ETH ↔ qETH, USDC ↔ qUSDC, XRGE bridge (Base Mainnet/Sepolia) |
63
+ | **Rollup** | `rc` | zk-STARK batch proofs, rollup status, submit transfers |
63
64
  | **Mail** | `rc.mail` | On-chain encrypted email (`@rouge.quant`) |
64
65
  | **Messenger** | `rc.messenger` | E2E encrypted messaging with self-destruct |
65
66
 
@@ -244,6 +245,29 @@ await rc.bridge.withdrawXrge(wallet, {
244
245
  });
245
246
  ```
246
247
 
248
+ ## Rollup (zk-STARK Batch Proofs)
249
+
250
+ Submit transfers to the rollup accumulator for batched STARK proving. Transfers are collected into batches of up to 32 and proven with a single zk-STARK proof.
251
+
252
+ ```typescript
253
+ // Check rollup status
254
+ const status = await rc.getRollupStatus();
255
+ // { pending_transfers, completed_batches, current_state_root, ... }
256
+
257
+ // Submit a transfer to the rollup batch
258
+ const result = await rc.submitRollupTransfer({
259
+ sender: wallet.publicKey,
260
+ receiver: recipientPubKey,
261
+ amount: 100,
262
+ fee: 1,
263
+ });
264
+ // result.queued = true (waiting for batch) or result.batch_completed = true
265
+
266
+ // Get a completed batch result
267
+ const batch = await rc.getRollupBatch(1);
268
+ // { batch_id, transfer_count, proof_size_bytes, proof_time_ms, verified, ... }
269
+ ```
270
+
247
271
  ## Mail (`rc.mail`)
248
272
 
249
273
  On-chain encrypted email with `@rouge.quant` addresses.
@@ -389,6 +413,7 @@ import type {
389
413
  PriceSnapshot, PoolEvent, PoolStats, SwapQuote,
390
414
  ShieldParams, ShieldedTransferParams, UnshieldParams, ShieldedStats,
391
415
  ShieldedNote,
416
+ RollupStatus, RollupBatchResult, RollupSubmitParams, RollupSubmitResult,
392
417
  } from "@rougechain/sdk";
393
418
  ```
394
419
 
@@ -0,0 +1,199 @@
1
+ import type { WalletKeys, ApiResponse, SignedTransaction, NodeStats, Block, TokenMetadata, BalanceResponse, LiquidityPool, SwapQuote, PoolEvent, PoolStats, NftCollection, NftToken, Validator, BridgeConfig, BridgeWithdrawal, XrgeBridgeConfig, TransferParams, CreateTokenParams, SwapParams, CreatePoolParams, AddLiquidityParams, RemoveLiquidityParams, StakeParams, CreateNftCollectionParams, MintNftParams, BatchMintNftParams, TransferNftParams, BurnNftParams, LockNftParams, FreezeCollectionParams, BridgeWithdrawParams, BridgeClaimParams, XrgeBridgeClaimParams, XrgeBridgeWithdrawParams, SwapQuoteParams, TokenMetadataUpdateParams, TokenHolder, MailMessage, SendMailParams, MessengerWallet, MessengerConversation, MessengerMessage, PriceSnapshot, ShieldParams, ShieldedTransferParams, UnshieldParams, ShieldedStats, RollupStatus, RollupBatchResult, RollupSubmitParams, RollupSubmitResult } from "./types.js";
2
+ import { type ShieldedNote } from "./shielded.js";
3
+ type FetchFn = typeof globalThis.fetch;
4
+ export interface RougeChainOptions {
5
+ /** Custom fetch implementation (defaults to globalThis.fetch) */
6
+ fetch?: FetchFn;
7
+ /** Optional API key for authenticated endpoints */
8
+ apiKey?: string;
9
+ }
10
+ export declare class RougeChain {
11
+ /** @internal */ readonly baseUrl: string;
12
+ /** @internal */ readonly fetchFn: FetchFn;
13
+ /** @internal */ readonly headers: Record<string, string>;
14
+ readonly nft: NftClient;
15
+ readonly dex: DexClient;
16
+ readonly bridge: BridgeClient;
17
+ readonly mail: MailClient;
18
+ readonly messenger: MessengerClient;
19
+ readonly shielded: ShieldedClient;
20
+ constructor(baseUrl: string, options?: RougeChainOptions);
21
+ /** @internal */
22
+ get<T = unknown>(path: string): Promise<T>;
23
+ /** @internal */
24
+ post<T = unknown>(path: string, body: unknown): Promise<T>;
25
+ /** @internal */
26
+ submitTx(endpoint: string, signedTx: SignedTransaction): Promise<ApiResponse>;
27
+ getStats(): Promise<NodeStats>;
28
+ getHealth(): Promise<{
29
+ status: string;
30
+ chain_id: string;
31
+ height: number;
32
+ }>;
33
+ getBlocks(opts?: {
34
+ limit?: number;
35
+ }): Promise<Block[]>;
36
+ getBlocksSummary(range?: "1h" | "24h" | "7d"): Promise<unknown>;
37
+ getBalance(publicKey: string): Promise<BalanceResponse>;
38
+ getTokenBalance(publicKey: string, token: string): Promise<number>;
39
+ getTransactions(opts?: {
40
+ limit?: number;
41
+ offset?: number;
42
+ }): Promise<unknown>;
43
+ getTokens(): Promise<TokenMetadata[]>;
44
+ getTokenMetadata(symbol: string): Promise<TokenMetadata>;
45
+ getTokenHolders(symbol: string): Promise<TokenHolder[]>;
46
+ getTokenTransactions(symbol: string): Promise<unknown>;
47
+ getValidators(): Promise<Validator[]>;
48
+ getValidatorStats(): Promise<unknown>;
49
+ getFinality(): Promise<{
50
+ finalized_height: number;
51
+ tip_height: number;
52
+ total_stake: number;
53
+ finalized_stake: number;
54
+ }>;
55
+ getPeers(): Promise<string[]>;
56
+ getBurnedTokens(): Promise<{
57
+ burned: Record<string, number>;
58
+ total_xrge_burned: number;
59
+ }>;
60
+ transfer(wallet: WalletKeys, params: TransferParams): Promise<ApiResponse>;
61
+ createToken(wallet: WalletKeys, params: CreateTokenParams): Promise<ApiResponse>;
62
+ stake(wallet: WalletKeys, params: StakeParams): Promise<ApiResponse>;
63
+ unstake(wallet: WalletKeys, params: StakeParams): Promise<ApiResponse>;
64
+ faucet(wallet: WalletKeys): Promise<ApiResponse>;
65
+ burn(wallet: WalletKeys, amount: number, fee?: number, token?: string): Promise<ApiResponse>;
66
+ updateTokenMetadata(wallet: WalletKeys, params: TokenMetadataUpdateParams): Promise<ApiResponse>;
67
+ claimTokenMetadata(wallet: WalletKeys, tokenSymbol: string): Promise<ApiResponse>;
68
+ /** Get the current rollup accumulator status. */
69
+ getRollupStatus(): Promise<RollupStatus>;
70
+ /** Submit a transfer into the rollup batch accumulator. */
71
+ submitRollupTransfer(params: RollupSubmitParams): Promise<RollupSubmitResult>;
72
+ /** Get the result of a completed rollup batch by ID. */
73
+ getRollupBatch(batchId: number): Promise<RollupBatchResult>;
74
+ }
75
+ declare class NftClient {
76
+ private readonly rc;
77
+ constructor(rc: RougeChain);
78
+ getCollections(): Promise<NftCollection[]>;
79
+ getCollection(collectionId: string): Promise<NftCollection>;
80
+ /**
81
+ * Poll until a collection exists on-chain (i.e. the create tx has been mined).
82
+ * Useful after `createCollection` since the tx goes to the mempool first.
83
+ * @returns the collection once found, or throws after the timeout.
84
+ */
85
+ waitForCollection(collectionId: string, opts?: {
86
+ timeoutMs?: number;
87
+ pollMs?: number;
88
+ }): Promise<NftCollection>;
89
+ getTokens(collectionId: string, opts?: {
90
+ limit?: number;
91
+ offset?: number;
92
+ }): Promise<{
93
+ tokens: NftToken[];
94
+ total: number;
95
+ }>;
96
+ getToken(collectionId: string, tokenId: number): Promise<NftToken>;
97
+ getByOwner(pubkey: string): Promise<NftToken[]>;
98
+ createCollection(wallet: WalletKeys, params: CreateNftCollectionParams): Promise<ApiResponse>;
99
+ mint(wallet: WalletKeys, params: MintNftParams): Promise<ApiResponse>;
100
+ batchMint(wallet: WalletKeys, params: BatchMintNftParams): Promise<ApiResponse>;
101
+ transfer(wallet: WalletKeys, params: TransferNftParams): Promise<ApiResponse>;
102
+ burn(wallet: WalletKeys, params: BurnNftParams): Promise<ApiResponse>;
103
+ lock(wallet: WalletKeys, params: LockNftParams): Promise<ApiResponse>;
104
+ freezeCollection(wallet: WalletKeys, params: FreezeCollectionParams): Promise<ApiResponse>;
105
+ }
106
+ declare class DexClient {
107
+ private readonly rc;
108
+ constructor(rc: RougeChain);
109
+ getPools(): Promise<LiquidityPool[]>;
110
+ getPool(poolId: string): Promise<LiquidityPool>;
111
+ getPoolEvents(poolId: string): Promise<PoolEvent[]>;
112
+ getPriceHistory(poolId: string): Promise<PriceSnapshot[]>;
113
+ getPoolStats(poolId: string): Promise<PoolStats>;
114
+ quote(params: SwapQuoteParams): Promise<SwapQuote>;
115
+ swap(wallet: WalletKeys, params: SwapParams): Promise<ApiResponse>;
116
+ createPool(wallet: WalletKeys, params: CreatePoolParams): Promise<ApiResponse>;
117
+ addLiquidity(wallet: WalletKeys, params: AddLiquidityParams): Promise<ApiResponse>;
118
+ removeLiquidity(wallet: WalletKeys, params: RemoveLiquidityParams): Promise<ApiResponse>;
119
+ }
120
+ declare class BridgeClient {
121
+ private readonly rc;
122
+ constructor(rc: RougeChain);
123
+ getConfig(): Promise<BridgeConfig>;
124
+ getWithdrawals(): Promise<BridgeWithdrawal[]>;
125
+ /** Withdraw qETH/qUSDC — signed client-side, private key never sent to server */
126
+ withdraw(wallet: WalletKeys, params: BridgeWithdrawParams): Promise<ApiResponse>;
127
+ /** Claim qETH or qUSDC after depositing on Base Sepolia */
128
+ claim(params: BridgeClaimParams): Promise<ApiResponse>;
129
+ getXrgeConfig(): Promise<XrgeBridgeConfig>;
130
+ claimXrge(params: XrgeBridgeClaimParams): Promise<ApiResponse>;
131
+ withdrawXrge(wallet: WalletKeys, params: XrgeBridgeWithdrawParams): Promise<ApiResponse>;
132
+ getXrgeWithdrawals(): Promise<BridgeWithdrawal[]>;
133
+ }
134
+ declare class MailClient {
135
+ private readonly rc;
136
+ constructor(rc: RougeChain);
137
+ send(params: SendMailParams): Promise<ApiResponse>;
138
+ getInbox(walletId: string): Promise<MailMessage[]>;
139
+ getSent(walletId: string): Promise<MailMessage[]>;
140
+ getTrash(walletId: string): Promise<MailMessage[]>;
141
+ getMessage(id: string): Promise<MailMessage>;
142
+ move(messageId: string, folder: string): Promise<ApiResponse>;
143
+ markRead(messageId: string): Promise<ApiResponse>;
144
+ delete(id: string): Promise<ApiResponse>;
145
+ }
146
+ declare class MessengerClient {
147
+ private readonly rc;
148
+ constructor(rc: RougeChain);
149
+ getWallets(): Promise<MessengerWallet[]>;
150
+ registerWallet(opts: {
151
+ id: string;
152
+ displayName: string;
153
+ signingPublicKey: string;
154
+ encryptionPublicKey: string;
155
+ }): Promise<ApiResponse>;
156
+ getConversations(walletId: string, opts?: {
157
+ signingPublicKey?: string;
158
+ encryptionPublicKey?: string;
159
+ }): Promise<MessengerConversation[]>;
160
+ createConversation(participants: string[]): Promise<ApiResponse>;
161
+ getMessages(conversationId: string): Promise<MessengerMessage[]>;
162
+ sendMessage(conversationId: string, sender: string, encryptedContent: string, opts?: {
163
+ mediaType?: string;
164
+ mediaData?: string;
165
+ selfDestruct?: boolean;
166
+ destructAfterSeconds?: number;
167
+ }): Promise<ApiResponse>;
168
+ deleteMessage(messageId: string): Promise<ApiResponse>;
169
+ markRead(messageId: string): Promise<ApiResponse>;
170
+ }
171
+ declare class ShieldedClient {
172
+ private readonly rc;
173
+ constructor(rc: RougeChain);
174
+ getStats(): Promise<ShieldedStats>;
175
+ isNullifierSpent(nullifierHex: string): Promise<{
176
+ spent: boolean;
177
+ }>;
178
+ /**
179
+ * Shield public XRGE into a private note.
180
+ * Creates the commitment client-side, submits to the chain.
181
+ *
182
+ * @returns The ShieldedNote (keep this locally — it's the only way to spend the note)
183
+ */
184
+ shield(wallet: WalletKeys, params: ShieldParams): Promise<ApiResponse & {
185
+ note?: ShieldedNote;
186
+ }>;
187
+ /**
188
+ * Transfer between shielded notes (private → private).
189
+ * Requires a pre-generated STARK proof.
190
+ */
191
+ transfer(wallet: WalletKeys, params: ShieldedTransferParams): Promise<ApiResponse>;
192
+ /**
193
+ * Unshield a private note back to public XRGE.
194
+ * Requires a STARK proof of note ownership.
195
+ */
196
+ unshield(wallet: WalletKeys, params: UnshieldParams): Promise<ApiResponse>;
197
+ }
198
+ export {};
199
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,SAAS,EACT,SAAS,EACT,SAAS,EACT,aAAa,EACb,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,eAAe,EACf,yBAAyB,EACzB,WAAW,EACX,WAAW,EACX,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAEtE,KAAK,OAAO,GAAG,OAAO,UAAU,CAAC,KAAK,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;CAC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AAC,WAAW,CAAC;IAWhE,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAOhE,WAAW,CACf,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EACxB,IAAI,GAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC1B,GACL,OAAO,CAAC,WAAW,CAAC;IAiBjB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAatD,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAUxD;AAID,cAAM,cAAc;IACN,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,UAAU;IAIrC,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC;IAIlC,gBAAgB,CACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;IAQ9B;;;;;OAKG;IACG,MAAM,CACV,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,WAAW,GAAG;QAAE,IAAI,CAAC,EAAE,YAAY,CAAA;KAAE,CAAC;IAUjD;;;OAGG;IACG,QAAQ,CACZ,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,WAAW,CAAC;IAWvB;;;OAGG;IACG,QAAQ,CACZ,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,WAAW,CAAC;CASxB"}
package/dist/index.cjs CHANGED
@@ -496,6 +496,23 @@ var RougeChain = class {
496
496
  const tx = createSignedTokenMetadataClaim(wallet, tokenSymbol);
497
497
  return this.submitTx("/v2/token/metadata/claim", tx);
498
498
  }
499
+ // ===== Rollup =====
500
+ /** Get the current rollup accumulator status. */
501
+ async getRollupStatus() {
502
+ const data = await this.get("/v2/rollup/status");
503
+ return data.rollup;
504
+ }
505
+ /** Submit a transfer into the rollup batch accumulator. */
506
+ async submitRollupTransfer(params) {
507
+ return this.post("/v2/rollup/submit", params);
508
+ }
509
+ /** Get the result of a completed rollup batch by ID. */
510
+ async getRollupBatch(batchId) {
511
+ const data = await this.get(
512
+ `/v2/rollup/batch/${batchId}`
513
+ );
514
+ return data.batch;
515
+ }
499
516
  };
500
517
  var NftClient = class {
501
518
  constructor(rc) {