swaply-sdk-ts 0.0.5 → 0.0.7

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.
@@ -4,7 +4,7 @@ export declare class SwaplyApiClient {
4
4
  private client;
5
5
  constructor(apiUrl: string, apiKey: string, config?: AxiosRequestConfig);
6
6
  getQuote(sourceChain: number, sourceToken: string, destChain: number, destToken: string, amount: number, slippageBps: bigint, swapType: SwapType, retailUserId?: string | null): Promise<Quote>;
7
- createIntent(quoteId: string, userSourcePublicKey: string, userSourceAddress: string, userDestinationAddress: string, refundAddress: string): Promise<CreateIntentData>;
7
+ createIntent(quoteId: string, userSourcePublicKey: string | null, userSourceAddress: string, userDestinationAddress: string, refundAddress: string): Promise<CreateIntentData>;
8
8
  addApproval(signedData: SignedApproval, intentId: string): Promise<void>;
9
9
  getIntentStatus(intentId: string): Promise<IntentStatus>;
10
10
  listRetailUserHistory(walletAddressOrRetailId: string): Promise<PaginatedResponse<PublicSwapWithAdditionalInfo>>;
package/package.json CHANGED
@@ -1,16 +1,20 @@
1
1
  {
2
2
  "name": "swaply-sdk-ts",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist",
7
7
  "files": [
8
8
  "**"
9
9
  ],
10
+ "types": "./dist/index.d.ts",
10
11
  "dependencies": {
11
12
  "axios": "^1.13.4",
12
13
  "viem": "^2.45.0"
13
14
  },
15
+ "scripts": {
16
+ "build": "rm -rf dist && tsc"
17
+ },
14
18
  "devDependencies": {
15
19
  "@eslint/js": "9.25.1",
16
20
  "@types/bun": "latest",
package/src/apiClient.ts CHANGED
@@ -50,7 +50,7 @@ export class SwaplyApiClient {
50
50
 
51
51
  async createIntent(
52
52
  quoteId: string,
53
- userSourcePublicKey: string,
53
+ userSourcePublicKey: string | null,
54
54
  userSourceAddress: string,
55
55
  userDestinationAddress: string,
56
56
  refundAddress: string,
package/tsconfig.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "outDir": "./dist",
11
11
 
12
12
  // Bundler mode
13
- "moduleResolution": "node",
13
+ "moduleResolution": "bundler",
14
14
  "verbatimModuleSyntax": true,
15
15
 
16
16
  // Best practices
@@ -25,7 +25,7 @@
25
25
 
26
26
  // declarations stuff
27
27
  "declaration": true,
28
- "declarationDir": "dist/types",
28
+ "declarationDir": "./dist",
29
29
  },
30
30
  "include": ["src"],
31
31
  }
File without changes
File without changes
File without changes