@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/src/proto/spark.ts
CHANGED
|
@@ -133,7 +133,7 @@ export enum TransferStatus {
|
|
|
133
133
|
TRANSFER_STATUS_SENDER_KEY_TWEAK_PENDING = 1,
|
|
134
134
|
TRANSFER_STATUS_SENDER_KEY_TWEAKED = 2,
|
|
135
135
|
TRANSFER_STATUS_RECEIVER_KEY_TWEAKED = 3,
|
|
136
|
-
|
|
136
|
+
TRANSFER_STATUS_RECEIVER_REFUND_SIGNED = 4,
|
|
137
137
|
TRANSFER_STATUS_COMPLETED = 5,
|
|
138
138
|
TRANSFER_STATUS_EXPIRED = 6,
|
|
139
139
|
TRANSFER_STATUS_RETURNED = 7,
|
|
@@ -158,8 +158,8 @@ export function transferStatusFromJSON(object: any): TransferStatus {
|
|
|
158
158
|
case "TRANSFER_STATUS_RECEIVER_KEY_TWEAKED":
|
|
159
159
|
return TransferStatus.TRANSFER_STATUS_RECEIVER_KEY_TWEAKED;
|
|
160
160
|
case 4:
|
|
161
|
-
case "
|
|
162
|
-
return TransferStatus.
|
|
161
|
+
case "TRANSFER_STATUS_RECEIVER_REFUND_SIGNED":
|
|
162
|
+
return TransferStatus.TRANSFER_STATUS_RECEIVER_REFUND_SIGNED;
|
|
163
163
|
case 5:
|
|
164
164
|
case "TRANSFER_STATUS_COMPLETED":
|
|
165
165
|
return TransferStatus.TRANSFER_STATUS_COMPLETED;
|
|
@@ -195,8 +195,8 @@ export function transferStatusToJSON(object: TransferStatus): string {
|
|
|
195
195
|
return "TRANSFER_STATUS_SENDER_KEY_TWEAKED";
|
|
196
196
|
case TransferStatus.TRANSFER_STATUS_RECEIVER_KEY_TWEAKED:
|
|
197
197
|
return "TRANSFER_STATUS_RECEIVER_KEY_TWEAKED";
|
|
198
|
-
case TransferStatus.
|
|
199
|
-
return "
|
|
198
|
+
case TransferStatus.TRANSFER_STATUS_RECEIVER_REFUND_SIGNED:
|
|
199
|
+
return "TRANSFER_STATUS_RECEIVER_REFUND_SIGNED";
|
|
200
200
|
case TransferStatus.TRANSFER_STATUS_COMPLETED:
|
|
201
201
|
return "TRANSFER_STATUS_COMPLETED";
|
|
202
202
|
case TransferStatus.TRANSFER_STATUS_EXPIRED:
|
|
@@ -371,8 +371,8 @@ export interface GenerateDepositAddressRequest {
|
|
|
371
371
|
network: Network;
|
|
372
372
|
/** The UUID to use for the created TreeNode */
|
|
373
373
|
leafId?:
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
| string
|
|
375
|
+
| undefined;
|
|
376
376
|
/** Generate static deposit address */
|
|
377
377
|
isStatic?: boolean | undefined;
|
|
378
378
|
}
|
|
@@ -385,8 +385,8 @@ export interface Address {
|
|
|
385
385
|
verifyingKey: Uint8Array;
|
|
386
386
|
/** The proof of possession of the address by the SE. */
|
|
387
387
|
depositAddressProof:
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
| DepositAddressProof
|
|
389
|
+
| undefined;
|
|
390
390
|
/** Is it a static deposit address */
|
|
391
391
|
isStatic: boolean;
|
|
392
392
|
}
|
|
@@ -445,6 +445,15 @@ export interface SigningKeyshare {
|
|
|
445
445
|
threshold: number;
|
|
446
446
|
/** The public key of the keyshare. */
|
|
447
447
|
publicKey: Uint8Array;
|
|
448
|
+
/** The public shares of the keyshare. */
|
|
449
|
+
publicShares: { [key: string]: Uint8Array };
|
|
450
|
+
/** The latest update time of the keyshare. */
|
|
451
|
+
updatedTime: Date | undefined;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export interface SigningKeyshare_PublicSharesEntry {
|
|
455
|
+
key: string;
|
|
456
|
+
value: Uint8Array;
|
|
448
457
|
}
|
|
449
458
|
|
|
450
459
|
/**
|
|
@@ -487,12 +496,12 @@ export interface NodeSignatureShares {
|
|
|
487
496
|
nodeId: string;
|
|
488
497
|
/** The signing result of the node's transaction. This transaction is to pay to self. */
|
|
489
498
|
nodeTxSigningResult:
|
|
490
|
-
|
|
491
|
-
|
|
499
|
+
| SigningResult
|
|
500
|
+
| undefined;
|
|
492
501
|
/** The signing result of the node's refund transaction. This transaction is to pay to the user. */
|
|
493
502
|
refundTxSigningResult:
|
|
494
|
-
|
|
495
|
-
|
|
503
|
+
| SigningResult
|
|
504
|
+
| undefined;
|
|
496
505
|
/** The verifying key of the node. */
|
|
497
506
|
verifyingKey: Uint8Array;
|
|
498
507
|
}
|
|
@@ -516,12 +525,12 @@ export interface StartTreeCreationRequest {
|
|
|
516
525
|
identityPublicKey: Uint8Array;
|
|
517
526
|
/** The on-chain utxo to be used to be spent by the root node. */
|
|
518
527
|
onChainUtxo:
|
|
519
|
-
|
|
520
|
-
|
|
528
|
+
| UTXO
|
|
529
|
+
| undefined;
|
|
521
530
|
/** The signing job for the root node's transaction. */
|
|
522
531
|
rootTxSigningJob:
|
|
523
|
-
|
|
524
|
-
|
|
532
|
+
| SigningJob
|
|
533
|
+
| undefined;
|
|
525
534
|
/** The signing job for the root node's refund transaction. */
|
|
526
535
|
refundTxSigningJob: SigningJob | undefined;
|
|
527
536
|
}
|
|
@@ -540,12 +549,12 @@ export interface StartDepositTreeCreationRequest {
|
|
|
540
549
|
identityPublicKey: Uint8Array;
|
|
541
550
|
/** The on-chain utxo to be used to be spent by the root node. */
|
|
542
551
|
onChainUtxo:
|
|
543
|
-
|
|
544
|
-
|
|
552
|
+
| UTXO
|
|
553
|
+
| undefined;
|
|
545
554
|
/** The signing job for the root node's transaction. */
|
|
546
555
|
rootTxSigningJob:
|
|
547
|
-
|
|
548
|
-
|
|
556
|
+
| SigningJob
|
|
557
|
+
| undefined;
|
|
549
558
|
/** The signing job for the root node's refund transaction. */
|
|
550
559
|
refundTxSigningJob: SigningJob | undefined;
|
|
551
560
|
}
|
|
@@ -654,10 +663,11 @@ export interface TokenTransactionSignatures {
|
|
|
654
663
|
export interface StartTokenTransactionRequest {
|
|
655
664
|
identityPublicKey: Uint8Array;
|
|
656
665
|
partialTokenTransaction:
|
|
657
|
-
|
|
658
|
-
|
|
666
|
+
| TokenTransaction
|
|
667
|
+
| undefined;
|
|
659
668
|
/** List of ecdsa signatures authorizing movement of tokens from the token input. */
|
|
660
669
|
tokenTransactionSignatures: TokenTransactionSignatures | undefined;
|
|
670
|
+
sparkPaymentIntent: string;
|
|
661
671
|
}
|
|
662
672
|
|
|
663
673
|
export interface StartTokenTransactionResponse {
|
|
@@ -666,8 +676,8 @@ export interface StartTokenTransactionResponse {
|
|
|
666
676
|
* filled. This is the final transaction that is published and gossiped among LRC20 nodes.
|
|
667
677
|
*/
|
|
668
678
|
finalTokenTransaction:
|
|
669
|
-
|
|
670
|
-
|
|
679
|
+
| TokenTransaction
|
|
680
|
+
| undefined;
|
|
671
681
|
/**
|
|
672
682
|
* Information for fetching and resolving the revocation keyshare on a transfer operation.
|
|
673
683
|
* Contains the threshold of keyshares needed and the SO owners of those keyshares.
|
|
@@ -714,14 +724,15 @@ export interface RevocationSecretWithIndex {
|
|
|
714
724
|
|
|
715
725
|
export interface FinalizeTokenTransactionRequest {
|
|
716
726
|
finalTokenTransaction:
|
|
717
|
-
|
|
718
|
-
|
|
727
|
+
| TokenTransaction
|
|
728
|
+
| undefined;
|
|
719
729
|
/**
|
|
720
730
|
* List of ordered revocation secrets that map 1:1 with leaves being spent in the
|
|
721
731
|
* token transaction.
|
|
722
732
|
*/
|
|
723
733
|
revocationSecrets: RevocationSecretWithIndex[];
|
|
724
734
|
identityPublicKey: Uint8Array;
|
|
735
|
+
sparkPaymentIntent: string;
|
|
725
736
|
}
|
|
726
737
|
|
|
727
738
|
export interface FreezeTokensPayload {
|
|
@@ -735,8 +746,8 @@ export interface FreezeTokensPayload {
|
|
|
735
746
|
|
|
736
747
|
export interface FreezeTokensRequest {
|
|
737
748
|
freezeTokensPayload:
|
|
738
|
-
|
|
739
|
-
|
|
749
|
+
| FreezeTokensPayload
|
|
750
|
+
| undefined;
|
|
740
751
|
/** This is a Schnorr or ECDSA DER signature which can be between 64 and 73 bytes. */
|
|
741
752
|
issuerSignature: Uint8Array;
|
|
742
753
|
}
|
|
@@ -794,8 +805,8 @@ export interface TreeNode {
|
|
|
794
805
|
value: number;
|
|
795
806
|
/** The id of the parent node. */
|
|
796
807
|
parentNodeId?:
|
|
797
|
-
|
|
798
|
-
|
|
808
|
+
| string
|
|
809
|
+
| undefined;
|
|
799
810
|
/** The transaction of the node, this transaction is to pay to the same address as the node. */
|
|
800
811
|
nodeTx: Uint8Array;
|
|
801
812
|
/** The refund transaction of the node, this transaction is to pay to the user. */
|
|
@@ -808,12 +819,22 @@ export interface TreeNode {
|
|
|
808
819
|
ownerIdentityPublicKey: Uint8Array;
|
|
809
820
|
/** The signing keyshare information of the node on the SE side. */
|
|
810
821
|
signingKeyshare:
|
|
811
|
-
|
|
812
|
-
|
|
822
|
+
| SigningKeyshare
|
|
823
|
+
| undefined;
|
|
813
824
|
/** The status of the node. */
|
|
814
825
|
status: string;
|
|
815
826
|
/** The network of the node. */
|
|
816
827
|
network: Network;
|
|
828
|
+
/** The creation time of the node. */
|
|
829
|
+
createdTime:
|
|
830
|
+
| Date
|
|
831
|
+
| undefined;
|
|
832
|
+
/** The latest update time of the node. */
|
|
833
|
+
updatedTime:
|
|
834
|
+
| Date
|
|
835
|
+
| undefined;
|
|
836
|
+
/** The signing public key of the owner of the node. */
|
|
837
|
+
ownerSigningPublicKey: Uint8Array;
|
|
817
838
|
}
|
|
818
839
|
|
|
819
840
|
/** FinalizeNodeSignaturesRequest is the request to finalize the signatures for a node. */
|
|
@@ -895,6 +916,7 @@ export interface StartTransferRequest {
|
|
|
895
916
|
| undefined;
|
|
896
917
|
/** If this field is set, the leaves_to_send and key_tweak_proofs will be ignored. */
|
|
897
918
|
transferPackage: TransferPackage | undefined;
|
|
919
|
+
sparkPaymentIntent: string;
|
|
898
920
|
}
|
|
899
921
|
|
|
900
922
|
export interface StartTransferResponse {
|
|
@@ -944,6 +966,7 @@ export interface FinalizeTransferRequest {
|
|
|
944
966
|
transferId: string;
|
|
945
967
|
ownerIdentityPublicKey: Uint8Array;
|
|
946
968
|
leavesToSend: SendLeafKeyTweak[];
|
|
969
|
+
sparkPaymentIntent: string;
|
|
947
970
|
}
|
|
948
971
|
|
|
949
972
|
export interface FinalizeTransferWithTransferPackageRequest {
|
|
@@ -989,6 +1012,7 @@ export interface TransferFilter {
|
|
|
989
1012
|
types: TransferType[];
|
|
990
1013
|
/** defaults to mainnet when no network is provided. */
|
|
991
1014
|
network: Network;
|
|
1015
|
+
statuses: TransferStatus[];
|
|
992
1016
|
}
|
|
993
1017
|
|
|
994
1018
|
export interface QueryTransfersResponse {
|
|
@@ -1023,22 +1047,6 @@ export interface ClaimTransferSignRefundsResponse {
|
|
|
1023
1047
|
signingResults: LeafRefundTxSigningResult[];
|
|
1024
1048
|
}
|
|
1025
1049
|
|
|
1026
|
-
export interface AggregateNodesRequest {
|
|
1027
|
-
nodeIds: string[];
|
|
1028
|
-
signingJob:
|
|
1029
|
-
| SigningJob
|
|
1030
|
-
| undefined;
|
|
1031
|
-
/** Serves as a temporary identity public key, this should be get from auth process. */
|
|
1032
|
-
ownerIdentityPublicKey: Uint8Array;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
export interface AggregateNodesResponse {
|
|
1036
|
-
aggregateSignature: SigningResult | undefined;
|
|
1037
|
-
verifyingKey: Uint8Array;
|
|
1038
|
-
parentNodeTx: Uint8Array;
|
|
1039
|
-
parentNodeVout: number;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
1050
|
export interface StorePreimageShareRequest {
|
|
1043
1051
|
paymentHash: Uint8Array;
|
|
1044
1052
|
preimageShare: SecretShare | undefined;
|
|
@@ -1175,8 +1183,8 @@ export interface RefreshTimelockRequest {
|
|
|
1175
1183
|
|
|
1176
1184
|
export interface RefreshTimelockSigningResult {
|
|
1177
1185
|
signingResult:
|
|
1178
|
-
|
|
1179
|
-
|
|
1186
|
+
| SigningResult
|
|
1187
|
+
| undefined;
|
|
1180
1188
|
/** Should maybe just be a part of SigningResult? */
|
|
1181
1189
|
verifyingKey: Uint8Array;
|
|
1182
1190
|
}
|
|
@@ -1210,9 +1218,9 @@ export interface AddressRequestNode {
|
|
|
1210
1218
|
|
|
1211
1219
|
export interface PrepareTreeAddressRequest {
|
|
1212
1220
|
source?:
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1221
|
+
| { $case: "parentNodeOutput"; parentNodeOutput: NodeOutput }
|
|
1222
|
+
| { $case: "onChainUtxo"; onChainUtxo: UTXO }
|
|
1223
|
+
| undefined;
|
|
1216
1224
|
/**
|
|
1217
1225
|
* The tx on this node is to spend the source's utxo.
|
|
1218
1226
|
* The user's public key should already be registered with the SE for the root node.
|
|
@@ -1233,25 +1241,25 @@ export interface PrepareTreeAddressResponse {
|
|
|
1233
1241
|
export interface CreationNode {
|
|
1234
1242
|
/** This is the tx that spends the parent node's output. */
|
|
1235
1243
|
nodeTxSigningJob:
|
|
1236
|
-
|
|
1237
|
-
|
|
1244
|
+
| SigningJob
|
|
1245
|
+
| undefined;
|
|
1238
1246
|
/** The refund tx can only exist if there's no children. */
|
|
1239
1247
|
refundTxSigningJob:
|
|
1240
|
-
|
|
1241
|
-
|
|
1248
|
+
| SigningJob
|
|
1249
|
+
| undefined;
|
|
1242
1250
|
/** The children will spend the output of the node's tx. Vout is the index of the child. */
|
|
1243
1251
|
children: CreationNode[];
|
|
1244
1252
|
}
|
|
1245
1253
|
|
|
1246
1254
|
export interface CreateTreeRequest {
|
|
1247
1255
|
source?:
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1256
|
+
| { $case: "parentNodeOutput"; parentNodeOutput: NodeOutput }
|
|
1257
|
+
| { $case: "onChainUtxo"; onChainUtxo: UTXO }
|
|
1258
|
+
| undefined;
|
|
1251
1259
|
/** The node should contain the tx that spends the source's utxo. */
|
|
1252
1260
|
node:
|
|
1253
|
-
|
|
1254
|
-
|
|
1261
|
+
| CreationNode
|
|
1262
|
+
| undefined;
|
|
1255
1263
|
/** The owner of the tree. */
|
|
1256
1264
|
userIdentityPublicKey: Uint8Array;
|
|
1257
1265
|
}
|
|
@@ -1350,6 +1358,10 @@ export interface QueryUnusedDepositAddressesRequest {
|
|
|
1350
1358
|
identityPublicKey: Uint8Array;
|
|
1351
1359
|
/** defaults to mainnet when no network is provided. */
|
|
1352
1360
|
network: Network;
|
|
1361
|
+
/** defaults to 100 if not set. */
|
|
1362
|
+
limit: number;
|
|
1363
|
+
/** defaults to 0 if not set. */
|
|
1364
|
+
offset: number;
|
|
1353
1365
|
}
|
|
1354
1366
|
|
|
1355
1367
|
export interface QueryStaticDepositAddressesRequest {
|
|
@@ -1369,6 +1381,8 @@ export interface DepositAddressQueryResult {
|
|
|
1369
1381
|
|
|
1370
1382
|
export interface QueryUnusedDepositAddressesResponse {
|
|
1371
1383
|
depositAddresses: DepositAddressQueryResult[];
|
|
1384
|
+
/** defaults to -1 if there are no more results */
|
|
1385
|
+
offset: number;
|
|
1372
1386
|
}
|
|
1373
1387
|
|
|
1374
1388
|
export interface QueryStaticDepositAddressesResponse {
|
|
@@ -1410,9 +1424,9 @@ export interface InitiateUtxoSwapRequest {
|
|
|
1410
1424
|
onChainUtxo: UTXO | undefined;
|
|
1411
1425
|
requestType: UtxoSwapRequestType;
|
|
1412
1426
|
amount?:
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1427
|
+
| { $case: "creditAmountSats"; creditAmountSats: number }
|
|
1428
|
+
| { $case: "maxFeeSats"; maxFeeSats: number }
|
|
1429
|
+
| undefined;
|
|
1416
1430
|
sspSignature: Uint8Array;
|
|
1417
1431
|
userSignature: Uint8Array;
|
|
1418
1432
|
transfer: StartTransferRequest | undefined;
|
|
@@ -1616,10 +1630,10 @@ export const SubscribeToEventsResponse: MessageFns<SubscribeToEventsResponse> =
|
|
|
1616
1630
|
event: isSet(object.transfer)
|
|
1617
1631
|
? { $case: "transfer", transfer: TransferEvent.fromJSON(object.transfer) }
|
|
1618
1632
|
: isSet(object.deposit)
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1633
|
+
? { $case: "deposit", deposit: DepositEvent.fromJSON(object.deposit) }
|
|
1634
|
+
: isSet(object.connected)
|
|
1635
|
+
? { $case: "connected", connected: ConnectedEvent.fromJSON(object.connected) }
|
|
1636
|
+
: undefined,
|
|
1623
1637
|
};
|
|
1624
1638
|
},
|
|
1625
1639
|
|
|
@@ -2591,7 +2605,7 @@ export const SigningJob: MessageFns<SigningJob> = {
|
|
|
2591
2605
|
};
|
|
2592
2606
|
|
|
2593
2607
|
function createBaseSigningKeyshare(): SigningKeyshare {
|
|
2594
|
-
return { ownerIdentifiers: [], threshold: 0, publicKey: new Uint8Array(0) };
|
|
2608
|
+
return { ownerIdentifiers: [], threshold: 0, publicKey: new Uint8Array(0), publicShares: {}, updatedTime: undefined };
|
|
2595
2609
|
}
|
|
2596
2610
|
|
|
2597
2611
|
export const SigningKeyshare: MessageFns<SigningKeyshare> = {
|
|
@@ -2605,6 +2619,12 @@ export const SigningKeyshare: MessageFns<SigningKeyshare> = {
|
|
|
2605
2619
|
if (message.publicKey.length !== 0) {
|
|
2606
2620
|
writer.uint32(26).bytes(message.publicKey);
|
|
2607
2621
|
}
|
|
2622
|
+
Object.entries(message.publicShares).forEach(([key, value]) => {
|
|
2623
|
+
SigningKeyshare_PublicSharesEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
|
|
2624
|
+
});
|
|
2625
|
+
if (message.updatedTime !== undefined) {
|
|
2626
|
+
Timestamp.encode(toTimestamp(message.updatedTime), writer.uint32(42).fork()).join();
|
|
2627
|
+
}
|
|
2608
2628
|
return writer;
|
|
2609
2629
|
},
|
|
2610
2630
|
|
|
@@ -2639,6 +2659,25 @@ export const SigningKeyshare: MessageFns<SigningKeyshare> = {
|
|
|
2639
2659
|
message.publicKey = reader.bytes();
|
|
2640
2660
|
continue;
|
|
2641
2661
|
}
|
|
2662
|
+
case 4: {
|
|
2663
|
+
if (tag !== 34) {
|
|
2664
|
+
break;
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
const entry4 = SigningKeyshare_PublicSharesEntry.decode(reader, reader.uint32());
|
|
2668
|
+
if (entry4.value !== undefined) {
|
|
2669
|
+
message.publicShares[entry4.key] = entry4.value;
|
|
2670
|
+
}
|
|
2671
|
+
continue;
|
|
2672
|
+
}
|
|
2673
|
+
case 5: {
|
|
2674
|
+
if (tag !== 42) {
|
|
2675
|
+
break;
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
message.updatedTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2679
|
+
continue;
|
|
2680
|
+
}
|
|
2642
2681
|
}
|
|
2643
2682
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2644
2683
|
break;
|
|
@@ -2655,6 +2694,13 @@ export const SigningKeyshare: MessageFns<SigningKeyshare> = {
|
|
|
2655
2694
|
: [],
|
|
2656
2695
|
threshold: isSet(object.threshold) ? globalThis.Number(object.threshold) : 0,
|
|
2657
2696
|
publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : new Uint8Array(0),
|
|
2697
|
+
publicShares: isObject(object.publicShares)
|
|
2698
|
+
? Object.entries(object.publicShares).reduce<{ [key: string]: Uint8Array }>((acc, [key, value]) => {
|
|
2699
|
+
acc[key] = bytesFromBase64(value as string);
|
|
2700
|
+
return acc;
|
|
2701
|
+
}, {})
|
|
2702
|
+
: {},
|
|
2703
|
+
updatedTime: isSet(object.updatedTime) ? fromJsonTimestamp(object.updatedTime) : undefined,
|
|
2658
2704
|
};
|
|
2659
2705
|
},
|
|
2660
2706
|
|
|
@@ -2669,6 +2715,18 @@ export const SigningKeyshare: MessageFns<SigningKeyshare> = {
|
|
|
2669
2715
|
if (message.publicKey.length !== 0) {
|
|
2670
2716
|
obj.publicKey = base64FromBytes(message.publicKey);
|
|
2671
2717
|
}
|
|
2718
|
+
if (message.publicShares) {
|
|
2719
|
+
const entries = Object.entries(message.publicShares);
|
|
2720
|
+
if (entries.length > 0) {
|
|
2721
|
+
obj.publicShares = {};
|
|
2722
|
+
entries.forEach(([k, v]) => {
|
|
2723
|
+
obj.publicShares[k] = base64FromBytes(v);
|
|
2724
|
+
});
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
if (message.updatedTime !== undefined) {
|
|
2728
|
+
obj.updatedTime = message.updatedTime.toISOString();
|
|
2729
|
+
}
|
|
2672
2730
|
return obj;
|
|
2673
2731
|
},
|
|
2674
2732
|
|
|
@@ -2680,6 +2738,92 @@ export const SigningKeyshare: MessageFns<SigningKeyshare> = {
|
|
|
2680
2738
|
message.ownerIdentifiers = object.ownerIdentifiers?.map((e) => e) || [];
|
|
2681
2739
|
message.threshold = object.threshold ?? 0;
|
|
2682
2740
|
message.publicKey = object.publicKey ?? new Uint8Array(0);
|
|
2741
|
+
message.publicShares = Object.entries(object.publicShares ?? {}).reduce<{ [key: string]: Uint8Array }>(
|
|
2742
|
+
(acc, [key, value]) => {
|
|
2743
|
+
if (value !== undefined) {
|
|
2744
|
+
acc[key] = value;
|
|
2745
|
+
}
|
|
2746
|
+
return acc;
|
|
2747
|
+
},
|
|
2748
|
+
{},
|
|
2749
|
+
);
|
|
2750
|
+
message.updatedTime = object.updatedTime ?? undefined;
|
|
2751
|
+
return message;
|
|
2752
|
+
},
|
|
2753
|
+
};
|
|
2754
|
+
|
|
2755
|
+
function createBaseSigningKeyshare_PublicSharesEntry(): SigningKeyshare_PublicSharesEntry {
|
|
2756
|
+
return { key: "", value: new Uint8Array(0) };
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
export const SigningKeyshare_PublicSharesEntry: MessageFns<SigningKeyshare_PublicSharesEntry> = {
|
|
2760
|
+
encode(message: SigningKeyshare_PublicSharesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2761
|
+
if (message.key !== "") {
|
|
2762
|
+
writer.uint32(10).string(message.key);
|
|
2763
|
+
}
|
|
2764
|
+
if (message.value.length !== 0) {
|
|
2765
|
+
writer.uint32(18).bytes(message.value);
|
|
2766
|
+
}
|
|
2767
|
+
return writer;
|
|
2768
|
+
},
|
|
2769
|
+
|
|
2770
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SigningKeyshare_PublicSharesEntry {
|
|
2771
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2772
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2773
|
+
const message = createBaseSigningKeyshare_PublicSharesEntry();
|
|
2774
|
+
while (reader.pos < end) {
|
|
2775
|
+
const tag = reader.uint32();
|
|
2776
|
+
switch (tag >>> 3) {
|
|
2777
|
+
case 1: {
|
|
2778
|
+
if (tag !== 10) {
|
|
2779
|
+
break;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
message.key = reader.string();
|
|
2783
|
+
continue;
|
|
2784
|
+
}
|
|
2785
|
+
case 2: {
|
|
2786
|
+
if (tag !== 18) {
|
|
2787
|
+
break;
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2790
|
+
message.value = reader.bytes();
|
|
2791
|
+
continue;
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2795
|
+
break;
|
|
2796
|
+
}
|
|
2797
|
+
reader.skip(tag & 7);
|
|
2798
|
+
}
|
|
2799
|
+
return message;
|
|
2800
|
+
},
|
|
2801
|
+
|
|
2802
|
+
fromJSON(object: any): SigningKeyshare_PublicSharesEntry {
|
|
2803
|
+
return {
|
|
2804
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2805
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
2806
|
+
};
|
|
2807
|
+
},
|
|
2808
|
+
|
|
2809
|
+
toJSON(message: SigningKeyshare_PublicSharesEntry): unknown {
|
|
2810
|
+
const obj: any = {};
|
|
2811
|
+
if (message.key !== "") {
|
|
2812
|
+
obj.key = message.key;
|
|
2813
|
+
}
|
|
2814
|
+
if (message.value.length !== 0) {
|
|
2815
|
+
obj.value = base64FromBytes(message.value);
|
|
2816
|
+
}
|
|
2817
|
+
return obj;
|
|
2818
|
+
},
|
|
2819
|
+
|
|
2820
|
+
create(base?: DeepPartial<SigningKeyshare_PublicSharesEntry>): SigningKeyshare_PublicSharesEntry {
|
|
2821
|
+
return SigningKeyshare_PublicSharesEntry.fromPartial(base ?? {});
|
|
2822
|
+
},
|
|
2823
|
+
fromPartial(object: DeepPartial<SigningKeyshare_PublicSharesEntry>): SigningKeyshare_PublicSharesEntry {
|
|
2824
|
+
const message = createBaseSigningKeyshare_PublicSharesEntry();
|
|
2825
|
+
message.key = object.key ?? "";
|
|
2826
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
2683
2827
|
return message;
|
|
2684
2828
|
},
|
|
2685
2829
|
};
|
|
@@ -4192,8 +4336,8 @@ export const TokenTransaction: MessageFns<TokenTransaction> = {
|
|
|
4192
4336
|
tokenInputs: isSet(object.mintInput)
|
|
4193
4337
|
? { $case: "mintInput", mintInput: TokenMintInput.fromJSON(object.mintInput) }
|
|
4194
4338
|
: isSet(object.transferInput)
|
|
4195
|
-
|
|
4196
|
-
|
|
4339
|
+
? { $case: "transferInput", transferInput: TokenTransferInput.fromJSON(object.transferInput) }
|
|
4340
|
+
: undefined,
|
|
4197
4341
|
tokenOutputs: globalThis.Array.isArray(object?.tokenOutputs)
|
|
4198
4342
|
? object.tokenOutputs.map((e: any) => TokenOutput.fromJSON(e))
|
|
4199
4343
|
: [],
|
|
@@ -4635,6 +4779,7 @@ function createBaseStartTokenTransactionRequest(): StartTokenTransactionRequest
|
|
|
4635
4779
|
identityPublicKey: new Uint8Array(0),
|
|
4636
4780
|
partialTokenTransaction: undefined,
|
|
4637
4781
|
tokenTransactionSignatures: undefined,
|
|
4782
|
+
sparkPaymentIntent: "",
|
|
4638
4783
|
};
|
|
4639
4784
|
}
|
|
4640
4785
|
|
|
@@ -4649,6 +4794,9 @@ export const StartTokenTransactionRequest: MessageFns<StartTokenTransactionReque
|
|
|
4649
4794
|
if (message.tokenTransactionSignatures !== undefined) {
|
|
4650
4795
|
TokenTransactionSignatures.encode(message.tokenTransactionSignatures, writer.uint32(26).fork()).join();
|
|
4651
4796
|
}
|
|
4797
|
+
if (message.sparkPaymentIntent !== "") {
|
|
4798
|
+
writer.uint32(34).string(message.sparkPaymentIntent);
|
|
4799
|
+
}
|
|
4652
4800
|
return writer;
|
|
4653
4801
|
},
|
|
4654
4802
|
|
|
@@ -4683,6 +4831,14 @@ export const StartTokenTransactionRequest: MessageFns<StartTokenTransactionReque
|
|
|
4683
4831
|
message.tokenTransactionSignatures = TokenTransactionSignatures.decode(reader, reader.uint32());
|
|
4684
4832
|
continue;
|
|
4685
4833
|
}
|
|
4834
|
+
case 4: {
|
|
4835
|
+
if (tag !== 34) {
|
|
4836
|
+
break;
|
|
4837
|
+
}
|
|
4838
|
+
|
|
4839
|
+
message.sparkPaymentIntent = reader.string();
|
|
4840
|
+
continue;
|
|
4841
|
+
}
|
|
4686
4842
|
}
|
|
4687
4843
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4688
4844
|
break;
|
|
@@ -4703,6 +4859,7 @@ export const StartTokenTransactionRequest: MessageFns<StartTokenTransactionReque
|
|
|
4703
4859
|
tokenTransactionSignatures: isSet(object.tokenTransactionSignatures)
|
|
4704
4860
|
? TokenTransactionSignatures.fromJSON(object.tokenTransactionSignatures)
|
|
4705
4861
|
: undefined,
|
|
4862
|
+
sparkPaymentIntent: isSet(object.sparkPaymentIntent) ? globalThis.String(object.sparkPaymentIntent) : "",
|
|
4706
4863
|
};
|
|
4707
4864
|
},
|
|
4708
4865
|
|
|
@@ -4717,6 +4874,9 @@ export const StartTokenTransactionRequest: MessageFns<StartTokenTransactionReque
|
|
|
4717
4874
|
if (message.tokenTransactionSignatures !== undefined) {
|
|
4718
4875
|
obj.tokenTransactionSignatures = TokenTransactionSignatures.toJSON(message.tokenTransactionSignatures);
|
|
4719
4876
|
}
|
|
4877
|
+
if (message.sparkPaymentIntent !== "") {
|
|
4878
|
+
obj.sparkPaymentIntent = message.sparkPaymentIntent;
|
|
4879
|
+
}
|
|
4720
4880
|
return obj;
|
|
4721
4881
|
},
|
|
4722
4882
|
|
|
@@ -4734,6 +4894,7 @@ export const StartTokenTransactionRequest: MessageFns<StartTokenTransactionReque
|
|
|
4734
4894
|
(object.tokenTransactionSignatures !== undefined && object.tokenTransactionSignatures !== null)
|
|
4735
4895
|
? TokenTransactionSignatures.fromPartial(object.tokenTransactionSignatures)
|
|
4736
4896
|
: undefined;
|
|
4897
|
+
message.sparkPaymentIntent = object.sparkPaymentIntent ?? "";
|
|
4737
4898
|
return message;
|
|
4738
4899
|
},
|
|
4739
4900
|
};
|
|
@@ -5329,7 +5490,12 @@ export const RevocationSecretWithIndex: MessageFns<RevocationSecretWithIndex> =
|
|
|
5329
5490
|
};
|
|
5330
5491
|
|
|
5331
5492
|
function createBaseFinalizeTokenTransactionRequest(): FinalizeTokenTransactionRequest {
|
|
5332
|
-
return {
|
|
5493
|
+
return {
|
|
5494
|
+
finalTokenTransaction: undefined,
|
|
5495
|
+
revocationSecrets: [],
|
|
5496
|
+
identityPublicKey: new Uint8Array(0),
|
|
5497
|
+
sparkPaymentIntent: "",
|
|
5498
|
+
};
|
|
5333
5499
|
}
|
|
5334
5500
|
|
|
5335
5501
|
export const FinalizeTokenTransactionRequest: MessageFns<FinalizeTokenTransactionRequest> = {
|
|
@@ -5343,6 +5509,9 @@ export const FinalizeTokenTransactionRequest: MessageFns<FinalizeTokenTransactio
|
|
|
5343
5509
|
if (message.identityPublicKey.length !== 0) {
|
|
5344
5510
|
writer.uint32(26).bytes(message.identityPublicKey);
|
|
5345
5511
|
}
|
|
5512
|
+
if (message.sparkPaymentIntent !== "") {
|
|
5513
|
+
writer.uint32(34).string(message.sparkPaymentIntent);
|
|
5514
|
+
}
|
|
5346
5515
|
return writer;
|
|
5347
5516
|
},
|
|
5348
5517
|
|
|
@@ -5377,6 +5546,14 @@ export const FinalizeTokenTransactionRequest: MessageFns<FinalizeTokenTransactio
|
|
|
5377
5546
|
message.identityPublicKey = reader.bytes();
|
|
5378
5547
|
continue;
|
|
5379
5548
|
}
|
|
5549
|
+
case 4: {
|
|
5550
|
+
if (tag !== 34) {
|
|
5551
|
+
break;
|
|
5552
|
+
}
|
|
5553
|
+
|
|
5554
|
+
message.sparkPaymentIntent = reader.string();
|
|
5555
|
+
continue;
|
|
5556
|
+
}
|
|
5380
5557
|
}
|
|
5381
5558
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5382
5559
|
break;
|
|
@@ -5397,6 +5574,7 @@ export const FinalizeTokenTransactionRequest: MessageFns<FinalizeTokenTransactio
|
|
|
5397
5574
|
identityPublicKey: isSet(object.identityPublicKey)
|
|
5398
5575
|
? bytesFromBase64(object.identityPublicKey)
|
|
5399
5576
|
: new Uint8Array(0),
|
|
5577
|
+
sparkPaymentIntent: isSet(object.sparkPaymentIntent) ? globalThis.String(object.sparkPaymentIntent) : "",
|
|
5400
5578
|
};
|
|
5401
5579
|
},
|
|
5402
5580
|
|
|
@@ -5411,6 +5589,9 @@ export const FinalizeTokenTransactionRequest: MessageFns<FinalizeTokenTransactio
|
|
|
5411
5589
|
if (message.identityPublicKey.length !== 0) {
|
|
5412
5590
|
obj.identityPublicKey = base64FromBytes(message.identityPublicKey);
|
|
5413
5591
|
}
|
|
5592
|
+
if (message.sparkPaymentIntent !== "") {
|
|
5593
|
+
obj.sparkPaymentIntent = message.sparkPaymentIntent;
|
|
5594
|
+
}
|
|
5414
5595
|
return obj;
|
|
5415
5596
|
},
|
|
5416
5597
|
|
|
@@ -5425,6 +5606,7 @@ export const FinalizeTokenTransactionRequest: MessageFns<FinalizeTokenTransactio
|
|
|
5425
5606
|
: undefined;
|
|
5426
5607
|
message.revocationSecrets = object.revocationSecrets?.map((e) => RevocationSecretWithIndex.fromPartial(e)) || [];
|
|
5427
5608
|
message.identityPublicKey = object.identityPublicKey ?? new Uint8Array(0);
|
|
5609
|
+
message.sparkPaymentIntent = object.sparkPaymentIntent ?? "";
|
|
5428
5610
|
return message;
|
|
5429
5611
|
},
|
|
5430
5612
|
};
|
|
@@ -6227,6 +6409,9 @@ function createBaseTreeNode(): TreeNode {
|
|
|
6227
6409
|
signingKeyshare: undefined,
|
|
6228
6410
|
status: "",
|
|
6229
6411
|
network: 0,
|
|
6412
|
+
createdTime: undefined,
|
|
6413
|
+
updatedTime: undefined,
|
|
6414
|
+
ownerSigningPublicKey: new Uint8Array(0),
|
|
6230
6415
|
};
|
|
6231
6416
|
}
|
|
6232
6417
|
|
|
@@ -6268,6 +6453,15 @@ export const TreeNode: MessageFns<TreeNode> = {
|
|
|
6268
6453
|
if (message.network !== 0) {
|
|
6269
6454
|
writer.uint32(96).int32(message.network);
|
|
6270
6455
|
}
|
|
6456
|
+
if (message.createdTime !== undefined) {
|
|
6457
|
+
Timestamp.encode(toTimestamp(message.createdTime), writer.uint32(106).fork()).join();
|
|
6458
|
+
}
|
|
6459
|
+
if (message.updatedTime !== undefined) {
|
|
6460
|
+
Timestamp.encode(toTimestamp(message.updatedTime), writer.uint32(114).fork()).join();
|
|
6461
|
+
}
|
|
6462
|
+
if (message.ownerSigningPublicKey.length !== 0) {
|
|
6463
|
+
writer.uint32(122).bytes(message.ownerSigningPublicKey);
|
|
6464
|
+
}
|
|
6271
6465
|
return writer;
|
|
6272
6466
|
},
|
|
6273
6467
|
|
|
@@ -6374,6 +6568,30 @@ export const TreeNode: MessageFns<TreeNode> = {
|
|
|
6374
6568
|
message.network = reader.int32() as any;
|
|
6375
6569
|
continue;
|
|
6376
6570
|
}
|
|
6571
|
+
case 13: {
|
|
6572
|
+
if (tag !== 106) {
|
|
6573
|
+
break;
|
|
6574
|
+
}
|
|
6575
|
+
|
|
6576
|
+
message.createdTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6577
|
+
continue;
|
|
6578
|
+
}
|
|
6579
|
+
case 14: {
|
|
6580
|
+
if (tag !== 114) {
|
|
6581
|
+
break;
|
|
6582
|
+
}
|
|
6583
|
+
|
|
6584
|
+
message.updatedTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
6585
|
+
continue;
|
|
6586
|
+
}
|
|
6587
|
+
case 15: {
|
|
6588
|
+
if (tag !== 122) {
|
|
6589
|
+
break;
|
|
6590
|
+
}
|
|
6591
|
+
|
|
6592
|
+
message.ownerSigningPublicKey = reader.bytes();
|
|
6593
|
+
continue;
|
|
6594
|
+
}
|
|
6377
6595
|
}
|
|
6378
6596
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6379
6597
|
break;
|
|
@@ -6401,6 +6619,11 @@ export const TreeNode: MessageFns<TreeNode> = {
|
|
|
6401
6619
|
signingKeyshare: isSet(object.signingKeyshare) ? SigningKeyshare.fromJSON(object.signingKeyshare) : undefined,
|
|
6402
6620
|
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
6403
6621
|
network: isSet(object.network) ? networkFromJSON(object.network) : 0,
|
|
6622
|
+
createdTime: isSet(object.createdTime) ? fromJsonTimestamp(object.createdTime) : undefined,
|
|
6623
|
+
updatedTime: isSet(object.updatedTime) ? fromJsonTimestamp(object.updatedTime) : undefined,
|
|
6624
|
+
ownerSigningPublicKey: isSet(object.ownerSigningPublicKey)
|
|
6625
|
+
? bytesFromBase64(object.ownerSigningPublicKey)
|
|
6626
|
+
: new Uint8Array(0),
|
|
6404
6627
|
};
|
|
6405
6628
|
},
|
|
6406
6629
|
|
|
@@ -6442,6 +6665,15 @@ export const TreeNode: MessageFns<TreeNode> = {
|
|
|
6442
6665
|
if (message.network !== 0) {
|
|
6443
6666
|
obj.network = networkToJSON(message.network);
|
|
6444
6667
|
}
|
|
6668
|
+
if (message.createdTime !== undefined) {
|
|
6669
|
+
obj.createdTime = message.createdTime.toISOString();
|
|
6670
|
+
}
|
|
6671
|
+
if (message.updatedTime !== undefined) {
|
|
6672
|
+
obj.updatedTime = message.updatedTime.toISOString();
|
|
6673
|
+
}
|
|
6674
|
+
if (message.ownerSigningPublicKey.length !== 0) {
|
|
6675
|
+
obj.ownerSigningPublicKey = base64FromBytes(message.ownerSigningPublicKey);
|
|
6676
|
+
}
|
|
6445
6677
|
return obj;
|
|
6446
6678
|
},
|
|
6447
6679
|
|
|
@@ -6464,6 +6696,9 @@ export const TreeNode: MessageFns<TreeNode> = {
|
|
|
6464
6696
|
: undefined;
|
|
6465
6697
|
message.status = object.status ?? "";
|
|
6466
6698
|
message.network = object.network ?? 0;
|
|
6699
|
+
message.createdTime = object.createdTime ?? undefined;
|
|
6700
|
+
message.updatedTime = object.updatedTime ?? undefined;
|
|
6701
|
+
message.ownerSigningPublicKey = object.ownerSigningPublicKey ?? new Uint8Array(0);
|
|
6467
6702
|
return message;
|
|
6468
6703
|
},
|
|
6469
6704
|
};
|
|
@@ -7215,6 +7450,7 @@ function createBaseStartTransferRequest(): StartTransferRequest {
|
|
|
7215
7450
|
receiverIdentityPublicKey: new Uint8Array(0),
|
|
7216
7451
|
expiryTime: undefined,
|
|
7217
7452
|
transferPackage: undefined,
|
|
7453
|
+
sparkPaymentIntent: "",
|
|
7218
7454
|
};
|
|
7219
7455
|
}
|
|
7220
7456
|
|
|
@@ -7238,6 +7474,9 @@ export const StartTransferRequest: MessageFns<StartTransferRequest> = {
|
|
|
7238
7474
|
if (message.transferPackage !== undefined) {
|
|
7239
7475
|
TransferPackage.encode(message.transferPackage, writer.uint32(58).fork()).join();
|
|
7240
7476
|
}
|
|
7477
|
+
if (message.sparkPaymentIntent !== "") {
|
|
7478
|
+
writer.uint32(74).string(message.sparkPaymentIntent);
|
|
7479
|
+
}
|
|
7241
7480
|
return writer;
|
|
7242
7481
|
},
|
|
7243
7482
|
|
|
@@ -7296,6 +7535,14 @@ export const StartTransferRequest: MessageFns<StartTransferRequest> = {
|
|
|
7296
7535
|
message.transferPackage = TransferPackage.decode(reader, reader.uint32());
|
|
7297
7536
|
continue;
|
|
7298
7537
|
}
|
|
7538
|
+
case 9: {
|
|
7539
|
+
if (tag !== 74) {
|
|
7540
|
+
break;
|
|
7541
|
+
}
|
|
7542
|
+
|
|
7543
|
+
message.sparkPaymentIntent = reader.string();
|
|
7544
|
+
continue;
|
|
7545
|
+
}
|
|
7299
7546
|
}
|
|
7300
7547
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7301
7548
|
break;
|
|
@@ -7319,6 +7566,7 @@ export const StartTransferRequest: MessageFns<StartTransferRequest> = {
|
|
|
7319
7566
|
: new Uint8Array(0),
|
|
7320
7567
|
expiryTime: isSet(object.expiryTime) ? fromJsonTimestamp(object.expiryTime) : undefined,
|
|
7321
7568
|
transferPackage: isSet(object.transferPackage) ? TransferPackage.fromJSON(object.transferPackage) : undefined,
|
|
7569
|
+
sparkPaymentIntent: isSet(object.sparkPaymentIntent) ? globalThis.String(object.sparkPaymentIntent) : "",
|
|
7322
7570
|
};
|
|
7323
7571
|
},
|
|
7324
7572
|
|
|
@@ -7342,6 +7590,9 @@ export const StartTransferRequest: MessageFns<StartTransferRequest> = {
|
|
|
7342
7590
|
if (message.transferPackage !== undefined) {
|
|
7343
7591
|
obj.transferPackage = TransferPackage.toJSON(message.transferPackage);
|
|
7344
7592
|
}
|
|
7593
|
+
if (message.sparkPaymentIntent !== "") {
|
|
7594
|
+
obj.sparkPaymentIntent = message.sparkPaymentIntent;
|
|
7595
|
+
}
|
|
7345
7596
|
return obj;
|
|
7346
7597
|
},
|
|
7347
7598
|
|
|
@@ -7358,6 +7609,7 @@ export const StartTransferRequest: MessageFns<StartTransferRequest> = {
|
|
|
7358
7609
|
message.transferPackage = (object.transferPackage !== undefined && object.transferPackage !== null)
|
|
7359
7610
|
? TransferPackage.fromPartial(object.transferPackage)
|
|
7360
7611
|
: undefined;
|
|
7612
|
+
message.sparkPaymentIntent = object.sparkPaymentIntent ?? "";
|
|
7361
7613
|
return message;
|
|
7362
7614
|
},
|
|
7363
7615
|
};
|
|
@@ -7944,7 +8196,7 @@ export const SendLeafKeyTweak_PubkeySharesTweakEntry: MessageFns<SendLeafKeyTwea
|
|
|
7944
8196
|
};
|
|
7945
8197
|
|
|
7946
8198
|
function createBaseFinalizeTransferRequest(): FinalizeTransferRequest {
|
|
7947
|
-
return { transferId: "", ownerIdentityPublicKey: new Uint8Array(0), leavesToSend: [] };
|
|
8199
|
+
return { transferId: "", ownerIdentityPublicKey: new Uint8Array(0), leavesToSend: [], sparkPaymentIntent: "" };
|
|
7948
8200
|
}
|
|
7949
8201
|
|
|
7950
8202
|
export const FinalizeTransferRequest: MessageFns<FinalizeTransferRequest> = {
|
|
@@ -7958,6 +8210,9 @@ export const FinalizeTransferRequest: MessageFns<FinalizeTransferRequest> = {
|
|
|
7958
8210
|
for (const v of message.leavesToSend) {
|
|
7959
8211
|
SendLeafKeyTweak.encode(v!, writer.uint32(26).fork()).join();
|
|
7960
8212
|
}
|
|
8213
|
+
if (message.sparkPaymentIntent !== "") {
|
|
8214
|
+
writer.uint32(34).string(message.sparkPaymentIntent);
|
|
8215
|
+
}
|
|
7961
8216
|
return writer;
|
|
7962
8217
|
},
|
|
7963
8218
|
|
|
@@ -7992,6 +8247,14 @@ export const FinalizeTransferRequest: MessageFns<FinalizeTransferRequest> = {
|
|
|
7992
8247
|
message.leavesToSend.push(SendLeafKeyTweak.decode(reader, reader.uint32()));
|
|
7993
8248
|
continue;
|
|
7994
8249
|
}
|
|
8250
|
+
case 4: {
|
|
8251
|
+
if (tag !== 34) {
|
|
8252
|
+
break;
|
|
8253
|
+
}
|
|
8254
|
+
|
|
8255
|
+
message.sparkPaymentIntent = reader.string();
|
|
8256
|
+
continue;
|
|
8257
|
+
}
|
|
7995
8258
|
}
|
|
7996
8259
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7997
8260
|
break;
|
|
@@ -8010,6 +8273,7 @@ export const FinalizeTransferRequest: MessageFns<FinalizeTransferRequest> = {
|
|
|
8010
8273
|
leavesToSend: globalThis.Array.isArray(object?.leavesToSend)
|
|
8011
8274
|
? object.leavesToSend.map((e: any) => SendLeafKeyTweak.fromJSON(e))
|
|
8012
8275
|
: [],
|
|
8276
|
+
sparkPaymentIntent: isSet(object.sparkPaymentIntent) ? globalThis.String(object.sparkPaymentIntent) : "",
|
|
8013
8277
|
};
|
|
8014
8278
|
},
|
|
8015
8279
|
|
|
@@ -8024,6 +8288,9 @@ export const FinalizeTransferRequest: MessageFns<FinalizeTransferRequest> = {
|
|
|
8024
8288
|
if (message.leavesToSend?.length) {
|
|
8025
8289
|
obj.leavesToSend = message.leavesToSend.map((e) => SendLeafKeyTweak.toJSON(e));
|
|
8026
8290
|
}
|
|
8291
|
+
if (message.sparkPaymentIntent !== "") {
|
|
8292
|
+
obj.sparkPaymentIntent = message.sparkPaymentIntent;
|
|
8293
|
+
}
|
|
8027
8294
|
return obj;
|
|
8028
8295
|
},
|
|
8029
8296
|
|
|
@@ -8035,6 +8302,7 @@ export const FinalizeTransferRequest: MessageFns<FinalizeTransferRequest> = {
|
|
|
8035
8302
|
message.transferId = object.transferId ?? "";
|
|
8036
8303
|
message.ownerIdentityPublicKey = object.ownerIdentityPublicKey ?? new Uint8Array(0);
|
|
8037
8304
|
message.leavesToSend = object.leavesToSend?.map((e) => SendLeafKeyTweak.fromPartial(e)) || [];
|
|
8305
|
+
message.sparkPaymentIntent = object.sparkPaymentIntent ?? "";
|
|
8038
8306
|
return message;
|
|
8039
8307
|
},
|
|
8040
8308
|
};
|
|
@@ -8532,7 +8800,7 @@ export const TransferLeaf: MessageFns<TransferLeaf> = {
|
|
|
8532
8800
|
};
|
|
8533
8801
|
|
|
8534
8802
|
function createBaseTransferFilter(): TransferFilter {
|
|
8535
|
-
return { participant: undefined, transferIds: [], limit: 0, offset: 0, types: [], network: 0 };
|
|
8803
|
+
return { participant: undefined, transferIds: [], limit: 0, offset: 0, types: [], network: 0, statuses: [] };
|
|
8536
8804
|
}
|
|
8537
8805
|
|
|
8538
8806
|
export const TransferFilter: MessageFns<TransferFilter> = {
|
|
@@ -8565,6 +8833,11 @@ export const TransferFilter: MessageFns<TransferFilter> = {
|
|
|
8565
8833
|
if (message.network !== 0) {
|
|
8566
8834
|
writer.uint32(32).int32(message.network);
|
|
8567
8835
|
}
|
|
8836
|
+
writer.uint32(642).fork();
|
|
8837
|
+
for (const v of message.statuses) {
|
|
8838
|
+
writer.int32(v);
|
|
8839
|
+
}
|
|
8840
|
+
writer.join();
|
|
8568
8841
|
return writer;
|
|
8569
8842
|
},
|
|
8570
8843
|
|
|
@@ -8652,6 +8925,24 @@ export const TransferFilter: MessageFns<TransferFilter> = {
|
|
|
8652
8925
|
message.network = reader.int32() as any;
|
|
8653
8926
|
continue;
|
|
8654
8927
|
}
|
|
8928
|
+
case 80: {
|
|
8929
|
+
if (tag === 640) {
|
|
8930
|
+
message.statuses.push(reader.int32() as any);
|
|
8931
|
+
|
|
8932
|
+
continue;
|
|
8933
|
+
}
|
|
8934
|
+
|
|
8935
|
+
if (tag === 642) {
|
|
8936
|
+
const end2 = reader.uint32() + reader.pos;
|
|
8937
|
+
while (reader.pos < end2) {
|
|
8938
|
+
message.statuses.push(reader.int32() as any);
|
|
8939
|
+
}
|
|
8940
|
+
|
|
8941
|
+
continue;
|
|
8942
|
+
}
|
|
8943
|
+
|
|
8944
|
+
break;
|
|
8945
|
+
}
|
|
8655
8946
|
}
|
|
8656
8947
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8657
8948
|
break;
|
|
@@ -8669,13 +8960,13 @@ export const TransferFilter: MessageFns<TransferFilter> = {
|
|
|
8669
8960
|
receiverIdentityPublicKey: bytesFromBase64(object.receiverIdentityPublicKey),
|
|
8670
8961
|
}
|
|
8671
8962
|
: isSet(object.senderIdentityPublicKey)
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8963
|
+
? { $case: "senderIdentityPublicKey", senderIdentityPublicKey: bytesFromBase64(object.senderIdentityPublicKey) }
|
|
8964
|
+
: isSet(object.senderOrReceiverIdentityPublicKey)
|
|
8965
|
+
? {
|
|
8966
|
+
$case: "senderOrReceiverIdentityPublicKey",
|
|
8967
|
+
senderOrReceiverIdentityPublicKey: bytesFromBase64(object.senderOrReceiverIdentityPublicKey),
|
|
8968
|
+
}
|
|
8969
|
+
: undefined,
|
|
8679
8970
|
transferIds: globalThis.Array.isArray(object?.transferIds)
|
|
8680
8971
|
? object.transferIds.map((e: any) => globalThis.String(e))
|
|
8681
8972
|
: [],
|
|
@@ -8683,6 +8974,9 @@ export const TransferFilter: MessageFns<TransferFilter> = {
|
|
|
8683
8974
|
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
8684
8975
|
types: globalThis.Array.isArray(object?.types) ? object.types.map((e: any) => transferTypeFromJSON(e)) : [],
|
|
8685
8976
|
network: isSet(object.network) ? networkFromJSON(object.network) : 0,
|
|
8977
|
+
statuses: globalThis.Array.isArray(object?.statuses)
|
|
8978
|
+
? object.statuses.map((e: any) => transferStatusFromJSON(e))
|
|
8979
|
+
: [],
|
|
8686
8980
|
};
|
|
8687
8981
|
},
|
|
8688
8982
|
|
|
@@ -8710,6 +9004,9 @@ export const TransferFilter: MessageFns<TransferFilter> = {
|
|
|
8710
9004
|
if (message.network !== 0) {
|
|
8711
9005
|
obj.network = networkToJSON(message.network);
|
|
8712
9006
|
}
|
|
9007
|
+
if (message.statuses?.length) {
|
|
9008
|
+
obj.statuses = message.statuses.map((e) => transferStatusToJSON(e));
|
|
9009
|
+
}
|
|
8713
9010
|
return obj;
|
|
8714
9011
|
},
|
|
8715
9012
|
|
|
@@ -8761,6 +9058,7 @@ export const TransferFilter: MessageFns<TransferFilter> = {
|
|
|
8761
9058
|
message.offset = object.offset ?? 0;
|
|
8762
9059
|
message.types = object.types?.map((e) => e) || [];
|
|
8763
9060
|
message.network = object.network ?? 0;
|
|
9061
|
+
message.statuses = object.statuses?.map((e) => e) || [];
|
|
8764
9062
|
return message;
|
|
8765
9063
|
},
|
|
8766
9064
|
};
|
|
@@ -9289,219 +9587,6 @@ export const ClaimTransferSignRefundsResponse: MessageFns<ClaimTransferSignRefun
|
|
|
9289
9587
|
},
|
|
9290
9588
|
};
|
|
9291
9589
|
|
|
9292
|
-
function createBaseAggregateNodesRequest(): AggregateNodesRequest {
|
|
9293
|
-
return { nodeIds: [], signingJob: undefined, ownerIdentityPublicKey: new Uint8Array(0) };
|
|
9294
|
-
}
|
|
9295
|
-
|
|
9296
|
-
export const AggregateNodesRequest: MessageFns<AggregateNodesRequest> = {
|
|
9297
|
-
encode(message: AggregateNodesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9298
|
-
for (const v of message.nodeIds) {
|
|
9299
|
-
writer.uint32(10).string(v!);
|
|
9300
|
-
}
|
|
9301
|
-
if (message.signingJob !== undefined) {
|
|
9302
|
-
SigningJob.encode(message.signingJob, writer.uint32(18).fork()).join();
|
|
9303
|
-
}
|
|
9304
|
-
if (message.ownerIdentityPublicKey.length !== 0) {
|
|
9305
|
-
writer.uint32(26).bytes(message.ownerIdentityPublicKey);
|
|
9306
|
-
}
|
|
9307
|
-
return writer;
|
|
9308
|
-
},
|
|
9309
|
-
|
|
9310
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AggregateNodesRequest {
|
|
9311
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9312
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
9313
|
-
const message = createBaseAggregateNodesRequest();
|
|
9314
|
-
while (reader.pos < end) {
|
|
9315
|
-
const tag = reader.uint32();
|
|
9316
|
-
switch (tag >>> 3) {
|
|
9317
|
-
case 1: {
|
|
9318
|
-
if (tag !== 10) {
|
|
9319
|
-
break;
|
|
9320
|
-
}
|
|
9321
|
-
|
|
9322
|
-
message.nodeIds.push(reader.string());
|
|
9323
|
-
continue;
|
|
9324
|
-
}
|
|
9325
|
-
case 2: {
|
|
9326
|
-
if (tag !== 18) {
|
|
9327
|
-
break;
|
|
9328
|
-
}
|
|
9329
|
-
|
|
9330
|
-
message.signingJob = SigningJob.decode(reader, reader.uint32());
|
|
9331
|
-
continue;
|
|
9332
|
-
}
|
|
9333
|
-
case 3: {
|
|
9334
|
-
if (tag !== 26) {
|
|
9335
|
-
break;
|
|
9336
|
-
}
|
|
9337
|
-
|
|
9338
|
-
message.ownerIdentityPublicKey = reader.bytes();
|
|
9339
|
-
continue;
|
|
9340
|
-
}
|
|
9341
|
-
}
|
|
9342
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
9343
|
-
break;
|
|
9344
|
-
}
|
|
9345
|
-
reader.skip(tag & 7);
|
|
9346
|
-
}
|
|
9347
|
-
return message;
|
|
9348
|
-
},
|
|
9349
|
-
|
|
9350
|
-
fromJSON(object: any): AggregateNodesRequest {
|
|
9351
|
-
return {
|
|
9352
|
-
nodeIds: globalThis.Array.isArray(object?.nodeIds) ? object.nodeIds.map((e: any) => globalThis.String(e)) : [],
|
|
9353
|
-
signingJob: isSet(object.signingJob) ? SigningJob.fromJSON(object.signingJob) : undefined,
|
|
9354
|
-
ownerIdentityPublicKey: isSet(object.ownerIdentityPublicKey)
|
|
9355
|
-
? bytesFromBase64(object.ownerIdentityPublicKey)
|
|
9356
|
-
: new Uint8Array(0),
|
|
9357
|
-
};
|
|
9358
|
-
},
|
|
9359
|
-
|
|
9360
|
-
toJSON(message: AggregateNodesRequest): unknown {
|
|
9361
|
-
const obj: any = {};
|
|
9362
|
-
if (message.nodeIds?.length) {
|
|
9363
|
-
obj.nodeIds = message.nodeIds;
|
|
9364
|
-
}
|
|
9365
|
-
if (message.signingJob !== undefined) {
|
|
9366
|
-
obj.signingJob = SigningJob.toJSON(message.signingJob);
|
|
9367
|
-
}
|
|
9368
|
-
if (message.ownerIdentityPublicKey.length !== 0) {
|
|
9369
|
-
obj.ownerIdentityPublicKey = base64FromBytes(message.ownerIdentityPublicKey);
|
|
9370
|
-
}
|
|
9371
|
-
return obj;
|
|
9372
|
-
},
|
|
9373
|
-
|
|
9374
|
-
create(base?: DeepPartial<AggregateNodesRequest>): AggregateNodesRequest {
|
|
9375
|
-
return AggregateNodesRequest.fromPartial(base ?? {});
|
|
9376
|
-
},
|
|
9377
|
-
fromPartial(object: DeepPartial<AggregateNodesRequest>): AggregateNodesRequest {
|
|
9378
|
-
const message = createBaseAggregateNodesRequest();
|
|
9379
|
-
message.nodeIds = object.nodeIds?.map((e) => e) || [];
|
|
9380
|
-
message.signingJob = (object.signingJob !== undefined && object.signingJob !== null)
|
|
9381
|
-
? SigningJob.fromPartial(object.signingJob)
|
|
9382
|
-
: undefined;
|
|
9383
|
-
message.ownerIdentityPublicKey = object.ownerIdentityPublicKey ?? new Uint8Array(0);
|
|
9384
|
-
return message;
|
|
9385
|
-
},
|
|
9386
|
-
};
|
|
9387
|
-
|
|
9388
|
-
function createBaseAggregateNodesResponse(): AggregateNodesResponse {
|
|
9389
|
-
return {
|
|
9390
|
-
aggregateSignature: undefined,
|
|
9391
|
-
verifyingKey: new Uint8Array(0),
|
|
9392
|
-
parentNodeTx: new Uint8Array(0),
|
|
9393
|
-
parentNodeVout: 0,
|
|
9394
|
-
};
|
|
9395
|
-
}
|
|
9396
|
-
|
|
9397
|
-
export const AggregateNodesResponse: MessageFns<AggregateNodesResponse> = {
|
|
9398
|
-
encode(message: AggregateNodesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9399
|
-
if (message.aggregateSignature !== undefined) {
|
|
9400
|
-
SigningResult.encode(message.aggregateSignature, writer.uint32(10).fork()).join();
|
|
9401
|
-
}
|
|
9402
|
-
if (message.verifyingKey.length !== 0) {
|
|
9403
|
-
writer.uint32(18).bytes(message.verifyingKey);
|
|
9404
|
-
}
|
|
9405
|
-
if (message.parentNodeTx.length !== 0) {
|
|
9406
|
-
writer.uint32(26).bytes(message.parentNodeTx);
|
|
9407
|
-
}
|
|
9408
|
-
if (message.parentNodeVout !== 0) {
|
|
9409
|
-
writer.uint32(32).uint32(message.parentNodeVout);
|
|
9410
|
-
}
|
|
9411
|
-
return writer;
|
|
9412
|
-
},
|
|
9413
|
-
|
|
9414
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AggregateNodesResponse {
|
|
9415
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9416
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
9417
|
-
const message = createBaseAggregateNodesResponse();
|
|
9418
|
-
while (reader.pos < end) {
|
|
9419
|
-
const tag = reader.uint32();
|
|
9420
|
-
switch (tag >>> 3) {
|
|
9421
|
-
case 1: {
|
|
9422
|
-
if (tag !== 10) {
|
|
9423
|
-
break;
|
|
9424
|
-
}
|
|
9425
|
-
|
|
9426
|
-
message.aggregateSignature = SigningResult.decode(reader, reader.uint32());
|
|
9427
|
-
continue;
|
|
9428
|
-
}
|
|
9429
|
-
case 2: {
|
|
9430
|
-
if (tag !== 18) {
|
|
9431
|
-
break;
|
|
9432
|
-
}
|
|
9433
|
-
|
|
9434
|
-
message.verifyingKey = reader.bytes();
|
|
9435
|
-
continue;
|
|
9436
|
-
}
|
|
9437
|
-
case 3: {
|
|
9438
|
-
if (tag !== 26) {
|
|
9439
|
-
break;
|
|
9440
|
-
}
|
|
9441
|
-
|
|
9442
|
-
message.parentNodeTx = reader.bytes();
|
|
9443
|
-
continue;
|
|
9444
|
-
}
|
|
9445
|
-
case 4: {
|
|
9446
|
-
if (tag !== 32) {
|
|
9447
|
-
break;
|
|
9448
|
-
}
|
|
9449
|
-
|
|
9450
|
-
message.parentNodeVout = reader.uint32();
|
|
9451
|
-
continue;
|
|
9452
|
-
}
|
|
9453
|
-
}
|
|
9454
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
9455
|
-
break;
|
|
9456
|
-
}
|
|
9457
|
-
reader.skip(tag & 7);
|
|
9458
|
-
}
|
|
9459
|
-
return message;
|
|
9460
|
-
},
|
|
9461
|
-
|
|
9462
|
-
fromJSON(object: any): AggregateNodesResponse {
|
|
9463
|
-
return {
|
|
9464
|
-
aggregateSignature: isSet(object.aggregateSignature)
|
|
9465
|
-
? SigningResult.fromJSON(object.aggregateSignature)
|
|
9466
|
-
: undefined,
|
|
9467
|
-
verifyingKey: isSet(object.verifyingKey) ? bytesFromBase64(object.verifyingKey) : new Uint8Array(0),
|
|
9468
|
-
parentNodeTx: isSet(object.parentNodeTx) ? bytesFromBase64(object.parentNodeTx) : new Uint8Array(0),
|
|
9469
|
-
parentNodeVout: isSet(object.parentNodeVout) ? globalThis.Number(object.parentNodeVout) : 0,
|
|
9470
|
-
};
|
|
9471
|
-
},
|
|
9472
|
-
|
|
9473
|
-
toJSON(message: AggregateNodesResponse): unknown {
|
|
9474
|
-
const obj: any = {};
|
|
9475
|
-
if (message.aggregateSignature !== undefined) {
|
|
9476
|
-
obj.aggregateSignature = SigningResult.toJSON(message.aggregateSignature);
|
|
9477
|
-
}
|
|
9478
|
-
if (message.verifyingKey.length !== 0) {
|
|
9479
|
-
obj.verifyingKey = base64FromBytes(message.verifyingKey);
|
|
9480
|
-
}
|
|
9481
|
-
if (message.parentNodeTx.length !== 0) {
|
|
9482
|
-
obj.parentNodeTx = base64FromBytes(message.parentNodeTx);
|
|
9483
|
-
}
|
|
9484
|
-
if (message.parentNodeVout !== 0) {
|
|
9485
|
-
obj.parentNodeVout = Math.round(message.parentNodeVout);
|
|
9486
|
-
}
|
|
9487
|
-
return obj;
|
|
9488
|
-
},
|
|
9489
|
-
|
|
9490
|
-
create(base?: DeepPartial<AggregateNodesResponse>): AggregateNodesResponse {
|
|
9491
|
-
return AggregateNodesResponse.fromPartial(base ?? {});
|
|
9492
|
-
},
|
|
9493
|
-
fromPartial(object: DeepPartial<AggregateNodesResponse>): AggregateNodesResponse {
|
|
9494
|
-
const message = createBaseAggregateNodesResponse();
|
|
9495
|
-
message.aggregateSignature = (object.aggregateSignature !== undefined && object.aggregateSignature !== null)
|
|
9496
|
-
? SigningResult.fromPartial(object.aggregateSignature)
|
|
9497
|
-
: undefined;
|
|
9498
|
-
message.verifyingKey = object.verifyingKey ?? new Uint8Array(0);
|
|
9499
|
-
message.parentNodeTx = object.parentNodeTx ?? new Uint8Array(0);
|
|
9500
|
-
message.parentNodeVout = object.parentNodeVout ?? 0;
|
|
9501
|
-
return message;
|
|
9502
|
-
},
|
|
9503
|
-
};
|
|
9504
|
-
|
|
9505
9590
|
function createBaseStorePreimageShareRequest(): StorePreimageShareRequest {
|
|
9506
9591
|
return {
|
|
9507
9592
|
paymentHash: new Uint8Array(0),
|
|
@@ -11734,8 +11819,8 @@ export const PrepareTreeAddressRequest: MessageFns<PrepareTreeAddressRequest> =
|
|
|
11734
11819
|
source: isSet(object.parentNodeOutput)
|
|
11735
11820
|
? { $case: "parentNodeOutput", parentNodeOutput: NodeOutput.fromJSON(object.parentNodeOutput) }
|
|
11736
11821
|
: isSet(object.onChainUtxo)
|
|
11737
|
-
|
|
11738
|
-
|
|
11822
|
+
? { $case: "onChainUtxo", onChainUtxo: UTXO.fromJSON(object.onChainUtxo) }
|
|
11823
|
+
: undefined,
|
|
11739
11824
|
node: isSet(object.node) ? AddressRequestNode.fromJSON(object.node) : undefined,
|
|
11740
11825
|
userIdentityPublicKey: isSet(object.userIdentityPublicKey)
|
|
11741
11826
|
? bytesFromBase64(object.userIdentityPublicKey)
|
|
@@ -12103,8 +12188,8 @@ export const CreateTreeRequest: MessageFns<CreateTreeRequest> = {
|
|
|
12103
12188
|
source: isSet(object.parentNodeOutput)
|
|
12104
12189
|
? { $case: "parentNodeOutput", parentNodeOutput: NodeOutput.fromJSON(object.parentNodeOutput) }
|
|
12105
12190
|
: isSet(object.onChainUtxo)
|
|
12106
|
-
|
|
12107
|
-
|
|
12191
|
+
? { $case: "onChainUtxo", onChainUtxo: UTXO.fromJSON(object.onChainUtxo) }
|
|
12192
|
+
: undefined,
|
|
12108
12193
|
node: isSet(object.node) ? CreationNode.fromJSON(object.node) : undefined,
|
|
12109
12194
|
userIdentityPublicKey: isSet(object.userIdentityPublicKey)
|
|
12110
12195
|
? bytesFromBase64(object.userIdentityPublicKey)
|
|
@@ -13147,8 +13232,8 @@ export const QueryNodesRequest: MessageFns<QueryNodesRequest> = {
|
|
|
13147
13232
|
source: isSet(object.ownerIdentityPubkey)
|
|
13148
13233
|
? { $case: "ownerIdentityPubkey", ownerIdentityPubkey: bytesFromBase64(object.ownerIdentityPubkey) }
|
|
13149
13234
|
: isSet(object.nodeIds)
|
|
13150
|
-
|
|
13151
|
-
|
|
13235
|
+
? { $case: "nodeIds", nodeIds: TreeNodeIds.fromJSON(object.nodeIds) }
|
|
13236
|
+
: undefined,
|
|
13152
13237
|
includeParents: isSet(object.includeParents) ? globalThis.Boolean(object.includeParents) : false,
|
|
13153
13238
|
limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
|
|
13154
13239
|
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
@@ -13517,7 +13602,7 @@ export const CancelTransferResponse: MessageFns<CancelTransferResponse> = {
|
|
|
13517
13602
|
};
|
|
13518
13603
|
|
|
13519
13604
|
function createBaseQueryUnusedDepositAddressesRequest(): QueryUnusedDepositAddressesRequest {
|
|
13520
|
-
return { identityPublicKey: new Uint8Array(0), network: 0 };
|
|
13605
|
+
return { identityPublicKey: new Uint8Array(0), network: 0, limit: 0, offset: 0 };
|
|
13521
13606
|
}
|
|
13522
13607
|
|
|
13523
13608
|
export const QueryUnusedDepositAddressesRequest: MessageFns<QueryUnusedDepositAddressesRequest> = {
|
|
@@ -13528,6 +13613,12 @@ export const QueryUnusedDepositAddressesRequest: MessageFns<QueryUnusedDepositAd
|
|
|
13528
13613
|
if (message.network !== 0) {
|
|
13529
13614
|
writer.uint32(16).int32(message.network);
|
|
13530
13615
|
}
|
|
13616
|
+
if (message.limit !== 0) {
|
|
13617
|
+
writer.uint32(24).int64(message.limit);
|
|
13618
|
+
}
|
|
13619
|
+
if (message.offset !== 0) {
|
|
13620
|
+
writer.uint32(32).int64(message.offset);
|
|
13621
|
+
}
|
|
13531
13622
|
return writer;
|
|
13532
13623
|
},
|
|
13533
13624
|
|
|
@@ -13554,6 +13645,22 @@ export const QueryUnusedDepositAddressesRequest: MessageFns<QueryUnusedDepositAd
|
|
|
13554
13645
|
message.network = reader.int32() as any;
|
|
13555
13646
|
continue;
|
|
13556
13647
|
}
|
|
13648
|
+
case 3: {
|
|
13649
|
+
if (tag !== 24) {
|
|
13650
|
+
break;
|
|
13651
|
+
}
|
|
13652
|
+
|
|
13653
|
+
message.limit = longToNumber(reader.int64());
|
|
13654
|
+
continue;
|
|
13655
|
+
}
|
|
13656
|
+
case 4: {
|
|
13657
|
+
if (tag !== 32) {
|
|
13658
|
+
break;
|
|
13659
|
+
}
|
|
13660
|
+
|
|
13661
|
+
message.offset = longToNumber(reader.int64());
|
|
13662
|
+
continue;
|
|
13663
|
+
}
|
|
13557
13664
|
}
|
|
13558
13665
|
if ((tag & 7) === 4 || tag === 0) {
|
|
13559
13666
|
break;
|
|
@@ -13569,6 +13676,8 @@ export const QueryUnusedDepositAddressesRequest: MessageFns<QueryUnusedDepositAd
|
|
|
13569
13676
|
? bytesFromBase64(object.identityPublicKey)
|
|
13570
13677
|
: new Uint8Array(0),
|
|
13571
13678
|
network: isSet(object.network) ? networkFromJSON(object.network) : 0,
|
|
13679
|
+
limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
|
|
13680
|
+
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
13572
13681
|
};
|
|
13573
13682
|
},
|
|
13574
13683
|
|
|
@@ -13580,6 +13689,12 @@ export const QueryUnusedDepositAddressesRequest: MessageFns<QueryUnusedDepositAd
|
|
|
13580
13689
|
if (message.network !== 0) {
|
|
13581
13690
|
obj.network = networkToJSON(message.network);
|
|
13582
13691
|
}
|
|
13692
|
+
if (message.limit !== 0) {
|
|
13693
|
+
obj.limit = Math.round(message.limit);
|
|
13694
|
+
}
|
|
13695
|
+
if (message.offset !== 0) {
|
|
13696
|
+
obj.offset = Math.round(message.offset);
|
|
13697
|
+
}
|
|
13583
13698
|
return obj;
|
|
13584
13699
|
},
|
|
13585
13700
|
|
|
@@ -13590,6 +13705,8 @@ export const QueryUnusedDepositAddressesRequest: MessageFns<QueryUnusedDepositAd
|
|
|
13590
13705
|
const message = createBaseQueryUnusedDepositAddressesRequest();
|
|
13591
13706
|
message.identityPublicKey = object.identityPublicKey ?? new Uint8Array(0);
|
|
13592
13707
|
message.network = object.network ?? 0;
|
|
13708
|
+
message.limit = object.limit ?? 0;
|
|
13709
|
+
message.offset = object.offset ?? 0;
|
|
13593
13710
|
return message;
|
|
13594
13711
|
},
|
|
13595
13712
|
};
|
|
@@ -13822,7 +13939,7 @@ export const DepositAddressQueryResult: MessageFns<DepositAddressQueryResult> =
|
|
|
13822
13939
|
};
|
|
13823
13940
|
|
|
13824
13941
|
function createBaseQueryUnusedDepositAddressesResponse(): QueryUnusedDepositAddressesResponse {
|
|
13825
|
-
return { depositAddresses: [] };
|
|
13942
|
+
return { depositAddresses: [], offset: 0 };
|
|
13826
13943
|
}
|
|
13827
13944
|
|
|
13828
13945
|
export const QueryUnusedDepositAddressesResponse: MessageFns<QueryUnusedDepositAddressesResponse> = {
|
|
@@ -13830,6 +13947,9 @@ export const QueryUnusedDepositAddressesResponse: MessageFns<QueryUnusedDepositA
|
|
|
13830
13947
|
for (const v of message.depositAddresses) {
|
|
13831
13948
|
DepositAddressQueryResult.encode(v!, writer.uint32(10).fork()).join();
|
|
13832
13949
|
}
|
|
13950
|
+
if (message.offset !== 0) {
|
|
13951
|
+
writer.uint32(16).int64(message.offset);
|
|
13952
|
+
}
|
|
13833
13953
|
return writer;
|
|
13834
13954
|
},
|
|
13835
13955
|
|
|
@@ -13848,6 +13968,14 @@ export const QueryUnusedDepositAddressesResponse: MessageFns<QueryUnusedDepositA
|
|
|
13848
13968
|
message.depositAddresses.push(DepositAddressQueryResult.decode(reader, reader.uint32()));
|
|
13849
13969
|
continue;
|
|
13850
13970
|
}
|
|
13971
|
+
case 2: {
|
|
13972
|
+
if (tag !== 16) {
|
|
13973
|
+
break;
|
|
13974
|
+
}
|
|
13975
|
+
|
|
13976
|
+
message.offset = longToNumber(reader.int64());
|
|
13977
|
+
continue;
|
|
13978
|
+
}
|
|
13851
13979
|
}
|
|
13852
13980
|
if ((tag & 7) === 4 || tag === 0) {
|
|
13853
13981
|
break;
|
|
@@ -13862,6 +13990,7 @@ export const QueryUnusedDepositAddressesResponse: MessageFns<QueryUnusedDepositA
|
|
|
13862
13990
|
depositAddresses: globalThis.Array.isArray(object?.depositAddresses)
|
|
13863
13991
|
? object.depositAddresses.map((e: any) => DepositAddressQueryResult.fromJSON(e))
|
|
13864
13992
|
: [],
|
|
13993
|
+
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
13865
13994
|
};
|
|
13866
13995
|
},
|
|
13867
13996
|
|
|
@@ -13870,6 +13999,9 @@ export const QueryUnusedDepositAddressesResponse: MessageFns<QueryUnusedDepositA
|
|
|
13870
13999
|
if (message.depositAddresses?.length) {
|
|
13871
14000
|
obj.depositAddresses = message.depositAddresses.map((e) => DepositAddressQueryResult.toJSON(e));
|
|
13872
14001
|
}
|
|
14002
|
+
if (message.offset !== 0) {
|
|
14003
|
+
obj.offset = Math.round(message.offset);
|
|
14004
|
+
}
|
|
13873
14005
|
return obj;
|
|
13874
14006
|
},
|
|
13875
14007
|
|
|
@@ -13879,6 +14011,7 @@ export const QueryUnusedDepositAddressesResponse: MessageFns<QueryUnusedDepositA
|
|
|
13879
14011
|
fromPartial(object: DeepPartial<QueryUnusedDepositAddressesResponse>): QueryUnusedDepositAddressesResponse {
|
|
13880
14012
|
const message = createBaseQueryUnusedDepositAddressesResponse();
|
|
13881
14013
|
message.depositAddresses = object.depositAddresses?.map((e) => DepositAddressQueryResult.fromPartial(e)) || [];
|
|
14014
|
+
message.offset = object.offset ?? 0;
|
|
13882
14015
|
return message;
|
|
13883
14016
|
},
|
|
13884
14017
|
};
|
|
@@ -14517,8 +14650,8 @@ export const InitiateUtxoSwapRequest: MessageFns<InitiateUtxoSwapRequest> = {
|
|
|
14517
14650
|
amount: isSet(object.creditAmountSats)
|
|
14518
14651
|
? { $case: "creditAmountSats", creditAmountSats: globalThis.Number(object.creditAmountSats) }
|
|
14519
14652
|
: isSet(object.maxFeeSats)
|
|
14520
|
-
|
|
14521
|
-
|
|
14653
|
+
? { $case: "maxFeeSats", maxFeeSats: globalThis.Number(object.maxFeeSats) }
|
|
14654
|
+
: undefined,
|
|
14522
14655
|
sspSignature: isSet(object.sspSignature) ? bytesFromBase64(object.sspSignature) : new Uint8Array(0),
|
|
14523
14656
|
userSignature: isSet(object.userSignature) ? bytesFromBase64(object.userSignature) : new Uint8Array(0),
|
|
14524
14657
|
transfer: isSet(object.transfer) ? StartTransferRequest.fromJSON(object.transfer) : undefined,
|
|
@@ -15791,6 +15924,11 @@ export const SparkServiceDefinition = {
|
|
|
15791
15924
|
responseStream: false,
|
|
15792
15925
|
options: {},
|
|
15793
15926
|
},
|
|
15927
|
+
/**
|
|
15928
|
+
* This is deprecated, please use finalize_transfer_with_transfer_package instead.
|
|
15929
|
+
*
|
|
15930
|
+
* @deprecated
|
|
15931
|
+
*/
|
|
15794
15932
|
finalize_transfer: {
|
|
15795
15933
|
name: "finalize_transfer",
|
|
15796
15934
|
requestType: FinalizeTransferRequest,
|
|
@@ -15847,14 +15985,6 @@ export const SparkServiceDefinition = {
|
|
|
15847
15985
|
responseStream: false,
|
|
15848
15986
|
options: {},
|
|
15849
15987
|
},
|
|
15850
|
-
aggregate_nodes: {
|
|
15851
|
-
name: "aggregate_nodes",
|
|
15852
|
-
requestType: AggregateNodesRequest,
|
|
15853
|
-
requestStream: false,
|
|
15854
|
-
responseType: AggregateNodesResponse,
|
|
15855
|
-
responseStream: false,
|
|
15856
|
-
options: {},
|
|
15857
|
-
},
|
|
15858
15988
|
store_preimage_share: {
|
|
15859
15989
|
name: "store_preimage_share",
|
|
15860
15990
|
requestType: StorePreimageShareRequest,
|
|
@@ -16139,6 +16269,11 @@ export interface SparkServiceImplementation<CallContextExt = {}> {
|
|
|
16139
16269
|
request: StartTransferRequest,
|
|
16140
16270
|
context: CallContext & CallContextExt,
|
|
16141
16271
|
): Promise<DeepPartial<StartTransferResponse>>;
|
|
16272
|
+
/**
|
|
16273
|
+
* This is deprecated, please use finalize_transfer_with_transfer_package instead.
|
|
16274
|
+
*
|
|
16275
|
+
* @deprecated
|
|
16276
|
+
*/
|
|
16142
16277
|
finalize_transfer(
|
|
16143
16278
|
request: FinalizeTransferRequest,
|
|
16144
16279
|
context: CallContext & CallContextExt,
|
|
@@ -16167,10 +16302,6 @@ export interface SparkServiceImplementation<CallContextExt = {}> {
|
|
|
16167
16302
|
request: ClaimTransferSignRefundsRequest,
|
|
16168
16303
|
context: CallContext & CallContextExt,
|
|
16169
16304
|
): Promise<DeepPartial<ClaimTransferSignRefundsResponse>>;
|
|
16170
|
-
aggregate_nodes(
|
|
16171
|
-
request: AggregateNodesRequest,
|
|
16172
|
-
context: CallContext & CallContextExt,
|
|
16173
|
-
): Promise<DeepPartial<AggregateNodesResponse>>;
|
|
16174
16305
|
store_preimage_share(
|
|
16175
16306
|
request: StorePreimageShareRequest,
|
|
16176
16307
|
context: CallContext & CallContextExt,
|
|
@@ -16334,6 +16465,11 @@ export interface SparkServiceClient<CallOptionsExt = {}> {
|
|
|
16334
16465
|
request: DeepPartial<StartTransferRequest>,
|
|
16335
16466
|
options?: CallOptions & CallOptionsExt,
|
|
16336
16467
|
): Promise<StartTransferResponse>;
|
|
16468
|
+
/**
|
|
16469
|
+
* This is deprecated, please use finalize_transfer_with_transfer_package instead.
|
|
16470
|
+
*
|
|
16471
|
+
* @deprecated
|
|
16472
|
+
*/
|
|
16337
16473
|
finalize_transfer(
|
|
16338
16474
|
request: DeepPartial<FinalizeTransferRequest>,
|
|
16339
16475
|
options?: CallOptions & CallOptionsExt,
|
|
@@ -16362,10 +16498,6 @@ export interface SparkServiceClient<CallOptionsExt = {}> {
|
|
|
16362
16498
|
request: DeepPartial<ClaimTransferSignRefundsRequest>,
|
|
16363
16499
|
options?: CallOptions & CallOptionsExt,
|
|
16364
16500
|
): Promise<ClaimTransferSignRefundsResponse>;
|
|
16365
|
-
aggregate_nodes(
|
|
16366
|
-
request: DeepPartial<AggregateNodesRequest>,
|
|
16367
|
-
options?: CallOptions & CallOptionsExt,
|
|
16368
|
-
): Promise<AggregateNodesResponse>;
|
|
16369
16501
|
store_preimage_share(
|
|
16370
16502
|
request: DeepPartial<StorePreimageShareRequest>,
|
|
16371
16503
|
options?: CallOptions & CallOptionsExt,
|