@lydianpay/lydianconnect 1.1.4 → 1.2.1

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/README.md CHANGED
@@ -12,17 +12,20 @@ npm install @lydianpay/lydianconnect
12
12
  ## Usage
13
13
 
14
14
  ```ts
15
- import { LydianConnect } from '@lydianpay/lydianconnect';
15
+ import { LydianConnect } from "@lydianpay/lydianconnect";
16
16
 
17
17
  const lc = new LydianConnect({
18
- appName: 'My App',
19
- walletConnectProjectId: 'your-wc-project-id',
20
- icon: 'https://my.app/icon.png', // optional
21
- description: 'My App checkout', // optional
18
+ appName: "My App",
19
+ walletConnectProjectId: "your-wc-project-id",
20
+ icon: "https://my.app/icon.png", // optional
21
+ description: "My App checkout", // optional
22
22
  });
23
23
 
24
- const conn = await lc.connect({ walletId: 'metamask', chainId: 137 });
25
- const txHash = await conn.request({ method: 'eth_sendTransaction', params: [tx] });
24
+ const conn = await lc.connect({ walletId: "metamask", chainId: 137 });
25
+ const txHash = await conn.request({
26
+ method: "eth_sendTransaction",
27
+ params: [tx],
28
+ });
26
29
 
27
30
  lc.on((event) => {
28
31
  // 'connect' | 'disconnect' | 'chainChanged' | 'accountsChanged' | 'display_uri' | 'wallet_open_failed'
@@ -31,12 +34,12 @@ lc.on((event) => {
31
34
 
32
35
  ## Config
33
36
 
34
- | Field | Required | Notes |
35
- |-------|----------|-------|
36
- | `appName` | yes | Display name shown in the wallet's connect prompt. |
37
- | `walletConnectProjectId` | yes | WalletConnect Cloud project id. |
38
- | `icon` | no | Icon shown in the connect prompt. |
39
- | `description` | no | Defaults to `appName`. |
37
+ | Field | Required | Notes |
38
+ | ------------------------ | -------- | -------------------------------------------------- |
39
+ | `appName` | yes | Display name shown in the wallet's connect prompt. |
40
+ | `walletConnectProjectId` | yes | WalletConnect Cloud project id. |
41
+ | `icon` | no | Icon shown in the connect prompt. |
42
+ | `description` | no | Defaults to `appName`. |
40
43
 
41
44
  `connect({ walletId, chainId })` — `chainId` is the chain the user is paying on (a number like `137`, or a CAIP-2 id like `'eip155:137'`).
42
45