@lombard.finance/sdk-common 3.4.1 → 3.5.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 Lombard Finance
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1 +1,22 @@
1
1
  # @lombard.finance/sdk-common
2
+
3
+ Shared utilities and types used internally by the [Lombard SDK](https://github.com/lombard-finance/sdk) packages.
4
+
5
+ ## What's included
6
+
7
+ - Environment configuration (`Env`, chain definitions)
8
+ - Provider interfaces and abstractions
9
+ - Bitcoin output script generation utilities
10
+ - Chain service abstractions
11
+
12
+ ## Usage
13
+
14
+ This package is an internal dependency of `@lombard.finance/sdk`, `@lombard.finance/sdk-solana`, `@lombard.finance/sdk-starknet`, and `@lombard.finance/sdk-sui`. You typically do not need to install it directly.
15
+
16
+ ```bash
17
+ npm install @lombard.finance/sdk-common
18
+ ```
19
+
20
+ ## License
21
+
22
+ MIT
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@lombard.finance/sdk-common",
3
- "version": "3.4.1",
3
+ "version": "3.5.0",
4
+ "description": "Shared utilities and types for the Lombard SDK packages",
4
5
  "exports": {
5
6
  ".": {
6
7
  "types": "./src/index.ts",
@@ -14,7 +15,8 @@
14
15
  "types": "./src/index.ts",
15
16
  "files": [
16
17
  "dist",
17
- "src"
18
+ "src",
19
+ "LICENSE"
18
20
  ],
19
21
  "engines": {
20
22
  "node": ">= 18.0.0"
@@ -27,6 +29,24 @@
27
29
  "format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
28
30
  "types": "tsc --noEmit"
29
31
  },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/lombard-finance/sdk.git",
35
+ "directory": "packages/sdk-common"
36
+ },
37
+ "homepage": "https://docs.lombard.finance",
38
+ "bugs": {
39
+ "url": "https://github.com/lombard-finance/sdk/issues"
40
+ },
41
+ "keywords": [
42
+ "lombard",
43
+ "sdk",
44
+ "common",
45
+ "utilities"
46
+ ],
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
30
50
  "peerDependencies": {
31
51
  "@bitcoinerlab/secp256k1": "^1.2.0",
32
52
  "bitcoinjs-lib": "^6.1.5"
@@ -1,3 +1,5 @@
1
+ import type { Env } from '../env';
2
+
1
3
  /**
2
4
  * Solana Chain Service
3
5
  *
@@ -28,4 +30,22 @@ export interface SolanaService {
28
30
  btcAddress: string;
29
31
  network: string;
30
32
  }): Promise<{ txHash: string }>;
33
+
34
+ /**
35
+ * Redeem BTC.b on Solana to receive BTC
36
+ *
37
+ * Burns BTC.b on Solana and sends a GMP message to trigger
38
+ * a BTC payout to the specified Bitcoin address.
39
+ *
40
+ * @param args.amount - Amount of BTC.b to redeem in base units (satoshis)
41
+ * @param args.btcAddress - Bitcoin address to receive BTC
42
+ * @param args.network - Solana network ('mainnet-beta', 'devnet', 'testnet')
43
+ * @returns Transaction signature
44
+ */
45
+ redeemForBtc(args: {
46
+ amount: string;
47
+ btcAddress: string;
48
+ network: string;
49
+ env?: Env;
50
+ }): Promise<{ txHash: string }>;
31
51
  }