@buildonspark/spark-sdk 0.2.2 → 0.2.3

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-TM6CHQXC.js → chunk-3SEOTO43.js} +1 -1
  3. package/dist/{chunk-2ENZX6LT.js → chunk-AAZWSPUK.js} +84 -8
  4. package/dist/{chunk-4JD4HIAN.js → chunk-G4MSZ6DE.js} +299 -1
  5. package/dist/{chunk-2TUM3R6C.js → chunk-PLLJIZC3.js} +51 -17
  6. package/dist/{chunk-S2AL73MZ.js → chunk-PTRXJS7Q.js} +1 -1
  7. package/dist/debug.cjs +427 -22
  8. package/dist/debug.d.cts +4 -4
  9. package/dist/debug.d.ts +4 -4
  10. package/dist/debug.js +4 -4
  11. package/dist/index.cjs +427 -22
  12. package/dist/index.d.cts +4 -4
  13. package/dist/index.d.ts +4 -4
  14. package/dist/index.js +5 -5
  15. package/dist/index.node.cjs +427 -22
  16. package/dist/index.node.d.cts +7 -5
  17. package/dist/index.node.d.ts +7 -5
  18. package/dist/index.node.js +4 -4
  19. package/dist/native/index.cjs +427 -22
  20. package/dist/native/index.d.cts +53 -10
  21. package/dist/native/index.d.ts +53 -10
  22. package/dist/native/index.js +427 -22
  23. package/dist/proto/lrc20.d.cts +1 -1
  24. package/dist/proto/lrc20.d.ts +1 -1
  25. package/dist/proto/lrc20.js +1 -1
  26. package/dist/proto/spark.cjs +84 -8
  27. package/dist/proto/spark.d.cts +1 -1
  28. package/dist/proto/spark.d.ts +1 -1
  29. package/dist/proto/spark.js +1 -1
  30. package/dist/proto/spark_token.cjs +301 -0
  31. package/dist/proto/spark_token.d.cts +35 -2
  32. package/dist/proto/spark_token.d.ts +35 -2
  33. package/dist/proto/spark_token.js +8 -2
  34. package/dist/{sdk-types-DJ2ve9YY.d.cts → sdk-types-CB9HrW5O.d.cts} +1 -1
  35. package/dist/{sdk-types-DCIVdKUT.d.ts → sdk-types-CkRNraXT.d.ts} +1 -1
  36. package/dist/{spark-BUOx3U7Q.d.cts → spark-B_7nZx6T.d.cts} +112 -10
  37. package/dist/{spark-BUOx3U7Q.d.ts → spark-B_7nZx6T.d.ts} +112 -10
  38. package/dist/{spark-wallet-B_96y9BS.d.ts → spark-wallet-CxcGPXRB.d.ts} +7 -3
  39. package/dist/{spark-wallet-CHwKQYJu.d.cts → spark-wallet-DJJm19BP.d.cts} +7 -3
  40. package/dist/tests/test-utils.cjs +380 -9
  41. package/dist/tests/test-utils.d.cts +3 -3
  42. package/dist/tests/test-utils.d.ts +3 -3
  43. package/dist/tests/test-utils.js +5 -5
  44. package/dist/types/index.cjs +84 -8
  45. package/dist/types/index.d.cts +2 -2
  46. package/dist/types/index.d.ts +2 -2
  47. package/dist/types/index.js +2 -2
  48. package/dist/{xchain-address-DLbW1iDh.d.ts → xchain-address-Bh9w1SeC.d.ts} +2 -2
  49. package/dist/{xchain-address-D5MIHCDL.d.cts → xchain-address-SZ7dkVUE.d.cts} +2 -2
  50. package/package.json +1 -1
  51. package/src/proto/spark.ts +172 -16
  52. package/src/proto/spark_token.ts +369 -0
  53. package/src/services/token-transactions.ts +6 -2
  54. package/src/spark-wallet/spark-wallet.ts +55 -14
@@ -15387,14 +15387,6 @@ var SparkServiceDefinition = {
15387
15387
  responseStream: false,
15388
15388
  options: {}
15389
15389
  },
