@buildonspark/spark-sdk 0.1.39 → 0.1.41
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 +14 -0
- package/README.md +1 -1
- package/dist/{RequestLightningSendInput-39_zGri6.d.cts → RequestLightningSendInput-DXcLoiCe.d.cts} +10 -2
- package/dist/{RequestLightningSendInput-B4JdzclX.d.ts → RequestLightningSendInput-mXUWn_cp.d.ts} +10 -2
- package/dist/address/index.cjs +138 -6
- package/dist/address/index.d.cts +18 -6
- package/dist/address/index.d.ts +18 -6
- package/dist/address/index.js +5 -2
- package/dist/{chunk-FWQPAPXK.js → chunk-2ZXXLPG2.js} +1 -1
- package/dist/{chunk-S7KD6DDL.js → chunk-6YVPOQ2A.js} +41 -20
- package/dist/{chunk-ZUVYYR5T.js → chunk-7EFSUADA.js} +1 -0
- package/dist/{chunk-NS4UZRQ7.js → chunk-ABZA6R5S.js} +1 -1
- package/dist/{chunk-57XLH3ZR.js → chunk-ATEHMLKP.js} +23 -23
- package/dist/{chunk-VJTDG4BQ.js → chunk-HK6LPV6Z.js} +10 -1
- package/dist/{chunk-W3EC5XSA.js → chunk-J5W5Q2ZP.js} +337 -72
- package/dist/{chunk-TKYOYOYJ.js → chunk-KKSU7OZO.js} +653 -76
- package/dist/chunk-L3EHBOUX.js +0 -0
- package/dist/{chunk-C5LTJBI7.js → chunk-M6A4KFIG.js} +125 -226
- package/dist/{chunk-A74XSEW3.js → chunk-MIVX3GHD.js} +1 -1
- package/dist/{chunk-RGWBSZIO.js → chunk-ROKY5KS4.js} +23 -3
- package/dist/{chunk-LIP2K6KR.js → chunk-TM4TOEOX.js} +26 -8
- package/dist/{chunk-RAPBVYJY.js → chunk-UKT6OFLO.js} +125 -35
- package/dist/chunk-VA7MV4MZ.js +1073 -0
- package/dist/chunk-YEZDPUFY.js +840 -0
- package/dist/{chunk-DI7QXUQJ.js → chunk-ZXDE2XMU.js} +8 -5
- package/dist/graphql/objects/index.cjs +6 -3
- package/dist/graphql/objects/index.d.cts +6 -5
- package/dist/graphql/objects/index.d.ts +6 -5
- package/dist/graphql/objects/index.js +1 -1
- package/dist/{index-DEo_hdN3.d.cts → index-CFh4uWzi.d.cts} +60 -6
- package/dist/{index-BVY0yH_H.d.ts → index-OSDtPMmC.d.ts} +60 -6
- package/dist/index.cjs +3316 -954
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +48 -26
- package/dist/index.node.cjs +3316 -954
- package/dist/index.node.d.cts +9 -8
- package/dist/index.node.d.ts +9 -8
- package/dist/index.node.js +48 -26
- package/dist/native/index.cjs +3323 -961
- package/dist/native/index.d.cts +542 -260
- package/dist/native/index.d.ts +542 -260
- package/dist/native/index.js +3192 -838
- package/dist/{network-DobHpaV6.d.ts → network-BF2GYPye.d.ts} +9 -2
- package/dist/{network-GFGEHkS4.d.cts → network-BiwBmoOg.d.cts} +9 -2
- 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 +125 -226
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark.js +3 -5
- package/dist/proto/spark_token.cjs +1364 -0
- package/dist/proto/spark_token.d.cts +209 -0
- package/dist/proto/spark_token.d.ts +209 -0
- package/dist/proto/spark_token.js +32 -0
- package/dist/{sdk-types-BuVMn2rX.d.cts → sdk-types-CfhdFnsA.d.cts} +1 -1
- package/dist/{sdk-types-BeI6DM_M.d.ts → sdk-types-MnQrHolg.d.ts} +1 -1
- package/dist/services/config.cjs +64 -40
- package/dist/services/config.d.cts +6 -5
- package/dist/services/config.d.ts +6 -5
- package/dist/services/config.js +7 -7
- package/dist/services/connection.cjs +1108 -306
- package/dist/services/connection.d.cts +10 -5
- package/dist/services/connection.d.ts +10 -5
- package/dist/services/connection.js +3 -2
- package/dist/services/index.cjs +1702 -488
- package/dist/services/index.d.cts +6 -5
- package/dist/services/index.d.ts +6 -5
- package/dist/services/index.js +16 -14
- package/dist/services/lrc-connection.d.cts +5 -5
- package/dist/services/lrc-connection.d.ts +5 -5
- package/dist/services/lrc-connection.js +3 -3
- package/dist/services/token-transactions.cjs +637 -247
- package/dist/services/token-transactions.d.cts +19 -8
- package/dist/services/token-transactions.d.ts +19 -8
- package/dist/services/token-transactions.js +5 -4
- package/dist/services/wallet-config.cjs +1 -0
- package/dist/services/wallet-config.d.cts +6 -5
- package/dist/services/wallet-config.d.ts +6 -5
- package/dist/services/wallet-config.js +1 -1
- package/dist/signer/signer.cjs +122 -35
- package/dist/signer/signer.d.cts +4 -3
- package/dist/signer/signer.d.ts +4 -3
- package/dist/signer/signer.js +8 -4
- package/dist/{signer-C1t40Wus.d.cts → signer-BhLS7SYR.d.cts} +35 -14
- package/dist/{signer-DFGw9RRp.d.ts → signer-CylxIujU.d.ts} +35 -14
- package/dist/{spark-DXYE9gMM.d.ts → spark-DjR1b3TC.d.cts} +13 -21
- package/dist/{spark-DXYE9gMM.d.cts → spark-DjR1b3TC.d.ts} +13 -21
- package/dist/types/index.cjs +130 -227
- 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/utils/index.cjs +1169 -3
- package/dist/utils/index.d.cts +66 -6
- package/dist/utils/index.d.ts +66 -6
- package/dist/utils/index.js +35 -14
- package/package.json +6 -2
- package/src/address/address.ts +41 -6
- package/src/graphql/client.ts +15 -0
- package/src/graphql/objects/Transfer.ts +7 -0
- package/src/graphql/queries/Transfer.ts +10 -0
- package/src/proto/spark.ts +215 -337
- package/src/proto/spark_token.ts +1407 -0
- package/src/services/config.ts +4 -0
- package/src/services/connection.ts +37 -1
- package/src/services/deposit.ts +23 -5
- package/src/services/token-transactions.ts +426 -75
- package/src/services/transfer.ts +182 -11
- package/src/services/tree-creation.ts +29 -14
- package/src/services/wallet-config.ts +2 -0
- package/src/signer/signer.ts +190 -48
- package/src/spark-wallet/spark-wallet.ts +510 -6
- package/src/tests/integration/transfer.test.ts +186 -214
- package/src/tests/integration/tree-creation.test.ts +5 -1
- package/src/tests/signer.test.ts +34 -0
- package/src/tests/transaction.test.ts +12 -0
- package/src/tests/xchain-address.test.ts +28 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/mempool.ts +26 -1
- package/src/utils/network.ts +15 -0
- package/src/utils/transaction.ts +51 -3
- package/src/utils/unilateral-exit.ts +729 -0
- package/src/utils/xchain-address.ts +36 -0
- package/dist/chunk-E5SL7XTO.js +0 -301
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { Channel } from 'nice-grpc';
|
|
2
2
|
import { Channel as Channel$1 } from 'nice-grpc-web';
|
|
3
|
-
import { E as Empty, g as SparkServiceClient } from '../spark-
|
|
3
|
+
import { E as Empty, g as SparkServiceClient } from '../spark-DjR1b3TC.cjs';
|
|
4
4
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
5
5
|
import { CallOptions } from 'nice-grpc-common';
|
|
6
6
|
import { WalletConfigService } from './config.cjs';
|
|
7
|
+
import { SparkTokenServiceClient } from '../proto/spark_token.cjs';
|
|
7
8
|
import '@buildonspark/lrc20-sdk';
|
|
8
|
-
import '../RequestLightningSendInput-
|
|
9
|
+
import '../RequestLightningSendInput-DXcLoiCe.cjs';
|
|
9
10
|
import '@lightsparkdev/core';
|
|
10
11
|
import '../BitcoinNetwork-TnABML0T.cjs';
|
|
11
|
-
import '../signer-
|
|
12
|
+
import '../signer-BhLS7SYR.cjs';
|
|
12
13
|
import '@scure/bip32';
|
|
13
|
-
import 'bitcoinjs-lib';
|
|
14
|
-
import '../network-GFGEHkS4.cjs';
|
|
15
14
|
import '@scure/btc-signer';
|
|
15
|
+
import 'bitcoinjs-lib';
|
|
16
|
+
import '../network-BiwBmoOg.cjs';
|
|
16
17
|
import './wallet-config.cjs';
|
|
17
18
|
|
|
18
19
|
declare enum InterruptTransferRequest_InterruptTransferAction {
|
|
@@ -61,6 +62,7 @@ interface MessageFns<T> {
|
|
|
61
62
|
declare class ConnectionManager {
|
|
62
63
|
private config;
|
|
63
64
|
private clients;
|
|
65
|
+
private tokenClients;
|
|
64
66
|
private streamClients;
|
|
65
67
|
constructor(config: WalletConfigService);
|
|
66
68
|
createClients(): Promise<void>;
|
|
@@ -75,6 +77,9 @@ declare class ConnectionManager {
|
|
|
75
77
|
createSparkClient(address: string, certPath?: string): Promise<SparkServiceClient & {
|
|
76
78
|
close?: () => void;
|
|
77
79
|
}>;
|
|
80
|
+
createSparkTokenClient(address: string, certPath?: string): Promise<SparkTokenServiceClient & {
|
|
81
|
+
close?: () => void;
|
|
82
|
+
}>;
|
|
78
83
|
getStreamChannel(address: string): Promise<Channel | Channel$1 | undefined>;
|
|
79
84
|
private authenticate;
|
|
80
85
|
private createSparkAuthnGrpcConnection;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { Channel } from 'nice-grpc';
|
|
2
2
|
import { Channel as Channel$1 } from 'nice-grpc-web';
|
|
3
|
-
import { E as Empty, g as SparkServiceClient } from '../spark-
|
|
3
|
+
import { E as Empty, g as SparkServiceClient } from '../spark-DjR1b3TC.js';
|
|
4
4
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
5
5
|
import { CallOptions } from 'nice-grpc-common';
|
|
6
6
|
import { WalletConfigService } from './config.js';
|
|
7
|
+
import { SparkTokenServiceClient } from '../proto/spark_token.js';
|
|
7
8
|
import '@buildonspark/lrc20-sdk';
|
|
8
|
-
import '../RequestLightningSendInput-
|
|
9
|
+
import '../RequestLightningSendInput-mXUWn_cp.js';
|
|
9
10
|
import '@lightsparkdev/core';
|
|
10
11
|
import '../BitcoinNetwork-TnABML0T.js';
|
|
11
|
-
import '../signer-
|
|
12
|
+
import '../signer-CylxIujU.js';
|
|
12
13
|
import '@scure/bip32';
|
|
13
|
-
import 'bitcoinjs-lib';
|
|
14
|
-
import '../network-DobHpaV6.js';
|
|
15
14
|
import '@scure/btc-signer';
|
|
15
|
+
import 'bitcoinjs-lib';
|
|
16
|
+
import '../network-BF2GYPye.js';
|
|
16
17
|
import './wallet-config.js';
|
|
17
18
|
|
|
18
19
|
declare enum InterruptTransferRequest_InterruptTransferAction {
|
|
@@ -61,6 +62,7 @@ interface MessageFns<T> {
|
|
|
61
62
|
declare class ConnectionManager {
|
|
62
63
|
private config;
|
|
63
64
|
private clients;
|
|
65
|
+
private tokenClients;
|
|
64
66
|
private streamClients;
|
|
65
67
|
constructor(config: WalletConfigService);
|
|
66
68
|
createClients(): Promise<void>;
|
|
@@ -75,6 +77,9 @@ declare class ConnectionManager {
|
|
|
75
77
|
createSparkClient(address: string, certPath?: string): Promise<SparkServiceClient & {
|
|
76
78
|
close?: () => void;
|
|
77
79
|
}>;
|
|
80
|
+
createSparkTokenClient(address: string, certPath?: string): Promise<SparkTokenServiceClient & {
|
|
81
|
+
close?: () => void;
|
|
82
|
+
}>;
|
|
78
83
|
getStreamChannel(address: string): Promise<Channel | Channel$1 | undefined>;
|
|
79
84
|
private authenticate;
|
|
80
85
|
private createSparkAuthnGrpcConnection;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConnectionManager
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-ROKY5KS4.js";
|
|
4
|
+
import "../chunk-VA7MV4MZ.js";
|
|
5
5
|
import "../chunk-HKAKEKCE.js";
|
|
6
6
|
import "../chunk-TWF35O6M.js";
|
|
7
|
+
import "../chunk-M6A4KFIG.js";
|
|
7
8
|
import "../chunk-MVRQ5US7.js";
|
|
8
9
|
export {
|
|
9
10
|
ConnectionManager
|