@buildonspark/spark-sdk 0.1.43 → 0.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/{RequestLightningSendInput-Na1mHdWg.d.cts → RequestLightningSendInput-BxbCtwpV.d.cts} +43 -4
- package/dist/{RequestLightningSendInput-D7fZdT4A.d.ts → RequestLightningSendInput-RGel43ks.d.ts} +43 -4
- package/dist/address/index.d.cts +2 -2
- package/dist/address/index.d.ts +2 -2
- package/dist/address/index.js +2 -2
- package/dist/{chunk-M6A4KFIG.js → chunk-4Q2ZDYYU.js} +332 -221
- package/dist/{chunk-WWOTVNPP.js → chunk-A2ZLMH6I.js} +323 -142
- package/dist/{chunk-VA7MV4MZ.js → chunk-B3AMIGJG.js} +1 -1
- package/dist/{chunk-DQYKQJRZ.js → chunk-CIZNCBKE.js} +29 -9
- package/dist/{chunk-BUTZWYBW.js → chunk-DAXGVPVM.js} +2 -2
- package/dist/{chunk-DOA6QXYQ.js → chunk-EKFD62HN.js} +2 -1
- package/dist/{chunk-TIUBYNN5.js → chunk-HTMXTJRK.js} +1 -1
- package/dist/{chunk-TOSP3INR.js → chunk-I54FARY2.js} +4 -2
- package/dist/{chunk-MIVX3GHD.js → chunk-K4BJARWM.js} +1 -1
- package/dist/{chunk-O4RYNJNB.js → chunk-KEKGSH7B.js} +1 -1
- package/dist/{chunk-GYQR4B4P.js → chunk-NBCNYDWJ.js} +2 -2
- package/dist/{chunk-ABZA6R5S.js → chunk-SQKXGAIR.js} +1 -1
- package/dist/{chunk-VFJQNBFX.js → chunk-UBT6EDVJ.js} +5 -2
- package/dist/{chunk-HRQRRDSS.js → chunk-WPTRVD2V.js} +3 -3
- package/dist/{chunk-IRW5TWMH.js → chunk-XX4RRWOX.js} +5 -5
- package/dist/graphql/objects/index.d.cts +5 -43
- package/dist/graphql/objects/index.d.ts +5 -43
- package/dist/graphql/objects/index.js +1 -1
- package/dist/{index-BJOc8Ur-.d.cts → index-CZmDdSts.d.cts} +24 -10
- package/dist/{index-7RYRH5wc.d.ts → index-ClIRO_3y.d.ts} +24 -10
- package/dist/index.cjs +827 -414
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +15 -15
- package/dist/index.node.cjs +830 -417
- package/dist/index.node.d.cts +7 -7
- package/dist/index.node.d.ts +7 -7
- package/dist/index.node.js +18 -18
- package/dist/native/index.cjs +827 -414
- package/dist/native/index.d.cts +88 -23
- package/dist/native/index.d.ts +88 -23
- package/dist/native/index.js +819 -407
- package/dist/{network-D5lKssVl.d.cts → network-CfxLnaot.d.cts} +1 -1
- package/dist/{network-xkBSpaTn.d.ts → network-CroCOQ0B.d.ts} +1 -1
- package/dist/proto/lrc20.d.cts +1 -1
- package/dist/proto/lrc20.d.ts +1 -1
- package/dist/proto/lrc20.js +2 -2
- package/dist/proto/spark.cjs +332 -221
- package/dist/proto/spark.d.cts +1 -1
- package/dist/proto/spark.d.ts +1 -1
- package/dist/proto/spark.js +3 -5
- package/dist/proto/spark_token.cjs +149 -9
- package/dist/proto/spark_token.d.cts +1 -1
- package/dist/proto/spark_token.d.ts +1 -1
- package/dist/proto/spark_token.js +2 -2
- package/dist/{sdk-types-B-q9py_P.d.cts → sdk-types-BeCBoozO.d.cts} +1 -1
- package/dist/{sdk-types-BPoPgzda.d.ts → sdk-types-CTbTdDbE.d.ts} +1 -1
- package/dist/services/config.cjs +7 -3
- package/dist/services/config.d.cts +4 -4
- package/dist/services/config.d.ts +4 -4
- package/dist/services/config.js +5 -5
- package/dist/services/connection.cjs +334 -218
- package/dist/services/connection.d.cts +4 -4
- package/dist/services/connection.d.ts +4 -4
- package/dist/services/connection.js +4 -4
- package/dist/services/index.cjs +364 -227
- package/dist/services/index.d.cts +4 -4
- package/dist/services/index.d.ts +4 -4
- package/dist/services/index.js +9 -9
- package/dist/services/lrc-connection.cjs +5 -2
- package/dist/services/lrc-connection.d.cts +4 -4
- package/dist/services/lrc-connection.d.ts +4 -4
- package/dist/services/lrc-connection.js +4 -4
- package/dist/services/token-transactions.cjs +28 -8
- package/dist/services/token-transactions.d.cts +4 -4
- package/dist/services/token-transactions.d.ts +4 -4
- package/dist/services/token-transactions.js +3 -3
- package/dist/services/wallet-config.cjs +2 -1
- package/dist/services/wallet-config.d.cts +4 -4
- package/dist/services/wallet-config.d.ts +4 -4
- package/dist/services/wallet-config.js +1 -1
- package/dist/signer/signer.cjs +5 -2
- package/dist/signer/signer.d.cts +2 -2
- package/dist/signer/signer.d.ts +2 -2
- package/dist/signer/signer.js +2 -2
- package/dist/{signer-wqesWifN.d.ts → signer-D7vfYik9.d.ts} +1 -1
- package/dist/{signer-IO3oMRNj.d.cts → signer-DaY8c60s.d.cts} +1 -1
- package/dist/{spark-CDm4gqS6.d.ts → spark-C4ZrsgjC.d.cts} +47 -29
- package/dist/{spark-CDm4gqS6.d.cts → spark-C4ZrsgjC.d.ts} +47 -29
- package/dist/types/index.cjs +331 -219
- package/dist/types/index.d.cts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +3 -3
- package/dist/utils/index.cjs +298 -28
- package/dist/utils/index.d.cts +5 -5
- package/dist/utils/index.d.ts +5 -5
- package/dist/utils/index.js +6 -6
- package/package.json +1 -1
- package/src/constants.ts +5 -1
- package/src/graphql/client.ts +28 -0
- package/src/graphql/mutations/RequestCoopExit.ts +6 -0
- package/src/graphql/mutations/RequestSwapLeaves.ts +2 -0
- package/src/graphql/queries/GetCoopExitFeeQuote.ts +20 -0
- package/src/proto/spark.ts +454 -322
- package/src/services/token-transactions.ts +12 -0
- package/src/services/transfer.ts +0 -3
- package/src/services/wallet-config.ts +1 -0
- package/src/spark-wallet/spark-wallet.node.ts +3 -3
- package/src/spark-wallet/spark-wallet.ts +301 -125
- package/src/tests/integration/deposit.test.ts +16 -0
- package/src/tests/integration/ssp/coop-exit.test.ts +85 -21
- package/src/tests/integration/ssp/swap.test.ts +47 -0
- package/src/tests/tokens.test.ts +3 -2
- package/src/utils/token-hashing.ts +28 -10
- package/src/utils/transaction.ts +2 -2
- package/src/logger.ts +0 -3
package/dist/proto/spark.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { K as Address,
|
|
1
|
+
export { K as Address, bc as AddressNode, ba as AddressRequestNode, bJ as BitcoinTransactionOutput, bu as CancelTransferRequest, bv as CancelTransferResponse, aI as ClaimLeafKeyTweak, aJ as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aL as ClaimTransferSignRefundsRequest, aM as ClaimTransferSignRefundsResponse, aK as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b0 as CooperativeExitRequest, b1 as CooperativeExitResponse, b2 as CounterLeafSwapRequest, b3 as CounterLeafSwapResponse, bf as CreateTreeRequest, bh as CreateTreeResponse, be as CreationNode, bg as CreationResponseNode, bV as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, by as DepositAddressQueryResult, G as DepositEvent, bI as ExitSingleNodeTreeSigningResult, bK as ExitSingleNodeTreesRequest, bL as ExitSingleNodeTreesResponse, bH as ExitingTree, b7 as ExtendLeafRequest, b9 as ExtendLeafResponse, b8 as ExtendLeafSigningResult, at as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, al as FinalizeTokenTransactionRequest, aE as FinalizeTransferRequest, aG as FinalizeTransferResponse, aF as FinalizeTransferWithTransferPackageRequest, am as FreezeTokensPayload, an as FreezeTokensRequest, ao as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aP as GetSigningCommitmentsRequest, aQ as GetSigningCommitmentsResponse, bj as GetSigningOperatorListResponse, bk as GetSigningOperatorListResponse_SigningOperatorsEntry, aW as InitiatePreimageSwapRequest, aX as InitiatePreimageSwapRequest_Reason, a_ as InitiatePreimageSwapResponse, bF as InitiateUtxoSwapRequest, bG as InitiateUtxoSwapResponse, bM as InvestigateLeavesRequest, aV as InvoiceAmount, aU as InvoiceAmountProof, aj as KeyshareWithIndex, aw as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, bX as MessageFns, N as Network, X as NodeOutput, a2 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ah as OperatorSpecificTokenTransactionSignablePayload, a$ as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bb as PrepareTreeAddressRequest, bd as PrepareTreeAddressResponse, bn as ProvidePreimageRequest, bo as ProvidePreimageResponse, bB as QueryBalanceRequest, bC as QueryBalanceResponse, bD as QueryBalanceResponse_NodeBalancesEntry, bQ as QueryNodesByValueRequest, bR as QueryNodesByValueResponse, bS as QueryNodesByValueResponse_NodesEntry, bN as QueryNodesDistributionRequest, bO as QueryNodesDistributionResponse, bP as QueryNodesDistributionResponse_NodeDistributionEntry, br as QueryNodesRequest, bs as QueryNodesResponse, bt as QueryNodesResponse_NodesEntry, bx as QueryStaticDepositAddressesRequest, bA as QueryStaticDepositAddressesResponse, ap as QueryTokenOutputsRequest, as as QueryTokenOutputsResponse, aq as QueryTokenTransactionsRequest, ar as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bw as QueryUnusedDepositAddressesRequest, bz as QueryUnusedDepositAddressesResponse, bl as QueryUserSignedRefundsRequest, bm as QueryUserSignedRefundsResponse, b4 as RefreshTimelockRequest, b6 as RefreshTimelockResponse, b5 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aO as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bp as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, av as SecretProof, au as SecretShare, aC as SendLeafKeyTweak, aD as SendLeafKeyTweak_PubkeySharesTweakEntry, aB as SendLeafKeyTweaks, bW as ServerStreamingMethodResult, ai as SignTokenTransactionRequest, ak as SignTokenTransactionResponse, ad as SignatureWithIndex, aR as SigningCommitments, aS as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, Z as SigningKeyshare_PublicSharesEntry, bi as SigningOperatorInfo, _ as SigningResult, $ as SigningResult_PublicKeysEntry, a1 as SigningResult_SignatureSharesEntry, a0 as SigningResult_SigningNonceCommitmentsEntry, bE as SparkAddress, g as SparkServiceClient, bT as SparkServiceDefinition, bU as SparkServiceImplementation, ab as SpentTokenOutputMetadata, a5 as StartDepositTreeCreationRequest, a6 as StartDepositTreeCreationResponse, af as StartTokenTransactionRequest, ag as StartTokenTransactionResponse, ay as StartTransferRequest, az as StartTransferResponse, a3 as StartTreeCreationRequest, a4 as StartTreeCreationResponse, ax as StartUserSignedTransferRequest, aN as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, a9 as TokenMintInput, aa as TokenOutput, a7 as TokenOutputToSpend, T as TokenTransaction, ac as TokenTransactionConfirmationMetadata, ae as TokenTransactionSignatures, o as TokenTransactionStatus, k as TokenTransactionWithStatus, a8 as TokenTransferInput, f as Transfer, D as TransferEvent, aH as TransferFilter, e as TransferLeaf, l as TransferPackage, aA as TransferPackage_KeyTweakPackageEntry, a as TransferStatus, b as TransferType, d as TreeNode, bq as TreeNodeIds, W as UTXO, aT as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aY as initiatePreimageSwapRequest_ReasonFromJSON, aZ 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-C4ZrsgjC.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,
|
|
1
|
+
export { K as Address, bc as AddressNode, ba as AddressRequestNode, bJ as BitcoinTransactionOutput, bu as CancelTransferRequest, bv as CancelTransferResponse, aI as ClaimLeafKeyTweak, aJ as ClaimLeafKeyTweak_PubkeySharesTweakEntry, aL as ClaimTransferSignRefundsRequest, aM as ClaimTransferSignRefundsResponse, aK as ClaimTransferTweakKeysRequest, C as ConnectedEvent, b0 as CooperativeExitRequest, b1 as CooperativeExitResponse, b2 as CounterLeafSwapRequest, b3 as CounterLeafSwapResponse, bf as CreateTreeRequest, bh as CreateTreeResponse, be as CreationNode, bg as CreationResponseNode, bV as DeepPartial, H as DepositAddressProof, I as DepositAddressProof_AddressSignaturesEntry, by as DepositAddressQueryResult, G as DepositEvent, bI as ExitSingleNodeTreeSigningResult, bK as ExitSingleNodeTreesRequest, bL as ExitSingleNodeTreesResponse, bH as ExitingTree, b7 as ExtendLeafRequest, b9 as ExtendLeafResponse, b8 as ExtendLeafSigningResult, at as FinalizeNodeSignaturesRequest, F as FinalizeNodeSignaturesResponse, al as FinalizeTokenTransactionRequest, aE as FinalizeTransferRequest, aG as FinalizeTransferResponse, aF as FinalizeTransferWithTransferPackageRequest, am as FreezeTokensPayload, an as FreezeTokensRequest, ao as FreezeTokensResponse, J as GenerateDepositAddressRequest, V as GenerateDepositAddressResponse, aP as GetSigningCommitmentsRequest, aQ as GetSigningCommitmentsResponse, bj as GetSigningOperatorListResponse, bk as GetSigningOperatorListResponse_SigningOperatorsEntry, aW as InitiatePreimageSwapRequest, aX as InitiatePreimageSwapRequest_Reason, a_ as InitiatePreimageSwapResponse, bF as InitiateUtxoSwapRequest, bG as InitiateUtxoSwapResponse, bM as InvestigateLeavesRequest, aV as InvoiceAmount, aU as InvoiceAmountProof, aj as KeyshareWithIndex, aw as LeafRefundTxSigningJob, L as LeafRefundTxSigningResult, bX as MessageFns, N as Network, X as NodeOutput, a2 as NodeSignatureShares, i as NodeSignatures, O as OperatorSpecificOwnerSignature, ah as OperatorSpecificTokenTransactionSignablePayload, a$ as OutPoint, j as OutputWithPreviousTransactionData, P as PaymentIntentFields, bb as PrepareTreeAddressRequest, bd as PrepareTreeAddressResponse, bn as ProvidePreimageRequest, bo as ProvidePreimageResponse, bB as QueryBalanceRequest, bC as QueryBalanceResponse, bD as QueryBalanceResponse_NodeBalancesEntry, bQ as QueryNodesByValueRequest, bR as QueryNodesByValueResponse, bS as QueryNodesByValueResponse_NodesEntry, bN as QueryNodesDistributionRequest, bO as QueryNodesDistributionResponse, bP as QueryNodesDistributionResponse_NodeDistributionEntry, br as QueryNodesRequest, bs as QueryNodesResponse, bt as QueryNodesResponse_NodesEntry, bx as QueryStaticDepositAddressesRequest, bA as QueryStaticDepositAddressesResponse, ap as QueryTokenOutputsRequest, as as QueryTokenOutputsResponse, aq as QueryTokenTransactionsRequest, ar as QueryTokenTransactionsResponse, Q as QueryTransfersResponse, bw as QueryUnusedDepositAddressesRequest, bz as QueryUnusedDepositAddressesResponse, bl as QueryUserSignedRefundsRequest, bm as QueryUserSignedRefundsResponse, b4 as RefreshTimelockRequest, b6 as RefreshTimelockResponse, b5 as RefreshTimelockSigningResult, h as RequestedSigningCommitments, aO as RequestedSigningCommitments_SigningNonceCommitmentsEntry, bp as ReturnLightningPaymentRequest, R as RevocationSecretWithIndex, av as SecretProof, au as SecretShare, aC as SendLeafKeyTweak, aD as SendLeafKeyTweak_PubkeySharesTweakEntry, aB as SendLeafKeyTweaks, bW as ServerStreamingMethodResult, ai as SignTokenTransactionRequest, ak as SignTokenTransactionResponse, ad as SignatureWithIndex, aR as SigningCommitments, aS as SigningCommitments_SigningCommitmentsEntry, Y as SigningJob, S as SigningKeyshare, Z as SigningKeyshare_PublicSharesEntry, bi as SigningOperatorInfo, _ as SigningResult, $ as SigningResult_PublicKeysEntry, a1 as SigningResult_SignatureSharesEntry, a0 as SigningResult_SigningNonceCommitmentsEntry, bE as SparkAddress, g as SparkServiceClient, bT as SparkServiceDefinition, bU as SparkServiceImplementation, ab as SpentTokenOutputMetadata, a5 as StartDepositTreeCreationRequest, a6 as StartDepositTreeCreationResponse, af as StartTokenTransactionRequest, ag as StartTokenTransactionResponse, ay as StartTransferRequest, az as StartTransferResponse, a3 as StartTreeCreationRequest, a4 as StartTreeCreationResponse, ax as StartUserSignedTransferRequest, aN as StorePreimageShareRequest, A as SubscribeToEventsRequest, B as SubscribeToEventsResponse, a9 as TokenMintInput, aa as TokenOutput, a7 as TokenOutputToSpend, T as TokenTransaction, ac as TokenTransactionConfirmationMetadata, ae as TokenTransactionSignatures, o as TokenTransactionStatus, k as TokenTransactionWithStatus, a8 as TokenTransferInput, f as Transfer, D as TransferEvent, aH as TransferFilter, e as TransferLeaf, l as TransferPackage, aA as TransferPackage_KeyTweakPackageEntry, a as TransferStatus, b as TransferType, d as TreeNode, bq as TreeNodeIds, W as UTXO, aT as UserSignedRefund, U as UserSignedTxSigningJob, x as UtxoSwapRequestType, aY as initiatePreimageSwapRequest_ReasonFromJSON, aZ 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-C4ZrsgjC.js';
|
|
2
2
|
import '@bufbuild/protobuf/wire';
|
|
3
3
|
import 'nice-grpc-common';
|
package/dist/proto/spark.js
CHANGED
|
@@ -2,8 +2,6 @@ import {
|
|
|
2
2
|
Address,
|
|
3
3
|
AddressNode,
|
|
4
4
|
AddressRequestNode,
|
|
5
|
-
AggregateNodesRequest,
|
|
6
|
-
AggregateNodesResponse,
|
|
7
5
|
BitcoinTransactionOutput,
|
|
8
6
|
CancelTransferRequest,
|
|
9
7
|
CancelTransferResponse,
|
|
@@ -113,6 +111,7 @@ import {
|
|
|
113
111
|
SigningCommitments_SigningCommitmentsEntry,
|
|
114
112
|
SigningJob,
|
|
115
113
|
SigningKeyshare,
|
|
114
|
+
SigningKeyshare_PublicSharesEntry,
|
|
116
115
|
SigningOperatorInfo,
|
|
117
116
|
SigningResult,
|
|
118
117
|
SigningResult_PublicKeysEntry,
|
|
@@ -169,14 +168,12 @@ import {
|
|
|
169
168
|
transferTypeToJSON,
|
|
170
169
|
utxoSwapRequestTypeFromJSON,
|
|
171
170
|
utxoSwapRequestTypeToJSON
|
|
172
|
-
} from "../chunk-
|
|
171
|
+
} from "../chunk-4Q2ZDYYU.js";
|
|
173
172
|
import "../chunk-MVRQ5US7.js";
|
|
174
173
|
export {
|
|
175
174
|
Address,
|
|
176
175
|
AddressNode,
|
|
177
176
|
AddressRequestNode,
|
|
178
|
-
AggregateNodesRequest,
|
|
179
|
-
AggregateNodesResponse,
|
|
180
177
|
BitcoinTransactionOutput,
|
|
181
178
|
CancelTransferRequest,
|
|
182
179
|
CancelTransferResponse,
|
|
@@ -286,6 +283,7 @@ export {
|
|
|
286
283
|
SigningCommitments_SigningCommitmentsEntry,
|
|
287
284
|
SigningJob,
|
|
288
285
|
SigningKeyshare,
|
|
286
|
+
SigningKeyshare_PublicSharesEntry,
|
|
289
287
|
SigningOperatorInfo,
|
|
290
288
|
SigningResult,
|
|
291
289
|
SigningResult_PublicKeysEntry,
|
|
@@ -188,7 +188,7 @@ function networkToJSON(object) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
function createBaseSigningKeyshare() {
|
|
191
|
-
return { ownerIdentifiers: [], threshold: 0, publicKey: new Uint8Array(0) };
|
|
191
|
+
return { ownerIdentifiers: [], threshold: 0, publicKey: new Uint8Array(0), publicShares: {}, updatedTime: void 0 };
|
|
192
192
|
}
|
|
193
193
|
var SigningKeyshare = {
|
|
194
194
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -201,6 +201,12 @@ var SigningKeyshare = {
|
|
|
201
201
|
if (message.publicKey.length !== 0) {
|
|
202
202
|
writer.uint32(26).bytes(message.publicKey);
|
|
203
203
|
}
|
|
204
|
+
Object.entries(message.publicShares).forEach(([key, value]) => {
|
|
205
|
+
SigningKeyshare_PublicSharesEntry.encode({ key, value }, writer.uint32(34).fork()).join();
|
|
206
|
+
});
|
|
207
|
+
if (message.updatedTime !== void 0) {
|
|
208
|
+
Timestamp.encode(toTimestamp(message.updatedTime), writer.uint32(42).fork()).join();
|
|
209
|
+
}
|
|
204
210
|
return writer;
|
|
205
211
|
},
|
|
206
212
|
decode(input, length) {
|
|
@@ -231,6 +237,23 @@ var SigningKeyshare = {
|
|
|
231
237
|
message.publicKey = reader.bytes();
|
|
232
238
|
continue;
|
|
233
239
|
}
|
|
240
|
+
case 4: {
|
|
241
|
+
if (tag !== 34) {
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
const entry4 = SigningKeyshare_PublicSharesEntry.decode(reader, reader.uint32());
|
|
245
|
+
if (entry4.value !== void 0) {
|
|
246
|
+
message.publicShares[entry4.key] = entry4.value;
|
|
247
|
+
}
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
case 5: {
|
|
251
|
+
if (tag !== 42) {
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
message.updatedTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
234
257
|
}
|
|
235
258
|
if ((tag & 7) === 4 || tag === 0) {
|
|
236
259
|
break;
|
|
@@ -243,7 +266,12 @@ var SigningKeyshare = {
|
|
|
243
266
|
return {
|
|
244
267
|
ownerIdentifiers: globalThis.Array.isArray(object?.ownerIdentifiers) ? object.ownerIdentifiers.map((e) => globalThis.String(e)) : [],
|
|
245
268
|
threshold: isSet2(object.threshold) ? globalThis.Number(object.threshold) : 0,
|
|
246
|
-
publicKey: isSet2(object.publicKey) ? bytesFromBase64(object.publicKey) : new Uint8Array(0)
|
|
269
|
+
publicKey: isSet2(object.publicKey) ? bytesFromBase64(object.publicKey) : new Uint8Array(0),
|
|
270
|
+
publicShares: isObject(object.publicShares) ? Object.entries(object.publicShares).reduce((acc, [key, value]) => {
|
|
271
|
+
acc[key] = bytesFromBase64(value);
|
|
272
|
+
return acc;
|
|
273
|
+
}, {}) : {},
|
|
274
|
+
updatedTime: isSet2(object.updatedTime) ? fromJsonTimestamp(object.updatedTime) : void 0
|
|
247
275
|
};
|
|
248
276
|
},
|
|
249
277
|
toJSON(message) {
|
|
@@ -257,6 +285,18 @@ var SigningKeyshare = {
|
|
|
257
285
|
if (message.publicKey.length !== 0) {
|
|
258
286
|
obj.publicKey = base64FromBytes(message.publicKey);
|
|
259
287
|
}
|
|
288
|
+
if (message.publicShares) {
|
|
289
|
+
const entries = Object.entries(message.publicShares);
|
|
290
|
+
if (entries.length > 0) {
|
|
291
|
+
obj.publicShares = {};
|
|
292
|
+
entries.forEach(([k, v]) => {
|
|
293
|
+
obj.publicShares[k] = base64FromBytes(v);
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
if (message.updatedTime !== void 0) {
|
|
298
|
+
obj.updatedTime = message.updatedTime.toISOString();
|
|
299
|
+
}
|
|
260
300
|
return obj;
|
|
261
301
|
},
|
|
262
302
|
create(base) {
|
|
@@ -267,6 +307,84 @@ var SigningKeyshare = {
|
|
|
267
307
|
message.ownerIdentifiers = object.ownerIdentifiers?.map((e) => e) || [];
|
|
268
308
|
message.threshold = object.threshold ?? 0;
|
|
269
309
|
message.publicKey = object.publicKey ?? new Uint8Array(0);
|
|
310
|
+
message.publicShares = Object.entries(object.publicShares ?? {}).reduce(
|
|
311
|
+
(acc, [key, value]) => {
|
|
312
|
+
if (value !== void 0) {
|
|
313
|
+
acc[key] = value;
|
|
314
|
+
}
|
|
315
|
+
return acc;
|
|
316
|
+
},
|
|
317
|
+
{}
|
|
318
|
+
);
|
|
319
|
+
message.updatedTime = object.updatedTime ?? void 0;
|
|
320
|
+
return message;
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
function createBaseSigningKeyshare_PublicSharesEntry() {
|
|
324
|
+
return { key: "", value: new Uint8Array(0) };
|
|
325
|
+
}
|
|
326
|
+
var SigningKeyshare_PublicSharesEntry = {
|
|
327
|
+
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
328
|
+
if (message.key !== "") {
|
|
329
|
+
writer.uint32(10).string(message.key);
|
|
330
|
+
}
|
|
331
|
+
if (message.value.length !== 0) {
|
|
332
|
+
writer.uint32(18).bytes(message.value);
|
|
333
|
+
}
|
|
334
|
+
return writer;
|
|
335
|
+
},
|
|
336
|
+
decode(input, length) {
|
|
337
|
+
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
338
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
339
|
+
const message = createBaseSigningKeyshare_PublicSharesEntry();
|
|
340
|
+
while (reader.pos < end) {
|
|
341
|
+
const tag = reader.uint32();
|
|
342
|
+
switch (tag >>> 3) {
|
|
343
|
+
case 1: {
|
|
344
|
+
if (tag !== 10) {
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
message.key = reader.string();
|
|
348
|
+
continue;
|
|
349
|
+
}
|
|
350
|
+
case 2: {
|
|
351
|
+
if (tag !== 18) {
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
message.value = reader.bytes();
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
reader.skip(tag & 7);
|
|
362
|
+
}
|
|
363
|
+
return message;
|
|
364
|
+
},
|
|
365
|
+
fromJSON(object) {
|
|
366
|
+
return {
|
|
367
|
+
key: isSet2(object.key) ? globalThis.String(object.key) : "",
|
|
368
|
+
value: isSet2(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0)
|
|
369
|
+
};
|
|
370
|
+
},
|
|
371
|
+
toJSON(message) {
|
|
372
|
+
const obj = {};
|
|
373
|
+
if (message.key !== "") {
|
|
374
|
+
obj.key = message.key;
|
|
375
|
+
}
|
|
376
|
+
if (message.value.length !== 0) {
|
|
377
|
+
obj.value = base64FromBytes(message.value);
|
|
378
|
+
}
|
|
379
|
+
return obj;
|
|
380
|
+
},
|
|
381
|
+
create(base) {
|
|
382
|
+
return SigningKeyshare_PublicSharesEntry.fromPartial(base ?? {});
|
|
383
|
+
},
|
|
384
|
+
fromPartial(object) {
|
|
385
|
+
const message = createBaseSigningKeyshare_PublicSharesEntry();
|
|
386
|
+
message.key = object.key ?? "";
|
|
387
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
270
388
|
return message;
|
|
271
389
|
}
|
|
272
390
|
};
|
|
@@ -293,6 +411,28 @@ function base64FromBytes(arr) {
|
|
|
293
411
|
return globalThis.btoa(bin.join(""));
|
|
294
412
|
}
|
|
295
413
|
}
|
|
414
|
+
function toTimestamp(date) {
|
|
415
|
+
const seconds = Math.trunc(date.getTime() / 1e3);
|
|
416
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
417
|
+
return { seconds, nanos };
|
|
418
|
+
}
|
|
419
|
+
function fromTimestamp(t) {
|
|
420
|
+
let millis = (t.seconds || 0) * 1e3;
|
|
421
|
+
millis += (t.nanos || 0) / 1e6;
|
|
422
|
+
return new globalThis.Date(millis);
|
|
423
|
+
}
|
|
424
|
+
function fromJsonTimestamp(o) {
|
|
425
|
+
if (o instanceof globalThis.Date) {
|
|
426
|
+
return o;
|
|
427
|
+
} else if (typeof o === "string") {
|
|
428
|
+
return new globalThis.Date(o);
|
|
429
|
+
} else {
|
|
430
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
function isObject(value) {
|
|
434
|
+
return typeof value === "object" && value !== null;
|
|
435
|
+
}
|
|
296
436
|
function isSet2(value) {
|
|
297
437
|
return value !== null && value !== void 0;
|
|
298
438
|
}
|
|
@@ -669,7 +809,7 @@ var TokenTransaction = {
|
|
|
669
809
|
writer.uint32(42).bytes(v);
|
|
670
810
|
}
|
|
671
811
|
if (message.expiryTime !== void 0) {
|
|
672
|
-
Timestamp.encode(
|
|
812
|
+
Timestamp.encode(toTimestamp2(message.expiryTime), writer.uint32(50).fork()).join();
|
|
673
813
|
}
|
|
674
814
|
if (message.network !== 0) {
|
|
675
815
|
writer.uint32(56).int32(message.network);
|
|
@@ -725,7 +865,7 @@ var TokenTransaction = {
|
|
|
725
865
|
if (tag !== 50) {
|
|
726
866
|
break;
|
|
727
867
|
}
|
|
728
|
-
message.expiryTime =
|
|
868
|
+
message.expiryTime = fromTimestamp2(Timestamp.decode(reader, reader.uint32()));
|
|
729
869
|
continue;
|
|
730
870
|
}
|
|
731
871
|
case 7: {
|
|
@@ -749,7 +889,7 @@ var TokenTransaction = {
|
|
|
749
889
|
tokenInputs: isSet3(object.mintInput) ? { $case: "mintInput", mintInput: TokenMintInput.fromJSON(object.mintInput) } : isSet3(object.transferInput) ? { $case: "transferInput", transferInput: TokenTransferInput.fromJSON(object.transferInput) } : void 0,
|
|
750
890
|
tokenOutputs: globalThis.Array.isArray(object?.tokenOutputs) ? object.tokenOutputs.map((e) => TokenOutput.fromJSON(e)) : [],
|
|
751
891
|
sparkOperatorIdentityPublicKeys: globalThis.Array.isArray(object?.sparkOperatorIdentityPublicKeys) ? object.sparkOperatorIdentityPublicKeys.map((e) => bytesFromBase642(e)) : [],
|
|
752
|
-
expiryTime: isSet3(object.expiryTime) ?
|
|
892
|
+
expiryTime: isSet3(object.expiryTime) ? fromJsonTimestamp2(object.expiryTime) : void 0,
|
|
753
893
|
network: isSet3(object.network) ? networkFromJSON(object.network) : 0
|
|
754
894
|
};
|
|
755
895
|
},
|
|
@@ -1314,23 +1454,23 @@ function base64FromBytes2(arr) {
|
|
|
1314
1454
|
return globalThis.btoa(bin.join(""));
|
|
1315
1455
|
}
|
|
1316
1456
|
}
|
|
1317
|
-
function
|
|
1457
|
+
function toTimestamp2(date) {
|
|
1318
1458
|
const seconds = Math.trunc(date.getTime() / 1e3);
|
|
1319
1459
|
const nanos = date.getTime() % 1e3 * 1e6;
|
|
1320
1460
|
return { seconds, nanos };
|
|
1321
1461
|
}
|
|
1322
|
-
function
|
|
1462
|
+
function fromTimestamp2(t) {
|
|
1323
1463
|
let millis = (t.seconds || 0) * 1e3;
|
|
1324
1464
|
millis += (t.nanos || 0) / 1e6;
|
|
1325
1465
|
return new globalThis.Date(millis);
|
|
1326
1466
|
}
|
|
1327
|
-
function
|
|
1467
|
+
function fromJsonTimestamp2(o) {
|
|
1328
1468
|
if (o instanceof globalThis.Date) {
|
|
1329
1469
|
return o;
|
|
1330
1470
|
} else if (typeof o === "string") {
|
|
1331
1471
|
return new globalThis.Date(o);
|
|
1332
1472
|
} else {
|
|
1333
|
-
return
|
|
1473
|
+
return fromTimestamp2(Timestamp.fromJSON(o));
|
|
1334
1474
|
}
|
|
1335
1475
|
}
|
|
1336
1476
|
function longToNumber2(int64) {
|
|
@@ -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-C4ZrsgjC.cjs';
|
|
4
4
|
|
|
5
5
|
declare const protobufPackage = "spark_token";
|
|
6
6
|
/**
|
|
@@ -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-C4ZrsgjC.js';
|
|
4
4
|
|
|
5
5
|
declare const protobufPackage = "spark_token";
|
|
6
6
|
/**
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
TokenTransaction,
|
|
13
13
|
TokenTransferInput,
|
|
14
14
|
protobufPackage
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
} from "../chunk-B3AMIGJG.js";
|
|
16
|
+
import "../chunk-4Q2ZDYYU.js";
|
|
17
17
|
import "../chunk-MVRQ5US7.js";
|
|
18
18
|
export {
|
|
19
19
|
CommitTransactionRequest,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TransferStatus, S as SigningKeyshare, N as Network, b as TransferType, d as TreeNode, e as TransferLeaf, f as Transfer } from './spark-
|
|
1
|
+
import { a as TransferStatus, S as SigningKeyshare, N as Network, b as TransferType, d as TreeNode, e as TransferLeaf, f as Transfer } from './spark-C4ZrsgjC.cjs';
|
|
2
2
|
|
|
3
3
|
interface WalletLeaf {
|
|
4
4
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TransferStatus, S as SigningKeyshare, N as Network, b as TransferType, d as TreeNode, e as TransferLeaf, f as Transfer } from './spark-
|
|
1
|
+
import { a as TransferStatus, S as SigningKeyshare, N as Network, b as TransferType, d as TreeNode, e as TransferLeaf, f as Transfer } from './spark-C4ZrsgjC.js';
|
|
2
2
|
|
|
3
3
|
interface WalletLeaf {
|
|
4
4
|
id: string;
|
package/dist/services/config.cjs
CHANGED
|
@@ -1135,9 +1135,12 @@ init_buffer();
|
|
|
1135
1135
|
var import_core = require("@lightsparkdev/core");
|
|
1136
1136
|
var isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative";
|
|
1137
1137
|
var isBun = globalThis.Bun !== void 0;
|
|
1138
|
-
var packageVersion = true ? "0.1.
|
|
1138
|
+
var packageVersion = true ? "0.1.44" : "unknown";
|
|
1139
1139
|
var baseEnvStr = "unknown";
|
|
1140
|
-
if (
|
|
1140
|
+
if (isBun) {
|
|
1141
|
+
const bunVersion = "version" in globalThis.Bun ? globalThis.Bun.version : "unknown-version";
|
|
1142
|
+
baseEnvStr = `bun/${bunVersion}`;
|
|
1143
|
+
} else if (import_core.isNode) {
|
|
1141
1144
|
baseEnvStr = `node/${process.version}`;
|
|
1142
1145
|
} else if (isReactNative) {
|
|
1143
1146
|
baseEnvStr = "react-native";
|
|
@@ -2139,7 +2142,8 @@ var BASE_CONFIG = {
|
|
|
2139
2142
|
}
|
|
2140
2143
|
};
|
|
2141
2144
|
var LOCAL_WALLET_CONFIG = {
|
|
2142
|
-
...BASE_CONFIG
|
|
2145
|
+
...BASE_CONFIG,
|
|
2146
|
+
threshold: 3
|
|
2143
2147
|
};
|
|
2144
2148
|
var LOCAL_WALLET_CONFIG_SCHNORR = {
|
|
2145
2149
|
...LOCAL_WALLET_CONFIG,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HasLrc20WalletApiConfig, LRC20WalletApiConfig } from '@buildonspark/lrc20-sdk';
|
|
2
|
-
import { H as HasSspClientOptions,
|
|
2
|
+
import { H as HasSspClientOptions, J as SspClientOptions } from '../RequestLightningSendInput-BxbCtwpV.cjs';
|
|
3
3
|
import { B as BitcoinNetwork } from '../BitcoinNetwork-TnABML0T.cjs';
|
|
4
|
-
import { S as SparkSigner } from '../signer-
|
|
5
|
-
import { N as Network, a as NetworkType } from '../network-
|
|
4
|
+
import { S as SparkSigner } from '../signer-DaY8c60s.cjs';
|
|
5
|
+
import { N as Network, a as NetworkType } from '../network-CfxLnaot.cjs';
|
|
6
6
|
import { ConfigOptions, SigningOperator } from './wallet-config.cjs';
|
|
7
7
|
import '@lightsparkdev/core';
|
|
8
8
|
import '@scure/bip32';
|
|
9
|
-
import '../spark-
|
|
9
|
+
import '../spark-C4ZrsgjC.cjs';
|
|
10
10
|
import '@bufbuild/protobuf/wire';
|
|
11
11
|
import 'nice-grpc-common';
|
|
12
12
|
import '@scure/btc-signer';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HasLrc20WalletApiConfig, LRC20WalletApiConfig } from '@buildonspark/lrc20-sdk';
|
|
2
|
-
import { H as HasSspClientOptions,
|
|
2
|
+
import { H as HasSspClientOptions, J as SspClientOptions } from '../RequestLightningSendInput-RGel43ks.js';
|
|
3
3
|
import { B as BitcoinNetwork } from '../BitcoinNetwork-TnABML0T.js';
|
|
4
|
-
import { S as SparkSigner } from '../signer-
|
|
5
|
-
import { N as Network, a as NetworkType } from '../network-
|
|
4
|
+
import { S as SparkSigner } from '../signer-D7vfYik9.js';
|
|
5
|
+
import { N as Network, a as NetworkType } from '../network-CroCOQ0B.js';
|
|
6
6
|
import { ConfigOptions, SigningOperator } from './wallet-config.js';
|
|
7
7
|
import '@lightsparkdev/core';
|
|
8
8
|
import '@scure/bip32';
|
|
9
|
-
import '../spark-
|
|
9
|
+
import '../spark-C4ZrsgjC.js';
|
|
10
10
|
import '@bufbuild/protobuf/wire';
|
|
11
11
|
import 'nice-grpc-common';
|
|
12
12
|
import '@scure/btc-signer';
|
package/dist/services/config.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WalletConfigService
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-DAXGVPVM.js";
|
|
4
4
|
import "../chunk-Z5HIAYFT.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-EKFD62HN.js";
|
|
6
6
|
import "../chunk-HMLOC6TE.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-4Q2ZDYYU.js";
|
|
8
|
+
import "../chunk-HTMXTJRK.js";
|
|
9
|
+
import "../chunk-UBT6EDVJ.js";
|
|
10
10
|
import "../chunk-NSJF5F5O.js";
|
|
11
11
|
import "../chunk-QNNSEJ4P.js";
|
|
12
12
|
import "../chunk-VTUGIIWI.js";
|