15390
- create_tree_v2: {
15391
- name: "create_tree_v2",
15392
- requestType: CreateTreeRequest,
15393
- requestStream: false,
15394
- responseType: CreateTreeResponse,
15395
- responseStream: false,
15396
- options: {}
15397
- },
15398
15390
  get_signing_operator_list: {
15399
15391
  name: "get_signing_operator_list",
15400
15392
  requestType: Empty,
@@ -15561,6 +15553,90 @@ var SparkServiceDefinition = {
15561
15553
  responseType: ExitSingleNodeTreesResponse,
15562
15554
  responseStream: false,
15563
15555
  options: {}
15556
+ },
15557
+ /**
15558
+ * The following endpoints enforce inclusion of Direct Transactions used
15559
+ * for unilateral exits
15560
+ */
15561
+ create_tree_v2: {
15562
+ name: "create_tree_v2",
15563
+ requestType: CreateTreeRequest,
15564
+ requestStream: false,
15565
+ responseType: CreateTreeResponse,
15566
+ responseStream: false,
15567
+ options: {}
15568
+ },
15569
+ cooperative_exit_v2: {
15570
+ name: "cooperative_exit_v2",
15571
+ requestType: CooperativeExitRequest,
15572
+ requestStream: false,
15573
+ responseType: CooperativeExitResponse,
15574
+ responseStream: false,
15575
+ options: {}
15576
+ },
15577
+ extend_leaf_v2: {
15578
+ name: "extend_leaf_v2",
15579
+ requestType: ExtendLeafRequest,
15580
+ requestStream: false,
15581
+ responseType: ExtendLeafResponse,
15582
+ responseStream: false,
15583
+ options: {}
15584
+ },
15585
+ claim_transfer_sign_refunds_v2: {
15586
+ name: "claim_transfer_sign_refunds_v2",
15587
+ requestType: ClaimTransferSignRefundsRequest,
15588
+ requestStream: false,
15589
+ responseType: ClaimTransferSignRefundsResponse,
15590
+ responseStream: false,
15591
+ options: {}
15592
+ },
15593
+ finalize_node_signatures_v2: {
15594
+ name: "finalize_node_signatures_v2",
15595
+ requestType: FinalizeNodeSignaturesRequest,
15596
+ requestStream: false,
15597
+ responseType: FinalizeNodeSignaturesResponse,
15598
+ responseStream: false,
15599
+ options: {}
15600
+ },
15601
+ initiate_preimage_swap_v2: {
15602
+ name: "initiate_preimage_swap_v2",
15603
+ requestType: InitiatePreimageSwapRequest,
15604
+ requestStream: false,
15605
+ responseType: InitiatePreimageSwapResponse,
15606
+ responseStream: false,
15607
+ options: {}
15608
+ },
15609
+ start_leaf_swap_v2: {
15610
+ name: "start_leaf_swap_v2",
15611
+ requestType: StartTransferRequest,
15612
+ requestStream: false,
15613
+ responseType: StartTransferResponse,
15614
+ responseStream: false,
15615
+ options: {}
15616
+ },
15617
+ counter_leaf_swap_v2: {
15618
+ name: "counter_leaf_swap_v2",
15619
+ requestType: CounterLeafSwapRequest,
15620
+ requestStream: false,
15621
+ responseType: CounterLeafSwapResponse,
15622
+ responseStream: false,
15623
+ options: {}
15624
+ },
15625
+ start_transfer_v2: {
15626
+ name: "start_transfer_v2",
15627
+ requestType: StartTransferRequest,
15628
+ requestStream: false,
15629
+ responseType: StartTransferResponse,
15630
+ responseStream: false,
15631
+ options: {}
15632
+ },
15633
+ refresh_timelock_v2: {
15634
+ name: "refresh_timelock_v2",
15635
+ requestType: RefreshTimelockRequest,
15636
+ requestStream: false,
15637
+ responseType: RefreshTimelockResponse,
15638
+ responseStream: false,
15639
+ options: {}
15564
15640
  }
15565
15641
  }
15566
15642
  };
@@ -16795,7 +16871,7 @@ init_buffer();
16795
16871
  var import_core8 = require("@lightsparkdev/core");
16796
16872
  var isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative";
16797
16873
  var isBun = globalThis.Bun !== void 0;
16798
- var packageVersion = true ? "0.2.2" : "unknown";
16874
+ var packageVersion = true ? "0.2.3" : "unknown";
16799
16875
  var baseEnvStr = "unknown";
16800
16876
  if (isBun) {
16801
16877
  const bunVersion = "version" in globalThis.Bun ? globalThis.Bun.version : "unknown-version";
@@ -20938,6 +21014,293 @@ var TokenTransactionWithStatus2 = {
20938
21014
  return message;
20939
21015
  }
20940
21016
  };
