@buildonspark/spark-sdk 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/bare/index.cjs +1683 -1901
- package/dist/bare/index.d.cts +242 -292
- package/dist/bare/index.d.ts +242 -292
- package/dist/bare/index.js +1604 -1829
- package/dist/{chunk-7LY7PJQL.js → chunk-23BBEC25.js} +14 -5
- package/dist/{chunk-R5VUHUJR.js → chunk-5Y7YILMA.js} +4153 -3728
- package/dist/{chunk-GIDAHHDB.js → chunk-6CMNEDBK.js} +217 -9
- package/dist/{chunk-J24LM4RO.js → chunk-76SYPHOC.js} +1 -1
- package/dist/{chunk-2HD3USKS.js → chunk-A5M55UR3.js} +0 -24
- package/dist/{client-BmnZ1xDg.d.cts → client-B9CAWKWz.d.cts} +1 -1
- package/dist/{client-DmjOifnt.d.ts → client-Dd3QnxQu.d.ts} +1 -1
- package/dist/debug.cjs +1680 -1957
- package/dist/debug.d.cts +13 -8
- package/dist/debug.d.ts +13 -8
- package/dist/debug.js +6 -8
- package/dist/graphql/objects/index.d.cts +3 -3
- package/dist/graphql/objects/index.d.ts +3 -3
- package/dist/index.cjs +1729 -1948
- package/dist/index.d.cts +18 -6
- package/dist/index.d.ts +18 -6
- package/dist/index.js +17 -8
- package/dist/index.node.cjs +1729 -1948
- package/dist/index.node.d.cts +7 -6
- package/dist/index.node.d.ts +7 -6
- package/dist/index.node.js +22 -6
- package/dist/native/index.cjs +1723 -1949
- package/dist/native/index.d.cts +80 -125
- package/dist/native/index.d.ts +80 -125
- package/dist/native/index.js +1652 -1884
- package/dist/proto/spark.cjs +0 -24
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark.js +1 -1
- package/dist/proto/spark_token.cjs +221 -8
- package/dist/proto/spark_token.d.cts +25 -2
- package/dist/proto/spark_token.d.ts +25 -2
- package/dist/proto/spark_token.js +12 -2
- package/dist/{spark-B305mDNB.d.cts → spark-CtGJPkx4.d.cts} +3 -31
- package/dist/{spark-B305mDNB.d.ts → spark-CtGJPkx4.d.ts} +3 -31
- package/dist/{spark-wallet-BdwARy70.d.cts → spark-wallet-Cp3yv6cK.d.ts} +40 -31
- package/dist/{spark-wallet-enp968Uc.d.ts → spark-wallet-yc2KhsVY.d.cts} +40 -31
- package/dist/{spark-wallet.node-CtpJlYBs.d.cts → spark-wallet.node-D0Qw5Wb4.d.cts} +1 -1
- package/dist/{spark-wallet.node-DqWcsNb6.d.ts → spark-wallet.node-D4IovOHu.d.ts} +1 -1
- package/dist/tests/test-utils.cjs +483 -1120
- package/dist/tests/test-utils.d.cts +9 -5
- package/dist/tests/test-utils.d.ts +9 -5
- package/dist/tests/test-utils.js +5 -6
- package/dist/{token-transactions-3-pVToE0.d.cts → token-transactions-0nmR9mQO.d.ts} +17 -12
- package/dist/{token-transactions-84Hp0hGz.d.ts → token-transactions-CwhlOgIP.d.cts} +17 -12
- package/dist/types/index.cjs +0 -24
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -2
- package/dist/{xchain-address-BtuJEbzG.d.cts → xchain-address-BPwpnmuY.d.ts} +9 -3
- package/dist/{xchain-address-Q1BrcwID.d.ts → xchain-address-CNQEwLjR.d.cts} +9 -3
- package/package.json +1 -1
- package/src/constants.ts +7 -1
- package/src/debug.ts +1 -1
- package/src/proto/spark.ts +2 -48
- package/src/proto/spark_token.ts +255 -7
- package/src/services/token-transactions.ts +92 -44
- package/src/services/transfer.ts +20 -17
- package/src/services/wallet-config.ts +2 -0
- package/src/signer/signer.react-native.ts +0 -2
- package/src/spark-wallet/spark-wallet.browser.ts +9 -8
- package/src/spark-wallet/spark-wallet.node.ts +8 -4
- package/src/spark-wallet/spark-wallet.ts +427 -229
- package/src/tests/address.test.ts +87 -1
- package/src/tests/integration/retry.test.ts +78 -0
- package/src/tests/integration/ssp/static-deposit-validation.test.ts +1 -1
- package/src/tests/integration/transfer.test.ts +285 -1
- package/src/tests/integration/wallet.test.ts +160 -0
- package/src/tests/{tokens.test.ts → token-hashing.test.ts} +150 -162
- package/src/tests/token-outputs.test.ts +194 -0
- package/src/tests/utils/spark-testing-wallet.ts +16 -8
- package/src/utils/address.ts +152 -11
- package/src/utils/invoice-hashing.test.ts +235 -0
- package/src/utils/invoice-hashing.ts +227 -0
- package/src/utils/mempool.ts +6 -0
- package/src/utils/retry.ts +116 -0
- package/src/utils/token-hashing.ts +566 -0
- package/src/utils/token-transactions.ts +9 -5
- package/dist/chunk-7N6R7G3E.js +0 -7
- package/dist/spark-wallet.browser-BYlprQpX.d.ts +0 -12
- package/dist/spark-wallet.browser-CVI2Ss3u.d.cts +0 -12
- package/src/services/tree-creation.ts +0 -893
- package/src/tests/integration/tree-creation.test.ts +0 -46
package/dist/proto/spark.cjs
CHANGED
|
@@ -15064,22 +15064,6 @@ var SparkServiceDefinition = {
|
|
|
15064
15064
|
responseStream: false,
|
|
15065
15065
|
options: {}
|
|
15066
15066
|
},
|
|
15067
|
-
prepare_tree_address: {
|
|
15068
|
-
name: "prepare_tree_address",
|
|
15069
|
-
requestType: PrepareTreeAddressRequest,
|
|
15070
|
-
requestStream: false,
|
|
15071
|
-
responseType: PrepareTreeAddressResponse,
|
|
15072
|
-
responseStream: false,
|
|
15073
|
-
options: {}
|
|
15074
|
-
},
|
|
15075
|
-
create_tree: {
|
|
15076
|
-
name: "create_tree",
|
|
15077
|
-
requestType: CreateTreeRequest,
|
|
15078
|
-
requestStream: false,
|
|
15079
|
-
responseType: CreateTreeResponse,
|
|
15080
|
-
responseStream: false,
|
|
15081
|
-
options: {}
|
|
15082
|
-
},
|
|
15083
15067
|
get_signing_operator_list: {
|
|
15084
15068
|
name: "get_signing_operator_list",
|
|
15085
15069
|
requestType: Empty,
|
|
@@ -15251,14 +15235,6 @@ var SparkServiceDefinition = {
|
|
|
15251
15235
|
* The following endpoints enforce inclusion of Direct Transactions used
|
|
15252
15236
|
* for unilateral exits
|
|
15253
15237
|
*/
|
|
15254
|
-
create_tree_v2: {
|
|
15255
|
-
name: "create_tree_v2",
|
|
15256
|
-
requestType: CreateTreeRequest,
|
|
15257
|
-
requestStream: false,
|
|
15258
|
-
responseType: CreateTreeResponse,
|
|
15259
|
-
responseStream: false,
|
|
15260
|
-
options: {}
|
|
15261
|
-
},
|
|
15262
15238
|
cooperative_exit_v2: {
|
|
15263
15239
|
name: "cooperative_exit_v2",
|
|
15264
15240
|
requestType: CooperativeExitRequest,
|
package/dist/proto/spark.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { M as Address, bf as AddressNode, bd as AddressRequestNode, bQ as BitcoinTransactionOutput, bx as CancelTransferRequest, by as CancelTransferResponse, aL as ClaimLeafKeyTweak, aM as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aO as ClaimTransferSignRefundsRequest, aP as ClaimTransferSignRefundsResponse, aN as ClaimTransferTweakKeysRequest, D as ConnectedEvent, b3 as CooperativeExitRequest, b4 as CooperativeExitResponse, b5 as CounterLeafSwapRequest, b6 as CounterLeafSwapResponse, bi as CreateTreeRequest, bk as CreateTreeResponse, bh as CreationNode, bj as CreationResponseNode, c2 as DeepPartial, I as DepositAddressProof, J as DepositAddressProof_AddressSignaturesEntry, bB as DepositAddressQueryResult, H as DepositEvent, bP as ExitSingleNodeTreeSigningResult, bR as ExitSingleNodeTreesRequest, bS as ExitSingleNodeTreesResponse, bO as ExitingTree, ba as ExtendLeafRequest, bc as ExtendLeafResponse, bb as ExtendLeafSigningResult, aw as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, ao as FinalizeTokenTransactionRequest, aH as FinalizeTransferRequest, aJ as FinalizeTransferResponse, aI as FinalizeTransferWithTransferPackageRequest, ap as FreezeTokensPayload, aq as FreezeTokensRequest, ar as FreezeTokensResponse, K as GenerateDepositAddressRequest, P as GenerateDepositAddressResponse, aS as GetSigningCommitmentsRequest, aT as GetSigningCommitmentsResponse, bm as GetSigningOperatorListResponse, bn as GetSigningOperatorListResponse_SigningOperatorsEntry, b_ as GetUtxosForAddressRequest, b$ as GetUtxosForAddressResponse, aZ as InitiatePreimageSwapRequest, a_ as InitiatePreimageSwapRequest_Reason, b1 as InitiatePreimageSwapResponse, bK as InitiateStaticDepositUtxoRefundRequest, bL as InitiateStaticDepositUtxoRefundResponse, bM as InitiateUtxoSwapRequest, bN as InitiateUtxoSwapResponse, bT as InvestigateLeavesRequest, aY as InvoiceAmount, aX as InvoiceAmountProof, al as KeyshareWithIndex, az as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, c4 as MessageFns, N as Network, W as NodeOutput, a1 as NodeSignatureShares, d as NodeSignatures, aj as OperatorSpecificOwnerSignature, ai as OperatorSpecificTokenTransactionSignablePayload, v as Order, b2 as OutPoint, O as OutputWithPreviousTransactionData, be as PrepareTreeAddressRequest, bg as PrepareTreeAddressResponse, bq as ProvidePreimageRequest, br as ProvidePreimageResponse, bE as QueryBalanceRequest, bF as QueryBalanceResponse, bG as QueryBalanceResponse_NodeBalancesEntry, bX as QueryNodesByValueRequest, bY as QueryNodesByValueResponse, bZ as QueryNodesByValueResponse_NodesEntry, bU as QueryNodesDistributionRequest, bV as QueryNodesDistributionResponse, bW as QueryNodesDistributionResponse_NodeDistributionEntry, bu as QueryNodesRequest, bv as QueryNodesResponse, bw as QueryNodesResponse_NodesEntry, bA as QueryStaticDepositAddressesRequest, bD as QueryStaticDepositAddressesResponse, as as QueryTokenOutputsRequest, av as QueryTokenOutputsResponse, at as QueryTokenTransactionsRequest, au as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bz as QueryUnusedDepositAddressesRequest, bC as QueryUnusedDepositAddressesResponse, bo as QueryUserSignedRefundsRequest, bp as QueryUserSignedRefundsResponse, b7 as RefreshTimelockRequest, b9 as RefreshTimelockResponse, b8 as RefreshTimelockSigningResult, R as RequestedSigningCommitments, aR as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bs as ReturnLightningPaymentRequest, an as RevocationSecretWithIndex, bI as SatsPayment, ay as SecretProof, ax as SecretShare, aF as SendLeafKeyTweak, aG as SendLeafKeyTweak_PubkeySharesTweakEntry, aE as SendLeafKeyTweaks, c3 as ServerStreamingMethodResult, ak as SignTokenTransactionRequest, am as SignTokenTransactionResponse, ae as SignatureWithIndex, aU as SigningCommitments, aV as SigningCommitments_SigningCommitmentsEntry, X as SigningJob, S as SigningKeyshare, Y as SigningKeyshare_PublicSharesEntry, bl as SigningOperatorInfo, Z as SigningResult, _ as SigningResult_PublicKeysEntry, a0 as SigningResult_SignatureSharesEntry, $ as SigningResult_SigningNonceCommitmentsEntry, bH as SparkAddress, e as SparkInvoiceFields, c as SparkServiceClient, c0 as SparkServiceDefinition, c1 as SparkServiceImplementation, ab as SpentTokenOutputMetadata, a4 as StartDepositTreeCreationRequest, a5 as StartDepositTreeCreationResponse, ag as StartTokenTransactionRequest, ah as StartTokenTransactionResponse, aB as StartTransferRequest, aC as StartTransferResponse, a2 as StartTreeCreationRequest, a3 as StartTreeCreationResponse, aA as StartUserSignedTransferRequest, aQ as StorePreimageShareRequest, B as SubscribeToEventsRequest, C as SubscribeToEventsResponse, a9 as TokenCreateInput, a8 as TokenMintInput, aa as TokenOutput, a6 as TokenOutputToSpend, T as TokenTransaction, ac as TokenTransactionConfirmationMetadata, af as TokenTransactionSignatures, l as TokenTransactionStatus, ad as TokenTransactionWithStatus, a7 as TokenTransferInput, bJ as TokensPayment, a as Transfer, G as TransferEvent, aK as TransferFilter, i as TransferLeaf, f as TransferPackage, aD as TransferPackage_KeyTweakPackageEntry, g as TransferStatus, h as TransferType, b as TreeNode, bt as TreeNodeIds, V as UTXO, aW as UserSignedRefund, U as UserSignedTxSigningJob, y as UtxoSwapRequestType, a$ as initiatePreimageSwapRequest_ReasonFromJSON, b0 as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, k as networkToJSON, w as orderFromJSON, x as orderToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, m as tokenTransactionStatusToJSON, o as transferStatusFromJSON, q as transferStatusToJSON, r as transferTypeFromJSON, u as transferTypeToJSON, z as utxoSwapRequestTypeFromJSON, A as utxoSwapRequestTypeToJSON } from '../spark-CtGJPkx4.cjs';
|
|
2
2
|
import '@bufbuild/protobuf/wire';
|
|
3
3
|
import 'nice-grpc-common';
|
package/dist/proto/spark.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { M as Address, bf as AddressNode, bd as AddressRequestNode, bQ as BitcoinTransactionOutput, bx as CancelTransferRequest, by as CancelTransferResponse, aL as ClaimLeafKeyTweak, aM as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aO as ClaimTransferSignRefundsRequest, aP as ClaimTransferSignRefundsResponse, aN as ClaimTransferTweakKeysRequest, D as ConnectedEvent, b3 as CooperativeExitRequest, b4 as CooperativeExitResponse, b5 as CounterLeafSwapRequest, b6 as CounterLeafSwapResponse, bi as CreateTreeRequest, bk as CreateTreeResponse, bh as CreationNode, bj as CreationResponseNode, c2 as DeepPartial, I as DepositAddressProof, J as DepositAddressProof_AddressSignaturesEntry, bB as DepositAddressQueryResult, H as DepositEvent, bP as ExitSingleNodeTreeSigningResult, bR as ExitSingleNodeTreesRequest, bS as ExitSingleNodeTreesResponse, bO as ExitingTree, ba as ExtendLeafRequest, bc as ExtendLeafResponse, bb as ExtendLeafSigningResult, aw as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, ao as FinalizeTokenTransactionRequest, aH as FinalizeTransferRequest, aJ as FinalizeTransferResponse, aI as FinalizeTransferWithTransferPackageRequest, ap as FreezeTokensPayload, aq as FreezeTokensRequest, ar as FreezeTokensResponse, K as GenerateDepositAddressRequest, P as GenerateDepositAddressResponse, aS as GetSigningCommitmentsRequest, aT as GetSigningCommitmentsResponse, bm as GetSigningOperatorListResponse, bn as GetSigningOperatorListResponse_SigningOperatorsEntry, b_ as GetUtxosForAddressRequest, b$ as GetUtxosForAddressResponse, aZ as InitiatePreimageSwapRequest, a_ as InitiatePreimageSwapRequest_Reason, b1 as InitiatePreimageSwapResponse, bK as InitiateStaticDepositUtxoRefundRequest, bL as InitiateStaticDepositUtxoRefundResponse, bM as InitiateUtxoSwapRequest, bN as InitiateUtxoSwapResponse, bT as InvestigateLeavesRequest, aY as InvoiceAmount, aX as InvoiceAmountProof, al as KeyshareWithIndex, az as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, c4 as MessageFns, N as Network, W as NodeOutput, a1 as NodeSignatureShares, d as NodeSignatures, aj as OperatorSpecificOwnerSignature, ai as OperatorSpecificTokenTransactionSignablePayload, v as Order, b2 as OutPoint, O as OutputWithPreviousTransactionData, be as PrepareTreeAddressRequest, bg as PrepareTreeAddressResponse, bq as ProvidePreimageRequest, br as ProvidePreimageResponse, bE as QueryBalanceRequest, bF as QueryBalanceResponse, bG as QueryBalanceResponse_NodeBalancesEntry, bX as QueryNodesByValueRequest, bY as QueryNodesByValueResponse, bZ as QueryNodesByValueResponse_NodesEntry, bU as QueryNodesDistributionRequest, bV as QueryNodesDistributionResponse, bW as QueryNodesDistributionResponse_NodeDistributionEntry, bu as QueryNodesRequest, bv as QueryNodesResponse, bw as QueryNodesResponse_NodesEntry, bA as QueryStaticDepositAddressesRequest, bD as QueryStaticDepositAddressesResponse, as as QueryTokenOutputsRequest, av as QueryTokenOutputsResponse, at as QueryTokenTransactionsRequest, au as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bz as QueryUnusedDepositAddressesRequest, bC as QueryUnusedDepositAddressesResponse, bo as QueryUserSignedRefundsRequest, bp as QueryUserSignedRefundsResponse, b7 as RefreshTimelockRequest, b9 as RefreshTimelockResponse, b8 as RefreshTimelockSigningResult, R as RequestedSigningCommitments, aR as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bs as ReturnLightningPaymentRequest, an as RevocationSecretWithIndex, bI as SatsPayment, ay as SecretProof, ax as SecretShare, aF as SendLeafKeyTweak, aG as SendLeafKeyTweak_PubkeySharesTweakEntry, aE as SendLeafKeyTweaks, c3 as ServerStreamingMethodResult, ak as SignTokenTransactionRequest, am as SignTokenTransactionResponse, ae as SignatureWithIndex, aU as SigningCommitments, aV as SigningCommitments_SigningCommitmentsEntry, X as SigningJob, S as SigningKeyshare, Y as SigningKeyshare_PublicSharesEntry, bl as SigningOperatorInfo, Z as SigningResult, _ as SigningResult_PublicKeysEntry, a0 as SigningResult_SignatureSharesEntry, $ as SigningResult_SigningNonceCommitmentsEntry, bH as SparkAddress, e as SparkInvoiceFields, c as SparkServiceClient, c0 as SparkServiceDefinition, c1 as SparkServiceImplementation, ab as SpentTokenOutputMetadata, a4 as StartDepositTreeCreationRequest, a5 as StartDepositTreeCreationResponse, ag as StartTokenTransactionRequest, ah as StartTokenTransactionResponse, aB as StartTransferRequest, aC as StartTransferResponse, a2 as StartTreeCreationRequest, a3 as StartTreeCreationResponse, aA as StartUserSignedTransferRequest, aQ as StorePreimageShareRequest, B as SubscribeToEventsRequest, C as SubscribeToEventsResponse, a9 as TokenCreateInput, a8 as TokenMintInput, aa as TokenOutput, a6 as TokenOutputToSpend, T as TokenTransaction, ac as TokenTransactionConfirmationMetadata, af as TokenTransactionSignatures, l as TokenTransactionStatus, ad as TokenTransactionWithStatus, a7 as TokenTransferInput, bJ as TokensPayment, a as Transfer, G as TransferEvent, aK as TransferFilter, i as TransferLeaf, f as TransferPackage, aD as TransferPackage_KeyTweakPackageEntry, g as TransferStatus, h as TransferType, b as TreeNode, bt as TreeNodeIds, V as UTXO, aW as UserSignedRefund, U as UserSignedTxSigningJob, y as UtxoSwapRequestType, a$ as initiatePreimageSwapRequest_ReasonFromJSON, b0 as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, k as networkToJSON, w as orderFromJSON, x as orderToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, m as tokenTransactionStatusToJSON, o as transferStatusFromJSON, q as transferStatusToJSON, r as transferTypeFromJSON, u as transferTypeToJSON, z as utxoSwapRequestTypeFromJSON, A as utxoSwapRequestTypeToJSON } from '../spark-CtGJPkx4.js';
|
|
2
2
|
import '@bufbuild/protobuf/wire';
|
|
3
3
|
import 'nice-grpc-common';
|
package/dist/proto/spark.js
CHANGED
|
@@ -20,12 +20,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/proto/spark_token.ts
|
|
21
21
|
var spark_token_exports = {};
|
|
22
22
|
__export(spark_token_exports, {
|
|
23
|
+
CommitProgress: () => CommitProgress,
|
|
24
|
+
CommitStatus: () => CommitStatus,
|
|
23
25
|
CommitTransactionRequest: () => CommitTransactionRequest,
|
|
24
26
|
CommitTransactionResponse: () => CommitTransactionResponse,
|
|
25
27
|
FreezeTokensPayload: () => FreezeTokensPayload,
|
|
26
28
|
FreezeTokensRequest: () => FreezeTokensRequest,
|
|
27
29
|
FreezeTokensResponse: () => FreezeTokensResponse,
|
|
28
30
|
InputTtxoSignaturesPerOperator: () => InputTtxoSignaturesPerOperator,
|
|
31
|
+
InvoiceAttachment: () => InvoiceAttachment,
|
|
29
32
|
OutputWithPreviousTransactionData: () => OutputWithPreviousTransactionData,
|
|
30
33
|
QueryTokenMetadataRequest: () => QueryTokenMetadataRequest,
|
|
31
34
|
QueryTokenMetadataResponse: () => QueryTokenMetadataResponse,
|
|
@@ -49,6 +52,8 @@ __export(spark_token_exports, {
|
|
|
49
52
|
TokenTransactionType: () => TokenTransactionType,
|
|
50
53
|
TokenTransactionWithStatus: () => TokenTransactionWithStatus,
|
|
51
54
|
TokenTransferInput: () => TokenTransferInput,
|
|
55
|
+
commitStatusFromJSON: () => commitStatusFromJSON,
|
|
56
|
+
commitStatusToJSON: () => commitStatusToJSON,
|
|
52
57
|
protobufPackage: () => protobufPackage,
|
|
53
58
|
tokenTransactionStatusFromJSON: () => tokenTransactionStatusFromJSON,
|
|
54
59
|
tokenTransactionStatusToJSON: () => tokenTransactionStatusToJSON,
|
|
@@ -503,6 +508,43 @@ function tokenTransactionTypeToJSON(object) {
|
|
|
503
508
|
return "UNRECOGNIZED";
|
|
504
509
|
}
|
|
505
510
|
}
|
|
511
|
+
var CommitStatus = /* @__PURE__ */ ((CommitStatus2) => {
|
|
512
|
+
CommitStatus2[CommitStatus2["COMMIT_UNSPECIFIED"] = 0] = "COMMIT_UNSPECIFIED";
|
|
513
|
+
CommitStatus2[CommitStatus2["COMMIT_PROCESSING"] = 1] = "COMMIT_PROCESSING";
|
|
514
|
+
CommitStatus2[CommitStatus2["COMMIT_FINALIZED"] = 2] = "COMMIT_FINALIZED";
|
|
515
|
+
CommitStatus2[CommitStatus2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
516
|
+
return CommitStatus2;
|
|
517
|
+
})(CommitStatus || {});
|
|
518
|
+
function commitStatusFromJSON(object) {
|
|
519
|
+
switch (object) {
|
|
520
|
+
case 0:
|
|
521
|
+
case "COMMIT_UNSPECIFIED":
|
|
522
|
+
return 0 /* COMMIT_UNSPECIFIED */;
|
|
523
|
+
case 1:
|
|
524
|
+
case "COMMIT_PROCESSING":
|
|
525
|
+
return 1 /* COMMIT_PROCESSING */;
|
|
526
|
+
case 2:
|
|
527
|
+
case "COMMIT_FINALIZED":
|
|
528
|
+
return 2 /* COMMIT_FINALIZED */;
|
|
529
|
+
case -1:
|
|
530
|
+
case "UNRECOGNIZED":
|
|
531
|
+
default:
|
|
532
|
+
return -1 /* UNRECOGNIZED */;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
function commitStatusToJSON(object) {
|
|
536
|
+
switch (object) {
|
|
537
|
+
case 0 /* COMMIT_UNSPECIFIED */:
|
|
538
|
+
return "COMMIT_UNSPECIFIED";
|
|
539
|
+
case 1 /* COMMIT_PROCESSING */:
|
|
540
|
+
return "COMMIT_PROCESSING";
|
|
541
|
+
case 2 /* COMMIT_FINALIZED */:
|
|
542
|
+
return "COMMIT_FINALIZED";
|
|
543
|
+
case -1 /* UNRECOGNIZED */:
|
|
544
|
+
default:
|
|
545
|
+
return "UNRECOGNIZED";
|
|
546
|
+
}
|
|
547
|
+
}
|
|
506
548
|
var TokenTransactionStatus = /* @__PURE__ */ ((TokenTransactionStatus2) => {
|
|
507
549
|
TokenTransactionStatus2[TokenTransactionStatus2["TOKEN_TRANSACTION_STARTED"] = 0] = "TOKEN_TRANSACTION_STARTED";
|
|
508
550
|
TokenTransactionStatus2[TokenTransactionStatus2["TOKEN_TRANSACTION_SIGNED"] = 1] = "TOKEN_TRANSACTION_SIGNED";
|
|
@@ -1079,7 +1121,8 @@ function createBaseTokenTransaction() {
|
|
|
1079
1121
|
sparkOperatorIdentityPublicKeys: [],
|
|
1080
1122
|
expiryTime: void 0,
|
|
1081
1123
|
network: 0,
|
|
1082
|
-
clientCreatedTimestamp: void 0
|
|
1124
|
+
clientCreatedTimestamp: void 0,
|
|
1125
|
+
invoiceAttachments: []
|
|
1083
1126
|
};
|
|
1084
1127
|
}
|
|
1085
1128
|
var TokenTransaction = {
|
|
@@ -1113,6 +1156,9 @@ var TokenTransaction = {
|
|
|
1113
1156
|
if (message.clientCreatedTimestamp !== void 0) {
|
|
1114
1157
|
Timestamp.encode(toTimestamp2(message.clientCreatedTimestamp), writer.uint32(74).fork()).join();
|
|
1115
1158
|
}
|
|
1159
|
+
for (const v of message.invoiceAttachments) {
|
|
1160
|
+
InvoiceAttachment.encode(v, writer.uint32(82).fork()).join();
|
|
1161
|
+
}
|
|
1116
1162
|
return writer;
|
|
1117
1163
|
},
|
|
1118
1164
|
decode(input, length) {
|
|
@@ -1188,6 +1234,13 @@ var TokenTransaction = {
|
|
|
1188
1234
|
message.clientCreatedTimestamp = fromTimestamp2(Timestamp.decode(reader, reader.uint32()));
|
|
1189
1235
|
continue;
|
|
1190
1236
|
}
|
|
1237
|
+
case 10: {
|
|
1238
|
+
if (tag !== 82) {
|
|
1239
|
+
break;
|
|
1240
|
+
}
|
|
1241
|
+
message.invoiceAttachments.push(InvoiceAttachment.decode(reader, reader.uint32()));
|
|
1242
|
+
continue;
|
|
1243
|
+
}
|
|
1191
1244
|
}
|
|
1192
1245
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1193
1246
|
break;
|
|
@@ -1204,7 +1257,8 @@ var TokenTransaction = {
|
|
|
1204
1257
|
sparkOperatorIdentityPublicKeys: globalThis.Array.isArray(object?.sparkOperatorIdentityPublicKeys) ? object.sparkOperatorIdentityPublicKeys.map((e) => bytesFromBase642(e)) : [],
|
|
1205
1258
|
expiryTime: isSet3(object.expiryTime) ? fromJsonTimestamp2(object.expiryTime) : void 0,
|
|
1206
1259
|
network: isSet3(object.network) ? networkFromJSON(object.network) : 0,
|
|
1207
|
-
clientCreatedTimestamp: isSet3(object.clientCreatedTimestamp) ? fromJsonTimestamp2(object.clientCreatedTimestamp) : void 0
|
|
1260
|
+
clientCreatedTimestamp: isSet3(object.clientCreatedTimestamp) ? fromJsonTimestamp2(object.clientCreatedTimestamp) : void 0,
|
|
1261
|
+
invoiceAttachments: globalThis.Array.isArray(object?.invoiceAttachments) ? object.invoiceAttachments.map((e) => InvoiceAttachment.fromJSON(e)) : []
|
|
1208
1262
|
};
|
|
1209
1263
|
},
|
|
1210
1264
|
toJSON(message) {
|
|
@@ -1234,6 +1288,9 @@ var TokenTransaction = {
|
|
|
1234
1288
|
if (message.clientCreatedTimestamp !== void 0) {
|
|
1235
1289
|
obj.clientCreatedTimestamp = message.clientCreatedTimestamp.toISOString();
|
|
1236
1290
|
}
|
|
1291
|
+
if (message.invoiceAttachments?.length) {
|
|
1292
|
+
obj.invoiceAttachments = message.invoiceAttachments.map((e) => InvoiceAttachment.toJSON(e));
|
|
1293
|
+
}
|
|
1237
1294
|
return obj;
|
|
1238
1295
|
},
|
|
1239
1296
|
create(base) {
|
|
@@ -1276,6 +1333,58 @@ var TokenTransaction = {
|
|
|
1276
1333
|
message.expiryTime = object.expiryTime ?? void 0;
|
|
1277
1334
|
message.network = object.network ?? 0;
|
|
1278
1335
|
message.clientCreatedTimestamp = object.clientCreatedTimestamp ?? void 0;
|
|
1336
|
+
message.invoiceAttachments = object.invoiceAttachments?.map((e) => InvoiceAttachment.fromPartial(e)) || [];
|
|
1337
|
+
return message;
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
function createBaseInvoiceAttachment() {
|
|
1341
|
+
return { sparkInvoice: "" };
|
|
1342
|
+
}
|
|
1343
|
+
var InvoiceAttachment = {
|
|
1344
|
+
encode(message, writer = new import_wire5.BinaryWriter()) {
|
|
1345
|
+
if (message.sparkInvoice !== "") {
|
|
1346
|
+
writer.uint32(10).string(message.sparkInvoice);
|
|
1347
|
+
}
|
|
1348
|
+
return writer;
|
|
1349
|
+
},
|
|
1350
|
+
decode(input, length) {
|
|
1351
|
+
const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
|
|
1352
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1353
|
+
const message = createBaseInvoiceAttachment();
|
|
1354
|
+
while (reader.pos < end) {
|
|
1355
|
+
const tag = reader.uint32();
|
|
1356
|
+
switch (tag >>> 3) {
|
|
1357
|
+
case 1: {
|
|
1358
|
+
if (tag !== 10) {
|
|
1359
|
+
break;
|
|
1360
|
+
}
|
|
1361
|
+
message.sparkInvoice = reader.string();
|
|
1362
|
+
continue;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1366
|
+
break;
|
|
1367
|
+
}
|
|
1368
|
+
reader.skip(tag & 7);
|
|
1369
|
+
}
|
|
1370
|
+
return message;
|
|
1371
|
+
},
|
|
1372
|
+
fromJSON(object) {
|
|
1373
|
+
return { sparkInvoice: isSet3(object.sparkInvoice) ? globalThis.String(object.sparkInvoice) : "" };
|
|
1374
|
+
},
|
|
1375
|
+
toJSON(message) {
|
|
1376
|
+
const obj = {};
|
|
1377
|
+
if (message.sparkInvoice !== "") {
|
|
1378
|
+
obj.sparkInvoice = message.sparkInvoice;
|
|
1379
|
+
}
|
|
1380
|
+
return obj;
|
|
1381
|
+
},
|
|
1382
|
+
create(base) {
|
|
1383
|
+
return InvoiceAttachment.fromPartial(base ?? {});
|
|
1384
|
+
},
|
|
1385
|
+
fromPartial(object) {
|
|
1386
|
+
const message = createBaseInvoiceAttachment();
|
|
1387
|
+
message.sparkInvoice = object.sparkInvoice ?? "";
|
|
1279
1388
|
return message;
|
|
1280
1389
|
}
|
|
1281
1390
|
};
|
|
@@ -1693,11 +1802,85 @@ var CommitTransactionRequest = {
|
|
|
1693
1802
|
return message;
|
|
1694
1803
|
}
|
|
1695
1804
|
};
|
|
1805
|
+
function createBaseCommitProgress() {
|
|
1806
|
+
return { committedOperatorPublicKeys: [], uncommittedOperatorPublicKeys: [] };
|
|
1807
|
+
}
|
|
1808
|
+
var CommitProgress = {
|
|
1809
|
+
encode(message, writer = new import_wire5.BinaryWriter()) {
|
|
1810
|
+
for (const v of message.committedOperatorPublicKeys) {
|
|
1811
|
+
writer.uint32(10).bytes(v);
|
|
1812
|
+
}
|
|
1813
|
+
for (const v of message.uncommittedOperatorPublicKeys) {
|
|
1814
|
+
writer.uint32(18).bytes(v);
|
|
1815
|
+
}
|
|
1816
|
+
return writer;
|
|
1817
|
+
},
|
|
1818
|
+
decode(input, length) {
|
|
1819
|
+
const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
|
|
1820
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1821
|
+
const message = createBaseCommitProgress();
|
|
1822
|
+
while (reader.pos < end) {
|
|
1823
|
+
const tag = reader.uint32();
|
|
1824
|
+
switch (tag >>> 3) {
|
|
1825
|
+
case 1: {
|
|
1826
|
+
if (tag !== 10) {
|
|
1827
|
+
break;
|
|
1828
|
+
}
|
|
1829
|
+
message.committedOperatorPublicKeys.push(reader.bytes());
|
|
1830
|
+
continue;
|
|
1831
|
+
}
|
|
1832
|
+
case 2: {
|
|
1833
|
+
if (tag !== 18) {
|
|
1834
|
+
break;
|
|
1835
|
+
}
|
|
1836
|
+
message.uncommittedOperatorPublicKeys.push(reader.bytes());
|
|
1837
|
+
continue;
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1841
|
+
break;
|
|
1842
|
+
}
|
|
1843
|
+
reader.skip(tag & 7);
|
|
1844
|
+
}
|
|
1845
|
+
return message;
|
|
1846
|
+
},
|
|
1847
|
+
fromJSON(object) {
|
|
1848
|
+
return {
|
|
1849
|
+
committedOperatorPublicKeys: globalThis.Array.isArray(object?.committedOperatorPublicKeys) ? object.committedOperatorPublicKeys.map((e) => bytesFromBase642(e)) : [],
|
|
1850
|
+
uncommittedOperatorPublicKeys: globalThis.Array.isArray(object?.uncommittedOperatorPublicKeys) ? object.uncommittedOperatorPublicKeys.map((e) => bytesFromBase642(e)) : []
|
|
1851
|
+
};
|
|
1852
|
+
},
|
|
1853
|
+
toJSON(message) {
|
|
1854
|
+
const obj = {};
|
|
1855
|
+
if (message.committedOperatorPublicKeys?.length) {
|
|
1856
|
+
obj.committedOperatorPublicKeys = message.committedOperatorPublicKeys.map((e) => base64FromBytes2(e));
|
|
1857
|
+
}
|
|
1858
|
+
if (message.uncommittedOperatorPublicKeys?.length) {
|
|
1859
|
+
obj.uncommittedOperatorPublicKeys = message.uncommittedOperatorPublicKeys.map((e) => base64FromBytes2(e));
|
|
1860
|
+
}
|
|
1861
|
+
return obj;
|
|
1862
|
+
},
|
|
1863
|
+
create(base) {
|
|
1864
|
+
return CommitProgress.fromPartial(base ?? {});
|
|
1865
|
+
},
|
|
1866
|
+
fromPartial(object) {
|
|
1867
|
+
const message = createBaseCommitProgress();
|
|
1868
|
+
message.committedOperatorPublicKeys = object.committedOperatorPublicKeys?.map((e) => e) || [];
|
|
1869
|
+
message.uncommittedOperatorPublicKeys = object.uncommittedOperatorPublicKeys?.map((e) => e) || [];
|
|
1870
|
+
return message;
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1696
1873
|
function createBaseCommitTransactionResponse() {
|
|
1697
|
-
return {};
|
|
1874
|
+
return { commitStatus: 0, commitProgress: void 0 };
|
|
1698
1875
|
}
|
|
1699
1876
|
var CommitTransactionResponse = {
|
|
1700
|
-
encode(
|
|
1877
|
+
encode(message, writer = new import_wire5.BinaryWriter()) {
|
|
1878
|
+
if (message.commitStatus !== 0) {
|
|
1879
|
+
writer.uint32(8).int32(message.commitStatus);
|
|
1880
|
+
}
|
|
1881
|
+
if (message.commitProgress !== void 0) {
|
|
1882
|
+
CommitProgress.encode(message.commitProgress, writer.uint32(18).fork()).join();
|
|
1883
|
+
}
|
|
1701
1884
|
return writer;
|
|
1702
1885
|
},
|
|
1703
1886
|
decode(input, length) {
|
|
@@ -1707,6 +1890,20 @@ var CommitTransactionResponse = {
|
|
|
1707
1890
|
while (reader.pos < end) {
|
|
1708
1891
|
const tag = reader.uint32();
|
|
1709
1892
|
switch (tag >>> 3) {
|
|
1893
|
+
case 1: {
|
|
1894
|
+
if (tag !== 8) {
|
|
1895
|
+
break;
|
|
1896
|
+
}
|
|
1897
|
+
message.commitStatus = reader.int32();
|
|
1898
|
+
continue;
|
|
1899
|
+
}
|
|
1900
|
+
case 2: {
|
|
1901
|
+
if (tag !== 18) {
|
|
1902
|
+
break;
|
|
1903
|
+
}
|
|
1904
|
+
message.commitProgress = CommitProgress.decode(reader, reader.uint32());
|
|
1905
|
+
continue;
|
|
1906
|
+
}
|
|
1710
1907
|
}
|
|
1711
1908
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1712
1909
|
break;
|
|
@@ -1715,18 +1912,29 @@ var CommitTransactionResponse = {
|
|
|
1715
1912
|
}
|
|
1716
1913
|
return message;
|
|
1717
1914
|
},
|
|
1718
|
-
fromJSON(
|
|
1719
|
-
return {
|
|
1915
|
+
fromJSON(object) {
|
|
1916
|
+
return {
|
|
1917
|
+
commitStatus: isSet3(object.commitStatus) ? commitStatusFromJSON(object.commitStatus) : 0,
|
|
1918
|
+
commitProgress: isSet3(object.commitProgress) ? CommitProgress.fromJSON(object.commitProgress) : void 0
|
|
1919
|
+
};
|
|
1720
1920
|
},
|
|
1721
|
-
toJSON(
|
|
1921
|
+
toJSON(message) {
|
|
1722
1922
|
const obj = {};
|
|
1923
|
+
if (message.commitStatus !== 0) {
|
|
1924
|
+
obj.commitStatus = commitStatusToJSON(message.commitStatus);
|
|
1925
|
+
}
|
|
1926
|
+
if (message.commitProgress !== void 0) {
|
|
1927
|
+
obj.commitProgress = CommitProgress.toJSON(message.commitProgress);
|
|
1928
|
+
}
|
|
1723
1929
|
return obj;
|
|
1724
1930
|
},
|
|
1725
1931
|
create(base) {
|
|
1726
1932
|
return CommitTransactionResponse.fromPartial(base ?? {});
|
|
1727
1933
|
},
|
|
1728
|
-
fromPartial(
|
|
1934
|
+
fromPartial(object) {
|
|
1729
1935
|
const message = createBaseCommitTransactionResponse();
|
|
1936
|
+
message.commitStatus = object.commitStatus ?? 0;
|
|
1937
|
+
message.commitProgress = object.commitProgress !== void 0 && object.commitProgress !== null ? CommitProgress.fromPartial(object.commitProgress) : void 0;
|
|
1730
1938
|
return message;
|
|
1731
1939
|
}
|
|
1732
1940
|
};
|
|
@@ -3107,12 +3315,15 @@ function isSet3(value) {
|
|
|
3107
3315
|
}
|
|
3108
3316
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3109
3317
|
0 && (module.exports = {
|
|
3318
|
+
CommitProgress,
|
|
3319
|
+
CommitStatus,
|
|
3110
3320
|
CommitTransactionRequest,
|
|
3111
3321
|
CommitTransactionResponse,
|
|
3112
3322
|
FreezeTokensPayload,
|
|
3113
3323
|
FreezeTokensRequest,
|
|
3114
3324
|
FreezeTokensResponse,
|
|
3115
3325
|
InputTtxoSignaturesPerOperator,
|
|
3326
|
+
InvoiceAttachment,
|
|
3116
3327
|
OutputWithPreviousTransactionData,
|
|
3117
3328
|
QueryTokenMetadataRequest,
|
|
3118
3329
|
QueryTokenMetadataResponse,
|
|
@@ -3136,6 +3347,8 @@ function isSet3(value) {
|
|
|
3136
3347
|
TokenTransactionType,
|
|
3137
3348
|
TokenTransactionWithStatus,
|
|
3138
3349
|
TokenTransferInput,
|
|
3350
|
+
commitStatusFromJSON,
|
|
3351
|
+
commitStatusToJSON,
|
|
3139
3352
|
protobufPackage,
|
|
3140
3353
|
tokenTransactionStatusFromJSON,
|
|
3141
3354
|
tokenTransactionStatusToJSON,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
2
|
import { CallOptions, CallContext } from 'nice-grpc-common';
|
|
3
|
-
import { N as Network, S as SigningKeyshare } from '../spark-
|
|
3
|
+
import { N as Network, S as SigningKeyshare } from '../spark-CtGJPkx4.cjs';
|
|
4
4
|
|
|
5
5
|
declare const protobufPackage = "spark_token";
|
|
6
6
|
declare enum TokenTransactionType {
|
|
@@ -12,6 +12,14 @@ declare enum TokenTransactionType {
|
|
|
12
12
|
}
|
|
13
13
|
declare function tokenTransactionTypeFromJSON(object: any): TokenTransactionType;
|
|
14
14
|
declare function tokenTransactionTypeToJSON(object: TokenTransactionType): string;
|
|
15
|
+
declare enum CommitStatus {
|
|
16
|
+
COMMIT_UNSPECIFIED = 0,
|
|
17
|
+
COMMIT_PROCESSING = 1,
|
|
18
|
+
COMMIT_FINALIZED = 2,
|
|
19
|
+
UNRECOGNIZED = -1
|
|
20
|
+
}
|
|
21
|
+
declare function commitStatusFromJSON(object: any): CommitStatus;
|
|
22
|
+
declare function commitStatusToJSON(object: CommitStatus): string;
|
|
15
23
|
declare enum TokenTransactionStatus {
|
|
16
24
|
TOKEN_TRANSACTION_STARTED = 0,
|
|
17
25
|
TOKEN_TRANSACTION_SIGNED = 1,
|
|
@@ -44,7 +52,9 @@ interface TokenMintInput {
|
|
|
44
52
|
declare const TokenMintInput: MessageFns<TokenMintInput>;
|
|
45
53
|
interface TokenCreateInput {
|
|
46
54
|
issuerPublicKey: Uint8Array;
|
|
55
|
+
/** No minimum length because a single utf-8 character can be 3 bytes. */
|
|
47
56
|
tokenName: string;
|
|
57
|
+
/** No minimum length because a single utf-8 character can be 3 bytes. */
|
|
48
58
|
tokenTicker: string;
|
|
49
59
|
decimals: number;
|
|
50
60
|
/** Decoded uint128 */
|
|
@@ -109,8 +119,14 @@ interface TokenTransaction {
|
|
|
109
119
|
* timestamps win over later ones.
|
|
110
120
|
*/
|
|
111
121
|
clientCreatedTimestamp: Date | undefined;
|
|
122
|
+
/** The spark invoices this transaction fulfills. */
|
|
123
|
+
invoiceAttachments: InvoiceAttachment[];
|
|
112
124
|
}
|
|
113
125
|
declare const TokenTransaction: MessageFns<TokenTransaction>;
|
|
126
|
+
interface InvoiceAttachment {
|
|
127
|
+
sparkInvoice: string;
|
|
128
|
+
}
|
|
129
|
+
declare const InvoiceAttachment: MessageFns<InvoiceAttachment>;
|
|
114
130
|
interface SignatureWithIndex {
|
|
115
131
|
/**
|
|
116
132
|
* This is a Schnorr or ECDSA DER signature which can be between 64 and 73
|
|
@@ -161,7 +177,14 @@ interface CommitTransactionRequest {
|
|
|
161
177
|
ownerIdentityPublicKey: Uint8Array;
|
|
162
178
|
}
|
|
163
179
|
declare const CommitTransactionRequest: MessageFns<CommitTransactionRequest>;
|
|
180
|
+
interface CommitProgress {
|
|
181
|
+
committedOperatorPublicKeys: Uint8Array[];
|
|
182
|
+
uncommittedOperatorPublicKeys: Uint8Array[];
|
|
183
|
+
}
|
|
184
|
+
declare const CommitProgress: MessageFns<CommitProgress>;
|
|
164
185
|
interface CommitTransactionResponse {
|
|
186
|
+
commitStatus: CommitStatus;
|
|
187
|
+
commitProgress: CommitProgress | undefined;
|
|
165
188
|
}
|
|
166
189
|
declare const CommitTransactionResponse: MessageFns<CommitTransactionResponse>;
|
|
167
190
|
interface QueryTokenMetadataRequest {
|
|
@@ -384,4 +407,4 @@ interface MessageFns<T> {
|
|
|
384
407
|
fromPartial(object: DeepPartial<T>): T;
|
|
385
408
|
}
|
|
386
409
|
|
|
387
|
-
export { CommitTransactionRequest, CommitTransactionResponse, type DeepPartial, FreezeTokensPayload, FreezeTokensRequest, FreezeTokensResponse, InputTtxoSignaturesPerOperator, type MessageFns, OutputWithPreviousTransactionData, QueryTokenMetadataRequest, QueryTokenMetadataResponse, QueryTokenOutputsRequest, QueryTokenOutputsResponse, QueryTokenTransactionsRequest, QueryTokenTransactionsResponse, SignatureWithIndex, type SparkTokenServiceClient, SparkTokenServiceDefinition, type SparkTokenServiceImplementation, SpentTokenOutputMetadata, StartTransactionRequest, StartTransactionResponse, TokenCreateInput, TokenMetadata, TokenMintInput, TokenOutput, TokenOutputToSpend, TokenTransaction, TokenTransactionConfirmationMetadata, TokenTransactionStatus, TokenTransactionType, TokenTransactionWithStatus, TokenTransferInput, protobufPackage, tokenTransactionStatusFromJSON, tokenTransactionStatusToJSON, tokenTransactionTypeFromJSON, tokenTransactionTypeToJSON };
|
|
410
|
+
export { CommitProgress, CommitStatus, CommitTransactionRequest, CommitTransactionResponse, type DeepPartial, FreezeTokensPayload, FreezeTokensRequest, FreezeTokensResponse, InputTtxoSignaturesPerOperator, InvoiceAttachment, type MessageFns, OutputWithPreviousTransactionData, QueryTokenMetadataRequest, QueryTokenMetadataResponse, QueryTokenOutputsRequest, QueryTokenOutputsResponse, QueryTokenTransactionsRequest, QueryTokenTransactionsResponse, SignatureWithIndex, type SparkTokenServiceClient, SparkTokenServiceDefinition, type SparkTokenServiceImplementation, SpentTokenOutputMetadata, StartTransactionRequest, StartTransactionResponse, TokenCreateInput, TokenMetadata, TokenMintInput, TokenOutput, TokenOutputToSpend, TokenTransaction, TokenTransactionConfirmationMetadata, TokenTransactionStatus, TokenTransactionType, TokenTransactionWithStatus, TokenTransferInput, commitStatusFromJSON, commitStatusToJSON, protobufPackage, tokenTransactionStatusFromJSON, tokenTransactionStatusToJSON, tokenTransactionTypeFromJSON, tokenTransactionTypeToJSON };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
2
|
import { CallOptions, CallContext } from 'nice-grpc-common';
|
|
3
|
-
import { N as Network, S as SigningKeyshare } from '../spark-
|
|
3
|
+
import { N as Network, S as SigningKeyshare } from '../spark-CtGJPkx4.js';
|
|
4
4
|
|
|
5
5
|
declare const protobufPackage = "spark_token";
|
|
6
6
|
declare enum TokenTransactionType {
|
|
@@ -12,6 +12,14 @@ declare enum TokenTransactionType {
|
|
|
12
12
|
}
|
|
13
13
|
declare function tokenTransactionTypeFromJSON(object: any): TokenTransactionType;
|
|
14
14
|
declare function tokenTransactionTypeToJSON(object: TokenTransactionType): string;
|
|
15
|
+
declare enum CommitStatus {
|
|
16
|
+
COMMIT_UNSPECIFIED = 0,
|
|
17
|
+
COMMIT_PROCESSING = 1,
|
|
18
|
+
COMMIT_FINALIZED = 2,
|
|
19
|
+
UNRECOGNIZED = -1
|
|
20
|
+
}
|
|
21
|
+
declare function commitStatusFromJSON(object: any): CommitStatus;
|
|
22
|
+
declare function commitStatusToJSON(object: CommitStatus): string;
|
|
15
23
|
declare enum TokenTransactionStatus {
|
|
16
24
|
TOKEN_TRANSACTION_STARTED = 0,
|
|
17
25
|
TOKEN_TRANSACTION_SIGNED = 1,
|
|
@@ -44,7 +52,9 @@ interface TokenMintInput {
|
|
|
44
52
|
declare const TokenMintInput: MessageFns<TokenMintInput>;
|
|
45
53
|
interface TokenCreateInput {
|
|
46
54
|
issuerPublicKey: Uint8Array;
|
|
55
|
+
/** No minimum length because a single utf-8 character can be 3 bytes. */
|
|
47
56
|
tokenName: string;
|
|
57
|
+
/** No minimum length because a single utf-8 character can be 3 bytes. */
|
|
48
58
|
tokenTicker: string;
|
|
49
59
|
decimals: number;
|
|
50
60
|
/** Decoded uint128 */
|
|
@@ -109,8 +119,14 @@ interface TokenTransaction {
|
|
|
109
119
|
* timestamps win over later ones.
|
|
110
120
|
*/
|
|
111
121
|
clientCreatedTimestamp: Date | undefined;
|
|
122
|
+
/** The spark invoices this transaction fulfills. */
|
|
123
|
+
invoiceAttachments: InvoiceAttachment[];
|
|
112
124
|
}
|
|
113
125
|
declare const TokenTransaction: MessageFns<TokenTransaction>;
|
|
126
|
+
interface InvoiceAttachment {
|
|
127
|
+
sparkInvoice: string;
|
|
128
|
+
}
|
|
129
|
+
declare const InvoiceAttachment: MessageFns<InvoiceAttachment>;
|
|
114
130
|
interface SignatureWithIndex {
|
|
115
131
|
/**
|
|
116
132
|
* This is a Schnorr or ECDSA DER signature which can be between 64 and 73
|
|
@@ -161,7 +177,14 @@ interface CommitTransactionRequest {
|
|
|
161
177
|
ownerIdentityPublicKey: Uint8Array;
|
|
162
178
|
}
|
|
163
179
|
declare const CommitTransactionRequest: MessageFns<CommitTransactionRequest>;
|
|
180
|
+
interface CommitProgress {
|
|
181
|
+
committedOperatorPublicKeys: Uint8Array[];
|
|
182
|
+
uncommittedOperatorPublicKeys: Uint8Array[];
|
|
183
|
+
}
|
|
184
|
+
declare const CommitProgress: MessageFns<CommitProgress>;
|
|
164
185
|
interface CommitTransactionResponse {
|
|
186
|
+
commitStatus: CommitStatus;
|
|
187
|
+
commitProgress: CommitProgress | undefined;
|
|
165
188
|
}
|
|
166
189
|
declare const CommitTransactionResponse: MessageFns<CommitTransactionResponse>;
|
|
167
190
|
interface QueryTokenMetadataRequest {
|
|
@@ -384,4 +407,4 @@ interface MessageFns<T> {
|
|
|
384
407
|
fromPartial(object: DeepPartial<T>): T;
|
|
385
408
|
}
|
|
386
409
|
|
|
387
|
-
export { CommitTransactionRequest, CommitTransactionResponse, type DeepPartial, FreezeTokensPayload, FreezeTokensRequest, FreezeTokensResponse, InputTtxoSignaturesPerOperator, type MessageFns, OutputWithPreviousTransactionData, QueryTokenMetadataRequest, QueryTokenMetadataResponse, QueryTokenOutputsRequest, QueryTokenOutputsResponse, QueryTokenTransactionsRequest, QueryTokenTransactionsResponse, SignatureWithIndex, type SparkTokenServiceClient, SparkTokenServiceDefinition, type SparkTokenServiceImplementation, SpentTokenOutputMetadata, StartTransactionRequest, StartTransactionResponse, TokenCreateInput, TokenMetadata, TokenMintInput, TokenOutput, TokenOutputToSpend, TokenTransaction, TokenTransactionConfirmationMetadata, TokenTransactionStatus, TokenTransactionType, TokenTransactionWithStatus, TokenTransferInput, protobufPackage, tokenTransactionStatusFromJSON, tokenTransactionStatusToJSON, tokenTransactionTypeFromJSON, tokenTransactionTypeToJSON };
|
|
410
|
+
export { CommitProgress, CommitStatus, CommitTransactionRequest, CommitTransactionResponse, type DeepPartial, FreezeTokensPayload, FreezeTokensRequest, FreezeTokensResponse, InputTtxoSignaturesPerOperator, InvoiceAttachment, type MessageFns, OutputWithPreviousTransactionData, QueryTokenMetadataRequest, QueryTokenMetadataResponse, QueryTokenOutputsRequest, QueryTokenOutputsResponse, QueryTokenTransactionsRequest, QueryTokenTransactionsResponse, SignatureWithIndex, type SparkTokenServiceClient, SparkTokenServiceDefinition, type SparkTokenServiceImplementation, SpentTokenOutputMetadata, StartTransactionRequest, StartTransactionResponse, TokenCreateInput, TokenMetadata, TokenMintInput, TokenOutput, TokenOutputToSpend, TokenTransaction, TokenTransactionConfirmationMetadata, TokenTransactionStatus, TokenTransactionType, TokenTransactionWithStatus, TokenTransferInput, commitStatusFromJSON, commitStatusToJSON, protobufPackage, tokenTransactionStatusFromJSON, tokenTransactionStatusToJSON, tokenTransactionTypeFromJSON, tokenTransactionTypeToJSON };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CommitProgress,
|
|
3
|
+
CommitStatus,
|
|
2
4
|
CommitTransactionRequest,
|
|
3
5
|
CommitTransactionResponse,
|
|
4
6
|
FreezeTokensPayload,
|
|
5
7
|
FreezeTokensRequest,
|
|
6
8
|
FreezeTokensResponse,
|
|
7
9
|
InputTtxoSignaturesPerOperator,
|
|
10
|
+
InvoiceAttachment,
|
|
8
11
|
OutputWithPreviousTransactionData,
|
|
9
12
|
QueryTokenMetadataRequest,
|
|
10
13
|
QueryTokenMetadataResponse,
|
|
@@ -28,21 +31,26 @@ import {
|
|
|
28
31
|
TokenTransactionType,
|
|
29
32
|
TokenTransactionWithStatus,
|
|
30
33
|
TokenTransferInput,
|
|
34
|
+
commitStatusFromJSON,
|
|
35
|
+
commitStatusToJSON,
|
|
31
36
|
protobufPackage,
|
|
32
37
|
tokenTransactionStatusFromJSON,
|
|
33
38
|
tokenTransactionStatusToJSON,
|
|
34
39
|
tokenTransactionTypeFromJSON,
|
|
35
40
|
tokenTransactionTypeToJSON
|
|
36
|
-
} from "../chunk-
|
|
37
|
-
import "../chunk-
|
|
41
|
+
} from "../chunk-6CMNEDBK.js";
|
|
42
|
+
import "../chunk-A5M55UR3.js";
|
|
38
43
|
import "../chunk-MVRQ5US7.js";
|
|
39
44
|
export {
|
|
45
|
+
CommitProgress,
|
|
46
|
+
CommitStatus,
|
|
40
47
|
CommitTransactionRequest,
|
|
41
48
|
CommitTransactionResponse,
|
|
42
49
|
FreezeTokensPayload,
|
|
43
50
|
FreezeTokensRequest,
|
|
44
51
|
FreezeTokensResponse,
|
|
45
52
|
InputTtxoSignaturesPerOperator,
|
|
53
|
+
InvoiceAttachment,
|
|
46
54
|
OutputWithPreviousTransactionData,
|
|
47
55
|
QueryTokenMetadataRequest,
|
|
48
56
|
QueryTokenMetadataResponse,
|
|
@@ -66,6 +74,8 @@ export {
|
|
|
66
74
|
TokenTransactionType,
|
|
67
75
|
TokenTransactionWithStatus,
|
|
68
76
|
TokenTransferInput,
|
|
77
|
+
commitStatusFromJSON,
|
|
78
|
+
commitStatusToJSON,
|
|
69
79
|
protobufPackage,
|
|
70
80
|
tokenTransactionStatusFromJSON,
|
|
71
81
|
tokenTransactionStatusToJSON,
|