multichain-address-validator 0.7.6 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/chain-validators.js +7 -3
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/types.d.ts +1 -0
- package/dist/cjs/validators/ripple_validator.d.ts +1 -0
- package/dist/cjs/validators/ripple_validator.js +3 -0
- package/dist/cjs/validators/solana_validator.js +7 -1
- package/dist/cjs/validators/xlm_validator.d.ts +1 -0
- package/dist/cjs/validators/xlm_validator.js +3 -0
- package/dist/esm/chain-validators.js +7 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/types.d.ts +1 -0
- package/dist/esm/validators/ripple_validator.d.ts +1 -0
- package/dist/esm/validators/ripple_validator.js +3 -0
- package/dist/esm/validators/solana_validator.js +7 -1
- package/dist/esm/validators/xlm_validator.d.ts +1 -0
- package/dist/esm/validators/xlm_validator.js +3 -0
- package/package.json +1 -1
- package/src/chain-validators.ts +7 -3
- package/src/index.ts +10 -1
- package/src/types.ts +1 -0
- package/src/validators/ripple_validator.ts +4 -0
- package/src/validators/solana_validator.ts +10 -1
- package/src/validators/xlm_validator.ts +4 -0
- package/test/addresses/addresses.ts +1 -2
- package/test/addresses/btc-testnet.json +3 -1
- package/test/addresses/doge.json +2 -1
- package/test/addresses/ltc-testnet.json +2 -1
- package/test/addresses/ltc.json +2 -1
- package/test/addresses/ripple.json +1 -1
- package/test/addresses/solana.json +5 -1
- package/test/addresses/xlm.json +1 -1
- package/test/multichain-address-validator.test.ts +50 -8
|
@@ -62,6 +62,7 @@ const chainValidators = {
|
|
|
62
62
|
'EthereumPow',
|
|
63
63
|
'erc20',
|
|
64
64
|
'flare',
|
|
65
|
+
'optimism',
|
|
65
66
|
'sonic',
|
|
66
67
|
'story',
|
|
67
68
|
],
|
|
@@ -97,9 +98,12 @@ const chainValidators = {
|
|
|
97
98
|
alternatives: ['xrp'],
|
|
98
99
|
validator: index_js_1.RippleValidator,
|
|
99
100
|
},
|
|
100
|
-
sia: {
|
|
101
|
+
sia: {
|
|
102
|
+
alternatives: ['SiaCoin'],
|
|
103
|
+
validator: index_js_1.SiaValidator
|
|
104
|
+
},
|
|
101
105
|
solana: {
|
|
102
|
-
alternatives: ['spl'],
|
|
106
|
+
alternatives: ['sol', 'spl'],
|
|
103
107
|
validator: index_js_1.SolanaValidator,
|
|
104
108
|
},
|
|
105
109
|
sui: { validator: index_js_1.MoveValidator },
|
|
@@ -109,7 +113,7 @@ const chainValidators = {
|
|
|
109
113
|
},
|
|
110
114
|
tezos: { validator: index_js_1.TezosValidator },
|
|
111
115
|
xlm: {
|
|
112
|
-
alternatives: ['stellar'],
|
|
116
|
+
alternatives: ['stellar', 'stellarlumens'],
|
|
113
117
|
validator: index_js_1.XLMValidator,
|
|
114
118
|
},
|
|
115
119
|
};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Address, Chain, NetworkType } from './types.js';
|
|
2
2
|
export declare function validate(address: Address, chain: Chain): boolean;
|
|
3
|
+
export declare function validateMemo(memo: string, chain: Chain): boolean;
|
|
3
4
|
export type { Address, Chain };
|
|
4
5
|
export { NetworkType };
|
|
5
6
|
declare const _default: {
|
package/dist/cjs/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NetworkType = void 0;
|
|
4
4
|
exports.validate = validate;
|
|
5
|
+
exports.validateMemo = validateMemo;
|
|
5
6
|
const types_js_1 = require("./types.js");
|
|
6
7
|
Object.defineProperty(exports, "NetworkType", { enumerable: true, get: function () { return types_js_1.NetworkType; } });
|
|
7
8
|
const chain_validators_js_1 = require("./chain-validators.js");
|
|
@@ -12,6 +13,13 @@ function validate(address, chain) {
|
|
|
12
13
|
}
|
|
13
14
|
return validator.isValidAddress(address);
|
|
14
15
|
}
|
|
16
|
+
function validateMemo(memo, chain) {
|
|
17
|
+
const validator = (0, chain_validators_js_1.getValidatorForChain)(chain);
|
|
18
|
+
if (!validator) {
|
|
19
|
+
throw new Error(`Missing validator for chain: ${chain}`);
|
|
20
|
+
}
|
|
21
|
+
return validator.isValidMemo?.(memo) ?? true;
|
|
22
|
+
}
|
|
15
23
|
exports.default = {
|
|
16
24
|
validate
|
|
17
25
|
};
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ exports.default = {
|
|
|
19
19
|
const validAddress = regexp.test(addr) && this.verifyChecksum(addr);
|
|
20
20
|
return validAddress && this.verifyMemo(memo);
|
|
21
21
|
},
|
|
22
|
+
isValidMemo(memo) {
|
|
23
|
+
return this.verifyMemo(memo);
|
|
24
|
+
},
|
|
22
25
|
verifyMemo(memo) {
|
|
23
26
|
if (!memo)
|
|
24
27
|
return true; // Optional
|
|
@@ -5,11 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const base58_validator_js_1 = __importDefault(require("./base58_validator.js"));
|
|
7
7
|
const helpers_js_1 = require("../helpers.js");
|
|
8
|
+
const base58_js_1 = __importDefault(require("../crypto/base58.js"));
|
|
8
9
|
exports.default = {
|
|
9
10
|
isValidAddress: function (address) {
|
|
10
|
-
|
|
11
|
+
const validBase58 = base58_validator_js_1.default.isValidAddress((0, helpers_js_1.getAddress)(address), {
|
|
11
12
|
maxLength: 44,
|
|
12
13
|
minLength: 43,
|
|
13
14
|
});
|
|
15
|
+
if (!validBase58) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
// solana address must be 32 bytes
|
|
19
|
+
return base58_js_1.default.decode((0, helpers_js_1.getAddress)(address)).length === 32;
|
|
14
20
|
}
|
|
15
21
|
};
|
|
@@ -23,6 +23,9 @@ exports.default = {
|
|
|
23
23
|
const validAddress = regexp.test(addr) && this.verifyChecksum(addr);
|
|
24
24
|
return validAddress && this.verifyMemo(memo);
|
|
25
25
|
},
|
|
26
|
+
isValidMemo(memo) {
|
|
27
|
+
return this.verifyMemo(memo);
|
|
28
|
+
},
|
|
26
29
|
verifyMemo(memo) {
|
|
27
30
|
if (!memo)
|
|
28
31
|
return true; // Optional
|
|
@@ -59,6 +59,7 @@ const chainValidators = {
|
|
|
59
59
|
'EthereumPow',
|
|
60
60
|
'erc20',
|
|
61
61
|
'flare',
|
|
62
|
+
'optimism',
|
|
62
63
|
'sonic',
|
|
63
64
|
'story',
|
|
64
65
|
],
|
|
@@ -94,9 +95,12 @@ const chainValidators = {
|
|
|
94
95
|
alternatives: ['xrp'],
|
|
95
96
|
validator: RippleValidator,
|
|
96
97
|
},
|
|
97
|
-
sia: {
|
|
98
|
+
sia: {
|
|
99
|
+
alternatives: ['SiaCoin'],
|
|
100
|
+
validator: SiaValidator
|
|
101
|
+
},
|
|
98
102
|
solana: {
|
|
99
|
-
alternatives: ['spl'],
|
|
103
|
+
alternatives: ['sol', 'spl'],
|
|
100
104
|
validator: SolanaValidator,
|
|
101
105
|
},
|
|
102
106
|
sui: { validator: MoveValidator },
|
|
@@ -106,7 +110,7 @@ const chainValidators = {
|
|
|
106
110
|
},
|
|
107
111
|
tezos: { validator: TezosValidator },
|
|
108
112
|
xlm: {
|
|
109
|
-
alternatives: ['stellar'],
|
|
113
|
+
alternatives: ['stellar', 'stellarlumens'],
|
|
110
114
|
validator: XLMValidator,
|
|
111
115
|
},
|
|
112
116
|
};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Address, Chain, NetworkType } from './types.js';
|
|
2
2
|
export declare function validate(address: Address, chain: Chain): boolean;
|
|
3
|
+
export declare function validateMemo(memo: string, chain: Chain): boolean;
|
|
3
4
|
export type { Address, Chain };
|
|
4
5
|
export { NetworkType };
|
|
5
6
|
declare const _default: {
|
package/dist/esm/index.js
CHANGED
|
@@ -7,6 +7,13 @@ export function validate(address, chain) {
|
|
|
7
7
|
}
|
|
8
8
|
return validator.isValidAddress(address);
|
|
9
9
|
}
|
|
10
|
+
export function validateMemo(memo, chain) {
|
|
11
|
+
const validator = getValidatorForChain(chain);
|
|
12
|
+
if (!validator) {
|
|
13
|
+
throw new Error(`Missing validator for chain: ${chain}`);
|
|
14
|
+
}
|
|
15
|
+
return validator.isValidMemo?.(memo) ?? true;
|
|
16
|
+
}
|
|
10
17
|
export { NetworkType };
|
|
11
18
|
export default {
|
|
12
19
|
validate
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export default {
|
|
|
14
14
|
const validAddress = regexp.test(addr) && this.verifyChecksum(addr);
|
|
15
15
|
return validAddress && this.verifyMemo(memo);
|
|
16
16
|
},
|
|
17
|
+
isValidMemo(memo) {
|
|
18
|
+
return this.verifyMemo(memo);
|
|
19
|
+
},
|
|
17
20
|
verifyMemo(memo) {
|
|
18
21
|
if (!memo)
|
|
19
22
|
return true; // Optional
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import base58Validator from './base58_validator.js';
|
|
2
2
|
import { getAddress } from '../helpers.js';
|
|
3
|
+
import base58 from '../crypto/base58.js';
|
|
3
4
|
export default {
|
|
4
5
|
isValidAddress: function (address) {
|
|
5
|
-
|
|
6
|
+
const validBase58 = base58Validator.isValidAddress(getAddress(address), {
|
|
6
7
|
maxLength: 44,
|
|
7
8
|
minLength: 43,
|
|
8
9
|
});
|
|
10
|
+
if (!validBase58) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
// solana address must be 32 bytes
|
|
14
|
+
return base58.decode(getAddress(address)).length === 32;
|
|
9
15
|
}
|
|
10
16
|
};
|
|
@@ -18,6 +18,9 @@ export default {
|
|
|
18
18
|
const validAddress = regexp.test(addr) && this.verifyChecksum(addr);
|
|
19
19
|
return validAddress && this.verifyMemo(memo);
|
|
20
20
|
},
|
|
21
|
+
isValidMemo(memo) {
|
|
22
|
+
return this.verifyMemo(memo);
|
|
23
|
+
},
|
|
21
24
|
verifyMemo(memo) {
|
|
22
25
|
if (!memo)
|
|
23
26
|
return true; // Optional
|
package/package.json
CHANGED
package/src/chain-validators.ts
CHANGED
|
@@ -90,6 +90,7 @@ const chainValidators: ChainValidators = {
|
|
|
90
90
|
'EthereumPow',
|
|
91
91
|
'erc20',
|
|
92
92
|
'flare',
|
|
93
|
+
'optimism',
|
|
93
94
|
'sonic',
|
|
94
95
|
'story',
|
|
95
96
|
],
|
|
@@ -125,9 +126,12 @@ const chainValidators: ChainValidators = {
|
|
|
125
126
|
alternatives: ['xrp'],
|
|
126
127
|
validator: RippleValidator,
|
|
127
128
|
},
|
|
128
|
-
sia: {
|
|
129
|
+
sia: {
|
|
130
|
+
alternatives: ['SiaCoin'],
|
|
131
|
+
validator: SiaValidator
|
|
132
|
+
},
|
|
129
133
|
solana: {
|
|
130
|
-
alternatives: ['spl'],
|
|
134
|
+
alternatives: ['sol','spl'],
|
|
131
135
|
validator: SolanaValidator,
|
|
132
136
|
},
|
|
133
137
|
sui: {validator: MoveValidator},
|
|
@@ -137,7 +141,7 @@ const chainValidators: ChainValidators = {
|
|
|
137
141
|
},
|
|
138
142
|
tezos: {validator: TezosValidator},
|
|
139
143
|
xlm: {
|
|
140
|
-
alternatives: ['stellar'],
|
|
144
|
+
alternatives: ['stellar', 'stellarlumens'],
|
|
141
145
|
validator: XLMValidator,
|
|
142
146
|
},
|
|
143
147
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Address, Chain, NetworkType} from './types.js'
|
|
2
2
|
import {getValidatorForChain} from './chain-validators.js'
|
|
3
3
|
|
|
4
|
-
export function validate(address: Address, chain: Chain) {
|
|
4
|
+
export function validate(address: Address, chain: Chain): boolean {
|
|
5
5
|
const validator = getValidatorForChain(chain)
|
|
6
6
|
if (!validator) {
|
|
7
7
|
throw new Error(`Missing validator for chain: ${chain}`);
|
|
@@ -10,6 +10,15 @@ export function validate(address: Address, chain: Chain) {
|
|
|
10
10
|
return validator.isValidAddress(address);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
export function validateMemo(memo: string, chain: Chain): boolean {
|
|
14
|
+
const validator = getValidatorForChain(chain)
|
|
15
|
+
if (!validator) {
|
|
16
|
+
throw new Error(`Missing validator for chain: ${chain}`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return validator.isValidMemo?.(memo) ?? true
|
|
20
|
+
}
|
|
21
|
+
|
|
13
22
|
export type { Address, Chain }
|
|
14
23
|
export { NetworkType }
|
|
15
24
|
|
package/src/types.ts
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import base58Validator from './base58_validator.js';
|
|
2
2
|
import {Address} from '../types.js'
|
|
3
3
|
import {getAddress} from '../helpers.js'
|
|
4
|
+
import {Buffer} from 'buffer'
|
|
5
|
+
import base58 from '../crypto/base58.js'
|
|
4
6
|
|
|
5
7
|
export default {
|
|
6
8
|
isValidAddress: function (address: Address) {
|
|
7
|
-
|
|
9
|
+
const validBase58 = base58Validator.isValidAddress(getAddress(address), {
|
|
8
10
|
maxLength: 44,
|
|
9
11
|
minLength: 43,
|
|
10
12
|
})
|
|
13
|
+
|
|
14
|
+
if (!validBase58) {
|
|
15
|
+
return false
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// solana address must be 32 bytes
|
|
19
|
+
return base58.decode(getAddress(address)).length === 32
|
|
11
20
|
}
|
|
12
21
|
};
|
|
@@ -24,9 +24,8 @@ import sui from './sui.json'
|
|
|
24
24
|
import tezos from './tezos.json'
|
|
25
25
|
import tron from './tron.json'
|
|
26
26
|
import xlm from './xlm.json'
|
|
27
|
-
import {Address} from '../../src'
|
|
28
27
|
|
|
29
|
-
export type TestAddress =
|
|
28
|
+
export type TestAddress = string | { address: string, memo?: string } & { invalid?: boolean, invalidMemo?: boolean }
|
|
30
29
|
|
|
31
30
|
const testAddresses: Record<string, TestAddress[]> = {
|
|
32
31
|
aptos,
|
|
@@ -7,5 +7,7 @@
|
|
|
7
7
|
"tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7",
|
|
8
8
|
"GSa5espVLNseXEfKt46zEdS6jrPkmFghBU",
|
|
9
9
|
"tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7",
|
|
10
|
-
"tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy"
|
|
10
|
+
"tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy",
|
|
11
|
+
"mxHzYDeCZD8qzvfVzTqPS65p23inGkRvXT",
|
|
12
|
+
"2N3ATmqPqnHR243HiwtqpCFwSsNdTiCvmmv"
|
|
11
13
|
]
|
package/test/addresses/doge.json
CHANGED
package/test/addresses/ltc.json
CHANGED
|
@@ -4,5 +4,9 @@
|
|
|
4
4
|
"HgyXhqapicB8zoyyFQ23oUwwFrBACDyDc7bqUuvnEELM",
|
|
5
5
|
"833XorXTTx5iya5B3Tr6iqEs9GbRuvVfwyLCP2vpdzhq",
|
|
6
6
|
"69UwBV4LPg7hHUS5JXiXyfgVnESmDKe8KJppsLj8pRU",
|
|
7
|
-
"G4qGCGF4vWGPzYi2pxc2Djvgv3j8NiWaHQMgTVebCX6W"
|
|
7
|
+
"G4qGCGF4vWGPzYi2pxc2Djvgv3j8NiWaHQMgTVebCX6W",
|
|
8
|
+
{
|
|
9
|
+
"address": "3Yu3ULPjVc4QqS349VCs22br9zH9T6MWNnSM9RBimkw",
|
|
10
|
+
"invalid": true
|
|
11
|
+
}
|
|
8
12
|
]
|
package/test/addresses/xlm.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {describe, it} from 'mocha'
|
|
2
2
|
import {expect} from 'chai'
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {Chain, NetworkType, validate, validateMemo} from '../src'
|
|
5
5
|
// @ts-ignore
|
|
6
6
|
import addresses, {TestAddress} from './addresses/addresses'
|
|
7
7
|
|
|
8
8
|
function check(address: TestAddress, chain: Chain) {
|
|
9
|
-
address
|
|
9
|
+
if (typeof address === 'string') {
|
|
10
|
+
return valid(address, chain)
|
|
11
|
+
}
|
|
12
|
+
(address.invalid || address.invalidMemo)
|
|
10
13
|
? invalid(address, chain)
|
|
11
14
|
: valid(address, chain)
|
|
12
15
|
}
|
|
@@ -21,6 +24,31 @@ function invalid(address: TestAddress, chain: Chain) {
|
|
|
21
24
|
expect({address, chain, valid}).to.deep.equal({address, chain, valid: false});
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
function checkMemo(address: TestAddress, chain: Chain) {
|
|
28
|
+
if (typeof address === 'string') {
|
|
29
|
+
return
|
|
30
|
+
}
|
|
31
|
+
address.invalidMemo
|
|
32
|
+
? invalidMemo(address.memo, chain)
|
|
33
|
+
: validMemo(address.memo, chain)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function validMemo(memo: string | undefined, chain: Chain) {
|
|
37
|
+
if (!memo) {
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
const valid = validateMemo(memo, chain);
|
|
41
|
+
expect({memo, chain, valid}).to.deep.equal({memo, chain, valid: true});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function invalidMemo(memo: string | undefined, chain: Chain) {
|
|
45
|
+
if (!memo) {
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
const valid = validateMemo(memo, chain);
|
|
49
|
+
expect({memo, chain, valid}).to.deep.equal({memo, chain, valid: false});
|
|
50
|
+
}
|
|
51
|
+
|
|
24
52
|
interface TestCase {
|
|
25
53
|
alternatives: string[],
|
|
26
54
|
testAddresses: keyof typeof addresses,
|
|
@@ -73,7 +101,21 @@ const TestCases: Record<string, TestCase> = {
|
|
|
73
101
|
testAddresses: 'eos',
|
|
74
102
|
},
|
|
75
103
|
'ethereum': {
|
|
76
|
-
alternatives: [
|
|
104
|
+
alternatives: [
|
|
105
|
+
'arbitrum',
|
|
106
|
+
'avalanche',
|
|
107
|
+
'avalanche-c',
|
|
108
|
+
'base',
|
|
109
|
+
'berachain',
|
|
110
|
+
'binance',
|
|
111
|
+
'bnb',
|
|
112
|
+
'bsc',
|
|
113
|
+
'eth',
|
|
114
|
+
'flare',
|
|
115
|
+
'optimism',
|
|
116
|
+
'sonic',
|
|
117
|
+
'story',
|
|
118
|
+
],
|
|
77
119
|
testAddresses: 'evm',
|
|
78
120
|
},
|
|
79
121
|
'hedera': {
|
|
@@ -112,11 +154,11 @@ const TestCases: Record<string, TestCase> = {
|
|
|
112
154
|
testAddresses: 'ripple'
|
|
113
155
|
},
|
|
114
156
|
'sia': {
|
|
115
|
-
alternatives: [],
|
|
157
|
+
alternatives: ['SiaCoin'],
|
|
116
158
|
testAddresses: 'sia',
|
|
117
159
|
},
|
|
118
160
|
'solana': {
|
|
119
|
-
alternatives: ['spl'],
|
|
161
|
+
alternatives: ['sol', 'spl'],
|
|
120
162
|
testAddresses: 'solana'
|
|
121
163
|
},
|
|
122
164
|
'sui': {
|
|
@@ -134,13 +176,12 @@ const TestCases: Record<string, TestCase> = {
|
|
|
134
176
|
testAddresses: 'tron',
|
|
135
177
|
},
|
|
136
178
|
'xlm': {
|
|
137
|
-
alternatives: ['stellar'],
|
|
179
|
+
alternatives: ['stellar', 'stellarlumens'],
|
|
138
180
|
testAddresses: 'xlm',
|
|
139
181
|
}
|
|
140
182
|
}
|
|
141
183
|
|
|
142
184
|
describe('multichain address validator', function () {
|
|
143
|
-
|
|
144
185
|
it('should check valid addresses for chains', function () {
|
|
145
186
|
for (const chain in TestCases) {
|
|
146
187
|
for (const c of [chain, ...TestCases[chain].alternatives]) {
|
|
@@ -149,6 +190,7 @@ describe('multichain address validator', function () {
|
|
|
149
190
|
}
|
|
150
191
|
for (const address of addresses[TestCases[chain].testAddresses]) {
|
|
151
192
|
check(address, c)
|
|
193
|
+
checkMemo(address, c)
|
|
152
194
|
}
|
|
153
195
|
|
|
154
196
|
if (TestCases[chain].testnet) {
|
|
@@ -156,7 +198,7 @@ describe('multichain address validator', function () {
|
|
|
156
198
|
throw new Error(`No test testnet addresses for chain '${chain}'`)
|
|
157
199
|
}
|
|
158
200
|
for (const address of addresses[TestCases[chain].testnet.testAddresses]) {
|
|
159
|
-
|
|
201
|
+
checkMemo(address, {chain: c, networkType: NetworkType.TestNet})
|
|
160
202
|
}
|
|
161
203
|
}
|
|
162
204
|
}
|