@silentswap/sdk 0.0.13 → 0.0.15

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/order.d.ts CHANGED
@@ -263,6 +263,9 @@ export declare const EIP712_TYPES_WALLET_GENERATION: {
263
263
  readonly WalletGeneration: readonly [{
264
264
  readonly name: "description";
265
265
  readonly type: "string";
266
+ }, {
267
+ readonly name: "scope";
268
+ readonly type: "string";
266
269
  }, {
267
270
  readonly name: "token";
268
271
  readonly type: "string";
package/dist/order.js CHANGED
@@ -90,6 +90,7 @@ export const EIP712_TYPES_WALLET_GENERATION = {
90
90
  ],
91
91
  WalletGeneration: [
92
92
  { name: 'description', type: 'string' },
93
+ { name: 'scope', type: 'string' },
93
94
  { name: 'token', type: 'string' },
94
95
  ],
95
96
  };
package/dist/sdk.d.ts CHANGED
@@ -126,10 +126,11 @@ export declare function createEip712DocForOrder(quote: QuoteResponse): {
126
126
  };
127
127
  /**
128
128
  * Creates an EIP-712 document for a SilentSwap wallet generator
129
+ * @param scope - scope to narrow reach of wallet
129
130
  * @param token - token to generate a wallet for
130
131
  * @returns EIP-712 document
131
132
  */
132
- export declare function createEip712DocForWalletGeneration(token: string): {
133
+ export declare function createEip712DocForWalletGeneration(scope: string, token: string): {
133
134
  types: {
134
135
  readonly EIP712Domain: readonly [{
135
136
  readonly name: "name";
@@ -144,6 +145,9 @@ export declare function createEip712DocForWalletGeneration(token: string): {
144
145
  readonly WalletGeneration: readonly [{
145
146
  readonly name: "description";
146
147
  readonly type: "string";
148
+ }, {
149
+ readonly name: "scope";
150
+ readonly type: "string";
147
151
  }, {
148
152
  readonly name: "token";
149
153
  readonly type: "string";
@@ -157,6 +161,7 @@ export declare function createEip712DocForWalletGeneration(token: string): {
157
161
  primaryType: "WalletGeneration";
158
162
  message: {
159
163
  description: "Securely create a temporary, anonymous wallet for SilentSwap use only.";
164
+ scope: string;
160
165
  token: Base64;
161
166
  };
162
167
  };
package/dist/sdk.js CHANGED
@@ -42,16 +42,18 @@ export function createEip712DocForOrder(quote) {
42
42
  }
43
43
  /**
44
44
  * Creates an EIP-712 document for a SilentSwap wallet generator
45
+ * @param scope - scope to narrow reach of wallet
45
46
  * @param token - token to generate a wallet for
46
47
  * @returns EIP-712 document
47
48
  */
48
- export function createEip712DocForWalletGeneration(token) {
49
+ export function createEip712DocForWalletGeneration(scope, token) {
49
50
  return {
50
51
  types: EIP712_TYPES_WALLET_GENERATION,
51
52
  domain: EIP712_DOMAIN_ORDER_DEFAULT,
52
53
  primaryType: 'WalletGeneration',
53
54
  message: {
54
55
  description: 'Securely create a temporary, anonymous wallet for SilentSwap use only.',
56
+ scope: scope,
55
57
  token: token,
56
58
  },
57
59
  };
@@ -107,6 +107,15 @@ export type OrderRequest = Omit<QuoteResponse, 'authorizations' | 'facilitators'
107
107
  * Array of signed facilitator instructions
108
108
  */
109
109
  facilitators: Array<FacilitatorReply>;
110
+ /**
111
+ * Optional metadata object
112
+ */
113
+ metadata?: {
114
+ sourceAsset: {
115
+ caip19: string;
116
+ amount: IntStr;
117
+ };
118
+ };
110
119
  };
111
120
  /**
112
121
  * Parameters for the deposit transaction
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silentswap/sdk",
3
3
  "type": "module",
4
- "version": "0.0.13",
4
+ "version": "0.0.15",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "files": [
@@ -11,26 +11,26 @@
11
11
  "build": "tsc"
12
12
  },
13
13
  "dependencies": {
14
- "@cosmjs/amino": "^0.34.0",
15
- "@cosmjs/crypto": "^0.34.0",
16
- "@cosmjs/encoding": "^0.34.0",
17
- "@solar-republic/wasm-secp256k1": "^0.6.1",
18
- "bignumber.js": "^9.3.1",
19
- "siwe": "^3.0.0",
20
- "viem": "^2.31.7"
14
+ "@cosmjs/amino": "0.36.0",
15
+ "@cosmjs/crypto": "0.36.0",
16
+ "@cosmjs/encoding": "0.36.0",
17
+ "@solar-republic/wasm-secp256k1": "0.6.3",
18
+ "bignumber.js": "9.3.1",
19
+ "siwe": "3.0.0",
20
+ "viem": "2.37.6"
21
21
  },
22
22
  "devDependencies": {
23
- "@eslint/js": "^9.31.0",
24
- "@stylistic/eslint-plugin": "^5.1.0",
25
- "@tsconfig/node24": "^24.0.1",
26
- "@types/node": "^24.0.13",
27
- "@types/web": "^0.0.247",
28
- "@typescript-eslint/parser": "^8.37.0",
29
- "abitype": "^1.0.8",
30
- "eslint": "^9.31.0",
31
- "eslint-import-resolver-typescript": "^4.4.4",
32
- "eslint-plugin-import-x": "^4.16.1",
33
- "typescript": "^5.8.3",
34
- "typescript-eslint": "^8.37.0"
23
+ "@eslint/js": "9.35.0",
24
+ "@stylistic/eslint-plugin": "5.3.1",
25
+ "@tsconfig/node24": "24.0.1",
26
+ "@types/node": "24.5.2",
27
+ "@types/web": "0.0.269",
28
+ "@typescript-eslint/parser": "8.44.0",
29
+ "abitype": "1.1.1",
30
+ "eslint": "9.35.0",
31
+ "eslint-import-resolver-typescript": "4.4.4",
32
+ "eslint-plugin-import-x": "4.16.1",
33
+ "typescript": "5.9.2",
34
+ "typescript-eslint": "8.44.0"
35
35
  }
36
36
  }