21017
+ function createBaseFreezeTokensPayload2() {
21018
+ return {
21019
+ version: 0,
21020
+ ownerPublicKey: new Uint8Array(0),
21021
+ tokenPublicKey: void 0,
21022
+ tokenIdentifier: void 0,
21023
+ issuerProvidedTimestamp: 0,
21024
+ operatorIdentityPublicKey: new Uint8Array(0),
21025
+ shouldUnfreeze: false
21026
+ };
21027
+ }
21028
+ var FreezeTokensPayload2 = {
21029
+ encode(message, writer = new import_wire7.BinaryWriter()) {
21030
+ if (message.version !== 0) {
21031
+ writer.uint32(8).uint32(message.version);
21032
+ }
21033
+ if (message.ownerPublicKey.length !== 0) {
21034
+ writer.uint32(18).bytes(message.ownerPublicKey);
21035
+ }
21036
+ if (message.tokenPublicKey !== void 0) {
21037
+ writer.uint32(26).bytes(message.tokenPublicKey);
21038
+ }
21039
+ if (message.tokenIdentifier !== void 0) {
21040
+ writer.uint32(34).bytes(message.tokenIdentifier);
21041
+ }
21042
+ if (message.issuerProvidedTimestamp !== 0) {
21043
+ writer.uint32(40).uint64(message.issuerProvidedTimestamp);
21044
+ }
21045
+ if (message.operatorIdentityPublicKey.length !== 0) {
21046
+ writer.uint32(50).bytes(message.operatorIdentityPublicKey);
21047
+ }
21048
+ if (message.shouldUnfreeze !== false) {
21049
+ writer.uint32(56).bool(message.shouldUnfreeze);
21050
+ }
21051
+ return writer;
21052
+ },
21053
+ decode(input, length) {
21054
+ const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
21055
+ const end = length === void 0 ? reader.len : reader.pos + length;
21056
+ const message = createBaseFreezeTokensPayload2();
21057
+ while (reader.pos < end) {
21058
+ const tag = reader.uint32();
21059
+ switch (tag >>> 3) {
21060
+ case 1: {
21061
+ if (tag !== 8) {
21062
+ break;
21063
+ }
21064
+ message.version = reader.uint32();
21065
+ continue;
21066
+ }
21067
+ case 2: {
21068
+ if (tag !== 18) {
21069
+ break;
21070
+ }
21071
+ message.ownerPublicKey = reader.bytes();
21072
+ continue;
21073
+ }
21074
+ case 3: {
21075
+ if (tag !== 26) {
21076
+ break;
21077
+ }
21078
+ message.tokenPublicKey = reader.bytes();
21079
+ continue;
21080
+ }
21081
+ case 4: {
21082
+ if (tag !== 34) {
21083
+ break;
21084
+ }
21085
+ message.tokenIdentifier = reader.bytes();
21086
+ continue;
21087
+ }
21088
+ case 5: {
21089
+ if (tag !== 40) {
21090
+ break;
21091
+ }
21092
+ message.issuerProvidedTimestamp = longToNumber4(reader.uint64());
21093
+ continue;
21094
+ }
21095
+ case 6: {
21096
+ if (tag !== 50) {
21097
+ break;
21098
+ }
21099
+ message.operatorIdentityPublicKey = reader.bytes();
21100
+ continue;
21101
+ }
21102
+ case 7: {
21103
+ if (tag !== 56) {
21104
+ break;
21105
+ }
21106
+ message.shouldUnfreeze = reader.bool();
21107
+ continue;
21108
+ }
21109
+ }
21110
+ if ((tag & 7) === 4 || tag === 0) {
21111
+ break;
21112
+ }
21113
+ reader.skip(tag & 7);
21114
+ }
21115
+ return message;
21116
+ },
21117
+ fromJSON(object) {
21118
+ return {
21119
+ version: isSet6(object.version) ? globalThis.Number(object.version) : 0,
21120
+ ownerPublicKey: isSet6(object.ownerPublicKey) ? bytesFromBase645(object.ownerPublicKey) : new Uint8Array(0),
21121
+ tokenPublicKey: isSet6(object.tokenPublicKey) ? bytesFromBase645(object.tokenPublicKey) : void 0,
21122
+ tokenIdentifier: isSet6(object.tokenIdentifier) ? bytesFromBase645(object.tokenIdentifier) : void 0,
21123
+ issuerProvidedTimestamp: isSet6(object.issuerProvidedTimestamp) ? globalThis.Number(object.issuerProvidedTimestamp) : 0,
21124
+ operatorIdentityPublicKey: isSet6(object.operatorIdentityPublicKey) ? bytesFromBase645(object.operatorIdentityPublicKey) : new Uint8Array(0),
21125
+ shouldUnfreeze: isSet6(object.shouldUnfreeze) ? globalThis.Boolean(object.shouldUnfreeze) : false
21126
+ };
21127
+ },
21128
+ toJSON(message) {
21129
+ const obj = {};
21130
+ if (message.version !== 0) {
21131
+ obj.version = Math.round(message.version);
21132
+ }
21133
+ if (message.ownerPublicKey.length !== 0) {
21134
+ obj.ownerPublicKey = base64FromBytes5(message.ownerPublicKey);
21135
+ }
21136
+ if (message.tokenPublicKey !== void 0) {
21137
+ obj.tokenPublicKey = base64FromBytes5(message.tokenPublicKey);
21138
+ }
21139
+ if (message.tokenIdentifier !== void 0) {
21140
+ obj.tokenIdentifier = base64FromBytes5(message.tokenIdentifier);
21141
+ }
21142
+ if (message.issuerProvidedTimestamp !== 0) {
21143
+ obj.issuerProvidedTimestamp = Math.round(message.issuerProvidedTimestamp);
21144
+ }
21145
+ if (message.operatorIdentityPublicKey.length !== 0) {
21146
+ obj.operatorIdentityPublicKey = base64FromBytes5(message.operatorIdentityPublicKey);
21147
+ }
21148
+ if (message.shouldUnfreeze !== false) {
21149
+ obj.shouldUnfreeze = message.shouldUnfreeze;
21150
+ }
21151
+ return obj;
21152
+ },
21153
+ create(base) {
21154
+ return FreezeTokensPayload2.fromPartial(base ?? {});
21155
+ },
21156
+ fromPartial(object) {
21157
+ const message = createBaseFreezeTokensPayload2();
21158
+ message.version = object.version ?? 0;
21159
+ message.ownerPublicKey = object.ownerPublicKey ?? new Uint8Array(0);
21160
+ message.tokenPublicKey = object.tokenPublicKey ?? void 0;
21161
+ message.tokenIdentifier = object.tokenIdentifier ?? void 0;
21162
+ message.issuerProvidedTimestamp = object.issuerProvidedTimestamp ?? 0;
21163
+ message.operatorIdentityPublicKey = object.operatorIdentityPublicKey ?? new Uint8Array(0);
21164
+ message.shouldUnfreeze = object.shouldUnfreeze ?? false;
21165
+ return message;
21166
+ }
21167
+ };
21168
+ function createBaseFreezeTokensRequest2() {
21169
+ return { freezeTokensPayload: void 0, issuerSignature: new Uint8Array(0) };
21170
+ }
21171
+ var FreezeTokensRequest2 = {
21172
+ encode(message, writer = new import_wire7.BinaryWriter()) {
21173
+ if (message.freezeTokensPayload !== void 0) {
21174
+ FreezeTokensPayload2.encode(message.freezeTokensPayload, writer.uint32(10).fork()).join();
21175
+ }
21176
+ if (message.issuerSignature.length !== 0) {
21177
+ writer.uint32(18).bytes(message.issuerSignature);
21178
+ }
21179
+ return writer;
21180
+ },
21181
+ decode(input, length) {
21182
+ const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
21183
+ const end = length === void 0 ? reader.len : reader.pos + length;
21184
+ const message = createBaseFreezeTokensRequest2();
21185
+ while (reader.pos < end) {
21186
+ const tag = reader.uint32();
21187
+ switch (tag >>> 3) {
21188
+ case 1: {
21189
+ if (tag !== 10) {
21190
+ break;
21191
+ }
21192
+ message.freezeTokensPayload = FreezeTokensPayload2.decode(reader, reader.uint32());
21193
+ continue;
21194
+ }
21195
+ case 2: {
21196
+ if (tag !== 18) {
21197
+ break;
21198
+ }
21199
+ message.issuerSignature = reader.bytes();
21200
+ continue;
21201
+ }
21202
+ }
21203
+ if ((tag & 7) === 4 || tag === 0) {
21204
+ break;
21205
+ }
21206
+ reader.skip(tag & 7);
21207
+ }
21208
+ return message;
21209
+ },
21210
+ fromJSON(object) {
21211
+ return {
21212
+ freezeTokensPayload: isSet6(object.freezeTokensPayload) ? FreezeTokensPayload2.fromJSON(object.freezeTokensPayload) : void 0,
21213
+ issuerSignature: isSet6(object.issuerSignature) ? bytesFromBase645(object.issuerSignature) : new Uint8Array(0)
21214
+ };
21215
+ },
21216
+ toJSON(message) {
21217
+ const obj = {};
21218
+ if (message.freezeTokensPayload !== void 0) {
21219
+ obj.freezeTokensPayload = FreezeTokensPayload2.toJSON(message.freezeTokensPayload);
21220
+ }
21221
+ if (message.issuerSignature.length !== 0) {
21222
+ obj.issuerSignature = base64FromBytes5(message.issuerSignature);
21223
+ }
21224
+ return obj;
21225
+ },
21226
+ create(base) {
21227
+ return FreezeTokensRequest2.fromPartial(base ?? {});
21228
+ },
21229
+ fromPartial(object) {
21230
+ const message = createBaseFreezeTokensRequest2();
21231
+ message.freezeTokensPayload = object.freezeTokensPayload !== void 0 && object.freezeTokensPayload !== null ? FreezeTokensPayload2.fromPartial(object.freezeTokensPayload) : void 0;
21232
+ message.issuerSignature = object.issuerSignature ?? new Uint8Array(0);
21233
+ return message;
21234
+ }
21235
+ };
21236
+ function createBaseFreezeTokensResponse2() {
21237
+ return { impactedOutputIds: [], impactedTokenAmount: new Uint8Array(0) };
21238
+ }
21239
+ var FreezeTokensResponse2 = {
21240
+ encode(message, writer = new import_wire7.BinaryWriter()) {
21241
+ for (const v of message.impactedOutputIds) {
21242
+ writer.uint32(10).string(v);
21243
+ }
21244
+ if (message.impactedTokenAmount.length !== 0) {
21245
+ writer.uint32(18).bytes(message.impactedTokenAmount);
21246
+ }
21247
+ return writer;
21248
+ },
21249
+ decode(input, length) {
21250
+ const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
21251
+ const end = length === void 0 ? reader.len : reader.pos + length;
21252
+ const message = createBaseFreezeTokensResponse2();
21253
+ while (reader.pos < end) {
21254
+ const tag = reader.uint32();
21255
+ switch (tag >>> 3) {
21256
+ case 1: {
21257
+ if (tag !== 10) {
21258
+ break;
21259
+ }
21260
+ message.impactedOutputIds.push(reader.string());
21261
+ continue;
21262
+ }
21263
+ case 2: {
21264
+ if (tag !== 18) {
21265
+ break;
21266
+ }
21267
+ message.impactedTokenAmount = reader.bytes();
21268
+ continue;
21269
+ }
21270
+ }
21271
+ if ((tag & 7) === 4 || tag === 0) {
21272
+ break;
21273
+ }
21274
+ reader.skip(tag & 7);
21275
+ }
21276
+ return message;
21277
+ },
21278
+ fromJSON(object) {
21279
+ return {
21280
+ impactedOutputIds: globalThis.Array.isArray(object?.impactedOutputIds) ? object.impactedOutputIds.map((e) => globalThis.String(e)) : [],
21281
+ impactedTokenAmount: isSet6(object.impactedTokenAmount) ? bytesFromBase645(object.impactedTokenAmount) : new Uint8Array(0)
21282
+ };
21283
+ },
21284
+ toJSON(message) {
21285
+ const obj = {};
21286
+ if (message.impactedOutputIds?.length) {
21287
+ obj.impactedOutputIds = message.impactedOutputIds;
21288
+ }
21289
+ if (message.impactedTokenAmount.length !== 0) {
21290
+ obj.impactedTokenAmount = base64FromBytes5(message.impactedTokenAmount);
21291
+ }
21292
+ return obj;
21293
+ },
21294
+ create(base) {
21295
+ return FreezeTokensResponse2.fromPartial(base ?? {});
21296
+ },
21297
+ fromPartial(object) {
21298
+ const message = createBaseFreezeTokensResponse2();
21299
+ message.impactedOutputIds = object.impactedOutputIds?.map((e) => e) || [];
21300
+ message.impactedTokenAmount = object.impactedTokenAmount ?? new Uint8Array(0);
21301
+ return message;
21302
+ }
21303
+ };
20941
21304
  var SparkTokenServiceDefinition = {
20942
21305
  name: "SparkTokenService",
20943
21306
  fullName: "spark_token.SparkTokenService",
@@ -20989,6 +21352,14 @@ var SparkTokenServiceDefinition = {
20989
21352
  responseType: QueryTokenOutputsResponse2,
20990
21353
  responseStream: false,
20991
21354
  options: {}
21355
+ },
21356
+ freeze_tokens: {
21357
+ name: "freeze_tokens",
21358
+ requestType: FreezeTokensRequest2,
21359
+ requestStream: false,
21360
+ responseType: FreezeTokensResponse2,
21361
+ responseStream: false,
21362
+ options: {}
20992
21363
  }
20993
21364
  }
