@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,29 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
import { CurrencyAmountFromJson } from './CurrencyAmount.js';
|
|
3
|
+
import { CurrencyAmountToJson } from './CurrencyAmount.js';
|
|
4
|
+
export const LeafFromJson = (obj) => {
|
|
5
|
+
return {
|
|
6
|
+
amount: CurrencyAmountFromJson(obj["leaf_amount"]),
|
|
7
|
+
sparkNodeId: obj["leaf_spark_node_id"],
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export const LeafToJson = (obj) => {
|
|
11
|
+
return {
|
|
12
|
+
leaf_amount: CurrencyAmountToJson(obj.amount),
|
|
13
|
+
leaf_spark_node_id: obj.sparkNodeId,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export const FRAGMENT = `
|
|
17
|
+
fragment LeafFragment on Leaf {
|
|
18
|
+
__typename
|
|
19
|
+
leaf_amount: amount {
|
|
20
|
+
__typename
|
|
21
|
+
currency_amount_original_value: original_value
|
|
22
|
+
currency_amount_original_unit: original_unit
|
|
23
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
24
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
25
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
26
|
+
}
|
|
27
|
+
leaf_spark_node_id: spark_node_id
|
|
28
|
+
}`;
|
|
29
|
+
//# sourceMappingURL=Leaf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Leaf.js","sourceRoot":"","sources":["../../../src/graphql/objects/Leaf.ts"],"names":[],"mappings":"AACA,0EAA0E;AAG1E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAkBzD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAQ,EAAE;IAC3C,OAAO;QACH,MAAM,EAAE,sBAAsB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAClD,WAAW,EAAE,GAAG,CAAC,oBAAoB,CAAC;KAE7B,CAAC;AAElB,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAS,EAAO,EAAE;IAC7C,OAAO;QACP,WAAW,EAAE,oBAAoB,CAAC,GAAG,CAAC,MAAM,CAAC;QAC7C,kBAAkB,EAAE,GAAG,CAAC,WAAW;KAE1B,CAAA;AAET,CAAC,CAAA;AAGG,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;EAY1B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface LeavesSwapFeeEstimateInput {
|
|
2
|
+
totalAmountSats: number;
|
|
3
|
+
}
|
|
4
|
+
export declare const LeavesSwapFeeEstimateInputFromJson: (obj: any) => LeavesSwapFeeEstimateInput;
|
|
5
|
+
export declare const LeavesSwapFeeEstimateInputToJson: (obj: LeavesSwapFeeEstimateInput) => any;
|
|
6
|
+
export default LeavesSwapFeeEstimateInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
export const LeavesSwapFeeEstimateInputFromJson = (obj) => {
|
|
3
|
+
return {
|
|
4
|
+
totalAmountSats: obj["leaves_swap_fee_estimate_input_total_amount_sats"],
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export const LeavesSwapFeeEstimateInputToJson = (obj) => {
|
|
8
|
+
return {
|
|
9
|
+
leaves_swap_fee_estimate_input_total_amount_sats: obj.totalAmountSats,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=LeavesSwapFeeEstimateInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeavesSwapFeeEstimateInput.js","sourceRoot":"","sources":["../../../src/graphql/objects/LeavesSwapFeeEstimateInput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAgB1E,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,GAAQ,EAA8B,EAAE;IACvF,OAAO;QACH,eAAe,EAAE,GAAG,CAAC,kDAAkD,CAAC;KAEzC,CAAC;AAExC,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,GAA+B,EAAO,EAAE;IACzF,OAAO;QACP,gDAAgD,EAAE,GAAG,CAAC,eAAe;KAE5D,CAAA;AAET,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import CurrencyAmount from './CurrencyAmount.js';
|
|
2
|
+
interface LeavesSwapFeeEstimateOutput {
|
|
3
|
+
feeEstimate: CurrencyAmount;
|
|
4
|
+
}
|
|
5
|
+
export declare const LeavesSwapFeeEstimateOutputFromJson: (obj: any) => LeavesSwapFeeEstimateOutput;
|
|
6
|
+
export declare const LeavesSwapFeeEstimateOutputToJson: (obj: LeavesSwapFeeEstimateOutput) => any;
|
|
7
|
+
export declare const FRAGMENT = "\nfragment LeavesSwapFeeEstimateOutputFragment on LeavesSwapFeeEstimateOutput {\n __typename\n leaves_swap_fee_estimate_output_fee_estimate: fee_estimate {\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}";
|
|
8
|
+
export default LeavesSwapFeeEstimateOutput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
import { CurrencyAmountFromJson } from './CurrencyAmount.js';
|
|
3
|
+
import { CurrencyAmountToJson } from './CurrencyAmount.js';
|
|
4
|
+
export const LeavesSwapFeeEstimateOutputFromJson = (obj) => {
|
|
5
|
+
return {
|
|
6
|
+
feeEstimate: CurrencyAmountFromJson(obj["leaves_swap_fee_estimate_output_fee_estimate"]),
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export const LeavesSwapFeeEstimateOutputToJson = (obj) => {
|
|
10
|
+
return {
|
|
11
|
+
leaves_swap_fee_estimate_output_fee_estimate: CurrencyAmountToJson(obj.feeEstimate),
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export const FRAGMENT = `
|
|
15
|
+
fragment LeavesSwapFeeEstimateOutputFragment on LeavesSwapFeeEstimateOutput {
|
|
16
|
+
__typename
|
|
17
|
+
leaves_swap_fee_estimate_output_fee_estimate: fee_estimate {
|
|
18
|
+
__typename
|
|
19
|
+
currency_amount_original_value: original_value
|
|
20
|
+
currency_amount_original_unit: original_unit
|
|
21
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
22
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
23
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
24
|
+
}
|
|
25
|
+
}`;
|
|
26
|
+
//# sourceMappingURL=LeavesSwapFeeEstimateOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeavesSwapFeeEstimateOutput.js","sourceRoot":"","sources":["../../../src/graphql/objects/LeavesSwapFeeEstimateOutput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAG1E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAczD,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,GAAQ,EAA+B,EAAE;IACzF,OAAO;QACH,WAAW,EAAE,sBAAsB,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;KAExD,CAAC;AAEzC,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,GAAgC,EAAO,EAAE;IAC3F,OAAO;QACP,4CAA4C,EAAE,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC;KAE1E,CAAA;AAET,CAAC,CAAA;AAGG,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;EAW1B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import SparkLeavesSwapRequestStatus from './SparkLeavesSwapRequestStatus.js';
|
|
2
|
+
import Transfer from './Transfer.js';
|
|
3
|
+
import SwapLeaf from './SwapLeaf.js';
|
|
4
|
+
import { Query } from '@lightsparkdev/core';
|
|
5
|
+
interface LeavesSwapRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
8
|
+
* string.
|
|
9
|
+
**/
|
|
10
|
+
id: string;
|
|
11
|
+
/** The date and time when the entity was first created. **/
|
|
12
|
+
createdAt: string;
|
|
13
|
+
/** The date and time when the entity was last updated. **/
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
/** The status of the request. **/
|
|
16
|
+
status: SparkLeavesSwapRequestStatus;
|
|
17
|
+
/** The leaves transfer to user. **/
|
|
18
|
+
inboundTransfer: Transfer;
|
|
19
|
+
/** The time when the leaves swap request expires. **/
|
|
20
|
+
expiresAt: string;
|
|
21
|
+
/** The swap leaves returned to the user **/
|
|
22
|
+
swapLeaves: SwapLeaf[];
|
|
23
|
+
/** The typename of the object **/
|
|
24
|
+
typename: string;
|
|
25
|
+
/** The leaves transfer out from user. **/
|
|
26
|
+
outboundTransfer?: Transfer | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare const LeavesSwapRequestFromJson: (obj: any) => LeavesSwapRequest;
|
|
29
|
+
export declare const LeavesSwapRequestToJson: (obj: LeavesSwapRequest) => any;
|
|
30
|
+
export declare const FRAGMENT = "\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}";
|
|
31
|
+
export declare const getLeavesSwapRequestQuery: (id: string) => Query<LeavesSwapRequest>;
|
|
32
|
+
export default LeavesSwapRequest;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
import SparkLeavesSwapRequestStatus from './SparkLeavesSwapRequestStatus.js';
|
|
3
|
+
import { isObject } from '@lightsparkdev/core';
|
|
4
|
+
import { TransferFromJson } from './Transfer.js';
|
|
5
|
+
import { SwapLeafToJson } from './SwapLeaf.js';
|
|
6
|
+
import { SwapLeafFromJson } from './SwapLeaf.js';
|
|
7
|
+
export const LeavesSwapRequestFromJson = (obj) => {
|
|
8
|
+
return {
|
|
9
|
+
id: obj["leaves_swap_request_id"],
|
|
10
|
+
createdAt: obj["leaves_swap_request_created_at"],
|
|
11
|
+
updatedAt: obj["leaves_swap_request_updated_at"],
|
|
12
|
+
status: SparkLeavesSwapRequestStatus[obj["leaves_swap_request_status"]] ?? SparkLeavesSwapRequestStatus.FUTURE_VALUE,
|
|
13
|
+
inboundTransfer: TransferFromJson(obj["leaves_swap_request_inbound_transfer"]),
|
|
14
|
+
expiresAt: obj["leaves_swap_request_expires_at"],
|
|
15
|
+
swapLeaves: obj["leaves_swap_request_swap_leaves"].map((e) => SwapLeafFromJson(e)),
|
|
16
|
+
typename: "LeavesSwapRequest", outboundTransfer: (!!obj["leaves_swap_request_outbound_transfer"] ? TransferFromJson(obj["leaves_swap_request_outbound_transfer"]) : undefined),
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export const LeavesSwapRequestToJson = (obj) => {
|
|
20
|
+
return {
|
|
21
|
+
__typename: "LeavesSwapRequest", leaves_swap_request_id: obj.id,
|
|
22
|
+
leaves_swap_request_created_at: obj.createdAt,
|
|
23
|
+
leaves_swap_request_updated_at: obj.updatedAt,
|
|
24
|
+
leaves_swap_request_status: obj.status,
|
|
25
|
+
leaves_swap_request_inbound_transfer: obj.inboundTransfer.toJson(),
|
|
26
|
+
leaves_swap_request_outbound_transfer: (obj.outboundTransfer ? obj.outboundTransfer.toJson() : undefined),
|
|
27
|
+
leaves_swap_request_expires_at: obj.expiresAt,
|
|
28
|
+
leaves_swap_request_swap_leaves: obj.swapLeaves.map((e) => SwapLeafToJson(e)),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export const FRAGMENT = `
|
|
32
|
+
fragment LeavesSwapRequestFragment on LeavesSwapRequest {
|
|
33
|
+
__typename
|
|
34
|
+
leaves_swap_request_id: id
|
|
35
|
+
leaves_swap_request_created_at: created_at
|
|
36
|
+
leaves_swap_request_updated_at: updated_at
|
|
37
|
+
leaves_swap_request_status: status
|
|
38
|
+
leaves_swap_request_inbound_transfer: inbound_transfer {
|
|
39
|
+
__typename
|
|
40
|
+
transfer_total_amount: total_amount {
|
|
41
|
+
__typename
|
|
42
|
+
currency_amount_original_value: original_value
|
|
43
|
+
currency_amount_original_unit: original_unit
|
|
44
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
45
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
46
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
47
|
+
}
|
|
48
|
+
transfer_spark_id: spark_id
|
|
49
|
+
}
|
|
50
|
+
leaves_swap_request_outbound_transfer: outbound_transfer {
|
|
51
|
+
__typename
|
|
52
|
+
transfer_total_amount: total_amount {
|
|
53
|
+
__typename
|
|
54
|
+
currency_amount_original_value: original_value
|
|
55
|
+
currency_amount_original_unit: original_unit
|
|
56
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
57
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
58
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
59
|
+
}
|
|
60
|
+
transfer_spark_id: spark_id
|
|
61
|
+
}
|
|
62
|
+
leaves_swap_request_expires_at: expires_at
|
|
63
|
+
leaves_swap_request_swap_leaves: swap_leaves {
|
|
64
|
+
__typename
|
|
65
|
+
swap_leaf_leaf_id: leaf_id
|
|
66
|
+
swap_leaf_raw_unsigned_refund_transaction: raw_unsigned_refund_transaction
|
|
67
|
+
swap_leaf_adaptor_signed_signature: adaptor_signed_signature
|
|
68
|
+
}
|
|
69
|
+
}`;
|
|
70
|
+
export const getLeavesSwapRequestQuery = (id) => {
|
|
71
|
+
return {
|
|
72
|
+
queryPayload: `
|
|
73
|
+
query GetLeavesSwapRequest($id: ID!) {
|
|
74
|
+
entity(id: $id) {
|
|
75
|
+
... on LeavesSwapRequest {
|
|
76
|
+
...LeavesSwapRequestFragment
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
${FRAGMENT}
|
|
82
|
+
`,
|
|
83
|
+
variables: { id },
|
|
84
|
+
constructObject: (data) => isObject(data) && "entity" in data && isObject(data.entity) ? LeavesSwapRequestFromJson(data.entity) : null,
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=LeavesSwapRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeavesSwapRequest.js","sourceRoot":"","sources":["../../../src/graphql/objects/LeavesSwapRequest.ts"],"names":[],"mappings":"AACA,0EAA0E;AAG1E,OAAO,4BAA4B,MAAM,mCAAmC,CAAC;AAG7E,OAAO,EAAS,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAyC/C,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,GAAQ,EAAqB,EAAE;IACrE,OAAO;QACH,EAAE,EAAE,GAAG,CAAC,wBAAwB,CAAC;QACjC,SAAS,EAAE,GAAG,CAAC,gCAAgC,CAAC;QAChD,SAAS,EAAE,GAAG,CAAC,gCAAgC,CAAC;QAChD,MAAM,EAAE,4BAA4B,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,IAAI,4BAA4B,CAAC,YAAY;QACpH,eAAe,EAAE,gBAAgB,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QAC9E,SAAS,EAAE,GAAG,CAAC,gCAAgC,CAAC;QAChD,UAAU,EAAE,GAAG,CAAC,iCAAiC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;QAC1F,QAAQ,EAAE,mBAAmB,EAAS,gBAAgB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KAEvJ,CAAC;AAE/B,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,GAAsB,EAAO,EAAE;IACvE,OAAO;QACP,UAAU,EAAE,mBAAmB,EAAC,sBAAsB,EAAE,GAAG,CAAC,EAAE;QAC9D,8BAA8B,EAAE,GAAG,CAAC,SAAS;QAC7C,8BAA8B,EAAE,GAAG,CAAC,SAAS;QAC7C,0BAA0B,EAAE,GAAG,CAAC,MAAM;QACtC,oCAAoC,EAAE,GAAG,CAAC,eAAe,CAAC,MAAM,EAAE;QAClE,qCAAqC,EAAE,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QACzG,8BAA8B,EAAE,GAAG,CAAC,SAAS;QAC7C,+BAA+B,EAAE,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;KAEpE,CAAA;AAET,CAAC,CAAA;AAGG,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsC1B,CAAC;AAIC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EAAU,EAA4B,EAAE;IAC9E,OAAO;QACH,YAAY,EAAE;;;;;;;;;EASxB,QAAQ;CACT;QACW,SAAS,EAAE,EAAC,EAAE,EAAC;QACf,eAAe,EAAE,CAAC,IAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,IAAI,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;KAClJ,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import BitcoinNetwork from './BitcoinNetwork.js';
|
|
2
|
+
interface LightningReceiveFeeEstimateInput {
|
|
3
|
+
network: BitcoinNetwork;
|
|
4
|
+
amountSats: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const LightningReceiveFeeEstimateInputFromJson: (obj: any) => LightningReceiveFeeEstimateInput;
|
|
7
|
+
export declare const LightningReceiveFeeEstimateInputToJson: (obj: LightningReceiveFeeEstimateInput) => any;
|
|
8
|
+
export default LightningReceiveFeeEstimateInput;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
import BitcoinNetwork from './BitcoinNetwork.js';
|
|
3
|
+
export const LightningReceiveFeeEstimateInputFromJson = (obj) => {
|
|
4
|
+
return {
|
|
5
|
+
network: BitcoinNetwork[obj["lightning_receive_fee_estimate_input_network"]] ?? BitcoinNetwork.FUTURE_VALUE,
|
|
6
|
+
amountSats: obj["lightning_receive_fee_estimate_input_amount_sats"],
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export const LightningReceiveFeeEstimateInputToJson = (obj) => {
|
|
10
|
+
return {
|
|
11
|
+
lightning_receive_fee_estimate_input_network: obj.network,
|
|
12
|
+
lightning_receive_fee_estimate_input_amount_sats: obj.amountSats,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=LightningReceiveFeeEstimateInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LightningReceiveFeeEstimateInput.js","sourceRoot":"","sources":["../../../src/graphql/objects/LightningReceiveFeeEstimateInput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAG1E,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAejD,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,GAAQ,EAAoC,EAAE;IACnG,OAAO;QACH,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC,IAAI,cAAc,CAAC,YAAY;QAC3G,UAAU,EAAE,GAAG,CAAC,kDAAkD,CAAC;KAE9B,CAAC;AAE9C,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,GAAqC,EAAO,EAAE;IACrG,OAAO;QACP,4CAA4C,EAAE,GAAG,CAAC,OAAO;QACzD,gDAAgD,EAAE,GAAG,CAAC,UAAU;KAEvD,CAAA;AAET,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import CurrencyAmount from './CurrencyAmount.js';
|
|
2
|
+
interface LightningReceiveFeeEstimateOutput {
|
|
3
|
+
feeEstimate: CurrencyAmount;
|
|
4
|
+
}
|
|
5
|
+
export declare const LightningReceiveFeeEstimateOutputFromJson: (obj: any) => LightningReceiveFeeEstimateOutput;
|
|
6
|
+
export declare const LightningReceiveFeeEstimateOutputToJson: (obj: LightningReceiveFeeEstimateOutput) => any;
|
|
7
|
+
export declare const FRAGMENT = "\nfragment LightningReceiveFeeEstimateOutputFragment on LightningReceiveFeeEstimateOutput {\n __typename\n lightning_receive_fee_estimate_output_fee_estimate: fee_estimate {\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}";
|
|
8
|
+
export default LightningReceiveFeeEstimateOutput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
import { CurrencyAmountFromJson } from './CurrencyAmount.js';
|
|
3
|
+
import { CurrencyAmountToJson } from './CurrencyAmount.js';
|
|
4
|
+
export const LightningReceiveFeeEstimateOutputFromJson = (obj) => {
|
|
5
|
+
return {
|
|
6
|
+
feeEstimate: CurrencyAmountFromJson(obj["lightning_receive_fee_estimate_output_fee_estimate"]),
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export const LightningReceiveFeeEstimateOutputToJson = (obj) => {
|
|
10
|
+
return {
|
|
11
|
+
lightning_receive_fee_estimate_output_fee_estimate: CurrencyAmountToJson(obj.feeEstimate),
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export const FRAGMENT = `
|
|
15
|
+
fragment LightningReceiveFeeEstimateOutputFragment on LightningReceiveFeeEstimateOutput {
|
|
16
|
+
__typename
|
|
17
|
+
lightning_receive_fee_estimate_output_fee_estimate: fee_estimate {
|
|
18
|
+
__typename
|
|
19
|
+
currency_amount_original_value: original_value
|
|
20
|
+
currency_amount_original_unit: original_unit
|
|
21
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
22
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
23
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
24
|
+
}
|
|
25
|
+
}`;
|
|
26
|
+
//# sourceMappingURL=LightningReceiveFeeEstimateOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LightningReceiveFeeEstimateOutput.js","sourceRoot":"","sources":["../../../src/graphql/objects/LightningReceiveFeeEstimateOutput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAG1E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAczD,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,GAAQ,EAAqC,EAAE;IACrG,OAAO;QACH,WAAW,EAAE,sBAAsB,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;KAExD,CAAC;AAE/C,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,GAAsC,EAAO,EAAE;IACvG,OAAO;QACP,kDAAkD,EAAE,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC;KAEhF,CAAA;AAET,CAAC,CAAA;AAGG,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;EAW1B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Transfer from './Transfer.js';
|
|
2
|
+
import CurrencyAmount from './CurrencyAmount.js';
|
|
3
|
+
import { Query } from '@lightsparkdev/core';
|
|
4
|
+
import Invoice from './Invoice.js';
|
|
5
|
+
import LightningReceiveRequestStatus from './LightningReceiveRequestStatus.js';
|
|
6
|
+
interface LightningReceiveRequest {
|
|
7
|
+
/**
|
|
8
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
9
|
+
* string.
|
|
10
|
+
**/
|
|
11
|
+
id: string;
|
|
12
|
+
/** The date and time when the entity was first created. **/
|
|
13
|
+
createdAt: string;
|
|
14
|
+
/** The date and time when the entity was last updated. **/
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
/** The lightning invoice generated to receive lightning payment. **/
|
|
17
|
+
invoice: Invoice;
|
|
18
|
+
/** The fee charged for receiving the lightning invoice. **/
|
|
19
|
+
fee: CurrencyAmount;
|
|
20
|
+
/** The status of the request. **/
|
|
21
|
+
status: LightningReceiveRequestStatus;
|
|
22
|
+
/** The typename of the object **/
|
|
23
|
+
typename: string;
|
|
24
|
+
/** The leaves transfer after lightning payment was received. **/
|
|
25
|
+
transfer?: Transfer | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare const LightningReceiveRequestFromJson: (obj: any) => LightningReceiveRequest;
|
|
28
|
+
export declare const LightningReceiveRequestToJson: (obj: LightningReceiveRequest) => any;
|
|
29
|
+
export declare const FRAGMENT = "\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}";
|
|
30
|
+
export declare const getLightningReceiveRequestQuery: (id: string) => Query<LightningReceiveRequest>;
|
|
31
|
+
export default LightningReceiveRequest;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
import { CurrencyAmountFromJson } from './CurrencyAmount.js';
|
|
3
|
+
import { isObject } from '@lightsparkdev/core';
|
|
4
|
+
import { InvoiceFromJson } from './Invoice.js';
|
|
5
|
+
import { TransferFromJson } from './Transfer.js';
|
|
6
|
+
import LightningReceiveRequestStatus from './LightningReceiveRequestStatus.js';
|
|
7
|
+
import { CurrencyAmountToJson } from './CurrencyAmount.js';
|
|
8
|
+
import { InvoiceToJson } from './Invoice.js';
|
|
9
|
+
export const LightningReceiveRequestFromJson = (obj) => {
|
|
10
|
+
return {
|
|
11
|
+
id: obj["lightning_receive_request_id"],
|
|
12
|
+
createdAt: obj["lightning_receive_request_created_at"],
|
|
13
|
+
updatedAt: obj["lightning_receive_request_updated_at"],
|
|
14
|
+
invoice: InvoiceFromJson(obj["lightning_receive_request_invoice"]),
|
|
15
|
+
fee: CurrencyAmountFromJson(obj["lightning_receive_request_fee"]),
|
|
16
|
+
status: LightningReceiveRequestStatus[obj["lightning_receive_request_status"]] ?? LightningReceiveRequestStatus.FUTURE_VALUE,
|
|
17
|
+
typename: "LightningReceiveRequest", transfer: (!!obj["lightning_receive_request_transfer"] ? TransferFromJson(obj["lightning_receive_request_transfer"]) : undefined),
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export const LightningReceiveRequestToJson = (obj) => {
|
|
21
|
+
return {
|
|
22
|
+
__typename: "LightningReceiveRequest", lightning_receive_request_id: obj.id,
|
|
23
|
+
lightning_receive_request_created_at: obj.createdAt,
|
|
24
|
+
lightning_receive_request_updated_at: obj.updatedAt,
|
|
25
|
+
lightning_receive_request_invoice: InvoiceToJson(obj.invoice),
|
|
26
|
+
lightning_receive_request_fee: CurrencyAmountToJson(obj.fee),
|
|
27
|
+
lightning_receive_request_status: obj.status,
|
|
28
|
+
lightning_receive_request_transfer: (obj.transfer ? obj.transfer.toJson() : undefined),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export const FRAGMENT = `
|
|
32
|
+
fragment LightningReceiveRequestFragment on LightningReceiveRequest {
|
|
33
|
+
__typename
|
|
34
|
+
lightning_receive_request_id: id
|
|
35
|
+
lightning_receive_request_created_at: created_at
|
|
36
|
+
lightning_receive_request_updated_at: updated_at
|
|
37
|
+
lightning_receive_request_invoice: invoice {
|
|
38
|
+
__typename
|
|
39
|
+
invoice_encoded_envoice: encoded_envoice
|
|
40
|
+
invoice_bitcoin_network: bitcoin_network
|
|
41
|
+
invoice_payment_hash: payment_hash
|
|
42
|
+
invoice_amount: amount {
|
|
43
|
+
__typename
|
|
44
|
+
currency_amount_original_value: original_value
|
|
45
|
+
currency_amount_original_unit: original_unit
|
|
46
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
47
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
48
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
49
|
+
}
|
|
50
|
+
invoice_created_at: created_at
|
|
51
|
+
invoice_expires_at: expires_at
|
|
52
|
+
invoice_memo: memo
|
|
53
|
+
}
|
|
54
|
+
lightning_receive_request_fee: fee {
|
|
55
|
+
__typename
|
|
56
|
+
currency_amount_original_value: original_value
|
|
57
|
+
currency_amount_original_unit: original_unit
|
|
58
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
59
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
60
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
61
|
+
}
|
|
62
|
+
lightning_receive_request_status: status
|
|
63
|
+
lightning_receive_request_transfer: transfer {
|
|
64
|
+
__typename
|
|
65
|
+
transfer_total_amount: total_amount {
|
|
66
|
+
__typename
|
|
67
|
+
currency_amount_original_value: original_value
|
|
68
|
+
currency_amount_original_unit: original_unit
|
|
69
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
70
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
71
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
72
|
+
}
|
|
73
|
+
transfer_spark_id: spark_id
|
|
74
|
+
}
|
|
75
|
+
}`;
|
|
76
|
+
export const getLightningReceiveRequestQuery = (id) => {
|
|
77
|
+
return {
|
|
78
|
+
queryPayload: `
|
|
79
|
+
query GetLightningReceiveRequest($id: ID!) {
|
|
80
|
+
entity(id: $id) {
|
|
81
|
+
... on LightningReceiveRequest {
|
|
82
|
+
...LightningReceiveRequestFragment
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
${FRAGMENT}
|
|
88
|
+
`,
|
|
89
|
+
variables: { id },
|
|
90
|
+
constructObject: (data) => isObject(data) && "entity" in data && isObject(data.entity) ? LightningReceiveRequestFromJson(data.entity) : null,
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=LightningReceiveRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LightningReceiveRequest.js","sourceRoot":"","sources":["../../../src/graphql/objects/LightningReceiveRequest.ts"],"names":[],"mappings":"AACA,0EAA0E;AAG1E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAS,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAsC3C,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,GAAQ,EAA2B,EAAE;IACjF,OAAO;QACH,EAAE,EAAE,GAAG,CAAC,8BAA8B,CAAC;QACvC,SAAS,EAAE,GAAG,CAAC,sCAAsC,CAAC;QACtD,SAAS,EAAE,GAAG,CAAC,sCAAsC,CAAC;QACtD,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QAClE,GAAG,EAAE,sBAAsB,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QACjE,MAAM,EAAE,6BAA6B,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC,IAAI,6BAA6B,CAAC,YAAY;QACpI,QAAQ,EAAE,yBAAyB,EAAS,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KAEzI,CAAC;AAErC,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,GAA4B,EAAO,EAAE;IACnF,OAAO;QACP,UAAU,EAAE,yBAAyB,EAAC,4BAA4B,EAAE,GAAG,CAAC,EAAE;QAC1E,oCAAoC,EAAE,GAAG,CAAC,SAAS;QACnD,oCAAoC,EAAE,GAAG,CAAC,SAAS;QACnD,iCAAiC,EAAE,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC;QAC7D,6BAA6B,EAAE,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC;QAC5D,gCAAgC,EAAE,GAAG,CAAC,MAAM;QAC5C,kCAAkC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAE7E,CAAA;AAET,CAAC,CAAA;AAGG,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4C1B,CAAC;AAIC,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAAU,EAAkC,EAAE;IAC1F,OAAO;QACH,YAAY,EAAE;;;;;;;;;EASxB,QAAQ;CACT;QACW,SAAS,EAAE,EAAC,EAAE,EAAC;QACf,eAAe,EAAE,CAAC,IAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,IAAI,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,+BAA+B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;KACxJ,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum LightningReceiveRequestStatus {
|
|
2
|
+
/**
|
|
3
|
+
* This is an enum value that represents values that could be added in the future.
|
|
4
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
5
|
+
*/
|
|
6
|
+
FUTURE_VALUE = "FUTURE_VALUE",
|
|
7
|
+
INVOICE_CREATED = "INVOICE_CREATED",
|
|
8
|
+
PAYMENT_PREIMAGE_REQUEST_RECEIVED = "PAYMENT_PREIMAGE_REQUEST_RECEIVED",
|
|
9
|
+
LEAVES_LOCKED = "LEAVES_LOCKED",
|
|
10
|
+
REFUND_SIGNING_COMMITMENTS_RECEIVED = "REFUND_SIGNING_COMMITMENTS_RECEIVED",
|
|
11
|
+
REFUND_SIGNED = "REFUND_SIGNED",
|
|
12
|
+
PAYMENT_PREIMAGE_RECOVERED = "PAYMENT_PREIMAGE_RECOVERED",
|
|
13
|
+
LIGHTNING_PAYMENT_RECEIVED = "LIGHTNING_PAYMENT_RECEIVED",
|
|
14
|
+
TRANSFER_COMPLETED = "TRANSFER_COMPLETED"
|
|
15
|
+
}
|
|
16
|
+
export default LightningReceiveRequestStatus;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
export var LightningReceiveRequestStatus;
|
|
3
|
+
(function (LightningReceiveRequestStatus) {
|
|
4
|
+
/**
|
|
5
|
+
* This is an enum value that represents values that could be added in the future.
|
|
6
|
+
* Clients should support unknown values as more of them could be added without notice.
|
|
7
|
+
*/
|
|
8
|
+
LightningReceiveRequestStatus["FUTURE_VALUE"] = "FUTURE_VALUE";
|
|
9
|
+
LightningReceiveRequestStatus["INVOICE_CREATED"] = "INVOICE_CREATED";
|
|
10
|
+
LightningReceiveRequestStatus["PAYMENT_PREIMAGE_REQUEST_RECEIVED"] = "PAYMENT_PREIMAGE_REQUEST_RECEIVED";
|
|
11
|
+
LightningReceiveRequestStatus["LEAVES_LOCKED"] = "LEAVES_LOCKED";
|
|
12
|
+
LightningReceiveRequestStatus["REFUND_SIGNING_COMMITMENTS_RECEIVED"] = "REFUND_SIGNING_COMMITMENTS_RECEIVED";
|
|
13
|
+
LightningReceiveRequestStatus["REFUND_SIGNED"] = "REFUND_SIGNED";
|
|
14
|
+
LightningReceiveRequestStatus["PAYMENT_PREIMAGE_RECOVERED"] = "PAYMENT_PREIMAGE_RECOVERED";
|
|
15
|
+
LightningReceiveRequestStatus["LIGHTNING_PAYMENT_RECEIVED"] = "LIGHTNING_PAYMENT_RECEIVED";
|
|
16
|
+
LightningReceiveRequestStatus["TRANSFER_COMPLETED"] = "TRANSFER_COMPLETED";
|
|
17
|
+
})(LightningReceiveRequestStatus || (LightningReceiveRequestStatus = {}));
|
|
18
|
+
export default LightningReceiveRequestStatus;
|
|
19
|
+
//# sourceMappingURL=LightningReceiveRequestStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LightningReceiveRequestStatus.js","sourceRoot":"","sources":["../../../src/graphql/objects/LightningReceiveRequestStatus.ts"],"names":[],"mappings":"AACA,0EAA0E;AAG1E,MAAM,CAAN,IAAY,6BAuBX;AAvBD,WAAY,6BAA6B;IACzC;;;OAGG;IACF,8DAA6B,CAAA;IAE9B,oEAAmC,CAAA;IAEnC,wGAAuE,CAAA;IAEvE,gEAA+B,CAAA;IAE/B,4GAA2E,CAAA;IAE3E,gEAA+B,CAAA;IAE/B,0FAAyD,CAAA;IAEzD,0FAAyD,CAAA;IAEzD,0EAAyC,CAAA;AAEzC,CAAC,EAvBW,6BAA6B,KAA7B,6BAA6B,QAuBxC;AAED,eAAe,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface LightningSendFeeEstimateInput {
|
|
2
|
+
encodedInvoice: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const LightningSendFeeEstimateInputFromJson: (obj: any) => LightningSendFeeEstimateInput;
|
|
5
|
+
export declare const LightningSendFeeEstimateInputToJson: (obj: LightningSendFeeEstimateInput) => any;
|
|
6
|
+
export default LightningSendFeeEstimateInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
export const LightningSendFeeEstimateInputFromJson = (obj) => {
|
|
3
|
+
return {
|
|
4
|
+
encodedInvoice: obj["lightning_send_fee_estimate_input_encoded_invoice"],
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export const LightningSendFeeEstimateInputToJson = (obj) => {
|
|
8
|
+
return {
|
|
9
|
+
lightning_send_fee_estimate_input_encoded_invoice: obj.encodedInvoice,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=LightningSendFeeEstimateInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LightningSendFeeEstimateInput.js","sourceRoot":"","sources":["../../../src/graphql/objects/LightningSendFeeEstimateInput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAgB1E,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,GAAQ,EAAiC,EAAE;IAC7F,OAAO;QACH,cAAc,EAAE,GAAG,CAAC,mDAAmD,CAAC;KAEtC,CAAC;AAE3C,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,GAAkC,EAAO,EAAE;IAC/F,OAAO;QACP,iDAAiD,EAAE,GAAG,CAAC,cAAc;KAE5D,CAAA;AAET,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import CurrencyAmount from './CurrencyAmount.js';
|
|
2
|
+
interface LightningSendFeeEstimateOutput {
|
|
3
|
+
feeEstimate: CurrencyAmount;
|
|
4
|
+
}
|
|
5
|
+
export declare const LightningSendFeeEstimateOutputFromJson: (obj: any) => LightningSendFeeEstimateOutput;
|
|
6
|
+
export declare const LightningSendFeeEstimateOutputToJson: (obj: LightningSendFeeEstimateOutput) => any;
|
|
7
|
+
export declare const FRAGMENT = "\nfragment LightningSendFeeEstimateOutputFragment on LightningSendFeeEstimateOutput {\n __typename\n lightning_send_fee_estimate_output_fee_estimate: fee_estimate {\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}";
|
|
8
|
+
export default LightningSendFeeEstimateOutput;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
|
|
2
|
+
import { CurrencyAmountFromJson } from './CurrencyAmount.js';
|
|
3
|
+
import { CurrencyAmountToJson } from './CurrencyAmount.js';
|
|
4
|
+
export const LightningSendFeeEstimateOutputFromJson = (obj) => {
|
|
5
|
+
return {
|
|
6
|
+
feeEstimate: CurrencyAmountFromJson(obj["lightning_send_fee_estimate_output_fee_estimate"]),
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export const LightningSendFeeEstimateOutputToJson = (obj) => {
|
|
10
|
+
return {
|
|
11
|
+
lightning_send_fee_estimate_output_fee_estimate: CurrencyAmountToJson(obj.feeEstimate),
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export const FRAGMENT = `
|
|
15
|
+
fragment LightningSendFeeEstimateOutputFragment on LightningSendFeeEstimateOutput {
|
|
16
|
+
__typename
|
|
17
|
+
lightning_send_fee_estimate_output_fee_estimate: fee_estimate {
|
|
18
|
+
__typename
|
|
19
|
+
currency_amount_original_value: original_value
|
|
20
|
+
currency_amount_original_unit: original_unit
|
|
21
|
+
currency_amount_preferred_currency_unit: preferred_currency_unit
|
|
22
|
+
currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded
|
|
23
|
+
currency_amount_preferred_currency_value_approx: preferred_currency_value_approx
|
|
24
|
+
}
|
|
25
|
+
}`;
|
|
26
|
+
//# sourceMappingURL=LightningSendFeeEstimateOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LightningSendFeeEstimateOutput.js","sourceRoot":"","sources":["../../../src/graphql/objects/LightningSendFeeEstimateOutput.ts"],"names":[],"mappings":"AACA,0EAA0E;AAG1E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAczD,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,GAAQ,EAAkC,EAAE;IAC/F,OAAO;QACH,WAAW,EAAE,sBAAsB,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;KAExD,CAAC;AAE5C,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,GAAmC,EAAO,EAAE;IACjG,OAAO;QACP,+CAA+C,EAAE,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC;KAE7E,CAAA;AAET,CAAC,CAAA;AAGG,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;EAW1B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Transfer from './Transfer.js';
|
|
2
|
+
import CurrencyAmount from './CurrencyAmount.js';
|
|
3
|
+
import { Query } from '@lightsparkdev/core';
|
|
4
|
+
import LightningSendRequestStatus from './LightningSendRequestStatus.js';
|
|
5
|
+
interface LightningSendRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
|
|
8
|
+
* string.
|
|
9
|
+
**/
|
|
10
|
+
id: string;
|
|
11
|
+
/** The date and time when the entity was first created. **/
|
|
12
|
+
createdAt: string;
|
|
13
|
+
/** The date and time when the entity was last updated. **/
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
/** The lightning invoice user requested to pay. **/
|
|
16
|
+
encodedInvoice: string;
|
|
17
|
+
/** The fee charged for paying the lightning invoice. **/
|
|
18
|
+
fee: CurrencyAmount;
|
|
19
|
+
/** The idempotency key of the request. **/
|
|
20
|
+
idempotencyKey: string;
|
|
21
|
+
/** The status of the request. **/
|
|
22
|
+
status: LightningSendRequestStatus;
|
|
23
|
+
/** The typename of the object **/
|
|
24
|
+
typename: string;
|
|
25
|
+
/** The leaves transfer after lightning payment was sent. **/
|
|
26
|
+
transfer?: Transfer | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare const LightningSendRequestFromJson: (obj: any) => LightningSendRequest;
|
|
29
|
+
export declare const LightningSendRequestToJson: (obj: LightningSendRequest) => any;
|
|
30
|
+
export declare const FRAGMENT = "\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}";
|
|
31
|
+
export declare const getLightningSendRequestQuery: (id: string) => Query<LightningSendRequest>;
|
|
32
|
+
export default LightningSendRequest;
|