コード例 #1
0
ファイル: UnitTestBase.cs プロジェクト: matejcik/Trezor.Net
        private async Task <string> GetAddressAsync(bool isSegwit, uint coinNumber, bool isChange, uint index, bool display, string coinName = null, bool isPublicKey = false)
        {
            var addressPath  = new BIP44AddressPath(isSegwit, coinNumber, 0, isChange, index);
            var firstAddress = await TrezorManager.GetAddressAsync(addressPath, isPublicKey, display);

            var addressPathString = $"m/{(isSegwit ? 49 : 44)}'/{coinNumber}'/{(isChange ? 1 : 0)}'/{0}/{index}";
            var secondAddress     = await GetAddressAsync(addressPathString);

            Assert.IsTrue(firstAddress == secondAddress, "The parsed version of the address path yielded a different result to the non-parsed version");

            return(secondAddress);
        }
コード例 #2
0
        private static Task <string> GetAddressAsync(bool isSegwit, uint coinNumber, bool isChange, uint index, bool display, string coinName = null, bool isPublicKey = false)
        {
            var addressPath = new AddressPath(isSegwit, coinNumber, 0, isChange, index);

            return(TrezorManager.GetAddressAsync(addressPath, isPublicKey, display));
        }