@buildonspark/spark-sdk 0.1.43 → 0.1.45
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/CHANGELOG.md +16 -0
- package/dist/{RequestLightningSendInput-D7fZdT4A.d.ts → RequestLightningSendInput-DEPd_fPO.d.ts} +43 -4
- package/dist/{RequestLightningSendInput-Na1mHdWg.d.cts → RequestLightningSendInput-Du0z7Om7.d.cts} +43 -4
- package/dist/address/index.cjs +2 -2
- package/dist/address/index.d.cts +2 -2
- package/dist/address/index.d.ts +2 -2
- package/dist/address/index.js +2 -2
- package/dist/{chunk-IRW5TWMH.js → chunk-5FUB65LX.js} +7 -9
- package/dist/{chunk-BUTZWYBW.js → chunk-6264CGDM.js} +4 -4
- package/dist/{chunk-VFJQNBFX.js → chunk-7V6N75CC.js} +5 -2
- package/dist/{chunk-M6A4KFIG.js → chunk-BGGEVUJK.js} +1505 -445
- package/dist/{chunk-DQYKQJRZ.js → chunk-C2S227QR.js} +675 -52
- package/dist/{chunk-GYQR4B4P.js → chunk-GZ5IPPJ2.js} +2 -2
- package/dist/{chunk-6AFUC5M2.js → chunk-HWJWKEIU.js} +8 -2
- package/dist/{chunk-TOSP3INR.js → chunk-I54FARY2.js} +4 -2
- package/dist/{chunk-WWOTVNPP.js → chunk-J2IE4Z7Y.js} +544 -431
- package/dist/{chunk-O4RYNJNB.js → chunk-KMUMFYFX.js} +3 -3
- package/dist/chunk-LHRD2WT6.js +2374 -0
- package/dist/{chunk-ABZA6R5S.js → chunk-NTFKFRQ2.js} +1 -1
- package/dist/{chunk-MIVX3GHD.js → chunk-OBFKIEMP.js} +1 -1
- package/dist/{chunk-HRQRRDSS.js → chunk-PQN3C2MF.js} +15 -15
- package/dist/{chunk-DOA6QXYQ.js → chunk-R5PXJZQS.js} +3 -1
- package/dist/{chunk-TIUBYNN5.js → chunk-YUPMXTCJ.js} +4 -4
- package/dist/graphql/objects/index.d.cts +6 -43
- package/dist/graphql/objects/index.d.ts +6 -43
- package/dist/graphql/objects/index.js +1 -1
- package/dist/index-B2AwKW5J.d.cts +214 -0
- package/dist/index-CJDi1HWc.d.ts +214 -0
- package/dist/index.cjs +4150 -1026
- package/dist/index.d.cts +764 -19
- package/dist/index.d.ts +764 -19
- package/dist/index.js +17 -21
- package/dist/index.node.cjs +4153 -1033
- package/dist/index.node.d.cts +10 -8
- package/dist/index.node.d.ts +10 -8
- package/dist/index.node.js +20 -28
- package/dist/native/index.cjs +4166 -1042
- package/dist/native/index.d.cts +369 -108
- package/dist/native/index.d.ts +369 -108
- package/dist/native/index.js +4138 -1015
- package/dist/{network-xkBSpaTn.d.ts → network-BTJl-Sul.d.ts} +1 -1
- package/dist/{network-D5lKssVl.d.cts → network-CqgsdUF2.d.cts} +1 -1
- package/dist/proto/lrc20.cjs +222 -19
- package/dist/proto/lrc20.d.cts +1 -1
- package/dist/proto/lrc20.d.ts +1 -1
- package/dist/proto/lrc20.js +2 -2
- package/dist/proto/spark.cjs +1502 -442
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark.js +5 -5
- package/dist/proto/spark_token.cjs +1515 -56
- package/dist/proto/spark_token.d.cts +153 -15
- package/dist/proto/spark_token.d.ts +153 -15
- package/dist/proto/spark_token.js +40 -4
- package/dist/{sdk-types-B-q9py_P.d.cts → sdk-types-B0SwjolI.d.cts} +1 -1
- package/dist/{sdk-types-BPoPgzda.d.ts → sdk-types-Cc4l4kb1.d.ts} +1 -1
- package/dist/services/config.cjs +7 -3
- package/dist/services/config.d.cts +5 -4
- package/dist/services/config.d.ts +5 -4
- package/dist/services/config.js +6 -6
- package/dist/services/connection.cjs +2938 -646
- package/dist/services/connection.d.cts +5 -4
- package/dist/services/connection.d.ts +5 -4
- package/dist/services/connection.js +4 -4
- package/dist/services/index.cjs +6381 -3461
- package/dist/services/index.d.cts +7 -6
- package/dist/services/index.d.ts +7 -6
- package/dist/services/index.js +15 -13
- package/dist/services/lrc-connection.cjs +227 -21
- package/dist/services/lrc-connection.d.cts +5 -4
- package/dist/services/lrc-connection.d.ts +5 -4
- package/dist/services/lrc-connection.js +4 -4
- package/dist/services/token-transactions.cjs +868 -244
- package/dist/services/token-transactions.d.cts +25 -7
- package/dist/services/token-transactions.d.ts +25 -7
- package/dist/services/token-transactions.js +5 -4
- package/dist/services/wallet-config.cjs +4 -1
- package/dist/services/wallet-config.d.cts +7 -5
- package/dist/services/wallet-config.d.ts +7 -5
- package/dist/services/wallet-config.js +3 -1
- package/dist/signer/signer.cjs +5 -2
- package/dist/signer/signer.d.cts +3 -2
- package/dist/signer/signer.d.ts +3 -2
- package/dist/signer/signer.js +2 -2
- package/dist/{signer-wqesWifN.d.ts → signer-BocS_J6B.d.ts} +2 -6
- package/dist/{signer-IO3oMRNj.d.cts → signer-DKS0AJkw.d.cts} +2 -6
- package/dist/{spark-CDm4gqS6.d.cts → spark-dM7EYXYQ.d.cts} +138 -42
- package/dist/{spark-CDm4gqS6.d.ts → spark-dM7EYXYQ.d.ts} +138 -42
- package/dist/spark_bindings/native/index.cjs +183 -0
- package/dist/spark_bindings/native/index.d.cts +14 -0
- package/dist/spark_bindings/native/index.d.ts +14 -0
- package/dist/spark_bindings/native/index.js +141 -0
- package/dist/spark_bindings/wasm/index.cjs +1093 -0
- package/dist/spark_bindings/wasm/index.d.cts +47 -0
- package/dist/spark_bindings/wasm/index.d.ts +47 -0
- package/dist/{chunk-K4C4W5FC.js → spark_bindings/wasm/index.js} +7 -6
- package/dist/types/index.cjs +1503 -443
- package/dist/types/index.d.cts +6 -5
- package/dist/types/index.d.ts +6 -5
- package/dist/types/index.js +3 -3
- package/dist/types-C-Rp0Oo7.d.cts +46 -0
- package/dist/types-C-Rp0Oo7.d.ts +46 -0
- package/dist/utils/index.cjs +358 -36
- package/dist/utils/index.d.cts +14 -134
- package/dist/utils/index.d.ts +14 -134
- package/dist/utils/index.js +8 -8
- package/package.json +21 -1
- package/src/constants.ts +5 -1
- package/src/graphql/client.ts +28 -0
- package/src/graphql/mutations/RequestCoopExit.ts +6 -0
- package/src/graphql/mutations/RequestSwapLeaves.ts +2 -0
- package/src/graphql/queries/GetCoopExitFeeQuote.ts +20 -0
- package/src/index.node.ts +0 -1
- package/src/index.ts +0 -1
- package/src/native/index.ts +1 -2
- package/src/proto/common.ts +5 -5
- package/src/proto/google/protobuf/descriptor.ts +34 -34
- package/src/proto/google/protobuf/duration.ts +2 -2
- package/src/proto/google/protobuf/empty.ts +2 -2
- package/src/proto/google/protobuf/timestamp.ts +2 -2
- package/src/proto/mock.ts +4 -4
- package/src/proto/spark.ts +1924 -525
- package/src/proto/spark_authn.ts +7 -7
- package/src/proto/spark_token.ts +1668 -105
- package/src/proto/validate/validate.ts +24 -24
- package/src/services/bolt11-spark.ts +62 -187
- package/src/services/coop-exit.ts +3 -0
- package/src/services/lrc20.ts +1 -1
- package/src/services/token-transactions.ts +209 -9
- package/src/services/transfer.ts +22 -3
- package/src/services/tree-creation.ts +13 -0
- package/src/services/wallet-config.ts +2 -1
- package/src/spark-wallet/spark-wallet.node.ts +3 -7
- package/src/spark-wallet/spark-wallet.ts +376 -232
- package/src/spark-wallet/types.ts +39 -3
- package/src/tests/bolt11-spark.test.ts +7 -15
- package/src/tests/integration/deposit.test.ts +16 -0
- package/src/tests/integration/ssp/coop-exit.test.ts +85 -21
- package/src/tests/integration/ssp/swap.test.ts +47 -0
- package/src/tests/integration/swap.test.ts +453 -433
- package/src/tests/integration/transfer.test.ts +261 -248
- package/src/tests/token-identifier.test.ts +54 -0
- package/src/tests/tokens.test.ts +218 -22
- package/src/utils/token-hashing.ts +346 -52
- package/src/utils/token-identifier.ts +88 -0
- package/src/utils/token-transaction-validation.ts +350 -5
- package/src/utils/token-transactions.ts +12 -8
- package/src/utils/transaction.ts +2 -8
- package/dist/chunk-VA7MV4MZ.js +0 -1073
- package/dist/index-7RYRH5wc.d.ts +0 -815
- package/dist/index-BJOc8Ur-.d.cts +0 -815
- package/dist/wasm-7OWFHDMS.js +0 -21
- package/src/logger.ts +0 -3
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
import { WalletConfigService } from './config.cjs';
|
|
2
|
-
import { j as OutputWithPreviousTransactionData, T as TokenTransaction } from '../spark-
|
|
2
|
+
import { j as OutputWithPreviousTransactionData, T as TokenTransaction, k as TokenTransactionWithStatus } from '../spark-dM7EYXYQ.cjs';
|
|
3
3
|
import { ConnectionManager } from './connection.cjs';
|
|
4
|
-
import { TokenTransaction as TokenTransaction$1 } from '../proto/spark_token.cjs';
|
|
4
|
+
import { TokenTransaction as TokenTransaction$1, TokenTransactionWithStatus as TokenTransactionWithStatus$1 } from '../proto/spark_token.cjs';
|
|
5
5
|
import './wallet-config.cjs';
|
|
6
6
|
import '@buildonspark/lrc20-sdk';
|
|
7
|
-
import '../RequestLightningSendInput-
|
|
7
|
+
import '../RequestLightningSendInput-Du0z7Om7.cjs';
|
|
8
8
|
import '@lightsparkdev/core';
|
|
9
9
|
import '../BitcoinNetwork-TnABML0T.cjs';
|
|
10
|
-
import '../signer-
|
|
10
|
+
import '../signer-DKS0AJkw.cjs';
|
|
11
11
|
import '@scure/bip32';
|
|
12
|
+
import '../types-C-Rp0Oo7.cjs';
|
|
12
13
|
import '@scure/btc-signer';
|
|
13
14
|
import 'bitcoinjs-lib';
|
|
14
15
|
import '@buildonspark/lrc20-sdk/lrc/types';
|
|
15
|
-
import '../network-
|
|
16
|
+
import '../network-CqgsdUF2.cjs';
|
|
16
17
|
import '@bufbuild/protobuf/wire';
|
|
17
18
|
import 'nice-grpc-common';
|
|
18
19
|
import 'nice-grpc';
|
|
19
20
|
import 'nice-grpc-web';
|
|
20
21
|
|
|
22
|
+
interface FetchOwnedTokenOutputsParams {
|
|
23
|
+
ownerPublicKeys: Uint8Array[];
|
|
24
|
+
issuerPublicKeys?: Uint8Array[];
|
|
25
|
+
tokenIdentifiers?: Uint8Array[];
|
|
26
|
+
}
|
|
27
|
+
interface QueryTokenTransactionsParams {
|
|
28
|
+
ownerPublicKeys?: string[];
|
|
29
|
+
issuerPublicKeys?: string[];
|
|
30
|
+
tokenTransactionHashes?: string[];
|
|
31
|
+
tokenIdentifiers?: string[];
|
|
32
|
+
outputIds?: string[];
|
|
33
|
+
}
|
|
21
34
|
declare class TokenTransactionService {
|
|
22
35
|
protected readonly config: WalletConfigService;
|
|
23
36
|
protected readonly connectionManager: ConnectionManager;
|
|
@@ -45,7 +58,12 @@ declare class TokenTransactionService {
|
|
|
45
58
|
private startTokenTransaction;
|
|
46
59
|
private signTokenTransactionV0;
|
|
47
60
|
private signTokenTransaction;
|
|
48
|
-
fetchOwnedTokenOutputs(
|
|
61
|
+
fetchOwnedTokenOutputs(params: FetchOwnedTokenOutputsParams): Promise<OutputWithPreviousTransactionData[]>;
|
|
62
|
+
queryTokenTransactions(params: QueryTokenTransactionsParams): Promise<TokenTransactionWithStatus[] | TokenTransactionWithStatus$1[]>;
|
|
63
|
+
private fetchOwnedTokenOutputsV0;
|
|
64
|
+
private fetchOwnedTokenOutputsV1;
|
|
65
|
+
private queryTokenTransactionsV0;
|
|
66
|
+
private queryTokenTransactionsV1;
|
|
49
67
|
syncTokenOutputs(tokenOutputs: Map<string, OutputWithPreviousTransactionData[]>): Promise<void>;
|
|
50
68
|
selectTokenOutputs(tokenOutputs: OutputWithPreviousTransactionData[], tokenAmount: bigint, strategy: "SMALL_FIRST" | "LARGE_FIRST"): OutputWithPreviousTransactionData[];
|
|
51
69
|
private sortTokenOutputsByStrategy;
|
|
@@ -54,4 +72,4 @@ declare class TokenTransactionService {
|
|
|
54
72
|
private createSignaturesForOperators;
|
|
55
73
|
}
|
|
56
74
|
|
|
57
|
-
export { TokenTransactionService };
|
|
75
|
+
export { type FetchOwnedTokenOutputsParams, type QueryTokenTransactionsParams, TokenTransactionService };
|
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
import { WalletConfigService } from './config.js';
|
|
2
|
-
import { j as OutputWithPreviousTransactionData, T as TokenTransaction } from '../spark-
|
|
2
|
+
import { j as OutputWithPreviousTransactionData, T as TokenTransaction, k as TokenTransactionWithStatus } from '../spark-dM7EYXYQ.js';
|
|
3
3
|
import { ConnectionManager } from './connection.js';
|
|
4
|
-
import { TokenTransaction as TokenTransaction$1 } from '../proto/spark_token.js';
|
|
4
|
+
import { TokenTransaction as TokenTransaction$1, TokenTransactionWithStatus as TokenTransactionWithStatus$1 } from '../proto/spark_token.js';
|
|
5
5
|
import './wallet-config.js';
|
|
6
6
|
import '@buildonspark/lrc20-sdk';
|
|
7
|
-
import '../RequestLightningSendInput-
|
|
7
|
+
import '../RequestLightningSendInput-DEPd_fPO.js';
|
|
8
8
|
import '@lightsparkdev/core';
|
|
9
9
|
import '../BitcoinNetwork-TnABML0T.js';
|
|
10
|
-
import '../signer-
|
|
10
|
+
import '../signer-BocS_J6B.js';
|
|
11
11
|
import '@scure/bip32';
|
|
12
|
+
import '../types-C-Rp0Oo7.js';
|
|
12
13
|
import '@scure/btc-signer';
|
|
13
14
|
import 'bitcoinjs-lib';
|
|
14
15
|
import '@buildonspark/lrc20-sdk/lrc/types';
|
|
15
|
-
import '../network-
|
|
16
|
+
import '../network-BTJl-Sul.js';
|
|
16
17
|
import '@bufbuild/protobuf/wire';
|
|
17
18
|
import 'nice-grpc-common';
|
|
18
19
|
import 'nice-grpc';
|
|
19
20
|
import 'nice-grpc-web';
|
|
20
21
|
|
|
22
|
+
interface FetchOwnedTokenOutputsParams {
|
|
23
|
+
ownerPublicKeys: Uint8Array[];
|
|
24
|
+
issuerPublicKeys?: Uint8Array[];
|
|
25
|
+
tokenIdentifiers?: Uint8Array[];
|
|
26
|
+
}
|
|
27
|
+
interface QueryTokenTransactionsParams {
|
|
28
|
+
ownerPublicKeys?: string[];
|
|
29
|
+
issuerPublicKeys?: string[];
|
|
30
|
+
tokenTransactionHashes?: string[];
|
|
31
|
+
tokenIdentifiers?: string[];
|
|
32
|
+
outputIds?: string[];
|
|
33
|
+
}
|
|
21
34
|
declare class TokenTransactionService {
|
|
22
35
|
protected readonly config: WalletConfigService;
|
|
23
36
|
protected readonly connectionManager: ConnectionManager;
|
|
@@ -45,7 +58,12 @@ declare class TokenTransactionService {
|
|
|
45
58
|
private startTokenTransaction;
|
|
46
59
|
private signTokenTransactionV0;
|
|
47
60
|
private signTokenTransaction;
|
|
48
|
-
fetchOwnedTokenOutputs(
|
|
61
|
+
fetchOwnedTokenOutputs(params: FetchOwnedTokenOutputsParams): Promise<OutputWithPreviousTransactionData[]>;
|
|
62
|
+
queryTokenTransactions(params: QueryTokenTransactionsParams): Promise<TokenTransactionWithStatus[] | TokenTransactionWithStatus$1[]>;
|
|
63
|
+
private fetchOwnedTokenOutputsV0;
|
|
64
|
+
private fetchOwnedTokenOutputsV1;
|
|
65
|
+
private queryTokenTransactionsV0;
|
|
66
|
+
private queryTokenTransactionsV1;
|
|
49
67
|
syncTokenOutputs(tokenOutputs: Map<string, OutputWithPreviousTransactionData[]>): Promise<void>;
|
|
50
68
|
selectTokenOutputs(tokenOutputs: OutputWithPreviousTransactionData[], tokenAmount: bigint, strategy: "SMALL_FIRST" | "LARGE_FIRST"): OutputWithPreviousTransactionData[];
|
|
51
69
|
private sortTokenOutputsByStrategy;
|
|
@@ -54,4 +72,4 @@ declare class TokenTransactionService {
|
|
|
54
72
|
private createSignaturesForOperators;
|
|
55
73
|
}
|
|
56
74
|
|
|
57
|
-
export { TokenTransactionService };
|
|
75
|
+
export { type FetchOwnedTokenOutputsParams, type QueryTokenTransactionsParams, TokenTransactionService };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TokenTransactionService
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-C2S227QR.js";
|
|
4
|
+
import "../chunk-HWJWKEIU.js";
|
|
5
5
|
import "../chunk-L3EHBOUX.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-M6A4KFIG.js";
|
|
6
|
+
import "../chunk-KMUMFYFX.js";
|
|
8
7
|
import "../chunk-QNNSEJ4P.js";
|
|
9
8
|
import "../chunk-VTUGIIWI.js";
|
|
9
|
+
import "../chunk-LHRD2WT6.js";
|
|
10
10
|
import "../chunk-GSI4OLXZ.js";
|
|
11
|
+
import "../chunk-BGGEVUJK.js";
|
|
11
12
|
import "../chunk-MVRQ5US7.js";
|
|
12
13
|
export {
|
|
13
14
|
TokenTransactionService
|
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/services/wallet-config.ts
|
|
31
31
|
var wallet_config_exports = {};
|
|
32
32
|
__export(wallet_config_exports, {
|
|
33
|
+
BASE_CONFIG: () => BASE_CONFIG,
|
|
33
34
|
ELECTRS_CREDENTIALS: () => ELECTRS_CREDENTIALS,
|
|
34
35
|
LOCAL_WALLET_CONFIG: () => LOCAL_WALLET_CONFIG,
|
|
35
36
|
LOCAL_WALLET_CONFIG_ECDSA: () => LOCAL_WALLET_CONFIG_ECDSA,
|
|
@@ -208,7 +209,8 @@ var BASE_CONFIG = {
|
|
|
208
209
|
}
|
|
209
210
|
};
|
|
210
211
|
var LOCAL_WALLET_CONFIG = {
|
|
211
|
-
...BASE_CONFIG
|
|
212
|
+
...BASE_CONFIG,
|
|
213
|
+
threshold: 3
|
|
212
214
|
};
|
|
213
215
|
var LOCAL_WALLET_CONFIG_SCHNORR = {
|
|
214
216
|
...LOCAL_WALLET_CONFIG,
|
|
@@ -321,6 +323,7 @@ function getLocalSigningOperators() {
|
|
|
321
323
|
}
|
|
322
324
|
// Annotate the CommonJS export names for ESM import in node:
|
|
323
325
|
0 && (module.exports = {
|
|
326
|
+
BASE_CONFIG,
|
|
324
327
|
ELECTRS_CREDENTIALS,
|
|
325
328
|
LOCAL_WALLET_CONFIG,
|
|
326
329
|
LOCAL_WALLET_CONFIG_ECDSA,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { MayHaveLrc20WalletApiConfig, LRC20WalletApiConfig } from '@buildonspark/lrc20-sdk';
|
|
2
|
-
import { M as MayHaveSspClientOptions,
|
|
3
|
-
import { a as NetworkType } from '../network-
|
|
2
|
+
import { M as MayHaveSspClientOptions, J as SspClientOptions } from '../RequestLightningSendInput-Du0z7Om7.cjs';
|
|
3
|
+
import { a as NetworkType } from '../network-CqgsdUF2.cjs';
|
|
4
4
|
import '@lightsparkdev/core';
|
|
5
5
|
import '../BitcoinNetwork-TnABML0T.cjs';
|
|
6
|
-
import '../signer-
|
|
6
|
+
import '../signer-DKS0AJkw.cjs';
|
|
7
7
|
import '@scure/bip32';
|
|
8
|
-
import '../spark-
|
|
8
|
+
import '../spark-dM7EYXYQ.cjs';
|
|
9
9
|
import '@bufbuild/protobuf/wire';
|
|
10
10
|
import 'nice-grpc-common';
|
|
11
|
+
import '../types-C-Rp0Oo7.cjs';
|
|
11
12
|
import '@scure/btc-signer';
|
|
12
13
|
import 'bitcoinjs-lib';
|
|
13
14
|
import '@buildonspark/lrc20-sdk/lrc/types';
|
|
@@ -44,6 +45,7 @@ type ConfigOptions = MayHaveLrc20WalletApiConfig & MayHaveSspClientOptions & {
|
|
|
44
45
|
readonly expectedWithdrawBondSats?: number;
|
|
45
46
|
readonly expectedWithdrawRelativeBlockLocktime?: number;
|
|
46
47
|
};
|
|
48
|
+
declare const BASE_CONFIG: Required<ConfigOptions>;
|
|
47
49
|
declare const LOCAL_WALLET_CONFIG: Required<ConfigOptions>;
|
|
48
50
|
declare const LOCAL_WALLET_CONFIG_SCHNORR: Required<ConfigOptions>;
|
|
49
51
|
declare const LOCAL_WALLET_CONFIG_ECDSA: Required<ConfigOptions>;
|
|
@@ -51,4 +53,4 @@ declare const REGTEST_WALLET_CONFIG: Required<ConfigOptions>;
|
|
|
51
53
|
declare const MAINNET_WALLET_CONFIG: Required<ConfigOptions>;
|
|
52
54
|
declare function getLocalSigningOperators(): Record<string, SigningOperator>;
|
|
53
55
|
|
|
54
|
-
export { type ConfigOptions, ELECTRS_CREDENTIALS, LOCAL_WALLET_CONFIG, LOCAL_WALLET_CONFIG_ECDSA, LOCAL_WALLET_CONFIG_SCHNORR, MAINNET_WALLET_CONFIG, REGTEST_WALLET_CONFIG, type SigningOperator, getElectrsUrl, getLocalSigningOperators, getLrc20NodeUrl, getLrc20Url, getSspIdentityPublicKey, getSspSchemaEndpoint, getSspUrl };
|
|
56
|
+
export { BASE_CONFIG, type ConfigOptions, ELECTRS_CREDENTIALS, LOCAL_WALLET_CONFIG, LOCAL_WALLET_CONFIG_ECDSA, LOCAL_WALLET_CONFIG_SCHNORR, MAINNET_WALLET_CONFIG, REGTEST_WALLET_CONFIG, type SigningOperator, getElectrsUrl, getLocalSigningOperators, getLrc20NodeUrl, getLrc20Url, getSspIdentityPublicKey, getSspSchemaEndpoint, getSspUrl };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { MayHaveLrc20WalletApiConfig, LRC20WalletApiConfig } from '@buildonspark/lrc20-sdk';
|
|
2
|
-
import { M as MayHaveSspClientOptions,
|
|
3
|
-
import { a as NetworkType } from '../network-
|
|
2
|
+
import { M as MayHaveSspClientOptions, J as SspClientOptions } from '../RequestLightningSendInput-DEPd_fPO.js';
|
|
3
|
+
import { a as NetworkType } from '../network-BTJl-Sul.js';
|
|
4
4
|
import '@lightsparkdev/core';
|
|
5
5
|
import '../BitcoinNetwork-TnABML0T.js';
|
|
6
|
-
import '../signer-
|
|
6
|
+
import '../signer-BocS_J6B.js';
|
|
7
7
|
import '@scure/bip32';
|
|
8
|
-
import '../spark-
|
|
8
|
+
import '../spark-dM7EYXYQ.js';
|
|
9
9
|
import '@bufbuild/protobuf/wire';
|
|
10
10
|
import 'nice-grpc-common';
|
|
11
|
+
import '../types-C-Rp0Oo7.js';
|
|
11
12
|
import '@scure/btc-signer';
|
|
12
13
|
import 'bitcoinjs-lib';
|
|
13
14
|
import '@buildonspark/lrc20-sdk/lrc/types';
|
|
@@ -44,6 +45,7 @@ type ConfigOptions = MayHaveLrc20WalletApiConfig & MayHaveSspClientOptions & {
|
|
|
44
45
|
readonly expectedWithdrawBondSats?: number;
|
|
45
46
|
readonly expectedWithdrawRelativeBlockLocktime?: number;
|
|
46
47
|
};
|
|
48
|
+
declare const BASE_CONFIG: Required<ConfigOptions>;
|
|
47
49
|
declare const LOCAL_WALLET_CONFIG: Required<ConfigOptions>;
|
|
48
50
|
declare const LOCAL_WALLET_CONFIG_SCHNORR: Required<ConfigOptions>;
|
|
49
51
|
declare const LOCAL_WALLET_CONFIG_ECDSA: Required<ConfigOptions>;
|
|
@@ -51,4 +53,4 @@ declare const REGTEST_WALLET_CONFIG: Required<ConfigOptions>;
|
|
|
51
53
|
declare const MAINNET_WALLET_CONFIG: Required<ConfigOptions>;
|
|
52
54
|
declare function getLocalSigningOperators(): Record<string, SigningOperator>;
|
|
53
55
|
|
|
54
|
-
export { type ConfigOptions, ELECTRS_CREDENTIALS, LOCAL_WALLET_CONFIG, LOCAL_WALLET_CONFIG_ECDSA, LOCAL_WALLET_CONFIG_SCHNORR, MAINNET_WALLET_CONFIG, REGTEST_WALLET_CONFIG, type SigningOperator, getElectrsUrl, getLocalSigningOperators, getLrc20NodeUrl, getLrc20Url, getSspIdentityPublicKey, getSspSchemaEndpoint, getSspUrl };
|
|
56
|
+
export { BASE_CONFIG, type ConfigOptions, ELECTRS_CREDENTIALS, LOCAL_WALLET_CONFIG, LOCAL_WALLET_CONFIG_ECDSA, LOCAL_WALLET_CONFIG_SCHNORR, MAINNET_WALLET_CONFIG, REGTEST_WALLET_CONFIG, type SigningOperator, getElectrsUrl, getLocalSigningOperators, getLrc20NodeUrl, getLrc20Url, getSspIdentityPublicKey, getSspSchemaEndpoint, getSspUrl };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BASE_CONFIG,
|
|
2
3
|
ELECTRS_CREDENTIALS,
|
|
3
4
|
LOCAL_WALLET_CONFIG,
|
|
4
5
|
LOCAL_WALLET_CONFIG_ECDSA,
|
|
@@ -12,9 +13,10 @@ import {
|
|
|
12
13
|
getSspIdentityPublicKey,
|
|
13
14
|
getSspSchemaEndpoint,
|
|
14
15
|
getSspUrl
|
|
15
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-R5PXJZQS.js";
|
|
16
17
|
import "../chunk-MVRQ5US7.js";
|
|
17
18
|
export {
|
|
19
|
+
BASE_CONFIG,
|
|
18
20
|
ELECTRS_CREDENTIALS,
|
|
19
21
|
LOCAL_WALLET_CONFIG,
|
|
20
22
|
LOCAL_WALLET_CONFIG_ECDSA,
|
package/dist/signer/signer.cjs
CHANGED
|
@@ -1135,9 +1135,12 @@ init_buffer();
|
|
|
1135
1135
|
var import_core = require("@lightsparkdev/core");
|
|
1136
1136
|
var isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative";
|
|
1137
1137
|
var isBun = globalThis.Bun !== void 0;
|
|
1138
|
-
var packageVersion = true ? "0.1.
|
|
1138
|
+
var packageVersion = true ? "0.1.45" : "unknown";
|
|
1139
1139
|
var baseEnvStr = "unknown";
|
|
1140
|
-
if (
|
|
1140
|
+
if (isBun) {
|
|
1141
|
+
const bunVersion = "version" in globalThis.Bun ? globalThis.Bun.version : "unknown-version";
|
|
1142
|
+
baseEnvStr = `bun/${bunVersion}`;
|
|
1143
|
+
} else if (import_core.isNode) {
|
|
1141
1144
|
baseEnvStr = `node/${process.version}`;
|
|
1142
1145
|
} else if (isReactNative) {
|
|
1143
1146
|
baseEnvStr = "react-native";
|
package/dist/signer/signer.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@scure/bip32';
|
|
2
|
-
import '../spark-
|
|
3
|
-
|
|
2
|
+
import '../spark-dM7EYXYQ.cjs';
|
|
3
|
+
import '../types-C-Rp0Oo7.cjs';
|
|
4
|
+
export { A as AggregateFrostParams, D as DefaultSparkSigner, k as SignFrostParams, h as SigningCommitment, i as SigningNonce, S as SparkSigner, l as SplitSecretWithProofsParams, j as TaprootOutputKeysGenerator, T as TaprootSparkSigner } from '../signer-DKS0AJkw.cjs';
|
|
4
5
|
export { PARITY, Receipt, TokenSigner, fromPrivateKey } from '@buildonspark/lrc20-sdk';
|
|
5
6
|
import '@scure/btc-signer';
|
|
6
7
|
import 'bitcoinjs-lib';
|
package/dist/signer/signer.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@scure/bip32';
|
|
2
|
-
import '../spark-
|
|
3
|
-
|
|
2
|
+
import '../spark-dM7EYXYQ.js';
|
|
3
|
+
import '../types-C-Rp0Oo7.js';
|
|
4
|
+
export { A as AggregateFrostParams, D as DefaultSparkSigner, k as SignFrostParams, h as SigningCommitment, i as SigningNonce, S as SparkSigner, l as SplitSecretWithProofsParams, j as TaprootOutputKeysGenerator, T as TaprootSparkSigner } from '../signer-BocS_J6B.js';
|
|
4
5
|
export { PARITY, Receipt, TokenSigner, fromPrivateKey } from '@buildonspark/lrc20-sdk';
|
|
5
6
|
import '@scure/btc-signer';
|
|
6
7
|
import 'bitcoinjs-lib';
|
package/dist/signer/signer.js
CHANGED
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
TaprootOutputKeysGenerator,
|
|
7
7
|
TaprootSparkSigner,
|
|
8
8
|
fromPrivateKey
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-VFJQNBFX.js";
|
|
9
|
+
} from "../chunk-YUPMXTCJ.js";
|
|
11
10
|
import "../chunk-NSJF5F5O.js";
|
|
12
11
|
import "../chunk-QNNSEJ4P.js";
|
|
13
12
|
import "../chunk-VTUGIIWI.js";
|
|
13
|
+
import "../chunk-7V6N75CC.js";
|
|
14
14
|
import "../chunk-GSI4OLXZ.js";
|
|
15
15
|
import "../chunk-MVRQ5US7.js";
|
|
16
16
|
export {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { HDKey } from '@scure/bip32';
|
|
2
|
-
import { d as TreeNode } from './spark-
|
|
2
|
+
import { d as TreeNode } from './spark-dM7EYXYQ.js';
|
|
3
|
+
import { I as ISigningCommitment } from './types-C-Rp0Oo7.js';
|
|
3
4
|
import { TokenSigner, Receipt } from '@buildonspark/lrc20-sdk';
|
|
4
5
|
import { Transaction } from '@scure/btc-signer';
|
|
5
6
|
import { Psbt } from 'bitcoinjs-lib';
|
|
6
7
|
import '@buildonspark/lrc20-sdk/lrc/types';
|
|
7
8
|
|
|
8
|
-
interface ISigningCommitment {
|
|
9
|
-
hiding: Uint8Array;
|
|
10
|
-
binding: Uint8Array;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
type Polynomial = {
|
|
14
10
|
fieldModulus: bigint;
|
|
15
11
|
coefficients: bigint[];
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { HDKey } from '@scure/bip32';
|
|
2
|
-
import { d as TreeNode } from './spark-
|
|
2
|
+
import { d as TreeNode } from './spark-dM7EYXYQ.cjs';
|
|
3
|
+
import { I as ISigningCommitment } from './types-C-Rp0Oo7.cjs';
|
|
3
4
|
import { TokenSigner, Receipt } from '@buildonspark/lrc20-sdk';
|
|
4
5
|
import { Transaction } from '@scure/btc-signer';
|
|
5
6
|
import { Psbt } from 'bitcoinjs-lib';
|
|
6
7
|
import '@buildonspark/lrc20-sdk/lrc/types';
|
|
7
8
|
|
|
8
|
-
interface ISigningCommitment {
|
|
9
|
-
hiding: Uint8Array;
|
|
10
|
-
binding: Uint8Array;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
type Polynomial = {
|
|
14
10
|
fieldModulus: bigint;
|
|
15
11
|
coefficients: bigint[];
|