@buildonspark/spark-sdk 0.2.7 → 0.2.9
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 +17 -0
- package/dist/bare/index.cjs +1683 -1901
- package/dist/bare/index.d.cts +242 -292
- package/dist/bare/index.d.ts +242 -292
- package/dist/bare/index.js +1604 -1829
- package/dist/{chunk-7LY7PJQL.js → chunk-23BBEC25.js} +14 -5
- package/dist/{chunk-R5VUHUJR.js → chunk-5Y7YILMA.js} +4153 -3728
- package/dist/{chunk-GIDAHHDB.js → chunk-6CMNEDBK.js} +217 -9
- package/dist/{chunk-J24LM4RO.js → chunk-76SYPHOC.js} +1 -1
- package/dist/{chunk-2HD3USKS.js → chunk-A5M55UR3.js} +0 -24
- package/dist/{client-BmnZ1xDg.d.cts → client-B9CAWKWz.d.cts} +1 -1
- package/dist/{client-DmjOifnt.d.ts → client-Dd3QnxQu.d.ts} +1 -1
- package/dist/debug.cjs +1680 -1957
- package/dist/debug.d.cts +13 -8
- package/dist/debug.d.ts +13 -8
- package/dist/debug.js +6 -8
- package/dist/graphql/objects/index.d.cts +3 -3
- package/dist/graphql/objects/index.d.ts +3 -3
- package/dist/index.cjs +1729 -1948
- package/dist/index.d.cts +18 -6
- package/dist/index.d.ts +18 -6
- package/dist/index.js +17 -8
- package/dist/index.node.cjs +1729 -1948
- package/dist/index.node.d.cts +7 -6
- package/dist/index.node.d.ts +7 -6
- package/dist/index.node.js +22 -6
- package/dist/native/index.cjs +1723 -1949
- package/dist/native/index.d.cts +80 -125
- package/dist/native/index.d.ts +80 -125
- package/dist/native/index.js +1652 -1884
- package/dist/proto/spark.cjs +0 -24
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark.js +1 -1
- package/dist/proto/spark_token.cjs +221 -8
- package/dist/proto/spark_token.d.cts +25 -2
- package/dist/proto/spark_token.d.ts +25 -2
- package/dist/proto/spark_token.js +12 -2
- package/dist/{spark-B305mDNB.d.cts → spark-CtGJPkx4.d.cts} +3 -31
- package/dist/{spark-B305mDNB.d.ts → spark-CtGJPkx4.d.ts} +3 -31
- package/dist/{spark-wallet-BdwARy70.d.cts → spark-wallet-Cp3yv6cK.d.ts} +40 -31
- package/dist/{spark-wallet-enp968Uc.d.ts → spark-wallet-yc2KhsVY.d.cts} +40 -31
- package/dist/{spark-wallet.node-CtpJlYBs.d.cts → spark-wallet.node-D0Qw5Wb4.d.cts} +1 -1
- package/dist/{spark-wallet.node-DqWcsNb6.d.ts → spark-wallet.node-D4IovOHu.d.ts} +1 -1
- package/dist/tests/test-utils.cjs +483 -1120
- package/dist/tests/test-utils.d.cts +9 -5
- package/dist/tests/test-utils.d.ts +9 -5
- package/dist/tests/test-utils.js +5 -6
- package/dist/{token-transactions-3-pVToE0.d.cts → token-transactions-0nmR9mQO.d.ts} +17 -12
- package/dist/{token-transactions-84Hp0hGz.d.ts → token-transactions-CwhlOgIP.d.cts} +17 -12
- package/dist/types/index.cjs +0 -24
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -2
- package/dist/{xchain-address-BtuJEbzG.d.cts → xchain-address-BPwpnmuY.d.ts} +9 -3
- package/dist/{xchain-address-Q1BrcwID.d.ts → xchain-address-CNQEwLjR.d.cts} +9 -3
- package/package.json +1 -1
- package/src/constants.ts +7 -1
- package/src/debug.ts +1 -1
- package/src/proto/spark.ts +2 -48
- package/src/proto/spark_token.ts +255 -7
- package/src/services/token-transactions.ts +92 -44
- package/src/services/transfer.ts +20 -17
- package/src/services/wallet-config.ts +2 -0
- package/src/signer/signer.react-native.ts +0 -2
- package/src/spark-wallet/spark-wallet.browser.ts +9 -8
- package/src/spark-wallet/spark-wallet.node.ts +8 -4
- package/src/spark-wallet/spark-wallet.ts +427 -229
- package/src/tests/address.test.ts +87 -1
- package/src/tests/integration/retry.test.ts +78 -0
- package/src/tests/integration/ssp/static-deposit-validation.test.ts +1 -1
- package/src/tests/integration/transfer.test.ts +285 -1
- package/src/tests/integration/wallet.test.ts +160 -0
- package/src/tests/{tokens.test.ts → token-hashing.test.ts} +150 -162
- package/src/tests/token-outputs.test.ts +194 -0
- package/src/tests/utils/spark-testing-wallet.ts +16 -8
- package/src/utils/address.ts +152 -11
- package/src/utils/invoice-hashing.test.ts +235 -0
- package/src/utils/invoice-hashing.ts +227 -0
- package/src/utils/mempool.ts +6 -0
- package/src/utils/retry.ts +116 -0
- package/src/utils/token-hashing.ts +566 -0
- package/src/utils/token-transactions.ts +9 -5
- package/dist/chunk-7N6R7G3E.js +0 -7
- package/dist/spark-wallet.browser-BYlprQpX.d.ts +0 -12
- package/dist/spark-wallet.browser-CVI2Ss3u.d.cts +0 -12
- package/src/services/tree-creation.ts +0 -893
- package/src/tests/integration/tree-creation.test.ts +0 -46
|
@@ -1319,7 +1319,7 @@ __export(test_utils_exports, {
|
|
|
1319
1319
|
module.exports = __toCommonJS(test_utils_exports);
|
|
1320
1320
|
init_buffer();
|
|
1321
1321
|
var import_secp256k116 = require("@noble/curves/secp256k1");
|
|
1322
|
-
var
|
|
1322
|
+
var import_btc_signer7 = require("@scure/btc-signer");
|
|
1323
1323
|
|
|
1324
1324
|
// src/errors/types.ts
|
|
1325
1325
|
init_buffer();
|
|
@@ -2818,74 +2818,6 @@ var UTXO = {
|
|
|
2818
2818
|
return message;
|
|
2819
2819
|
}
|
|
2820
2820
|
};
|
|
2821
|
-
function createBaseNodeOutput() {
|
|
2822
|
-
return { nodeId: "", vout: 0 };
|
|
2823
|
-
}
|
|
2824
|
-
var NodeOutput = {
|
|
2825
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
2826
|
-
if (message.nodeId !== "") {
|
|
2827
|
-
writer.uint32(10).string(message.nodeId);
|
|
2828
|
-
}
|
|
2829
|
-
if (message.vout !== 0) {
|
|
2830
|
-
writer.uint32(16).uint32(message.vout);
|
|
2831
|
-
}
|
|
2832
|
-
return writer;
|
|
2833
|
-
},
|
|
2834
|
-
decode(input, length) {
|
|
2835
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
2836
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2837
|
-
const message = createBaseNodeOutput();
|
|
2838
|
-
while (reader.pos < end) {
|
|
2839
|
-
const tag = reader.uint32();
|
|
2840
|
-
switch (tag >>> 3) {
|
|
2841
|
-
case 1: {
|
|
2842
|
-
if (tag !== 10) {
|
|
2843
|
-
break;
|
|
2844
|
-
}
|
|
2845
|
-
message.nodeId = reader.string();
|
|
2846
|
-
continue;
|
|
2847
|
-
}
|
|
2848
|
-
case 2: {
|
|
2849
|
-
if (tag !== 16) {
|
|
2850
|
-
break;
|
|
2851
|
-
}
|
|
2852
|
-
message.vout = reader.uint32();
|
|
2853
|
-
continue;
|
|
2854
|
-
}
|
|
2855
|
-
}
|
|
2856
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2857
|
-
break;
|
|
2858
|
-
}
|
|
2859
|
-
reader.skip(tag & 7);
|
|
2860
|
-
}
|
|
2861
|
-
return message;
|
|
2862
|
-
},
|
|
2863
|
-
fromJSON(object) {
|
|
2864
|
-
return {
|
|
2865
|
-
nodeId: isSet3(object.nodeId) ? globalThis.String(object.nodeId) : "",
|
|
2866
|
-
vout: isSet3(object.vout) ? globalThis.Number(object.vout) : 0
|
|
2867
|
-
};
|
|
2868
|
-
},
|
|
2869
|
-
toJSON(message) {
|
|
2870
|
-
const obj = {};
|
|
2871
|
-
if (message.nodeId !== "") {
|
|
2872
|
-
obj.nodeId = message.nodeId;
|
|
2873
|
-
}
|
|
2874
|
-
if (message.vout !== 0) {
|
|
2875
|
-
obj.vout = Math.round(message.vout);
|
|
2876
|
-
}
|
|
2877
|
-
return obj;
|
|
2878
|
-
},
|
|
2879
|
-
create(base) {
|
|
2880
|
-
return NodeOutput.fromPartial(base ?? {});
|
|
2881
|
-
},
|
|
2882
|
-
fromPartial(object) {
|
|
2883
|
-
const message = createBaseNodeOutput();
|
|
2884
|
-
message.nodeId = object.nodeId ?? "";
|
|
2885
|
-
message.vout = object.vout ?? 0;
|
|
2886
|
-
return message;
|
|
2887
|
-
}
|
|
2888
|
-
};
|
|
2889
2821
|
function createBaseSigningJob() {
|
|
2890
2822
|
return { signingPublicKey: new Uint8Array(0), rawTx: new Uint8Array(0), signingNonceCommitment: void 0 };
|
|
2891
2823
|
}
|
|
@@ -11562,38 +11494,58 @@ var ExtendLeafResponse = {
|
|
|
11562
11494
|
return message;
|
|
11563
11495
|
}
|
|
11564
11496
|
};
|
|
11565
|
-
function
|
|
11566
|
-
return {
|
|
11497
|
+
function createBaseSigningOperatorInfo() {
|
|
11498
|
+
return { index: 0, identifier: "", publicKey: new Uint8Array(0), address: "" };
|
|
11567
11499
|
}
|
|
11568
|
-
var
|
|
11500
|
+
var SigningOperatorInfo = {
|
|
11569
11501
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
11570
|
-
if (message.
|
|
11571
|
-
writer.uint32(
|
|
11502
|
+
if (message.index !== 0) {
|
|
11503
|
+
writer.uint32(8).uint64(message.index);
|
|
11504
|
+
}
|
|
11505
|
+
if (message.identifier !== "") {
|
|
11506
|
+
writer.uint32(18).string(message.identifier);
|
|
11507
|
+
}
|
|
11508
|
+
if (message.publicKey.length !== 0) {
|
|
11509
|
+
writer.uint32(26).bytes(message.publicKey);
|
|
11572
11510
|
}
|
|
11573
|
-
|
|
11574
|
-
|
|
11511
|
+
if (message.address !== "") {
|
|
11512
|
+
writer.uint32(34).string(message.address);
|
|
11575
11513
|
}
|
|
11576
11514
|
return writer;
|
|
11577
11515
|
},
|
|
11578
11516
|
decode(input, length) {
|
|
11579
11517
|
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
11580
11518
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
11581
|
-
const message =
|
|
11519
|
+
const message = createBaseSigningOperatorInfo();
|
|
11582
11520
|
while (reader.pos < end) {
|
|
11583
11521
|
const tag = reader.uint32();
|
|
11584
11522
|
switch (tag >>> 3) {
|
|
11585
11523
|
case 1: {
|
|
11586
|
-
if (tag !==
|
|
11524
|
+
if (tag !== 8) {
|
|
11587
11525
|
break;
|
|
11588
11526
|
}
|
|
11589
|
-
message.
|
|
11527
|
+
message.index = longToNumber2(reader.uint64());
|
|
11590
11528
|
continue;
|
|
11591
11529
|
}
|
|
11592
11530
|
case 2: {
|
|
11593
11531
|
if (tag !== 18) {
|
|
11594
11532
|
break;
|
|
11595
11533
|
}
|
|
11596
|
-
message.
|
|
11534
|
+
message.identifier = reader.string();
|
|
11535
|
+
continue;
|
|
11536
|
+
}
|
|
11537
|
+
case 3: {
|
|
11538
|
+
if (tag !== 26) {
|
|
11539
|
+
break;
|
|
11540
|
+
}
|
|
11541
|
+
message.publicKey = reader.bytes();
|
|
11542
|
+
continue;
|
|
11543
|
+
}
|
|
11544
|
+
case 4: {
|
|
11545
|
+
if (tag !== 34) {
|
|
11546
|
+
break;
|
|
11547
|
+
}
|
|
11548
|
+
message.address = reader.string();
|
|
11597
11549
|
continue;
|
|
11598
11550
|
}
|
|
11599
11551
|
}
|
|
@@ -11606,55 +11558,54 @@ var AddressRequestNode = {
|
|
|
11606
11558
|
},
|
|
11607
11559
|
fromJSON(object) {
|
|
11608
11560
|
return {
|
|
11609
|
-
|
|
11610
|
-
|
|
11561
|
+
index: isSet3(object.index) ? globalThis.Number(object.index) : 0,
|
|
11562
|
+
identifier: isSet3(object.identifier) ? globalThis.String(object.identifier) : "",
|
|
11563
|
+
publicKey: isSet3(object.publicKey) ? bytesFromBase642(object.publicKey) : new Uint8Array(0),
|
|
11564
|
+
address: isSet3(object.address) ? globalThis.String(object.address) : ""
|
|
11611
11565
|
};
|
|
11612
11566
|
},
|
|
11613
11567
|
toJSON(message) {
|
|
11614
11568
|
const obj = {};
|
|
11615
|
-
if (message.
|
|
11616
|
-
obj.
|
|
11569
|
+
if (message.index !== 0) {
|
|
11570
|
+
obj.index = Math.round(message.index);
|
|
11571
|
+
}
|
|
11572
|
+
if (message.identifier !== "") {
|
|
11573
|
+
obj.identifier = message.identifier;
|
|
11574
|
+
}
|
|
11575
|
+
if (message.publicKey.length !== 0) {
|
|
11576
|
+
obj.publicKey = base64FromBytes2(message.publicKey);
|
|
11617
11577
|
}
|
|
11618
|
-
if (message.
|
|
11619
|
-
obj.
|
|
11578
|
+
if (message.address !== "") {
|
|
11579
|
+
obj.address = message.address;
|
|
11620
11580
|
}
|
|
11621
11581
|
return obj;
|
|
11622
11582
|
},
|
|
11623
11583
|
create(base) {
|
|
11624
|
-
return
|
|
11584
|
+
return SigningOperatorInfo.fromPartial(base ?? {});
|
|
11625
11585
|
},
|
|
11626
11586
|
fromPartial(object) {
|
|
11627
|
-
const message =
|
|
11628
|
-
message.
|
|
11629
|
-
message.
|
|
11587
|
+
const message = createBaseSigningOperatorInfo();
|
|
11588
|
+
message.index = object.index ?? 0;
|
|
11589
|
+
message.identifier = object.identifier ?? "";
|
|
11590
|
+
message.publicKey = object.publicKey ?? new Uint8Array(0);
|
|
11591
|
+
message.address = object.address ?? "";
|
|
11630
11592
|
return message;
|
|
11631
11593
|
}
|
|
11632
11594
|
};
|
|
11633
|
-
function
|
|
11634
|
-
return {
|
|
11595
|
+
function createBaseGetSigningOperatorListResponse() {
|
|
11596
|
+
return { signingOperators: {} };
|
|
11635
11597
|
}
|
|
11636
|
-
var
|
|
11598
|
+
var GetSigningOperatorListResponse = {
|
|
11637
11599
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
break;
|
|
11642
|
-
case "onChainUtxo":
|
|
11643
|
-
UTXO.encode(message.source.onChainUtxo, writer.uint32(18).fork()).join();
|
|
11644
|
-
break;
|
|
11645
|
-
}
|
|
11646
|
-
if (message.node !== void 0) {
|
|
11647
|
-
AddressRequestNode.encode(message.node, writer.uint32(26).fork()).join();
|
|
11648
|
-
}
|
|
11649
|
-
if (message.userIdentityPublicKey.length !== 0) {
|
|
11650
|
-
writer.uint32(34).bytes(message.userIdentityPublicKey);
|
|
11651
|
-
}
|
|
11600
|
+
Object.entries(message.signingOperators).forEach(([key, value]) => {
|
|
11601
|
+
GetSigningOperatorListResponse_SigningOperatorsEntry.encode({ key, value }, writer.uint32(10).fork()).join();
|
|
11602
|
+
});
|
|
11652
11603
|
return writer;
|
|
11653
11604
|
},
|
|
11654
11605
|
decode(input, length) {
|
|
11655
11606
|
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
11656
11607
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
11657
|
-
const message =
|
|
11608
|
+
const message = createBaseGetSigningOperatorListResponse();
|
|
11658
11609
|
while (reader.pos < end) {
|
|
11659
11610
|
const tag = reader.uint32();
|
|
11660
11611
|
switch (tag >>> 3) {
|
|
@@ -11662,28 +11613,10 @@ var PrepareTreeAddressRequest = {
|
|
|
11662
11613
|
if (tag !== 10) {
|
|
11663
11614
|
break;
|
|
11664
11615
|
}
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
case 2: {
|
|
11669
|
-
if (tag !== 18) {
|
|
11670
|
-
break;
|
|
11671
|
-
}
|
|
11672
|
-
message.source = { $case: "onChainUtxo", onChainUtxo: UTXO.decode(reader, reader.uint32()) };
|
|
11673
|
-
continue;
|
|
11674
|
-
}
|
|
11675
|
-
case 3: {
|
|
11676
|
-
if (tag !== 26) {
|
|
11677
|
-
break;
|
|
11678
|
-
}
|
|
11679
|
-
message.node = AddressRequestNode.decode(reader, reader.uint32());
|
|
11680
|
-
continue;
|
|
11681
|
-
}
|
|
11682
|
-
case 4: {
|
|
11683
|
-
if (tag !== 34) {
|
|
11684
|
-
break;
|
|
11616
|
+
const entry1 = GetSigningOperatorListResponse_SigningOperatorsEntry.decode(reader, reader.uint32());
|
|
11617
|
+
if (entry1.value !== void 0) {
|
|
11618
|
+
message.signingOperators[entry1.key] = entry1.value;
|
|
11685
11619
|
}
|
|
11686
|
-
message.userIdentityPublicKey = reader.bytes();
|
|
11687
11620
|
continue;
|
|
11688
11621
|
}
|
|
11689
11622
|
}
|
|
@@ -11696,70 +11629,59 @@ var PrepareTreeAddressRequest = {
|
|
|
11696
11629
|
},
|
|
11697
11630
|
fromJSON(object) {
|
|
11698
11631
|
return {
|
|
11699
|
-
|
|
11700
|
-
|
|
11701
|
-
|
|
11632
|
+
signingOperators: isObject(object.signingOperators) ? Object.entries(object.signingOperators).reduce(
|
|
11633
|
+
(acc, [key, value]) => {
|
|
11634
|
+
acc[key] = SigningOperatorInfo.fromJSON(value);
|
|
11635
|
+
return acc;
|
|
11636
|
+
},
|
|
11637
|
+
{}
|
|
11638
|
+
) : {}
|
|
11702
11639
|
};
|
|
11703
11640
|
},
|
|
11704
11641
|
toJSON(message) {
|
|
11705
11642
|
const obj = {};
|
|
11706
|
-
if (message.
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
if (message.userIdentityPublicKey.length !== 0) {
|
|
11715
|
-
obj.userIdentityPublicKey = base64FromBytes2(message.userIdentityPublicKey);
|
|
11643
|
+
if (message.signingOperators) {
|
|
11644
|
+
const entries = Object.entries(message.signingOperators);
|
|
11645
|
+
if (entries.length > 0) {
|
|
11646
|
+
obj.signingOperators = {};
|
|
11647
|
+
entries.forEach(([k, v]) => {
|
|
11648
|
+
obj.signingOperators[k] = SigningOperatorInfo.toJSON(v);
|
|
11649
|
+
});
|
|
11650
|
+
}
|
|
11716
11651
|
}
|
|
11717
11652
|
return obj;
|
|
11718
11653
|
},
|
|
11719
11654
|
create(base) {
|
|
11720
|
-
return
|
|
11655
|
+
return GetSigningOperatorListResponse.fromPartial(base ?? {});
|
|
11721
11656
|
},
|
|
11722
11657
|
fromPartial(object) {
|
|
11723
|
-
const message =
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
message.source = {
|
|
11728
|
-
$case: "parentNodeOutput",
|
|
11729
|
-
parentNodeOutput: NodeOutput.fromPartial(object.source.parentNodeOutput)
|
|
11730
|
-
};
|
|
11731
|
-
}
|
|
11732
|
-
break;
|
|
11733
|
-
}
|
|
11734
|
-
case "onChainUtxo": {
|
|
11735
|
-
if (object.source?.onChainUtxo !== void 0 && object.source?.onChainUtxo !== null) {
|
|
11736
|
-
message.source = { $case: "onChainUtxo", onChainUtxo: UTXO.fromPartial(object.source.onChainUtxo) };
|
|
11737
|
-
}
|
|
11738
|
-
break;
|
|
11658
|
+
const message = createBaseGetSigningOperatorListResponse();
|
|
11659
|
+
message.signingOperators = Object.entries(object.signingOperators ?? {}).reduce((acc, [key, value]) => {
|
|
11660
|
+
if (value !== void 0) {
|
|
11661
|
+
acc[key] = SigningOperatorInfo.fromPartial(value);
|
|
11739
11662
|
}
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
message.userIdentityPublicKey = object.userIdentityPublicKey ?? new Uint8Array(0);
|
|
11663
|
+
return acc;
|
|
11664
|
+
}, {});
|
|
11743
11665
|
return message;
|
|
11744
11666
|
}
|
|
11745
11667
|
};
|
|
11746
|
-
function
|
|
11747
|
-
return {
|
|
11668
|
+
function createBaseGetSigningOperatorListResponse_SigningOperatorsEntry() {
|
|
11669
|
+
return { key: "", value: void 0 };
|
|
11748
11670
|
}
|
|
11749
|
-
var
|
|
11671
|
+
var GetSigningOperatorListResponse_SigningOperatorsEntry = {
|
|
11750
11672
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
11751
|
-
if (message.
|
|
11752
|
-
|
|
11673
|
+
if (message.key !== "") {
|
|
11674
|
+
writer.uint32(10).string(message.key);
|
|
11753
11675
|
}
|
|
11754
|
-
|
|
11755
|
-
|
|
11676
|
+
if (message.value !== void 0) {
|
|
11677
|
+
SigningOperatorInfo.encode(message.value, writer.uint32(18).fork()).join();
|
|
11756
11678
|
}
|
|
11757
11679
|
return writer;
|
|
11758
11680
|
},
|
|
11759
11681
|
decode(input, length) {
|
|
11760
11682
|
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
11761
11683
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
11762
|
-
const message =
|
|
11684
|
+
const message = createBaseGetSigningOperatorListResponse_SigningOperatorsEntry();
|
|
11763
11685
|
while (reader.pos < end) {
|
|
11764
11686
|
const tag = reader.uint32();
|
|
11765
11687
|
switch (tag >>> 3) {
|
|
@@ -11767,14 +11689,14 @@ var AddressNode = {
|
|
|
11767
11689
|
if (tag !== 10) {
|
|
11768
11690
|
break;
|
|
11769
11691
|
}
|
|
11770
|
-
message.
|
|
11692
|
+
message.key = reader.string();
|
|
11771
11693
|
continue;
|
|
11772
11694
|
}
|
|
11773
11695
|
case 2: {
|
|
11774
11696
|
if (tag !== 18) {
|
|
11775
11697
|
break;
|
|
11776
11698
|
}
|
|
11777
|
-
message.
|
|
11699
|
+
message.value = SigningOperatorInfo.decode(reader, reader.uint32());
|
|
11778
11700
|
continue;
|
|
11779
11701
|
}
|
|
11780
11702
|
}
|
|
@@ -11787,44 +11709,47 @@ var AddressNode = {
|
|
|
11787
11709
|
},
|
|
11788
11710
|
fromJSON(object) {
|
|
11789
11711
|
return {
|
|
11790
|
-
|
|
11791
|
-
|
|
11712
|
+
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
11713
|
+
value: isSet3(object.value) ? SigningOperatorInfo.fromJSON(object.value) : void 0
|
|
11792
11714
|
};
|
|
11793
11715
|
},
|
|
11794
11716
|
toJSON(message) {
|
|
11795
11717
|
const obj = {};
|
|
11796
|
-
if (message.
|
|
11797
|
-
obj.
|
|
11718
|
+
if (message.key !== "") {
|
|
11719
|
+
obj.key = message.key;
|
|
11798
11720
|
}
|
|
11799
|
-
if (message.
|
|
11800
|
-
obj.
|
|
11721
|
+
if (message.value !== void 0) {
|
|
11722
|
+
obj.value = SigningOperatorInfo.toJSON(message.value);
|
|
11801
11723
|
}
|
|
11802
11724
|
return obj;
|
|
11803
11725
|
},
|
|
11804
11726
|
create(base) {
|
|
11805
|
-
return
|
|
11727
|
+
return GetSigningOperatorListResponse_SigningOperatorsEntry.fromPartial(base ?? {});
|
|
11806
11728
|
},
|
|
11807
11729
|
fromPartial(object) {
|
|
11808
|
-
const message =
|
|
11809
|
-
message.
|
|
11810
|
-
message.
|
|
11730
|
+
const message = createBaseGetSigningOperatorListResponse_SigningOperatorsEntry();
|
|
11731
|
+
message.key = object.key ?? "";
|
|
11732
|
+
message.value = object.value !== void 0 && object.value !== null ? SigningOperatorInfo.fromPartial(object.value) : void 0;
|
|
11811
11733
|
return message;
|
|
11812
11734
|
}
|
|
11813
11735
|
};
|
|
11814
|
-
function
|
|
11815
|
-
return {
|
|
11736
|
+
function createBaseQueryUserSignedRefundsRequest() {
|
|
11737
|
+
return { paymentHash: new Uint8Array(0), identityPublicKey: new Uint8Array(0) };
|
|
11816
11738
|
}
|
|
11817
|
-
var
|
|
11739
|
+
var QueryUserSignedRefundsRequest = {
|
|
11818
11740
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
11819
|
-
if (message.
|
|
11820
|
-
|
|
11741
|
+
if (message.paymentHash.length !== 0) {
|
|
11742
|
+
writer.uint32(10).bytes(message.paymentHash);
|
|
11743
|
+
}
|
|
11744
|
+
if (message.identityPublicKey.length !== 0) {
|
|
11745
|
+
writer.uint32(18).bytes(message.identityPublicKey);
|
|
11821
11746
|
}
|
|
11822
11747
|
return writer;
|
|
11823
11748
|
},
|
|
11824
11749
|
decode(input, length) {
|
|
11825
11750
|
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
11826
11751
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
11827
|
-
const message =
|
|
11752
|
+
const message = createBaseQueryUserSignedRefundsRequest();
|
|
11828
11753
|
while (reader.pos < end) {
|
|
11829
11754
|
const tag = reader.uint32();
|
|
11830
11755
|
switch (tag >>> 3) {
|
|
@@ -11832,7 +11757,14 @@ var PrepareTreeAddressResponse = {
|
|
|
11832
11757
|
if (tag !== 10) {
|
|
11833
11758
|
break;
|
|
11834
11759
|
}
|
|
11835
|
-
message.
|
|
11760
|
+
message.paymentHash = reader.bytes();
|
|
11761
|
+
continue;
|
|
11762
|
+
}
|
|
11763
|
+
case 2: {
|
|
11764
|
+
if (tag !== 18) {
|
|
11765
|
+
break;
|
|
11766
|
+
}
|
|
11767
|
+
message.identityPublicKey = reader.bytes();
|
|
11836
11768
|
continue;
|
|
11837
11769
|
}
|
|
11838
11770
|
}
|
|
@@ -11844,788 +11776,38 @@ var PrepareTreeAddressResponse = {
|
|
|
11844
11776
|
return message;
|
|
11845
11777
|
},
|
|
11846
11778
|
fromJSON(object) {
|
|
11847
|
-
return {
|
|
11779
|
+
return {
|
|
11780
|
+
paymentHash: isSet3(object.paymentHash) ? bytesFromBase642(object.paymentHash) : new Uint8Array(0),
|
|
11781
|
+
identityPublicKey: isSet3(object.identityPublicKey) ? bytesFromBase642(object.identityPublicKey) : new Uint8Array(0)
|
|
11782
|
+
};
|
|
11848
11783
|
},
|
|
11849
11784
|
toJSON(message) {
|
|
11850
11785
|
const obj = {};
|
|
11851
|
-
if (message.
|
|
11852
|
-
obj.
|
|
11786
|
+
if (message.paymentHash.length !== 0) {
|
|
11787
|
+
obj.paymentHash = base64FromBytes2(message.paymentHash);
|
|
11788
|
+
}
|
|
11789
|
+
if (message.identityPublicKey.length !== 0) {
|
|
11790
|
+
obj.identityPublicKey = base64FromBytes2(message.identityPublicKey);
|
|
11853
11791
|
}
|
|
11854
11792
|
return obj;
|
|
11855
11793
|
},
|
|
11856
11794
|
create(base) {
|
|
11857
|
-
return
|
|
11795
|
+
return QueryUserSignedRefundsRequest.fromPartial(base ?? {});
|
|
11858
11796
|
},
|
|
11859
11797
|
fromPartial(object) {
|
|
11860
|
-
const message =
|
|
11861
|
-
message.
|
|
11798
|
+
const message = createBaseQueryUserSignedRefundsRequest();
|
|
11799
|
+
message.paymentHash = object.paymentHash ?? new Uint8Array(0);
|
|
11800
|
+
message.identityPublicKey = object.identityPublicKey ?? new Uint8Array(0);
|
|
11862
11801
|
return message;
|
|
11863
11802
|
}
|
|
11864
11803
|
};
|
|
11865
|
-
function
|
|
11866
|
-
return {
|
|
11867
|
-
nodeTxSigningJob: void 0,
|
|
11868
|
-
refundTxSigningJob: void 0,
|
|
11869
|
-
children: [],
|
|
11870
|
-
directNodeTxSigningJob: void 0,
|
|
11871
|
-
directRefundTxSigningJob: void 0,
|
|
11872
|
-
directFromCpfpRefundTxSigningJob: void 0
|
|
11873
|
-
};
|
|
11804
|
+
function createBaseQueryUserSignedRefundsResponse() {
|
|
11805
|
+
return { userSignedRefunds: [] };
|
|
11874
11806
|
}
|
|
11875
|
-
var
|
|
11807
|
+
var QueryUserSignedRefundsResponse = {
|
|
11876
11808
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
}
|
|
11880
|
-
if (message.refundTxSigningJob !== void 0) {
|
|
11881
|
-
SigningJob.encode(message.refundTxSigningJob, writer.uint32(18).fork()).join();
|
|
11882
|
-
}
|
|
11883
|
-
for (const v of message.children) {
|
|
11884
|
-
CreationNode.encode(v, writer.uint32(26).fork()).join();
|
|
11885
|
-
}
|
|
11886
|
-
if (message.directNodeTxSigningJob !== void 0) {
|
|
11887
|
-
SigningJob.encode(message.directNodeTxSigningJob, writer.uint32(34).fork()).join();
|
|
11888
|
-
}
|
|
11889
|
-
if (message.directRefundTxSigningJob !== void 0) {
|
|
11890
|
-
SigningJob.encode(message.directRefundTxSigningJob, writer.uint32(42).fork()).join();
|
|
11891
|
-
}
|
|
11892
|
-
if (message.directFromCpfpRefundTxSigningJob !== void 0) {
|
|
11893
|
-
SigningJob.encode(message.directFromCpfpRefundTxSigningJob, writer.uint32(50).fork()).join();
|
|
11894
|
-
}
|
|
11895
|
-
return writer;
|
|
11896
|
-
},
|
|
11897
|
-
decode(input, length) {
|
|
11898
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
11899
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
11900
|
-
const message = createBaseCreationNode();
|
|
11901
|
-
while (reader.pos < end) {
|
|
11902
|
-
const tag = reader.uint32();
|
|
11903
|
-
switch (tag >>> 3) {
|
|
11904
|
-
case 1: {
|
|
11905
|
-
if (tag !== 10) {
|
|
11906
|
-
break;
|
|
11907
|
-
}
|
|
11908
|
-
message.nodeTxSigningJob = SigningJob.decode(reader, reader.uint32());
|
|
11909
|
-
continue;
|
|
11910
|
-
}
|
|
11911
|
-
case 2: {
|
|
11912
|
-
if (tag !== 18) {
|
|
11913
|
-
break;
|
|
11914
|
-
}
|
|
11915
|
-
message.refundTxSigningJob = SigningJob.decode(reader, reader.uint32());
|
|
11916
|
-
continue;
|
|
11917
|
-
}
|
|
11918
|
-
case 3: {
|
|
11919
|
-
if (tag !== 26) {
|
|
11920
|
-
break;
|
|
11921
|
-
}
|
|
11922
|
-
message.children.push(CreationNode.decode(reader, reader.uint32()));
|
|
11923
|
-
continue;
|
|
11924
|
-
}
|
|
11925
|
-
case 4: {
|
|
11926
|
-
if (tag !== 34) {
|
|
11927
|
-
break;
|
|
11928
|
-
}
|
|
11929
|
-
message.directNodeTxSigningJob = SigningJob.decode(reader, reader.uint32());
|
|
11930
|
-
continue;
|
|
11931
|
-
}
|
|
11932
|
-
case 5: {
|
|
11933
|
-
if (tag !== 42) {
|
|
11934
|
-
break;
|
|
11935
|
-
}
|
|
11936
|
-
message.directRefundTxSigningJob = SigningJob.decode(reader, reader.uint32());
|
|
11937
|
-
continue;
|
|
11938
|
-
}
|
|
11939
|
-
case 6: {
|
|
11940
|
-
if (tag !== 50) {
|
|
11941
|
-
break;
|
|
11942
|
-
}
|
|
11943
|
-
message.directFromCpfpRefundTxSigningJob = SigningJob.decode(reader, reader.uint32());
|
|
11944
|
-
continue;
|
|
11945
|
-
}
|
|
11946
|
-
}
|
|
11947
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
11948
|
-
break;
|
|
11949
|
-
}
|
|
11950
|
-
reader.skip(tag & 7);
|
|
11951
|
-
}
|
|
11952
|
-
return message;
|
|
11953
|
-
},
|
|
11954
|
-
fromJSON(object) {
|
|
11955
|
-
return {
|
|
11956
|
-
nodeTxSigningJob: isSet3(object.nodeTxSigningJob) ? SigningJob.fromJSON(object.nodeTxSigningJob) : void 0,
|
|
11957
|
-
refundTxSigningJob: isSet3(object.refundTxSigningJob) ? SigningJob.fromJSON(object.refundTxSigningJob) : void 0,
|
|
11958
|
-
children: globalThis.Array.isArray(object?.children) ? object.children.map((e) => CreationNode.fromJSON(e)) : [],
|
|
11959
|
-
directNodeTxSigningJob: isSet3(object.directNodeTxSigningJob) ? SigningJob.fromJSON(object.directNodeTxSigningJob) : void 0,
|
|
11960
|
-
directRefundTxSigningJob: isSet3(object.directRefundTxSigningJob) ? SigningJob.fromJSON(object.directRefundTxSigningJob) : void 0,
|
|
11961
|
-
directFromCpfpRefundTxSigningJob: isSet3(object.directFromCpfpRefundTxSigningJob) ? SigningJob.fromJSON(object.directFromCpfpRefundTxSigningJob) : void 0
|
|
11962
|
-
};
|
|
11963
|
-
},
|
|
11964
|
-
toJSON(message) {
|
|
11965
|
-
const obj = {};
|
|
11966
|
-
if (message.nodeTxSigningJob !== void 0) {
|
|
11967
|
-
obj.nodeTxSigningJob = SigningJob.toJSON(message.nodeTxSigningJob);
|
|
11968
|
-
}
|
|
11969
|
-
if (message.refundTxSigningJob !== void 0) {
|
|
11970
|
-
obj.refundTxSigningJob = SigningJob.toJSON(message.refundTxSigningJob);
|
|
11971
|
-
}
|
|
11972
|
-
if (message.children?.length) {
|
|
11973
|
-
obj.children = message.children.map((e) => CreationNode.toJSON(e));
|
|
11974
|
-
}
|
|
11975
|
-
if (message.directNodeTxSigningJob !== void 0) {
|
|
11976
|
-
obj.directNodeTxSigningJob = SigningJob.toJSON(message.directNodeTxSigningJob);
|
|
11977
|
-
}
|
|
11978
|
-
if (message.directRefundTxSigningJob !== void 0) {
|
|
11979
|
-
obj.directRefundTxSigningJob = SigningJob.toJSON(message.directRefundTxSigningJob);
|
|
11980
|
-
}
|
|
11981
|
-
if (message.directFromCpfpRefundTxSigningJob !== void 0) {
|
|
11982
|
-
obj.directFromCpfpRefundTxSigningJob = SigningJob.toJSON(message.directFromCpfpRefundTxSigningJob);
|
|
11983
|
-
}
|
|
11984
|
-
return obj;
|
|
11985
|
-
},
|
|
11986
|
-
create(base) {
|
|
11987
|
-
return CreationNode.fromPartial(base ?? {});
|
|
11988
|
-
},
|
|
11989
|
-
fromPartial(object) {
|
|
11990
|
-
const message = createBaseCreationNode();
|
|
11991
|
-
message.nodeTxSigningJob = object.nodeTxSigningJob !== void 0 && object.nodeTxSigningJob !== null ? SigningJob.fromPartial(object.nodeTxSigningJob) : void 0;
|
|
11992
|
-
message.refundTxSigningJob = object.refundTxSigningJob !== void 0 && object.refundTxSigningJob !== null ? SigningJob.fromPartial(object.refundTxSigningJob) : void 0;
|
|
11993
|
-
message.children = object.children?.map((e) => CreationNode.fromPartial(e)) || [];
|
|
11994
|
-
message.directNodeTxSigningJob = object.directNodeTxSigningJob !== void 0 && object.directNodeTxSigningJob !== null ? SigningJob.fromPartial(object.directNodeTxSigningJob) : void 0;
|
|
11995
|
-
message.directRefundTxSigningJob = object.directRefundTxSigningJob !== void 0 && object.directRefundTxSigningJob !== null ? SigningJob.fromPartial(object.directRefundTxSigningJob) : void 0;
|
|
11996
|
-
message.directFromCpfpRefundTxSigningJob = object.directFromCpfpRefundTxSigningJob !== void 0 && object.directFromCpfpRefundTxSigningJob !== null ? SigningJob.fromPartial(object.directFromCpfpRefundTxSigningJob) : void 0;
|
|
11997
|
-
return message;
|
|
11998
|
-
}
|
|
11999
|
-
};
|
|
12000
|
-
function createBaseCreateTreeRequest() {
|
|
12001
|
-
return { source: void 0, node: void 0, userIdentityPublicKey: new Uint8Array(0) };
|
|
12002
|
-
}
|
|
12003
|
-
var CreateTreeRequest = {
|
|
12004
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12005
|
-
switch (message.source?.$case) {
|
|
12006
|
-
case "parentNodeOutput":
|
|
12007
|
-
NodeOutput.encode(message.source.parentNodeOutput, writer.uint32(10).fork()).join();
|
|
12008
|
-
break;
|
|
12009
|
-
case "onChainUtxo":
|
|
12010
|
-
UTXO.encode(message.source.onChainUtxo, writer.uint32(18).fork()).join();
|
|
12011
|
-
break;
|
|
12012
|
-
}
|
|
12013
|
-
if (message.node !== void 0) {
|
|
12014
|
-
CreationNode.encode(message.node, writer.uint32(26).fork()).join();
|
|
12015
|
-
}
|
|
12016
|
-
if (message.userIdentityPublicKey.length !== 0) {
|
|
12017
|
-
writer.uint32(34).bytes(message.userIdentityPublicKey);
|
|
12018
|
-
}
|
|
12019
|
-
return writer;
|
|
12020
|
-
},
|
|
12021
|
-
decode(input, length) {
|
|
12022
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12023
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12024
|
-
const message = createBaseCreateTreeRequest();
|
|
12025
|
-
while (reader.pos < end) {
|
|
12026
|
-
const tag = reader.uint32();
|
|
12027
|
-
switch (tag >>> 3) {
|
|
12028
|
-
case 1: {
|
|
12029
|
-
if (tag !== 10) {
|
|
12030
|
-
break;
|
|
12031
|
-
}
|
|
12032
|
-
message.source = { $case: "parentNodeOutput", parentNodeOutput: NodeOutput.decode(reader, reader.uint32()) };
|
|
12033
|
-
continue;
|
|
12034
|
-
}
|
|
12035
|
-
case 2: {
|
|
12036
|
-
if (tag !== 18) {
|
|
12037
|
-
break;
|
|
12038
|
-
}
|
|
12039
|
-
message.source = { $case: "onChainUtxo", onChainUtxo: UTXO.decode(reader, reader.uint32()) };
|
|
12040
|
-
continue;
|
|
12041
|
-
}
|
|
12042
|
-
case 3: {
|
|
12043
|
-
if (tag !== 26) {
|
|
12044
|
-
break;
|
|
12045
|
-
}
|
|
12046
|
-
message.node = CreationNode.decode(reader, reader.uint32());
|
|
12047
|
-
continue;
|
|
12048
|
-
}
|
|
12049
|
-
case 4: {
|
|
12050
|
-
if (tag !== 34) {
|
|
12051
|
-
break;
|
|
12052
|
-
}
|
|
12053
|
-
message.userIdentityPublicKey = reader.bytes();
|
|
12054
|
-
continue;
|
|
12055
|
-
}
|
|
12056
|
-
}
|
|
12057
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
12058
|
-
break;
|
|
12059
|
-
}
|
|
12060
|
-
reader.skip(tag & 7);
|
|
12061
|
-
}
|
|
12062
|
-
return message;
|
|
12063
|
-
},
|
|
12064
|
-
fromJSON(object) {
|
|
12065
|
-
return {
|
|
12066
|
-
source: isSet3(object.parentNodeOutput) ? { $case: "parentNodeOutput", parentNodeOutput: NodeOutput.fromJSON(object.parentNodeOutput) } : isSet3(object.onChainUtxo) ? { $case: "onChainUtxo", onChainUtxo: UTXO.fromJSON(object.onChainUtxo) } : void 0,
|
|
12067
|
-
node: isSet3(object.node) ? CreationNode.fromJSON(object.node) : void 0,
|
|
12068
|
-
userIdentityPublicKey: isSet3(object.userIdentityPublicKey) ? bytesFromBase642(object.userIdentityPublicKey) : new Uint8Array(0)
|
|
12069
|
-
};
|
|
12070
|
-
},
|
|
12071
|
-
toJSON(message) {
|
|
12072
|
-
const obj = {};
|
|
12073
|
-
if (message.source?.$case === "parentNodeOutput") {
|
|
12074
|
-
obj.parentNodeOutput = NodeOutput.toJSON(message.source.parentNodeOutput);
|
|
12075
|
-
} else if (message.source?.$case === "onChainUtxo") {
|
|
12076
|
-
obj.onChainUtxo = UTXO.toJSON(message.source.onChainUtxo);
|
|
12077
|
-
}
|
|
12078
|
-
if (message.node !== void 0) {
|
|
12079
|
-
obj.node = CreationNode.toJSON(message.node);
|
|
12080
|
-
}
|
|
12081
|
-
if (message.userIdentityPublicKey.length !== 0) {
|
|
12082
|
-
obj.userIdentityPublicKey = base64FromBytes2(message.userIdentityPublicKey);
|
|
12083
|
-
}
|
|
12084
|
-
return obj;
|
|
12085
|
-
},
|
|
12086
|
-
create(base) {
|
|
12087
|
-
return CreateTreeRequest.fromPartial(base ?? {});
|
|
12088
|
-
},
|
|
12089
|
-
fromPartial(object) {
|
|
12090
|
-
const message = createBaseCreateTreeRequest();
|
|
12091
|
-
switch (object.source?.$case) {
|
|
12092
|
-
case "parentNodeOutput": {
|
|
12093
|
-
if (object.source?.parentNodeOutput !== void 0 && object.source?.parentNodeOutput !== null) {
|
|
12094
|
-
message.source = {
|
|
12095
|
-
$case: "parentNodeOutput",
|
|
12096
|
-
parentNodeOutput: NodeOutput.fromPartial(object.source.parentNodeOutput)
|
|
12097
|
-
};
|
|
12098
|
-
}
|
|
12099
|
-
break;
|
|
12100
|
-
}
|
|
12101
|
-
case "onChainUtxo": {
|
|
12102
|
-
if (object.source?.onChainUtxo !== void 0 && object.source?.onChainUtxo !== null) {
|
|
12103
|
-
message.source = { $case: "onChainUtxo", onChainUtxo: UTXO.fromPartial(object.source.onChainUtxo) };
|
|
12104
|
-
}
|
|
12105
|
-
break;
|
|
12106
|
-
}
|
|
12107
|
-
}
|
|
12108
|
-
message.node = object.node !== void 0 && object.node !== null ? CreationNode.fromPartial(object.node) : void 0;
|
|
12109
|
-
message.userIdentityPublicKey = object.userIdentityPublicKey ?? new Uint8Array(0);
|
|
12110
|
-
return message;
|
|
12111
|
-
}
|
|
12112
|
-
};
|
|
12113
|
-
function createBaseCreationResponseNode() {
|
|
12114
|
-
return {
|
|
12115
|
-
nodeId: "",
|
|
12116
|
-
nodeTxSigningResult: void 0,
|
|
12117
|
-
refundTxSigningResult: void 0,
|
|
12118
|
-
children: [],
|
|
12119
|
-
directNodeTxSigningResult: void 0,
|
|
12120
|
-
directRefundTxSigningResult: void 0,
|
|
12121
|
-
directFromCpfpRefundTxSigningResult: void 0
|
|
12122
|
-
};
|
|
12123
|
-
}
|
|
12124
|
-
var CreationResponseNode = {
|
|
12125
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12126
|
-
if (message.nodeId !== "") {
|
|
12127
|
-
writer.uint32(10).string(message.nodeId);
|
|
12128
|
-
}
|
|
12129
|
-
if (message.nodeTxSigningResult !== void 0) {
|
|
12130
|
-
SigningResult.encode(message.nodeTxSigningResult, writer.uint32(18).fork()).join();
|
|
12131
|
-
}
|
|
12132
|
-
if (message.refundTxSigningResult !== void 0) {
|
|
12133
|
-
SigningResult.encode(message.refundTxSigningResult, writer.uint32(26).fork()).join();
|
|
12134
|
-
}
|
|
12135
|
-
for (const v of message.children) {
|
|
12136
|
-
CreationResponseNode.encode(v, writer.uint32(34).fork()).join();
|
|
12137
|
-
}
|
|
12138
|
-
if (message.directNodeTxSigningResult !== void 0) {
|
|
12139
|
-
SigningResult.encode(message.directNodeTxSigningResult, writer.uint32(42).fork()).join();
|
|
12140
|
-
}
|
|
12141
|
-
if (message.directRefundTxSigningResult !== void 0) {
|
|
12142
|
-
SigningResult.encode(message.directRefundTxSigningResult, writer.uint32(50).fork()).join();
|
|
12143
|
-
}
|
|
12144
|
-
if (message.directFromCpfpRefundTxSigningResult !== void 0) {
|
|
12145
|
-
SigningResult.encode(message.directFromCpfpRefundTxSigningResult, writer.uint32(58).fork()).join();
|
|
12146
|
-
}
|
|
12147
|
-
return writer;
|
|
12148
|
-
},
|
|
12149
|
-
decode(input, length) {
|
|
12150
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12151
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12152
|
-
const message = createBaseCreationResponseNode();
|
|
12153
|
-
while (reader.pos < end) {
|
|
12154
|
-
const tag = reader.uint32();
|
|
12155
|
-
switch (tag >>> 3) {
|
|
12156
|
-
case 1: {
|
|
12157
|
-
if (tag !== 10) {
|
|
12158
|
-
break;
|
|
12159
|
-
}
|
|
12160
|
-
message.nodeId = reader.string();
|
|
12161
|
-
continue;
|
|
12162
|
-
}
|
|
12163
|
-
case 2: {
|
|
12164
|
-
if (tag !== 18) {
|
|
12165
|
-
break;
|
|
12166
|
-
}
|
|
12167
|
-
message.nodeTxSigningResult = SigningResult.decode(reader, reader.uint32());
|
|
12168
|
-
continue;
|
|
12169
|
-
}
|
|
12170
|
-
case 3: {
|
|
12171
|
-
if (tag !== 26) {
|
|
12172
|
-
break;
|
|
12173
|
-
}
|
|
12174
|
-
message.refundTxSigningResult = SigningResult.decode(reader, reader.uint32());
|
|
12175
|
-
continue;
|
|
12176
|
-
}
|
|
12177
|
-
case 4: {
|
|
12178
|
-
if (tag !== 34) {
|
|
12179
|
-
break;
|
|
12180
|
-
}
|
|
12181
|
-
message.children.push(CreationResponseNode.decode(reader, reader.uint32()));
|
|
12182
|
-
continue;
|
|
12183
|
-
}
|
|
12184
|
-
case 5: {
|
|
12185
|
-
if (tag !== 42) {
|
|
12186
|
-
break;
|
|
12187
|
-
}
|
|
12188
|
-
message.directNodeTxSigningResult = SigningResult.decode(reader, reader.uint32());
|
|
12189
|
-
continue;
|
|
12190
|
-
}
|
|
12191
|
-
case 6: {
|
|
12192
|
-
if (tag !== 50) {
|
|
12193
|
-
break;
|
|
12194
|
-
}
|
|
12195
|
-
message.directRefundTxSigningResult = SigningResult.decode(reader, reader.uint32());
|
|
12196
|
-
continue;
|
|
12197
|
-
}
|
|
12198
|
-
case 7: {
|
|
12199
|
-
if (tag !== 58) {
|
|
12200
|
-
break;
|
|
12201
|
-
}
|
|
12202
|
-
message.directFromCpfpRefundTxSigningResult = SigningResult.decode(reader, reader.uint32());
|
|
12203
|
-
continue;
|
|
12204
|
-
}
|
|
12205
|
-
}
|
|
12206
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
12207
|
-
break;
|
|
12208
|
-
}
|
|
12209
|
-
reader.skip(tag & 7);
|
|
12210
|
-
}
|
|
12211
|
-
return message;
|
|
12212
|
-
},
|
|
12213
|
-
fromJSON(object) {
|
|
12214
|
-
return {
|
|
12215
|
-
nodeId: isSet3(object.nodeId) ? globalThis.String(object.nodeId) : "",
|
|
12216
|
-
nodeTxSigningResult: isSet3(object.nodeTxSigningResult) ? SigningResult.fromJSON(object.nodeTxSigningResult) : void 0,
|
|
12217
|
-
refundTxSigningResult: isSet3(object.refundTxSigningResult) ? SigningResult.fromJSON(object.refundTxSigningResult) : void 0,
|
|
12218
|
-
children: globalThis.Array.isArray(object?.children) ? object.children.map((e) => CreationResponseNode.fromJSON(e)) : [],
|
|
12219
|
-
directNodeTxSigningResult: isSet3(object.directNodeTxSigningResult) ? SigningResult.fromJSON(object.directNodeTxSigningResult) : void 0,
|
|
12220
|
-
directRefundTxSigningResult: isSet3(object.directRefundTxSigningResult) ? SigningResult.fromJSON(object.directRefundTxSigningResult) : void 0,
|
|
12221
|
-
directFromCpfpRefundTxSigningResult: isSet3(object.directFromCpfpRefundTxSigningResult) ? SigningResult.fromJSON(object.directFromCpfpRefundTxSigningResult) : void 0
|
|
12222
|
-
};
|
|
12223
|
-
},
|
|
12224
|
-
toJSON(message) {
|
|
12225
|
-
const obj = {};
|
|
12226
|
-
if (message.nodeId !== "") {
|
|
12227
|
-
obj.nodeId = message.nodeId;
|
|
12228
|
-
}
|
|
12229
|
-
if (message.nodeTxSigningResult !== void 0) {
|
|
12230
|
-
obj.nodeTxSigningResult = SigningResult.toJSON(message.nodeTxSigningResult);
|
|
12231
|
-
}
|
|
12232
|
-
if (message.refundTxSigningResult !== void 0) {
|
|
12233
|
-
obj.refundTxSigningResult = SigningResult.toJSON(message.refundTxSigningResult);
|
|
12234
|
-
}
|
|
12235
|
-
if (message.children?.length) {
|
|
12236
|
-
obj.children = message.children.map((e) => CreationResponseNode.toJSON(e));
|
|
12237
|
-
}
|
|
12238
|
-
if (message.directNodeTxSigningResult !== void 0) {
|
|
12239
|
-
obj.directNodeTxSigningResult = SigningResult.toJSON(message.directNodeTxSigningResult);
|
|
12240
|
-
}
|
|
12241
|
-
if (message.directRefundTxSigningResult !== void 0) {
|
|
12242
|
-
obj.directRefundTxSigningResult = SigningResult.toJSON(message.directRefundTxSigningResult);
|
|
12243
|
-
}
|
|
12244
|
-
if (message.directFromCpfpRefundTxSigningResult !== void 0) {
|
|
12245
|
-
obj.directFromCpfpRefundTxSigningResult = SigningResult.toJSON(message.directFromCpfpRefundTxSigningResult);
|
|
12246
|
-
}
|
|
12247
|
-
return obj;
|
|
12248
|
-
},
|
|
12249
|
-
create(base) {
|
|
12250
|
-
return CreationResponseNode.fromPartial(base ?? {});
|
|
12251
|
-
},
|
|
12252
|
-
fromPartial(object) {
|
|
12253
|
-
const message = createBaseCreationResponseNode();
|
|
12254
|
-
message.nodeId = object.nodeId ?? "";
|
|
12255
|
-
message.nodeTxSigningResult = object.nodeTxSigningResult !== void 0 && object.nodeTxSigningResult !== null ? SigningResult.fromPartial(object.nodeTxSigningResult) : void 0;
|
|
12256
|
-
message.refundTxSigningResult = object.refundTxSigningResult !== void 0 && object.refundTxSigningResult !== null ? SigningResult.fromPartial(object.refundTxSigningResult) : void 0;
|
|
12257
|
-
message.children = object.children?.map((e) => CreationResponseNode.fromPartial(e)) || [];
|
|
12258
|
-
message.directNodeTxSigningResult = object.directNodeTxSigningResult !== void 0 && object.directNodeTxSigningResult !== null ? SigningResult.fromPartial(object.directNodeTxSigningResult) : void 0;
|
|
12259
|
-
message.directRefundTxSigningResult = object.directRefundTxSigningResult !== void 0 && object.directRefundTxSigningResult !== null ? SigningResult.fromPartial(object.directRefundTxSigningResult) : void 0;
|
|
12260
|
-
message.directFromCpfpRefundTxSigningResult = object.directFromCpfpRefundTxSigningResult !== void 0 && object.directFromCpfpRefundTxSigningResult !== null ? SigningResult.fromPartial(object.directFromCpfpRefundTxSigningResult) : void 0;
|
|
12261
|
-
return message;
|
|
12262
|
-
}
|
|
12263
|
-
};
|
|
12264
|
-
function createBaseCreateTreeResponse() {
|
|
12265
|
-
return { node: void 0 };
|
|
12266
|
-
}
|
|
12267
|
-
var CreateTreeResponse = {
|
|
12268
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12269
|
-
if (message.node !== void 0) {
|
|
12270
|
-
CreationResponseNode.encode(message.node, writer.uint32(10).fork()).join();
|
|
12271
|
-
}
|
|
12272
|
-
return writer;
|
|
12273
|
-
},
|
|
12274
|
-
decode(input, length) {
|
|
12275
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12276
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12277
|
-
const message = createBaseCreateTreeResponse();
|
|
12278
|
-
while (reader.pos < end) {
|
|
12279
|
-
const tag = reader.uint32();
|
|
12280
|
-
switch (tag >>> 3) {
|
|
12281
|
-
case 1: {
|
|
12282
|
-
if (tag !== 10) {
|
|
12283
|
-
break;
|
|
12284
|
-
}
|
|
12285
|
-
message.node = CreationResponseNode.decode(reader, reader.uint32());
|
|
12286
|
-
continue;
|
|
12287
|
-
}
|
|
12288
|
-
}
|
|
12289
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
12290
|
-
break;
|
|
12291
|
-
}
|
|
12292
|
-
reader.skip(tag & 7);
|
|
12293
|
-
}
|
|
12294
|
-
return message;
|
|
12295
|
-
},
|
|
12296
|
-
fromJSON(object) {
|
|
12297
|
-
return { node: isSet3(object.node) ? CreationResponseNode.fromJSON(object.node) : void 0 };
|
|
12298
|
-
},
|
|
12299
|
-
toJSON(message) {
|
|
12300
|
-
const obj = {};
|
|
12301
|
-
if (message.node !== void 0) {
|
|
12302
|
-
obj.node = CreationResponseNode.toJSON(message.node);
|
|
12303
|
-
}
|
|
12304
|
-
return obj;
|
|
12305
|
-
},
|
|
12306
|
-
create(base) {
|
|
12307
|
-
return CreateTreeResponse.fromPartial(base ?? {});
|
|
12308
|
-
},
|
|
12309
|
-
fromPartial(object) {
|
|
12310
|
-
const message = createBaseCreateTreeResponse();
|
|
12311
|
-
message.node = object.node !== void 0 && object.node !== null ? CreationResponseNode.fromPartial(object.node) : void 0;
|
|
12312
|
-
return message;
|
|
12313
|
-
}
|
|
12314
|
-
};
|
|
12315
|
-
function createBaseSigningOperatorInfo() {
|
|
12316
|
-
return { index: 0, identifier: "", publicKey: new Uint8Array(0), address: "" };
|
|
12317
|
-
}
|
|
12318
|
-
var SigningOperatorInfo = {
|
|
12319
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12320
|
-
if (message.index !== 0) {
|
|
12321
|
-
writer.uint32(8).uint64(message.index);
|
|
12322
|
-
}
|
|
12323
|
-
if (message.identifier !== "") {
|
|
12324
|
-
writer.uint32(18).string(message.identifier);
|
|
12325
|
-
}
|
|
12326
|
-
if (message.publicKey.length !== 0) {
|
|
12327
|
-
writer.uint32(26).bytes(message.publicKey);
|
|
12328
|
-
}
|
|
12329
|
-
if (message.address !== "") {
|
|
12330
|
-
writer.uint32(34).string(message.address);
|
|
12331
|
-
}
|
|
12332
|
-
return writer;
|
|
12333
|
-
},
|
|
12334
|
-
decode(input, length) {
|
|
12335
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12336
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12337
|
-
const message = createBaseSigningOperatorInfo();
|
|
12338
|
-
while (reader.pos < end) {
|
|
12339
|
-
const tag = reader.uint32();
|
|
12340
|
-
switch (tag >>> 3) {
|
|
12341
|
-
case 1: {
|
|
12342
|
-
if (tag !== 8) {
|
|
12343
|
-
break;
|
|
12344
|
-
}
|
|
12345
|
-
message.index = longToNumber2(reader.uint64());
|
|
12346
|
-
continue;
|
|
12347
|
-
}
|
|
12348
|
-
case 2: {
|
|
12349
|
-
if (tag !== 18) {
|
|
12350
|
-
break;
|
|
12351
|
-
}
|
|
12352
|
-
message.identifier = reader.string();
|
|
12353
|
-
continue;
|
|
12354
|
-
}
|
|
12355
|
-
case 3: {
|
|
12356
|
-
if (tag !== 26) {
|
|
12357
|
-
break;
|
|
12358
|
-
}
|
|
12359
|
-
message.publicKey = reader.bytes();
|
|
12360
|
-
continue;
|
|
12361
|
-
}
|
|
12362
|
-
case 4: {
|
|
12363
|
-
if (tag !== 34) {
|
|
12364
|
-
break;
|
|
12365
|
-
}
|
|
12366
|
-
message.address = reader.string();
|
|
12367
|
-
continue;
|
|
12368
|
-
}
|
|
12369
|
-
}
|
|
12370
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
12371
|
-
break;
|
|
12372
|
-
}
|
|
12373
|
-
reader.skip(tag & 7);
|
|
12374
|
-
}
|
|
12375
|
-
return message;
|
|
12376
|
-
},
|
|
12377
|
-
fromJSON(object) {
|
|
12378
|
-
return {
|
|
12379
|
-
index: isSet3(object.index) ? globalThis.Number(object.index) : 0,
|
|
12380
|
-
identifier: isSet3(object.identifier) ? globalThis.String(object.identifier) : "",
|
|
12381
|
-
publicKey: isSet3(object.publicKey) ? bytesFromBase642(object.publicKey) : new Uint8Array(0),
|
|
12382
|
-
address: isSet3(object.address) ? globalThis.String(object.address) : ""
|
|
12383
|
-
};
|
|
12384
|
-
},
|
|
12385
|
-
toJSON(message) {
|
|
12386
|
-
const obj = {};
|
|
12387
|
-
if (message.index !== 0) {
|
|
12388
|
-
obj.index = Math.round(message.index);
|
|
12389
|
-
}
|
|
12390
|
-
if (message.identifier !== "") {
|
|
12391
|
-
obj.identifier = message.identifier;
|
|
12392
|
-
}
|
|
12393
|
-
if (message.publicKey.length !== 0) {
|
|
12394
|
-
obj.publicKey = base64FromBytes2(message.publicKey);
|
|
12395
|
-
}
|
|
12396
|
-
if (message.address !== "") {
|
|
12397
|
-
obj.address = message.address;
|
|
12398
|
-
}
|
|
12399
|
-
return obj;
|
|
12400
|
-
},
|
|
12401
|
-
create(base) {
|
|
12402
|
-
return SigningOperatorInfo.fromPartial(base ?? {});
|
|
12403
|
-
},
|
|
12404
|
-
fromPartial(object) {
|
|
12405
|
-
const message = createBaseSigningOperatorInfo();
|
|
12406
|
-
message.index = object.index ?? 0;
|
|
12407
|
-
message.identifier = object.identifier ?? "";
|
|
12408
|
-
message.publicKey = object.publicKey ?? new Uint8Array(0);
|
|
12409
|
-
message.address = object.address ?? "";
|
|
12410
|
-
return message;
|
|
12411
|
-
}
|
|
12412
|
-
};
|
|
12413
|
-
function createBaseGetSigningOperatorListResponse() {
|
|
12414
|
-
return { signingOperators: {} };
|
|
12415
|
-
}
|
|
12416
|
-
var GetSigningOperatorListResponse = {
|
|
12417
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12418
|
-
Object.entries(message.signingOperators).forEach(([key, value]) => {
|
|
12419
|
-
GetSigningOperatorListResponse_SigningOperatorsEntry.encode({ key, value }, writer.uint32(10).fork()).join();
|
|
12420
|
-
});
|
|
12421
|
-
return writer;
|
|
12422
|
-
},
|
|
12423
|
-
decode(input, length) {
|
|
12424
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12425
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12426
|
-
const message = createBaseGetSigningOperatorListResponse();
|
|
12427
|
-
while (reader.pos < end) {
|
|
12428
|
-
const tag = reader.uint32();
|
|
12429
|
-
switch (tag >>> 3) {
|
|
12430
|
-
case 1: {
|
|
12431
|
-
if (tag !== 10) {
|
|
12432
|
-
break;
|
|
12433
|
-
}
|
|
12434
|
-
const entry1 = GetSigningOperatorListResponse_SigningOperatorsEntry.decode(reader, reader.uint32());
|
|
12435
|
-
if (entry1.value !== void 0) {
|
|
12436
|
-
message.signingOperators[entry1.key] = entry1.value;
|
|
12437
|
-
}
|
|
12438
|
-
continue;
|
|
12439
|
-
}
|
|
12440
|
-
}
|
|
12441
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
12442
|
-
break;
|
|
12443
|
-
}
|
|
12444
|
-
reader.skip(tag & 7);
|
|
12445
|
-
}
|
|
12446
|
-
return message;
|
|
12447
|
-
},
|
|
12448
|
-
fromJSON(object) {
|
|
12449
|
-
return {
|
|
12450
|
-
signingOperators: isObject(object.signingOperators) ? Object.entries(object.signingOperators).reduce(
|
|
12451
|
-
(acc, [key, value]) => {
|
|
12452
|
-
acc[key] = SigningOperatorInfo.fromJSON(value);
|
|
12453
|
-
return acc;
|
|
12454
|
-
},
|
|
12455
|
-
{}
|
|
12456
|
-
) : {}
|
|
12457
|
-
};
|
|
12458
|
-
},
|
|
12459
|
-
toJSON(message) {
|
|
12460
|
-
const obj = {};
|
|
12461
|
-
if (message.signingOperators) {
|
|
12462
|
-
const entries = Object.entries(message.signingOperators);
|
|
12463
|
-
if (entries.length > 0) {
|
|
12464
|
-
obj.signingOperators = {};
|
|
12465
|
-
entries.forEach(([k, v]) => {
|
|
12466
|
-
obj.signingOperators[k] = SigningOperatorInfo.toJSON(v);
|
|
12467
|
-
});
|
|
12468
|
-
}
|
|
12469
|
-
}
|
|
12470
|
-
return obj;
|
|
12471
|
-
},
|
|
12472
|
-
create(base) {
|
|
12473
|
-
return GetSigningOperatorListResponse.fromPartial(base ?? {});
|
|
12474
|
-
},
|
|
12475
|
-
fromPartial(object) {
|
|
12476
|
-
const message = createBaseGetSigningOperatorListResponse();
|
|
12477
|
-
message.signingOperators = Object.entries(object.signingOperators ?? {}).reduce((acc, [key, value]) => {
|
|
12478
|
-
if (value !== void 0) {
|
|
12479
|
-
acc[key] = SigningOperatorInfo.fromPartial(value);
|
|
12480
|
-
}
|
|
12481
|
-
return acc;
|
|
12482
|
-
}, {});
|
|
12483
|
-
return message;
|
|
12484
|
-
}
|
|
12485
|
-
};
|
|
12486
|
-
function createBaseGetSigningOperatorListResponse_SigningOperatorsEntry() {
|
|
12487
|
-
return { key: "", value: void 0 };
|
|
12488
|
-
}
|
|
12489
|
-
var GetSigningOperatorListResponse_SigningOperatorsEntry = {
|
|
12490
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12491
|
-
if (message.key !== "") {
|
|
12492
|
-
writer.uint32(10).string(message.key);
|
|
12493
|
-
}
|
|
12494
|
-
if (message.value !== void 0) {
|
|
12495
|
-
SigningOperatorInfo.encode(message.value, writer.uint32(18).fork()).join();
|
|
12496
|
-
}
|
|
12497
|
-
return writer;
|
|
12498
|
-
},
|
|
12499
|
-
decode(input, length) {
|
|
12500
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12501
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12502
|
-
const message = createBaseGetSigningOperatorListResponse_SigningOperatorsEntry();
|
|
12503
|
-
while (reader.pos < end) {
|
|
12504
|
-
const tag = reader.uint32();
|
|
12505
|
-
switch (tag >>> 3) {
|
|
12506
|
-
case 1: {
|
|
12507
|
-
if (tag !== 10) {
|
|
12508
|
-
break;
|
|
12509
|
-
}
|
|
12510
|
-
message.key = reader.string();
|
|
12511
|
-
continue;
|
|
12512
|
-
}
|
|
12513
|
-
case 2: {
|
|
12514
|
-
if (tag !== 18) {
|
|
12515
|
-
break;
|
|
12516
|
-
}
|
|
12517
|
-
message.value = SigningOperatorInfo.decode(reader, reader.uint32());
|
|
12518
|
-
continue;
|
|
12519
|
-
}
|
|
12520
|
-
}
|
|
12521
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
12522
|
-
break;
|
|
12523
|
-
}
|
|
12524
|
-
reader.skip(tag & 7);
|
|
12525
|
-
}
|
|
12526
|
-
return message;
|
|
12527
|
-
},
|
|
12528
|
-
fromJSON(object) {
|
|
12529
|
-
return {
|
|
12530
|
-
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
12531
|
-
value: isSet3(object.value) ? SigningOperatorInfo.fromJSON(object.value) : void 0
|
|
12532
|
-
};
|
|
12533
|
-
},
|
|
12534
|
-
toJSON(message) {
|
|
12535
|
-
const obj = {};
|
|
12536
|
-
if (message.key !== "") {
|
|
12537
|
-
obj.key = message.key;
|
|
12538
|
-
}
|
|
12539
|
-
if (message.value !== void 0) {
|
|
12540
|
-
obj.value = SigningOperatorInfo.toJSON(message.value);
|
|
12541
|
-
}
|
|
12542
|
-
return obj;
|
|
12543
|
-
},
|
|
12544
|
-
create(base) {
|
|
12545
|
-
return GetSigningOperatorListResponse_SigningOperatorsEntry.fromPartial(base ?? {});
|
|
12546
|
-
},
|
|
12547
|
-
fromPartial(object) {
|
|
12548
|
-
const message = createBaseGetSigningOperatorListResponse_SigningOperatorsEntry();
|
|
12549
|
-
message.key = object.key ?? "";
|
|
12550
|
-
message.value = object.value !== void 0 && object.value !== null ? SigningOperatorInfo.fromPartial(object.value) : void 0;
|
|
12551
|
-
return message;
|
|
12552
|
-
}
|
|
12553
|
-
};
|
|
12554
|
-
function createBaseQueryUserSignedRefundsRequest() {
|
|
12555
|
-
return { paymentHash: new Uint8Array(0), identityPublicKey: new Uint8Array(0) };
|
|
12556
|
-
}
|
|
12557
|
-
var QueryUserSignedRefundsRequest = {
|
|
12558
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12559
|
-
if (message.paymentHash.length !== 0) {
|
|
12560
|
-
writer.uint32(10).bytes(message.paymentHash);
|
|
12561
|
-
}
|
|
12562
|
-
if (message.identityPublicKey.length !== 0) {
|
|
12563
|
-
writer.uint32(18).bytes(message.identityPublicKey);
|
|
12564
|
-
}
|
|
12565
|
-
return writer;
|
|
12566
|
-
},
|
|
12567
|
-
decode(input, length) {
|
|
12568
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12569
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12570
|
-
const message = createBaseQueryUserSignedRefundsRequest();
|
|
12571
|
-
while (reader.pos < end) {
|
|
12572
|
-
const tag = reader.uint32();
|
|
12573
|
-
switch (tag >>> 3) {
|
|
12574
|
-
case 1: {
|
|
12575
|
-
if (tag !== 10) {
|
|
12576
|
-
break;
|
|
12577
|
-
}
|
|
12578
|
-
message.paymentHash = reader.bytes();
|
|
12579
|
-
continue;
|
|
12580
|
-
}
|
|
12581
|
-
case 2: {
|
|
12582
|
-
if (tag !== 18) {
|
|
12583
|
-
break;
|
|
12584
|
-
}
|
|
12585
|
-
message.identityPublicKey = reader.bytes();
|
|
12586
|
-
continue;
|
|
12587
|
-
}
|
|
12588
|
-
}
|
|
12589
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
12590
|
-
break;
|
|
12591
|
-
}
|
|
12592
|
-
reader.skip(tag & 7);
|
|
12593
|
-
}
|
|
12594
|
-
return message;
|
|
12595
|
-
},
|
|
12596
|
-
fromJSON(object) {
|
|
12597
|
-
return {
|
|
12598
|
-
paymentHash: isSet3(object.paymentHash) ? bytesFromBase642(object.paymentHash) : new Uint8Array(0),
|
|
12599
|
-
identityPublicKey: isSet3(object.identityPublicKey) ? bytesFromBase642(object.identityPublicKey) : new Uint8Array(0)
|
|
12600
|
-
};
|
|
12601
|
-
},
|
|
12602
|
-
toJSON(message) {
|
|
12603
|
-
const obj = {};
|
|
12604
|
-
if (message.paymentHash.length !== 0) {
|
|
12605
|
-
obj.paymentHash = base64FromBytes2(message.paymentHash);
|
|
12606
|
-
}
|
|
12607
|
-
if (message.identityPublicKey.length !== 0) {
|
|
12608
|
-
obj.identityPublicKey = base64FromBytes2(message.identityPublicKey);
|
|
12609
|
-
}
|
|
12610
|
-
return obj;
|
|
12611
|
-
},
|
|
12612
|
-
create(base) {
|
|
12613
|
-
return QueryUserSignedRefundsRequest.fromPartial(base ?? {});
|
|
12614
|
-
},
|
|
12615
|
-
fromPartial(object) {
|
|
12616
|
-
const message = createBaseQueryUserSignedRefundsRequest();
|
|
12617
|
-
message.paymentHash = object.paymentHash ?? new Uint8Array(0);
|
|
12618
|
-
message.identityPublicKey = object.identityPublicKey ?? new Uint8Array(0);
|
|
12619
|
-
return message;
|
|
12620
|
-
}
|
|
12621
|
-
};
|
|
12622
|
-
function createBaseQueryUserSignedRefundsResponse() {
|
|
12623
|
-
return { userSignedRefunds: [] };
|
|
12624
|
-
}
|
|
12625
|
-
var QueryUserSignedRefundsResponse = {
|
|
12626
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12627
|
-
for (const v of message.userSignedRefunds) {
|
|
12628
|
-
UserSignedRefund.encode(v, writer.uint32(10).fork()).join();
|
|
11809
|
+
for (const v of message.userSignedRefunds) {
|
|
11810
|
+
UserSignedRefund.encode(v, writer.uint32(10).fork()).join();
|
|
12629
11811
|
}
|
|
12630
11812
|
return writer;
|
|
12631
11813
|
},
|
|
@@ -15609,22 +14791,6 @@ var SparkServiceDefinition = {
|
|
|
15609
14791
|
responseStream: false,
|
|
15610
14792
|
options: {}
|
|
15611
14793
|
},
|
|
15612
|
-
prepare_tree_address: {
|
|
15613
|
-
name: "prepare_tree_address",
|
|
15614
|
-
requestType: PrepareTreeAddressRequest,
|
|
15615
|
-
requestStream: false,
|
|
15616
|
-
responseType: PrepareTreeAddressResponse,
|
|
15617
|
-
responseStream: false,
|
|
15618
|
-
options: {}
|
|
15619
|
-
},
|
|
15620
|
-
create_tree: {
|
|
15621
|
-
name: "create_tree",
|
|
15622
|
-
requestType: CreateTreeRequest,
|
|
15623
|
-
requestStream: false,
|
|
15624
|
-
responseType: CreateTreeResponse,
|
|
15625
|
-
responseStream: false,
|
|
15626
|
-
options: {}
|
|
15627
|
-
},
|
|
15628
14794
|
get_signing_operator_list: {
|
|
15629
14795
|
name: "get_signing_operator_list",
|
|
15630
14796
|
requestType: Empty,
|
|
@@ -15796,14 +14962,6 @@ var SparkServiceDefinition = {
|
|
|
15796
14962
|
* The following endpoints enforce inclusion of Direct Transactions used
|
|
15797
14963
|
* for unilateral exits
|
|
15798
14964
|
*/
|
|
15799
|
-
create_tree_v2: {
|
|
15800
|
-
name: "create_tree_v2",
|
|
15801
|
-
requestType: CreateTreeRequest,
|
|
15802
|
-
requestStream: false,
|
|
15803
|
-
responseType: CreateTreeResponse,
|
|
15804
|
-
responseStream: false,
|
|
15805
|
-
options: {}
|
|
15806
|
-
},
|
|
15807
14965
|
cooperative_exit_v2: {
|
|
15808
14966
|
name: "cooperative_exit_v2",
|
|
15809
14967
|
requestType: CooperativeExitRequest,
|
|
@@ -15945,9 +15103,14 @@ function isSet3(value) {
|
|
|
15945
15103
|
return value !== null && value !== void 0;
|
|
15946
15104
|
}
|
|
15947
15105
|
|
|
15106
|
+
// src/utils/invoice-hashing.ts
|
|
15107
|
+
init_buffer();
|
|
15108
|
+
var import_sha2 = require("@noble/hashes/sha2");
|
|
15109
|
+
|
|
15948
15110
|
// src/utils/address.ts
|
|
15949
15111
|
var import_uuidv7 = require("uuidv7");
|
|
15950
15112
|
var import_utils3 = require("@noble/curves/abstract/utils");
|
|
15113
|
+
var import_wire5 = require("@bufbuild/protobuf/wire");
|
|
15951
15114
|
|
|
15952
15115
|
// src/utils/adaptor-signature.ts
|
|
15953
15116
|
init_buffer();
|
|
@@ -15959,7 +15122,7 @@ var import_secp256k12 = require("@noble/curves/secp256k1");
|
|
|
15959
15122
|
init_buffer();
|
|
15960
15123
|
var import_utils5 = require("@noble/curves/abstract/utils");
|
|
15961
15124
|
var import_secp256k13 = require("@noble/curves/secp256k1");
|
|
15962
|
-
var
|
|
15125
|
+
var import_sha22 = require("@noble/hashes/sha2");
|
|
15963
15126
|
var btc2 = __toESM(require("@scure/btc-signer"), 1);
|
|
15964
15127
|
|
|
15965
15128
|
// src/utils/network.ts
|
|
@@ -15971,13 +15134,13 @@ var bitcoin = __toESM(require("bitcoinjs-lib"), 1);
|
|
|
15971
15134
|
init_buffer();
|
|
15972
15135
|
|
|
15973
15136
|
// src/utils/network.ts
|
|
15974
|
-
var Network2 = /* @__PURE__ */ ((
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
return
|
|
15137
|
+
var Network2 = /* @__PURE__ */ ((Network5) => {
|
|
15138
|
+
Network5[Network5["MAINNET"] = 0] = "MAINNET";
|
|
15139
|
+
Network5[Network5["TESTNET"] = 1] = "TESTNET";
|
|
15140
|
+
Network5[Network5["SIGNET"] = 2] = "SIGNET";
|
|
15141
|
+
Network5[Network5["REGTEST"] = 3] = "REGTEST";
|
|
15142
|
+
Network5[Network5["LOCAL"] = 4] = "LOCAL";
|
|
15143
|
+
return Network5;
|
|
15981
15144
|
})(Network2 || {});
|
|
15982
15145
|
var NetworkToProto = {
|
|
15983
15146
|
[0 /* MAINNET */]: 1 /* MAINNET */,
|
|
@@ -16070,7 +15233,7 @@ function getSigHashFromTx(tx, inputIndex, prevOutput) {
|
|
|
16070
15233
|
);
|
|
16071
15234
|
}
|
|
16072
15235
|
function getTxId(tx) {
|
|
16073
|
-
return (0, import_utils5.bytesToHex)((0,
|
|
15236
|
+
return (0, import_utils5.bytesToHex)((0, import_sha22.sha256)((0, import_sha22.sha256)(tx.toBytes(true))).reverse());
|
|
16074
15237
|
}
|
|
16075
15238
|
|
|
16076
15239
|
// src/utils/keys.ts
|
|
@@ -16211,6 +15374,7 @@ var BASE_CONFIG = {
|
|
|
16211
15374
|
identityPublicKey: getSspIdentityPublicKey("LOCAL"),
|
|
16212
15375
|
schemaEndpoint: getSspSchemaEndpoint("LOCAL")
|
|
16213
15376
|
},
|
|
15377
|
+
signerWithPreExistingKeys: false,
|
|
16214
15378
|
console: {
|
|
16215
15379
|
otel: false
|
|
16216
15380
|
}
|
|
@@ -16917,7 +16081,7 @@ var getFetch = () => {
|
|
|
16917
16081
|
|
|
16918
16082
|
// src/utils/proof.ts
|
|
16919
16083
|
init_buffer();
|
|
16920
|
-
var
|
|
16084
|
+
var import_sha23 = require("@noble/hashes/sha2");
|
|
16921
16085
|
function proofOfPossessionMessageHashForDepositAddress(userPubkey, operatorPubkey, depositAddress) {
|
|
16922
16086
|
const encoder = new TextEncoder();
|
|
16923
16087
|
const depositAddressBytes = encoder.encode(depositAddress);
|
|
@@ -16926,7 +16090,7 @@ function proofOfPossessionMessageHashForDepositAddress(userPubkey, operatorPubke
|
|
|
16926
16090
|
...operatorPubkey,
|
|
16927
16091
|
...depositAddressBytes
|
|
16928
16092
|
]);
|
|
16929
|
-
return (0,
|
|
16093
|
+
return (0, import_sha23.sha256)(proofMsg);
|
|
16930
16094
|
}
|
|
16931
16095
|
|
|
16932
16096
|
// src/utils/response-validation.ts
|
|
@@ -17043,7 +16207,7 @@ var import_utils10 = require("@scure/btc-signer/utils");
|
|
|
17043
16207
|
// src/utils/transfer_package.ts
|
|
17044
16208
|
init_buffer();
|
|
17045
16209
|
var import_utils11 = require("@noble/curves/abstract/utils");
|
|
17046
|
-
var
|
|
16210
|
+
var import_sha24 = require("@noble/hashes/sha2");
|
|
17047
16211
|
|
|
17048
16212
|
// src/utils/transaction.ts
|
|
17049
16213
|
init_buffer();
|
|
@@ -17176,7 +16340,7 @@ function getEphemeralAnchorOutput() {
|
|
|
17176
16340
|
init_buffer();
|
|
17177
16341
|
var import_utils12 = require("@noble/curves/abstract/utils");
|
|
17178
16342
|
var import_legacy = require("@noble/hashes/legacy");
|
|
17179
|
-
var
|
|
16343
|
+
var import_sha25 = require("@noble/hashes/sha2");
|
|
17180
16344
|
var btc3 = __toESM(require("@scure/btc-signer"), 1);
|
|
17181
16345
|
|
|
17182
16346
|
// src/utils/xchain-address.ts
|
|
@@ -17196,7 +16360,7 @@ init_buffer();
|
|
|
17196
16360
|
var import_secp256k17 = require("@bitcoinerlab/secp256k1");
|
|
17197
16361
|
var import_utils13 = require("@noble/curves/abstract/utils");
|
|
17198
16362
|
var import_secp256k18 = require("@noble/curves/secp256k1");
|
|
17199
|
-
var
|
|
16363
|
+
var import_sha26 = require("@noble/hashes/sha2");
|
|
17200
16364
|
var import_bip32 = require("@scure/bip32");
|
|
17201
16365
|
var import_bip39 = require("@scure/bip39");
|
|
17202
16366
|
var import_english = require("@scure/bip39/wordlists/english");
|
|
@@ -17208,7 +16372,7 @@ init_buffer();
|
|
|
17208
16372
|
var import_core8 = require("@lightsparkdev/core");
|
|
17209
16373
|
var isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative";
|
|
17210
16374
|
var isBun = globalThis.Bun !== void 0;
|
|
17211
|
-
var packageVersion = true ? "0.2.
|
|
16375
|
+
var packageVersion = true ? "0.2.9" : "unknown";
|
|
17212
16376
|
var baseEnvStr = "unknown";
|
|
17213
16377
|
if (isBun) {
|
|
17214
16378
|
const bunVersion = "version" in globalThis.Bun ? globalThis.Bun.version : "unknown-version";
|
|
@@ -17217,6 +16381,9 @@ if (isBun) {
|
|
|
17217
16381
|
baseEnvStr = `node/${process.version}`;
|
|
17218
16382
|
} else if (isReactNative) {
|
|
17219
16383
|
baseEnvStr = "react-native";
|
|
16384
|
+
} else if (import_core8.isBare) {
|
|
16385
|
+
const bareVersion = Bare.version;
|
|
16386
|
+
baseEnvStr = `bare/${bareVersion}`;
|
|
17220
16387
|
} else {
|
|
17221
16388
|
const userAgent = typeof navigator !== "undefined" && navigator.userAgent || "unknown-user-agent";
|
|
17222
16389
|
baseEnvStr = `browser/${userAgent}`;
|
|
@@ -17324,7 +16491,7 @@ var DefaultSparkSigner = class {
|
|
|
17324
16491
|
async getSigningPrivateKeyFromDerivation(keyDerivation) {
|
|
17325
16492
|
switch (keyDerivation.type) {
|
|
17326
16493
|
case "leaf" /* LEAF */:
|
|
17327
|
-
return this.deriveSigningKey((0,
|
|
16494
|
+
return this.deriveSigningKey((0, import_sha26.sha256)(keyDerivation.path));
|
|
17328
16495
|
case "deposit" /* DEPOSIT */:
|
|
17329
16496
|
return this.depositKey?.privateKey ?? new Uint8Array();
|
|
17330
16497
|
case "static_deposit" /* STATIC_DEPOSIT */:
|
|
@@ -17391,8 +16558,8 @@ var DefaultSparkSigner = class {
|
|
|
17391
16558
|
return import_secp256k18.secp256k1.getPublicKey(privateKey);
|
|
17392
16559
|
}
|
|
17393
16560
|
async subtractPrivateKeysGivenDerivationPaths(first, second) {
|
|
17394
|
-
const firstPrivateKey = this.deriveSigningKey((0,
|
|
17395
|
-
const secondPrivateKey = this.deriveSigningKey((0,
|
|
16561
|
+
const firstPrivateKey = this.deriveSigningKey((0, import_sha26.sha256)(first));
|
|
16562
|
+
const secondPrivateKey = this.deriveSigningKey((0, import_sha26.sha256)(second));
|
|
17396
16563
|
const resultPrivKey = subtractPrivateKeys(
|
|
17397
16564
|
firstPrivateKey,
|
|
17398
16565
|
secondPrivateKey
|
|
@@ -17664,18 +16831,18 @@ init_buffer();
|
|
|
17664
16831
|
// src/spark-wallet/spark-wallet.ts
|
|
17665
16832
|
init_buffer();
|
|
17666
16833
|
var import_core12 = require("@lightsparkdev/core");
|
|
17667
|
-
var
|
|
16834
|
+
var import_utils24 = require("@noble/curves/abstract/utils");
|
|
17668
16835
|
var import_secp256k115 = require("@noble/curves/secp256k1");
|
|
17669
16836
|
var import_bip392 = require("@scure/bip39");
|
|
17670
16837
|
var import_english2 = require("@scure/bip39/wordlists/english");
|
|
17671
|
-
var
|
|
16838
|
+
var import_btc_signer6 = require("@scure/btc-signer");
|
|
17672
16839
|
var import_async_mutex = require("async-mutex");
|
|
17673
16840
|
var import_uuidv75 = require("uuidv7");
|
|
17674
16841
|
|
|
17675
16842
|
// src/graphql/client.ts
|
|
17676
16843
|
init_buffer();
|
|
17677
16844
|
var import_core10 = require("@lightsparkdev/core");
|
|
17678
|
-
var
|
|
16845
|
+
var import_sha27 = require("@noble/hashes/sha2");
|
|
17679
16846
|
|
|
17680
16847
|
// src/graphql/mutations/ClaimStaticDeposit.ts
|
|
17681
16848
|
init_buffer();
|
|
@@ -18330,14 +17497,14 @@ var WalletConfigService = class {
|
|
|
18330
17497
|
// src/services/connection.ts
|
|
18331
17498
|
init_buffer();
|
|
18332
17499
|
var import_core11 = require("@lightsparkdev/core");
|
|
18333
|
-
var
|
|
17500
|
+
var import_sha28 = require("@noble/hashes/sha2");
|
|
18334
17501
|
var import_nice_grpc_client_middleware_retry = require("nice-grpc-client-middleware-retry");
|
|
18335
17502
|
var import_nice_grpc_common2 = require("nice-grpc-common");
|
|
18336
17503
|
var import_nice_grpc_web = require("nice-grpc-web");
|
|
18337
17504
|
|
|
18338
17505
|
// src/proto/mock.ts
|
|
18339
17506
|
init_buffer();
|
|
18340
|
-
var
|
|
17507
|
+
var import_wire6 = require("@bufbuild/protobuf/wire");
|
|
18341
17508
|
function interruptTransferRequest_InterruptTransferActionFromJSON(object) {
|
|
18342
17509
|
switch (object) {
|
|
18343
17510
|
case 0:
|
|
@@ -18402,14 +17569,14 @@ function createBaseCleanUpPreimageShareRequest() {
|
|
|
18402
17569
|
return { paymentHash: new Uint8Array(0) };
|
|
18403
17570
|
}
|
|
18404
17571
|
var CleanUpPreimageShareRequest = {
|
|
18405
|
-
encode(message, writer = new
|
|
17572
|
+
encode(message, writer = new import_wire6.BinaryWriter()) {
|
|
18406
17573
|
if (message.paymentHash.length !== 0) {
|
|
18407
17574
|
writer.uint32(10).bytes(message.paymentHash);
|
|
18408
17575
|
}
|
|
18409
17576
|
return writer;
|
|
18410
17577
|
},
|
|
18411
17578
|
decode(input, length) {
|
|
18412
|
-
const reader = input instanceof
|
|
17579
|
+
const reader = input instanceof import_wire6.BinaryReader ? input : new import_wire6.BinaryReader(input);
|
|
18413
17580
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18414
17581
|
const message = createBaseCleanUpPreimageShareRequest();
|
|
18415
17582
|
while (reader.pos < end) {
|
|
@@ -18453,14 +17620,14 @@ function createBaseInterruptTransferRequest() {
|
|
|
18453
17620
|
return { action: 0 };
|
|
18454
17621
|
}
|
|
18455
17622
|
var InterruptTransferRequest = {
|
|
18456
|
-
encode(message, writer = new
|
|
17623
|
+
encode(message, writer = new import_wire6.BinaryWriter()) {
|
|
18457
17624
|
if (message.action !== 0) {
|
|
18458
17625
|
writer.uint32(8).int32(message.action);
|
|
18459
17626
|
}
|
|
18460
17627
|
return writer;
|
|
18461
17628
|
},
|
|
18462
17629
|
decode(input, length) {
|
|
18463
|
-
const reader = input instanceof
|
|
17630
|
+
const reader = input instanceof import_wire6.BinaryReader ? input : new import_wire6.BinaryReader(input);
|
|
18464
17631
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18465
17632
|
const message = createBaseInterruptTransferRequest();
|
|
18466
17633
|
while (reader.pos < end) {
|
|
@@ -18506,7 +17673,7 @@ function createBaseUpdateNodesStatusRequest() {
|
|
|
18506
17673
|
return { nodeIds: [], status: "" };
|
|
18507
17674
|
}
|
|
18508
17675
|
var UpdateNodesStatusRequest = {
|
|
18509
|
-
encode(message, writer = new
|
|
17676
|
+
encode(message, writer = new import_wire6.BinaryWriter()) {
|
|
18510
17677
|
for (const v of message.nodeIds) {
|
|
18511
17678
|
writer.uint32(10).string(v);
|
|
18512
17679
|
}
|
|
@@ -18516,7 +17683,7 @@ var UpdateNodesStatusRequest = {
|
|
|
18516
17683
|
return writer;
|
|
18517
17684
|
},
|
|
18518
17685
|
decode(input, length) {
|
|
18519
|
-
const reader = input instanceof
|
|
17686
|
+
const reader = input instanceof import_wire6.BinaryReader ? input : new import_wire6.BinaryReader(input);
|
|
18520
17687
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18521
17688
|
const message = createBaseUpdateNodesStatusRequest();
|
|
18522
17689
|
while (reader.pos < end) {
|
|
@@ -18574,14 +17741,14 @@ function createBaseTriggerTaskRequest() {
|
|
|
18574
17741
|
return { taskName: "" };
|
|
18575
17742
|
}
|
|
18576
17743
|
var TriggerTaskRequest = {
|
|
18577
|
-
encode(message, writer = new
|
|
17744
|
+
encode(message, writer = new import_wire6.BinaryWriter()) {
|
|
18578
17745
|
if (message.taskName !== "") {
|
|
18579
17746
|
writer.uint32(10).string(message.taskName);
|
|
18580
17747
|
}
|
|
18581
17748
|
return writer;
|
|
18582
17749
|
},
|
|
18583
17750
|
decode(input, length) {
|
|
18584
|
-
const reader = input instanceof
|
|
17751
|
+
const reader = input instanceof import_wire6.BinaryReader ? input : new import_wire6.BinaryReader(input);
|
|
18585
17752
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18586
17753
|
const message = createBaseTriggerTaskRequest();
|
|
18587
17754
|
while (reader.pos < end) {
|
|
@@ -18625,7 +17792,7 @@ function createBaseInterruptCoopExitRequest() {
|
|
|
18625
17792
|
return { action: 0, targetOperator: "" };
|
|
18626
17793
|
}
|
|
18627
17794
|
var InterruptCoopExitRequest = {
|
|
18628
|
-
encode(message, writer = new
|
|
17795
|
+
encode(message, writer = new import_wire6.BinaryWriter()) {
|
|
18629
17796
|
if (message.action !== 0) {
|
|
18630
17797
|
writer.uint32(8).int32(message.action);
|
|
18631
17798
|
}
|
|
@@ -18635,7 +17802,7 @@ var InterruptCoopExitRequest = {
|
|
|
18635
17802
|
return writer;
|
|
18636
17803
|
},
|
|
18637
17804
|
decode(input, length) {
|
|
18638
|
-
const reader = input instanceof
|
|
17805
|
+
const reader = input instanceof import_wire6.BinaryReader ? input : new import_wire6.BinaryReader(input);
|
|
18639
17806
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18640
17807
|
const message = createBaseInterruptCoopExitRequest();
|
|
18641
17808
|
while (reader.pos < end) {
|
|
@@ -18765,12 +17932,12 @@ function isSet4(value) {
|
|
|
18765
17932
|
|
|
18766
17933
|
// src/proto/spark_authn.ts
|
|
18767
17934
|
init_buffer();
|
|
18768
|
-
var
|
|
17935
|
+
var import_wire7 = require("@bufbuild/protobuf/wire");
|
|
18769
17936
|
function createBaseChallenge() {
|
|
18770
17937
|
return { version: 0, timestamp: 0, nonce: new Uint8Array(0), publicKey: new Uint8Array(0) };
|
|
18771
17938
|
}
|
|
18772
17939
|
var Challenge = {
|
|
18773
|
-
encode(message, writer = new
|
|
17940
|
+
encode(message, writer = new import_wire7.BinaryWriter()) {
|
|
18774
17941
|
if (message.version !== 0) {
|
|
18775
17942
|
writer.uint32(8).int32(message.version);
|
|
18776
17943
|
}
|
|
@@ -18786,7 +17953,7 @@ var Challenge = {
|
|
|
18786
17953
|
return writer;
|
|
18787
17954
|
},
|
|
18788
17955
|
decode(input, length) {
|
|
18789
|
-
const reader = input instanceof
|
|
17956
|
+
const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
|
|
18790
17957
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18791
17958
|
const message = createBaseChallenge();
|
|
18792
17959
|
while (reader.pos < end) {
|
|
@@ -18868,7 +18035,7 @@ function createBaseProtectedChallenge() {
|
|
|
18868
18035
|
return { version: 0, challenge: void 0, serverHmac: new Uint8Array(0) };
|
|
18869
18036
|
}
|
|
18870
18037
|
var ProtectedChallenge = {
|
|
18871
|
-
encode(message, writer = new
|
|
18038
|
+
encode(message, writer = new import_wire7.BinaryWriter()) {
|
|
18872
18039
|
if (message.version !== 0) {
|
|
18873
18040
|
writer.uint32(8).int32(message.version);
|
|
18874
18041
|
}
|
|
@@ -18881,7 +18048,7 @@ var ProtectedChallenge = {
|
|
|
18881
18048
|
return writer;
|
|
18882
18049
|
},
|
|
18883
18050
|
decode(input, length) {
|
|
18884
|
-
const reader = input instanceof
|
|
18051
|
+
const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
|
|
18885
18052
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18886
18053
|
const message = createBaseProtectedChallenge();
|
|
18887
18054
|
while (reader.pos < end) {
|
|
@@ -18951,14 +18118,14 @@ function createBaseGetChallengeRequest() {
|
|
|
18951
18118
|
return { publicKey: new Uint8Array(0) };
|
|
18952
18119
|
}
|
|
18953
18120
|
var GetChallengeRequest = {
|
|
18954
|
-
encode(message, writer = new
|
|
18121
|
+
encode(message, writer = new import_wire7.BinaryWriter()) {
|
|
18955
18122
|
if (message.publicKey.length !== 0) {
|
|
18956
18123
|
writer.uint32(10).bytes(message.publicKey);
|
|
18957
18124
|
}
|
|
18958
18125
|
return writer;
|
|
18959
18126
|
},
|
|
18960
18127
|
decode(input, length) {
|
|
18961
|
-
const reader = input instanceof
|
|
18128
|
+
const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
|
|
18962
18129
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
18963
18130
|
const message = createBaseGetChallengeRequest();
|
|
18964
18131
|
while (reader.pos < end) {
|
|
@@ -19002,14 +18169,14 @@ function createBaseGetChallengeResponse() {
|
|
|
19002
18169
|
return { protectedChallenge: void 0 };
|
|
19003
18170
|
}
|
|
19004
18171
|
var GetChallengeResponse = {
|
|
19005
|
-
encode(message, writer = new
|
|
18172
|
+
encode(message, writer = new import_wire7.BinaryWriter()) {
|
|
19006
18173
|
if (message.protectedChallenge !== void 0) {
|
|
19007
18174
|
ProtectedChallenge.encode(message.protectedChallenge, writer.uint32(10).fork()).join();
|
|
19008
18175
|
}
|
|
19009
18176
|
return writer;
|
|
19010
18177
|
},
|
|
19011
18178
|
decode(input, length) {
|
|
19012
|
-
const reader = input instanceof
|
|
18179
|
+
const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
|
|
19013
18180
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19014
18181
|
const message = createBaseGetChallengeResponse();
|
|
19015
18182
|
while (reader.pos < end) {
|
|
@@ -19055,7 +18222,7 @@ function createBaseVerifyChallengeRequest() {
|
|
|
19055
18222
|
return { protectedChallenge: void 0, signature: new Uint8Array(0), publicKey: new Uint8Array(0) };
|
|
19056
18223
|
}
|
|
19057
18224
|
var VerifyChallengeRequest = {
|
|
19058
|
-
encode(message, writer = new
|
|
18225
|
+
encode(message, writer = new import_wire7.BinaryWriter()) {
|
|
19059
18226
|
if (message.protectedChallenge !== void 0) {
|
|
19060
18227
|
ProtectedChallenge.encode(message.protectedChallenge, writer.uint32(10).fork()).join();
|
|
19061
18228
|
}
|
|
@@ -19068,7 +18235,7 @@ var VerifyChallengeRequest = {
|
|
|
19068
18235
|
return writer;
|
|
19069
18236
|
},
|
|
19070
18237
|
decode(input, length) {
|
|
19071
|
-
const reader = input instanceof
|
|
18238
|
+
const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
|
|
19072
18239
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19073
18240
|
const message = createBaseVerifyChallengeRequest();
|
|
19074
18241
|
while (reader.pos < end) {
|
|
@@ -19138,7 +18305,7 @@ function createBaseVerifyChallengeResponse() {
|
|
|
19138
18305
|
return { sessionToken: "", expirationTimestamp: 0 };
|
|
19139
18306
|
}
|
|
19140
18307
|
var VerifyChallengeResponse = {
|
|
19141
|
-
encode(message, writer = new
|
|
18308
|
+
encode(message, writer = new import_wire7.BinaryWriter()) {
|
|
19142
18309
|
if (message.sessionToken !== "") {
|
|
19143
18310
|
writer.uint32(10).string(message.sessionToken);
|
|
19144
18311
|
}
|
|
@@ -19148,7 +18315,7 @@ var VerifyChallengeResponse = {
|
|
|
19148
18315
|
return writer;
|
|
19149
18316
|
},
|
|
19150
18317
|
decode(input, length) {
|
|
19151
|
-
const reader = input instanceof
|
|
18318
|
+
const reader = input instanceof import_wire7.BinaryReader ? input : new import_wire7.BinaryReader(input);
|
|
19152
18319
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19153
18320
|
const message = createBaseVerifyChallengeResponse();
|
|
19154
18321
|
while (reader.pos < end) {
|
|
@@ -19265,7 +18432,37 @@ function isSet5(value) {
|
|
|
19265
18432
|
|
|
19266
18433
|
// src/proto/spark_token.ts
|
|
19267
18434
|
init_buffer();
|
|
19268
|
-
var
|
|
18435
|
+
var import_wire8 = require("@bufbuild/protobuf/wire");
|
|
18436
|
+
function commitStatusFromJSON(object) {
|
|
18437
|
+
switch (object) {
|
|
18438
|
+
case 0:
|
|
18439
|
+
case "COMMIT_UNSPECIFIED":
|
|
18440
|
+
return 0 /* COMMIT_UNSPECIFIED */;
|
|
18441
|
+
case 1:
|
|
18442
|
+
case "COMMIT_PROCESSING":
|
|
18443
|
+
return 1 /* COMMIT_PROCESSING */;
|
|
18444
|
+
case 2:
|
|
18445
|
+
case "COMMIT_FINALIZED":
|
|
18446
|
+
return 2 /* COMMIT_FINALIZED */;
|
|
18447
|
+
case -1:
|
|
18448
|
+
case "UNRECOGNIZED":
|
|
18449
|
+
default:
|
|
18450
|
+
return -1 /* UNRECOGNIZED */;
|
|
18451
|
+
}
|
|
18452
|
+
}
|
|
18453
|
+
function commitStatusToJSON(object) {
|
|
18454
|
+
switch (object) {
|
|
18455
|
+
case 0 /* COMMIT_UNSPECIFIED */:
|
|
18456
|
+
return "COMMIT_UNSPECIFIED";
|
|
18457
|
+
case 1 /* COMMIT_PROCESSING */:
|
|
18458
|
+
return "COMMIT_PROCESSING";
|
|
18459
|
+
case 2 /* COMMIT_FINALIZED */:
|
|
18460
|
+
return "COMMIT_FINALIZED";
|
|
18461
|
+
case -1 /* UNRECOGNIZED */:
|
|
18462
|
+
default:
|
|
18463
|
+
return "UNRECOGNIZED";
|
|
18464
|
+
}
|
|
18465
|
+
}
|
|
19269
18466
|
function tokenTransactionStatusFromJSON2(object) {
|
|
19270
18467
|
switch (object) {
|
|
19271
18468
|
case 0:
|
|
@@ -19320,7 +18517,7 @@ function createBaseTokenOutputToSpend2() {
|
|
|
19320
18517
|
return { prevTokenTransactionHash: new Uint8Array(0), prevTokenTransactionVout: 0 };
|
|
19321
18518
|
}
|
|
19322
18519
|
var TokenOutputToSpend2 = {
|
|
19323
|
-
encode(message, writer = new
|
|
18520
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19324
18521
|
if (message.prevTokenTransactionHash.length !== 0) {
|
|
19325
18522
|
writer.uint32(10).bytes(message.prevTokenTransactionHash);
|
|
19326
18523
|
}
|
|
@@ -19330,7 +18527,7 @@ var TokenOutputToSpend2 = {
|
|
|
19330
18527
|
return writer;
|
|
19331
18528
|
},
|
|
19332
18529
|
decode(input, length) {
|
|
19333
|
-
const reader = input instanceof
|
|
18530
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
19334
18531
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19335
18532
|
const message = createBaseTokenOutputToSpend2();
|
|
19336
18533
|
while (reader.pos < end) {
|
|
@@ -19388,14 +18585,14 @@ function createBaseTokenTransferInput2() {
|
|
|
19388
18585
|
return { outputsToSpend: [] };
|
|
19389
18586
|
}
|
|
19390
18587
|
var TokenTransferInput2 = {
|
|
19391
|
-
encode(message, writer = new
|
|
18588
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19392
18589
|
for (const v of message.outputsToSpend) {
|
|
19393
18590
|
TokenOutputToSpend2.encode(v, writer.uint32(10).fork()).join();
|
|
19394
18591
|
}
|
|
19395
18592
|
return writer;
|
|
19396
18593
|
},
|
|
19397
18594
|
decode(input, length) {
|
|
19398
|
-
const reader = input instanceof
|
|
18595
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
19399
18596
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19400
18597
|
const message = createBaseTokenTransferInput2();
|
|
19401
18598
|
while (reader.pos < end) {
|
|
@@ -19441,7 +18638,7 @@ function createBaseTokenMintInput2() {
|
|
|
19441
18638
|
return { issuerPublicKey: new Uint8Array(0), tokenIdentifier: void 0 };
|
|
19442
18639
|
}
|
|
19443
18640
|
var TokenMintInput2 = {
|
|
19444
|
-
encode(message, writer = new
|
|
18641
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19445
18642
|
if (message.issuerPublicKey.length !== 0) {
|
|
19446
18643
|
writer.uint32(10).bytes(message.issuerPublicKey);
|
|
19447
18644
|
}
|
|
@@ -19451,7 +18648,7 @@ var TokenMintInput2 = {
|
|
|
19451
18648
|
return writer;
|
|
19452
18649
|
},
|
|
19453
18650
|
decode(input, length) {
|
|
19454
|
-
const reader = input instanceof
|
|
18651
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
19455
18652
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19456
18653
|
const message = createBaseTokenMintInput2();
|
|
19457
18654
|
while (reader.pos < end) {
|
|
@@ -19517,7 +18714,7 @@ function createBaseTokenCreateInput2() {
|
|
|
19517
18714
|
};
|
|
19518
18715
|
}
|
|
19519
18716
|
var TokenCreateInput2 = {
|
|
19520
|
-
encode(message, writer = new
|
|
18717
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19521
18718
|
if (message.issuerPublicKey.length !== 0) {
|
|
19522
18719
|
writer.uint32(10).bytes(message.issuerPublicKey);
|
|
19523
18720
|
}
|
|
@@ -19542,7 +18739,7 @@ var TokenCreateInput2 = {
|
|
|
19542
18739
|
return writer;
|
|
19543
18740
|
},
|
|
19544
18741
|
decode(input, length) {
|
|
19545
|
-
const reader = input instanceof
|
|
18742
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
19546
18743
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19547
18744
|
const message = createBaseTokenCreateInput2();
|
|
19548
18745
|
while (reader.pos < end) {
|
|
@@ -19669,7 +18866,7 @@ function createBaseTokenOutput2() {
|
|
|
19669
18866
|
};
|
|
19670
18867
|
}
|
|
19671
18868
|
var TokenOutput2 = {
|
|
19672
|
-
encode(message, writer = new
|
|
18869
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19673
18870
|
if (message.id !== void 0) {
|
|
19674
18871
|
writer.uint32(10).string(message.id);
|
|
19675
18872
|
}
|
|
@@ -19697,7 +18894,7 @@ var TokenOutput2 = {
|
|
|
19697
18894
|
return writer;
|
|
19698
18895
|
},
|
|
19699
18896
|
decode(input, length) {
|
|
19700
|
-
const reader = input instanceof
|
|
18897
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
19701
18898
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19702
18899
|
const message = createBaseTokenOutput2();
|
|
19703
18900
|
while (reader.pos < end) {
|
|
@@ -19831,11 +19028,12 @@ function createBaseTokenTransaction2() {
|
|
|
19831
19028
|
sparkOperatorIdentityPublicKeys: [],
|
|
19832
19029
|
expiryTime: void 0,
|
|
19833
19030
|
network: 0,
|
|
19834
|
-
clientCreatedTimestamp: void 0
|
|
19031
|
+
clientCreatedTimestamp: void 0,
|
|
19032
|
+
invoiceAttachments: []
|
|
19835
19033
|
};
|
|
19836
19034
|
}
|
|
19837
19035
|
var TokenTransaction2 = {
|
|
19838
|
-
encode(message, writer = new
|
|
19036
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19839
19037
|
if (message.version !== 0) {
|
|
19840
19038
|
writer.uint32(8).uint32(message.version);
|
|
19841
19039
|
}
|
|
@@ -19865,10 +19063,13 @@ var TokenTransaction2 = {
|
|
|
19865
19063
|
if (message.clientCreatedTimestamp !== void 0) {
|
|
19866
19064
|
Timestamp.encode(toTimestamp2(message.clientCreatedTimestamp), writer.uint32(74).fork()).join();
|
|
19867
19065
|
}
|
|
19066
|
+
for (const v of message.invoiceAttachments) {
|
|
19067
|
+
InvoiceAttachment.encode(v, writer.uint32(82).fork()).join();
|
|
19068
|
+
}
|
|
19868
19069
|
return writer;
|
|
19869
19070
|
},
|
|
19870
19071
|
decode(input, length) {
|
|
19871
|
-
const reader = input instanceof
|
|
19072
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
19872
19073
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19873
19074
|
const message = createBaseTokenTransaction2();
|
|
19874
19075
|
while (reader.pos < end) {
|
|
@@ -19940,6 +19141,13 @@ var TokenTransaction2 = {
|
|
|
19940
19141
|
message.clientCreatedTimestamp = fromTimestamp2(Timestamp.decode(reader, reader.uint32()));
|
|
19941
19142
|
continue;
|
|
19942
19143
|
}
|
|
19144
|
+
case 10: {
|
|
19145
|
+
if (tag !== 82) {
|
|
19146
|
+
break;
|
|
19147
|
+
}
|
|
19148
|
+
message.invoiceAttachments.push(InvoiceAttachment.decode(reader, reader.uint32()));
|
|
19149
|
+
continue;
|
|
19150
|
+
}
|
|
19943
19151
|
}
|
|
19944
19152
|
if ((tag & 7) === 4 || tag === 0) {
|
|
19945
19153
|
break;
|
|
@@ -19956,7 +19164,8 @@ var TokenTransaction2 = {
|
|
|
19956
19164
|
sparkOperatorIdentityPublicKeys: globalThis.Array.isArray(object?.sparkOperatorIdentityPublicKeys) ? object.sparkOperatorIdentityPublicKeys.map((e) => bytesFromBase645(e)) : [],
|
|
19957
19165
|
expiryTime: isSet6(object.expiryTime) ? fromJsonTimestamp2(object.expiryTime) : void 0,
|
|
19958
19166
|
network: isSet6(object.network) ? networkFromJSON(object.network) : 0,
|
|
19959
|
-
clientCreatedTimestamp: isSet6(object.clientCreatedTimestamp) ? fromJsonTimestamp2(object.clientCreatedTimestamp) : void 0
|
|
19167
|
+
clientCreatedTimestamp: isSet6(object.clientCreatedTimestamp) ? fromJsonTimestamp2(object.clientCreatedTimestamp) : void 0,
|
|
19168
|
+
invoiceAttachments: globalThis.Array.isArray(object?.invoiceAttachments) ? object.invoiceAttachments.map((e) => InvoiceAttachment.fromJSON(e)) : []
|
|
19960
19169
|
};
|
|
19961
19170
|
},
|
|
19962
19171
|
toJSON(message) {
|
|
@@ -19986,6 +19195,9 @@ var TokenTransaction2 = {
|
|
|
19986
19195
|
if (message.clientCreatedTimestamp !== void 0) {
|
|
19987
19196
|
obj.clientCreatedTimestamp = message.clientCreatedTimestamp.toISOString();
|
|
19988
19197
|
}
|
|
19198
|
+
if (message.invoiceAttachments?.length) {
|
|
19199
|
+
obj.invoiceAttachments = message.invoiceAttachments.map((e) => InvoiceAttachment.toJSON(e));
|
|
19200
|
+
}
|
|
19989
19201
|
return obj;
|
|
19990
19202
|
},
|
|
19991
19203
|
create(base) {
|
|
@@ -20028,6 +19240,58 @@ var TokenTransaction2 = {
|
|
|
20028
19240
|
message.expiryTime = object.expiryTime ?? void 0;
|
|
20029
19241
|
message.network = object.network ?? 0;
|
|
20030
19242
|
message.clientCreatedTimestamp = object.clientCreatedTimestamp ?? void 0;
|
|
19243
|
+
message.invoiceAttachments = object.invoiceAttachments?.map((e) => InvoiceAttachment.fromPartial(e)) || [];
|
|
19244
|
+
return message;
|
|
19245
|
+
}
|
|
19246
|
+
};
|
|
19247
|
+
function createBaseInvoiceAttachment() {
|
|
19248
|
+
return { sparkInvoice: "" };
|
|
19249
|
+
}
|
|
19250
|
+
var InvoiceAttachment = {
|
|
19251
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19252
|
+
if (message.sparkInvoice !== "") {
|
|
19253
|
+
writer.uint32(10).string(message.sparkInvoice);
|
|
19254
|
+
}
|
|
19255
|
+
return writer;
|
|
19256
|
+
},
|
|
19257
|
+
decode(input, length) {
|
|
19258
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
19259
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19260
|
+
const message = createBaseInvoiceAttachment();
|
|
19261
|
+
while (reader.pos < end) {
|
|
19262
|
+
const tag = reader.uint32();
|
|
19263
|
+
switch (tag >>> 3) {
|
|
19264
|
+
case 1: {
|
|
19265
|
+
if (tag !== 10) {
|
|
19266
|
+
break;
|
|
19267
|
+
}
|
|
19268
|
+
message.sparkInvoice = reader.string();
|
|
19269
|
+
continue;
|
|
19270
|
+
}
|
|
19271
|
+
}
|
|
19272
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
19273
|
+
break;
|
|
19274
|
+
}
|
|
19275
|
+
reader.skip(tag & 7);
|
|
19276
|
+
}
|
|
19277
|
+
return message;
|
|
19278
|
+
},
|
|
19279
|
+
fromJSON(object) {
|
|
19280
|
+
return { sparkInvoice: isSet6(object.sparkInvoice) ? globalThis.String(object.sparkInvoice) : "" };
|
|
19281
|
+
},
|
|
19282
|
+
toJSON(message) {
|
|
19283
|
+
const obj = {};
|
|
19284
|
+
if (message.sparkInvoice !== "") {
|
|
19285
|
+
obj.sparkInvoice = message.sparkInvoice;
|
|
19286
|
+
}
|
|
19287
|
+
return obj;
|
|
19288
|
+
},
|
|
19289
|
+
create(base) {
|
|
19290
|
+
return InvoiceAttachment.fromPartial(base ?? {});
|
|
19291
|
+
},
|
|
19292
|
+
fromPartial(object) {
|
|
19293
|
+
const message = createBaseInvoiceAttachment();
|
|
19294
|
+
message.sparkInvoice = object.sparkInvoice ?? "";
|
|
20031
19295
|
return message;
|
|
20032
19296
|
}
|
|
20033
19297
|
};
|
|
@@ -20035,7 +19299,7 @@ function createBaseSignatureWithIndex2() {
|
|
|
20035
19299
|
return { signature: new Uint8Array(0), inputIndex: 0 };
|
|
20036
19300
|
}
|
|
20037
19301
|
var SignatureWithIndex2 = {
|
|
20038
|
-
encode(message, writer = new
|
|
19302
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20039
19303
|
if (message.signature.length !== 0) {
|
|
20040
19304
|
writer.uint32(10).bytes(message.signature);
|
|
20041
19305
|
}
|
|
@@ -20045,7 +19309,7 @@ var SignatureWithIndex2 = {
|
|
|
20045
19309
|
return writer;
|
|
20046
19310
|
},
|
|
20047
19311
|
decode(input, length) {
|
|
20048
|
-
const reader = input instanceof
|
|
19312
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20049
19313
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20050
19314
|
const message = createBaseSignatureWithIndex2();
|
|
20051
19315
|
while (reader.pos < end) {
|
|
@@ -20103,7 +19367,7 @@ function createBaseInputTtxoSignaturesPerOperator() {
|
|
|
20103
19367
|
return { ttxoSignatures: [], operatorIdentityPublicKey: new Uint8Array(0) };
|
|
20104
19368
|
}
|
|
20105
19369
|
var InputTtxoSignaturesPerOperator = {
|
|
20106
|
-
encode(message, writer = new
|
|
19370
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20107
19371
|
for (const v of message.ttxoSignatures) {
|
|
20108
19372
|
SignatureWithIndex2.encode(v, writer.uint32(10).fork()).join();
|
|
20109
19373
|
}
|
|
@@ -20113,7 +19377,7 @@ var InputTtxoSignaturesPerOperator = {
|
|
|
20113
19377
|
return writer;
|
|
20114
19378
|
},
|
|
20115
19379
|
decode(input, length) {
|
|
20116
|
-
const reader = input instanceof
|
|
19380
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20117
19381
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20118
19382
|
const message = createBaseInputTtxoSignaturesPerOperator();
|
|
20119
19383
|
while (reader.pos < end) {
|
|
@@ -20176,7 +19440,7 @@ function createBaseStartTransactionRequest() {
|
|
|
20176
19440
|
};
|
|
20177
19441
|
}
|
|
20178
19442
|
var StartTransactionRequest = {
|
|
20179
|
-
encode(message, writer = new
|
|
19443
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20180
19444
|
if (message.identityPublicKey.length !== 0) {
|
|
20181
19445
|
writer.uint32(10).bytes(message.identityPublicKey);
|
|
20182
19446
|
}
|
|
@@ -20192,7 +19456,7 @@ var StartTransactionRequest = {
|
|
|
20192
19456
|
return writer;
|
|
20193
19457
|
},
|
|
20194
19458
|
decode(input, length) {
|
|
20195
|
-
const reader = input instanceof
|
|
19459
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20196
19460
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20197
19461
|
const message = createBaseStartTransactionRequest();
|
|
20198
19462
|
while (reader.pos < end) {
|
|
@@ -20276,7 +19540,7 @@ function createBaseStartTransactionResponse() {
|
|
|
20276
19540
|
return { finalTokenTransaction: void 0, keyshareInfo: void 0 };
|
|
20277
19541
|
}
|
|
20278
19542
|
var StartTransactionResponse = {
|
|
20279
|
-
encode(message, writer = new
|
|
19543
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20280
19544
|
if (message.finalTokenTransaction !== void 0) {
|
|
20281
19545
|
TokenTransaction2.encode(message.finalTokenTransaction, writer.uint32(10).fork()).join();
|
|
20282
19546
|
}
|
|
@@ -20286,7 +19550,7 @@ var StartTransactionResponse = {
|
|
|
20286
19550
|
return writer;
|
|
20287
19551
|
},
|
|
20288
19552
|
decode(input, length) {
|
|
20289
|
-
const reader = input instanceof
|
|
19553
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20290
19554
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20291
19555
|
const message = createBaseStartTransactionResponse();
|
|
20292
19556
|
while (reader.pos < end) {
|
|
@@ -20349,7 +19613,7 @@ function createBaseCommitTransactionRequest() {
|
|
|
20349
19613
|
};
|
|
20350
19614
|
}
|
|
20351
19615
|
var CommitTransactionRequest = {
|
|
20352
|
-
encode(message, writer = new
|
|
19616
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20353
19617
|
if (message.finalTokenTransaction !== void 0) {
|
|
20354
19618
|
TokenTransaction2.encode(message.finalTokenTransaction, writer.uint32(10).fork()).join();
|
|
20355
19619
|
}
|
|
@@ -20365,7 +19629,7 @@ var CommitTransactionRequest = {
|
|
|
20365
19629
|
return writer;
|
|
20366
19630
|
},
|
|
20367
19631
|
decode(input, length) {
|
|
20368
|
-
const reader = input instanceof
|
|
19632
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20369
19633
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20370
19634
|
const message = createBaseCommitTransactionRequest();
|
|
20371
19635
|
while (reader.pos < end) {
|
|
@@ -20445,20 +19709,108 @@ var CommitTransactionRequest = {
|
|
|
20445
19709
|
return message;
|
|
20446
19710
|
}
|
|
20447
19711
|
};
|
|
19712
|
+
function createBaseCommitProgress() {
|
|
19713
|
+
return { committedOperatorPublicKeys: [], uncommittedOperatorPublicKeys: [] };
|
|
19714
|
+
}
|
|
19715
|
+
var CommitProgress = {
|
|
19716
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19717
|
+
for (const v of message.committedOperatorPublicKeys) {
|
|
19718
|
+
writer.uint32(10).bytes(v);
|
|
19719
|
+
}
|
|
19720
|
+
for (const v of message.uncommittedOperatorPublicKeys) {
|
|
19721
|
+
writer.uint32(18).bytes(v);
|
|
19722
|
+
}
|
|
19723
|
+
return writer;
|
|
19724
|
+
},
|
|
19725
|
+
decode(input, length) {
|
|
19726
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
19727
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
19728
|
+
const message = createBaseCommitProgress();
|
|
19729
|
+
while (reader.pos < end) {
|
|
19730
|
+
const tag = reader.uint32();
|
|
19731
|
+
switch (tag >>> 3) {
|
|
19732
|
+
case 1: {
|
|
19733
|
+
if (tag !== 10) {
|
|
19734
|
+
break;
|
|
19735
|
+
}
|
|
19736
|
+
message.committedOperatorPublicKeys.push(reader.bytes());
|
|
19737
|
+
continue;
|
|
19738
|
+
}
|
|
19739
|
+
case 2: {
|
|
19740
|
+
if (tag !== 18) {
|
|
19741
|
+
break;
|
|
19742
|
+
}
|
|
19743
|
+
message.uncommittedOperatorPublicKeys.push(reader.bytes());
|
|
19744
|
+
continue;
|
|
19745
|
+
}
|
|
19746
|
+
}
|
|
19747
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
19748
|
+
break;
|
|
19749
|
+
}
|
|
19750
|
+
reader.skip(tag & 7);
|
|
19751
|
+
}
|
|
19752
|
+
return message;
|
|
19753
|
+
},
|
|
19754
|
+
fromJSON(object) {
|
|
19755
|
+
return {
|
|
19756
|
+
committedOperatorPublicKeys: globalThis.Array.isArray(object?.committedOperatorPublicKeys) ? object.committedOperatorPublicKeys.map((e) => bytesFromBase645(e)) : [],
|
|
19757
|
+
uncommittedOperatorPublicKeys: globalThis.Array.isArray(object?.uncommittedOperatorPublicKeys) ? object.uncommittedOperatorPublicKeys.map((e) => bytesFromBase645(e)) : []
|
|
19758
|
+
};
|
|
19759
|
+
},
|
|
19760
|
+
toJSON(message) {
|
|
19761
|
+
const obj = {};
|
|
19762
|
+
if (message.committedOperatorPublicKeys?.length) {
|
|
19763
|
+
obj.committedOperatorPublicKeys = message.committedOperatorPublicKeys.map((e) => base64FromBytes5(e));
|
|
19764
|
+
}
|
|
19765
|
+
if (message.uncommittedOperatorPublicKeys?.length) {
|
|
19766
|
+
obj.uncommittedOperatorPublicKeys = message.uncommittedOperatorPublicKeys.map((e) => base64FromBytes5(e));
|
|
19767
|
+
}
|
|
19768
|
+
return obj;
|
|
19769
|
+
},
|
|
19770
|
+
create(base) {
|
|
19771
|
+
return CommitProgress.fromPartial(base ?? {});
|
|
19772
|
+
},
|
|
19773
|
+
fromPartial(object) {
|
|
19774
|
+
const message = createBaseCommitProgress();
|
|
19775
|
+
message.committedOperatorPublicKeys = object.committedOperatorPublicKeys?.map((e) => e) || [];
|
|
19776
|
+
message.uncommittedOperatorPublicKeys = object.uncommittedOperatorPublicKeys?.map((e) => e) || [];
|
|
19777
|
+
return message;
|
|
19778
|
+
}
|
|
19779
|
+
};
|
|
20448
19780
|
function createBaseCommitTransactionResponse() {
|
|
20449
|
-
return {};
|
|
19781
|
+
return { commitStatus: 0, commitProgress: void 0 };
|
|
20450
19782
|
}
|
|
20451
19783
|
var CommitTransactionResponse = {
|
|
20452
|
-
encode(
|
|
19784
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
19785
|
+
if (message.commitStatus !== 0) {
|
|
19786
|
+
writer.uint32(8).int32(message.commitStatus);
|
|
19787
|
+
}
|
|
19788
|
+
if (message.commitProgress !== void 0) {
|
|
19789
|
+
CommitProgress.encode(message.commitProgress, writer.uint32(18).fork()).join();
|
|
19790
|
+
}
|
|
20453
19791
|
return writer;
|
|
20454
19792
|
},
|
|
20455
19793
|
decode(input, length) {
|
|
20456
|
-
const reader = input instanceof
|
|
19794
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20457
19795
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20458
19796
|
const message = createBaseCommitTransactionResponse();
|
|
20459
19797
|
while (reader.pos < end) {
|
|
20460
19798
|
const tag = reader.uint32();
|
|
20461
19799
|
switch (tag >>> 3) {
|
|
19800
|
+
case 1: {
|
|
19801
|
+
if (tag !== 8) {
|
|
19802
|
+
break;
|
|
19803
|
+
}
|
|
19804
|
+
message.commitStatus = reader.int32();
|
|
19805
|
+
continue;
|
|
19806
|
+
}
|
|
19807
|
+
case 2: {
|
|
19808
|
+
if (tag !== 18) {
|
|
19809
|
+
break;
|
|
19810
|
+
}
|
|
19811
|
+
message.commitProgress = CommitProgress.decode(reader, reader.uint32());
|
|
19812
|
+
continue;
|
|
19813
|
+
}
|
|
20462
19814
|
}
|
|
20463
19815
|
if ((tag & 7) === 4 || tag === 0) {
|
|
20464
19816
|
break;
|
|
@@ -20467,18 +19819,29 @@ var CommitTransactionResponse = {
|
|
|
20467
19819
|
}
|
|
20468
19820
|
return message;
|
|
20469
19821
|
},
|
|
20470
|
-
fromJSON(
|
|
20471
|
-
return {
|
|
19822
|
+
fromJSON(object) {
|
|
19823
|
+
return {
|
|
19824
|
+
commitStatus: isSet6(object.commitStatus) ? commitStatusFromJSON(object.commitStatus) : 0,
|
|
19825
|
+
commitProgress: isSet6(object.commitProgress) ? CommitProgress.fromJSON(object.commitProgress) : void 0
|
|
19826
|
+
};
|
|
20472
19827
|
},
|
|
20473
|
-
toJSON(
|
|
19828
|
+
toJSON(message) {
|
|
20474
19829
|
const obj = {};
|
|
19830
|
+
if (message.commitStatus !== 0) {
|
|
19831
|
+
obj.commitStatus = commitStatusToJSON(message.commitStatus);
|
|
19832
|
+
}
|
|
19833
|
+
if (message.commitProgress !== void 0) {
|
|
19834
|
+
obj.commitProgress = CommitProgress.toJSON(message.commitProgress);
|
|
19835
|
+
}
|
|
20475
19836
|
return obj;
|
|
20476
19837
|
},
|
|
20477
19838
|
create(base) {
|
|
20478
19839
|
return CommitTransactionResponse.fromPartial(base ?? {});
|
|
20479
19840
|
},
|
|
20480
|
-
fromPartial(
|
|
19841
|
+
fromPartial(object) {
|
|
20481
19842
|
const message = createBaseCommitTransactionResponse();
|
|
19843
|
+
message.commitStatus = object.commitStatus ?? 0;
|
|
19844
|
+
message.commitProgress = object.commitProgress !== void 0 && object.commitProgress !== null ? CommitProgress.fromPartial(object.commitProgress) : void 0;
|
|
20482
19845
|
return message;
|
|
20483
19846
|
}
|
|
20484
19847
|
};
|
|
@@ -20486,7 +19849,7 @@ function createBaseQueryTokenMetadataRequest() {
|
|
|
20486
19849
|
return { tokenIdentifiers: [], issuerPublicKeys: [] };
|
|
20487
19850
|
}
|
|
20488
19851
|
var QueryTokenMetadataRequest = {
|
|
20489
|
-
encode(message, writer = new
|
|
19852
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20490
19853
|
for (const v of message.tokenIdentifiers) {
|
|
20491
19854
|
writer.uint32(10).bytes(v);
|
|
20492
19855
|
}
|
|
@@ -20496,7 +19859,7 @@ var QueryTokenMetadataRequest = {
|
|
|
20496
19859
|
return writer;
|
|
20497
19860
|
},
|
|
20498
19861
|
decode(input, length) {
|
|
20499
|
-
const reader = input instanceof
|
|
19862
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20500
19863
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20501
19864
|
const message = createBaseQueryTokenMetadataRequest();
|
|
20502
19865
|
while (reader.pos < end) {
|
|
@@ -20563,7 +19926,7 @@ function createBaseTokenMetadata() {
|
|
|
20563
19926
|
};
|
|
20564
19927
|
}
|
|
20565
19928
|
var TokenMetadata = {
|
|
20566
|
-
encode(message, writer = new
|
|
19929
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20567
19930
|
if (message.issuerPublicKey.length !== 0) {
|
|
20568
19931
|
writer.uint32(10).bytes(message.issuerPublicKey);
|
|
20569
19932
|
}
|
|
@@ -20591,7 +19954,7 @@ var TokenMetadata = {
|
|
|
20591
19954
|
return writer;
|
|
20592
19955
|
},
|
|
20593
19956
|
decode(input, length) {
|
|
20594
|
-
const reader = input instanceof
|
|
19957
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20595
19958
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20596
19959
|
const message = createBaseTokenMetadata();
|
|
20597
19960
|
while (reader.pos < end) {
|
|
@@ -20721,14 +20084,14 @@ function createBaseQueryTokenMetadataResponse() {
|
|
|
20721
20084
|
return { tokenMetadata: [] };
|
|
20722
20085
|
}
|
|
20723
20086
|
var QueryTokenMetadataResponse = {
|
|
20724
|
-
encode(message, writer = new
|
|
20087
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20725
20088
|
for (const v of message.tokenMetadata) {
|
|
20726
20089
|
TokenMetadata.encode(v, writer.uint32(10).fork()).join();
|
|
20727
20090
|
}
|
|
20728
20091
|
return writer;
|
|
20729
20092
|
},
|
|
20730
20093
|
decode(input, length) {
|
|
20731
|
-
const reader = input instanceof
|
|
20094
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20732
20095
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20733
20096
|
const message = createBaseQueryTokenMetadataResponse();
|
|
20734
20097
|
while (reader.pos < end) {
|
|
@@ -20774,7 +20137,7 @@ function createBaseQueryTokenOutputsRequest2() {
|
|
|
20774
20137
|
return { ownerPublicKeys: [], issuerPublicKeys: [], tokenIdentifiers: [], network: 0 };
|
|
20775
20138
|
}
|
|
20776
20139
|
var QueryTokenOutputsRequest2 = {
|
|
20777
|
-
encode(message, writer = new
|
|
20140
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20778
20141
|
for (const v of message.ownerPublicKeys) {
|
|
20779
20142
|
writer.uint32(10).bytes(v);
|
|
20780
20143
|
}
|
|
@@ -20790,7 +20153,7 @@ var QueryTokenOutputsRequest2 = {
|
|
|
20790
20153
|
return writer;
|
|
20791
20154
|
},
|
|
20792
20155
|
decode(input, length) {
|
|
20793
|
-
const reader = input instanceof
|
|
20156
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20794
20157
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20795
20158
|
const message = createBaseQueryTokenOutputsRequest2();
|
|
20796
20159
|
while (reader.pos < end) {
|
|
@@ -20880,7 +20243,7 @@ function createBaseQueryTokenTransactionsRequest2() {
|
|
|
20880
20243
|
};
|
|
20881
20244
|
}
|
|
20882
20245
|
var QueryTokenTransactionsRequest2 = {
|
|
20883
|
-
encode(message, writer = new
|
|
20246
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
20884
20247
|
for (const v of message.outputIds) {
|
|
20885
20248
|
writer.uint32(10).string(v);
|
|
20886
20249
|
}
|
|
@@ -20905,7 +20268,7 @@ var QueryTokenTransactionsRequest2 = {
|
|
|
20905
20268
|
return writer;
|
|
20906
20269
|
},
|
|
20907
20270
|
decode(input, length) {
|
|
20908
|
-
const reader = input instanceof
|
|
20271
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
20909
20272
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
20910
20273
|
const message = createBaseQueryTokenTransactionsRequest2();
|
|
20911
20274
|
while (reader.pos < end) {
|
|
@@ -21023,7 +20386,7 @@ function createBaseQueryTokenTransactionsResponse2() {
|
|
|
21023
20386
|
return { tokenTransactionsWithStatus: [], offset: 0 };
|
|
21024
20387
|
}
|
|
21025
20388
|
var QueryTokenTransactionsResponse2 = {
|
|
21026
|
-
encode(message, writer = new
|
|
20389
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21027
20390
|
for (const v of message.tokenTransactionsWithStatus) {
|
|
21028
20391
|
TokenTransactionWithStatus2.encode(v, writer.uint32(10).fork()).join();
|
|
21029
20392
|
}
|
|
@@ -21033,7 +20396,7 @@ var QueryTokenTransactionsResponse2 = {
|
|
|
21033
20396
|
return writer;
|
|
21034
20397
|
},
|
|
21035
20398
|
decode(input, length) {
|
|
21036
|
-
const reader = input instanceof
|
|
20399
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21037
20400
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21038
20401
|
const message = createBaseQueryTokenTransactionsResponse2();
|
|
21039
20402
|
while (reader.pos < end) {
|
|
@@ -21093,7 +20456,7 @@ function createBaseOutputWithPreviousTransactionData2() {
|
|
|
21093
20456
|
return { output: void 0, previousTransactionHash: new Uint8Array(0), previousTransactionVout: 0 };
|
|
21094
20457
|
}
|
|
21095
20458
|
var OutputWithPreviousTransactionData2 = {
|
|
21096
|
-
encode(message, writer = new
|
|
20459
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21097
20460
|
if (message.output !== void 0) {
|
|
21098
20461
|
TokenOutput2.encode(message.output, writer.uint32(10).fork()).join();
|
|
21099
20462
|
}
|
|
@@ -21106,7 +20469,7 @@ var OutputWithPreviousTransactionData2 = {
|
|
|
21106
20469
|
return writer;
|
|
21107
20470
|
},
|
|
21108
20471
|
decode(input, length) {
|
|
21109
|
-
const reader = input instanceof
|
|
20472
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21110
20473
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21111
20474
|
const message = createBaseOutputWithPreviousTransactionData2();
|
|
21112
20475
|
while (reader.pos < end) {
|
|
@@ -21176,14 +20539,14 @@ function createBaseQueryTokenOutputsResponse2() {
|
|
|
21176
20539
|
return { outputsWithPreviousTransactionData: [] };
|
|
21177
20540
|
}
|
|
21178
20541
|
var QueryTokenOutputsResponse2 = {
|
|
21179
|
-
encode(message, writer = new
|
|
20542
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21180
20543
|
for (const v of message.outputsWithPreviousTransactionData) {
|
|
21181
20544
|
OutputWithPreviousTransactionData2.encode(v, writer.uint32(10).fork()).join();
|
|
21182
20545
|
}
|
|
21183
20546
|
return writer;
|
|
21184
20547
|
},
|
|
21185
20548
|
decode(input, length) {
|
|
21186
|
-
const reader = input instanceof
|
|
20549
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21187
20550
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21188
20551
|
const message = createBaseQueryTokenOutputsResponse2();
|
|
21189
20552
|
while (reader.pos < end) {
|
|
@@ -21233,7 +20596,7 @@ function createBaseSpentTokenOutputMetadata2() {
|
|
|
21233
20596
|
return { outputId: "", revocationSecret: new Uint8Array(0) };
|
|
21234
20597
|
}
|
|
21235
20598
|
var SpentTokenOutputMetadata2 = {
|
|
21236
|
-
encode(message, writer = new
|
|
20599
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21237
20600
|
if (message.outputId !== "") {
|
|
21238
20601
|
writer.uint32(10).string(message.outputId);
|
|
21239
20602
|
}
|
|
@@ -21243,7 +20606,7 @@ var SpentTokenOutputMetadata2 = {
|
|
|
21243
20606
|
return writer;
|
|
21244
20607
|
},
|
|
21245
20608
|
decode(input, length) {
|
|
21246
|
-
const reader = input instanceof
|
|
20609
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21247
20610
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21248
20611
|
const message = createBaseSpentTokenOutputMetadata2();
|
|
21249
20612
|
while (reader.pos < end) {
|
|
@@ -21301,14 +20664,14 @@ function createBaseTokenTransactionConfirmationMetadata2() {
|
|
|
21301
20664
|
return { spentTokenOutputsMetadata: [] };
|
|
21302
20665
|
}
|
|
21303
20666
|
var TokenTransactionConfirmationMetadata2 = {
|
|
21304
|
-
encode(message, writer = new
|
|
20667
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21305
20668
|
for (const v of message.spentTokenOutputsMetadata) {
|
|
21306
20669
|
SpentTokenOutputMetadata2.encode(v, writer.uint32(10).fork()).join();
|
|
21307
20670
|
}
|
|
21308
20671
|
return writer;
|
|
21309
20672
|
},
|
|
21310
20673
|
decode(input, length) {
|
|
21311
|
-
const reader = input instanceof
|
|
20674
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21312
20675
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21313
20676
|
const message = createBaseTokenTransactionConfirmationMetadata2();
|
|
21314
20677
|
while (reader.pos < end) {
|
|
@@ -21359,7 +20722,7 @@ function createBaseTokenTransactionWithStatus2() {
|
|
|
21359
20722
|
};
|
|
21360
20723
|
}
|
|
21361
20724
|
var TokenTransactionWithStatus2 = {
|
|
21362
|
-
encode(message, writer = new
|
|
20725
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21363
20726
|
if (message.tokenTransaction !== void 0) {
|
|
21364
20727
|
TokenTransaction2.encode(message.tokenTransaction, writer.uint32(10).fork()).join();
|
|
21365
20728
|
}
|
|
@@ -21375,7 +20738,7 @@ var TokenTransactionWithStatus2 = {
|
|
|
21375
20738
|
return writer;
|
|
21376
20739
|
},
|
|
21377
20740
|
decode(input, length) {
|
|
21378
|
-
const reader = input instanceof
|
|
20741
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21379
20742
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21380
20743
|
const message = createBaseTokenTransactionWithStatus2();
|
|
21381
20744
|
while (reader.pos < end) {
|
|
@@ -21465,7 +20828,7 @@ function createBaseFreezeTokensPayload2() {
|
|
|
21465
20828
|
};
|
|
21466
20829
|
}
|
|
21467
20830
|
var FreezeTokensPayload2 = {
|
|
21468
|
-
encode(message, writer = new
|
|
20831
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21469
20832
|
if (message.version !== 0) {
|
|
21470
20833
|
writer.uint32(8).uint32(message.version);
|
|
21471
20834
|
}
|
|
@@ -21490,7 +20853,7 @@ var FreezeTokensPayload2 = {
|
|
|
21490
20853
|
return writer;
|
|
21491
20854
|
},
|
|
21492
20855
|
decode(input, length) {
|
|
21493
|
-
const reader = input instanceof
|
|
20856
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21494
20857
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21495
20858
|
const message = createBaseFreezeTokensPayload2();
|
|
21496
20859
|
while (reader.pos < end) {
|
|
@@ -21608,7 +20971,7 @@ function createBaseFreezeTokensRequest2() {
|
|
|
21608
20971
|
return { freezeTokensPayload: void 0, issuerSignature: new Uint8Array(0) };
|
|
21609
20972
|
}
|
|
21610
20973
|
var FreezeTokensRequest2 = {
|
|
21611
|
-
encode(message, writer = new
|
|
20974
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21612
20975
|
if (message.freezeTokensPayload !== void 0) {
|
|
21613
20976
|
FreezeTokensPayload2.encode(message.freezeTokensPayload, writer.uint32(10).fork()).join();
|
|
21614
20977
|
}
|
|
@@ -21618,7 +20981,7 @@ var FreezeTokensRequest2 = {
|
|
|
21618
20981
|
return writer;
|
|
21619
20982
|
},
|
|
21620
20983
|
decode(input, length) {
|
|
21621
|
-
const reader = input instanceof
|
|
20984
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21622
20985
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21623
20986
|
const message = createBaseFreezeTokensRequest2();
|
|
21624
20987
|
while (reader.pos < end) {
|
|
@@ -21676,7 +21039,7 @@ function createBaseFreezeTokensResponse2() {
|
|
|
21676
21039
|
return { impactedOutputIds: [], impactedTokenAmount: new Uint8Array(0) };
|
|
21677
21040
|
}
|
|
21678
21041
|
var FreezeTokensResponse2 = {
|
|
21679
|
-
encode(message, writer = new
|
|
21042
|
+
encode(message, writer = new import_wire8.BinaryWriter()) {
|
|
21680
21043
|
for (const v of message.impactedOutputIds) {
|
|
21681
21044
|
writer.uint32(10).string(v);
|
|
21682
21045
|
}
|
|
@@ -21686,7 +21049,7 @@ var FreezeTokensResponse2 = {
|
|
|
21686
21049
|
return writer;
|
|
21687
21050
|
},
|
|
21688
21051
|
decode(input, length) {
|
|
21689
|
-
const reader = input instanceof
|
|
21052
|
+
const reader = input instanceof import_wire8.BinaryReader ? input : new import_wire8.BinaryReader(input);
|
|
21690
21053
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
21691
21054
|
const message = createBaseFreezeTokensResponse2();
|
|
21692
21055
|
while (reader.pos < end) {
|
|
@@ -22035,7 +21398,7 @@ var ConnectionManager = class {
|
|
|
22035
21398
|
const challengeBytes = Challenge.encode(
|
|
22036
21399
|
challengeResp.protectedChallenge.challenge
|
|
22037
21400
|
).finish();
|
|
22038
|
-
const hash = (0,
|
|
21401
|
+
const hash = (0, import_sha28.sha256)(challengeBytes);
|
|
22039
21402
|
const derSignatureBytes = await this.config.signer.signMessageWithIdentityKey(hash);
|
|
22040
21403
|
const verifyResp = await sparkAuthnClient.verify_challenge({
|
|
22041
21404
|
protectedChallenge: challengeResp.protectedChallenge,
|
|
@@ -22248,7 +21611,7 @@ var import_uuidv73 = require("uuidv7");
|
|
|
22248
21611
|
init_buffer();
|
|
22249
21612
|
var import_utils15 = require("@noble/curves/abstract/utils");
|
|
22250
21613
|
var import_secp256k19 = require("@noble/curves/secp256k1");
|
|
22251
|
-
var
|
|
21614
|
+
var import_sha29 = require("@noble/hashes/sha2");
|
|
22252
21615
|
var import_btc_signer2 = require("@scure/btc-signer");
|
|
22253
21616
|
var ecies2 = __toESM(require("eciesjs"), 1);
|
|
22254
21617
|
var import_uuidv72 = require("uuidv7");
|
|
@@ -22257,7 +21620,7 @@ var DEFAULT_EXPIRY_TIME = 10 * 60 * 1e3;
|
|
|
22257
21620
|
// src/services/deposit.ts
|
|
22258
21621
|
init_buffer();
|
|
22259
21622
|
var import_secp256k110 = require("@noble/curves/secp256k1");
|
|
22260
|
-
var
|
|
21623
|
+
var import_sha210 = require("@noble/hashes/sha2");
|
|
22261
21624
|
var import_utils16 = require("@noble/hashes/utils");
|
|
22262
21625
|
var import_btc_signer4 = require("@scure/btc-signer");
|
|
22263
21626
|
var import_utils17 = require("@scure/btc-signer/utils");
|
|
@@ -22306,7 +21669,7 @@ var DepositService = class {
|
|
|
22306
21669
|
}
|
|
22307
21670
|
);
|
|
22308
21671
|
}
|
|
22309
|
-
const addrHash = (0,
|
|
21672
|
+
const addrHash = (0, import_sha210.sha256)(address2.address);
|
|
22310
21673
|
for (const operator of Object.values(this.config.getSigningOperators())) {
|
|
22311
21674
|
if (operator.identifier === this.config.getCoordinatorIdentifier()) {
|
|
22312
21675
|
continue;
|
|
@@ -22871,7 +22234,7 @@ var DepositService = class {
|
|
|
22871
22234
|
init_buffer();
|
|
22872
22235
|
var import_utils18 = require("@noble/curves/abstract/utils");
|
|
22873
22236
|
var import_secp256k111 = require("@noble/curves/secp256k1");
|
|
22874
|
-
var
|
|
22237
|
+
var import_sha211 = require("@noble/hashes/sha2");
|
|
22875
22238
|
var import_uuidv74 = require("uuidv7");
|
|
22876
22239
|
|
|
22877
22240
|
// src/services/bolt11-spark.ts
|
|
@@ -22886,7 +22249,8 @@ var import_utils20 = require("@noble/hashes/utils");
|
|
|
22886
22249
|
|
|
22887
22250
|
// src/utils/token-hashing.ts
|
|
22888
22251
|
init_buffer();
|
|
22889
|
-
var
|
|
22252
|
+
var import_sha212 = require("@noble/hashes/sha2");
|
|
22253
|
+
var import_base4 = require("@scure/base");
|
|
22890
22254
|
|
|
22891
22255
|
// src/utils/token-keyshares.ts
|
|
22892
22256
|
init_buffer();
|
|
@@ -22895,32 +22259,28 @@ var import_secp256k112 = require("@noble/curves/secp256k1");
|
|
|
22895
22259
|
// src/utils/token-transaction-validation.ts
|
|
22896
22260
|
init_buffer();
|
|
22897
22261
|
|
|
22898
|
-
// src/services/tree-creation.ts
|
|
22899
|
-
init_buffer();
|
|
22900
|
-
var import_utils21 = require("@noble/curves/abstract/utils");
|
|
22901
|
-
var import_btc_signer5 = require("@scure/btc-signer");
|
|
22902
|
-
|
|
22903
22262
|
// src/spark-wallet/spark-wallet.ts
|
|
22904
|
-
var
|
|
22263
|
+
var import_sha213 = require("@noble/hashes/sha2");
|
|
22905
22264
|
var import_api = require("@opentelemetry/api");
|
|
22906
22265
|
var import_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
22907
22266
|
var import_eventemitter3 = require("eventemitter3");
|
|
22267
|
+
var import_nice_grpc_common3 = require("nice-grpc-common");
|
|
22908
22268
|
|
|
22909
22269
|
// src/services/signing.ts
|
|
22910
22270
|
init_buffer();
|
|
22911
|
-
var
|
|
22271
|
+
var import_utils21 = require("@noble/curves/abstract/utils");
|
|
22912
22272
|
|
|
22913
22273
|
// src/tests/utils/test-faucet.ts
|
|
22914
22274
|
init_buffer();
|
|
22915
|
-
var
|
|
22275
|
+
var import_utils22 = require("@noble/curves/abstract/utils");
|
|
22916
22276
|
var import_secp256k114 = require("@noble/curves/secp256k1");
|
|
22917
22277
|
var btc5 = __toESM(require("@scure/btc-signer"), 1);
|
|
22918
|
-
var
|
|
22919
|
-
var
|
|
22920
|
-
var STATIC_FAUCET_KEY = (0,
|
|
22278
|
+
var import_btc_signer5 = require("@scure/btc-signer");
|
|
22279
|
+
var import_utils23 = require("@scure/btc-signer/utils");
|
|
22280
|
+
var STATIC_FAUCET_KEY = (0, import_utils22.hexToBytes)(
|
|
22921
22281
|
"deadbeef1337cafe4242424242424242deadbeef1337cafe4242424242424242"
|
|
22922
22282
|
);
|
|
22923
|
-
var STATIC_MINING_KEY = (0,
|
|
22283
|
+
var STATIC_MINING_KEY = (0, import_utils22.hexToBytes)(
|
|
22924
22284
|
"1337cafe4242deadbeef4242424242421337cafe4242deadbeef424242424242"
|
|
22925
22285
|
);
|
|
22926
22286
|
var SATS_PER_BTC = 1e8;
|
|
@@ -22983,7 +22343,7 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
22983
22343
|
if (!scanResult.success || scanResult.unspents.length === 0) {
|
|
22984
22344
|
const blockHash = await this.generateToAddress(1, address2);
|
|
22985
22345
|
const block = await this.getBlock(blockHash[0]);
|
|
22986
|
-
const fundingTx =
|
|
22346
|
+
const fundingTx = import_btc_signer5.Transaction.fromRaw((0, import_utils22.hexToBytes)(block.tx[0].hex), {
|
|
22987
22347
|
allowUnknownOutputs: true
|
|
22988
22348
|
});
|
|
22989
22349
|
await this.generateToAddress(100, this.miningAddress);
|
|
@@ -23016,7 +22376,7 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
23016
22376
|
`Selected UTXO (${selectedUtxoAmountSats} sats) is too small to create even one faucet coin of ${COIN_AMOUNT} sats`
|
|
23017
22377
|
);
|
|
23018
22378
|
}
|
|
23019
|
-
const splitTx = new
|
|
22379
|
+
const splitTx = new import_btc_signer5.Transaction();
|
|
23020
22380
|
splitTx.addInput({
|
|
23021
22381
|
txid: selectedUtxo.txid,
|
|
23022
22382
|
index: selectedUtxo.vout
|
|
@@ -23045,13 +22405,13 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
23045
22405
|
},
|
|
23046
22406
|
STATIC_MINING_KEY
|
|
23047
22407
|
);
|
|
23048
|
-
await this.broadcastTx((0,
|
|
22408
|
+
await this.broadcastTx((0, import_utils22.bytesToHex)(signedSplitTx.extract()));
|
|
23049
22409
|
const splitTxId = signedSplitTx.id;
|
|
23050
22410
|
for (let i = 0; i < numCoinsToCreate; i++) {
|
|
23051
22411
|
this.coins.push({
|
|
23052
22412
|
key: STATIC_FAUCET_KEY,
|
|
23053
22413
|
outpoint: {
|
|
23054
|
-
txid: (0,
|
|
22414
|
+
txid: (0, import_utils22.hexToBytes)(splitTxId),
|
|
23055
22415
|
index: i
|
|
23056
22416
|
},
|
|
23057
22417
|
txout: signedSplitTx.getOutput(i)
|
|
@@ -23059,7 +22419,7 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
23059
22419
|
}
|
|
23060
22420
|
}
|
|
23061
22421
|
async sendFaucetCoinToP2WPKHAddress(pubKey) {
|
|
23062
|
-
const sendToPubKeyTx = new
|
|
22422
|
+
const sendToPubKeyTx = new import_btc_signer5.Transaction();
|
|
23063
22423
|
const p2wpkhAddress = btc5.p2wpkh(pubKey, getNetwork(4 /* LOCAL */)).address;
|
|
23064
22424
|
if (!p2wpkhAddress) {
|
|
23065
22425
|
throw new Error("Invalid P2WPKH address");
|
|
@@ -23079,7 +22439,7 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
23079
22439
|
coinToSend.txout,
|
|
23080
22440
|
coinToSend.key
|
|
23081
22441
|
);
|
|
23082
|
-
await this.broadcastTx((0,
|
|
22442
|
+
await this.broadcastTx((0, import_utils22.bytesToHex)(signedTx.extract()));
|
|
23083
22443
|
}
|
|
23084
22444
|
async signFaucetCoin(unsignedTx, fundingTxOut, key) {
|
|
23085
22445
|
const pubKey = import_secp256k114.secp256k1.getPublicKey(key);
|
|
@@ -23095,11 +22455,11 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
23095
22455
|
const sighash = unsignedTx.preimageWitnessV1(
|
|
23096
22456
|
0,
|
|
23097
22457
|
new Array(unsignedTx.inputsLength).fill(script),
|
|
23098
|
-
|
|
22458
|
+
import_btc_signer5.SigHash.DEFAULT,
|
|
23099
22459
|
new Array(unsignedTx.inputsLength).fill(fundingTxOut.amount)
|
|
23100
22460
|
);
|
|
23101
22461
|
const merkleRoot = new Uint8Array();
|
|
23102
|
-
const tweakedKey = (0,
|
|
22462
|
+
const tweakedKey = (0, import_utils23.taprootTweakPrivKey)(key, merkleRoot);
|
|
23103
22463
|
if (!tweakedKey)
|
|
23104
22464
|
throw new Error("Invalid private key for taproot tweaking");
|
|
23105
22465
|
const signature = import_secp256k114.schnorr.sign(sighash, tweakedKey);
|
|
@@ -23174,13 +22534,13 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
23174
22534
|
if (!coin) {
|
|
23175
22535
|
throw new Error("No coins available");
|
|
23176
22536
|
}
|
|
23177
|
-
const tx = new
|
|
22537
|
+
const tx = new import_btc_signer5.Transaction();
|
|
23178
22538
|
tx.addInput(coin.outpoint);
|
|
23179
22539
|
const availableAmount = COIN_AMOUNT - FEE_AMOUNT;
|
|
23180
|
-
const destinationAddress = (0,
|
|
22540
|
+
const destinationAddress = (0, import_btc_signer5.Address)(getNetwork(4 /* LOCAL */)).decode(
|
|
23181
22541
|
address2
|
|
23182
22542
|
);
|
|
23183
|
-
const destinationScript =
|
|
22543
|
+
const destinationScript = import_btc_signer5.OutScript.encode(destinationAddress);
|
|
23184
22544
|
tx.addOutput({
|
|
23185
22545
|
script: destinationScript,
|
|
23186
22546
|
amount
|
|
@@ -23199,7 +22559,7 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
23199
22559
|
});
|
|
23200
22560
|
}
|
|
23201
22561
|
const signedTx = await this.signFaucetCoin(tx, coin.txout, coin.key);
|
|
23202
|
-
const txHex = (0,
|
|
22562
|
+
const txHex = (0, import_utils22.bytesToHex)(signedTx.extract());
|
|
23203
22563
|
await this.broadcastTx(txHex);
|
|
23204
22564
|
const randomKey = import_secp256k114.secp256k1.utils.randomPrivateKey();
|
|
23205
22565
|
const randomPubKey = import_secp256k114.secp256k1.getPublicKey(randomKey);
|
|
@@ -23218,6 +22578,9 @@ var BitcoinFaucet = class _BitcoinFaucet {
|
|
|
23218
22578
|
// src/utils/chunkArray.ts
|
|
23219
22579
|
init_buffer();
|
|
23220
22580
|
|
|
22581
|
+
// src/utils/retry.ts
|
|
22582
|
+
init_buffer();
|
|
22583
|
+
|
|
23221
22584
|
// src/spark-wallet/spark-wallet.browser.ts
|
|
23222
22585
|
var import_sdk_trace_web = require("@opentelemetry/sdk-trace-web");
|
|
23223
22586
|
var import_instrumentation = require("@opentelemetry/instrumentation");
|
|
@@ -23267,12 +22630,12 @@ async function createDeposit(wallet, leafId, faucet, amountSats = 100000n, inclu
|
|
|
23267
22630
|
params: { signingPubkey: pubKey, leafId }
|
|
23268
22631
|
});
|
|
23269
22632
|
}
|
|
23270
|
-
const depositTx = new
|
|
22633
|
+
const depositTx = new import_btc_signer7.Transaction();
|
|
23271
22634
|
depositTx.addInput(faucetCoin.outpoint);
|
|
23272
|
-
const addr = (0,
|
|
22635
|
+
const addr = (0, import_btc_signer7.Address)(getNetwork(4 /* LOCAL */)).decode(
|
|
23273
22636
|
depositResp.depositAddress.address
|
|
23274
22637
|
);
|
|
23275
|
-
const script =
|
|
22638
|
+
const script = import_btc_signer7.OutScript.encode(addr);
|
|
23276
22639
|
depositTx.addOutput({ script, amount: amountSats });
|
|
23277
22640
|
let treeResp;
|
|
23278
22641
|
if (includeDirectTx) {
|