@buildonspark/spark-sdk 0.1.43 → 0.1.44
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 +7 -0
- package/dist/{RequestLightningSendInput-Na1mHdWg.d.cts → RequestLightningSendInput-BxbCtwpV.d.cts} +43 -4
- package/dist/{RequestLightningSendInput-D7fZdT4A.d.ts → RequestLightningSendInput-RGel43ks.d.ts} +43 -4
- package/dist/address/index.d.cts +2 -2
- package/dist/address/index.d.ts +2 -2
- package/dist/address/index.js +2 -2
- package/dist/{chunk-M6A4KFIG.js → chunk-4Q2ZDYYU.js} +332 -221
- package/dist/{chunk-WWOTVNPP.js → chunk-A2ZLMH6I.js} +323 -142
- package/dist/{chunk-VA7MV4MZ.js → chunk-B3AMIGJG.js} +1 -1
- package/dist/{chunk-DQYKQJRZ.js → chunk-CIZNCBKE.js} +29 -9
- package/dist/{chunk-BUTZWYBW.js → chunk-DAXGVPVM.js} +2 -2
- package/dist/{chunk-DOA6QXYQ.js → chunk-EKFD62HN.js} +2 -1
- package/dist/{chunk-TIUBYNN5.js → chunk-HTMXTJRK.js} +1 -1
- package/dist/{chunk-TOSP3INR.js → chunk-I54FARY2.js} +4 -2
- package/dist/{chunk-MIVX3GHD.js → chunk-K4BJARWM.js} +1 -1
- package/dist/{chunk-O4RYNJNB.js → chunk-KEKGSH7B.js} +1 -1
- package/dist/{chunk-GYQR4B4P.js → chunk-NBCNYDWJ.js} +2 -2
- package/dist/{chunk-ABZA6R5S.js → chunk-SQKXGAIR.js} +1 -1
- package/dist/{chunk-VFJQNBFX.js → chunk-UBT6EDVJ.js} +5 -2
- package/dist/{chunk-HRQRRDSS.js → chunk-WPTRVD2V.js} +3 -3
- package/dist/{chunk-IRW5TWMH.js → chunk-XX4RRWOX.js} +5 -5
- package/dist/graphql/objects/index.d.cts +5 -43
- package/dist/graphql/objects/index.d.ts +5 -43
- package/dist/graphql/objects/index.js +1 -1
- package/dist/{index-BJOc8Ur-.d.cts → index-CZmDdSts.d.cts} +24 -10
- package/dist/{index-7RYRH5wc.d.ts → index-ClIRO_3y.d.ts} +24 -10
- package/dist/index.cjs +827 -414
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +15 -15
- package/dist/index.node.cjs +830 -417
- package/dist/index.node.d.cts +7 -7
- package/dist/index.node.d.ts +7 -7
- package/dist/index.node.js +18 -18
- package/dist/native/index.cjs +827 -414
- package/dist/native/index.d.cts +88 -23
- package/dist/native/index.d.ts +88 -23
- package/dist/native/index.js +819 -407
- package/dist/{network-D5lKssVl.d.cts → network-CfxLnaot.d.cts} +1 -1
- package/dist/{network-xkBSpaTn.d.ts → network-CroCOQ0B.d.ts} +1 -1
- package/dist/proto/lrc20.d.cts +1 -1
- package/dist/proto/lrc20.d.ts +1 -1
- package/dist/proto/lrc20.js +2 -2
- package/dist/proto/spark.cjs +332 -221
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark.js +3 -5
- package/dist/proto/spark_token.cjs +149 -9
- package/dist/proto/spark_token.d.cts +1 -1
- package/dist/proto/spark_token.d.ts +1 -1
- package/dist/proto/spark_token.js +2 -2
- package/dist/{sdk-types-B-q9py_P.d.cts → sdk-types-BeCBoozO.d.cts} +1 -1
- package/dist/{sdk-types-BPoPgzda.d.ts → sdk-types-CTbTdDbE.d.ts} +1 -1
- package/dist/services/config.cjs +7 -3
- package/dist/services/config.d.cts +4 -4
- package/dist/services/config.d.ts +4 -4
- package/dist/services/config.js +5 -5
- package/dist/services/connection.cjs +334 -218
- package/dist/services/connection.d.cts +4 -4
- package/dist/services/connection.d.ts +4 -4
- package/dist/services/connection.js +4 -4
- package/dist/services/index.cjs +364 -227
- package/dist/services/index.d.cts +4 -4
- package/dist/services/index.d.ts +4 -4
- package/dist/services/index.js +9 -9
- package/dist/services/lrc-connection.cjs +5 -2
- package/dist/services/lrc-connection.d.cts +4 -4
- package/dist/services/lrc-connection.d.ts +4 -4
- package/dist/services/lrc-connection.js +4 -4
- package/dist/services/token-transactions.cjs +28 -8
- package/dist/services/token-transactions.d.cts +4 -4
- package/dist/services/token-transactions.d.ts +4 -4
- package/dist/services/token-transactions.js +3 -3
- package/dist/services/wallet-config.cjs +2 -1
- package/dist/services/wallet-config.d.cts +4 -4
- package/dist/services/wallet-config.d.ts +4 -4
- package/dist/services/wallet-config.js +1 -1
- package/dist/signer/signer.cjs +5 -2
- package/dist/signer/signer.d.cts +2 -2
- package/dist/signer/signer.d.ts +2 -2
- package/dist/signer/signer.js +2 -2
- package/dist/{signer-wqesWifN.d.ts → signer-D7vfYik9.d.ts} +1 -1
- package/dist/{signer-IO3oMRNj.d.cts → signer-DaY8c60s.d.cts} +1 -1
- package/dist/{spark-CDm4gqS6.d.ts → spark-C4ZrsgjC.d.cts} +47 -29
- package/dist/{spark-CDm4gqS6.d.cts → spark-C4ZrsgjC.d.ts} +47 -29
- package/dist/types/index.cjs +331 -219
- package/dist/types/index.d.cts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +3 -3
- package/dist/utils/index.cjs +298 -28
- package/dist/utils/index.d.cts +5 -5
- package/dist/utils/index.d.ts +5 -5
- package/dist/utils/index.js +6 -6
- package/package.json +1 -1
- package/src/constants.ts +5 -1
- package/src/graphql/client.ts +28 -0
- package/src/graphql/mutations/RequestCoopExit.ts +6 -0
- package/src/graphql/mutations/RequestSwapLeaves.ts +2 -0
- package/src/graphql/queries/GetCoopExitFeeQuote.ts +20 -0
- package/src/proto/spark.ts +454 -322
- package/src/services/token-transactions.ts +12 -0
- package/src/services/transfer.ts +0 -3
- package/src/services/wallet-config.ts +1 -0
- package/src/spark-wallet/spark-wallet.node.ts +3 -3
- package/src/spark-wallet/spark-wallet.ts +301 -125
- package/src/tests/integration/deposit.test.ts +16 -0
- package/src/tests/integration/ssp/coop-exit.test.ts +85 -21
- package/src/tests/integration/ssp/swap.test.ts +47 -0
- package/src/tests/tokens.test.ts +3 -2
- package/src/utils/token-hashing.ts +28 -10
- package/src/utils/transaction.ts +2 -2
- package/src/logger.ts +0 -3
package/dist/types/index.cjs
CHANGED
|
@@ -1874,8 +1874,6 @@ __export(spark_exports, {
|
|
|
1874
1874
|
Address: () => Address,
|
|
1875
1875
|
AddressNode: () => AddressNode,
|
|
1876
1876
|
AddressRequestNode: () => AddressRequestNode,
|
|
1877
|
-
AggregateNodesRequest: () => AggregateNodesRequest,
|
|
1878
|
-
AggregateNodesResponse: () => AggregateNodesResponse,
|
|
1879
1877
|
BitcoinTransactionOutput: () => BitcoinTransactionOutput,
|
|
1880
1878
|
CancelTransferRequest: () => CancelTransferRequest,
|
|
1881
1879
|
CancelTransferResponse: () => CancelTransferResponse,
|
|
@@ -1985,6 +1983,7 @@ __export(spark_exports, {
|
|
|
1985
1983
|
SigningCommitments_SigningCommitmentsEntry: () => SigningCommitments_SigningCommitmentsEntry,
|
|
1986
1984
|
SigningJob: () => SigningJob,
|
|
1987
1985
|
SigningKeyshare: () => SigningKeyshare,
|
|
1986
|
+
SigningKeyshare_PublicSharesEntry: () => SigningKeyshare_PublicSharesEntry,
|
|
1988
1987
|
SigningOperatorInfo: () => SigningOperatorInfo,
|
|
1989
1988
|
SigningResult: () => SigningResult2,
|
|
1990
1989
|
SigningResult_PublicKeysEntry: () => SigningResult_PublicKeysEntry,
|
|
@@ -2285,7 +2284,7 @@ var TransferStatus = /* @__PURE__ */ ((TransferStatus2) => {
|
|
|
2285
2284
|
TransferStatus2[TransferStatus2["TRANSFER_STATUS_SENDER_KEY_TWEAK_PENDING"] = 1] = "TRANSFER_STATUS_SENDER_KEY_TWEAK_PENDING";
|
|
2286
2285
|
TransferStatus2[TransferStatus2["TRANSFER_STATUS_SENDER_KEY_TWEAKED"] = 2] = "TRANSFER_STATUS_SENDER_KEY_TWEAKED";
|
|
2287
2286
|
TransferStatus2[TransferStatus2["TRANSFER_STATUS_RECEIVER_KEY_TWEAKED"] = 3] = "TRANSFER_STATUS_RECEIVER_KEY_TWEAKED";
|
|
2288
|
-
TransferStatus2[TransferStatus2["
|
|
2287
|
+
TransferStatus2[TransferStatus2["TRANSFER_STATUS_RECEIVER_REFUND_SIGNED"] = 4] = "TRANSFER_STATUS_RECEIVER_REFUND_SIGNED";
|
|
2289
2288
|
TransferStatus2[TransferStatus2["TRANSFER_STATUS_COMPLETED"] = 5] = "TRANSFER_STATUS_COMPLETED";
|
|
2290
2289
|
TransferStatus2[TransferStatus2["TRANSFER_STATUS_EXPIRED"] = 6] = "TRANSFER_STATUS_EXPIRED";
|
|
2291
2290
|
TransferStatus2[TransferStatus2["TRANSFER_STATUS_RETURNED"] = 7] = "TRANSFER_STATUS_RETURNED";
|
|
@@ -2310,8 +2309,8 @@ function transferStatusFromJSON(object) {
|
|
|
2310
2309
|
case "TRANSFER_STATUS_RECEIVER_KEY_TWEAKED":
|
|
2311
2310
|
return 3 /* TRANSFER_STATUS_RECEIVER_KEY_TWEAKED */;
|
|
2312
2311
|
case 4:
|
|
2313
|
-
case "
|
|
2314
|
-
return 4 /*
|
|
2312
|
+
case "TRANSFER_STATUS_RECEIVER_REFUND_SIGNED":
|
|
2313
|
+
return 4 /* TRANSFER_STATUS_RECEIVER_REFUND_SIGNED */;
|
|
2315
2314
|
case 5:
|
|
2316
2315
|
case "TRANSFER_STATUS_COMPLETED":
|
|
2317
2316
|
return 5 /* TRANSFER_STATUS_COMPLETED */;
|
|
@@ -2346,8 +2345,8 @@ function transferStatusToJSON(object) {
|
|
|
2346
2345
|
return "TRANSFER_STATUS_SENDER_KEY_TWEAKED";
|
|
2347
2346
|
case 3 /* TRANSFER_STATUS_RECEIVER_KEY_TWEAKED */:
|
|
2348
2347
|
return "TRANSFER_STATUS_RECEIVER_KEY_TWEAKED";
|
|
2349
|
-
case 4 /*
|
|
2350
|
-
return "
|
|
2348
|
+
case 4 /* TRANSFER_STATUS_RECEIVER_REFUND_SIGNED */:
|
|
2349
|
+
return "TRANSFER_STATUS_RECEIVER_REFUND_SIGNED";
|
|
2351
2350
|
case 5 /* TRANSFER_STATUS_COMPLETED */:
|
|
2352
2351
|
return "TRANSFER_STATUS_COMPLETED";
|
|
2353
2352
|
case 6 /* TRANSFER_STATUS_EXPIRED */:
|
|
@@ -3452,7 +3451,7 @@ var SigningJob = {
|
|
|
3452
3451
|
}
|
|
3453
3452
|
};
|
|
3454
3453
|
function createBaseSigningKeyshare() {
|
|
3455
|
-
return { ownerIdentifiers: [], threshold: 0, publicKey: new Uint8Array(0) };
|
|
3454
|
+
return { ownerIdentifiers: [], threshold: 0, publicKey: new Uint8Array(0), publicShares: {}, updatedTime: void 0 };
|
|
3456
3455
|
}
|
|
3457
3456
|
var SigningKeyshare = {
|
|
3458
3457
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -3465,6 +3464,12 @@ var SigningKeyshare = {
|
|
|
3465
3464
|
if (message.publicKey.length !== 0) {
|
|
3466
3465
|
writer.uint32(26).bytes(message.publicKey);
|
|
3467
3466
|
}
|
|
3467
|
+
Object.entries(message.publicShares).forEach(([key, value]) => {
|
|
3468
|
+
SigningKeyshare_PublicSharesEntry.encode({ key, value }, writer.uint32(34).fork()).join();
|
|
3469
|
+
});
|
|
3470
|
+
if (message.updatedTime !== void 0) {
|
|
3471
|
+
Timestamp.encode(toTimestamp(message.updatedTime), writer.uint32(42).fork()).join();
|
|
3472
|
+
}
|
|
3468
3473
|
return writer;
|
|
3469
3474
|
},
|
|
3470
3475
|
decode(input, length) {
|
|
@@ -3495,6 +3500,23 @@ var SigningKeyshare = {
|
|
|
3495
3500
|
message.publicKey = reader.bytes();
|
|
3496
3501
|
continue;
|
|
3497
3502
|
}
|
|
3503
|
+
case 4: {
|
|
3504
|
+
if (tag !== 34) {
|
|
3505
|
+
break;
|
|
3506
|
+
}
|
|
3507
|
+
const entry4 = SigningKeyshare_PublicSharesEntry.decode(reader, reader.uint32());
|
|
3508
|
+
if (entry4.value !== void 0) {
|
|
3509
|
+
message.publicShares[entry4.key] = entry4.value;
|
|
3510
|
+
}
|
|
3511
|
+
continue;
|
|
3512
|
+
}
|
|
3513
|
+
case 5: {
|
|
3514
|
+
if (tag !== 42) {
|
|
3515
|
+
break;
|
|
3516
|
+
}
|
|
3517
|
+
message.updatedTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3518
|
+
continue;
|
|
3519
|
+
}
|
|
3498
3520
|
}
|
|
3499
3521
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3500
3522
|
break;
|
|
@@ -3507,7 +3529,12 @@ var SigningKeyshare = {
|
|
|
3507
3529
|
return {
|
|
3508
3530
|
ownerIdentifiers: globalThis.Array.isArray(object?.ownerIdentifiers) ? object.ownerIdentifiers.map((e) => globalThis.String(e)) : [],
|
|
3509
3531
|
threshold: isSet3(object.threshold) ? globalThis.Number(object.threshold) : 0,
|
|
3510
|
-
publicKey: isSet3(object.publicKey) ? bytesFromBase642(object.publicKey) : new Uint8Array(0)
|
|
3532
|
+
publicKey: isSet3(object.publicKey) ? bytesFromBase642(object.publicKey) : new Uint8Array(0),
|
|
3533
|
+
publicShares: isObject9(object.publicShares) ? Object.entries(object.publicShares).reduce((acc, [key, value]) => {
|
|
3534
|
+
acc[key] = bytesFromBase642(value);
|
|
3535
|
+
return acc;
|
|
3536
|
+
}, {}) : {},
|
|
3537
|
+
updatedTime: isSet3(object.updatedTime) ? fromJsonTimestamp(object.updatedTime) : void 0
|
|
3511
3538
|
};
|
|
3512
3539
|
},
|
|
3513
3540
|
toJSON(message) {
|
|
@@ -3521,6 +3548,18 @@ var SigningKeyshare = {
|
|
|
3521
3548
|
if (message.publicKey.length !== 0) {
|
|
3522
3549
|
obj.publicKey = base64FromBytes2(message.publicKey);
|
|
3523
3550
|
}
|
|
3551
|
+
if (message.publicShares) {
|
|
3552
|
+
const entries = Object.entries(message.publicShares);
|
|
3553
|
+
if (entries.length > 0) {
|
|
3554
|
+
obj.publicShares = {};
|
|
3555
|
+
entries.forEach(([k, v]) => {
|
|
3556
|
+
obj.publicShares[k] = base64FromBytes2(v);
|
|
3557
|
+
});
|
|
3558
|
+
}
|
|
3559
|
+
}
|
|
3560
|
+
if (message.updatedTime !== void 0) {
|
|
3561
|
+
obj.updatedTime = message.updatedTime.toISOString();
|
|
3562
|
+
}
|
|
3524
3563
|
return obj;
|
|
3525
3564
|
},
|
|
3526
3565
|
create(base) {
|
|
@@ -3531,6 +3570,84 @@ var SigningKeyshare = {
|
|
|
3531
3570
|
message.ownerIdentifiers = object.ownerIdentifiers?.map((e) => e) || [];
|
|
3532
3571
|
message.threshold = object.threshold ?? 0;
|
|
3533
3572
|
message.publicKey = object.publicKey ?? new Uint8Array(0);
|
|
3573
|
+
message.publicShares = Object.entries(object.publicShares ?? {}).reduce(
|
|
3574
|
+
(acc, [key, value]) => {
|
|
3575
|
+
if (value !== void 0) {
|
|
3576
|
+
acc[key] = value;
|
|
3577
|
+
}
|
|
3578
|
+
return acc;
|
|
3579
|
+
},
|
|
3580
|
+
{}
|
|
3581
|
+
);
|
|
3582
|
+
message.updatedTime = object.updatedTime ?? void 0;
|
|
3583
|
+
return message;
|
|
3584
|
+
}
|
|
3585
|
+
};
|
|
3586
|
+
function createBaseSigningKeyshare_PublicSharesEntry() {
|
|
3587
|
+
return { key: "", value: new Uint8Array(0) };
|
|
3588
|
+
}
|
|
3589
|
+
var SigningKeyshare_PublicSharesEntry = {
|
|
3590
|
+
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
3591
|
+
if (message.key !== "") {
|
|
3592
|
+
writer.uint32(10).string(message.key);
|
|
3593
|
+
}
|
|
3594
|
+
if (message.value.length !== 0) {
|
|
3595
|
+
writer.uint32(18).bytes(message.value);
|
|
3596
|
+
}
|
|
3597
|
+
return writer;
|
|
3598
|
+
},
|
|
3599
|
+
decode(input, length) {
|
|
3600
|
+
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
3601
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
3602
|
+
const message = createBaseSigningKeyshare_PublicSharesEntry();
|
|
3603
|
+
while (reader.pos < end) {
|
|
3604
|
+
const tag = reader.uint32();
|
|
3605
|
+
switch (tag >>> 3) {
|
|
3606
|
+
case 1: {
|
|
3607
|
+
if (tag !== 10) {
|
|
3608
|
+
break;
|
|
3609
|
+
}
|
|
3610
|
+
message.key = reader.string();
|
|
3611
|
+
continue;
|
|
3612
|
+
}
|
|
3613
|
+
case 2: {
|
|
3614
|
+
if (tag !== 18) {
|
|
3615
|
+
break;
|
|
3616
|
+
}
|
|
3617
|
+
message.value = reader.bytes();
|
|
3618
|
+
continue;
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3622
|
+
break;
|
|
3623
|
+
}
|
|
3624
|
+
reader.skip(tag & 7);
|
|
3625
|
+
}
|
|
3626
|
+
return message;
|
|
3627
|
+
},
|
|
3628
|
+
fromJSON(object) {
|
|
3629
|
+
return {
|
|
3630
|
+
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
3631
|
+
value: isSet3(object.value) ? bytesFromBase642(object.value) : new Uint8Array(0)
|
|
3632
|
+
};
|
|
3633
|
+
},
|
|
3634
|
+
toJSON(message) {
|
|
3635
|
+
const obj = {};
|
|
3636
|
+
if (message.key !== "") {
|
|
3637
|
+
obj.key = message.key;
|
|
3638
|
+
}
|
|
3639
|
+
if (message.value.length !== 0) {
|
|
3640
|
+
obj.value = base64FromBytes2(message.value);
|
|
3641
|
+
}
|
|
3642
|
+
return obj;
|
|
3643
|
+
},
|
|
3644
|
+
create(base) {
|
|
3645
|
+
return SigningKeyshare_PublicSharesEntry.fromPartial(base ?? {});
|
|
3646
|
+
},
|
|
3647
|
+
fromPartial(object) {
|
|
3648
|
+
const message = createBaseSigningKeyshare_PublicSharesEntry();
|
|
3649
|
+
message.key = object.key ?? "";
|
|
3650
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
3534
3651
|
return message;
|
|
3535
3652
|
}
|
|
3536
3653
|
};
|
|
@@ -5227,7 +5344,8 @@ function createBaseStartTokenTransactionRequest() {
|
|
|
5227
5344
|
return {
|
|
5228
5345
|
identityPublicKey: new Uint8Array(0),
|
|
5229
5346
|
partialTokenTransaction: void 0,
|
|
5230
|
-
tokenTransactionSignatures: void 0
|
|
5347
|
+
tokenTransactionSignatures: void 0,
|
|
5348
|
+
sparkPaymentIntent: ""
|
|
5231
5349
|
};
|
|
5232
5350
|
}
|
|
5233
5351
|
var StartTokenTransactionRequest = {
|
|
@@ -5241,6 +5359,9 @@ var StartTokenTransactionRequest = {
|
|
|
5241
5359
|
if (message.tokenTransactionSignatures !== void 0) {
|
|
5242
5360
|
TokenTransactionSignatures.encode(message.tokenTransactionSignatures, writer.uint32(26).fork()).join();
|
|
5243
5361
|
}
|
|
5362
|
+
if (message.sparkPaymentIntent !== "") {
|
|
5363
|
+
writer.uint32(34).string(message.sparkPaymentIntent);
|
|
5364
|
+
}
|
|
5244
5365
|
return writer;
|
|
5245
5366
|
},
|
|
5246
5367
|
decode(input, length) {
|
|
@@ -5271,6 +5392,13 @@ var StartTokenTransactionRequest = {
|
|
|
5271
5392
|
message.tokenTransactionSignatures = TokenTransactionSignatures.decode(reader, reader.uint32());
|
|
5272
5393
|
continue;
|
|
5273
5394
|
}
|
|
5395
|
+
case 4: {
|
|
5396
|
+
if (tag !== 34) {
|
|
5397
|
+
break;
|
|
5398
|
+
}
|
|
5399
|
+
message.sparkPaymentIntent = reader.string();
|
|
5400
|
+
continue;
|
|
5401
|
+
}
|
|
5274
5402
|
}
|
|
5275
5403
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5276
5404
|
break;
|
|
@@ -5283,7 +5411,8 @@ var StartTokenTransactionRequest = {
|
|
|
5283
5411
|
return {
|
|
5284
5412
|
identityPublicKey: isSet3(object.identityPublicKey) ? bytesFromBase642(object.identityPublicKey) : new Uint8Array(0),
|
|
5285
5413
|
partialTokenTransaction: isSet3(object.partialTokenTransaction) ? TokenTransaction.fromJSON(object.partialTokenTransaction) : void 0,
|
|
5286
|
-
tokenTransactionSignatures: isSet3(object.tokenTransactionSignatures) ? TokenTransactionSignatures.fromJSON(object.tokenTransactionSignatures) : void 0
|
|
5414
|
+
tokenTransactionSignatures: isSet3(object.tokenTransactionSignatures) ? TokenTransactionSignatures.fromJSON(object.tokenTransactionSignatures) : void 0,
|
|
5415
|
+
sparkPaymentIntent: isSet3(object.sparkPaymentIntent) ? globalThis.String(object.sparkPaymentIntent) : ""
|
|
5287
5416
|
};
|
|
5288
5417
|
},
|
|
5289
5418
|
toJSON(message) {
|
|
@@ -5297,6 +5426,9 @@ var StartTokenTransactionRequest = {
|
|
|
5297
5426
|
if (message.tokenTransactionSignatures !== void 0) {
|
|
5298
5427
|
obj.tokenTransactionSignatures = TokenTransactionSignatures.toJSON(message.tokenTransactionSignatures);
|
|
5299
5428
|
}
|
|
5429
|
+
if (message.sparkPaymentIntent !== "") {
|
|
5430
|
+
obj.sparkPaymentIntent = message.sparkPaymentIntent;
|
|
5431
|
+
}
|
|
5300
5432
|
return obj;
|
|
5301
5433
|
},
|
|
5302
5434
|
create(base) {
|
|
@@ -5307,6 +5439,7 @@ var StartTokenTransactionRequest = {
|
|
|
5307
5439
|
message.identityPublicKey = object.identityPublicKey ?? new Uint8Array(0);
|
|
5308
5440
|
message.partialTokenTransaction = object.partialTokenTransaction !== void 0 && object.partialTokenTransaction !== null ? TokenTransaction.fromPartial(object.partialTokenTransaction) : void 0;
|
|
5309
5441
|
message.tokenTransactionSignatures = object.tokenTransactionSignatures !== void 0 && object.tokenTransactionSignatures !== null ? TokenTransactionSignatures.fromPartial(object.tokenTransactionSignatures) : void 0;
|
|
5442
|
+
message.sparkPaymentIntent = object.sparkPaymentIntent ?? "";
|
|
5310
5443
|
return message;
|
|
5311
5444
|
}
|
|
5312
5445
|
};
|
|
@@ -5804,7 +5937,12 @@ var RevocationSecretWithIndex = {
|
|
|
5804
5937
|
}
|
|
5805
5938
|
};
|
|
5806
5939
|
function createBaseFinalizeTokenTransactionRequest() {
|
|
5807
|
-
return {
|
|
5940
|
+
return {
|
|
5941
|
+
finalTokenTransaction: void 0,
|
|
5942
|
+
revocationSecrets: [],
|
|
5943
|
+
identityPublicKey: new Uint8Array(0),
|
|
5944
|
+
sparkPaymentIntent: ""
|
|
5945
|
+
};
|
|
5808
5946
|
}
|
|
5809
5947
|
var FinalizeTokenTransactionRequest = {
|
|
5810
5948
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -5817,6 +5955,9 @@ var FinalizeTokenTransactionRequest = {
|
|
|
5817
5955
|
if (message.identityPublicKey.length !== 0) {
|
|
5818
5956
|
writer.uint32(26).bytes(message.identityPublicKey);
|
|
5819
5957
|
}
|
|
5958
|
+
if (message.sparkPaymentIntent !== "") {
|
|
5959
|
+
writer.uint32(34).string(message.sparkPaymentIntent);
|
|
5960
|
+
}
|
|
5820
5961
|
return writer;
|
|
5821
5962
|
},
|
|
5822
5963
|
decode(input, length) {
|
|
@@ -5847,6 +5988,13 @@ var FinalizeTokenTransactionRequest = {
|
|
|
5847
5988
|
message.identityPublicKey = reader.bytes();
|
|
5848
5989
|
continue;
|
|
5849
5990
|
}
|
|
5991
|
+
case 4: {
|
|
5992
|
+
if (tag !== 34) {
|
|
5993
|
+
break;
|
|
5994
|
+
}
|
|
5995
|
+
message.sparkPaymentIntent = reader.string();
|
|
5996
|
+
continue;
|
|
5997
|
+
}
|
|
5850
5998
|
}
|
|
5851
5999
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5852
6000
|
break;
|
|
@@ -5859,7 +6007,8 @@ var FinalizeTokenTransactionRequest = {
|
|
|
5859
6007
|
return {
|
|
5860
6008
|
finalTokenTransaction: isSet3(object.finalTokenTransaction) ? TokenTransaction.fromJSON(object.finalTokenTransaction) : void 0,
|
|
5861
6009
|
revocationSecrets: globalThis.Array.isArray(object?.revocationSecrets) ? object.revocationSecrets.map((e) => RevocationSecretWithIndex.fromJSON(e)) : [],
|
|
5862
|
-
identityPublicKey: isSet3(object.identityPublicKey) ? bytesFromBase642(object.identityPublicKey) : new Uint8Array(0)
|
|
6010
|
+
identityPublicKey: isSet3(object.identityPublicKey) ? bytesFromBase642(object.identityPublicKey) : new Uint8Array(0),
|
|
6011
|
+
sparkPaymentIntent: isSet3(object.sparkPaymentIntent) ? globalThis.String(object.sparkPaymentIntent) : ""
|
|
5863
6012
|
};
|
|
5864
6013
|
},
|
|
5865
6014
|
toJSON(message) {
|
|
@@ -5873,6 +6022,9 @@ var FinalizeTokenTransactionRequest = {
|
|
|
5873
6022
|
if (message.identityPublicKey.length !== 0) {
|
|
5874
6023
|
obj.identityPublicKey = base64FromBytes2(message.identityPublicKey);
|
|
5875
6024
|
}
|
|
6025
|
+
if (message.sparkPaymentIntent !== "") {
|
|
6026
|
+
obj.sparkPaymentIntent = message.sparkPaymentIntent;
|
|
6027
|
+
}
|
|
5876
6028
|
return obj;
|
|
5877
6029
|
},
|
|
5878
6030
|
create(base) {
|
|
@@ -5883,6 +6035,7 @@ var FinalizeTokenTransactionRequest = {
|
|
|
5883
6035
|
message.finalTokenTransaction = object.finalTokenTransaction !== void 0 && object.finalTokenTransaction !== null ? TokenTransaction.fromPartial(object.finalTokenTransaction) : void 0;
|
|
5884
6036
|
message.revocationSecrets = object.revocationSecrets?.map((e) => RevocationSecretWithIndex.fromPartial(e)) || [];
|
|
5885
6037
|
message.identityPublicKey = object.identityPublicKey ?? new Uint8Array(0);
|
|
6038
|
+
message.sparkPaymentIntent = object.sparkPaymentIntent ?? "";
|
|
5886
6039
|
return message;
|
|
5887
6040
|
}
|
|
5888
6041
|
};
|
|
@@ -6575,7 +6728,10 @@ function createBaseTreeNode() {
|
|
|
6575
6728
|
ownerIdentityPublicKey: new Uint8Array(0),
|
|
6576
6729
|
signingKeyshare: void 0,
|
|
6577
6730
|
status: "",
|
|
6578
|
-
network: 0
|
|
6731
|
+
network: 0,
|
|
6732
|
+
createdTime: void 0,
|
|
6733
|
+
updatedTime: void 0,
|
|
6734
|
+
ownerSigningPublicKey: new Uint8Array(0)
|
|
6579
6735
|
};
|
|
6580
6736
|
}
|
|
6581
6737
|
var TreeNode = {
|
|
@@ -6616,6 +6772,15 @@ var TreeNode = {
|
|
|
6616
6772
|
if (message.network !== 0) {
|
|
6617
6773
|
writer.uint32(96).int32(message.network);
|
|
6618
6774
|
}
|
|
6775
|
+
if (message.createdTime !== void 0) {
|
|
6776
|
+
Timestamp.encode(toTimestamp(message.createdTime), writer.uint32(106).fork()).join();
|
|
6777
|
+
}
|
|
6778
|
+
if (message.updatedTime !== void 0) {
|
|
6779
|
+
Timestamp.encode(toTimestamp(message.updatedTime), writer.uint32(114).fork()).join();
|
|
6780
|
+
}
|
|
6781
|
+
if (message.ownerSigningPublicKey.length !== 0) {
|
|
6782
|
+
writer.uint32(122).bytes(message.ownerSigningPublicKey);
|
|
6783
|
+
}
|
|
6619
6784
|
return writer;
|
|
6620
6785
|
},
|
|
6621
6786
|
decode(input, length) {
|
|
@@ -6709,6 +6874,27 @@ var TreeNode = {
|
|
|
6709
6874
|
message.network = reader.int32();
|
|
6710
6875
|
continue;
|
|
6711
6876
|
}
|
|
6877
|
+
case 13: {
|
|
6878
|
+
if (tag !== 106) {
|
|
6879
|
+
break;
|
|
6880
|
+
}
|
|
6881
|
+
message.createdTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6882
|
+
continue;
|
|
6883
|
+
}
|
|
6884
|
+
case 14: {
|
|
6885
|
+
if (tag !== 114) {
|
|
6886
|
+
break;
|
|
6887
|
+
}
|
|
6888
|
+
message.updatedTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6889
|
+
continue;
|
|
6890
|
+
}
|
|
6891
|
+
case 15: {
|
|
6892
|
+
if (tag !== 122) {
|
|
6893
|
+
break;
|
|
6894
|
+
}
|
|
6895
|
+
message.ownerSigningPublicKey = reader.bytes();
|
|
6896
|
+
continue;
|
|
6897
|
+
}
|
|
6712
6898
|
}
|
|
6713
6899
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6714
6900
|
break;
|
|
@@ -6730,7 +6916,10 @@ var TreeNode = {
|
|
|
6730
6916
|
ownerIdentityPublicKey: isSet3(object.ownerIdentityPublicKey) ? bytesFromBase642(object.ownerIdentityPublicKey) : new Uint8Array(0),
|
|
6731
6917
|
signingKeyshare: isSet3(object.signingKeyshare) ? SigningKeyshare.fromJSON(object.signingKeyshare) : void 0,
|
|
6732
6918
|
status: isSet3(object.status) ? globalThis.String(object.status) : "",
|
|
6733
|
-
network: isSet3(object.network) ? networkFromJSON(object.network) : 0
|
|
6919
|
+
network: isSet3(object.network) ? networkFromJSON(object.network) : 0,
|
|
6920
|
+
createdTime: isSet3(object.createdTime) ? fromJsonTimestamp(object.createdTime) : void 0,
|
|
6921
|
+
updatedTime: isSet3(object.updatedTime) ? fromJsonTimestamp(object.updatedTime) : void 0,
|
|
6922
|
+
ownerSigningPublicKey: isSet3(object.ownerSigningPublicKey) ? bytesFromBase642(object.ownerSigningPublicKey) : new Uint8Array(0)
|
|
6734
6923
|
};
|
|
6735
6924
|
},
|
|
6736
6925
|
toJSON(message) {
|
|
@@ -6771,6 +6960,15 @@ var TreeNode = {
|
|
|
6771
6960
|
if (message.network !== 0) {
|
|
6772
6961
|
obj.network = networkToJSON(message.network);
|
|
6773
6962
|
}
|
|
6963
|
+
if (message.createdTime !== void 0) {
|
|
6964
|
+
obj.createdTime = message.createdTime.toISOString();
|
|
6965
|
+
}
|
|
6966
|
+
if (message.updatedTime !== void 0) {
|
|
6967
|
+
obj.updatedTime = message.updatedTime.toISOString();
|
|
6968
|
+
}
|
|
6969
|
+
if (message.ownerSigningPublicKey.length !== 0) {
|
|
6970
|
+
obj.ownerSigningPublicKey = base64FromBytes2(message.ownerSigningPublicKey);
|
|
6971
|
+
}
|
|
6774
6972
|
return obj;
|
|
6775
6973
|
},
|
|
6776
6974
|
create(base) {
|
|
@@ -6790,6 +6988,9 @@ var TreeNode = {
|
|
|
6790
6988
|
message.signingKeyshare = object.signingKeyshare !== void 0 && object.signingKeyshare !== null ? SigningKeyshare.fromPartial(object.signingKeyshare) : void 0;
|
|
6791
6989
|
message.status = object.status ?? "";
|
|
6792
6990
|
message.network = object.network ?? 0;
|
|
6991
|
+
message.createdTime = object.createdTime ?? void 0;
|
|
6992
|
+
message.updatedTime = object.updatedTime ?? void 0;
|
|
6993
|
+
message.ownerSigningPublicKey = object.ownerSigningPublicKey ?? new Uint8Array(0);
|
|
6793
6994
|
return message;
|
|
6794
6995
|
}
|
|
6795
6996
|
};
|
|
@@ -7445,7 +7646,8 @@ function createBaseStartTransferRequest() {
|
|
|
7445
7646
|
leavesToSend: [],
|
|
7446
7647
|
receiverIdentityPublicKey: new Uint8Array(0),
|
|
7447
7648
|
expiryTime: void 0,
|
|
7448
|
-
transferPackage: void 0
|
|
7649
|
+
transferPackage: void 0,
|
|
7650
|
+
sparkPaymentIntent: ""
|
|
7449
7651
|
};
|
|
7450
7652
|
}
|
|
7451
7653
|
var StartTransferRequest = {
|
|
@@ -7468,6 +7670,9 @@ var StartTransferRequest = {
|
|
|
7468
7670
|
if (message.transferPackage !== void 0) {
|
|
7469
7671
|
TransferPackage.encode(message.transferPackage, writer.uint32(58).fork()).join();
|
|
7470
7672
|
}
|
|
7673
|
+
if (message.sparkPaymentIntent !== "") {
|
|
7674
|
+
writer.uint32(74).string(message.sparkPaymentIntent);
|
|
7675
|
+
}
|
|
7471
7676
|
return writer;
|
|
7472
7677
|
},
|
|
7473
7678
|
decode(input, length) {
|
|
@@ -7519,6 +7724,13 @@ var StartTransferRequest = {
|
|
|
7519
7724
|
message.transferPackage = TransferPackage.decode(reader, reader.uint32());
|
|
7520
7725
|
continue;
|
|
7521
7726
|
}
|
|
7727
|
+
case 9: {
|
|
7728
|
+
if (tag !== 74) {
|
|
7729
|
+
break;
|
|
7730
|
+
}
|
|
7731
|
+
message.sparkPaymentIntent = reader.string();
|
|
7732
|
+
continue;
|
|
7733
|
+
}
|
|
7522
7734
|
}
|
|
7523
7735
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7524
7736
|
break;
|
|
@@ -7534,7 +7746,8 @@ var StartTransferRequest = {
|
|
|
7534
7746
|
leavesToSend: globalThis.Array.isArray(object?.leavesToSend) ? object.leavesToSend.map((e) => LeafRefundTxSigningJob.fromJSON(e)) : [],
|
|
7535
7747
|
receiverIdentityPublicKey: isSet3(object.receiverIdentityPublicKey) ? bytesFromBase642(object.receiverIdentityPublicKey) : new Uint8Array(0),
|
|
7536
7748
|
expiryTime: isSet3(object.expiryTime) ? fromJsonTimestamp(object.expiryTime) : void 0,
|
|
7537
|
-
transferPackage: isSet3(object.transferPackage) ? TransferPackage.fromJSON(object.transferPackage) : void 0
|
|
7749
|
+
transferPackage: isSet3(object.transferPackage) ? TransferPackage.fromJSON(object.transferPackage) : void 0,
|
|
7750
|
+
sparkPaymentIntent: isSet3(object.sparkPaymentIntent) ? globalThis.String(object.sparkPaymentIntent) : ""
|
|
7538
7751
|
};
|
|
7539
7752
|
},
|
|
7540
7753
|
toJSON(message) {
|
|
@@ -7557,6 +7770,9 @@ var StartTransferRequest = {
|
|
|
7557
7770
|
if (message.transferPackage !== void 0) {
|
|
7558
7771
|
obj.transferPackage = TransferPackage.toJSON(message.transferPackage);
|
|
7559
7772
|
}
|
|
7773
|
+
if (message.sparkPaymentIntent !== "") {
|
|
7774
|
+
obj.sparkPaymentIntent = message.sparkPaymentIntent;
|
|
7775
|
+
}
|
|
7560
7776
|
return obj;
|
|
7561
7777
|
},
|
|
7562
7778
|
create(base) {
|
|
@@ -7570,6 +7786,7 @@ var StartTransferRequest = {
|
|
|
7570
7786
|
message.receiverIdentityPublicKey = object.receiverIdentityPublicKey ?? new Uint8Array(0);
|
|
7571
7787
|
message.expiryTime = object.expiryTime ?? void 0;
|
|
7572
7788
|
message.transferPackage = object.transferPackage !== void 0 && object.transferPackage !== null ? TransferPackage.fromPartial(object.transferPackage) : void 0;
|
|
7789
|
+
message.sparkPaymentIntent = object.sparkPaymentIntent ?? "";
|
|
7573
7790
|
return message;
|
|
7574
7791
|
}
|
|
7575
7792
|
};
|
|
@@ -8089,7 +8306,7 @@ var SendLeafKeyTweak_PubkeySharesTweakEntry = {
|
|
|
8089
8306
|
}
|
|
8090
8307
|
};
|
|
8091
8308
|
function createBaseFinalizeTransferRequest() {
|
|
8092
|
-
return { transferId: "", ownerIdentityPublicKey: new Uint8Array(0), leavesToSend: [] };
|
|
8309
|
+
return { transferId: "", ownerIdentityPublicKey: new Uint8Array(0), leavesToSend: [], sparkPaymentIntent: "" };
|
|
8093
8310
|
}
|
|
8094
8311
|
var FinalizeTransferRequest = {
|
|
8095
8312
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -8102,6 +8319,9 @@ var FinalizeTransferRequest = {
|
|
|
8102
8319
|
for (const v of message.leavesToSend) {
|
|
8103
8320
|
SendLeafKeyTweak.encode(v, writer.uint32(26).fork()).join();
|
|
8104
8321
|
}
|
|
8322
|
+
if (message.sparkPaymentIntent !== "") {
|
|
8323
|
+
writer.uint32(34).string(message.sparkPaymentIntent);
|
|
8324
|
+
}
|
|
8105
8325
|
return writer;
|
|
8106
8326
|
},
|
|
8107
8327
|
decode(input, length) {
|
|
@@ -8132,6 +8352,13 @@ var FinalizeTransferRequest = {
|
|
|
8132
8352
|
message.leavesToSend.push(SendLeafKeyTweak.decode(reader, reader.uint32()));
|
|
8133
8353
|
continue;
|
|
8134
8354
|
}
|
|
8355
|
+
case 4: {
|
|
8356
|
+
if (tag !== 34) {
|
|
8357
|
+
break;
|
|
8358
|
+
}
|
|
8359
|
+
message.sparkPaymentIntent = reader.string();
|
|
8360
|
+
continue;
|
|
8361
|
+
}
|
|
8135
8362
|
}
|
|
8136
8363
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8137
8364
|
break;
|
|
@@ -8144,7 +8371,8 @@ var FinalizeTransferRequest = {
|
|
|
8144
8371
|
return {
|
|
8145
8372
|
transferId: isSet3(object.transferId) ? globalThis.String(object.transferId) : "",
|
|
8146
8373
|
ownerIdentityPublicKey: isSet3(object.ownerIdentityPublicKey) ? bytesFromBase642(object.ownerIdentityPublicKey) : new Uint8Array(0),
|
|
8147
|
-
leavesToSend: globalThis.Array.isArray(object?.leavesToSend) ? object.leavesToSend.map((e) => SendLeafKeyTweak.fromJSON(e)) : []
|
|
8374
|
+
leavesToSend: globalThis.Array.isArray(object?.leavesToSend) ? object.leavesToSend.map((e) => SendLeafKeyTweak.fromJSON(e)) : [],
|
|
8375
|
+
sparkPaymentIntent: isSet3(object.sparkPaymentIntent) ? globalThis.String(object.sparkPaymentIntent) : ""
|
|
8148
8376
|
};
|
|
8149
8377
|
},
|
|
8150
8378
|
toJSON(message) {
|
|
@@ -8158,6 +8386,9 @@ var FinalizeTransferRequest = {
|
|
|
8158
8386
|
if (message.leavesToSend?.length) {
|
|
8159
8387
|
obj.leavesToSend = message.leavesToSend.map((e) => SendLeafKeyTweak.toJSON(e));
|
|
8160
8388
|
}
|
|
8389
|
+
if (message.sparkPaymentIntent !== "") {
|
|
8390
|
+
obj.sparkPaymentIntent = message.sparkPaymentIntent;
|
|
8391
|
+
}
|
|
8161
8392
|
return obj;
|
|
8162
8393
|
},
|
|
8163
8394
|
create(base) {
|
|
@@ -8168,6 +8399,7 @@ var FinalizeTransferRequest = {
|
|
|
8168
8399
|
message.transferId = object.transferId ?? "";
|
|
8169
8400
|
message.ownerIdentityPublicKey = object.ownerIdentityPublicKey ?? new Uint8Array(0);
|
|
8170
8401
|
message.leavesToSend = object.leavesToSend?.map((e) => SendLeafKeyTweak.fromPartial(e)) || [];
|
|
8402
|
+
message.sparkPaymentIntent = object.sparkPaymentIntent ?? "";
|
|
8171
8403
|
return message;
|
|
8172
8404
|
}
|
|
8173
8405
|
};
|
|
@@ -8608,7 +8840,7 @@ var TransferLeaf = {
|
|
|
8608
8840
|
}
|
|
8609
8841
|
};
|
|
8610
8842
|
function createBaseTransferFilter() {
|
|
8611
|
-
return { participant: void 0, transferIds: [], limit: 0, offset: 0, types: [], network: 0 };
|
|
8843
|
+
return { participant: void 0, transferIds: [], limit: 0, offset: 0, types: [], network: 0, statuses: [] };
|
|
8612
8844
|
}
|
|
8613
8845
|
var TransferFilter = {
|
|
8614
8846
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -8640,6 +8872,11 @@ var TransferFilter = {
|
|
|
8640
8872
|
if (message.network !== 0) {
|
|
8641
8873
|
writer.uint32(32).int32(message.network);
|
|
8642
8874
|
}
|
|
8875
|
+
writer.uint32(642).fork();
|
|
8876
|
+
for (const v of message.statuses) {
|
|
8877
|
+
writer.int32(v);
|
|
8878
|
+
}
|
|
8879
|
+
writer.join();
|
|
8643
8880
|
return writer;
|
|
8644
8881
|
},
|
|
8645
8882
|
decode(input, length) {
|
|
@@ -8715,6 +8952,20 @@ var TransferFilter = {
|
|
|
8715
8952
|
message.network = reader.int32();
|
|
8716
8953
|
continue;
|
|
8717
8954
|
}
|
|
8955
|
+
case 80: {
|
|
8956
|
+
if (tag === 640) {
|
|
8957
|
+
message.statuses.push(reader.int32());
|
|
8958
|
+
continue;
|
|
8959
|
+
}
|
|
8960
|
+
if (tag === 642) {
|
|
8961
|
+
const end2 = reader.uint32() + reader.pos;
|
|
8962
|
+
while (reader.pos < end2) {
|
|
8963
|
+
message.statuses.push(reader.int32());
|
|
8964
|
+
}
|
|
8965
|
+
continue;
|
|
8966
|
+
}
|
|
8967
|
+
break;
|
|
8968
|
+
}
|
|
8718
8969
|
}
|
|
8719
8970
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8720
8971
|
break;
|
|
@@ -8736,7 +8987,8 @@ var TransferFilter = {
|
|
|
8736
8987
|
limit: isSet3(object.limit) ? globalThis.Number(object.limit) : 0,
|
|
8737
8988
|
offset: isSet3(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
8738
8989
|
types: globalThis.Array.isArray(object?.types) ? object.types.map((e) => transferTypeFromJSON(e)) : [],
|
|
8739
|
-
network: isSet3(object.network) ? networkFromJSON(object.network) : 0
|
|
8990
|
+
network: isSet3(object.network) ? networkFromJSON(object.network) : 0,
|
|
8991
|
+
statuses: globalThis.Array.isArray(object?.statuses) ? object.statuses.map((e) => transferStatusFromJSON(e)) : []
|
|
8740
8992
|
};
|
|
8741
8993
|
},
|
|
8742
8994
|
toJSON(message) {
|
|
@@ -8763,6 +9015,9 @@ var TransferFilter = {
|
|
|
8763
9015
|
if (message.network !== 0) {
|
|
8764
9016
|
obj.network = networkToJSON(message.network);
|
|
8765
9017
|
}
|
|
9018
|
+
if (message.statuses?.length) {
|
|
9019
|
+
obj.statuses = message.statuses.map((e) => transferStatusToJSON(e));
|
|
9020
|
+
}
|
|
8766
9021
|
return obj;
|
|
8767
9022
|
},
|
|
8768
9023
|
create(base) {
|
|
@@ -8804,6 +9059,7 @@ var TransferFilter = {
|
|
|
8804
9059
|
message.offset = object.offset ?? 0;
|
|
8805
9060
|
message.types = object.types?.map((e) => e) || [];
|
|
8806
9061
|
message.network = object.network ?? 0;
|
|
9062
|
+
message.statuses = object.statuses?.map((e) => e) || [];
|
|
8807
9063
|
return message;
|
|
8808
9064
|
}
|
|
8809
9065
|
};
|
|
@@ -9265,192 +9521,6 @@ var ClaimTransferSignRefundsResponse = {
|
|
|
9265
9521
|
return message;
|
|
9266
9522
|
}
|
|
9267
9523
|
};
|
|
9268
|
-
function createBaseAggregateNodesRequest() {
|
|
9269
|
-
return { nodeIds: [], signingJob: void 0, ownerIdentityPublicKey: new Uint8Array(0) };
|
|
9270
|
-
}
|
|
9271
|
-
var AggregateNodesRequest = {
|
|
9272
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
9273
|
-
for (const v of message.nodeIds) {
|
|
9274
|
-
writer.uint32(10).string(v);
|
|
9275
|
-
}
|
|
9276
|
-
if (message.signingJob !== void 0) {
|
|
9277
|
-
SigningJob.encode(message.signingJob, writer.uint32(18).fork()).join();
|
|
9278
|
-
}
|
|
9279
|
-
if (message.ownerIdentityPublicKey.length !== 0) {
|
|
9280
|
-
writer.uint32(26).bytes(message.ownerIdentityPublicKey);
|
|
9281
|
-
}
|
|
9282
|
-
return writer;
|
|
9283
|
-
},
|
|
9284
|
-
decode(input, length) {
|
|
9285
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
9286
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
9287
|
-
const message = createBaseAggregateNodesRequest();
|
|
9288
|
-
while (reader.pos < end) {
|
|
9289
|
-
const tag = reader.uint32();
|
|
9290
|
-
switch (tag >>> 3) {
|
|
9291
|
-
case 1: {
|
|
9292
|
-
if (tag !== 10) {
|
|
9293
|
-
break;
|
|
9294
|
-
}
|
|
9295
|
-
message.nodeIds.push(reader.string());
|
|
9296
|
-
continue;
|
|
9297
|
-
}
|
|
9298
|
-
case 2: {
|
|
9299
|
-
if (tag !== 18) {
|
|
9300
|
-
break;
|
|
9301
|
-
}
|
|
9302
|
-
message.signingJob = SigningJob.decode(reader, reader.uint32());
|
|
9303
|
-
continue;
|
|
9304
|
-
}
|
|
9305
|
-
case 3: {
|
|
9306
|
-
if (tag !== 26) {
|
|
9307
|
-
break;
|
|
9308
|
-
}
|
|
9309
|
-
message.ownerIdentityPublicKey = reader.bytes();
|
|
9310
|
-
continue;
|
|
9311
|
-
}
|
|
9312
|
-
}
|
|
9313
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
9314
|
-
break;
|
|
9315
|
-
}
|
|
9316
|
-
reader.skip(tag & 7);
|
|
9317
|
-
}
|
|
9318
|
-
return message;
|
|
9319
|
-
},
|
|
9320
|
-
fromJSON(object) {
|
|
9321
|
-
return {
|
|
9322
|
-
nodeIds: globalThis.Array.isArray(object?.nodeIds) ? object.nodeIds.map((e) => globalThis.String(e)) : [],
|
|
9323
|
-
signingJob: isSet3(object.signingJob) ? SigningJob.fromJSON(object.signingJob) : void 0,
|
|
9324
|
-
ownerIdentityPublicKey: isSet3(object.ownerIdentityPublicKey) ? bytesFromBase642(object.ownerIdentityPublicKey) : new Uint8Array(0)
|
|
9325
|
-
};
|
|
9326
|
-
},
|
|
9327
|
-
toJSON(message) {
|
|
9328
|
-
const obj = {};
|
|
9329
|
-
if (message.nodeIds?.length) {
|
|
9330
|
-
obj.nodeIds = message.nodeIds;
|
|
9331
|
-
}
|
|
9332
|
-
if (message.signingJob !== void 0) {
|
|
9333
|
-
obj.signingJob = SigningJob.toJSON(message.signingJob);
|
|
9334
|
-
}
|
|
9335
|
-
if (message.ownerIdentityPublicKey.length !== 0) {
|
|
9336
|
-
obj.ownerIdentityPublicKey = base64FromBytes2(message.ownerIdentityPublicKey);
|
|
9337
|
-
}
|
|
9338
|
-
return obj;
|
|
9339
|
-
},
|
|
9340
|
-
create(base) {
|
|
9341
|
-
return AggregateNodesRequest.fromPartial(base ?? {});
|
|
9342
|
-
},
|
|
9343
|
-
fromPartial(object) {
|
|
9344
|
-
const message = createBaseAggregateNodesRequest();
|
|
9345
|
-
message.nodeIds = object.nodeIds?.map((e) => e) || [];
|
|
9346
|
-
message.signingJob = object.signingJob !== void 0 && object.signingJob !== null ? SigningJob.fromPartial(object.signingJob) : void 0;
|
|
9347
|
-
message.ownerIdentityPublicKey = object.ownerIdentityPublicKey ?? new Uint8Array(0);
|
|
9348
|
-
return message;
|
|
9349
|
-
}
|
|
9350
|
-
};
|
|
9351
|
-
function createBaseAggregateNodesResponse() {
|
|
9352
|
-
return {
|
|
9353
|
-
aggregateSignature: void 0,
|
|
9354
|
-
verifyingKey: new Uint8Array(0),
|
|
9355
|
-
parentNodeTx: new Uint8Array(0),
|
|
9356
|
-
parentNodeVout: 0
|
|
9357
|
-
};
|
|
9358
|
-
}
|
|
9359
|
-
var AggregateNodesResponse = {
|
|
9360
|
-
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
9361
|
-
if (message.aggregateSignature !== void 0) {
|
|
9362
|
-
SigningResult2.encode(message.aggregateSignature, writer.uint32(10).fork()).join();
|
|
9363
|
-
}
|
|
9364
|
-
if (message.verifyingKey.length !== 0) {
|
|
9365
|
-
writer.uint32(18).bytes(message.verifyingKey);
|
|
9366
|
-
}
|
|
9367
|
-
if (message.parentNodeTx.length !== 0) {
|
|
9368
|
-
writer.uint32(26).bytes(message.parentNodeTx);
|
|
9369
|
-
}
|
|
9370
|
-
if (message.parentNodeVout !== 0) {
|
|
9371
|
-
writer.uint32(32).uint32(message.parentNodeVout);
|
|
9372
|
-
}
|
|
9373
|
-
return writer;
|
|
9374
|
-
},
|
|
9375
|
-
decode(input, length) {
|
|
9376
|
-
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
9377
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
9378
|
-
const message = createBaseAggregateNodesResponse();
|
|
9379
|
-
while (reader.pos < end) {
|
|
9380
|
-
const tag = reader.uint32();
|
|
9381
|
-
switch (tag >>> 3) {
|
|
9382
|
-
case 1: {
|
|
9383
|
-
if (tag !== 10) {
|
|
9384
|
-
break;
|
|
9385
|
-
}
|
|
9386
|
-
message.aggregateSignature = SigningResult2.decode(reader, reader.uint32());
|
|
9387
|
-
continue;
|
|
9388
|
-
}
|
|
9389
|
-
case 2: {
|
|
9390
|
-
if (tag !== 18) {
|
|
9391
|
-
break;
|
|
9392
|
-
}
|
|
9393
|
-
message.verifyingKey = reader.bytes();
|
|
9394
|
-
continue;
|
|
9395
|
-
}
|
|
9396
|
-
case 3: {
|
|
9397
|
-
if (tag !== 26) {
|
|
9398
|
-
break;
|
|
9399
|
-
}
|
|
9400
|
-
message.parentNodeTx = reader.bytes();
|
|
9401
|
-
continue;
|
|
9402
|
-
}
|
|
9403
|
-
case 4: {
|
|
9404
|
-
if (tag !== 32) {
|
|
9405
|
-
break;
|
|
9406
|
-
}
|
|
9407
|
-
message.parentNodeVout = reader.uint32();
|
|
9408
|
-
continue;
|
|
9409
|
-
}
|
|
9410
|
-
}
|
|
9411
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
9412
|
-
break;
|
|
9413
|
-
}
|
|
9414
|
-
reader.skip(tag & 7);
|
|
9415
|
-
}
|
|
9416
|
-
return message;
|
|
9417
|
-
},
|
|
9418
|
-
fromJSON(object) {
|
|
9419
|
-
return {
|
|
9420
|
-
aggregateSignature: isSet3(object.aggregateSignature) ? SigningResult2.fromJSON(object.aggregateSignature) : void 0,
|
|
9421
|
-
verifyingKey: isSet3(object.verifyingKey) ? bytesFromBase642(object.verifyingKey) : new Uint8Array(0),
|
|
9422
|
-
parentNodeTx: isSet3(object.parentNodeTx) ? bytesFromBase642(object.parentNodeTx) : new Uint8Array(0),
|
|
9423
|
-
parentNodeVout: isSet3(object.parentNodeVout) ? globalThis.Number(object.parentNodeVout) : 0
|
|
9424
|
-
};
|
|
9425
|
-
},
|
|
9426
|
-
toJSON(message) {
|
|
9427
|
-
const obj = {};
|
|
9428
|
-
if (message.aggregateSignature !== void 0) {
|
|
9429
|
-
obj.aggregateSignature = SigningResult2.toJSON(message.aggregateSignature);
|
|
9430
|
-
}
|
|
9431
|
-
if (message.verifyingKey.length !== 0) {
|
|
9432
|
-
obj.verifyingKey = base64FromBytes2(message.verifyingKey);
|
|
9433
|
-
}
|
|
9434
|
-
if (message.parentNodeTx.length !== 0) {
|
|
9435
|
-
obj.parentNodeTx = base64FromBytes2(message.parentNodeTx);
|
|
9436
|
-
}
|
|
9437
|
-
if (message.parentNodeVout !== 0) {
|
|
9438
|
-
obj.parentNodeVout = Math.round(message.parentNodeVout);
|
|
9439
|
-
}
|
|
9440
|
-
return obj;
|
|
9441
|
-
},
|
|
9442
|
-
create(base) {
|
|
9443
|
-
return AggregateNodesResponse.fromPartial(base ?? {});
|
|
9444
|
-
},
|
|
9445
|
-
fromPartial(object) {
|
|
9446
|
-
const message = createBaseAggregateNodesResponse();
|
|
9447
|
-
message.aggregateSignature = object.aggregateSignature !== void 0 && object.aggregateSignature !== null ? SigningResult2.fromPartial(object.aggregateSignature) : void 0;
|
|
9448
|
-
message.verifyingKey = object.verifyingKey ?? new Uint8Array(0);
|
|
9449
|
-
message.parentNodeTx = object.parentNodeTx ?? new Uint8Array(0);
|
|
9450
|
-
message.parentNodeVout = object.parentNodeVout ?? 0;
|
|
9451
|
-
return message;
|
|
9452
|
-
}
|
|
9453
|
-
};
|
|
9454
9524
|
function createBaseStorePreimageShareRequest() {
|
|
9455
9525
|
return {
|
|
9456
9526
|
paymentHash: new Uint8Array(0),
|
|
@@ -12919,7 +12989,7 @@ var CancelTransferResponse = {
|
|
|
12919
12989
|
}
|
|
12920
12990
|
};
|
|
12921
12991
|
function createBaseQueryUnusedDepositAddressesRequest() {
|
|
12922
|
-
return { identityPublicKey: new Uint8Array(0), network: 0 };
|
|
12992
|
+
return { identityPublicKey: new Uint8Array(0), network: 0, limit: 0, offset: 0 };
|
|
12923
12993
|
}
|
|
12924
12994
|
var QueryUnusedDepositAddressesRequest = {
|
|
12925
12995
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -12929,6 +12999,12 @@ var QueryUnusedDepositAddressesRequest = {
|
|
|
12929
12999
|
if (message.network !== 0) {
|
|
12930
13000
|
writer.uint32(16).int32(message.network);
|
|
12931
13001
|
}
|
|
13002
|
+
if (message.limit !== 0) {
|
|
13003
|
+
writer.uint32(24).int64(message.limit);
|
|
13004
|
+
}
|
|
13005
|
+
if (message.offset !== 0) {
|
|
13006
|
+
writer.uint32(32).int64(message.offset);
|
|
13007
|
+
}
|
|
12932
13008
|
return writer;
|
|
12933
13009
|
},
|
|
12934
13010
|
decode(input, length) {
|
|
@@ -12952,6 +13028,20 @@ var QueryUnusedDepositAddressesRequest = {
|
|
|
12952
13028
|
message.network = reader.int32();
|
|
12953
13029
|
continue;
|
|
12954
13030
|
}
|
|
13031
|
+
case 3: {
|
|
13032
|
+
if (tag !== 24) {
|
|
13033
|
+
break;
|
|
13034
|
+
}
|
|
13035
|
+
message.limit = longToNumber2(reader.int64());
|
|
13036
|
+
continue;
|
|
13037
|
+
}
|
|
13038
|
+
case 4: {
|
|
13039
|
+
if (tag !== 32) {
|
|
13040
|
+
break;
|
|
13041
|
+
}
|
|
13042
|
+
message.offset = longToNumber2(reader.int64());
|
|
13043
|
+
continue;
|
|
13044
|
+
}
|
|
12955
13045
|
}
|
|
12956
13046
|
if ((tag & 7) === 4 || tag === 0) {
|
|
12957
13047
|
break;
|
|
@@ -12963,7 +13053,9 @@ var QueryUnusedDepositAddressesRequest = {
|
|
|
12963
13053
|
fromJSON(object) {
|
|
12964
13054
|
return {
|
|
12965
13055
|
identityPublicKey: isSet3(object.identityPublicKey) ? bytesFromBase642(object.identityPublicKey) : new Uint8Array(0),
|
|
12966
|
-
network: isSet3(object.network) ? networkFromJSON(object.network) : 0
|
|
13056
|
+
network: isSet3(object.network) ? networkFromJSON(object.network) : 0,
|
|
13057
|
+
limit: isSet3(object.limit) ? globalThis.Number(object.limit) : 0,
|
|
13058
|
+
offset: isSet3(object.offset) ? globalThis.Number(object.offset) : 0
|
|
12967
13059
|
};
|
|
12968
13060
|
},
|
|
12969
13061
|
toJSON(message) {
|
|
@@ -12974,6 +13066,12 @@ var QueryUnusedDepositAddressesRequest = {
|
|
|
12974
13066
|
if (message.network !== 0) {
|
|
12975
13067
|
obj.network = networkToJSON(message.network);
|
|
12976
13068
|
}
|
|
13069
|
+
if (message.limit !== 0) {
|
|
13070
|
+
obj.limit = Math.round(message.limit);
|
|
13071
|
+
}
|
|
13072
|
+
if (message.offset !== 0) {
|
|
13073
|
+
obj.offset = Math.round(message.offset);
|
|
13074
|
+
}
|
|
12977
13075
|
return obj;
|
|
12978
13076
|
},
|
|
12979
13077
|
create(base) {
|
|
@@ -12983,6 +13081,8 @@ var QueryUnusedDepositAddressesRequest = {
|
|
|
12983
13081
|
const message = createBaseQueryUnusedDepositAddressesRequest();
|
|
12984
13082
|
message.identityPublicKey = object.identityPublicKey ?? new Uint8Array(0);
|
|
12985
13083
|
message.network = object.network ?? 0;
|
|
13084
|
+
message.limit = object.limit ?? 0;
|
|
13085
|
+
message.offset = object.offset ?? 0;
|
|
12986
13086
|
return message;
|
|
12987
13087
|
}
|
|
12988
13088
|
};
|
|
@@ -13188,13 +13288,16 @@ var DepositAddressQueryResult = {
|
|
|
13188
13288
|
}
|
|
13189
13289
|
};
|
|
13190
13290
|
function createBaseQueryUnusedDepositAddressesResponse() {
|
|
13191
|
-
return { depositAddresses: [] };
|
|
13291
|
+
return { depositAddresses: [], offset: 0 };
|
|
13192
13292
|
}
|
|
13193
13293
|
var QueryUnusedDepositAddressesResponse = {
|
|
13194
13294
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
13195
13295
|
for (const v of message.depositAddresses) {
|
|
13196
13296
|
DepositAddressQueryResult.encode(v, writer.uint32(10).fork()).join();
|
|
13197
13297
|
}
|
|
13298
|
+
if (message.offset !== 0) {
|
|
13299
|
+
writer.uint32(16).int64(message.offset);
|
|
13300
|
+
}
|
|
13198
13301
|
return writer;
|
|
13199
13302
|
},
|
|
13200
13303
|
decode(input, length) {
|
|
@@ -13211,6 +13314,13 @@ var QueryUnusedDepositAddressesResponse = {
|
|
|
13211
13314
|
message.depositAddresses.push(DepositAddressQueryResult.decode(reader, reader.uint32()));
|
|
13212
13315
|
continue;
|
|
13213
13316
|
}
|
|
13317
|
+
case 2: {
|
|
13318
|
+
if (tag !== 16) {
|
|
13319
|
+
break;
|
|
13320
|
+
}
|
|
13321
|
+
message.offset = longToNumber2(reader.int64());
|
|
13322
|
+
continue;
|
|
13323
|
+
}
|
|
13214
13324
|
}
|
|
13215
13325
|
if ((tag & 7) === 4 || tag === 0) {
|
|
13216
13326
|
break;
|
|
@@ -13221,7 +13331,8 @@ var QueryUnusedDepositAddressesResponse = {
|
|
|
13221
13331
|
},
|
|
13222
13332
|
fromJSON(object) {
|
|
13223
13333
|
return {
|
|
13224
|
-
depositAddresses: globalThis.Array.isArray(object?.depositAddresses) ? object.depositAddresses.map((e) => DepositAddressQueryResult.fromJSON(e)) : []
|
|
13334
|
+
depositAddresses: globalThis.Array.isArray(object?.depositAddresses) ? object.depositAddresses.map((e) => DepositAddressQueryResult.fromJSON(e)) : [],
|
|
13335
|
+
offset: isSet3(object.offset) ? globalThis.Number(object.offset) : 0
|
|
13225
13336
|
};
|
|
13226
13337
|
},
|
|
13227
13338
|
toJSON(message) {
|
|
@@ -13229,6 +13340,9 @@ var QueryUnusedDepositAddressesResponse = {
|
|
|
13229
13340
|
if (message.depositAddresses?.length) {
|
|
13230
13341
|
obj.depositAddresses = message.depositAddresses.map((e) => DepositAddressQueryResult.toJSON(e));
|
|
13231
13342
|
}
|
|
13343
|
+
if (message.offset !== 0) {
|
|
13344
|
+
obj.offset = Math.round(message.offset);
|
|
13345
|
+
}
|
|
13232
13346
|
return obj;
|
|
13233
13347
|
},
|
|
13234
13348
|
create(base) {
|
|
@@ -13237,6 +13351,7 @@ var QueryUnusedDepositAddressesResponse = {
|
|
|
13237
13351
|
fromPartial(object) {
|
|
13238
13352
|
const message = createBaseQueryUnusedDepositAddressesResponse();
|
|
13239
13353
|
message.depositAddresses = object.depositAddresses?.map((e) => DepositAddressQueryResult.fromPartial(e)) || [];
|
|
13354
|
+
message.offset = object.offset ?? 0;
|
|
13240
13355
|
return message;
|
|
13241
13356
|
}
|
|
13242
13357
|
};
|
|
@@ -14906,6 +15021,11 @@ var SparkServiceDefinition = {
|
|
|
14906
15021
|
responseStream: false,
|
|
14907
15022
|
options: {}
|
|
14908
15023
|
},
|
|
15024
|
+
/**
|
|
15025
|
+
* This is deprecated, please use finalize_transfer_with_transfer_package instead.
|
|
15026
|
+
*
|
|
15027
|
+
* @deprecated
|
|
15028
|
+
*/
|
|
14909
15029
|
finalize_transfer: {
|
|
14910
15030
|
name: "finalize_transfer",
|
|
14911
15031
|
requestType: FinalizeTransferRequest,
|
|
@@ -14962,14 +15082,6 @@ var SparkServiceDefinition = {
|
|
|
14962
15082
|
responseStream: false,
|
|
14963
15083
|
options: {}
|
|
14964
15084
|
},
|
|
14965
|
-
aggregate_nodes: {
|
|
14966
|
-
name: "aggregate_nodes",
|
|
14967
|
-
requestType: AggregateNodesRequest,
|
|
14968
|
-
requestStream: false,
|
|
14969
|
-
responseType: AggregateNodesResponse,
|
|
14970
|
-
responseStream: false,
|
|
14971
|
-
options: {}
|
|
14972
|
-
},
|
|
14973
15085
|
store_preimage_share: {
|
|
14974
15086
|
name: "store_preimage_share",
|
|
14975
15087
|
requestType: StorePreimageShareRequest,
|