20994
21365
  };
@@ -1,5 +1,5 @@
1
- import { Q as QueryTransfersResponse, f as Transfer, d as TreeNode } from '../spark-BUOx3U7Q.cjs';
2
- import { o as SparkWallet$1, I as InitWalletResponse, C as ConfigOptions, q as SparkWalletProps } from '../spark-wallet-CHwKQYJu.cjs';
1
+ import { Q as QueryTransfersResponse, f as Transfer, d as TreeNode } from '../spark-B_7nZx6T.cjs';
2
+ import { o as SparkWallet$1, I as InitWalletResponse, C as ConfigOptions, q as SparkWalletProps } from '../spark-wallet-DJJm19BP.cjs';
3
3
  import { a1 as SparkSigner, a2 as DefaultSparkSigner } from '../client-CcYzmpmj.cjs';
4
4
  import { Transaction } from '@scure/btc-signer';
5
5
  import { TransactionInput, TransactionOutput } from '@scure/btc-signer/psbt';
@@ -11,7 +11,7 @@ import 'nice-grpc';
11
11
  import 'nice-grpc-web';
12
12
  import '../proto/spark_token.cjs';
13
13
  import 'eventemitter3';
14
- import '../sdk-types-DJ2ve9YY.cjs';
14
+ import '../sdk-types-CB9HrW5O.cjs';
15
15
  import '@lightsparkdev/core';
