@supanovaapp/sdk 0.2.36 → 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>;
@@ -68,6 +68,8 @@ export interface CantonMeResponseDto {
68
68
  partyId: string;
69
69
  /** User email (can be null if not set) */
70
70
  email: string | null;
71
+ /** Public key used in Canton (base64, 32 bytes Ed25519) */
72
+ publicKey?: string | null;
71
73
  /** Indicates whether the transfer preapproval is set and NOT EXPIRED for the party */
72
74
  transferPreapprovalSet: boolean;
73
75
  /** Transfer preapproval expiration date (ISO 8601, can be null) */
@@ -270,8 +272,8 @@ export interface CantonPrepareTransferResponseDto extends CantonPrepareTransacti
270
272
  }
271
273
  /** Request params for transfer fee calculation */
272
274
  export interface CantonCalculateTransferFeeRequestDto {
273
- /** Sender party ID */
274
- partyId: string;
275
+ /** Party ID used for fee calculation (receiver recommended for transfer flows) */
276
+ partyId?: string;
275
277
  /** Instrument ID of the transferred token */
276
278
  instrumentId: string;
277
279
  /** Optional instrument admin party ID */
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shared helpers for hash-signing flows.
3
+ */
4
+ export type SigningChainType = 'stellar' | 'solana';
5
+ export declare const resolveRequestedChainType: (chainType: string, withExportFallback: boolean) => SigningChainType;
6
+ export declare const hexToBytes: (hex: string) => Uint8Array;
7
+ export declare const bytesToHex: (bytes: Uint8Array) => string;
@@ -2,7 +2,7 @@
2
2
  * Wrapper over Privy's signing with automatic confirmation modals
3
3
  *
4
4
  * Shows a confirmation modal before every signing operation
5
- * Supports both Stellar (rawSign) and Solana (signMessage) based on withExport config
5
+ * Supports both Stellar (rawSign) and Solana (signMessage) based on requested chainType
6
6
  */
7
7
  export interface SignRawHashModalOptions {
8
8
  skipModal?: boolean;