@silentswap/sdk 0.0.14 → 0.0.16

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";
@@ -271,7 +274,7 @@ export declare const EIP712_TYPES_WALLET_GENERATION: {
271
274
  export declare const EIP712_DOMAIN_ORDER_DEFAULT: {
272
275
  readonly name: "SilentSwap v2";
273
276
  readonly version: "1";
274
- readonly chainId: 43114;
277
+ readonly chainId: 1;
275
278
  };
276
279
  export declare function quoteResponseToEip712Document(quoteResponse: QuoteResponse): TypedDataDocument<typeof EIP712_DOMAIN_ORDER_DEFAULT>;
277
280
  export {};
package/dist/order.js CHANGED
@@ -90,13 +90,14 @@ 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
  };
96
97
  export const EIP712_DOMAIN_ORDER_DEFAULT = {
97
98
  name: 'SilentSwap v2',
98
99
  version: '1',
99
- chainId: 43114,
100
+ chainId: 1,
100
101
  };
101
102
  export function quoteResponseToEip712Document(quoteResponse) {
102
103
  return {
package/dist/sdk.d.ts CHANGED
@@ -108,7 +108,7 @@ export declare function createEip712DocForOrder(quote: QuoteResponse): {
108
108
  domain: {
109
109
  readonly name: "SilentSwap v2";
110
110
  readonly version: "1";
111
- readonly chainId: 43114;
111
+ readonly chainId: 1;
112
112
  };
113
113
  primaryType: "Order";
114
114
  message: {
@@ -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";
@@ -152,11 +156,12 @@ export declare function createEip712DocForWalletGeneration(token: string): {
152
156
  domain: {
153
157
  readonly name: "SilentSwap v2";
154
158
  readonly version: "1";
155
- readonly chainId: 43114;
159
+ readonly chainId: 1;
156
160
  };
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
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silentswap/sdk",
3
3
  "type": "module",
4
- "version": "0.0.14",
4
+ "version": "0.0.16",
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.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.5"
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.35.0",
24
- "@stylistic/eslint-plugin": "^5.3.1",
25
- "@tsconfig/node24": "^24.0.1",
26
- "@types/node": "^24.3.3",
27
- "@types/web": "^0.0.267",
28
- "@typescript-eslint/parser": "^8.43.0",
29
- "abitype": "^1.1.0",
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.43.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
  }