@silentswap/sdk 0.0.10 → 0.0.11
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/sdk.d.ts +1 -1
- package/dist/sdk.js +3 -3
- package/package.json +1 -1
package/dist/sdk.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { Hex } from 'viem';
|
|
|
7
7
|
* @param nonce - nonce from the server (base58)
|
|
8
8
|
* @returns SIWE message
|
|
9
9
|
*/
|
|
10
|
-
export declare function createSignInMessage(user: Hex, nonce: string): SignInMessage;
|
|
10
|
+
export declare function createSignInMessage(user: Hex, nonce: string, subdomain?: string): SignInMessage;
|
|
11
11
|
/**
|
|
12
12
|
* Creates an EIP-712 document for a SilentSwap order
|
|
13
13
|
* @param quote - quote response
|
package/dist/sdk.js
CHANGED
|
@@ -6,13 +6,13 @@ import { EIP712_DOMAIN_ORDER_DEFAULT, EIP712_TYPES_ORDER, EIP712_TYPES_WALLET_GE
|
|
|
6
6
|
* @param nonce - nonce from the server (base58)
|
|
7
7
|
* @returns SIWE message
|
|
8
8
|
*/
|
|
9
|
-
export function createSignInMessage(user, nonce) {
|
|
9
|
+
export function createSignInMessage(user, nonce, subdomain = 'app') {
|
|
10
10
|
// create params
|
|
11
11
|
const params = {
|
|
12
|
-
domain:
|
|
12
|
+
domain: `${subdomain}.silentswap.com`,
|
|
13
13
|
address: user,
|
|
14
14
|
statement: 'Sign in with Ethereum to SilentSwap',
|
|
15
|
-
uri:
|
|
15
|
+
uri: `shttps://${subdomain}.silentswap.com`,
|
|
16
16
|
version: '1',
|
|
17
17
|
chainId: 1, // always Ethereum mainnet
|
|
18
18
|
nonce: nonce,
|