-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds bitcoin xpub support * fix xpub handling * adds eslint ignore * bump to v3.3.0 (#598) * bump to v3.3.0 * Update docs-build-deploy.yml --------- Co-authored-by: Tomek Marciniak <[email protected]>
- Loading branch information
Showing
8 changed files
with
44 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule e2e
added at
dcb9e6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* eslint-disable quotes */ | ||
import { question } from 'readline-sync'; | ||
import { fetchAddressesByDerivationPath, pair } from '../../api'; | ||
import { setupClient } from '../utils/setup'; | ||
import { LatticeGetAddressesFlag } from '../../protocol'; | ||
|
||
describe('XPUB', () => { | ||
test('pair', async () => { | ||
const isPaired = await setupClient(); | ||
if (!isPaired) { | ||
const secret = question('Please enter the pairing secret: '); | ||
console.log('secret', secret); | ||
await pair(secret.toUpperCase()); | ||
} | ||
}); | ||
|
||
test('fetch bitcoin xpub', async () => { | ||
const xpub = await fetchAddressesByDerivationPath("44'/0'/0'", { | ||
flag: LatticeGetAddressesFlag.secp256k1Xpub, | ||
}); | ||
expect(xpub).toHaveLength(1); | ||
expect(xpub[0].startsWith('xpub')).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters