@supanovaapp/sdk 0.2.37 → 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.
- package/README.md +24 -2
- package/dist/core/client.d.ts +3 -0
- package/dist/core/types.d.ts +36 -4
- package/dist/index.cjs.js +256 -256
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.js +2935 -2905
- package/dist/providers/canton/types.d.ts +9 -4
- package/dist/services/cantonService.d.ts +9 -4
- package/dist/utils/canton.d.ts +9 -0
- package/package.json +1 -1
|
@@ -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[]
|
|
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 */
|
|
@@ -47,8 +52,8 @@ export interface CantonContextValue {
|
|
|
47
52
|
sendTransaction: (commands: unknown, disclosedContracts?: unknown, options?: CantonSubmitPreparedOptions) => Promise<CantonQueryCompletionResponseDto>;
|
|
48
53
|
/** Send transfer to another party (defaults to Canton Coin / Amulet) */
|
|
49
54
|
sendCantonCoin: (receiverPartyId: string, amount: string, memo?: string, options?: CantonSendCoinOptions) => Promise<CantonQueryCompletionResponseDto>;
|
|
50
|
-
/** Calculate transfer fee in CC
|
|
51
|
-
calculateTransferFee: (instrumentId?: string, instrumentAdmin?: string) => Promise<CantonCalculateTransferFeeResponseDto>;
|
|
55
|
+
/** Calculate transfer fee in CC (optional partyId override, receiver recommended for transfers) */
|
|
56
|
+
calculateTransferFee: (instrumentId?: string, instrumentAdmin?: string, partyId?: string) => Promise<CantonCalculateTransferFeeResponseDto>;
|
|
52
57
|
/** Setup transfer preapproval (internal, called automatically) */
|
|
53
58
|
setupTransferPreapproval: () => Promise<void>;
|
|
54
59
|
/** Get pending incoming transfers */
|
|
@@ -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
|
-
|
|
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