@supanovaapp/sdk 0.2.37 → 0.2.38
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 +3 -2
- package/dist/core/client.d.ts +3 -0
- package/dist/core/types.d.ts +2 -2
- package/dist/index.cjs.js +195 -195
- package/dist/index.esm.js +2720 -2714
- package/dist/providers/canton/types.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -513,13 +513,14 @@ const { calculateTransferFee } = useCanton();
|
|
|
513
513
|
|
|
514
514
|
const feeCc = await calculateTransferFee(
|
|
515
515
|
'USDC', // instrumentId (optional, defaults to Amulet)
|
|
516
|
-
'token-admin::1220abc123...' // optional instrumentAdmin
|
|
516
|
+
'token-admin::1220abc123...', // optional instrumentAdmin
|
|
517
|
+
'receiver-party::1220abc123...' // optional partyId (recommended: recipient)
|
|
517
518
|
);
|
|
518
519
|
|
|
519
520
|
console.log('Transfer fee (CC):', feeCc);
|
|
520
521
|
```
|
|
521
522
|
|
|
522
|
-
**Note**: The amount cannot have more than 10 decimal places. Transfers are only supported to wallets with preapproved transfers enabled.
|
|
523
|
+
**Note**: The amount cannot have more than 10 decimal places. Transfers are only supported to wallets with preapproved transfers enabled. If `partyId` is omitted, SDK falls back to the current user party ID.
|
|
523
524
|
|
|
524
525
|
#### Submit a Transaction
|
|
525
526
|
|
package/dist/core/client.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export interface ClientConfig {
|
|
|
4
4
|
nodeIdentifier: string;
|
|
5
5
|
/** Optional app identifier for app-specific backend rules */
|
|
6
6
|
supaAppId?: string;
|
|
7
|
+
/** Optional SDK version (sent as X-Supa-SDK header) */
|
|
8
|
+
sdkVersion?: string;
|
|
7
9
|
getAccessToken?: () => Promise<string | null>;
|
|
8
10
|
}
|
|
9
11
|
export declare class ApiClient {
|
|
@@ -11,6 +13,7 @@ export declare class ApiClient {
|
|
|
11
13
|
private getAccessToken?;
|
|
12
14
|
private nodeIdentifier;
|
|
13
15
|
private supaAppId?;
|
|
16
|
+
private sdkVersion?;
|
|
14
17
|
constructor(config?: ClientConfig);
|
|
15
18
|
get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>;
|
|
16
19
|
post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -272,8 +272,8 @@ export interface CantonPrepareTransferResponseDto extends CantonPrepareTransacti
|
|
|
272
272
|
}
|
|
273
273
|
/** Request params for transfer fee calculation */
|
|
274
274
|
export interface CantonCalculateTransferFeeRequestDto {
|
|
275
|
-
/**
|
|
276
|
-
partyId
|
|
275
|
+
/** Party ID used for fee calculation (receiver recommended for transfer flows) */
|
|
276
|
+
partyId?: string;
|
|
277
277
|
/** Instrument ID of the transferred token */
|
|
278
278
|
instrumentId: string;
|
|
279
279
|
/** Optional instrument admin party ID */
|