// SPDX-FileCopyrightText: 2024 Chris Duncan <chris@zoso.dev>
// SPDX-License-Identifier: GPL-3.0-or-later
+/**
+* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+*
+* Do not send any funds to the test vectors below!
+*
+* Sources:
+* https://docs.nano.org/integration-guides/key-management/
+* https://github.com/trezor/python-mnemonic/blob/master/vectors.json
+* https://tools.nanos.cc/?tool=seed
+*/
export const GENESIS_ADDRESS = 'nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3'
export const RAW_MAX = '340282366920938463463374607431768211455'
export const SUPPLY_MAX = '133248297920938463463374607431768211455'
import { NANO_TEST_VECTORS } from './TEST_VECTORS.js'\r
import { Bip44Wallet, Blake2bWallet, LedgerWallet } from '../dist/main.js'\r
\r
-// WARNING: Do not send any funds to the test vectors below\r
-// Test vectors from https://docs.nano.org/integration-guides/key-management/ and elsewhere\r
describe('creating a new wallet', async () => {\r
-\r
it('BIP-44 wallet with random entropy', async () => {\r
const wallet = await Bip44Wallet.create(NANO_TEST_VECTORS.PASSWORD)\r
await wallet.unlock(NANO_TEST_VECTORS.PASSWORD)\r
import { NANO_TEST_VECTORS } from './TEST_VECTORS.js'\r
import { Bip44Wallet, Blake2bWallet, LedgerWallet } from '../dist/main.js'\r
\r
-// WARNING: Do not send any funds to the test vectors below\r
-// Test vectors from https://docs.nano.org/integration-guides/key-management/ and elsewhere\r
describe('derive child accounts from the same seed', async function () {\r
const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED)\r
await wallet.unlock(NANO_TEST_VECTORS.PASSWORD)\r
import { BIP32_TEST_VECTORS, CUSTOM_TEST_VECTORS, NANO_TEST_VECTORS, TREZOR_TEST_VECTORS } from './TEST_VECTORS.js'\r
import { Account, Bip44Wallet, Blake2bWallet } from '../dist/main.js'\r
\r
-// WARNING: Do not send any funds to the test vectors below\r
-// Test vectors from https://docs.nano.org/integration-guides/key-management/ and elsewhere\r
describe('import wallet with test vectors test', () => {\r
it('should successfully import a wallet with the official Nano test vectors mnemonic', async () => {\r
const wallet = await Bip44Wallet.fromMnemonic(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.MNEMONIC, NANO_TEST_VECTORS.PASSWORD)\r
\r
const skip = false\r
\r
-// WARNING: Do not send any funds to the test vectors below\r
-// Test vectors from https://docs.nano.org/integration-guides/key-management/ and elsewhere\r
describe('locking and unlocking a Bip44Wallet', { skip }, async () => {\r
it('should succeed with a password', async () => {\r
const wallet = await Bip44Wallet.fromMnemonic(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.MNEMONIC, NANO_TEST_VECTORS.PASSWORD)\r
import { NANO_TEST_VECTORS } from './TEST_VECTORS.js'
import { Account, Bip44Wallet, Rpc } from '../dist/main.js'
-// WARNING: Do not send any funds to the test vectors below
-// Test vectors from https://docs.nano.org/integration-guides/key-management/ and elsewhere
-
const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED)
await wallet.unlock(NANO_TEST_VECTORS.PASSWORD)
const node = new Rpc(process.env.NODE_URL, process.env.API_KEY_NAME, process.env.API_KEY_VALUE)
import { NANO_TEST_VECTORS } from './TEST_VECTORS.js'\r
import { SendBlock, ReceiveBlock, ChangeBlock } from '../dist/main.js'\r
\r
-// WARNING: Do not send any funds to the test vectors below\r
-// Test vectors from https://docs.nano.org/integration-guides/key-management/\r
describe('valid blocks', async () => {\r
it('should not allow negative balances', async () => {\r
assert.throws(() => {\r