@@ -6,7 +6,8 @@ import * as LOOP from 'types/generated/loop_pb';
66//
77
88export const lndGetInfo : LND . GetInfoResponse . AsObject = {
9- version : '0.10.0-beta commit=v0.10.0-beta' ,
9+ version : '0.11.0-beta commit=lightning-terminal-v0.1.0-alpha' ,
10+ commitHash : '9d5c264e7f0fd6751aeb41da497923512ac8fbea' ,
1011 identityPubkey : '038b3fc29cfc195c9b190d86ad2d40ce7550a5c6f13941f53c7d7ac5b25c912a6c' ,
1112 alias : 'alice' ,
1213 color : '#cccccc' ,
@@ -105,9 +106,12 @@ export const lndChannel: LND.Channel.AsObject = {
105106 localChanReserveSat : 150000 ,
106107 remoteChanReserveSat : 150000 ,
107108 staticRemoteKey : true ,
109+ commitmentType : LND . CommitmentType . STATIC_REMOTE_KEY ,
108110 lifetime : 21802 ,
109111 uptime : 21802 ,
110112 closeAddress : '' ,
113+ pushAmountSat : 5000000 ,
114+ thawHeight : 0 ,
111115} ;
112116
113117export const lndListChannelsMany : LND . ListChannelsResponse . AsObject = {
@@ -149,6 +153,9 @@ export const lndChannelEvent: Required<LND.ChannelEventUpdate.AsObject> = {
149153 remotePubkey : '030e98fdacf2464bdfb027b866a018d6cdc5108514208988873abea7eff59afd91' ,
150154 settledBalance : 12990950 ,
151155 timeLockedBalance : 0 ,
156+ openInitiator : 1 ,
157+ closeInitiator : 1 ,
158+ resolutionsList : [ ] ,
152159 } ,
153160 activeChannel : {
154161 fundingTxidBytes : txIdBytes ,
@@ -160,6 +167,10 @@ export const lndChannelEvent: Required<LND.ChannelEventUpdate.AsObject> = {
160167 fundingTxidStr : '' ,
161168 outputIndex : outIndex ,
162169 } ,
170+ pendingOpenChannel : {
171+ txid : '1f765f45f2a6d33837a203e3fc911915c891e9b86f9c9d91a1931b92efdedf5b' ,
172+ outputIndex : 0 ,
173+ } ,
163174} ;
164175
165176export const lndTransaction : LND . Transaction . AsObject = {
@@ -176,6 +187,7 @@ export const lndTransaction: LND.Transaction.AsObject = {
176187 timeStamp : 1591226124 ,
177188 totalFees : 0 ,
178189 txHash : '1f765f45f2a6d33837a203e3fc911915c891e9b86f9c9d91a1931b92efdedf5b' ,
190+ label : '' ,
179191} ;
180192
181193export const lndGetChanInfo : Required < LND . ChannelEdge . AsObject > = {
@@ -216,6 +228,7 @@ export const loopListSwaps: LOOP.ListSwapsResponse.AsObject = {
216228 idBytes : '9OsRg4PCsJ2MconOIcJZAM+0VF1GxH7SOjGtKqV86DU=' ,
217229 type : ( i % 3 ) as LOOP . SwapStatus . AsObject [ 'type' ] ,
218230 state : i % 2 ? LOOP . SwapState . SUCCESS : LOOP . SwapState . FAILED ,
231+ failureReason : ( i % 2 === 0 ? 0 : i % 7 ) as LOOP . SwapStatus . AsObject [ 'failureReason' ] ,
219232 initiationTime : 1586390353623905000 + i * 100000000000000 ,
220233 lastUpdateTime : 1586398369729857000 + i * 200000000000000 ,
221234 htlcAddress : 'bcrt1qzu4077erkr78k52yuf2rwkk6ayr6m3wtazdfz2qqmd7taa5vvy9s5d75gd' ,
@@ -224,28 +237,43 @@ export const loopListSwaps: LOOP.ListSwapsResponse.AsObject = {
224237 costServer : 66 ,
225238 costOnchain : 6812 ,
226239 costOffchain : 2 ,
240+ label : `Sample Swap #${ i + 1 } ` ,
227241 } ) ) ,
228242} ;
229243
230- export const loopTerms : LOOP . TermsResponse . AsObject = {
244+ export const loopOutTerms : LOOP . OutTermsResponse . AsObject = {
245+ minSwapAmount : 250000 ,
246+ maxSwapAmount : 1000000 ,
247+ minCltvDelta : 20 ,
248+ maxCltvDelta : 60 ,
249+ } ;
250+
251+ export const loopInTerms : LOOP . InTermsResponse . AsObject = {
231252 minSwapAmount : 250000 ,
232253 maxSwapAmount : 1000000 ,
233254} ;
234255
235- export const loopQuote : LOOP . QuoteResponse . AsObject = {
256+ export const loopOutQuote : LOOP . OutQuoteResponse . AsObject = {
236257 cltvDelta : 50 ,
237- minerFee : 7387 ,
238- prepayAmt : 1337 ,
239- swapFee : 83 ,
258+ htlcSweepFeeSat : 7387 ,
259+ prepayAmtSat : 1337 ,
260+ swapFeeSat : 83 ,
240261 swapPaymentDest : 'Au1a9/hEsbxHUOwFC1QwxZq6EnnKYtpAdc74OZK8/syU' ,
241262} ;
242263
264+ export const loopInQuote : LOOP . InQuoteResponse . AsObject = {
265+ cltvDelta : 50 ,
266+ htlcPublishFeeSat : 7387 ,
267+ swapFeeSat : 83 ,
268+ } ;
269+
243270export const loopSwapResponse : LOOP . SwapResponse . AsObject = {
244271 htlcAddress : 'bcrt1qkjct8aqxfwyla50mfxdnzlmuphg3zwuz2zmuy99c9sw67xj7tn2sfkflhw' ,
245272 htlcAddressNp2wsh : '' ,
246273 htlcAddressP2wsh : 'bcrt1qkjct8aqxfwyla50mfxdnzlmuphg3zwuz2zmuy99c9sw67xj7tn2sfkflhw' ,
247274 id : '18e17a2f44efc7f344ef6330281765e569315f93d3eaf9b0f959b404836e3480' ,
248275 idBytes : 'GOF6L0Tvx/NE72MwKBdl5WkxX5PT6vmw+Vm0BINuNIA=' ,
276+ serverMessage : 'Loop, there it is!' ,
249277} ;
250278
251279// collection of sample API responses
@@ -257,10 +285,10 @@ export const sampleApiResponses: Record<string, any> = {
257285 'lnrpc.Lightning.WalletBalance' : lndWalletBalance ,
258286 'lnrpc.Lightning.ListChannels' : lndListChannels ,
259287 'looprpc.SwapClient.ListSwaps' : loopListSwaps ,
260- 'looprpc.SwapClient.LoopOutTerms' : loopTerms ,
261- 'looprpc.SwapClient.GetLoopInTerms' : loopTerms ,
262- 'looprpc.SwapClient.LoopOutQuote' : loopQuote ,
263- 'looprpc.SwapClient.GetLoopInQuote' : loopQuote ,
288+ 'looprpc.SwapClient.LoopOutTerms' : loopOutTerms ,
289+ 'looprpc.SwapClient.GetLoopInTerms' : loopInTerms ,
290+ 'looprpc.SwapClient.LoopOutQuote' : loopOutQuote ,
291+ 'looprpc.SwapClient.GetLoopInQuote' : loopInQuote ,
264292 'looprpc.SwapClient.LoopIn' : loopSwapResponse ,
265293 'looprpc.SwapClient.LoopOut' : loopSwapResponse ,
266294} ;
0 commit comments