diff --git a/example/tests/eclair.ts b/example/tests/eclair.ts index b1b4ae5b..d780c4a6 100644 --- a/example/tests/eclair.ts +++ b/example/tests/eclair.ts @@ -128,10 +128,13 @@ describe('Eclair', function () { // network: ldkNetwork(selectedNetwork), getFees: () => { return Promise.resolve({ - highPriority: 30, - normal: 20, - background: 10, - mempoolMinimum: 5, + onChainSweep: 30, + maxAllowedNonAnchorChannelRemoteFee: Math.max(25, 30 * 10), + minAllowedAnchorChannelRemoteFee: 5, + minAllowedNonAnchorChannelRemoteFee: Math.max(5 - 1, 0), + anchorChannelFee: 10, + nonAnchorChannelFee: 20, + channelCloseMinimum: 5, }); }, }); diff --git a/example/tests/unit.ts b/example/tests/unit.ts index 9dd02f96..d89550dc 100644 --- a/example/tests/unit.ts +++ b/example/tests/unit.ts @@ -55,7 +55,11 @@ describe('Unit', function () { hex: '000000205d1f3ece3bcb0a3530adaae2e4aa47f8aad434db95c6cb6d09d5ac99e3f6df4f0a19fe968830a06dcc49c9cca4acc532226e4c30b741802420e0fdd2b092eccdbf95cb64ffff7f2000000000', }), account, - getAddress: async () => 'bcrt1qtk89me2ae95dmlp3yfl4q9ynpux8mxjus4s872', + getAddress: async () => ({ + address: 'bcrt1qtk89me2ae95dmlp3yfl4q9ynpux8mxjus4s872', + publicKey: + '0298720ece754e377af1b2716256e63c2e2427ff6ebdc66c2071c43ae80132ca32', + }), getScriptPubKeyHistory: async () => [], getFees: () => { return Promise.resolve({ diff --git a/example/tests/utils/test-profile.ts b/example/tests/utils/test-profile.ts index d9236906..8d9f69cd 100644 --- a/example/tests/utils/test-profile.ts +++ b/example/tests/utils/test-profile.ts @@ -5,6 +5,7 @@ import * as bitcoin from 'bitcoinjs-lib'; import { randomBytes } from 'react-native-randombytes'; import { Platform } from 'react-native'; import { + IAddress, TAccount, TAvailableNetworks, THeader, @@ -71,10 +72,13 @@ export default class TestProfile { getScriptPubKeyHistory: this.getScriptPubKeyHistory, getFees: () => Promise.resolve({ - highPriority: 4, - normal: 3, - background: 2, - mempoolMinimum: 1, + onChainSweep: 4, + maxAllowedNonAnchorChannelRemoteFee: Math.max(25, 4 * 10), + minAllowedAnchorChannelRemoteFee: 1, + minAllowedNonAnchorChannelRemoteFee: Math.max(1 - 1, 0), + anchorChannelFee: 2, + nonAnchorChannelFee: 3, + channelCloseMinimum: 1, }), getTransactionData: this.getTransactionData, getTransactionPosition: this.getTransactionPosition, @@ -82,6 +86,12 @@ export default class TestProfile { network: ldkNetwork(this.network), // forceCloseOnStartup: { forceClose: true, broadcastLatestTx: false }, forceCloseOnStartup: undefined, + // trustedZeroConfPeers: [], + backupServerDetails: { + host: 'https://blocktank.synonym.to/staging-backups-ldk', + serverPubKey: + '02c03b8b8c1b5500b622646867d99bf91676fac0f38e2182c91a9ff0d053a21d6d', + }, }; }; @@ -104,7 +114,7 @@ export default class TestProfile { return { name: this.name, seed: this.seed }; }; - public getAddress = async (): Promise => { + public getAddress = async (): Promise => { const network = getNetwork(this.network); const mnemonic = bip39.entropyToMnemonic(this.seed); const mnemonicSeed = await bip39.mnemonicToSeed(mnemonic); @@ -117,7 +127,10 @@ export default class TestProfile { if (!address) { throw new Error('Failed to generate address'); } - return address; + return { + address: address, + publicKey: keyPair.publicKey.toString('hex'), + }; }; public getScriptPubKeyHistory = async (