@atomicfinance/client 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/LICENSE +674 -0
- package/README.md +11 -0
- package/dist/Cfd.d.ts +74 -0
- package/dist/Cfd.js +216 -0
- package/dist/Cfd.js.map +1 -0
- package/dist/Client.d.ts +20 -0
- package/dist/Client.js +36 -0
- package/dist/Client.js.map +1 -0
- package/dist/Dlc.d.ts +152 -0
- package/dist/Dlc.js +186 -0
- package/dist/Dlc.js.map +1 -0
- package/dist/Wallet.d.ts +14 -0
- package/dist/Wallet.js +33 -0
- package/dist/Wallet.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/lib/Cfd.ts +553 -0
- package/lib/Client.ts +45 -0
- package/lib/Dlc.ts +421 -0
- package/lib/Wallet.ts +72 -0
- package/lib/index.ts +2 -0
- package/package.json +35 -0
- package/tsconfig.json +7 -0
package/README.md
ADDED
package/dist/Cfd.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { AddMultisigSignRequest, AddMultisigSignResponse, AddPubkeyHashSignRequest, AddPubkeyHashSignResponse, AddRawTransactionRequest, AddRawTransactionResponse, AddScriptHashSignRequest, AddScriptHashSignResponse, AddSignRequest, AddSignResponse, AppendDescriptorChecksumRequest, AppendDescriptorChecksumResponse, BlindRawTransactionRequest, BlindRawTransactionResponse, CalculateEcSignatureRequest, CalculateEcSignatureResponse, ConvertAesRequest, ConvertAesResponse, ConvertEntropyToMnemonicRequest, ConvertEntropyToMnemonicResponse, ConvertMnemonicToSeedRequest, ConvertMnemonicToSeedResponse, CreateAddressRequest, CreateAddressResponse, CreateDescriptorRequest, CreateDescriptorResponse, CreateDestroyAmountRequest, CreateDestroyAmountResponse, CreateElementsSignatureHashRequest, CreateElementsSignatureHashResponse, CreateExtkeyFromParentKeyRequest, CreateExtkeyFromParentKeyResponse, CreateExtkeyFromParentPathRequest, CreateExtkeyFromParentPathResponse, CreateExtkeyFromParentRequest, CreateExtkeyFromParentResponse, CreateExtkeyFromSeedRequest, CreateExtkeyFromSeedResponse, CreateExtkeyRequest, CreateExtkeyResponse, CreateExtPubkeyRequest, CreateExtPubkeyResponse, CreateKeyPairRequest, CreateKeyPairResponse, CreateMultisigRequest, CreateMultisigResponse, CreateMultisigScriptSigRequest, CreateMultisigScriptSigResponse, CreatePegInAddressRequest, CreatePegInAddressResponse, CreateRawPeginRequest, CreateRawPeginResponse, CreateRawPegoutRequest, CreateRawPegoutResponse, CreateRawTransactionRequest, CreateRawTransactionResponse, CreateScriptRequest, CreateScriptResponse, CreateSignatureHashRequest, CreateSignatureHashResponse, DecodeBase58Request, DecodeBase58Response, DecodeDerSignatureToRawRequest, DecodeDerSignatureToRawResponse, DecodeRawTransactionRequest, DecodeRawTransactionResponse, ElementsAddRawTransactionRequest, ElementsAddRawTransactionResponse, ElementsCreateRawTransactionRequest, ElementsCreateRawTransactionResponse, ElementsDecodeRawTransactionRequest, ElementsDecodeRawTransactionResponse, EncodeBase58Request, EncodeBase58Response, EncodeSignatureByDerRequest, EncodeSignatureByDerResponse, EstimateFeeRequest, EstimateFeeResponse, FundRawTransactionRequest, FundRawTransactionResponse, GetAddressesFromMultisigRequest, GetAddressesFromMultisigResponse, GetAddressInfoRequest, GetAddressInfoResponse, GetCommitmentRequest, GetCommitmentResponse, GetCompressedPubkeyRequest, GetCompressedPubkeyResponse, GetConfidentialAddressRequest, GetConfidentialAddressResponse, GetDefaultBlindingKeyRequest, GetDefaultBlindingKeyResponse, GetExtkeyInfoRequest, GetExtkeyInfoResponse, GetIssuanceBlindingKeyRequest, GetIssuanceBlindingKeyResponse, GetMnemonicWordlistRequest, GetMnemonicWordlistResponse, GetPrivkeyFromExtkeyRequest, GetPrivkeyFromExtkeyResponse, GetPrivkeyFromWifRequest, GetPrivkeyFromWifResponse, GetPrivkeyWifRequest, GetPrivkeyWifResponse, GetPubkeyFromExtkeyRequest, GetPubkeyFromExtkeyResponse, GetPubkeyFromPrivkeyRequest, GetPubkeyFromPrivkeyResponse, GetSupportedFunctionResponse, GetUnblindedAddressRequest, GetUnblindedAddressResponse, GetWitnessStackNumRequest, GetWitnessStackNumResponse, ParseDescriptorRequest, ParseDescriptorResponse, ParseScriptRequest, ParseScriptResponse, SelectUtxosRequest, SelectUtxosResponse, SerializeLedgerFormatRequest, SerializeLedgerFormatResponse, SetRawIssueAssetRequest, SetRawIssueAssetResponse, SetRawReissueAssetRequest, SetRawReissueAssetResponse, SignWithPrivkeyRequest, SignWithPrivkeyResponse, UnblindRawTransactionRequest, UnblindRawTransactionResponse, UpdateTxOutAmountRequest, UpdateTxOutAmountResponse, UpdateWitnessStackRequest, UpdateWitnessStackResponse, VerifySignatureRequest, VerifySignatureResponse, VerifySignRequest, VerifySignResponse } from '@atomicfinance/types';
|
|
2
|
+
export default class Cfd {
|
|
3
|
+
client: any;
|
|
4
|
+
constructor(client: any);
|
|
5
|
+
AddMultisigSign(jsonObject: AddMultisigSignRequest): Promise<AddMultisigSignResponse>;
|
|
6
|
+
AddPubkeyHashSign(jsonObject: AddPubkeyHashSignRequest): Promise<AddPubkeyHashSignResponse>;
|
|
7
|
+
AddRawTransaction(jsonObject: AddRawTransactionRequest): Promise<AddRawTransactionResponse>;
|
|
8
|
+
AddScriptHashSign(jsonObject: AddScriptHashSignRequest): Promise<AddScriptHashSignResponse>;
|
|
9
|
+
AddSign(jsonObject: AddSignRequest): Promise<AddSignResponse>;
|
|
10
|
+
AppendDescriptorChecksum(jsonObject: AppendDescriptorChecksumRequest): Promise<AppendDescriptorChecksumResponse>;
|
|
11
|
+
BlindRawTransaction(jsonObject: BlindRawTransactionRequest): Promise<BlindRawTransactionResponse>;
|
|
12
|
+
CalculateEcSignature(jsonObject: CalculateEcSignatureRequest): Promise<CalculateEcSignatureResponse>;
|
|
13
|
+
ConvertAes(jsonObject: ConvertAesRequest): Promise<ConvertAesResponse>;
|
|
14
|
+
ConvertEntropyToMnemonic(jsonObject: ConvertEntropyToMnemonicRequest): Promise<ConvertEntropyToMnemonicResponse>;
|
|
15
|
+
ConvertMnemonicToSeed(jsonObject: ConvertMnemonicToSeedRequest): Promise<ConvertMnemonicToSeedResponse>;
|
|
16
|
+
CreateAddress(jsonObject: CreateAddressRequest): Promise<CreateAddressResponse>;
|
|
17
|
+
CreateDescriptor(jsonObject: CreateDescriptorRequest): Promise<CreateDescriptorResponse>;
|
|
18
|
+
CreateExtkey(jsonObject: CreateExtkeyRequest): Promise<CreateExtkeyResponse>;
|
|
19
|
+
CreateExtkeyFromParent(jsonObject: CreateExtkeyFromParentRequest): Promise<CreateExtkeyFromParentResponse>;
|
|
20
|
+
CreateExtkeyFromParentKey(jsonObject: CreateExtkeyFromParentKeyRequest): Promise<CreateExtkeyFromParentKeyResponse>;
|
|
21
|
+
CreateExtkeyFromParentPath(jsonObject: CreateExtkeyFromParentPathRequest): Promise<CreateExtkeyFromParentPathResponse>;
|
|
22
|
+
CreateExtkeyFromSeed(jsonObject: CreateExtkeyFromSeedRequest): Promise<CreateExtkeyFromSeedResponse>;
|
|
23
|
+
CreateExtPubkey(jsonObject: CreateExtPubkeyRequest): Promise<CreateExtPubkeyResponse>;
|
|
24
|
+
CreateKeyPair(jsonObject: CreateKeyPairRequest): Promise<CreateKeyPairResponse>;
|
|
25
|
+
CreateMultisigScriptSig(jsonObject: CreateMultisigScriptSigRequest): Promise<CreateMultisigScriptSigResponse>;
|
|
26
|
+
CreateScript(jsonObject: CreateScriptRequest): Promise<CreateScriptResponse>;
|
|
27
|
+
DecodeBase58(jsonObject: DecodeBase58Request): Promise<DecodeBase58Response>;
|
|
28
|
+
DecodeDerSignatureToRaw(jsonObject: DecodeDerSignatureToRawRequest): Promise<DecodeDerSignatureToRawResponse>;
|
|
29
|
+
DecodeRawTransaction(jsonObject: DecodeRawTransactionRequest): Promise<DecodeRawTransactionResponse>;
|
|
30
|
+
ElementsAddRawTransaction(jsonObject: ElementsAddRawTransactionRequest): Promise<ElementsAddRawTransactionResponse>;
|
|
31
|
+
CreateDestroyAmount(jsonObject: CreateDestroyAmountRequest): Promise<CreateDestroyAmountResponse>;
|
|
32
|
+
CreatePegInAddress(jsonObject: CreatePegInAddressRequest): Promise<CreatePegInAddressResponse>;
|
|
33
|
+
CreateRawPegin(jsonObject: CreateRawPeginRequest): Promise<CreateRawPeginResponse>;
|
|
34
|
+
CreateRawPegout(jsonObject: CreateRawPegoutRequest): Promise<CreateRawPegoutResponse>;
|
|
35
|
+
ElementsCreateRawTransaction(jsonObject: ElementsCreateRawTransactionRequest): Promise<ElementsCreateRawTransactionResponse>;
|
|
36
|
+
ElementsDecodeRawTransaction(jsonObject: ElementsDecodeRawTransactionRequest): Promise<ElementsDecodeRawTransactionResponse>;
|
|
37
|
+
GetConfidentialAddress(jsonObject: GetConfidentialAddressRequest): Promise<GetConfidentialAddressResponse>;
|
|
38
|
+
GetUnblindedAddress(jsonObject: GetUnblindedAddressRequest): Promise<GetUnblindedAddressResponse>;
|
|
39
|
+
SetRawIssueAsset(jsonObject: SetRawIssueAssetRequest): Promise<SetRawIssueAssetResponse>;
|
|
40
|
+
SetRawReissueAsset(jsonObject: SetRawReissueAssetRequest): Promise<SetRawReissueAssetResponse>;
|
|
41
|
+
UnblindRawTransaction(jsonObject: UnblindRawTransactionRequest): Promise<UnblindRawTransactionResponse>;
|
|
42
|
+
EncodeBase58(jsonObject: EncodeBase58Request): Promise<EncodeBase58Response>;
|
|
43
|
+
EncodeSignatureByDer(jsonObject: EncodeSignatureByDerRequest): Promise<EncodeSignatureByDerResponse>;
|
|
44
|
+
EstimateFee(jsonObject: EstimateFeeRequest): Promise<EstimateFeeResponse>;
|
|
45
|
+
FundRawTransaction(jsonObject: FundRawTransactionRequest): Promise<FundRawTransactionResponse>;
|
|
46
|
+
GetAddressInfo(jsonObject: GetAddressInfoRequest): Promise<GetAddressInfoResponse>;
|
|
47
|
+
GetAddressesFromMultisig(jsonObject: GetAddressesFromMultisigRequest): Promise<GetAddressesFromMultisigResponse>;
|
|
48
|
+
GetCommitment(jsonObject: GetCommitmentRequest): Promise<GetCommitmentResponse>;
|
|
49
|
+
GetCompressedPubkey(jsonObject: GetCompressedPubkeyRequest): Promise<GetCompressedPubkeyResponse>;
|
|
50
|
+
GetDefaultBlindingKey(jsonObject: GetDefaultBlindingKeyRequest): Promise<GetDefaultBlindingKeyResponse>;
|
|
51
|
+
GetExtkeyInfo(jsonObject: GetExtkeyInfoRequest): Promise<GetExtkeyInfoResponse>;
|
|
52
|
+
GetIssuanceBlindingKey(jsonObject: GetIssuanceBlindingKeyRequest): Promise<GetIssuanceBlindingKeyResponse>;
|
|
53
|
+
GetMnemonicWordlist(jsonObject: GetMnemonicWordlistRequest): Promise<GetMnemonicWordlistResponse>;
|
|
54
|
+
GetPrivkeyFromExtkey(jsonObject: GetPrivkeyFromExtkeyRequest): Promise<GetPrivkeyFromExtkeyResponse>;
|
|
55
|
+
GetPrivkeyFromWif(jsonObject: GetPrivkeyFromWifRequest): Promise<GetPrivkeyFromWifResponse>;
|
|
56
|
+
GetPrivkeyWif(jsonObject: GetPrivkeyWifRequest): Promise<GetPrivkeyWifResponse>;
|
|
57
|
+
GetPubkeyFromExtkey(jsonObject: GetPubkeyFromExtkeyRequest): Promise<GetPubkeyFromExtkeyResponse>;
|
|
58
|
+
GetPubkeyFromPrivkey(jsonObject: GetPubkeyFromPrivkeyRequest): Promise<GetPubkeyFromPrivkeyResponse>;
|
|
59
|
+
GetWitnessStackNum(jsonObject: GetWitnessStackNumRequest): Promise<GetWitnessStackNumResponse>;
|
|
60
|
+
CreateMultisig(jsonObject: CreateMultisigRequest): Promise<CreateMultisigResponse>;
|
|
61
|
+
ParseDescriptor(jsonObject: ParseDescriptorRequest): Promise<ParseDescriptorResponse>;
|
|
62
|
+
ParseScript(jsonObject: ParseScriptRequest): Promise<ParseScriptResponse>;
|
|
63
|
+
SelectUtxos(jsonObject: SelectUtxosRequest): Promise<SelectUtxosResponse>;
|
|
64
|
+
SerializeLedgerFormat(jsonObject: SerializeLedgerFormatRequest): Promise<SerializeLedgerFormatResponse>;
|
|
65
|
+
CreateSignatureHash(jsonObject: CreateSignatureHashRequest): Promise<CreateSignatureHashResponse>;
|
|
66
|
+
CreateElementsSignatureHash(jsonObject: CreateElementsSignatureHashRequest): Promise<CreateElementsSignatureHashResponse>;
|
|
67
|
+
SignWithPrivkey(jsonObject: SignWithPrivkeyRequest): Promise<SignWithPrivkeyResponse>;
|
|
68
|
+
GetSupportedFunction(): Promise<GetSupportedFunctionResponse>;
|
|
69
|
+
CreateRawTransaction(jsonObject: CreateRawTransactionRequest): Promise<CreateRawTransactionResponse>;
|
|
70
|
+
UpdateTxOutAmount(jsonObject: UpdateTxOutAmountRequest): Promise<UpdateTxOutAmountResponse>;
|
|
71
|
+
UpdateWitnessStack(jsonObject: UpdateWitnessStackRequest): Promise<UpdateWitnessStackResponse>;
|
|
72
|
+
VerifySign(jsonObject: VerifySignRequest): Promise<VerifySignResponse>;
|
|
73
|
+
VerifySignature(jsonObject: VerifySignatureRequest): Promise<VerifySignatureResponse>;
|
|
74
|
+
}
|
package/dist/Cfd.js
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class Cfd {
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.client = client;
|
|
6
|
+
}
|
|
7
|
+
async AddMultisigSign(jsonObject) {
|
|
8
|
+
return this.client.getMethod('AddMultisigSign')(jsonObject);
|
|
9
|
+
}
|
|
10
|
+
async AddPubkeyHashSign(jsonObject) {
|
|
11
|
+
return this.client.getMethod('AddPubkeyHashSign')(jsonObject);
|
|
12
|
+
}
|
|
13
|
+
async AddRawTransaction(jsonObject) {
|
|
14
|
+
return this.client.getMethod('AddRawTransaction')(jsonObject);
|
|
15
|
+
}
|
|
16
|
+
async AddScriptHashSign(jsonObject) {
|
|
17
|
+
return this.client.getMethod('AddScriptHashSign')(jsonObject);
|
|
18
|
+
}
|
|
19
|
+
async AddSign(jsonObject) {
|
|
20
|
+
return this.client.getMethod('AddSign')(jsonObject);
|
|
21
|
+
}
|
|
22
|
+
async AppendDescriptorChecksum(jsonObject) {
|
|
23
|
+
return this.client.getMethod('AppendDescriptorChecksum')(jsonObject);
|
|
24
|
+
}
|
|
25
|
+
async BlindRawTransaction(jsonObject) {
|
|
26
|
+
return this.client.getMethod('BlindRawTransaction')(jsonObject);
|
|
27
|
+
}
|
|
28
|
+
async CalculateEcSignature(jsonObject) {
|
|
29
|
+
return this.client.getMethod('CalculateEcSignature')(jsonObject);
|
|
30
|
+
}
|
|
31
|
+
async ConvertAes(jsonObject) {
|
|
32
|
+
return this.client.getMethod('ConvertAes')(jsonObject);
|
|
33
|
+
}
|
|
34
|
+
async ConvertEntropyToMnemonic(jsonObject) {
|
|
35
|
+
return this.client.getMethod('ConvertEntropyToMnemonic')(jsonObject);
|
|
36
|
+
}
|
|
37
|
+
async ConvertMnemonicToSeed(jsonObject) {
|
|
38
|
+
return this.client.getMethod('ConvertMnemonicToSeed')(jsonObject);
|
|
39
|
+
}
|
|
40
|
+
async CreateAddress(jsonObject) {
|
|
41
|
+
return this.client.getMethod('CreateAddress')(jsonObject);
|
|
42
|
+
}
|
|
43
|
+
async CreateDescriptor(jsonObject) {
|
|
44
|
+
return this.client.getMethod('CreateDescriptor')(jsonObject);
|
|
45
|
+
}
|
|
46
|
+
async CreateExtkey(jsonObject) {
|
|
47
|
+
return this.client.getMethod('CreateExtkey')(jsonObject);
|
|
48
|
+
}
|
|
49
|
+
async CreateExtkeyFromParent(jsonObject) {
|
|
50
|
+
return this.client.getMethod('CreateExtkeyFromParent')(jsonObject);
|
|
51
|
+
}
|
|
52
|
+
async CreateExtkeyFromParentKey(jsonObject) {
|
|
53
|
+
return this.client.getMethod('CreateExtkeyFromParentKey')(jsonObject);
|
|
54
|
+
}
|
|
55
|
+
async CreateExtkeyFromParentPath(jsonObject) {
|
|
56
|
+
return this.client.getMethod('CreateExtkeyFromParentPath')(jsonObject);
|
|
57
|
+
}
|
|
58
|
+
async CreateExtkeyFromSeed(jsonObject) {
|
|
59
|
+
return this.client.getMethod('CreateExtkeyFromSeed')(jsonObject);
|
|
60
|
+
}
|
|
61
|
+
async CreateExtPubkey(jsonObject) {
|
|
62
|
+
return this.client.getMethod('CreateExtPubkey')(jsonObject);
|
|
63
|
+
}
|
|
64
|
+
async CreateKeyPair(jsonObject) {
|
|
65
|
+
return this.client.getMethod('CreateKeyPair')(jsonObject);
|
|
66
|
+
}
|
|
67
|
+
async CreateMultisigScriptSig(jsonObject) {
|
|
68
|
+
return this.client.getMethod('CreateMultisigScriptSig')(jsonObject);
|
|
69
|
+
}
|
|
70
|
+
async CreateScript(jsonObject) {
|
|
71
|
+
return this.client.getMethod('CreateScript')(jsonObject);
|
|
72
|
+
}
|
|
73
|
+
async DecodeBase58(jsonObject) {
|
|
74
|
+
return this.client.getMethod('DecodeBase58')(jsonObject);
|
|
75
|
+
}
|
|
76
|
+
async DecodeDerSignatureToRaw(jsonObject) {
|
|
77
|
+
return this.client.getMethod('DecodeDerSignatureToRaw')(jsonObject);
|
|
78
|
+
}
|
|
79
|
+
async DecodeRawTransaction(jsonObject) {
|
|
80
|
+
return this.client.getMethod('DecodeRawTransaction')(jsonObject);
|
|
81
|
+
}
|
|
82
|
+
async ElementsAddRawTransaction(jsonObject) {
|
|
83
|
+
return this.client.getMethod('ElementsAddRawTransaction')(jsonObject);
|
|
84
|
+
}
|
|
85
|
+
async CreateDestroyAmount(jsonObject) {
|
|
86
|
+
return this.client.getMethod('CreateDestroyAmount')(jsonObject);
|
|
87
|
+
}
|
|
88
|
+
async CreatePegInAddress(jsonObject) {
|
|
89
|
+
return this.client.getMethod('CreatePegInAddress')(jsonObject);
|
|
90
|
+
}
|
|
91
|
+
async CreateRawPegin(jsonObject) {
|
|
92
|
+
return this.client.getMethod('CreateRawPegin')(jsonObject);
|
|
93
|
+
}
|
|
94
|
+
async CreateRawPegout(jsonObject) {
|
|
95
|
+
return this.client.getMethod('CreateRawPegout')(jsonObject);
|
|
96
|
+
}
|
|
97
|
+
async ElementsCreateRawTransaction(jsonObject) {
|
|
98
|
+
return this.client.getMethod('ElementsCreateRawTransaction')(jsonObject);
|
|
99
|
+
}
|
|
100
|
+
async ElementsDecodeRawTransaction(jsonObject) {
|
|
101
|
+
return this.client.getMethod('ElementsDecodeRawTransaction')(jsonObject);
|
|
102
|
+
}
|
|
103
|
+
async GetConfidentialAddress(jsonObject) {
|
|
104
|
+
return this.client.getMethod('GetConfidentialAddress')(jsonObject);
|
|
105
|
+
}
|
|
106
|
+
async GetUnblindedAddress(jsonObject) {
|
|
107
|
+
return this.client.getMethod('GetUnblindedAddress')(jsonObject);
|
|
108
|
+
}
|
|
109
|
+
async SetRawIssueAsset(jsonObject) {
|
|
110
|
+
return this.client.getMethod('SetRawIssueAsset')(jsonObject);
|
|
111
|
+
}
|
|
112
|
+
async SetRawReissueAsset(jsonObject) {
|
|
113
|
+
return this.client.getMethod('SetRawReissueAsset')(jsonObject);
|
|
114
|
+
}
|
|
115
|
+
async UnblindRawTransaction(jsonObject) {
|
|
116
|
+
return this.client.getMethod('UnblindRawTransaction')(jsonObject);
|
|
117
|
+
}
|
|
118
|
+
async EncodeBase58(jsonObject) {
|
|
119
|
+
return this.client.getMethod('EncodeBase58')(jsonObject);
|
|
120
|
+
}
|
|
121
|
+
async EncodeSignatureByDer(jsonObject) {
|
|
122
|
+
return this.client.getMethod('EncodeSignatureByDer')(jsonObject);
|
|
123
|
+
}
|
|
124
|
+
async EstimateFee(jsonObject) {
|
|
125
|
+
return this.client.getMethod('EstimateFee')(jsonObject);
|
|
126
|
+
}
|
|
127
|
+
async FundRawTransaction(jsonObject) {
|
|
128
|
+
return this.client.getMethod('FundRawTransaction')(jsonObject);
|
|
129
|
+
}
|
|
130
|
+
async GetAddressInfo(jsonObject) {
|
|
131
|
+
return this.client.getMethod('GetAddressInfo')(jsonObject);
|
|
132
|
+
}
|
|
133
|
+
async GetAddressesFromMultisig(jsonObject) {
|
|
134
|
+
return this.client.getMethod('GetAddressesFromMultisig')(jsonObject);
|
|
135
|
+
}
|
|
136
|
+
async GetCommitment(jsonObject) {
|
|
137
|
+
return this.client.getMethod('GetCommitment')(jsonObject);
|
|
138
|
+
}
|
|
139
|
+
async GetCompressedPubkey(jsonObject) {
|
|
140
|
+
return this.client.getMethod('GetCompressedPubkey')(jsonObject);
|
|
141
|
+
}
|
|
142
|
+
async GetDefaultBlindingKey(jsonObject) {
|
|
143
|
+
return this.client.getMethod('GetDefaultBlindingKey')(jsonObject);
|
|
144
|
+
}
|
|
145
|
+
async GetExtkeyInfo(jsonObject) {
|
|
146
|
+
return this.client.getMethod('GetExtkeyInfo')(jsonObject);
|
|
147
|
+
}
|
|
148
|
+
async GetIssuanceBlindingKey(jsonObject) {
|
|
149
|
+
return this.client.getMethod('GetIssuanceBlindingKey')(jsonObject);
|
|
150
|
+
}
|
|
151
|
+
async GetMnemonicWordlist(jsonObject) {
|
|
152
|
+
return this.client.getMethod('GetMnemonicWordlist')(jsonObject);
|
|
153
|
+
}
|
|
154
|
+
async GetPrivkeyFromExtkey(jsonObject) {
|
|
155
|
+
return this.client.getMethod('GetPrivkeyFromExtkey')(jsonObject);
|
|
156
|
+
}
|
|
157
|
+
async GetPrivkeyFromWif(jsonObject) {
|
|
158
|
+
return this.client.getMethod('GetPrivkeyFromWif')(jsonObject);
|
|
159
|
+
}
|
|
160
|
+
async GetPrivkeyWif(jsonObject) {
|
|
161
|
+
return this.client.getMethod('GetPrivkeyWif')(jsonObject);
|
|
162
|
+
}
|
|
163
|
+
async GetPubkeyFromExtkey(jsonObject) {
|
|
164
|
+
return this.client.getMethod('GetPubkeyFromExtkey')(jsonObject);
|
|
165
|
+
}
|
|
166
|
+
async GetPubkeyFromPrivkey(jsonObject) {
|
|
167
|
+
return this.client.getMethod('GetPubkeyFromPrivkey')(jsonObject);
|
|
168
|
+
}
|
|
169
|
+
async GetWitnessStackNum(jsonObject) {
|
|
170
|
+
return this.client.getMethod('GetWitnessStackNum')(jsonObject);
|
|
171
|
+
}
|
|
172
|
+
async CreateMultisig(jsonObject) {
|
|
173
|
+
return this.client.getMethod('CreateMultisig')(jsonObject);
|
|
174
|
+
}
|
|
175
|
+
async ParseDescriptor(jsonObject) {
|
|
176
|
+
return this.client.getMethod('ParseDescriptor')(jsonObject);
|
|
177
|
+
}
|
|
178
|
+
async ParseScript(jsonObject) {
|
|
179
|
+
return this.client.getMethod('ParseScript')(jsonObject);
|
|
180
|
+
}
|
|
181
|
+
async SelectUtxos(jsonObject) {
|
|
182
|
+
return this.client.getMethod('SelectUtxos')(jsonObject);
|
|
183
|
+
}
|
|
184
|
+
async SerializeLedgerFormat(jsonObject) {
|
|
185
|
+
return this.client.getMethod('SerializeLedgerFormat')(jsonObject);
|
|
186
|
+
}
|
|
187
|
+
async CreateSignatureHash(jsonObject) {
|
|
188
|
+
return this.client.getMethod('CreateSignatureHash')(jsonObject);
|
|
189
|
+
}
|
|
190
|
+
async CreateElementsSignatureHash(jsonObject) {
|
|
191
|
+
return this.client.getMethod('CreateElementsSignatureHash')(jsonObject);
|
|
192
|
+
}
|
|
193
|
+
async SignWithPrivkey(jsonObject) {
|
|
194
|
+
return this.client.getMethod('SignWithPrivkey')(jsonObject);
|
|
195
|
+
}
|
|
196
|
+
async GetSupportedFunction() {
|
|
197
|
+
return this.client.getMethod('GetSupportedFunction')();
|
|
198
|
+
}
|
|
199
|
+
async CreateRawTransaction(jsonObject) {
|
|
200
|
+
return this.client.getMethod('CreateRawTransaction')(jsonObject);
|
|
201
|
+
}
|
|
202
|
+
async UpdateTxOutAmount(jsonObject) {
|
|
203
|
+
return this.client.getMethod('UpdateTxOutAmount')(jsonObject);
|
|
204
|
+
}
|
|
205
|
+
async UpdateWitnessStack(jsonObject) {
|
|
206
|
+
return this.client.getMethod('UpdateWitnessStack')(jsonObject);
|
|
207
|
+
}
|
|
208
|
+
async VerifySign(jsonObject) {
|
|
209
|
+
return this.client.getMethod('VerifySign')(jsonObject);
|
|
210
|
+
}
|
|
211
|
+
async VerifySignature(jsonObject) {
|
|
212
|
+
return this.client.getMethod('VerifySignature')(jsonObject);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
exports.default = Cfd;
|
|
216
|
+
//# sourceMappingURL=Cfd.js.map
|
package/dist/Cfd.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cfd.js","sourceRoot":"","sources":["../lib/Cfd.ts"],"names":[],"mappings":";;AA4IA,MAAqB,GAAG;IAGtB,YAAY,MAAW;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,UAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,UAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,UAAU,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,UAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,UAAU,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,UAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,UAAU,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,UAA0B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,wBAAwB,CAC5B,UAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,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,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC;CACF;AA5ZD,sBA4ZC"}
|
package/dist/Client.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import FinanceProvider from '@atomicfinance/provider';
|
|
2
|
+
import { Client } from '@liquality/client';
|
|
3
|
+
import { Provider } from '@liquality/provider';
|
|
4
|
+
import Cfd from './Cfd';
|
|
5
|
+
import Dlc from './Dlc';
|
|
6
|
+
import Wallet from './Wallet';
|
|
7
|
+
export default class FinanceClient extends Client {
|
|
8
|
+
version: string;
|
|
9
|
+
_dlc: Dlc;
|
|
10
|
+
_cfd: Cfd;
|
|
11
|
+
_financewallet: Wallet;
|
|
12
|
+
identifier: string;
|
|
13
|
+
/**
|
|
14
|
+
* Client
|
|
15
|
+
*/
|
|
16
|
+
constructor(provider?: Provider | FinanceProvider, version?: string);
|
|
17
|
+
get dlc(): Dlc;
|
|
18
|
+
get cfd(): Cfd;
|
|
19
|
+
get financewallet(): Wallet;
|
|
20
|
+
}
|
package/dist/Client.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const client_1 = require("@liquality/client");
|
|
7
|
+
const Cfd_1 = __importDefault(require("./Cfd"));
|
|
8
|
+
const Dlc_1 = __importDefault(require("./Dlc"));
|
|
9
|
+
const Wallet_1 = __importDefault(require("./Wallet"));
|
|
10
|
+
class FinanceClient extends client_1.Client {
|
|
11
|
+
/**
|
|
12
|
+
* Client
|
|
13
|
+
*/
|
|
14
|
+
constructor(provider, version) {
|
|
15
|
+
super(provider, version);
|
|
16
|
+
/**
|
|
17
|
+
* @type {Array}
|
|
18
|
+
*/
|
|
19
|
+
this._providers = [];
|
|
20
|
+
this._dlc = new Dlc_1.default(this);
|
|
21
|
+
this._cfd = new Cfd_1.default(this);
|
|
22
|
+
this._financewallet = new Wallet_1.default(this);
|
|
23
|
+
this.identifier = 'Client';
|
|
24
|
+
}
|
|
25
|
+
get dlc() {
|
|
26
|
+
return this._dlc;
|
|
27
|
+
}
|
|
28
|
+
get cfd() {
|
|
29
|
+
return this._cfd;
|
|
30
|
+
}
|
|
31
|
+
get financewallet() {
|
|
32
|
+
return this._financewallet;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = FinanceClient;
|
|
36
|
+
//# sourceMappingURL=Client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../lib/Client.ts"],"names":[],"mappings":";;;;;AACA,8CAA2C;AAG3C,gDAAwB;AACxB,gDAAwB;AACxB,sDAA8B;AAE9B,MAAqB,aAAc,SAAQ,eAAM;IAO/C;;OAEG;IACH,YAAY,QAAqC,EAAE,OAAgB;QACjE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAEzB;;WAEG;QACH,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QAErB,IAAI,CAAC,IAAI,GAAG,IAAI,aAAG,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,aAAG,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,gBAAM,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF;AApCD,gCAoCC"}
|
package/dist/Dlc.d.ts
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { AddSignaturesToRefundTxRequest, AddSignaturesToRefundTxResponse, AddSignatureToFundTransactionRequest, AddSignatureToFundTransactionResponse, CreateCetAdaptorSignatureRequest, CreateCetAdaptorSignatureResponse, CreateCetAdaptorSignaturesRequest, CreateCetAdaptorSignaturesResponse, CreateCetRequest, CreateCetResponse, CreateDlcTransactionsRequest, CreateDlcTransactionsResponse, CreateFundTransactionRequest, CreateFundTransactionResponse, CreateRefundTransactionRequest, CreateRefundTransactionResponse, GetRawFundTxSignatureRequest, GetRawFundTxSignatureResponse, GetRawRefundTxSignatureRequest, GetRawRefundTxSignatureResponse, Input, SignCetRequest, SignCetResponse, SignFundTransactionRequest, SignFundTransactionResponse, VerifyCetAdaptorSignatureRequest, VerifyCetAdaptorSignatureResponse, VerifyCetAdaptorSignaturesRequest, VerifyCetAdaptorSignaturesResponse, VerifyFundTxSignatureRequest, VerifyFundTxSignatureResponse, VerifyRefundTxSignatureRequest, VerifyRefundTxSignatureResponse } from '@atomicfinance/types';
|
|
2
|
+
import { ContractInfo, DlcAccept, DlcClose, DlcOffer, DlcSign, DlcTransactions, FundingInput, OracleAttestationV0 } from '@node-dlc/messaging';
|
|
3
|
+
import { Tx } from '@node-lightning/bitcoin';
|
|
4
|
+
export default class Dlc {
|
|
5
|
+
client: any;
|
|
6
|
+
constructor(client: any);
|
|
7
|
+
/**
|
|
8
|
+
* Check whether wallet is offerer of DlcOffer or DlcAccept
|
|
9
|
+
* @param dlcOffer Dlc Offer Message
|
|
10
|
+
* @param dlcAccept Dlc Accept Message
|
|
11
|
+
* @returns {Promise<boolean>}
|
|
12
|
+
*/
|
|
13
|
+
isOfferer(dlcOffer: DlcOffer, dlcAccept: DlcAccept): Promise<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Create DLC Offer Message
|
|
16
|
+
* @param contractInfo ContractInfo TLV (V0 or V1)
|
|
17
|
+
* @param offerCollateralSatoshis Amount DLC Initiator is putting into the contract
|
|
18
|
+
* @param feeRatePerVb Fee rate in satoshi per virtual byte that both sides use to compute fees in funding tx
|
|
19
|
+
* @param cetLocktime The nLockTime to be put on CETs
|
|
20
|
+
* @param refundLocktime The nLockTime to be put on the refund transaction
|
|
21
|
+
* @returns {Promise<DlcOffer>}
|
|
22
|
+
*/
|
|
23
|
+
createDlcOffer(contractInfo: ContractInfo, offerCollateralSatoshis: bigint, feeRatePerVb: bigint, cetLocktime: number, refundLocktime: number, fixedInputs?: IInput[]): Promise<DlcOffer>;
|
|
24
|
+
/**
|
|
25
|
+
* Accept DLC Offer
|
|
26
|
+
* @param dlcOffer Dlc Offer Message
|
|
27
|
+
* @param fixedInputs Optional inputs to use for Funding Inputs
|
|
28
|
+
* @returns {Promise<AcceptDlcOfferResponse}
|
|
29
|
+
*/
|
|
30
|
+
acceptDlcOffer(dlcOffer: DlcOffer, fixedInputs?: IInput[]): Promise<AcceptDlcOfferResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Sign Dlc Accept Message
|
|
33
|
+
* @param dlcOffer Dlc Offer Message
|
|
34
|
+
* @param dlcAccept Dlc Accept Message
|
|
35
|
+
* @returns {Promise<SignDlcAcceptResponse}
|
|
36
|
+
*/
|
|
37
|
+
signDlcAccept(dlcOffer: DlcOffer, dlcAccept: DlcAccept): Promise<SignDlcAcceptResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Finalize Dlc Sign
|
|
40
|
+
* @param dlcOffer Dlc Offer Message
|
|
41
|
+
* @param dlcAccept Dlc Accept Message
|
|
42
|
+
* @param dlcSign Dlc Sign Message
|
|
43
|
+
* @param dlcTxs Dlc Transactions Message
|
|
44
|
+
* @returns {Promise<Tx>}
|
|
45
|
+
*/
|
|
46
|
+
finalizeDlcSign(dlcOffer: DlcOffer, dlcAccept: DlcAccept, dlcSign: DlcSign, dlcTxs: DlcTransactions): Promise<Tx>;
|
|
47
|
+
/**
|
|
48
|
+
* Execute DLC
|
|
49
|
+
* @param dlcOffer Dlc Offer Message
|
|
50
|
+
* @param dlcAccept Dlc Accept Message
|
|
51
|
+
* @param dlcSign Dlc Sign Message
|
|
52
|
+
* @param dlcTxs Dlc Transactions Message
|
|
53
|
+
* @param oracleAttestation Oracle Attestations TLV (V0)
|
|
54
|
+
* @param isOfferer Whether party is Dlc Offerer
|
|
55
|
+
* @returns {Promise<Tx>}
|
|
56
|
+
*/
|
|
57
|
+
execute(dlcOffer: DlcOffer, dlcAccept: DlcAccept, dlcSign: DlcSign, dlcTxs: DlcTransactions, oracleAttestation: OracleAttestationV0, isOfferer?: boolean): Promise<Tx>;
|
|
58
|
+
/**
|
|
59
|
+
* Refund DLC
|
|
60
|
+
* @param dlcOffer Dlc Offer Message
|
|
61
|
+
* @param dlcAccept Dlc Accept Message
|
|
62
|
+
* @param dlcSign Dlc Sign Message
|
|
63
|
+
* @param dlcTxs Dlc Transactions message
|
|
64
|
+
* @returns {Promise<Tx>}
|
|
65
|
+
*/
|
|
66
|
+
refund(dlcOffer: DlcOffer, dlcAccept: DlcAccept, dlcSign: DlcSign, dlcTxs: DlcTransactions): Promise<Tx>;
|
|
67
|
+
/**
|
|
68
|
+
* Generate DlcClose messagetype for closing DLC with Mutual Consent
|
|
69
|
+
* @param dlcOffer DlcOffer TLV (V0)
|
|
70
|
+
* @param dlcAccept DlcAccept TLV (V0)
|
|
71
|
+
* @param dlcTxs DlcTransactions TLV (V0)
|
|
72
|
+
* @param initiatorPayoutSatoshis Amount initiator expects as a payout
|
|
73
|
+
* @param isOfferer Whether offerer or not
|
|
74
|
+
* @param inputs Optionally specified closing inputs
|
|
75
|
+
* @returns {Promise<DlcClose>}
|
|
76
|
+
*/
|
|
77
|
+
createDlcClose(dlcOffer: DlcOffer, dlcAccept: DlcAccept, dlcTxs: DlcTransactions, initiatorPayoutSatoshis: bigint, isOfferer?: boolean, inputs?: Input[]): Promise<DlcClose>;
|
|
78
|
+
/**
|
|
79
|
+
* Generate multiple DlcClose messagetypes for closing DLC with Mutual Consent
|
|
80
|
+
* @param dlcOffer DlcOffer TLV (V0)
|
|
81
|
+
* @param dlcAccept DlcAccept TLV (V0)
|
|
82
|
+
* @param dlcTxs DlcTransactions TLV (V0)
|
|
83
|
+
* @param initiatorPayouts Array of amounts initiator expects as payouts
|
|
84
|
+
* @param isOfferer Whether offerer or not
|
|
85
|
+
* @param inputs Optionally specified closing inputs
|
|
86
|
+
* @returns {Promise<DlcClose[]>}
|
|
87
|
+
*/
|
|
88
|
+
createBatchDlcClose(dlcOffer: DlcOffer, dlcAccept: DlcAccept, dlcTxs: DlcTransactions, initiatorPayouts: bigint[], isOfferer?: boolean, inputs?: Input[]): Promise<DlcClose[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Verify multiple DlcClose messagetypes for closing DLC with Mutual Consent
|
|
91
|
+
* @param dlcOffer DlcOffer TLV (V0)
|
|
92
|
+
* @param dlcAccept DlcAccept TLV (V0)
|
|
93
|
+
* @param dlcTxs DlcTransactions TLV (V0)
|
|
94
|
+
* @param dlcCloses DlcClose[] TLV (V0)
|
|
95
|
+
* @param isOfferer Whether offerer or not
|
|
96
|
+
* @returns {Promise<void>}
|
|
97
|
+
*/
|
|
98
|
+
verifyBatchDlcClose(dlcOffer: DlcOffer, dlcAccept: DlcAccept, dlcTxs: DlcTransactions, dlcCloses: DlcClose[], isOfferer?: boolean): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Finalize Dlc Close
|
|
101
|
+
* @param dlcOffer Dlc Offer Message
|
|
102
|
+
* @param dlcAccept Dlc Accept Message
|
|
103
|
+
* @param dlcClose Dlc Close Message
|
|
104
|
+
* @param dlcTxs Dlc Transactions Message
|
|
105
|
+
* @returns {Promise<string>}
|
|
106
|
+
*/
|
|
107
|
+
finalizeDlcClose(dlcOffer: DlcOffer, dlcAccept: DlcAccept, dlcClose: DlcClose, dlcTxs: DlcTransactions): Promise<string>;
|
|
108
|
+
AddSignatureToFundTransaction(jsonObject: AddSignatureToFundTransactionRequest): Promise<AddSignatureToFundTransactionResponse>;
|
|
109
|
+
CreateCetAdaptorSignature(jsonObject: CreateCetAdaptorSignatureRequest): Promise<CreateCetAdaptorSignatureResponse>;
|
|
110
|
+
CreateCetAdaptorSignatures(jsonObject: CreateCetAdaptorSignaturesRequest): Promise<CreateCetAdaptorSignaturesResponse>;
|
|
111
|
+
AddSignaturesToRefundTx(jsonObject: AddSignaturesToRefundTxRequest): Promise<AddSignaturesToRefundTxResponse>;
|
|
112
|
+
CreateCet(jsonObject: CreateCetRequest): Promise<CreateCetResponse>;
|
|
113
|
+
CreateDlcTransactions(jsonObject: CreateDlcTransactionsRequest): Promise<CreateDlcTransactionsResponse>;
|
|
114
|
+
CreateFundTransaction(jsonObject: CreateFundTransactionRequest): Promise<CreateFundTransactionResponse>;
|
|
115
|
+
CreateRefundTransaction(jsonObject: CreateRefundTransactionRequest): Promise<CreateRefundTransactionResponse>;
|
|
116
|
+
GetRawFundTxSignature(jsonObject: GetRawFundTxSignatureRequest): Promise<GetRawFundTxSignatureResponse>;
|
|
117
|
+
GetRawRefundTxSignature(jsonObject: GetRawRefundTxSignatureRequest): Promise<GetRawRefundTxSignatureResponse>;
|
|
118
|
+
SignCetRequest(jsonObject: SignCetRequest): Promise<SignCetResponse>;
|
|
119
|
+
SignFundTransaction(jsonObject: SignFundTransactionRequest): Promise<SignFundTransactionResponse>;
|
|
120
|
+
VerifyCetAdaptorSignature(jsonObject: VerifyCetAdaptorSignatureRequest): Promise<VerifyCetAdaptorSignatureResponse>;
|
|
121
|
+
VerifyCetAdaptorSignaturesRequest(jsonObject: VerifyCetAdaptorSignaturesRequest): Promise<VerifyCetAdaptorSignaturesResponse>;
|
|
122
|
+
VerifyFundTxSignature(jsonObject: VerifyFundTxSignatureRequest): Promise<VerifyFundTxSignatureResponse>;
|
|
123
|
+
VerifyRefundTxSignature(jsonObject: VerifyRefundTxSignatureRequest): Promise<VerifyRefundTxSignatureResponse>;
|
|
124
|
+
fundingInputToInput(_input: FundingInput): Promise<IInput>;
|
|
125
|
+
inputToFundingInput(input: IInput): Promise<FundingInput>;
|
|
126
|
+
}
|
|
127
|
+
export interface AcceptDlcOfferResponse {
|
|
128
|
+
dlcAccept: DlcAccept;
|
|
129
|
+
dlcTransactions: DlcTransactions;
|
|
130
|
+
}
|
|
131
|
+
export interface SignDlcAcceptResponse {
|
|
132
|
+
dlcSign: DlcSign;
|
|
133
|
+
dlcTransactions: DlcTransactions;
|
|
134
|
+
}
|
|
135
|
+
export interface IInput {
|
|
136
|
+
txid: string;
|
|
137
|
+
vout: number;
|
|
138
|
+
address: string;
|
|
139
|
+
amount: number;
|
|
140
|
+
value: number;
|
|
141
|
+
derivationPath?: string;
|
|
142
|
+
maxWitnessLength?: number;
|
|
143
|
+
redeemScript?: string;
|
|
144
|
+
inputSerialId?: bigint;
|
|
145
|
+
scriptPubKey?: string;
|
|
146
|
+
label?: string;
|
|
147
|
+
confirmations?: number;
|
|
148
|
+
spendable?: boolean;
|
|
149
|
+
solvable?: boolean;
|
|
150
|
+
safe?: boolean;
|
|
151
|
+
toUtxo: any;
|
|
152
|
+
}
|