@supanovaapp/sdk 0.2.39 → 0.2.40

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/dist/index.esm.js CHANGED
@@ -65407,7 +65407,7 @@ class e1t {
65407
65407
  constructor(e = { nodeIdentifier: "" }) {
65408
65408
  const n = e.baseURL || void 0 || "https://stage_api.supa.fyi";
65409
65409
  this.nodeIdentifier = e.nodeIdentifier, this.supaAppId = e.supaAppId;
65410
- const r = e.sdkVersion?.trim(), i = "0.2.39".trim();
65410
+ const r = e.sdkVersion?.trim(), i = "0.2.40".trim();
65411
65411
  this.sdkVersion = r || i || void 0, this.client = Ni.create({
65412
65412
  baseURL: n,
65413
65413
  headers: {
@@ -65694,6 +65694,7 @@ class WW {
65694
65694
  * @param templateIds Optional array of template IDs to filter by
65695
65695
  * @param pagination Optional pagination: limit, offset (offset requires limit)
65696
65696
  */
65697
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
65697
65698
  async getActiveContracts(e, n) {
65698
65699
  const r = new URLSearchParams();
65699
65700
  e && e.forEach((a) => r.append("templateIds", a)), n?.limit !== void 0 && r.append("limit", String(n.limit)), n && "offset" in n && n.offset !== void 0 && r.append("offset", String(n.offset));
@@ -67553,7 +67554,7 @@ function B1t() {
67553
67554
  throw new Error("useCantonContext must be used within CantonProvider (inside SupaProvider)");
67554
67555
  return t;
67555
67556
  }
67556
- const U1t = "0.2.39";
67557
+ const U1t = "0.2.40";
67557
67558
  typeof window < "u" && !window.Buffer && (window.Buffer = xft.Buffer, console.log("[Supa SDK] ✅ Buffer polyfill initialized"));
67558
67559
  const pL = tr(null);
67559
67560
  function _Kt({ config: t, children: e }) {
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { CantonService, CantonSubmitPreparedOptions } from '../../services/cantonService';
3
- import { CantonMeResponseDto, CantonActiveContractsResponseDto, CantonQueryCompletionResponseDto, CantonWalletBalancesResponseDto, CantonIncomingTransferDto, CantonTransactionDto, CantonTransactionsParams, CantonPriceInterval, CantonPriceCandleDto, CantonPrepareTransferRequestDto, CantonCalculateTransferFeeResponseDto } from '../../core/types';
3
+ import { CantonMeResponseDto, CantonQueryCompletionResponseDto, CantonWalletBalancesResponseDto, CantonIncomingTransferDto, CantonTransactionDto, CantonTransactionsParams, CantonPriceInterval, CantonPriceCandleDto, CantonPrepareTransferRequestDto, CantonCalculateTransferFeeResponseDto } from '../../core/types';
4
4
  import { CantonWallet } from '../../utils/wallet';
5
5
  export interface CantonSendCoinOptions extends CantonSubmitPreparedOptions {
6
6
  /** Skip confirmation modal. Default: false */
@@ -37,7 +37,7 @@ export interface CantonContextValue {
37
37
  offset?: number;
38
38
  } | {
39
39
  limit?: number;
40
- }) => Promise<CantonActiveContractsResponseDto>;
40
+ }) => Promise<any>;
41
41
  /** Canton wallet balances */
42
42
  cantonBalances: CantonWalletBalancesResponseDto | null;
43
43
  /** Get Canton wallet balances */
@@ -110,7 +110,7 @@ export declare class CantonService {
110
110
  offset?: number;
111
111
  } | {
112
112
  limit?: number;
113
- }): Promise<CantonActiveContractsResponseDto>;
113
+ }): Promise<any>;
114
114
  /**
115
115
  * Sign text message (client-side only, no backend call)
116
116
  * Converts text to bytes and signs with Stellar wallet
@@ -1,9 +1,12 @@
1
- import { CantonActiveContractItem, CantonActiveContractItemLegacy, CantonNormalizedContract } from '../core/types';
1
+ /**
2
+ * Utilities for working with Canton active contracts.
3
+ * Supports both flat (new) and legacy (wrapped) response formats.
4
+ */
2
5
  /**
3
6
  * Type guard: checks if item is in legacy wrapped format
4
7
  */
5
- export declare function isLegacyContractItem(item: CantonActiveContractItem): item is CantonActiveContractItemLegacy;
8
+ export declare function isLegacyContractItem(item: any): boolean;
6
9
  /**
7
10
  * Normalizes a contract item from either format into a consistent shape.
8
11
  */
9
- export declare function normalizeContractItem(item: CantonActiveContractItem): CantonNormalizedContract;
12
+ export declare function normalizeContractItem(item: any): any;
package/package.json CHANGED
@@ -1,70 +1,70 @@
1
1
  {
2
- "name": "@supanovaapp/sdk",
3
- "version": "0.2.39",
4
- "description": "React SDK for Supa Backend + Privy.io integration with Canton Network and EVM Smart Wallets support",
5
- "main": "./dist/index.cjs.js",
6
- "module": "./dist/index.esm.js",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.esm.js",
12
- "require": "./dist/index.cjs.js"
13
- }
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "scripts": {
19
- "dev": "vite",
20
- "build": "vite build",
21
- "build:prod": "vite build --mode production",
22
- "preview": "vite preview",
23
- "type-check": "tsc --noEmit"
24
- },
25
- "keywords": [
26
- "supa",
27
- "privy",
28
- "canton",
29
- "stellar",
30
- "web3",
31
- "react",
32
- "sdk"
33
- ],
34
- "author": "npm@supanova.app",
35
- "license": "MIT",
36
- "peerDependencies": {
37
- "react": "^18.0.0 || ^19.0.0",
38
- "react-dom": "^18.0.0 || ^19.0.0"
39
- },
40
- "peerDependenciesMeta": {
41
- "@solana-program/compute-budget": {
42
- "optional": true
2
+ "name": "@supanovaapp/sdk",
3
+ "version": "0.2.40",
4
+ "description": "React SDK for Supa Backend + Privy.io integration with Canton Network and EVM Smart Wallets support",
5
+ "main": "./dist/index.cjs.js",
6
+ "module": "./dist/index.esm.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.esm.js",
12
+ "require": "./dist/index.cjs.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "dev": "vite",
20
+ "build": "vite build",
21
+ "build:prod": "vite build --mode production",
22
+ "preview": "vite preview",
23
+ "type-check": "tsc --noEmit"
24
+ },
25
+ "keywords": [
26
+ "supa",
27
+ "privy",
28
+ "canton",
29
+ "stellar",
30
+ "web3",
31
+ "react",
32
+ "sdk"
33
+ ],
34
+ "author": "npm@supanova.app",
35
+ "license": "MIT",
36
+ "peerDependencies": {
37
+ "react": "^18.0.0 || ^19.0.0",
38
+ "react-dom": "^18.0.0 || ^19.0.0"
39
+ },
40
+ "peerDependenciesMeta": {
41
+ "@solana-program/compute-budget": {
42
+ "optional": true
43
+ },
44
+ "@solana-program/token-2022": {
45
+ "optional": true
46
+ }
47
+ },
48
+ "dependencies": {
49
+ "@headlessui/react": "^2.2.0",
50
+ "@privy-io/react-auth": "^3.3.0",
51
+ "@solana-program/memo": "^0.8.0",
52
+ "@solana-program/system": "^0.8.0",
53
+ "@solana-program/token": "^0.6.0",
54
+ "@solana/kit": "^3.0.3",
55
+ "axios": "^1.7.9",
56
+ "buffer": "^6.0.3",
57
+ "ox": "^0.8.0",
58
+ "permissionless": "^0.2.24",
59
+ "viem": "^2.21.54"
43
60
  },
44
- "@solana-program/token-2022": {
45
- "optional": true
61
+ "devDependencies": {
62
+ "@types/node": "^22.10.2",
63
+ "@types/react": "^19.0.2",
64
+ "@types/react-dom": "^19.0.2",
65
+ "@vitejs/plugin-react": "^5.0.4",
66
+ "typescript": "^5.9.3",
67
+ "vite": "^7.1.11",
68
+ "vite-plugin-dts": "^4.5.4"
46
69
  }
47
- },
48
- "dependencies": {
49
- "@headlessui/react": "^2.2.0",
50
- "@privy-io/react-auth": "^3.3.0",
51
- "@solana-program/memo": "^0.8.0",
52
- "@solana-program/system": "^0.8.0",
53
- "@solana-program/token": "^0.6.0",
54
- "@solana/kit": "^3.0.3",
55
- "axios": "^1.7.9",
56
- "buffer": "^6.0.3",
57
- "ox": "^0.8.0",
58
- "permissionless": "^0.2.24",
59
- "viem": "^2.21.54"
60
- },
61
- "devDependencies": {
62
- "@types/node": "^22.10.2",
63
- "@types/react": "^19.0.2",
64
- "@types/react-dom": "^19.0.2",
65
- "@vitejs/plugin-react": "^5.0.4",
66
- "typescript": "^5.9.3",
67
- "vite": "^7.1.11",
68
- "vite-plugin-dts": "^4.5.4"
69
- }
70
70
  }