16
16
  import '@scure/bip32';
17
17
  import '../types-BADxR3bm.cjs';
@@ -1,5 +1,5 @@
1
- import { Q as QueryTransfersResponse, f as Transfer, d as TreeNode } from '../spark-BUOx3U7Q.js';
2
- import { o as SparkWallet$1, I as InitWalletResponse, C as ConfigOptions, q as SparkWalletProps } from '../spark-wallet-B_96y9BS.js';
1
+ import { Q as QueryTransfersResponse, f as Transfer, d as TreeNode } from '../spark-B_7nZx6T.js';
2
+ import { o as SparkWallet$1, I as InitWalletResponse, C as ConfigOptions, q as SparkWalletProps } from '../spark-wallet-CxcGPXRB.js';
3
3
  import { a1 as SparkSigner, a2 as DefaultSparkSigner } from '../client-CGTRS23n.js';
4
4
  import { Transaction } from '@scure/btc-signer';
5
5
  import { TransactionInput, TransactionOutput } from '@scure/btc-signer/psbt';
@@ -11,7 +11,7 @@ import 'nice-grpc';
11
11
  import 'nice-grpc-web';
12
12
  import '../proto/spark_token.js';
13
13
  import 'eventemitter3';
14
- import '../sdk-types-DCIVdKUT.js';
14
+ import '../sdk-types-CkRNraXT.js';
15
15
  import '@lightsparkdev/core';
16
16
  import '@scure/bip32';
17
17
  import '../types-BADxR3bm.js';
@@ -1,4 +1,4 @@
1
- import "../chunk-S2AL73MZ.js";
1
+ import "../chunk-PTRXJS7Q.js";
2
2
  import "../chunk-BYXBJQAS.js";
