@buildonspark/spark-sdk 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-TM6CHQXC.js → chunk-3SEOTO43.js} +1 -1
- package/dist/{chunk-2ENZX6LT.js → chunk-AAZWSPUK.js} +84 -8
- package/dist/{chunk-4JD4HIAN.js → chunk-G4MSZ6DE.js} +299 -1
- package/dist/{chunk-KFDVDUIS.js → chunk-PLLJIZC3.js} +138 -35
- package/dist/{chunk-N4JAOOIN.js → chunk-PTRXJS7Q.js} +1 -1
- package/dist/{client-DKbwpcnl.d.ts → client-CGTRS23n.d.ts} +21 -4
- package/dist/{client-Drs5Lapg.d.cts → client-CcYzmpmj.d.cts} +21 -4
- package/dist/debug.cjs +455 -40
- package/dist/debug.d.cts +5 -5
- package/dist/debug.d.ts +5 -5
- package/dist/debug.js +4 -4
- package/dist/graphql/objects/index.d.cts +2 -2
- package/dist/graphql/objects/index.d.ts +2 -2
- package/dist/index.cjs +515 -40
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -5
- package/dist/index.node.cjs +517 -44
- package/dist/index.node.d.cts +8 -6
- package/dist/index.node.d.ts +8 -6
- package/dist/index.node.js +6 -4
- package/dist/native/index.cjs +459 -43
- package/dist/native/index.d.cts +62 -15
- package/dist/native/index.d.ts +62 -15
- package/dist/native/index.js +459 -43
- package/dist/proto/lrc20.d.cts +1 -1
- package/dist/proto/lrc20.d.ts +1 -1
- package/dist/proto/lrc20.js +1 -1
- package/dist/proto/spark.cjs +84 -8
- 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 +301 -0
- package/dist/proto/spark_token.d.cts +35 -2
- package/dist/proto/spark_token.d.ts +35 -2
- package/dist/proto/spark_token.js +8 -2
- package/dist/{sdk-types-DJ2ve9YY.d.cts → sdk-types-CB9HrW5O.d.cts} +1 -1
- package/dist/{sdk-types-DCIVdKUT.d.ts → sdk-types-CkRNraXT.d.ts} +1 -1
- package/dist/{spark-BUOx3U7Q.d.cts → spark-B_7nZx6T.d.cts} +112 -10
- package/dist/{spark-BUOx3U7Q.d.ts → spark-B_7nZx6T.d.ts} +112 -10
- package/dist/{spark-wallet-DbCjWOfP.d.ts → spark-wallet-CxcGPXRB.d.ts} +10 -6
- package/dist/{spark-wallet-BslnB-4H.d.cts → spark-wallet-DJJm19BP.d.cts} +10 -6
- package/dist/tests/test-utils.cjs +455 -17
- package/dist/tests/test-utils.d.cts +9 -5
- package/dist/tests/test-utils.d.ts +9 -5
- package/dist/tests/test-utils.js +13 -6
- package/dist/types/index.cjs +84 -8
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js +2 -2
- package/dist/{xchain-address-BIcYZU3K.d.ts → xchain-address-Bh9w1SeC.d.ts} +3 -3
- package/dist/{xchain-address-C3B-Jfk5.d.cts → xchain-address-SZ7dkVUE.d.cts} +3 -3
- package/package.json +1 -1
- package/src/index.node.ts +6 -6
- package/src/index.ts +5 -5
- package/src/proto/spark.ts +172 -16
- package/src/proto/spark_token.ts +369 -0
- package/src/services/connection.ts +3 -3
- package/src/services/coop-exit.ts +1 -1
- package/src/services/deposit.ts +2 -2
- package/src/services/signing.ts +1 -1
- package/src/services/token-transactions.ts +6 -2
- package/src/services/transfer.ts +25 -9
- package/src/services/tree-creation.ts +10 -7
- package/src/signer/signer.react-native.ts +4 -3
- package/src/signer/signer.ts +84 -6
- package/src/signer/types.ts +7 -1
- package/src/spark-wallet/spark-wallet.ts +56 -15
- package/src/tests/integration/coop-exit.test.ts +5 -3
- package/src/tests/integration/deposit.test.ts +20 -10
- package/src/tests/integration/lightning.test.ts +13 -7
- package/src/tests/integration/message-signing.test.ts +10 -7
- package/src/tests/integration/swap.test.ts +8 -4
- package/src/tests/integration/transfer.test.ts +25 -11
- package/src/tests/integration/wallet.test.ts +9 -4
- package/src/tests/test-utils.ts +10 -1
package/dist/proto/lrc20.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TokenTransaction, O as OperatorSpecificOwnerSignature, R as RevocationSecretWithIndex, M as MessageFns$1, E as Empty } from '../spark-
|
|
1
|
+
import { T as TokenTransaction, O as OperatorSpecificOwnerSignature, R as RevocationSecretWithIndex, M as MessageFns$1, E as Empty } from '../spark-B_7nZx6T.cjs';
|
|
2
2
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
3
3
|
import { CallContext, CallOptions } from 'nice-grpc-common';
|
|
4
4
|
|
package/dist/proto/lrc20.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TokenTransaction, O as OperatorSpecificOwnerSignature, R as RevocationSecretWithIndex, M as MessageFns$1, E as Empty } from '../spark-
|
|
1
|
+
import { T as TokenTransaction, O as OperatorSpecificOwnerSignature, R as RevocationSecretWithIndex, M as MessageFns$1, E as Empty } from '../spark-B_7nZx6T.js';
|
|
2
2
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
3
3
|
import { CallContext, CallOptions } from 'nice-grpc-common';
|
|
4
4
|
|
package/dist/proto/lrc20.js
CHANGED
package/dist/proto/spark.cjs
CHANGED
|
@@ -14645,14 +14645,6 @@ var SparkServiceDefinition = {
|
|
|
14645
14645
|
responseStream: false,
|
|
14646
14646
|
options: {}
|
|
14647
14647
|
},
|
|
14648
|
-
create_tree_v2: {
|
|
14649
|
-
name: "create_tree_v2",
|
|
14650
|
-
requestType: CreateTreeRequest,
|
|
14651
|
-
requestStream: false,
|
|
14652
|
-
responseType: CreateTreeResponse,
|
|
14653
|
-
responseStream: false,
|
|
14654
|
-
options: {}
|
|
14655
|
-
},
|
|
14656
14648
|
get_signing_operator_list: {
|
|
14657
14649
|
name: "get_signing_operator_list",
|
|
14658
14650
|
requestType: Empty,
|
|
@@ -14819,6 +14811,90 @@ var SparkServiceDefinition = {
|
|
|
14819
14811
|
responseType: ExitSingleNodeTreesResponse,
|
|
14820
14812
|
responseStream: false,
|
|
14821
14813
|
options: {}
|
|
14814
|
+
},
|
|
14815
|
+
/**
|
|
14816
|
+
* The following endpoints enforce inclusion of Direct Transactions used
|
|
14817
|
+
* for unilateral exits
|
|
14818
|
+
*/
|
|
14819
|
+
create_tree_v2: {
|
|
14820
|
+
name: "create_tree_v2",
|
|
14821
|
+
requestType: CreateTreeRequest,
|
|
14822
|
+
requestStream: false,
|
|
14823
|
+
responseType: CreateTreeResponse,
|
|
14824
|
+
responseStream: false,
|
|
14825
|
+
options: {}
|
|
14826
|
+
},
|
|
14827
|
+
cooperative_exit_v2: {
|
|
14828
|
+
name: "cooperative_exit_v2",
|
|
14829
|
+
requestType: CooperativeExitRequest,
|
|
14830
|
+
requestStream: false,
|
|
14831
|
+
responseType: CooperativeExitResponse,
|
|
14832
|
+
responseStream: false,
|
|
14833
|
+
options: {}
|
|
14834
|
+
},
|
|
14835
|
+
extend_leaf_v2: {
|
|
14836
|
+
name: "extend_leaf_v2",
|
|
14837
|
+
requestType: ExtendLeafRequest,
|
|
14838
|
+
requestStream: false,
|
|
14839
|
+
responseType: ExtendLeafResponse,
|
|
14840
|
+
responseStream: false,
|
|
14841
|
+
options: {}
|
|
14842
|
+
},
|
|
14843
|
+
claim_transfer_sign_refunds_v2: {
|
|
14844
|
+
name: "claim_transfer_sign_refunds_v2",
|
|
14845
|
+
requestType: ClaimTransferSignRefundsRequest,
|
|
14846
|
+
requestStream: false,
|
|
14847
|
+
responseType: ClaimTransferSignRefundsResponse,
|
|
14848
|
+
responseStream: false,
|
|
14849
|
+
options: {}
|
|
14850
|
+
},
|
|
14851
|
+
finalize_node_signatures_v2: {
|
|
14852
|
+
name: "finalize_node_signatures_v2",
|
|
14853
|
+
requestType: FinalizeNodeSignaturesRequest,
|
|
14854
|
+
requestStream: false,
|
|
14855
|
+
responseType: FinalizeNodeSignaturesResponse,
|
|
14856
|
+
responseStream: false,
|
|
14857
|
+
options: {}
|
|
14858
|
+
},
|
|
14859
|
+
initiate_preimage_swap_v2: {
|
|
14860
|
+
name: "initiate_preimage_swap_v2",
|
|
14861
|
+
requestType: InitiatePreimageSwapRequest,
|
|
14862
|
+
requestStream: false,
|
|
14863
|
+
responseType: InitiatePreimageSwapResponse,
|
|
14864
|
+
responseStream: false,
|
|
14865
|
+
options: {}
|
|
14866
|
+
},
|
|
14867
|
+
start_leaf_swap_v2: {
|
|
14868
|
+
name: "start_leaf_swap_v2",
|
|
14869
|
+
requestType: StartTransferRequest,
|
|
14870
|
+
requestStream: false,
|
|
14871
|
+
responseType: StartTransferResponse,
|
|
14872
|
+
responseStream: false,
|
|
14873
|
+
options: {}
|
|
14874
|
+
},
|
|
14875
|
+
counter_leaf_swap_v2: {
|
|
14876
|
+
name: "counter_leaf_swap_v2",
|
|
14877
|
+
requestType: CounterLeafSwapRequest,
|
|
14878
|
+
requestStream: false,
|
|
14879
|
+
responseType: CounterLeafSwapResponse,
|
|
14880
|
+
responseStream: false,
|
|
14881
|
+
options: {}
|
|
14882
|
+
},
|
|
14883
|
+
start_transfer_v2: {
|
|
14884
|
+
name: "start_transfer_v2",
|
|
14885
|
+
requestType: StartTransferRequest,
|
|
14886
|
+
requestStream: false,
|
|
14887
|
+
responseType: StartTransferResponse,
|
|
14888
|
+
responseStream: false,
|
|
14889
|
+
options: {}
|
|
14890
|
+
},
|
|
14891
|
+
refresh_timelock_v2: {
|
|
14892
|
+
name: "refresh_timelock_v2",
|
|
14893
|
+
requestType: RefreshTimelockRequest,
|
|
14894
|
+
requestStream: false,
|
|
14895
|
+
responseType: RefreshTimelockResponse,
|
|
14896
|
+
responseStream: false,
|
|
14897
|
+
options: {}
|
|
14822
14898
|
}
|
|
14823
14899
|
}
|
|
14824
14900
|
};
|
package/dist/proto/spark.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { K as Address, bd as AddressNode, bb as AddressRequestNode, bM as BitcoinTransactionOutput, bv as CancelTransferRequest, bw as CancelTransferResponse, aJ as ClaimLeafKeyTweak, aK as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aM as ClaimTransferSignRefundsRequest, aN as ClaimTransferSignRefundsResponse, aL as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b1 as CooperativeExitRequest, b2 as CooperativeExitResponse, b3 as CounterLeafSwapRequest, b4 as CounterLeafSwapResponse, bg as CreateTreeRequest, bi as CreateTreeResponse, bf as CreationNode, bh as CreationResponseNode, bY as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, bz as DepositAddressQueryResult, G as DepositEvent, bL as ExitSingleNodeTreeSigningResult, bN as ExitSingleNodeTreesRequest, bO as ExitSingleNodeTreesResponse, bK as ExitingTree, b8 as ExtendLeafRequest, ba as ExtendLeafResponse, b9 as ExtendLeafSigningResult, au as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, am as FinalizeTokenTransactionRequest, aF as FinalizeTransferRequest, aH as FinalizeTransferResponse, aG as FinalizeTransferWithTransferPackageRequest, an as FreezeTokensPayload, ao as FreezeTokensRequest, ap as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aQ as GetSigningCommitmentsRequest, aR as GetSigningCommitmentsResponse, bk as GetSigningOperatorListResponse, bl as GetSigningOperatorListResponse_SigningOperatorsEntry, aX as InitiatePreimageSwapRequest, aY as InitiatePreimageSwapRequest_Reason, a$ as InitiatePreimageSwapResponse, bG as InitiateStaticDepositUtxoRefundRequest, bH as InitiateStaticDepositUtxoRefundResponse, bI as InitiateUtxoSwapRequest, bJ as InitiateUtxoSwapResponse, bP as InvestigateLeavesRequest, aW as InvoiceAmount, aV as InvoiceAmountProof, ak as KeyshareWithIndex, ax as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, b_ as MessageFns, N as Network, X as NodeOutput, a2 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ai as OperatorSpecificTokenTransactionSignablePayload, b0 as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bc as PrepareTreeAddressRequest, be as PrepareTreeAddressResponse, bo as ProvidePreimageRequest, bp as ProvidePreimageResponse, bC as QueryBalanceRequest, bD as QueryBalanceResponse, bE as QueryBalanceResponse_NodeBalancesEntry, bT as QueryNodesByValueRequest, bU as QueryNodesByValueResponse, bV as QueryNodesByValueResponse_NodesEntry, bQ as QueryNodesDistributionRequest, bR as QueryNodesDistributionResponse, bS as QueryNodesDistributionResponse_NodeDistributionEntry, bs as QueryNodesRequest, bt as QueryNodesResponse, bu as QueryNodesResponse_NodesEntry, by as QueryStaticDepositAddressesRequest, bB as QueryStaticDepositAddressesResponse, aq as QueryTokenOutputsRequest, at as QueryTokenOutputsResponse, ar as QueryTokenTransactionsRequest, as as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bx as QueryUnusedDepositAddressesRequest, bA as QueryUnusedDepositAddressesResponse, bm as QueryUserSignedRefundsRequest, bn as QueryUserSignedRefundsResponse, b5 as RefreshTimelockRequest, b7 as RefreshTimelockResponse, b6 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aP as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bq as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, aw as SecretProof, av as SecretShare, aD as SendLeafKeyTweak, aE as SendLeafKeyTweak_PubkeySharesTweakEntry, aC as SendLeafKeyTweaks, bZ as ServerStreamingMethodResult, aj as SignTokenTransactionRequest, al as SignTokenTransactionResponse, ae as SignatureWithIndex, aS as SigningCommitments, aT as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, Z as SigningKeyshare_PublicSharesEntry, bj as SigningOperatorInfo, _ as SigningResult, $ as SigningResult_PublicKeysEntry, a1 as SigningResult_SignatureSharesEntry, a0 as SigningResult_SigningNonceCommitmentsEntry, bF as SparkAddress, g as SparkServiceClient, bW as SparkServiceDefinition, bX as SparkServiceImplementation, ac as SpentTokenOutputMetadata, a5 as StartDepositTreeCreationRequest, a6 as StartDepositTreeCreationResponse, ag as StartTokenTransactionRequest, ah as StartTokenTransactionResponse, az as StartTransferRequest, aA as StartTransferResponse, a3 as StartTreeCreationRequest, a4 as StartTreeCreationResponse, ay as StartUserSignedTransferRequest, aO as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, aa as TokenCreateInput, a9 as TokenMintInput, ab as TokenOutput, a7 as TokenOutputToSpend, T as TokenTransaction, ad as TokenTransactionConfirmationMetadata, af as TokenTransactionSignatures, o as TokenTransactionStatus, l as TokenTransactionWithStatus, a8 as TokenTransferInput, f as Transfer, D as TransferEvent, aI as TransferFilter, e as TransferLeaf, k as TransferPackage, aB as TransferPackage_KeyTweakPackageEntry, a as TransferStatus, b as TransferType, d as TreeNode, br as TreeNodeIds, W as UTXO, aU as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aZ as initiatePreimageSwapRequest_ReasonFromJSON, a_ as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, m as networkToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, q as tokenTransactionStatusToJSON, r as transferStatusFromJSON, u as transferStatusToJSON, v as transferTypeFromJSON, w as transferTypeToJSON, y as utxoSwapRequestTypeFromJSON, z as utxoSwapRequestTypeToJSON } from '../spark-
|
|
1
|
+
export { K as Address, bd as AddressNode, bb as AddressRequestNode, bM as BitcoinTransactionOutput, bv as CancelTransferRequest, bw as CancelTransferResponse, aJ as ClaimLeafKeyTweak, aK as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aM as ClaimTransferSignRefundsRequest, aN as ClaimTransferSignRefundsResponse, aL as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b1 as CooperativeExitRequest, b2 as CooperativeExitResponse, b3 as CounterLeafSwapRequest, b4 as CounterLeafSwapResponse, bg as CreateTreeRequest, bi as CreateTreeResponse, bf as CreationNode, bh as CreationResponseNode, bY as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, bz as DepositAddressQueryResult, G as DepositEvent, bL as ExitSingleNodeTreeSigningResult, bN as ExitSingleNodeTreesRequest, bO as ExitSingleNodeTreesResponse, bK as ExitingTree, b8 as ExtendLeafRequest, ba as ExtendLeafResponse, b9 as ExtendLeafSigningResult, au as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, am as FinalizeTokenTransactionRequest, aF as FinalizeTransferRequest, aH as FinalizeTransferResponse, aG as FinalizeTransferWithTransferPackageRequest, an as FreezeTokensPayload, ao as FreezeTokensRequest, ap as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aQ as GetSigningCommitmentsRequest, aR as GetSigningCommitmentsResponse, bk as GetSigningOperatorListResponse, bl as GetSigningOperatorListResponse_SigningOperatorsEntry, aX as InitiatePreimageSwapRequest, aY as InitiatePreimageSwapRequest_Reason, a$ as InitiatePreimageSwapResponse, bG as InitiateStaticDepositUtxoRefundRequest, bH as InitiateStaticDepositUtxoRefundResponse, bI as InitiateUtxoSwapRequest, bJ as InitiateUtxoSwapResponse, bP as InvestigateLeavesRequest, aW as InvoiceAmount, aV as InvoiceAmountProof, ak as KeyshareWithIndex, ax as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, b_ as MessageFns, N as Network, X as NodeOutput, a2 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ai as OperatorSpecificTokenTransactionSignablePayload, b0 as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bc as PrepareTreeAddressRequest, be as PrepareTreeAddressResponse, bo as ProvidePreimageRequest, bp as ProvidePreimageResponse, bC as QueryBalanceRequest, bD as QueryBalanceResponse, bE as QueryBalanceResponse_NodeBalancesEntry, bT as QueryNodesByValueRequest, bU as QueryNodesByValueResponse, bV as QueryNodesByValueResponse_NodesEntry, bQ as QueryNodesDistributionRequest, bR as QueryNodesDistributionResponse, bS as QueryNodesDistributionResponse_NodeDistributionEntry, bs as QueryNodesRequest, bt as QueryNodesResponse, bu as QueryNodesResponse_NodesEntry, by as QueryStaticDepositAddressesRequest, bB as QueryStaticDepositAddressesResponse, aq as QueryTokenOutputsRequest, at as QueryTokenOutputsResponse, ar as QueryTokenTransactionsRequest, as as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bx as QueryUnusedDepositAddressesRequest, bA as QueryUnusedDepositAddressesResponse, bm as QueryUserSignedRefundsRequest, bn as QueryUserSignedRefundsResponse, b5 as RefreshTimelockRequest, b7 as RefreshTimelockResponse, b6 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aP as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bq as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, aw as SecretProof, av as SecretShare, aD as SendLeafKeyTweak, aE as SendLeafKeyTweak_PubkeySharesTweakEntry, aC as SendLeafKeyTweaks, bZ as ServerStreamingMethodResult, aj as SignTokenTransactionRequest, al as SignTokenTransactionResponse, ae as SignatureWithIndex, aS as SigningCommitments, aT as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, Z as SigningKeyshare_PublicSharesEntry, bj as SigningOperatorInfo, _ as SigningResult, $ as SigningResult_PublicKeysEntry, a1 as SigningResult_SignatureSharesEntry, a0 as SigningResult_SigningNonceCommitmentsEntry, bF as SparkAddress, g as SparkServiceClient, bW as SparkServiceDefinition, bX as SparkServiceImplementation, ac as SpentTokenOutputMetadata, a5 as StartDepositTreeCreationRequest, a6 as StartDepositTreeCreationResponse, ag as StartTokenTransactionRequest, ah as StartTokenTransactionResponse, az as StartTransferRequest, aA as StartTransferResponse, a3 as StartTreeCreationRequest, a4 as StartTreeCreationResponse, ay as StartUserSignedTransferRequest, aO as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, aa as TokenCreateInput, a9 as TokenMintInput, ab as TokenOutput, a7 as TokenOutputToSpend, T as TokenTransaction, ad as TokenTransactionConfirmationMetadata, af as TokenTransactionSignatures, o as TokenTransactionStatus, l as TokenTransactionWithStatus, a8 as TokenTransferInput, f as Transfer, D as TransferEvent, aI as TransferFilter, e as TransferLeaf, k as TransferPackage, aB as TransferPackage_KeyTweakPackageEntry, a as TransferStatus, b as TransferType, d as TreeNode, br as TreeNodeIds, W as UTXO, aU as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aZ as initiatePreimageSwapRequest_ReasonFromJSON, a_ as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, m as networkToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, q as tokenTransactionStatusToJSON, r as transferStatusFromJSON, u as transferStatusToJSON, v as transferTypeFromJSON, w as transferTypeToJSON, y as utxoSwapRequestTypeFromJSON, z as utxoSwapRequestTypeToJSON } from '../spark-B_7nZx6T.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 { K as Address, bd as AddressNode, bb as AddressRequestNode, bM as BitcoinTransactionOutput, bv as CancelTransferRequest, bw as CancelTransferResponse, aJ as ClaimLeafKeyTweak, aK as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aM as ClaimTransferSignRefundsRequest, aN as ClaimTransferSignRefundsResponse, aL as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b1 as CooperativeExitRequest, b2 as CooperativeExitResponse, b3 as CounterLeafSwapRequest, b4 as CounterLeafSwapResponse, bg as CreateTreeRequest, bi as CreateTreeResponse, bf as CreationNode, bh as CreationResponseNode, bY as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, bz as DepositAddressQueryResult, G as DepositEvent, bL as ExitSingleNodeTreeSigningResult, bN as ExitSingleNodeTreesRequest, bO as ExitSingleNodeTreesResponse, bK as ExitingTree, b8 as ExtendLeafRequest, ba as ExtendLeafResponse, b9 as ExtendLeafSigningResult, au as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, am as FinalizeTokenTransactionRequest, aF as FinalizeTransferRequest, aH as FinalizeTransferResponse, aG as FinalizeTransferWithTransferPackageRequest, an as FreezeTokensPayload, ao as FreezeTokensRequest, ap as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aQ as GetSigningCommitmentsRequest, aR as GetSigningCommitmentsResponse, bk as GetSigningOperatorListResponse, bl as GetSigningOperatorListResponse_SigningOperatorsEntry, aX as InitiatePreimageSwapRequest, aY as InitiatePreimageSwapRequest_Reason, a$ as InitiatePreimageSwapResponse, bG as InitiateStaticDepositUtxoRefundRequest, bH as InitiateStaticDepositUtxoRefundResponse, bI as InitiateUtxoSwapRequest, bJ as InitiateUtxoSwapResponse, bP as InvestigateLeavesRequest, aW as InvoiceAmount, aV as InvoiceAmountProof, ak as KeyshareWithIndex, ax as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, b_ as MessageFns, N as Network, X as NodeOutput, a2 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ai as OperatorSpecificTokenTransactionSignablePayload, b0 as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bc as PrepareTreeAddressRequest, be as PrepareTreeAddressResponse, bo as ProvidePreimageRequest, bp as ProvidePreimageResponse, bC as QueryBalanceRequest, bD as QueryBalanceResponse, bE as QueryBalanceResponse_NodeBalancesEntry, bT as QueryNodesByValueRequest, bU as QueryNodesByValueResponse, bV as QueryNodesByValueResponse_NodesEntry, bQ as QueryNodesDistributionRequest, bR as QueryNodesDistributionResponse, bS as QueryNodesDistributionResponse_NodeDistributionEntry, bs as QueryNodesRequest, bt as QueryNodesResponse, bu as QueryNodesResponse_NodesEntry, by as QueryStaticDepositAddressesRequest, bB as QueryStaticDepositAddressesResponse, aq as QueryTokenOutputsRequest, at as QueryTokenOutputsResponse, ar as QueryTokenTransactionsRequest, as as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bx as QueryUnusedDepositAddressesRequest, bA as QueryUnusedDepositAddressesResponse, bm as QueryUserSignedRefundsRequest, bn as QueryUserSignedRefundsResponse, b5 as RefreshTimelockRequest, b7 as RefreshTimelockResponse, b6 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aP as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bq as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, aw as SecretProof, av as SecretShare, aD as SendLeafKeyTweak, aE as SendLeafKeyTweak_PubkeySharesTweakEntry, aC as SendLeafKeyTweaks, bZ as ServerStreamingMethodResult, aj as SignTokenTransactionRequest, al as SignTokenTransactionResponse, ae as SignatureWithIndex, aS as SigningCommitments, aT as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, Z as SigningKeyshare_PublicSharesEntry, bj as SigningOperatorInfo, _ as SigningResult, $ as SigningResult_PublicKeysEntry, a1 as SigningResult_SignatureSharesEntry, a0 as SigningResult_SigningNonceCommitmentsEntry, bF as SparkAddress, g as SparkServiceClient, bW as SparkServiceDefinition, bX as SparkServiceImplementation, ac as SpentTokenOutputMetadata, a5 as StartDepositTreeCreationRequest, a6 as StartDepositTreeCreationResponse, ag as StartTokenTransactionRequest, ah as StartTokenTransactionResponse, az as StartTransferRequest, aA as StartTransferResponse, a3 as StartTreeCreationRequest, a4 as StartTreeCreationResponse, ay as StartUserSignedTransferRequest, aO as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, aa as TokenCreateInput, a9 as TokenMintInput, ab as TokenOutput, a7 as TokenOutputToSpend, T as TokenTransaction, ad as TokenTransactionConfirmationMetadata, af as TokenTransactionSignatures, o as TokenTransactionStatus, l as TokenTransactionWithStatus, a8 as TokenTransferInput, f as Transfer, D as TransferEvent, aI as TransferFilter, e as TransferLeaf, k as TransferPackage, aB as TransferPackage_KeyTweakPackageEntry, a as TransferStatus, b as TransferType, d as TreeNode, br as TreeNodeIds, W as UTXO, aU as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aZ as initiatePreimageSwapRequest_ReasonFromJSON, a_ as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, m as networkToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, q as tokenTransactionStatusToJSON, r as transferStatusFromJSON, u as transferStatusToJSON, v as transferTypeFromJSON, w as transferTypeToJSON, y as utxoSwapRequestTypeFromJSON, z as utxoSwapRequestTypeToJSON } from '../spark-
|
|
1
|
+
export { K as Address, bd as AddressNode, bb as AddressRequestNode, bM as BitcoinTransactionOutput, bv as CancelTransferRequest, bw as CancelTransferResponse, aJ as ClaimLeafKeyTweak, aK as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aM as ClaimTransferSignRefundsRequest, aN as ClaimTransferSignRefundsResponse, aL as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b1 as CooperativeExitRequest, b2 as CooperativeExitResponse, b3 as CounterLeafSwapRequest, b4 as CounterLeafSwapResponse, bg as CreateTreeRequest, bi as CreateTreeResponse, bf as CreationNode, bh as CreationResponseNode, bY as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, bz as DepositAddressQueryResult, G as DepositEvent, bL as ExitSingleNodeTreeSigningResult, bN as ExitSingleNodeTreesRequest, bO as ExitSingleNodeTreesResponse, bK as ExitingTree, b8 as ExtendLeafRequest, ba as ExtendLeafResponse, b9 as ExtendLeafSigningResult, au as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, am as FinalizeTokenTransactionRequest, aF as FinalizeTransferRequest, aH as FinalizeTransferResponse, aG as FinalizeTransferWithTransferPackageRequest, an as FreezeTokensPayload, ao as FreezeTokensRequest, ap as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aQ as GetSigningCommitmentsRequest, aR as GetSigningCommitmentsResponse, bk as GetSigningOperatorListResponse, bl as GetSigningOperatorListResponse_SigningOperatorsEntry, aX as InitiatePreimageSwapRequest, aY as InitiatePreimageSwapRequest_Reason, a$ as InitiatePreimageSwapResponse, bG as InitiateStaticDepositUtxoRefundRequest, bH as InitiateStaticDepositUtxoRefundResponse, bI as InitiateUtxoSwapRequest, bJ as InitiateUtxoSwapResponse, bP as InvestigateLeavesRequest, aW as InvoiceAmount, aV as InvoiceAmountProof, ak as KeyshareWithIndex, ax as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, b_ as MessageFns, N as Network, X as NodeOutput, a2 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ai as OperatorSpecificTokenTransactionSignablePayload, b0 as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bc as PrepareTreeAddressRequest, be as PrepareTreeAddressResponse, bo as ProvidePreimageRequest, bp as ProvidePreimageResponse, bC as QueryBalanceRequest, bD as QueryBalanceResponse, bE as QueryBalanceResponse_NodeBalancesEntry, bT as QueryNodesByValueRequest, bU as QueryNodesByValueResponse, bV as QueryNodesByValueResponse_NodesEntry, bQ as QueryNodesDistributionRequest, bR as QueryNodesDistributionResponse, bS as QueryNodesDistributionResponse_NodeDistributionEntry, bs as QueryNodesRequest, bt as QueryNodesResponse, bu as QueryNodesResponse_NodesEntry, by as QueryStaticDepositAddressesRequest, bB as QueryStaticDepositAddressesResponse, aq as QueryTokenOutputsRequest, at as QueryTokenOutputsResponse, ar as QueryTokenTransactionsRequest, as as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bx as QueryUnusedDepositAddressesRequest, bA as QueryUnusedDepositAddressesResponse, bm as QueryUserSignedRefundsRequest, bn as QueryUserSignedRefundsResponse, b5 as RefreshTimelockRequest, b7 as RefreshTimelockResponse, b6 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aP as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bq as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, aw as SecretProof, av as SecretShare, aD as SendLeafKeyTweak, aE as SendLeafKeyTweak_PubkeySharesTweakEntry, aC as SendLeafKeyTweaks, bZ as ServerStreamingMethodResult, aj as SignTokenTransactionRequest, al as SignTokenTransactionResponse, ae as SignatureWithIndex, aS as SigningCommitments, aT as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, Z as SigningKeyshare_PublicSharesEntry, bj as SigningOperatorInfo, _ as SigningResult, $ as SigningResult_PublicKeysEntry, a1 as SigningResult_SignatureSharesEntry, a0 as SigningResult_SigningNonceCommitmentsEntry, bF as SparkAddress, g as SparkServiceClient, bW as SparkServiceDefinition, bX as SparkServiceImplementation, ac as SpentTokenOutputMetadata, a5 as StartDepositTreeCreationRequest, a6 as StartDepositTreeCreationResponse, ag as StartTokenTransactionRequest, ah as StartTokenTransactionResponse, az as StartTransferRequest, aA as StartTransferResponse, a3 as StartTreeCreationRequest, a4 as StartTreeCreationResponse, ay as StartUserSignedTransferRequest, aO as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, aa as TokenCreateInput, a9 as TokenMintInput, ab as TokenOutput, a7 as TokenOutputToSpend, T as TokenTransaction, ad as TokenTransactionConfirmationMetadata, af as TokenTransactionSignatures, o as TokenTransactionStatus, l as TokenTransactionWithStatus, a8 as TokenTransferInput, f as Transfer, D as TransferEvent, aI as TransferFilter, e as TransferLeaf, k as TransferPackage, aB as TransferPackage_KeyTweakPackageEntry, a as TransferStatus, b as TransferType, d as TreeNode, br as TreeNodeIds, W as UTXO, aU as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aZ as initiatePreimageSwapRequest_ReasonFromJSON, a_ as initiatePreimageSwapRequest_ReasonToJSON, n as networkFromJSON, m as networkToJSON, p as protobufPackage, t as tokenTransactionStatusFromJSON, q as tokenTransactionStatusToJSON, r as transferStatusFromJSON, u as transferStatusToJSON, v as transferTypeFromJSON, w as transferTypeToJSON, y as utxoSwapRequestTypeFromJSON, z as utxoSwapRequestTypeToJSON } from '../spark-B_7nZx6T.js';
|
|
2
2
|
import '@bufbuild/protobuf/wire';
|
|
3
3
|
import 'nice-grpc-common';
|
package/dist/proto/spark.js
CHANGED
|
@@ -22,6 +22,9 @@ var spark_token_exports = {};
|
|
|
22
22
|
__export(spark_token_exports, {
|
|
23
23
|
CommitTransactionRequest: () => CommitTransactionRequest,
|
|
24
24
|
CommitTransactionResponse: () => CommitTransactionResponse,
|
|
25
|
+
FreezeTokensPayload: () => FreezeTokensPayload,
|
|
26
|
+
FreezeTokensRequest: () => FreezeTokensRequest,
|
|
27
|
+
FreezeTokensResponse: () => FreezeTokensResponse,
|
|
25
28
|
InputTtxoSignaturesPerOperator: () => InputTtxoSignaturesPerOperator,
|
|
26
29
|
OutputWithPreviousTransactionData: () => OutputWithPreviousTransactionData,
|
|
27
30
|
QueryTokenMetadataRequest: () => QueryTokenMetadataRequest,
|
|
@@ -2698,6 +2701,293 @@ var TokenTransactionWithStatus = {
|
|
|
2698
2701
|
return message;
|
|
2699
2702
|
}
|
|
2700
2703
|
};
|
|
2704
|
+
function createBaseFreezeTokensPayload() {
|
|
2705
|
+
return {
|
|
2706
|
+
version: 0,
|
|
2707
|
+
ownerPublicKey: new Uint8Array(0),
|
|
2708
|
+
tokenPublicKey: void 0,
|
|
2709
|
+
tokenIdentifier: void 0,
|
|
2710
|
+
issuerProvidedTimestamp: 0,
|
|
2711
|
+
operatorIdentityPublicKey: new Uint8Array(0),
|
|
2712
|
+
shouldUnfreeze: false
|
|
2713
|
+
};
|
|
2714
|
+
}
|
|
2715
|
+
var FreezeTokensPayload = {
|
|
2716
|
+
encode(message, writer = new import_wire5.BinaryWriter()) {
|
|
2717
|
+
if (message.version !== 0) {
|
|
2718
|
+
writer.uint32(8).uint32(message.version);
|
|
2719
|
+
}
|
|
2720
|
+
if (message.ownerPublicKey.length !== 0) {
|
|
2721
|
+
writer.uint32(18).bytes(message.ownerPublicKey);
|
|
2722
|
+
}
|
|
2723
|
+
if (message.tokenPublicKey !== void 0) {
|
|
2724
|
+
writer.uint32(26).bytes(message.tokenPublicKey);
|
|
2725
|
+
}
|
|
2726
|
+
if (message.tokenIdentifier !== void 0) {
|
|
2727
|
+
writer.uint32(34).bytes(message.tokenIdentifier);
|
|
2728
|
+
}
|
|
2729
|
+
if (message.issuerProvidedTimestamp !== 0) {
|
|
2730
|
+
writer.uint32(40).uint64(message.issuerProvidedTimestamp);
|
|
2731
|
+
}
|
|
2732
|
+
if (message.operatorIdentityPublicKey.length !== 0) {
|
|
2733
|
+
writer.uint32(50).bytes(message.operatorIdentityPublicKey);
|
|
2734
|
+
}
|
|
2735
|
+
if (message.shouldUnfreeze !== false) {
|
|
2736
|
+
writer.uint32(56).bool(message.shouldUnfreeze);
|
|
2737
|
+
}
|
|
2738
|
+
return writer;
|
|
2739
|
+
},
|
|
2740
|
+
decode(input, length) {
|
|
2741
|
+
const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
|
|
2742
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2743
|
+
const message = createBaseFreezeTokensPayload();
|
|
2744
|
+
while (reader.pos < end) {
|
|
2745
|
+
const tag = reader.uint32();
|
|
2746
|
+
switch (tag >>> 3) {
|
|
2747
|
+
case 1: {
|
|
2748
|
+
if (tag !== 8) {
|
|
2749
|
+
break;
|
|
2750
|
+
}
|
|
2751
|
+
message.version = reader.uint32();
|
|
2752
|
+
continue;
|
|
2753
|
+
}
|
|
2754
|
+
case 2: {
|
|
2755
|
+
if (tag !== 18) {
|
|
2756
|
+
break;
|
|
2757
|
+
}
|
|
2758
|
+
message.ownerPublicKey = reader.bytes();
|
|
2759
|
+
continue;
|
|
2760
|
+
}
|
|
2761
|
+
case 3: {
|
|
2762
|
+
if (tag !== 26) {
|
|
2763
|
+
break;
|
|
2764
|
+
}
|
|
2765
|
+
message.tokenPublicKey = reader.bytes();
|
|
2766
|
+
continue;
|
|
2767
|
+
}
|
|
2768
|
+
case 4: {
|
|
2769
|
+
if (tag !== 34) {
|
|
2770
|
+
break;
|
|
2771
|
+
}
|
|
2772
|
+
message.tokenIdentifier = reader.bytes();
|
|
2773
|
+
continue;
|
|
2774
|
+
}
|
|
2775
|
+
case 5: {
|
|
2776
|
+
if (tag !== 40) {
|
|
2777
|
+
break;
|
|
2778
|
+
}
|
|
2779
|
+
message.issuerProvidedTimestamp = longToNumber2(reader.uint64());
|
|
2780
|
+
continue;
|
|
2781
|
+
}
|
|
2782
|
+
case 6: {
|
|
2783
|
+
if (tag !== 50) {
|
|
2784
|
+
break;
|
|
2785
|
+
}
|
|
2786
|
+
message.operatorIdentityPublicKey = reader.bytes();
|
|
2787
|
+
continue;
|
|
2788
|
+
}
|
|
2789
|
+
case 7: {
|
|
2790
|
+
if (tag !== 56) {
|
|
2791
|
+
break;
|
|
2792
|
+
}
|
|
2793
|
+
message.shouldUnfreeze = reader.bool();
|
|
2794
|
+
continue;
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2798
|
+
break;
|
|
2799
|
+
}
|
|
2800
|
+
reader.skip(tag & 7);
|
|
2801
|
+
}
|
|
2802
|
+
return message;
|
|
2803
|
+
},
|
|
2804
|
+
fromJSON(object) {
|
|
2805
|
+
return {
|
|
2806
|
+
version: isSet3(object.version) ? globalThis.Number(object.version) : 0,
|
|
2807
|
+
ownerPublicKey: isSet3(object.ownerPublicKey) ? bytesFromBase642(object.ownerPublicKey) : new Uint8Array(0),
|
|
2808
|
+
tokenPublicKey: isSet3(object.tokenPublicKey) ? bytesFromBase642(object.tokenPublicKey) : void 0,
|
|
2809
|
+
tokenIdentifier: isSet3(object.tokenIdentifier) ? bytesFromBase642(object.tokenIdentifier) : void 0,
|
|
2810
|
+
issuerProvidedTimestamp: isSet3(object.issuerProvidedTimestamp) ? globalThis.Number(object.issuerProvidedTimestamp) : 0,
|
|
2811
|
+
operatorIdentityPublicKey: isSet3(object.operatorIdentityPublicKey) ? bytesFromBase642(object.operatorIdentityPublicKey) : new Uint8Array(0),
|
|
2812
|
+
shouldUnfreeze: isSet3(object.shouldUnfreeze) ? globalThis.Boolean(object.shouldUnfreeze) : false
|
|
2813
|
+
};
|
|
2814
|
+
},
|
|
2815
|
+
toJSON(message) {
|
|
2816
|
+
const obj = {};
|
|
2817
|
+
if (message.version !== 0) {
|
|
2818
|
+
obj.version = Math.round(message.version);
|
|
2819
|
+
}
|
|
2820
|
+
if (message.ownerPublicKey.length !== 0) {
|
|
2821
|
+
obj.ownerPublicKey = base64FromBytes2(message.ownerPublicKey);
|
|
2822
|
+
}
|
|
2823
|
+
if (message.tokenPublicKey !== void 0) {
|
|
2824
|
+
obj.tokenPublicKey = base64FromBytes2(message.tokenPublicKey);
|
|
2825
|
+
}
|
|
2826
|
+
if (message.tokenIdentifier !== void 0) {
|
|
2827
|
+
obj.tokenIdentifier = base64FromBytes2(message.tokenIdentifier);
|
|
2828
|
+
}
|
|
2829
|
+
if (message.issuerProvidedTimestamp !== 0) {
|
|
2830
|
+
obj.issuerProvidedTimestamp = Math.round(message.issuerProvidedTimestamp);
|
|
2831
|
+
}
|
|
2832
|
+
if (message.operatorIdentityPublicKey.length !== 0) {
|
|
2833
|
+
obj.operatorIdentityPublicKey = base64FromBytes2(message.operatorIdentityPublicKey);
|
|
2834
|
+
}
|
|
2835
|
+
if (message.shouldUnfreeze !== false) {
|
|
2836
|
+
obj.shouldUnfreeze = message.shouldUnfreeze;
|
|
2837
|
+
}
|
|
2838
|
+
return obj;
|
|
2839
|
+
},
|
|
2840
|
+
create(base) {
|
|
2841
|
+
return FreezeTokensPayload.fromPartial(base ?? {});
|
|
2842
|
+
},
|
|
2843
|
+
fromPartial(object) {
|
|
2844
|
+
const message = createBaseFreezeTokensPayload();
|
|
2845
|
+
message.version = object.version ?? 0;
|
|
2846
|
+
message.ownerPublicKey = object.ownerPublicKey ?? new Uint8Array(0);
|
|
2847
|
+
message.tokenPublicKey = object.tokenPublicKey ?? void 0;
|
|
2848
|
+
message.tokenIdentifier = object.tokenIdentifier ?? void 0;
|
|
2849
|
+
message.issuerProvidedTimestamp = object.issuerProvidedTimestamp ?? 0;
|
|
2850
|
+
message.operatorIdentityPublicKey = object.operatorIdentityPublicKey ?? new Uint8Array(0);
|
|
2851
|
+
message.shouldUnfreeze = object.shouldUnfreeze ?? false;
|
|
2852
|
+
return message;
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
function createBaseFreezeTokensRequest() {
|
|
2856
|
+
return { freezeTokensPayload: void 0, issuerSignature: new Uint8Array(0) };
|
|
2857
|
+
}
|
|
2858
|
+
var FreezeTokensRequest = {
|
|
2859
|
+
encode(message, writer = new import_wire5.BinaryWriter()) {
|
|
2860
|
+
if (message.freezeTokensPayload !== void 0) {
|
|
2861
|
+
FreezeTokensPayload.encode(message.freezeTokensPayload, writer.uint32(10).fork()).join();
|
|
2862
|
+
}
|
|
2863
|
+
if (message.issuerSignature.length !== 0) {
|
|
2864
|
+
writer.uint32(18).bytes(message.issuerSignature);
|
|
2865
|
+
}
|
|
2866
|
+
return writer;
|
|
2867
|
+
},
|
|
2868
|
+
decode(input, length) {
|
|
2869
|
+
const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
|
|
2870
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2871
|
+
const message = createBaseFreezeTokensRequest();
|
|
2872
|
+
while (reader.pos < end) {
|
|
2873
|
+
const tag = reader.uint32();
|
|
2874
|
+
switch (tag >>> 3) {
|
|
2875
|
+
case 1: {
|
|
2876
|
+
if (tag !== 10) {
|
|
2877
|
+
break;
|
|
2878
|
+
}
|
|
2879
|
+
message.freezeTokensPayload = FreezeTokensPayload.decode(reader, reader.uint32());
|
|
2880
|
+
continue;
|
|
2881
|
+
}
|
|
2882
|
+
case 2: {
|
|
2883
|
+
if (tag !== 18) {
|
|
2884
|
+
break;
|
|
2885
|
+
}
|
|
2886
|
+
message.issuerSignature = reader.bytes();
|
|
2887
|
+
continue;
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2891
|
+
break;
|
|
2892
|
+
}
|
|
2893
|
+
reader.skip(tag & 7);
|
|
2894
|
+
}
|
|
2895
|
+
return message;
|
|
2896
|
+
},
|
|
2897
|
+
fromJSON(object) {
|
|
2898
|
+
return {
|
|
2899
|
+
freezeTokensPayload: isSet3(object.freezeTokensPayload) ? FreezeTokensPayload.fromJSON(object.freezeTokensPayload) : void 0,
|
|
2900
|
+
issuerSignature: isSet3(object.issuerSignature) ? bytesFromBase642(object.issuerSignature) : new Uint8Array(0)
|
|
2901
|
+
};
|
|
2902
|
+
},
|
|
2903
|
+
toJSON(message) {
|
|
2904
|
+
const obj = {};
|
|
2905
|
+
if (message.freezeTokensPayload !== void 0) {
|
|
2906
|
+
obj.freezeTokensPayload = FreezeTokensPayload.toJSON(message.freezeTokensPayload);
|
|
2907
|
+
}
|
|
2908
|
+
if (message.issuerSignature.length !== 0) {
|
|
2909
|
+
obj.issuerSignature = base64FromBytes2(message.issuerSignature);
|
|
2910
|
+
}
|
|
2911
|
+
return obj;
|
|
2912
|
+
},
|
|
2913
|
+
create(base) {
|
|
2914
|
+
return FreezeTokensRequest.fromPartial(base ?? {});
|
|
2915
|
+
},
|
|
2916
|
+
fromPartial(object) {
|
|
2917
|
+
const message = createBaseFreezeTokensRequest();
|
|
2918
|
+
message.freezeTokensPayload = object.freezeTokensPayload !== void 0 && object.freezeTokensPayload !== null ? FreezeTokensPayload.fromPartial(object.freezeTokensPayload) : void 0;
|
|
2919
|
+
message.issuerSignature = object.issuerSignature ?? new Uint8Array(0);
|
|
2920
|
+
return message;
|
|
2921
|
+
}
|
|
2922
|
+
};
|
|
2923
|
+
function createBaseFreezeTokensResponse() {
|
|
2924
|
+
return { impactedOutputIds: [], impactedTokenAmount: new Uint8Array(0) };
|
|
2925
|
+
}
|
|
2926
|
+
var FreezeTokensResponse = {
|
|
2927
|
+
encode(message, writer = new import_wire5.BinaryWriter()) {
|
|
2928
|
+
for (const v of message.impactedOutputIds) {
|
|
2929
|
+
writer.uint32(10).string(v);
|
|
2930
|
+
}
|
|
2931
|
+
if (message.impactedTokenAmount.length !== 0) {
|
|
2932
|
+
writer.uint32(18).bytes(message.impactedTokenAmount);
|
|
2933
|
+
}
|
|
2934
|
+
return writer;
|
|
2935
|
+
},
|
|
2936
|
+
decode(input, length) {
|
|
2937
|
+
const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
|
|
2938
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2939
|
+
const message = createBaseFreezeTokensResponse();
|
|
2940
|
+
while (reader.pos < end) {
|
|
2941
|
+
const tag = reader.uint32();
|
|
2942
|
+
switch (tag >>> 3) {
|
|
2943
|
+
case 1: {
|
|
2944
|
+
if (tag !== 10) {
|
|
2945
|
+
break;
|
|
2946
|
+
}
|
|
2947
|
+
message.impactedOutputIds.push(reader.string());
|
|
2948
|
+
continue;
|
|
2949
|
+
}
|
|
2950
|
+
case 2: {
|
|
2951
|
+
if (tag !== 18) {
|
|
2952
|
+
break;
|
|
2953
|
+
}
|
|
2954
|
+
message.impactedTokenAmount = reader.bytes();
|
|
2955
|
+
continue;
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2959
|
+
break;
|
|
2960
|
+
}
|
|
2961
|
+
reader.skip(tag & 7);
|
|
2962
|
+
}
|
|
2963
|
+
return message;
|
|
2964
|
+
},
|
|
2965
|
+
fromJSON(object) {
|
|
2966
|
+
return {
|
|
2967
|
+
impactedOutputIds: globalThis.Array.isArray(object?.impactedOutputIds) ? object.impactedOutputIds.map((e) => globalThis.String(e)) : [],
|
|
2968
|
+
impactedTokenAmount: isSet3(object.impactedTokenAmount) ? bytesFromBase642(object.impactedTokenAmount) : new Uint8Array(0)
|
|
2969
|
+
};
|
|
2970
|
+
},
|
|
2971
|
+
toJSON(message) {
|
|
2972
|
+
const obj = {};
|
|
2973
|
+
if (message.impactedOutputIds?.length) {
|
|
2974
|
+
obj.impactedOutputIds = message.impactedOutputIds;
|
|
2975
|
+
}
|
|
2976
|
+
if (message.impactedTokenAmount.length !== 0) {
|
|
2977
|
+
obj.impactedTokenAmount = base64FromBytes2(message.impactedTokenAmount);
|
|
2978
|
+
}
|
|
2979
|
+
return obj;
|
|
2980
|
+
},
|
|
2981
|
+
create(base) {
|
|
2982
|
+
return FreezeTokensResponse.fromPartial(base ?? {});
|
|
2983
|
+
},
|
|
2984
|
+
fromPartial(object) {
|
|
2985
|
+
const message = createBaseFreezeTokensResponse();
|
|
2986
|
+
message.impactedOutputIds = object.impactedOutputIds?.map((e) => e) || [];
|
|
2987
|
+
message.impactedTokenAmount = object.impactedTokenAmount ?? new Uint8Array(0);
|
|
2988
|
+
return message;
|
|
2989
|
+
}
|
|
2990
|
+
};
|
|
2701
2991
|
var SparkTokenServiceDefinition = {
|
|
2702
2992
|
name: "SparkTokenService",
|
|
2703
2993
|
fullName: "spark_token.SparkTokenService",
|
|
@@ -2749,6 +3039,14 @@ var SparkTokenServiceDefinition = {
|
|
|
2749
3039
|
responseType: QueryTokenOutputsResponse,
|
|
2750
3040
|
responseStream: false,
|
|
2751
3041
|
options: {}
|
|
3042
|
+
},
|
|
3043
|
+
freeze_tokens: {
|
|
3044
|
+
name: "freeze_tokens",
|
|
3045
|
+
requestType: FreezeTokensRequest,
|
|
3046
|
+
requestStream: false,
|
|
3047
|
+
responseType: FreezeTokensResponse,
|
|
3048
|
+
responseStream: false,
|
|
3049
|
+
options: {}
|
|
2752
3050
|
}
|
|
2753
3051
|
}
|
|
2754
3052
|
};
|
|
@@ -2811,6 +3109,9 @@ function isSet3(value) {
|
|
|
2811
3109
|
0 && (module.exports = {
|
|
2812
3110
|
CommitTransactionRequest,
|
|
2813
3111
|
CommitTransactionResponse,
|
|
3112
|
+
FreezeTokensPayload,
|
|
3113
|
+
FreezeTokensRequest,
|
|
3114
|
+
FreezeTokensResponse,
|
|
2814
3115
|
InputTtxoSignaturesPerOperator,
|
|
2815
3116
|
OutputWithPreviousTransactionData,
|
|
2816
3117
|
QueryTokenMetadataRequest,
|
|
@@ -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-B_7nZx6T.cjs';
|
|
4
4
|
|
|
5
5
|
declare const protobufPackage = "spark_token";
|
|
6
6
|
declare enum TokenTransactionType {
|
|
@@ -247,6 +247,29 @@ interface TokenTransactionWithStatus {
|
|
|
247
247
|
tokenTransactionHash: Uint8Array;
|
|
248
248
|
}
|
|
249
249
|
declare const TokenTransactionWithStatus: MessageFns<TokenTransactionWithStatus>;
|
|
250
|
+
interface FreezeTokensPayload {
|
|
251
|
+
version: number;
|
|
252
|
+
ownerPublicKey: Uint8Array;
|
|
253
|
+
tokenPublicKey?: Uint8Array | undefined;
|
|
254
|
+
tokenIdentifier?: Uint8Array | undefined;
|
|
255
|
+
issuerProvidedTimestamp: number;
|
|
256
|
+
operatorIdentityPublicKey: Uint8Array;
|
|
257
|
+
/** Set to false when requesting a freeze. */
|
|
258
|
+
shouldUnfreeze: boolean;
|
|
259
|
+
}
|
|
260
|
+
declare const FreezeTokensPayload: MessageFns<FreezeTokensPayload>;
|
|
261
|
+
interface FreezeTokensRequest {
|
|
262
|
+
freezeTokensPayload: FreezeTokensPayload | undefined;
|
|
263
|
+
/** This is a Schnorr or ECDSA DER signature which can be between 64 and 73 bytes. */
|
|
264
|
+
issuerSignature: Uint8Array;
|
|
265
|
+
}
|
|
266
|
+
declare const FreezeTokensRequest: MessageFns<FreezeTokensRequest>;
|
|
267
|
+
interface FreezeTokensResponse {
|
|
268
|
+
impactedOutputIds: string[];
|
|
269
|
+
/** Decoded uint128 */
|
|
270
|
+
impactedTokenAmount: Uint8Array;
|
|
271
|
+
}
|
|
272
|
+
declare const FreezeTokensResponse: MessageFns<FreezeTokensResponse>;
|
|
250
273
|
type SparkTokenServiceDefinition = typeof SparkTokenServiceDefinition;
|
|
251
274
|
declare const SparkTokenServiceDefinition: {
|
|
252
275
|
readonly name: "SparkTokenService";
|
|
@@ -300,6 +323,14 @@ declare const SparkTokenServiceDefinition: {
|
|
|
300
323
|
readonly responseStream: false;
|
|
301
324
|
readonly options: {};
|
|
302
325
|
};
|
|
326
|
+
readonly freeze_tokens: {
|
|
327
|
+
readonly name: "freeze_tokens";
|
|
328
|
+
readonly requestType: MessageFns<FreezeTokensRequest>;
|
|
329
|
+
readonly requestStream: false;
|
|
330
|
+
readonly responseType: MessageFns<FreezeTokensResponse>;
|
|
331
|
+
readonly responseStream: false;
|
|
332
|
+
readonly options: {};
|
|
333
|
+
};
|
|
303
334
|
};
|
|
304
335
|
};
|
|
305
336
|
interface SparkTokenServiceImplementation<CallContextExt = {}> {
|
|
@@ -316,6 +347,7 @@ interface SparkTokenServiceImplementation<CallContextExt = {}> {
|
|
|
316
347
|
query_token_metadata(request: QueryTokenMetadataRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryTokenMetadataResponse>>;
|
|
317
348
|
query_token_transactions(request: QueryTokenTransactionsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryTokenTransactionsResponse>>;
|
|
318
349
|
query_token_outputs(request: QueryTokenOutputsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<QueryTokenOutputsResponse>>;
|
|
350
|
+
freeze_tokens(request: FreezeTokensRequest, context: CallContext & CallContextExt): Promise<DeepPartial<FreezeTokensResponse>>;
|
|
319
351
|
}
|
|
320
352
|
interface SparkTokenServiceClient<CallOptionsExt = {}> {
|
|
321
353
|
/**
|
|
@@ -331,6 +363,7 @@ interface SparkTokenServiceClient<CallOptionsExt = {}> {
|
|
|
331
363
|
query_token_metadata(request: DeepPartial<QueryTokenMetadataRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryTokenMetadataResponse>;
|
|
332
364
|
query_token_transactions(request: DeepPartial<QueryTokenTransactionsRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryTokenTransactionsResponse>;
|
|
333
365
|
query_token_outputs(request: DeepPartial<QueryTokenOutputsRequest>, options?: CallOptions & CallOptionsExt): Promise<QueryTokenOutputsResponse>;
|
|
366
|
+
freeze_tokens(request: DeepPartial<FreezeTokensRequest>, options?: CallOptions & CallOptionsExt): Promise<FreezeTokensResponse>;
|
|
334
367
|
}
|
|
335
368
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
336
369
|
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
@@ -351,4 +384,4 @@ interface MessageFns<T> {
|
|
|
351
384
|
fromPartial(object: DeepPartial<T>): T;
|
|
352
385
|
}
|
|
353
386
|
|
|
354
|
-
export { CommitTransactionRequest, CommitTransactionResponse, type DeepPartial, 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 };
|
|
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 };
|