@buildonspark/spark-sdk 0.0.0
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/dist/graphql/client.d.ts +24 -0
- package/dist/graphql/client.js +177 -0
- package/dist/graphql/client.js.map +1 -0
- package/dist/graphql/mutations/CompleteCoopExit.d.ts +1 -0
- package/dist/graphql/mutations/CompleteCoopExit.js +19 -0
- package/dist/graphql/mutations/CompleteCoopExit.js.map +1 -0
- package/dist/graphql/mutations/CompleteLeavesSwap.d.ts +1 -0
- package/dist/graphql/mutations/CompleteLeavesSwap.js +17 -0
- package/dist/graphql/mutations/CompleteLeavesSwap.js.map +1 -0
- package/dist/graphql/mutations/RequestCoopExit.d.ts +1 -0
- package/dist/graphql/mutations/RequestCoopExit.js +20 -0
- package/dist/graphql/mutations/RequestCoopExit.js.map +1 -0
- package/dist/graphql/mutations/RequestLightningReceive.d.ts +1 -0
- package/dist/graphql/mutations/RequestLightningReceive.js +26 -0
- package/dist/graphql/mutations/RequestLightningReceive.js.map +1 -0
- package/dist/graphql/mutations/RequestLightningSend.d.ts +1 -0
- package/dist/graphql/mutations/RequestLightningSend.js +18 -0
- package/dist/graphql/mutations/RequestLightningSend.js.map +1 -0
- package/dist/graphql/mutations/RequestSwapLeaves.d.ts +1 -0
- package/dist/graphql/mutations/RequestSwapLeaves.js +26 -0
- package/dist/graphql/mutations/RequestSwapLeaves.js.map +1 -0
- package/dist/graphql/objects/BitcoinNetwork.d.ts +17 -0
- package/dist/graphql/objects/BitcoinNetwork.js +20 -0
- package/dist/graphql/objects/BitcoinNetwork.js.map +1 -0
- package/dist/graphql/objects/CompleteCoopExitInput.d.ts +7 -0
- package/dist/graphql/objects/CompleteCoopExitInput.js +14 -0
- package/dist/graphql/objects/CompleteCoopExitInput.js.map +1 -0
- package/dist/graphql/objects/CompleteCoopExitOutput.d.ts +7 -0
- package/dist/graphql/objects/CompleteCoopExitOutput.js +19 -0
- package/dist/graphql/objects/CompleteCoopExitOutput.js.map +1 -0
- package/dist/graphql/objects/CompleteLeavesSwapInput.d.ts +8 -0
- package/dist/graphql/objects/CompleteLeavesSwapInput.js +16 -0
- package/dist/graphql/objects/CompleteLeavesSwapInput.js.map +1 -0
- package/dist/graphql/objects/CompleteLeavesSwapOutput.d.ts +7 -0
- package/dist/graphql/objects/CompleteLeavesSwapOutput.js +19 -0
- package/dist/graphql/objects/CompleteLeavesSwapOutput.js.map +1 -0
- package/dist/graphql/objects/Connection.d.ts +16 -0
- package/dist/graphql/objects/Connection.js +56 -0
- package/dist/graphql/objects/Connection.js.map +1 -0
- package/dist/graphql/objects/CoopExitFeeEstimateInput.d.ts +7 -0
- package/dist/graphql/objects/CoopExitFeeEstimateInput.js +14 -0
- package/dist/graphql/objects/CoopExitFeeEstimateInput.js.map +1 -0
- package/dist/graphql/objects/CoopExitFeeEstimateOutput.d.ts +8 -0
- package/dist/graphql/objects/CoopExitFeeEstimateOutput.js +26 -0
- package/dist/graphql/objects/CoopExitFeeEstimateOutput.js.map +1 -0
- package/dist/graphql/objects/CoopExitRequest.d.ts +32 -0
- package/dist/graphql/objects/CoopExitRequest.js +64 -0
- package/dist/graphql/objects/CoopExitRequest.js.map +1 -0
- package/dist/graphql/objects/CurrencyAmount.d.ts +24 -0
- package/dist/graphql/objects/CurrencyAmount.js +30 -0
- package/dist/graphql/objects/CurrencyAmount.js.map +1 -0
- package/dist/graphql/objects/CurrencyUnit.d.ts +27 -0
- package/dist/graphql/objects/CurrencyUnit.js +30 -0
- package/dist/graphql/objects/CurrencyUnit.js.map +1 -0
- package/dist/graphql/objects/Entity.d.ts +16 -0
- package/dist/graphql/objects/Entity.js +141 -0
- package/dist/graphql/objects/Entity.js.map +1 -0
- package/dist/graphql/objects/Invoice.d.ts +15 -0
- package/dist/graphql/objects/Invoice.js +45 -0
- package/dist/graphql/objects/Invoice.js.map +1 -0
- package/dist/graphql/objects/Leaf.d.ts +11 -0
- package/dist/graphql/objects/Leaf.js +29 -0
- package/dist/graphql/objects/Leaf.js.map +1 -0
- package/dist/graphql/objects/LeavesSwapFeeEstimateInput.d.ts +6 -0
- package/dist/graphql/objects/LeavesSwapFeeEstimateInput.js +12 -0
- package/dist/graphql/objects/LeavesSwapFeeEstimateInput.js.map +1 -0
- package/dist/graphql/objects/LeavesSwapFeeEstimateOutput.d.ts +8 -0
- package/dist/graphql/objects/LeavesSwapFeeEstimateOutput.js +26 -0
- package/dist/graphql/objects/LeavesSwapFeeEstimateOutput.js.map +1 -0
- package/dist/graphql/objects/LeavesSwapRequest.d.ts +32 -0
- package/dist/graphql/objects/LeavesSwapRequest.js +87 -0
- package/dist/graphql/objects/LeavesSwapRequest.js.map +1 -0
- package/dist/graphql/objects/LightningReceiveFeeEstimateInput.d.ts +8 -0
- package/dist/graphql/objects/LightningReceiveFeeEstimateInput.js +15 -0
- package/dist/graphql/objects/LightningReceiveFeeEstimateInput.js.map +1 -0
- package/dist/graphql/objects/LightningReceiveFeeEstimateOutput.d.ts +8 -0
- package/dist/graphql/objects/LightningReceiveFeeEstimateOutput.js +26 -0
- package/dist/graphql/objects/LightningReceiveFeeEstimateOutput.js.map +1 -0
- package/dist/graphql/objects/LightningReceiveRequest.d.ts +31 -0
- package/dist/graphql/objects/LightningReceiveRequest.js +93 -0
- package/dist/graphql/objects/LightningReceiveRequest.js.map +1 -0
- package/dist/graphql/objects/LightningReceiveRequestStatus.d.ts +16 -0
- package/dist/graphql/objects/LightningReceiveRequestStatus.js +19 -0
- package/dist/graphql/objects/LightningReceiveRequestStatus.js.map +1 -0
- package/dist/graphql/objects/LightningSendFeeEstimateInput.d.ts +6 -0
- package/dist/graphql/objects/LightningSendFeeEstimateInput.js +12 -0
- package/dist/graphql/objects/LightningSendFeeEstimateInput.js.map +1 -0
- package/dist/graphql/objects/LightningSendFeeEstimateOutput.d.ts +8 -0
- package/dist/graphql/objects/LightningSendFeeEstimateOutput.js +26 -0
- package/dist/graphql/objects/LightningSendFeeEstimateOutput.js.map +1 -0
- package/dist/graphql/objects/LightningSendRequest.d.ts +32 -0
- package/dist/graphql/objects/LightningSendRequest.js +78 -0
- package/dist/graphql/objects/LightningSendRequest.js.map +1 -0
- package/dist/graphql/objects/LightningSendRequestStatus.d.ts +15 -0
- package/dist/graphql/objects/LightningSendRequestStatus.js +18 -0
- package/dist/graphql/objects/LightningSendRequestStatus.js.map +1 -0
- package/dist/graphql/objects/PageInfo.d.ts +11 -0
- package/dist/graphql/objects/PageInfo.js +26 -0
- package/dist/graphql/objects/PageInfo.js.map +1 -0
- package/dist/graphql/objects/RequestCoopExitInput.d.ts +7 -0
- package/dist/graphql/objects/RequestCoopExitInput.js +14 -0
- package/dist/graphql/objects/RequestCoopExitInput.js.map +1 -0
- package/dist/graphql/objects/RequestCoopExitOutput.d.ts +7 -0
- package/dist/graphql/objects/RequestCoopExitOutput.js +19 -0
- package/dist/graphql/objects/RequestCoopExitOutput.js.map +1 -0
- package/dist/graphql/objects/RequestLeavesSwapInput.d.ts +13 -0
- package/dist/graphql/objects/RequestLeavesSwapInput.js +25 -0
- package/dist/graphql/objects/RequestLeavesSwapInput.js.map +1 -0
- package/dist/graphql/objects/RequestLeavesSwapOutput.d.ts +7 -0
- package/dist/graphql/objects/RequestLeavesSwapOutput.js +19 -0
- package/dist/graphql/objects/RequestLeavesSwapOutput.js.map +1 -0
- package/dist/graphql/objects/RequestLightningReceiveInput.d.ts +16 -0
- package/dist/graphql/objects/RequestLightningReceiveInput.js +21 -0
- package/dist/graphql/objects/RequestLightningReceiveInput.js.map +1 -0
- package/dist/graphql/objects/RequestLightningReceiveOutput.d.ts +7 -0
- package/dist/graphql/objects/RequestLightningReceiveOutput.js +19 -0
- package/dist/graphql/objects/RequestLightningReceiveOutput.js.map +1 -0
- package/dist/graphql/objects/RequestLightningSendInput.d.ts +7 -0
- package/dist/graphql/objects/RequestLightningSendInput.js +14 -0
- package/dist/graphql/objects/RequestLightningSendInput.js.map +1 -0
- package/dist/graphql/objects/RequestLightningSendOutput.d.ts +7 -0
- package/dist/graphql/objects/RequestLightningSendOutput.js +19 -0
- package/dist/graphql/objects/RequestLightningSendOutput.js.map +1 -0
- package/dist/graphql/objects/SparkCoopExitRequestStatus.d.ts +11 -0
- package/dist/graphql/objects/SparkCoopExitRequestStatus.js +14 -0
- package/dist/graphql/objects/SparkCoopExitRequestStatus.js.map +1 -0
- package/dist/graphql/objects/SparkLeavesSwapRequestStatus.d.ts +11 -0
- package/dist/graphql/objects/SparkLeavesSwapRequestStatus.js +14 -0
- package/dist/graphql/objects/SparkLeavesSwapRequestStatus.js.map +1 -0
- package/dist/graphql/objects/SparkTransferToLeavesConnection.d.ts +19 -0
- package/dist/graphql/objects/SparkTransferToLeavesConnection.js +45 -0
- package/dist/graphql/objects/SparkTransferToLeavesConnection.js.map +1 -0
- package/dist/graphql/objects/SwapLeaf.d.ts +9 -0
- package/dist/graphql/objects/SwapLeaf.js +23 -0
- package/dist/graphql/objects/SwapLeaf.js.map +1 -0
- package/dist/graphql/objects/Transfer.d.ts +24 -0
- package/dist/graphql/objects/Transfer.js +82 -0
- package/dist/graphql/objects/Transfer.js.map +1 -0
- package/dist/graphql/objects/UserLeafInput.d.ts +8 -0
- package/dist/graphql/objects/UserLeafInput.js +16 -0
- package/dist/graphql/objects/UserLeafInput.js.map +1 -0
- package/dist/graphql/objects/WalletUser.d.ts +21 -0
- package/dist/graphql/objects/WalletUser.js +48 -0
- package/dist/graphql/objects/WalletUser.js.map +1 -0
- package/dist/graphql/objects/index.d.ts +41 -0
- package/dist/graphql/objects/index.js +13 -0
- package/dist/graphql/objects/index.js.map +1 -0
- package/dist/graphql/queries/CoopExitFeeEstimate.d.ts +1 -0
- package/dist/graphql/queries/CoopExitFeeEstimate.js +18 -0
- package/dist/graphql/queries/CoopExitFeeEstimate.js.map +1 -0
- package/dist/graphql/queries/CurrentUser.d.ts +1 -0
- package/dist/graphql/queries/CurrentUser.js +10 -0
- package/dist/graphql/queries/CurrentUser.js.map +1 -0
- package/dist/graphql/queries/LightningReceiveFeeEstimate.d.ts +1 -0
- package/dist/graphql/queries/LightningReceiveFeeEstimate.js +18 -0
- package/dist/graphql/queries/LightningReceiveFeeEstimate.js.map +1 -0
- package/dist/graphql/queries/LightningSendFeeEstimate.d.ts +1 -0
- package/dist/graphql/queries/LightningSendFeeEstimate.js +16 -0
- package/dist/graphql/queries/LightningSendFeeEstimate.js.map +1 -0
- package/dist/proto/common.d.ts +58 -0
- package/dist/proto/common.js +350 -0
- package/dist/proto/common.js.map +1 -0
- package/dist/proto/google/protobuf/descriptor.d.ts +1228 -0
- package/dist/proto/google/protobuf/descriptor.js +5070 -0
- package/dist/proto/google/protobuf/descriptor.js.map +1 -0
- package/dist/proto/google/protobuf/duration.d.ts +99 -0
- package/dist/proto/google/protobuf/duration.js +90 -0
- package/dist/proto/google/protobuf/duration.js.map +1 -0
- package/dist/proto/google/protobuf/empty.d.ts +33 -0
- package/dist/proto/google/protobuf/empty.js +46 -0
- package/dist/proto/google/protobuf/empty.js.map +1 -0
- package/dist/proto/google/protobuf/timestamp.d.ts +128 -0
- package/dist/proto/google/protobuf/timestamp.js +90 -0
- package/dist/proto/google/protobuf/timestamp.js.map +1 -0
- package/dist/proto/mock.d.ts +48 -0
- package/dist/proto/mock.js +103 -0
- package/dist/proto/mock.js.map +1 -0
- package/dist/proto/spark.d.ts +1101 -0
- package/dist/proto/spark.js +9565 -0
- package/dist/proto/spark.js.map +1 -0
- package/dist/proto/spark_authn.d.ts +111 -0
- package/dist/proto/spark_authn.js +517 -0
- package/dist/proto/spark_authn.js.map +1 -0
- package/dist/proto/validate/validate.d.ts +1087 -0
- package/dist/proto/validate/validate.js +4437 -0
- package/dist/proto/validate/validate.js.map +1 -0
- package/dist/services/config.d.ts +24 -0
- package/dist/services/config.js +29 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/connection.d.ts +21 -0
- package/dist/services/connection.js +154 -0
- package/dist/services/connection.js.map +1 -0
- package/dist/services/coop-exit.d.ts +20 -0
- package/dist/services/coop-exit.js +102 -0
- package/dist/services/coop-exit.js.map +1 -0
- package/dist/services/deposit.d.ts +21 -0
- package/dist/services/deposit.js +214 -0
- package/dist/services/deposit.js.map +1 -0
- package/dist/services/lightning.d.ts +31 -0
- package/dist/services/lightning.js +196 -0
- package/dist/services/lightning.js.map +1 -0
- package/dist/services/token-transactions.d.ts +17 -0
- package/dist/services/token-transactions.js +297 -0
- package/dist/services/token-transactions.js.map +1 -0
- package/dist/services/transfer.d.ts +63 -0
- package/dist/services/transfer.js +499 -0
- package/dist/services/transfer.js.map +1 -0
- package/dist/services/tree-creation.d.ts +30 -0
- package/dist/services/tree-creation.js +404 -0
- package/dist/services/tree-creation.js.map +1 -0
- package/dist/signer/signer.d.ts +97 -0
- package/dist/signer/signer.js +239 -0
- package/dist/signer/signer.js.map +1 -0
- package/dist/spark-sdk.d.ts +87 -0
- package/dist/spark-sdk.js +675 -0
- package/dist/spark-sdk.js.map +1 -0
- package/dist/tests/adaptor-signature.test.d.ts +1 -0
- package/dist/tests/adaptor-signature.test.js +34 -0
- package/dist/tests/adaptor-signature.test.js.map +1 -0
- package/dist/tests/bitcoin.test.d.ts +1 -0
- package/dist/tests/bitcoin.test.js +77 -0
- package/dist/tests/bitcoin.test.js.map +1 -0
- package/dist/tests/coop-exit.test.d.ts +1 -0
- package/dist/tests/coop-exit.test.js +140 -0
- package/dist/tests/coop-exit.test.js.map +1 -0
- package/dist/tests/deposit.test.d.ts +1 -0
- package/dist/tests/deposit.test.js +57 -0
- package/dist/tests/deposit.test.js.map +1 -0
- package/dist/tests/keys.test.d.ts +1 -0
- package/dist/tests/keys.test.js +53 -0
- package/dist/tests/keys.test.js.map +1 -0
- package/dist/tests/lightning.test.d.ts +1 -0
- package/dist/tests/lightning.test.js +175 -0
- package/dist/tests/lightning.test.js.map +1 -0
- package/dist/tests/secret-sharing.test.d.ts +1 -0
- package/dist/tests/secret-sharing.test.js +41 -0
- package/dist/tests/secret-sharing.test.js.map +1 -0
- package/dist/tests/swap.test.d.ts +1 -0
- package/dist/tests/swap.test.js +131 -0
- package/dist/tests/swap.test.js.map +1 -0
- package/dist/tests/test-util.d.ts +24 -0
- package/dist/tests/test-util.js +137 -0
- package/dist/tests/test-util.js.map +1 -0
- package/dist/tests/tokens.test.d.ts +1 -0
- package/dist/tests/tokens.test.js +42 -0
- package/dist/tests/tokens.test.js.map +1 -0
- package/dist/tests/transfer.test.d.ts +1 -0
- package/dist/tests/transfer.test.js +175 -0
- package/dist/tests/transfer.test.js.map +1 -0
- package/dist/tests/tree-creation.test.d.ts +1 -0
- package/dist/tests/tree-creation.test.js +32 -0
- package/dist/tests/tree-creation.test.js.map +1 -0
- package/dist/tests/utils/spark-testing-wallet.d.ts +14 -0
- package/dist/tests/utils/spark-testing-wallet.js +13 -0
- package/dist/tests/utils/spark-testing-wallet.js.map +1 -0
- package/dist/tests/utils/test-faucet.d.ts +22 -0
- package/dist/tests/utils/test-faucet.js +148 -0
- package/dist/tests/utils/test-faucet.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/adaptor-signature.d.ts +7 -0
- package/dist/utils/adaptor-signature.js +114 -0
- package/dist/utils/adaptor-signature.js.map +1 -0
- package/dist/utils/bitcoin.d.ts +12 -0
- package/dist/utils/bitcoin.js +87 -0
- package/dist/utils/bitcoin.js.map +1 -0
- package/dist/utils/crypto.d.ts +1 -0
- package/dist/utils/crypto.js +14 -0
- package/dist/utils/crypto.js.map +1 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/keys.d.ts +7 -0
- package/dist/utils/keys.js +68 -0
- package/dist/utils/keys.js.map +1 -0
- package/dist/utils/network.d.ts +11 -0
- package/dist/utils/network.js +26 -0
- package/dist/utils/network.js.map +1 -0
- package/dist/utils/proof.d.ts +1 -0
- package/dist/utils/proof.js +12 -0
- package/dist/utils/proof.js.map +1 -0
- package/dist/utils/response-validation.d.ts +1 -0
- package/dist/utils/response-validation.js +16 -0
- package/dist/utils/response-validation.js.map +1 -0
- package/dist/utils/secret-sharing.d.ts +26 -0
- package/dist/utils/secret-sharing.js +175 -0
- package/dist/utils/secret-sharing.js.map +1 -0
- package/dist/utils/signing.d.ts +12 -0
- package/dist/utils/signing.js +67 -0
- package/dist/utils/signing.js.map +1 -0
- package/dist/utils/token-hashing.d.ts +3 -0
- package/dist/utils/token-hashing.js +117 -0
- package/dist/utils/token-hashing.js.map +1 -0
- package/dist/utils/token-keyshares.d.ts +5 -0
- package/dist/utils/token-keyshares.js +17 -0
- package/dist/utils/token-keyshares.js.map +1 -0
- package/dist/utils/token-transactions.d.ts +5 -0
- package/dist/utils/token-transactions.js +40 -0
- package/dist/utils/token-transactions.js.map +1 -0
- package/dist/utils/transaction.d.ts +8 -0
- package/dist/utils/transaction.js +33 -0
- package/dist/utils/transaction.js.map +1 -0
- package/dist/utils/wasm-wrapper.d.ts +2 -0
- package/dist/utils/wasm-wrapper.js +36 -0
- package/dist/utils/wasm-wrapper.js.map +1 -0
- package/dist/utils/wasm.d.ts +54 -0
- package/dist/utils/wasm.js +26 -0
- package/dist/utils/wasm.js.map +1 -0
- package/dist/wasm/spark_bindings.d.ts +229 -0
- package/dist/wasm/spark_bindings.js +1097 -0
- package/dist/wasm/spark_bindings.js.map +1 -0
- package/dist/wasm/spark_bindings_bg.wasm +0 -0
- package/package.json +140 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Query } from "@lightsparkdev/core";
|
|
2
|
+
import CoopExitRequest from "./objects/CoopExitRequest.js";
|
|
3
|
+
import { BitcoinNetwork, CompleteCoopExitInput, CompleteLeavesSwapInput, CoopExitFeeEstimateInput, CoopExitFeeEstimateOutput, LightningSendRequest, RequestCoopExitInput, RequestLeavesSwapInput, RequestLightningReceiveInput, RequestLightningSendInput } from "./objects/index.js";
|
|
4
|
+
import LeavesSwapRequest from "./objects/LeavesSwapRequest.js";
|
|
5
|
+
import LightningReceiveFeeEstimateOutput from "./objects/LightningReceiveFeeEstimateOutput.js";
|
|
6
|
+
import LightningReceiveRequest from "./objects/LightningReceiveRequest.js";
|
|
7
|
+
import LightningSendFeeEstimateOutput from "./objects/LightningSendFeeEstimateOutput.js";
|
|
8
|
+
export default class SspClient {
|
|
9
|
+
private readonly requester;
|
|
10
|
+
private identityPublicKey;
|
|
11
|
+
private readonly signingKey?;
|
|
12
|
+
constructor(identityPublicKey: string);
|
|
13
|
+
executeRawQuery<T>(query: Query<T>): Promise<T | null>;
|
|
14
|
+
getLightningReceiveFeeEstimate(amountSats: number, network: BitcoinNetwork): Promise<LightningReceiveFeeEstimateOutput | null>;
|
|
15
|
+
getLightningSendFeeEstimate(encodedInvoice: string): Promise<LightningSendFeeEstimateOutput | null>;
|
|
16
|
+
getCoopExitFeeEstimate({ leafExternalIds, withdrawalAddress, }: CoopExitFeeEstimateInput): Promise<CoopExitFeeEstimateOutput | null>;
|
|
17
|
+
getCurrentUser(): Promise<void>;
|
|
18
|
+
completeCoopExit({ userOutboundTransferExternalId, coopExitRequestId, }: CompleteCoopExitInput): Promise<CoopExitRequest | null>;
|
|
19
|
+
requestCoopExit({ leafExternalIds, withdrawalAddress, }: RequestCoopExitInput): Promise<CoopExitRequest | null>;
|
|
20
|
+
requestLightningReceive({ amountSats, network, paymentHash, expirySecs, memo, }: RequestLightningReceiveInput): Promise<LightningReceiveRequest | null>;
|
|
21
|
+
requestLightningSend({ encodedInvoice, idempotencyKey, }: RequestLightningSendInput): Promise<LightningSendRequest | null>;
|
|
22
|
+
requestLeaveSwap({ adaptorPubkey, totalAmountSats, targetAmountSats, feeSats, network, userLeaves, }: RequestLeavesSwapInput): Promise<LeavesSwapRequest | null>;
|
|
23
|
+
completeLeaveSwap({ adaptorSecretKey, userOutboundTransferExternalId, leavesSwapRequestId, }: CompleteLeavesSwapInput): Promise<LeavesSwapRequest | null>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { DefaultCrypto, NodeKeyCache, Requester, } from "@lightsparkdev/core";
|
|
2
|
+
import { CompleteCoopExit } from "./mutations/CompleteCoopExit.js";
|
|
3
|
+
import { CompleteLeavesSwap } from "./mutations/CompleteLeavesSwap.js";
|
|
4
|
+
import { RequestCoopExit } from "./mutations/RequestCoopExit.js";
|
|
5
|
+
import { RequestLightningReceive } from "./mutations/RequestLightningReceive.js";
|
|
6
|
+
import { RequestLightningSend } from "./mutations/RequestLightningSend.js";
|
|
7
|
+
import { RequestSwapLeaves } from "./mutations/RequestSwapLeaves.js";
|
|
8
|
+
import { CoopExitFeeEstimateOutputFromJson } from "./objects/CoopExitFeeEstimateOutput.js";
|
|
9
|
+
import { CoopExitRequestFromJson, } from "./objects/CoopExitRequest.js";
|
|
10
|
+
import { LeavesSwapRequestFromJson, } from "./objects/LeavesSwapRequest.js";
|
|
11
|
+
import { LightningReceiveFeeEstimateOutputFromJson, } from "./objects/LightningReceiveFeeEstimateOutput.js";
|
|
12
|
+
import { LightningReceiveRequestFromJson, } from "./objects/LightningReceiveRequest.js";
|
|
13
|
+
import { LightningSendFeeEstimateOutputFromJson, } from "./objects/LightningSendFeeEstimateOutput.js";
|
|
14
|
+
import { LightningSendRequestFromJson } from "./objects/LightningSendRequest.js";
|
|
15
|
+
import { CoopExitFeeEstimate } from "./queries/CoopExitFeeEstimate.js";
|
|
16
|
+
import { LightningReceiveFeeEstimate } from "./queries/LightningReceiveFeeEstimate.js";
|
|
17
|
+
import { LightningSendFeeEstimate } from "./queries/LightningSendFeeEstimate.js";
|
|
18
|
+
export default class SspClient {
|
|
19
|
+
requester;
|
|
20
|
+
identityPublicKey;
|
|
21
|
+
signingKey;
|
|
22
|
+
constructor(identityPublicKey) {
|
|
23
|
+
this.identityPublicKey = identityPublicKey;
|
|
24
|
+
const fetchFunction = typeof window !== "undefined" ? window.fetch.bind(window) : fetch;
|
|
25
|
+
this.requester = new Requester(new NodeKeyCache(DefaultCrypto), "graphql/spark/rc", "spark-sdk/v1.0.0 ", new SparkAuthProvider(identityPublicKey), "https://api.dev.dev.sparkinfra.net", DefaultCrypto, this.signingKey, fetchFunction);
|
|
26
|
+
}
|
|
27
|
+
async executeRawQuery(query) {
|
|
28
|
+
return await this.requester.executeQuery(query);
|
|
29
|
+
}
|
|
30
|
+
async getLightningReceiveFeeEstimate(amountSats, network) {
|
|
31
|
+
return await this.executeRawQuery({
|
|
32
|
+
queryPayload: LightningReceiveFeeEstimate,
|
|
33
|
+
variables: {
|
|
34
|
+
amount_sats: amountSats,
|
|
35
|
+
network: network,
|
|
36
|
+
},
|
|
37
|
+
constructObject: (response) => {
|
|
38
|
+
return LightningReceiveFeeEstimateOutputFromJson(response.lightning_receive_fee_estimate);
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async getLightningSendFeeEstimate(encodedInvoice) {
|
|
43
|
+
return await this.executeRawQuery({
|
|
44
|
+
queryPayload: LightningSendFeeEstimate,
|
|
45
|
+
variables: {
|
|
46
|
+
encoded_invoice: encodedInvoice,
|
|
47
|
+
},
|
|
48
|
+
constructObject: (response) => {
|
|
49
|
+
return LightningSendFeeEstimateOutputFromJson(response.lightning_send_fee_estimate);
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
async getCoopExitFeeEstimate({ leafExternalIds, withdrawalAddress, }) {
|
|
54
|
+
return await this.executeRawQuery({
|
|
55
|
+
queryPayload: CoopExitFeeEstimate,
|
|
56
|
+
variables: {
|
|
57
|
+
leaf_external_ids: leafExternalIds,
|
|
58
|
+
withdrawal_address: withdrawalAddress,
|
|
59
|
+
},
|
|
60
|
+
constructObject: (response) => {
|
|
61
|
+
return CoopExitFeeEstimateOutputFromJson(response.coop_exit_fee_estimate);
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// TODO: Might not need
|
|
66
|
+
async getCurrentUser() {
|
|
67
|
+
throw new Error("Not implemented");
|
|
68
|
+
}
|
|
69
|
+
async completeCoopExit({ userOutboundTransferExternalId, coopExitRequestId, }) {
|
|
70
|
+
return await this.executeRawQuery({
|
|
71
|
+
queryPayload: CompleteCoopExit,
|
|
72
|
+
variables: {
|
|
73
|
+
user_outbound_transfer_external_id: userOutboundTransferExternalId,
|
|
74
|
+
coop_exit_request_id: coopExitRequestId,
|
|
75
|
+
},
|
|
76
|
+
constructObject: (response) => {
|
|
77
|
+
return CoopExitRequestFromJson(response.complete_coop_exit.request);
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async requestCoopExit({ leafExternalIds, withdrawalAddress, }) {
|
|
82
|
+
return await this.executeRawQuery({
|
|
83
|
+
queryPayload: RequestCoopExit,
|
|
84
|
+
variables: {
|
|
85
|
+
leaf_external_ids: leafExternalIds,
|
|
86
|
+
withdrawal_address: withdrawalAddress,
|
|
87
|
+
},
|
|
88
|
+
constructObject: (response) => {
|
|
89
|
+
return CoopExitRequestFromJson(response.request_coop_exit.request);
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// TODO: Lets name this better
|
|
94
|
+
async requestLightningReceive({ amountSats, network, paymentHash, expirySecs, memo, }) {
|
|
95
|
+
return await this.executeRawQuery({
|
|
96
|
+
queryPayload: RequestLightningReceive,
|
|
97
|
+
variables: {
|
|
98
|
+
amount_sats: amountSats,
|
|
99
|
+
network: network,
|
|
100
|
+
payment_hash: paymentHash,
|
|
101
|
+
expiry_secs: expirySecs,
|
|
102
|
+
memo: memo,
|
|
103
|
+
},
|
|
104
|
+
constructObject: (response) => {
|
|
105
|
+
return LightningReceiveRequestFromJson(response.request_lightning_receive.request);
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
async requestLightningSend({ encodedInvoice, idempotencyKey, }) {
|
|
110
|
+
return await this.executeRawQuery({
|
|
111
|
+
queryPayload: RequestLightningSend,
|
|
112
|
+
variables: {
|
|
113
|
+
encoded_invoice: encodedInvoice,
|
|
114
|
+
idempotency_key: idempotencyKey,
|
|
115
|
+
},
|
|
116
|
+
constructObject: (response) => {
|
|
117
|
+
return LightningSendRequestFromJson(response.request_lightning_send.request);
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
async requestLeaveSwap({ adaptorPubkey, totalAmountSats, targetAmountSats, feeSats, network, userLeaves, }) {
|
|
122
|
+
const query = {
|
|
123
|
+
queryPayload: RequestSwapLeaves,
|
|
124
|
+
variables: {
|
|
125
|
+
adaptor_pubkey: adaptorPubkey,
|
|
126
|
+
total_amount_sats: totalAmountSats,
|
|
127
|
+
target_amount_sats: targetAmountSats,
|
|
128
|
+
fee_sats: feeSats,
|
|
129
|
+
network: network,
|
|
130
|
+
user_leaves: userLeaves,
|
|
131
|
+
},
|
|
132
|
+
constructObject: (response) => {
|
|
133
|
+
if (!response.request_leaves_swap) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
return LeavesSwapRequestFromJson(response.request_leaves_swap.request);
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
return await this.executeRawQuery(query);
|
|
140
|
+
}
|
|
141
|
+
async completeLeaveSwap({ adaptorSecretKey, userOutboundTransferExternalId, leavesSwapRequestId, }) {
|
|
142
|
+
return await this.executeRawQuery({
|
|
143
|
+
queryPayload: CompleteLeavesSwap,
|
|
144
|
+
variables: {
|
|
145
|
+
adaptor_secret_key: adaptorSecretKey,
|
|
146
|
+
user_outbound_transfer_external_id: userOutboundTransferExternalId,
|
|
147
|
+
leaves_swap_request_id: leavesSwapRequestId,
|
|
148
|
+
},
|
|
149
|
+
constructObject: (response) => {
|
|
150
|
+
return LeavesSwapRequestFromJson(response.complete_leaves_swap.request);
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
class SparkAuthProvider {
|
|
156
|
+
publicKey;
|
|
157
|
+
constructor(publicKey) {
|
|
158
|
+
this.publicKey = publicKey;
|
|
159
|
+
}
|
|
160
|
+
async addAuthHeaders(headers) {
|
|
161
|
+
const _headers = {
|
|
162
|
+
"Spark-Identity-Public-Key": this.publicKey,
|
|
163
|
+
"Content-Type": "application/json",
|
|
164
|
+
};
|
|
165
|
+
return Promise.resolve(_headers);
|
|
166
|
+
}
|
|
167
|
+
async isAuthorized() {
|
|
168
|
+
return Promise.resolve(true);
|
|
169
|
+
}
|
|
170
|
+
async addWsConnectionParams(params) {
|
|
171
|
+
return Promise.resolve({
|
|
172
|
+
...params,
|
|
173
|
+
"Spark-Identity-Public-Key": this.publicKey,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/graphql/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,YAAY,EAEZ,SAAS,GAEV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAwB,EACtB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AAatC,OAA0B,EACxB,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAA0C,EACxC,yCAAyC,GAC1C,MAAM,gDAAgD,CAAC;AACxD,OAAgC,EAC9B,+BAA+B,GAChC,MAAM,sCAAsC,CAAC;AAC9C,OAAuC,EACrC,sCAAsC,GACvC,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QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,qBAAqB,CACzB,MAA+B;QAE/B,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,GAAG,MAAM;YACT,2BAA2B,EAAE,IAAI,CAAC,SAAS;SAC5C,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CompleteCoopExit = "\n mutation CompleteCoopExit(\n $user_outbound_transfer_external_id: UUID!\n $coop_exit_request_id: ID!\n ) {\n complete_coop_exit(input: {\n user_outbound_transfer_external_id: $user_outbound_transfer_external_id\n coop_exit_request_id: $coop_exit_request_id\n }) {\n request {\n ...CoopExitRequestFragment\n }\n }\n }\n \n \nfragment CoopExitRequestFragment on CoopExitRequest {\n __typename\n coop_exit_request_id: id\n coop_exit_request_created_at: created_at\n coop_exit_request_updated_at: updated_at\n coop_exit_request_fee: fee {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n coop_exit_request_status: status\n coop_exit_request_expires_at: expires_at\n coop_exit_request_raw_connector_transaction: raw_connector_transaction\n}\n";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FRAGMENT as CompleteCoopExitOutputFragment } from "../objects/CoopExitRequest.js";
|
|
2
|
+
export const CompleteCoopExit = `
|
|
3
|
+
mutation CompleteCoopExit(
|
|
4
|
+
$user_outbound_transfer_external_id: UUID!
|
|
5
|
+
$coop_exit_request_id: ID!
|
|
6
|
+
) {
|
|
7
|
+
complete_coop_exit(input: {
|
|
8
|
+
user_outbound_transfer_external_id: $user_outbound_transfer_external_id
|
|
9
|
+
coop_exit_request_id: $coop_exit_request_id
|
|
10
|
+
}) {
|
|
11
|
+
request {
|
|
12
|
+
...CoopExitRequestFragment
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
${CompleteCoopExitOutputFragment}
|
|
18
|
+
`;
|
|
19
|
+
//# sourceMappingURL=CompleteCoopExit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompleteCoopExit.js","sourceRoot":"","sources":["../../../src/graphql/mutations/CompleteCoopExit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAE3F,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;IAe5B,8BAA8B;CACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CompleteLeavesSwap = "\n mutation CompleteLeavesSwap(\n $adaptor_secret_key: String!\n $user_outbound_transfer_external_id: UUID!\n $leaves_swap_request_id: ID!\n ) {\n complete_leaves_swap(input: { adaptor_secret_key: $adaptor_secret_key, user_outbound_transfer_external_id: $user_outbound_transfer_external_id, leaves_swap_request_id: $leaves_swap_request_id }) {\n request {\n ...LeavesSwapRequestFragment\n }\n }\n }\n\n \nfragment LeavesSwapRequestFragment on LeavesSwapRequest {\n __typename\n leaves_swap_request_id: id\n leaves_swap_request_created_at: created_at\n leaves_swap_request_updated_at: updated_at\n leaves_swap_request_status: status\n leaves_swap_request_inbound_transfer: inbound_transfer {\n __typename\n transfer_total_amount: total_amount {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n transfer_spark_id: spark_id\n }\n leaves_swap_request_outbound_transfer: outbound_transfer {\n __typename\n transfer_total_amount: total_amount {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n transfer_spark_id: spark_id\n }\n leaves_swap_request_expires_at: expires_at\n leaves_swap_request_swap_leaves: swap_leaves {\n __typename\n swap_leaf_leaf_id: leaf_id\n swap_leaf_raw_unsigned_refund_transaction: raw_unsigned_refund_transaction\n swap_leaf_adaptor_signed_signature: adaptor_signed_signature\n }\n}\n";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FRAGMENT as LeavesSwapRequestFragment } from "../objects/LeavesSwapRequest.js";
|
|
2
|
+
export const CompleteLeavesSwap = `
|
|
3
|
+
mutation CompleteLeavesSwap(
|
|
4
|
+
$adaptor_secret_key: String!
|
|
5
|
+
$user_outbound_transfer_external_id: UUID!
|
|
6
|
+
$leaves_swap_request_id: ID!
|
|
7
|
+
) {
|
|
8
|
+
complete_leaves_swap(input: { adaptor_secret_key: $adaptor_secret_key, user_outbound_transfer_external_id: $user_outbound_transfer_external_id, leaves_swap_request_id: $leaves_swap_request_id }) {
|
|
9
|
+
request {
|
|
10
|
+
...LeavesSwapRequestFragment
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
${LeavesSwapRequestFragment}
|
|
16
|
+
`;
|
|
17
|
+
//# sourceMappingURL=CompleteLeavesSwap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompleteLeavesSwap.js","sourceRoot":"","sources":["../../../src/graphql/mutations/CompleteLeavesSwap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAExF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;IAa9B,yBAAyB;CAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RequestCoopExit = "\n mutation RequestCoopExit(\n $leaf_external_ids: [UUID!]!\n $withdrawal_address: String!\n ) {\n request_coop_exit(\n input: {\n leaf_external_ids: $leaf_external_ids\n withdrawal_address: $withdrawal_address\n }\n ) {\n request {\n ...CoopExitRequestFragment\n }\n }\n }\n \nfragment CoopExitRequestFragment on CoopExitRequest {\n __typename\n coop_exit_request_id: id\n coop_exit_request_created_at: created_at\n coop_exit_request_updated_at: updated_at\n coop_exit_request_fee: fee {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n coop_exit_request_status: status\n coop_exit_request_expires_at: expires_at\n coop_exit_request_raw_connector_transaction: raw_connector_transaction\n}\n";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FRAGMENT as RequestCoopExitOutputFragment } from "../objects/CoopExitRequest.js";
|
|
2
|
+
export const RequestCoopExit = `
|
|
3
|
+
mutation RequestCoopExit(
|
|
4
|
+
$leaf_external_ids: [UUID!]!
|
|
5
|
+
$withdrawal_address: String!
|
|
6
|
+
) {
|
|
7
|
+
request_coop_exit(
|
|
8
|
+
input: {
|
|
9
|
+
leaf_external_ids: $leaf_external_ids
|
|
10
|
+
withdrawal_address: $withdrawal_address
|
|
11
|
+
}
|
|
12
|
+
) {
|
|
13
|
+
request {
|
|
14
|
+
...CoopExitRequestFragment
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
${RequestCoopExitOutputFragment}
|
|
19
|
+
`;
|
|
20
|
+
//# sourceMappingURL=RequestCoopExit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestCoopExit.js","sourceRoot":"","sources":["../../../src/graphql/mutations/RequestCoopExit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAE1F,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;IAgB3B,6BAA6B;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RequestLightningReceive = "\n mutation RequestLightningReceive(\n $network: BitcoinNetwork!\n $amount_sats: Long!\n $payment_hash: Hash32!\n $expiry_secs: Int\n $memo: String\n ) {\n request_lightning_receive(\n input: {\n network: $network\n amount_sats: $amount_sats\n payment_hash: $payment_hash\n expiry_secs: $expiry_secs\n memo: $memo\n }\n ) {\n request {\n ...LightningReceiveRequestFragment\n }\n }\n }\n \nfragment LightningReceiveRequestFragment on LightningReceiveRequest {\n __typename\n lightning_receive_request_id: id\n lightning_receive_request_created_at: created_at\n lightning_receive_request_updated_at: updated_at\n lightning_receive_request_invoice: invoice {\n __typename\n invoice_encoded_envoice: encoded_envoice\n invoice_bitcoin_network: bitcoin_network\n invoice_payment_hash: payment_hash\n invoice_amount: amount {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n invoice_created_at: created_at\n invoice_expires_at: expires_at\n invoice_memo: memo\n }\n lightning_receive_request_fee: fee {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n lightning_receive_request_status: status\n lightning_receive_request_transfer: transfer {\n __typename\n transfer_total_amount: total_amount {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n transfer_spark_id: spark_id\n }\n}\n";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FRAGMENT as RequestLightningReceiveOutputFragment } from "../objects/LightningReceiveRequest.js";
|
|
2
|
+
export const RequestLightningReceive = `
|
|
3
|
+
mutation RequestLightningReceive(
|
|
4
|
+
$network: BitcoinNetwork!
|
|
5
|
+
$amount_sats: Long!
|
|
6
|
+
$payment_hash: Hash32!
|
|
7
|
+
$expiry_secs: Int
|
|
8
|
+
$memo: String
|
|
9
|
+
) {
|
|
10
|
+
request_lightning_receive(
|
|
11
|
+
input: {
|
|
12
|
+
network: $network
|
|
13
|
+
amount_sats: $amount_sats
|
|
14
|
+
payment_hash: $payment_hash
|
|
15
|
+
expiry_secs: $expiry_secs
|
|
16
|
+
memo: $memo
|
|
17
|
+
}
|
|
18
|
+
) {
|
|
19
|
+
request {
|
|
20
|
+
...LightningReceiveRequestFragment
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
${RequestLightningReceiveOutputFragment}
|
|
25
|
+
`;
|
|
26
|
+
//# sourceMappingURL=RequestLightningReceive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestLightningReceive.js","sourceRoot":"","sources":["../../../src/graphql/mutations/RequestLightningReceive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAE1G,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;IAsBnC,qCAAqC;CACxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RequestLightningSend = "\n mutation RequestLightningSend(\n $encoded_invoice: String!\n $idempotency_key: String!\n ) {\n request_lightning_send(input: {\n encoded_invoice: $encoded_invoice\n idempotency_key: $idempotency_key\n }) {\n request {\n ...LightningSendRequestFragment\n }\n }\n }\n \nfragment LightningSendRequestFragment on LightningSendRequest {\n __typename\n lightning_send_request_id: id\n lightning_send_request_created_at: created_at\n lightning_send_request_updated_at: updated_at\n lightning_send_request_encoded_invoice: encoded_invoice\n lightning_send_request_fee: fee {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n lightning_send_request_idempotency_key: idempotency_key\n lightning_send_request_status: status\n lightning_send_request_transfer: transfer {\n __typename\n transfer_total_amount: total_amount {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n transfer_spark_id: spark_id\n }\n}\n";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FRAGMENT as RequestLightningSendOutputFragment } from "../objects/LightningSendRequest.js";
|
|
2
|
+
export const RequestLightningSend = `
|
|
3
|
+
mutation RequestLightningSend(
|
|
4
|
+
$encoded_invoice: String!
|
|
5
|
+
$idempotency_key: String!
|
|
6
|
+
) {
|
|
7
|
+
request_lightning_send(input: {
|
|
8
|
+
encoded_invoice: $encoded_invoice
|
|
9
|
+
idempotency_key: $idempotency_key
|
|
10
|
+
}) {
|
|
11
|
+
request {
|
|
12
|
+
...LightningSendRequestFragment
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
${RequestLightningSendOutputFragment}
|
|
17
|
+
`;
|
|
18
|
+
//# sourceMappingURL=RequestLightningSend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestLightningSend.js","sourceRoot":"","sources":["../../../src/graphql/mutations/RequestLightningSend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACpG,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;IAchC,kCAAkC;CACrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RequestSwapLeaves = "\n mutation RequestSwapLeaves(\n $adaptor_pubkey: String!\n $total_amount_sats: Int!\n $target_amount_sats: Int!\n $fee_sats: Int!\n $network: BitcoinNetwork!\n $user_leaves: [UserLeafInput!]!\n ) {\n request_leaves_swap(input: {\n adaptor_pubkey: $adaptor_pubkey\n total_amount_sats: $total_amount_sats\n target_amount_sats: $target_amount_sats\n fee_sats: $fee_sats\n network: $network\n user_leaves: $user_leaves\n }) {\n request {\n ...LeavesSwapRequestFragment\n }\n }\n }\n \nfragment LeavesSwapRequestFragment on LeavesSwapRequest {\n __typename\n leaves_swap_request_id: id\n leaves_swap_request_created_at: created_at\n leaves_swap_request_updated_at: updated_at\n leaves_swap_request_status: status\n leaves_swap_request_inbound_transfer: inbound_transfer {\n __typename\n transfer_total_amount: total_amount {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n transfer_spark_id: spark_id\n }\n leaves_swap_request_outbound_transfer: outbound_transfer {\n __typename\n transfer_total_amount: total_amount {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n transfer_spark_id: spark_id\n }\n leaves_swap_request_expires_at: expires_at\n leaves_swap_request_swap_leaves: swap_leaves {\n __typename\n swap_leaf_leaf_id: leaf_id\n swap_leaf_raw_unsigned_refund_transaction: raw_unsigned_refund_transaction\n swap_leaf_adaptor_signed_signature: adaptor_signed_signature\n }\n}\n";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FRAGMENT as LeavesSwapRequestFragment } from "../objects/LeavesSwapRequest.js";
|
|
2
|
+
export const RequestSwapLeaves = `
|
|
3
|
+
mutation RequestSwapLeaves(
|
|
4
|
+
$adaptor_pubkey: String!
|
|
5
|
+
$total_amount_sats: Int!
|
|
6
|
+
$target_amount_sats: Int!
|
|
7
|
+
$fee_sats: Int!
|
|
8
|
+
$network: BitcoinNetwork!
|
|
9
|
+
$user_leaves: [UserLeafInput!]!
|
|
10
|
+
) {
|
|
11
|
+
request_leaves_swap(input: {
|
|
12
|
+
adaptor_pubkey: $adaptor_pubkey
|
|
13
|
+
total_amount_sats: $total_amount_sats
|
|
14
|
+
target_amount_sats: $target_amount_sats
|
|
15
|
+
fee_sats: $fee_sats
|
|
16
|
+
network: $network
|
|
17
|
+
user_leaves: $user_leaves
|
|
18
|
+
}) {
|
|
19
|
+
request {
|
|
20
|
+
...LeavesSwapRequestFragment
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
${LeavesSwapRequestFragment}
|
|
25
|
+
`;
|
|
26
|
+
//# sourceMappingURL=RequestSwapLeaves.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestSwapLeaves.js","sourceRoot":"","sources":["../../../src/graphql/mutations/RequestSwapLeaves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAExF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;IAsB7B,yBAAyB;CAC5B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** This is an enum identifying a particular Bitcoin Network. **/
|
|
2
|
+
export declare enum BitcoinNetwork {
|
|
3
|
+
/**
|
|
4
|
+
* This is an enum value that represents values that could be added in the future.
|
|
5
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
6
|
+
*/
|
|
7
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
8
|
+
/** The production version of the Bitcoin Blockchain. **/
|
|
9
|
+
MAINNET = "MAINNET",
|
|
10
|
+
/** A test version of the Bitcoin Blockchain, maintained by Lightspark. **/
|
|
11
|
+
REGTEST = "REGTEST",
|
|
12
|
+
/** A test version of the Bitcoin Blockchain, maintained by a centralized organization. Not in use at Lightspark. **/
|
|
13
|
+
SIGNET = "SIGNET",
|
|
14
|
+
/** A test version of the Bitcoin Blockchain, publicly available. **/
|
|
15
|
+
TESTNET = "TESTNET"
|
|
16
|
+
}
|
|
17
|
+
export default BitcoinNetwork;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
/** This is an enum identifying a particular Bitcoin Network. **/
|
|
3
|
+
export var BitcoinNetwork;
|
|
4
|
+
(function (BitcoinNetwork) {
|
|
5
|
+
/**
|
|
6
|
+
* This is an enum value that represents values that could be added in the future.
|
|
7
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
8
|
+
*/
|
|
9
|
+
BitcoinNetwork["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
10
|
+
/** The production version of the Bitcoin Blockchain. **/
|
|
11
|
+
BitcoinNetwork["MAINNET"] = "MAINNET";
|
|
12
|
+
/** A test version of the Bitcoin Blockchain, maintained by Lightspark. **/
|
|
13
|
+
BitcoinNetwork["REGTEST"] = "REGTEST";
|
|
14
|
+
/** A test version of the Bitcoin Blockchain, maintained by a centralized organization. Not in use at Lightspark. **/
|
|
15
|
+
BitcoinNetwork["SIGNET"] = "SIGNET";
|
|
16
|
+
/** A test version of the Bitcoin Blockchain, publicly available. **/
|
|
17
|
+
BitcoinNetwork["TESTNET"] = "TESTNET";
|
|
18
|
+
})(BitcoinNetwork || (BitcoinNetwork = {}));
|
|
19
|
+
export default BitcoinNetwork;
|
|
20
|
+
//# sourceMappingURL=BitcoinNetwork.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitcoinNetwork.js","sourceRoot":"","sources":["../../../src/graphql/objects/BitcoinNetwork.ts"],"names":[],"mappings":"AACA,0EAA0E;AAE1E,iEAAiE;AACjE,MAAM,CAAN,IAAY,cAeX;AAfD,WAAY,cAAc;IAC1B;;;OAGG;IACF,+CAA6B,CAAA;IAC9B,yDAAyD;IACzD,qCAAmB,CAAA;IACnB,2EAA2E;IAC3E,qCAAmB,CAAA;IACnB,qHAAqH;IACrH,mCAAiB,CAAA;IACjB,qEAAqE;IACrE,qCAAmB,CAAA;AAEnB,CAAC,EAfW,cAAc,KAAd,cAAc,QAezB;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface CompleteCoopExitInput {
|
|
2
|
+
userOutboundTransferExternalId: string;
|
|
3
|
+
coopExitRequestId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const CompleteCoopExitInputFromJson: (obj: any) => CompleteCoopExitInput;
|
|
6
|
+
export declare const CompleteCoopExitInputToJson: (obj: CompleteCoopExitInput) => any;
|
|
7
|
+
export default CompleteCoopExitInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
export const CompleteCoopExitInputFromJson = (obj) => {
|
|
3
|
+
return {
|
|
4
|
+
userOutboundTransferExternalId: obj["complete_coop_exit_input_user_outbound_transfer_external_id"],
|
|
5
|
+
coopExitRequestId: obj["complete_coop_exit_input_coop_exit_request_id"],
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export const CompleteCoopExitInputToJson = (obj) => {
|
|
9
|
+
return {
|
|
10
|
+
complete_coop_exit_input_user_outbound_transfer_external_id: obj.userOutboundTransferExternalId,
|
|
11
|
+
complete_coop_exit_input_coop_exit_request_id: obj.coopExitRequestId,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=CompleteCoopExitInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompleteCoopExitInput.js","sourceRoot":"","sources":["../../../src/graphql/objects/CompleteCoopExitInput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAkB1E,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,GAAQ,EAAyB,EAAE;IAC7E,OAAO;QACH,8BAA8B,EAAE,GAAG,CAAC,6DAA6D,CAAC;QAClG,iBAAiB,EAAE,GAAG,CAAC,+CAA+C,CAAC;KAE7C,CAAC;AAEnC,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,GAA0B,EAAO,EAAE;IAC/E,OAAO;QACP,2DAA2D,EAAE,GAAG,CAAC,8BAA8B;QAC/F,6CAA6C,EAAE,GAAG,CAAC,iBAAiB;KAE3D,CAAA;AAET,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface CompleteCoopExitOutput {
|
|
2
|
+
requestId: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const CompleteCoopExitOutputFromJson: (obj: any) => CompleteCoopExitOutput;
|
|
5
|
+
export declare const CompleteCoopExitOutputToJson: (obj: CompleteCoopExitOutput) => any;
|
|
6
|
+
export declare const FRAGMENT = "\nfragment CompleteCoopExitOutputFragment on CompleteCoopExitOutput {\n __typename\n complete_coop_exit_output_request: request {\n id\n }\n}";
|
|
7
|
+
export default CompleteCoopExitOutput;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
export const CompleteCoopExitOutputFromJson = (obj) => {
|
|
3
|
+
return {
|
|
4
|
+
requestId: obj["complete_coop_exit_output_request"].id,
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export const CompleteCoopExitOutputToJson = (obj) => {
|
|
8
|
+
return {
|
|
9
|
+
complete_coop_exit_output_request: { id: obj.requestId },
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export const FRAGMENT = `
|
|
13
|
+
fragment CompleteCoopExitOutputFragment on CompleteCoopExitOutput {
|
|
14
|
+
__typename
|
|
15
|
+
complete_coop_exit_output_request: request {
|
|
16
|
+
id
|
|
17
|
+
}
|
|
18
|
+
}`;
|
|
19
|
+
//# sourceMappingURL=CompleteCoopExitOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompleteCoopExitOutput.js","sourceRoot":"","sources":["../../../src/graphql/objects/CompleteCoopExitOutput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAgB1E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,GAAQ,EAA0B,EAAE;IAC/E,OAAO;QACH,SAAS,EAAE,GAAG,CAAC,mCAAmC,CAAC,CAAC,EAAE;KAE3B,CAAC;AAEpC,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,GAA2B,EAAO,EAAE;IACjF,OAAO;QACP,iCAAiC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,SAAS,EAAE;KAE/C,CAAA;AAET,CAAC,CAAA;AAGG,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;EAM1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface CompleteLeavesSwapInput {
|
|
2
|
+
adaptorSecretKey: string;
|
|
3
|
+
userOutboundTransferExternalId: string;
|
|
4
|
+
leavesSwapRequestId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const CompleteLeavesSwapInputFromJson: (obj: any) => CompleteLeavesSwapInput;
|
|
7
|
+
export declare const CompleteLeavesSwapInputToJson: (obj: CompleteLeavesSwapInput) => any;
|
|
8
|
+
export default CompleteLeavesSwapInput;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
export const CompleteLeavesSwapInputFromJson = (obj) => {
|
|
3
|
+
return {
|
|
4
|
+
adaptorSecretKey: obj["complete_leaves_swap_input_adaptor_secret_key"],
|
|
5
|
+
userOutboundTransferExternalId: obj["complete_leaves_swap_input_user_outbound_transfer_external_id"],
|
|
6
|
+
leavesSwapRequestId: obj["complete_leaves_swap_input_leaves_swap_request_id"],
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export const CompleteLeavesSwapInputToJson = (obj) => {
|
|
10
|
+
return {
|
|
11
|
+
complete_leaves_swap_input_adaptor_secret_key: obj.adaptorSecretKey,
|
|
12
|
+
complete_leaves_swap_input_user_outbound_transfer_external_id: obj.userOutboundTransferExternalId,
|
|
13
|
+
complete_leaves_swap_input_leaves_swap_request_id: obj.leavesSwapRequestId,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=CompleteLeavesSwapInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompleteLeavesSwapInput.js","sourceRoot":"","sources":["../../../src/graphql/objects/CompleteLeavesSwapInput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAoB1E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,GAAQ,EAA2B,EAAE;IACjF,OAAO;QACH,gBAAgB,EAAE,GAAG,CAAC,+CAA+C,CAAC;QACtE,8BAA8B,EAAE,GAAG,CAAC,+DAA+D,CAAC;QACpG,mBAAmB,EAAE,GAAG,CAAC,mDAAmD,CAAC;KAEjD,CAAC;AAErC,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,GAA4B,EAAO,EAAE;IACnF,OAAO;QACP,6CAA6C,EAAE,GAAG,CAAC,gBAAgB;QACnE,6DAA6D,EAAE,GAAG,CAAC,8BAA8B;QACjG,iDAAiD,EAAE,GAAG,CAAC,mBAAmB;KAEjE,CAAA;AAET,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface CompleteLeavesSwapOutput {
|
|
2
|
+
requestId: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const CompleteLeavesSwapOutputFromJson: (obj: any) => CompleteLeavesSwapOutput;
|
|
5
|
+
export declare const CompleteLeavesSwapOutputToJson: (obj: CompleteLeavesSwapOutput) => any;
|
|
6
|
+
export declare const FRAGMENT = "\nfragment CompleteLeavesSwapOutputFragment on CompleteLeavesSwapOutput {\n __typename\n complete_leaves_swap_output_request: request {\n id\n }\n}";
|
|
7
|
+
export default CompleteLeavesSwapOutput;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
export const CompleteLeavesSwapOutputFromJson = (obj) => {
|
|
3
|
+
return {
|
|
4
|
+
requestId: obj["complete_leaves_swap_output_request"].id,
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export const CompleteLeavesSwapOutputToJson = (obj) => {
|
|
8
|
+
return {
|
|
9
|
+
complete_leaves_swap_output_request: { id: obj.requestId },
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export const FRAGMENT = `
|
|
13
|
+
fragment CompleteLeavesSwapOutputFragment on CompleteLeavesSwapOutput {
|
|
14
|
+
__typename
|
|
15
|
+
complete_leaves_swap_output_request: request {
|
|
16
|
+
id
|
|
17
|
+
}
|
|
18
|
+
}`;
|
|
19
|
+
//# sourceMappingURL=CompleteLeavesSwapOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompleteLeavesSwapOutput.js","sourceRoot":"","sources":["../../../src/graphql/objects/CompleteLeavesSwapOutput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAgB1E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,GAAQ,EAA4B,EAAE;IACnF,OAAO;QACH,SAAS,EAAE,GAAG,CAAC,qCAAqC,CAAC,CAAC,EAAE;KAE3B,CAAC;AAEtC,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,GAA6B,EAAO,EAAE;IACrF,OAAO;QACP,mCAAmC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,SAAS,EAAE;KAEjD,CAAA;AAET,CAAC,CAAA;AAGG,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;EAM1B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import PageInfo from './PageInfo.js';
|
|
2
|
+
interface Connection {
|
|
3
|
+
/**
|
|
4
|
+
* The total count of objects in this connection, using the current filters. It is different from the
|
|
5
|
+
* number of objects returned in the current page (in the `entities` field).
|
|
6
|
+
**/
|
|
7
|
+
count: number;
|
|
8
|
+
/** An object that holds pagination information about the objects in this connection. **/
|
|
9
|
+
pageInfo: PageInfo;
|
|
10
|
+
/** The typename of the object **/
|
|
11
|
+
typename: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ConnectionFromJson: (obj: any) => Connection;
|
|
14
|
+
export declare const ConnectionToJson: (obj: Connection) => any;
|
|
15
|
+
export declare const FRAGMENT = "\nfragment ConnectionFragment on Connection {\n __typename\n ... on SparkTransferToLeavesConnection {\n __typename\n spark_transfer_to_leaves_connection_count: count\n spark_transfer_to_leaves_connection_page_info: page_info {\n __typename\n page_info_has_next_page: has_next_page\n page_info_has_previous_page: has_previous_page\n page_info_start_cursor: start_cursor\n page_info_end_cursor: end_cursor\n }\n spark_transfer_to_leaves_connection_entities: entities {\n __typename\n leaf_amount: amount {\n __typename\n currency_amount_original_value: original_value\n currency_amount_original_unit: original_unit\n currency_amount_preferred_currency_unit: preferred_currency_unit\n currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded\n currency_amount_preferred_currency_value_approx: preferred_currency_value_approx\n }\n leaf_spark_node_id: spark_node_id\n }\n }\n}";
|
|
16
|
+
export default Connection;
|