9 lines
394 B
TypeScript
9 lines
394 B
TypeScript
export const rpcClient = {
|
|
async call({ method }: { method: string }) {
|
|
await new Promise(resolve => setTimeout(resolve, 700))
|
|
if (method === 'lnd.getinfo') return { identity_pubkey: '02' + 'a'.repeat(64), synced_to_chain: true }
|
|
if (method === 'lnd.connectpeer') return { connected: true }
|
|
throw new Error('Preview only: channel mutations and payments are disabled.')
|
|
},
|
|
}
|