@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 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
 
@@ -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>;
@@ -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
- /** Sender party ID */
276
- partyId: string;
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 */