3
3
  import {
4
4
  BitcoinFaucet,
@@ -11,11 +11,11 @@ import {
11
11
  WalletConfigService,
12
12
  getNetwork,
13
13
  getP2TRAddressFromPublicKey
14
- } from "../chunk-2TUM3R6C.js";
15
- import "../chunk-4JD4HIAN.js";
16
- import "../chunk-TM6CHQXC.js";
14
+ } from "../chunk-PLLJIZC3.js";
15
+ import "../chunk-G4MSZ6DE.js";
16
+ import "../chunk-3SEOTO43.js";
17
17
  import "../chunk-CDLETEDT.js";
18
- import "../chunk-2ENZX6LT.js";
18
+ import "../chunk-AAZWSPUK.js";
19
19
  import "../chunk-MVRQ5US7.js";
20
20
 
21
21
  // src/tests/test-utils.ts
@@ -16342,14 +16342,6 @@ var SparkServiceDefinition = {
16342
16342
  responseStream: false,
16343
16343
  options: {}
16344
16344
  },
16345
- create_tree_v2: {
16346
- name: "create_tree_v2",
16347
- requestType: CreateTreeRequest,
16348
- requestStream: false,
16349
- responseType: CreateTreeResponse,
16350
- responseStream: false,
16351
- options: {}
16352
- },
16353
16345
  get_signing_operator_list: {
16354
16346
  name: "get_signing_operator_list",
16355
16347
  requestType: Empty,
@@ -16516,6 +16508,90 @@ var SparkServiceDefinition = {
16516
16508
  responseType: ExitSingleNodeTreesResponse,
16517
16509
  responseStream: false,
16518
16510
  options: {}
16511
+ },
16512
+ /**
16513
+ * The following endpoints enforce inclusion of Direct Transactions used
16514
+ * for unilateral exits
16515
+ */
16516
+ create_tree_v2: {
16517
+ name: "create_tree_v2",
16518
+ requestType: CreateTreeRequest,
16519
+ requestStream: false,
16520
+ responseType: CreateTreeResponse,
16521
+ responseStream: false,
16522
+ options: {}
16523
+ },
16524
+ cooperative_exit_v2: {
16525
+ name: "cooperative_exit_v2",
16526
+ requestType: CooperativeExitRequest,
16527
+ requestStream: false,
16528
+ responseType: CooperativeExitResponse,
16529
+ responseStream: false,
16530
+ options: {}
16531
+ },
16532
+ extend_leaf_v2: {
16533
+ name: "extend_leaf_v2",
16534
+ requestType: ExtendLeafRequest,
16535
+ requestStream: false,
16536
+ responseType: ExtendLeafResponse,
16537
+ responseStream: false,
16538
+ options: {}
16539
+ },
16540
+ claim_transfer_sign_refunds_v2: {
16541
+ name: "claim_transfer_sign_refunds_v2",
16542
+ requestType: ClaimTransferSignRefundsRequest,
16543
+ requestStream: false,
16544
+ responseType: ClaimTransferSignRefundsResponse,
16545
+ responseStream: false,
16546
+ options: {}
16547
+ },
16548
+ finalize_node_signatures_v2: {
16549
+ name: "finalize_node_signatures_v2",
16550
+ requestType: FinalizeNodeSignaturesRequest,
16551
+ requestStream: false,
16552
+ responseType: FinalizeNodeSignaturesResponse,
16553
+ responseStream: false,
16554
+ options: {}
16555
+ },
16556
+ initiate_preimage_swap_v2: {
16557
+ name: "initiate_preimage_swap_v2",
16558
+ requestType: InitiatePreimageSwapRequest,
16559
+ requestStream: false,
16560
+ responseType: InitiatePreimageSwapResponse,
16561
+ responseStream: false,
16562
+ options: {}
16563
+ },
16564
+ start_leaf_swap_v2: {
16565
+ name: "start_leaf_swap_v2",
16566
+ requestType: StartTransferRequest,
16567
+ requestStream: false,
16568
+ responseType: StartTransferResponse,
16569
+ responseStream: false,
16570
+ options: {}
16571
+ },
16572
+ counter_leaf_swap_v2: {
16573
+ name: "counter_leaf_swap_v2",
16574
+ requestType: CounterLeafSwapRequest,
16575
+ requestStream: false,
16576
+ responseType: CounterLeafSwapResponse,
16577
+ responseStream: false,
16578
+ options: {}
16579
+ },
16580
+ start_transfer_v2: {
16581
+ name: "start_transfer_v2",
16582
+ requestType: StartTransferRequest,
16583
+ requestStream: false,
16584
+ responseType: StartTransferResponse,
16585
+ responseStream: false,
16586
+ options: {}
16587
+ },
16588
+ refresh_timelock_v2: {
16589
+ name: "refresh_timelock_v2",
16590
+ requestType: RefreshTimelockRequest,
16591
+ requestStream: false,
16592
+ responseType: RefreshTimelockResponse,
16593
+ responseStream: false,
16594
+ options: {}
16519
16595
  }
16520
16596
  }
16521
16597
  };
