@supanovaapp/sdk 0.2.38 → 0.2.39

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.
@@ -31,8 +31,13 @@ export interface CantonContextValue {
31
31
  cantonUser: CantonMeResponseDto | null;
32
32
  /** Get Canton user info */
33
33
  getMe: () => Promise<CantonMeResponseDto>;
34
- /** Get active contracts with optional filtering */
35
- getActiveContracts: (templateIds?: string[]) => Promise<CantonActiveContractsResponseDto>;
34
+ /** Get active contracts with optional filtering and pagination */
35
+ getActiveContracts: (templateIds?: string[], pagination?: {
36
+ limit: number;
37
+ offset?: number;
38
+ } | {
39
+ limit?: number;
40
+ }) => Promise<CantonActiveContractsResponseDto>;
36
41
  /** Canton wallet balances */
37
42
  cantonBalances: CantonWalletBalancesResponseDto | null;
38
43
  /** Get Canton wallet balances */
@@ -101,11 +101,16 @@ export declare class CantonService {
101
101
  */
102
102
  getMe(force?: boolean): Promise<CantonMeResponseDto>;
103
103
  /**
104
- * Get active contracts with optional template filtering
105
- * Returns array of active contract items with full contract details
104
+ * Get active contracts with optional template filtering and pagination
106
105
  * @param templateIds Optional array of template IDs to filter by
107
- */
108
- getActiveContracts(templateIds?: string[]): Promise<CantonActiveContractsResponseDto>;
106
+ * @param pagination Optional pagination: limit, offset (offset requires limit)
107
+ */
108
+ getActiveContracts(templateIds?: string[], pagination?: {
109
+ limit: number;
110
+ offset?: number;
111
+ } | {
112
+ limit?: number;
113
+ }): Promise<CantonActiveContractsResponseDto>;
109
114
  /**
110
115
  * Sign text message (client-side only, no backend call)
111
116
  * Converts text to bytes and signs with Stellar wallet
@@ -0,0 +1,9 @@
1
+ import { CantonActiveContractItem, CantonActiveContractItemLegacy, CantonNormalizedContract } from '../core/types';
2
+ /**
3
+ * Type guard: checks if item is in legacy wrapped format
4
+ */
5
+ export declare function isLegacyContractItem(item: CantonActiveContractItem): item is CantonActiveContractItemLegacy;
6
+ /**
7
+ * Normalizes a contract item from either format into a consistent shape.
8
+ */
9
+ export declare function normalizeContractItem(item: CantonActiveContractItem): CantonNormalizedContract;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supanovaapp/sdk",
3
- "version": "0.2.38",
3
+ "version": "0.2.39",
4
4
  "description": "React SDK for Supa Backend + Privy.io integration with Canton Network and EVM Smart Wallets support",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",