@@ -1,7 +1,7 @@
1
1
  export { B as BitcoinNetwork, C as ClaimStaticDepositOutput, a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimate, d as CoopExitFeeEstimatesInput, e as CoopExitFeeEstimatesOutput, f as CoopExitFeeQuote, h as CoopExitFeeQuoteInput, i as CoopExitRequest, k as CurrencyAmount, l as CurrencyUnit, E as ExitSpeed, G as GetChallengeOutput, I as Invoice, L as Leaf, m as LeavesSwapFeeEstimateOutput, o as LeavesSwapRequest, q as LightningReceiveRequest, r as LightningReceiveRequestStatus, s as LightningSendFeeEstimateInput, t as LightningSendFeeEstimateOutput, v as LightningSendRequest, w as LightningSendRequestStatus, P as PageInfo, R as RequestCoopExitInput, x as RequestLeavesSwapInput, y as RequestLightningReceiveInput, z as RequestLightningSendInput, S as SparkCoopExitRequestStatus, A as SparkLeavesSwapRequestStatus, D as SparkTransferToLeavesConnection, F as StaticDepositQuoteInput, H as StaticDepositQuoteOutput, J as SwapLeaf, T as Transfer, U as UserLeafInput, V as VerifyChallengeOutput, g as getCoopExitFeeQuoteQuery, j as getCoopExitRequestQuery, n as getLeavesSwapRequestQuery, p as getLightningReceiveRequestQuery, u as getLightningSendRequestQuery } from '../client-CcYzmpmj.cjs';
2
2
  export { ClaimStaticDeposit, ClaimStaticDepositInput, ClaimStaticDepositRequestType, ClaimStaticDepositStatus, CompleteCoopExitOutput, CompleteLeavesSwapOutput, CompleteSeedReleaseInput, CompleteSeedReleaseOutput, Connection, CoopExitFeeQuoteOutput, Entity, GetChallengeInput, LeavesSwapFeeEstimateInput, NotifyReceiverTransferInput, Provider, RequestCoopExitOutput, RequestLeavesSwapOutput, RequestLightningReceiveOutput, RequestLightningSendOutput, SparkUserRequestStatus, SparkUserRequestType, SparkWalletUser, SparkWalletUserToUserRequestsConnection, StartSeedReleaseInput, UserRequest, VerifyChallengeInput, WalletUserIdentityPublicKeyInput, WalletUserIdentityPublicKeyOutput, getClaimStaticDepositQuery, getUserRequestQuery } from '../graphql/objects/index.cjs';
3
- export { c as CommonProto, s as SparkProto } from '../spark-BUOx3U7Q.cjs';
4
- export { T as TransferDirection, W as WalletLeaf, a as WalletTransfer, b as WalletTransferLeaf, c as mapTransferLeafToWalletTransferLeaf, d as mapTransferToWalletTransfer, m as mapTreeNodeToWalletLeaf } from '../sdk-types-DJ2ve9YY.cjs';
3
+ export { c as CommonProto, s as SparkProto } from '../spark-B_7nZx6T.cjs';
4
+ export { T as TransferDirection, W as WalletLeaf, a as WalletTransfer, b as WalletTransferLeaf, c as mapTransferLeafToWalletTransferLeaf, d as mapTransferToWalletTransfer, m as mapTreeNodeToWalletLeaf } from '../sdk-types-CB9HrW5O.cjs';
5
5
  import '@lightsparkdev/core';
6
6
  import '@buildonspark/lrc20-sdk';
7
7
  import '@scure/btc-signer';
@@ -1,7 +1,7 @@
1
1
  export { B as BitcoinNetwork, C as ClaimStaticDepositOutput, a as CompleteCoopExitInput, b as CompleteLeavesSwapInput, c as CoopExitFeeEstimate, d as CoopExitFeeEstimatesInput, e as CoopExitFeeEstimatesOutput, f as CoopExitFeeQuote, h as CoopExitFeeQuoteInput, i as CoopExitRequest, k as CurrencyAmount, l as CurrencyUnit, E as ExitSpeed, G as GetChallengeOutput, I as Invoice, L as Leaf, m as LeavesSwapFeeEstimateOutput, o as LeavesSwapRequest, q as LightningReceiveRequest, r as LightningReceiveRequestStatus, s as LightningSendFeeEstimateInput, t as LightningSendFeeEstimateOutput, v as LightningSendRequest, w as LightningSendRequestStatus, P as PageInfo, R as RequestCoopExitInput, x as RequestLeavesSwapInput, y as RequestLightningReceiveInput, z as RequestLightningSendInput, S as SparkCoopExitRequestStatus, A as SparkLeavesSwapRequestStatus, D as SparkTransferToLeavesConnection, F as StaticDepositQuoteInput, H as StaticDepositQuoteOutput, J as SwapLeaf, T as Transfer, U as UserLeafInput, V as VerifyChallengeOutput, g as getCoopExitFeeQuoteQuery, j as getCoopExitRequestQuery, n as getLeavesSwapRequestQuery, p as getLightningReceiveRequestQuery, u as getLightningSendRequestQuery } from '../client-CGTRS23n.js';
2
2
  export { ClaimStaticDeposit, ClaimStaticDepositInput, ClaimStaticDepositRequestType, ClaimStaticDepositStatus, CompleteCoopExitOutput, CompleteLeavesSwapOutput, CompleteSeedReleaseInput, CompleteSeedReleaseOutput, Connection, CoopExitFeeQuoteOutput, Entity, GetChallengeInput, LeavesSwapFeeEstimateInput, NotifyReceiverTransferInput, Provider, RequestCoopExitOutput, RequestLeavesSwapOutput, RequestLightningReceiveOutput, RequestLightningSendOutput, SparkUserRequestStatus, SparkUserRequestType, SparkWalletUser, SparkWalletUserToUserRequestsConnection, StartSeedReleaseInput, UserRequest, VerifyChallengeInput, WalletUserIdentityPublicKeyInput, WalletUserIdentityPublicKeyOutput, getClaimStaticDepositQuery, getUserRequestQuery } from '../graphql/objects/index.js';
3
- export { c as CommonProto, s as SparkProto } from '../spark-BUOx3U7Q.js';
4
- export { T as TransferDirection, W as WalletLeaf, a as WalletTransfer, b as WalletTransferLeaf, c as mapTransferLeafToWalletTransferLeaf, d as mapTransferToWalletTransfer, m as mapTreeNodeToWalletLeaf } from '../sdk-types-DCIVdKUT.js';
3
+ export { c as CommonProto, s as SparkProto } from '../spark-B_7nZx6T.js';
4
+ export { T as TransferDirection, W as WalletLeaf, a as WalletTransfer, b as WalletTransferLeaf, c as mapTransferLeafToWalletTransferLeaf, d as mapTransferToWalletTransfer, m as mapTreeNodeToWalletLeaf } from '../sdk-types-CkRNraXT.js';
5
5
  import '@lightsparkdev/core';
6
6
  import '@buildonspark/lrc20-sdk';
7
7
  import '@scure/btc-signer';
@@ -3,7 +3,7 @@ import {
3
3
  mapTransferLeafToWalletTransferLeaf,
4
4
  mapTransferToWalletTransfer,
5
5
  mapTreeNodeToWalletLeaf
6
- } from "../chunk-TM6CHQXC.js";
6
+ } from "../chunk-3SEOTO43.js";
7
7
  import {
8
8
  BitcoinNetwork_default,
9
9
  ClaimStaticDepositRequestType_default,
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  common_exports,
30
30
  spark_exports
31
- } from "../chunk-2ENZX6LT.js";
31
+ } from "../chunk-AAZWSPUK.js";
32
32
  import "../chunk-MVRQ5US7.js";
33
33
  export {
34
34
  BitcoinNetwork_default as BitcoinNetwork,
@@ -1,9 +1,9 @@
1
1
  import * as btc from '@scure/btc-signer';
2
2
  import { Transaction } from '@scure/btc-signer';
3
3
  import { TransactionOutput, TransactionInput } from '@scure/btc-signer/psbt';
4
- import { N as Network, T as TokenOutputsMap, B as Bech32mTokenIdentifier, r as TokenBalanceMap, e as SparkAddressFormat } from './spark-wallet-B_96y9BS.js';
4
+ import { N as Network, T as TokenOutputsMap, B as Bech32mTokenIdentifier, r as TokenBalanceMap, e as SparkAddressFormat } from './spark-wallet-CxcGPXRB.js';
5
5
  import { a8 as SigningNonce, a9 as SigningCommitment } from './client-CGTRS23n.js';
6
- import { j as OutputWithPreviousTransactionData, k as TransferPackage, g as SparkServiceClient } from './spark-BUOx3U7Q.js';
6
+ import { j as OutputWithPreviousTransactionData, k as TransferPackage, g as SparkServiceClient } from './spark-B_7nZx6T.js';
7
7
 
8
8
  declare function generateSignatureFromExistingAdaptor(signature: Uint8Array, adaptorPrivateKeyBytes: Uint8Array): Uint8Array;
9
9
  declare function generateAdaptorFromSignature(signature: Uint8Array): {
@@ -1,9 +1,9 @@
1
1
  import * as btc from '@scure/btc-signer';
2
2
  import { Transaction } from '@scure/btc-signer';
3
3
  import { TransactionOutput, TransactionInput } from '@scure/btc-signer/psbt';
4
- import { N as Network, T as TokenOutputsMap, B as Bech32mTokenIdentifier, r as TokenBalanceMap, e as SparkAddressFormat } from './spark-wallet-CHwKQYJu.cjs';
4
+ import { N as Network, T as TokenOutputsMap, B as Bech32mTokenIdentifier, r as TokenBalanceMap, e as SparkAddressFormat } from './spark-wallet-DJJm19BP.cjs';
5
5
  import { a8 as SigningNonce, a9 as SigningCommitment } from './client-CcYzmpmj.cjs';
6
- import { j as OutputWithPreviousTransactionData, k as TransferPackage, g as SparkServiceClient } from './spark-BUOx3U7Q.cjs';
6
+ import { j as OutputWithPreviousTransactionData, k as TransferPackage, g as SparkServiceClient } from './spark-B_7nZx6T.cjs';
7
7
 
8
8
  declare function generateSignatureFromExistingAdaptor(signature: Uint8Array, adaptorPrivateKeyBytes: Uint8Array): Uint8Array;
9
9
  declare function generateAdaptorFromSignature(signature: Uint8Array): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildonspark/spark-sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "author": "",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",