@rosen-bridge/address-codec 0.6.3 → 1.0.0

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/decoder.d.ts.map +1 -1
  3. package/dist/decoder.js +1 -1
  4. package/dist/encoder.d.ts.map +1 -1
  5. package/dist/encoder.js +1 -1
  6. package/dist/types.js +1 -1
  7. package/dist/validator.d.ts.map +1 -1
  8. package/dist/validator.js +3 -3
  9. package/package.json +22 -18
  10. package/.eslintignore +0 -1
  11. package/dist/lib/const.d.ts +0 -19
  12. package/dist/lib/const.d.ts.map +0 -1
  13. package/dist/lib/const.js +0 -20
  14. package/dist/lib/decoder.d.ts +0 -8
  15. package/dist/lib/decoder.d.ts.map +0 -1
  16. package/dist/lib/decoder.js +0 -35
  17. package/dist/lib/encoder.d.ts +0 -8
  18. package/dist/lib/encoder.d.ts.map +0 -1
  19. package/dist/lib/encoder.js +0 -44
  20. package/dist/lib/index.d.ts +0 -5
  21. package/dist/lib/index.d.ts.map +0 -1
  22. package/dist/lib/index.js +0 -8
  23. package/dist/lib/types.d.ts +0 -7
  24. package/dist/lib/types.d.ts.map +0 -1
  25. package/dist/lib/types.js +0 -11
  26. package/dist/lib/validator.d.ts +0 -7
  27. package/dist/lib/validator.d.ts.map +0 -1
  28. package/dist/lib/validator.js +0 -52
  29. package/dist/tests/decoder.spec.d.ts +0 -2
  30. package/dist/tests/decoder.spec.d.ts.map +0 -1
  31. package/dist/tests/decoder.spec.js +0 -110
  32. package/dist/tests/encoder.spec.d.ts +0 -2
  33. package/dist/tests/encoder.spec.d.ts.map +0 -1
  34. package/dist/tests/encoder.spec.js +0 -124
  35. package/dist/tests/testData.d.ts +0 -22
  36. package/dist/tests/testData.d.ts.map +0 -1
  37. package/dist/tests/testData.js +0 -22
  38. package/dist/tests/validator.spec.d.ts +0 -2
  39. package/dist/tests/validator.spec.d.ts.map +0 -1
  40. package/dist/tests/validator.spec.js +0 -208
  41. package/dist/tsconfig.tsbuildinfo +0 -1
  42. package/dist/vitest.config.d.ts +0 -3
  43. package/dist/vitest.config.d.ts.map +0 -1
  44. package/dist/vitest.config.js +0 -18
  45. package/lib/const.ts +0 -20
  46. package/lib/decoder.ts +0 -57
  47. package/lib/encoder.ts +0 -57
  48. package/lib/index.ts +0 -9
  49. package/lib/types.ts +0 -15
  50. package/lib/validator.ts +0 -59
  51. package/tests/decoder.spec.ts +0 -131
  52. package/tests/encoder.spec.ts +0 -143
  53. package/tests/testData.ts +0 -43
  54. package/tests/validator.spec.ts +0 -234
  55. package/tsconfig.build.json +0 -7
  56. package/tsconfig.build.tsbuildinfo +0 -1
  57. package/tsconfig.json +0 -7
  58. package/vitest.config.ts +0 -18
@@ -1,18 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
- export default defineConfig({
3
- test: {
4
- globals: true,
5
- coverage: {
6
- all: true,
7
- reporter: ['cobertura', 'lcov', 'text', 'text-summary'],
8
- provider: 'istanbul',
9
- include: ['src'],
10
- },
11
- poolOptions: {
12
- forks: {
13
- singleFork: true,
14
- },
15
- },
16
- },
17
- });
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidml0ZXN0LmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3ZpdGVzdC5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUU3QyxlQUFlLFlBQVksQ0FBQztJQUMxQixJQUFJLEVBQUU7UUFDSixPQUFPLEVBQUUsSUFBSTtRQUNiLFFBQVEsRUFBRTtZQUNSLEdBQUcsRUFBRSxJQUFJO1lBQ1QsUUFBUSxFQUFFLENBQUMsV0FBVyxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsY0FBYyxDQUFDO1lBQ3ZELFFBQVEsRUFBRSxVQUFVO1lBQ3BCLE9BQU8sRUFBRSxDQUFDLEtBQUssQ0FBQztTQUNqQjtRQUNELFdBQVcsRUFBRTtZQUNYLEtBQUssRUFBRTtnQkFDTCxVQUFVLEVBQUUsSUFBSTthQUNqQjtTQUNGO0tBQ0Y7Q0FDRixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd2aXRlc3QvY29uZmlnJztcblxuZXhwb3J0IGRlZmF1bHQgZGVmaW5lQ29uZmlnKHtcbiAgdGVzdDoge1xuICAgIGdsb2JhbHM6IHRydWUsXG4gICAgY292ZXJhZ2U6IHtcbiAgICAgIGFsbDogdHJ1ZSxcbiAgICAgIHJlcG9ydGVyOiBbJ2NvYmVydHVyYScsICdsY292JywgJ3RleHQnLCAndGV4dC1zdW1tYXJ5J10sXG4gICAgICBwcm92aWRlcjogJ2lzdGFuYnVsJyxcbiAgICAgIGluY2x1ZGU6IFsnc3JjJ10sXG4gICAgfSxcbiAgICBwb29sT3B0aW9uczoge1xuICAgICAgZm9ya3M6IHtcbiAgICAgICAgc2luZ2xlRm9yazogdHJ1ZSxcbiAgICAgIH0sXG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
package/lib/const.ts DELETED
@@ -1,20 +0,0 @@
1
- export const BITCOIN_CHAIN = 'bitcoin';
2
- export const RUNES_CHAIN = 'bitcoin-runes';
3
- export const CARDANO_CHAIN = 'cardano';
4
- export const ERGO_CHAIN = 'ergo';
5
- export const ETHEREUM_CHAIN = 'ethereum';
6
- export const BINANCE_CHAIN = 'binance';
7
- export const DOGE_CHAIN = 'doge';
8
-
9
- export const DOGE_NETWORK = {
10
- // Doge network parameters
11
- messagePrefix: '\x19Dogecoin Signed Message:\n',
12
- bech32: 'dc',
13
- bip32: {
14
- public: 0x02facafd,
15
- private: 0x02fac398,
16
- },
17
- pubKeyHash: 0x1e,
18
- scriptHash: 0x16,
19
- wif: 0x9e,
20
- };
package/lib/decoder.ts DELETED
@@ -1,57 +0,0 @@
1
- import {
2
- BINANCE_CHAIN,
3
- BITCOIN_CHAIN,
4
- CARDANO_CHAIN,
5
- DOGE_CHAIN,
6
- DOGE_NETWORK,
7
- ERGO_CHAIN,
8
- ETHEREUM_CHAIN,
9
- RUNES_CHAIN,
10
- } from './const';
11
- import { UnsupportedAddressError, UnsupportedChainError } from './types';
12
- import * as ergoLib from 'ergo-lib-wasm-nodejs';
13
- import * as cardanoLib from '@emurgo/cardano-serialization-lib-nodejs';
14
- import * as bitcoinLib from 'bitcoinjs-lib';
15
-
16
- /**
17
- * decodes address of a chain
18
- * throws error if encoded address length is more than 60 bytes
19
- * @param chain
20
- * @param encodedAddress
21
- */
22
- export const decodeAddress = (
23
- chain: string,
24
- encodedAddress: string
25
- ): string => {
26
- if (encodedAddress.length > 60 * 2)
27
- throw new UnsupportedAddressError(chain, encodedAddress);
28
- switch (chain) {
29
- case ERGO_CHAIN:
30
- return ergoLib.Address.from_public_key(
31
- Uint8Array.from(Buffer.from(encodedAddress, 'hex'))
32
- ).to_base58(ergoLib.NetworkPrefix.Mainnet);
33
- case CARDANO_CHAIN:
34
- return cardanoLib.Address.from_bytes(
35
- Uint8Array.from(Buffer.from(encodedAddress, 'hex'))
36
- ).to_bech32();
37
- case RUNES_CHAIN:
38
- case BITCOIN_CHAIN:
39
- return bitcoinLib.address.fromOutputScript(
40
- Buffer.from(encodedAddress, 'hex')
41
- );
42
- case BINANCE_CHAIN:
43
- case ETHEREUM_CHAIN:
44
- if (encodedAddress.length != 40) {
45
- throw new UnsupportedAddressError(chain, encodedAddress);
46
- }
47
-
48
- return '0x' + encodedAddress;
49
- case DOGE_CHAIN:
50
- return bitcoinLib.address.fromOutputScript(
51
- Buffer.from(encodedAddress, 'hex'),
52
- DOGE_NETWORK
53
- );
54
- default:
55
- throw new UnsupportedChainError(chain);
56
- }
57
- };
package/lib/encoder.ts DELETED
@@ -1,57 +0,0 @@
1
- import {
2
- BINANCE_CHAIN,
3
- BITCOIN_CHAIN,
4
- CARDANO_CHAIN,
5
- DOGE_CHAIN,
6
- DOGE_NETWORK,
7
- ERGO_CHAIN,
8
- ETHEREUM_CHAIN,
9
- RUNES_CHAIN,
10
- } from './const';
11
- import { UnsupportedAddressError, UnsupportedChainError } from './types';
12
- import * as ergoLib from 'ergo-lib-wasm-nodejs';
13
- import * as cardanoLib from '@emurgo/cardano-serialization-lib-nodejs';
14
- import * as bitcoinLib from 'bitcoinjs-lib';
15
-
16
- /**
17
- * encodes address of a chain to hex string
18
- * throws error if encoded address length is more than 60 bytes
19
- * @param chain
20
- * @param address
21
- */
22
- export const encodeAddress = (chain: string, address: string): string => {
23
- let encoded: string;
24
- switch (chain) {
25
- case ERGO_CHAIN:
26
- encoded = Buffer.from(
27
- ergoLib.Address.from_base58(address).content_bytes()
28
- ).toString('hex');
29
- break;
30
- case CARDANO_CHAIN:
31
- encoded = Buffer.from(
32
- cardanoLib.Address.from_bech32(address).to_bytes()
33
- ).toString('hex');
34
- break;
35
- case RUNES_CHAIN:
36
- case BITCOIN_CHAIN:
37
- encoded = bitcoinLib.address.toOutputScript(address).toString('hex');
38
- break;
39
- case BINANCE_CHAIN:
40
- case ETHEREUM_CHAIN:
41
- if (address.length != 42 || address.substring(0, 2) != '0x') {
42
- throw new UnsupportedAddressError(chain, address);
43
- }
44
- encoded = address.substring(2);
45
- break;
46
- case DOGE_CHAIN:
47
- encoded = bitcoinLib.address
48
- .toOutputScript(address, DOGE_NETWORK)
49
- .toString('hex');
50
- break;
51
- default:
52
- throw new UnsupportedChainError(chain);
53
- }
54
- if (encoded.length > 60 * 2)
55
- throw new UnsupportedAddressError(chain, address);
56
- return encoded;
57
- };
package/lib/index.ts DELETED
@@ -1,9 +0,0 @@
1
- import { initEccLib } from 'bitcoinjs-lib';
2
- import ecc from '@bitcoinerlab/secp256k1';
3
-
4
- initEccLib(ecc);
5
-
6
- export * from './encoder';
7
- export * from './decoder';
8
- export * from './types';
9
- export * from './validator';
package/lib/types.ts DELETED
@@ -1,15 +0,0 @@
1
- export class UnsupportedAddressError extends Error {
2
- constructor(chain: string, address: string) {
3
- super(
4
- `UnsupportedAddressError: Address [${address}] is not supported in current implementation of [${chain}] chain`
5
- );
6
- }
7
- }
8
-
9
- export class UnsupportedChainError extends Error {
10
- constructor(chain: string) {
11
- super(
12
- `UnsupportedChainError: Address encoding does not support [${chain}] chain currently`
13
- );
14
- }
15
- }
package/lib/validator.ts DELETED
@@ -1,59 +0,0 @@
1
- import {
2
- BINANCE_CHAIN,
3
- BITCOIN_CHAIN,
4
- CARDANO_CHAIN,
5
- DOGE_CHAIN,
6
- DOGE_NETWORK,
7
- ERGO_CHAIN,
8
- ETHEREUM_CHAIN,
9
- RUNES_CHAIN,
10
- } from './const';
11
- import { UnsupportedAddressError, UnsupportedChainError } from './types';
12
- import * as ergoLib from 'ergo-lib-wasm-nodejs';
13
- import * as cardanoLib from '@emurgo/cardano-serialization-lib-nodejs';
14
- import * as bitcoinLib from 'bitcoinjs-lib';
15
- import * as ethereumLib from 'ethers';
16
-
17
- /**
18
- * validates address of a chain
19
- * @param chain
20
- * @param address
21
- */
22
- export const validateAddress = (chain: string, address: string): boolean => {
23
- switch (chain) {
24
- case ERGO_CHAIN:
25
- ergoLib.Address.from_base58(address);
26
- return true;
27
- case CARDANO_CHAIN:
28
- cardanoLib.Address.from_bech32(address);
29
- return true;
30
- case BITCOIN_CHAIN:
31
- bitcoinLib.address.fromBech32(address);
32
- if (address.slice(0, 4) != 'bc1q')
33
- throw new UnsupportedAddressError(chain, address);
34
- return true;
35
- case BINANCE_CHAIN:
36
- case ETHEREUM_CHAIN:
37
- if (address.toLowerCase() != address || !ethereumLib.isAddress(address))
38
- throw new UnsupportedAddressError(chain, address);
39
- return true;
40
- case DOGE_CHAIN:
41
- try {
42
- bitcoinLib.address.toOutputScript(address, DOGE_NETWORK);
43
- } catch (e) {
44
- throw new UnsupportedAddressError(chain, address);
45
- }
46
- return true;
47
- case RUNES_CHAIN:
48
- try {
49
- bitcoinLib.address.toOutputScript(address);
50
- if (address.slice(0, 4) != 'bc1p')
51
- throw new UnsupportedAddressError(chain, address);
52
- } catch (e) {
53
- throw new UnsupportedAddressError(chain, address);
54
- }
55
- return true;
56
- default:
57
- throw new UnsupportedChainError(chain);
58
- }
59
- };
@@ -1,131 +0,0 @@
1
- import * as testData from './testData';
2
- import {
3
- UnsupportedAddressError,
4
- UnsupportedChainError,
5
- decodeAddress,
6
- } from '../lib';
7
- import {
8
- BITCOIN_CHAIN,
9
- CARDANO_CHAIN,
10
- DOGE_CHAIN,
11
- ERGO_CHAIN,
12
- ETHEREUM_CHAIN,
13
- RUNES_CHAIN,
14
- } from '../lib/const';
15
-
16
- describe('decodeAddress', () => {
17
- /**
18
- * @target `decodeAddress` should decode Ergo address successfully
19
- * @dependencies
20
- * @scenario
21
- * - run test
22
- * - check returned value
23
- * @expected
24
- * - it should be address in base58 format
25
- */
26
- it('should decode Ergo address successfully', () => {
27
- const res = decodeAddress(ERGO_CHAIN, testData.encodedErgoAddress);
28
- expect(res).toEqual(testData.ergoAddress);
29
- });
30
-
31
- /**
32
- * @target `decodeAddress` should decode Cardano address successfully
33
- * @dependencies
34
- * @scenario
35
- * - run test
36
- * - check returned value
37
- * @expected
38
- * - it should be address in bech32 format
39
- */
40
- it('should decode Cardano address successfully', () => {
41
- const res = decodeAddress(CARDANO_CHAIN, testData.encodedCardanoAddress);
42
- expect(res).toEqual(testData.cardanoAddress);
43
- });
44
-
45
- /**
46
- * @target `decodeAddress` should decode Bitcoin address successfully
47
- * @dependencies
48
- * @scenario
49
- * - run test
50
- * - check returned value
51
- * @expected
52
- * - it should be address in bech32 format
53
- */
54
- it('should decode Bitcoin address successfully', () => {
55
- const res = decodeAddress(BITCOIN_CHAIN, testData.encodedBitcoinAddress);
56
- expect(res).toEqual(testData.bitcoinAddress);
57
- });
58
-
59
- /**
60
- * @target `decodeAddress` should decode Ethereum address successfully
61
- * @dependencies
62
- * @scenario
63
- * - run test
64
- * - check returned value
65
- * @expected
66
- * - it should be address in hex format
67
- */
68
- it('should decode Ethereum address successfully', () => {
69
- const res = decodeAddress(ETHEREUM_CHAIN, testData.encodedEthereumAddress);
70
- expect(res).toEqual(testData.ethereumAddress);
71
- });
72
-
73
- /**
74
- * @target `decodeAddress` should throw error when encoded address is more than 60 bytes
75
- * @dependencies
76
- * @scenario
77
- * - run test & check thrown exception
78
- * @expected
79
- * - it should throw UnsupportedAddress error
80
- */
81
- it('should throw error when encoded address is more than 60 bytes', () => {
82
- expect(() => {
83
- decodeAddress(ERGO_CHAIN, testData.longEncodedAddress);
84
- }).toThrow(UnsupportedAddressError);
85
- });
86
-
87
- /**
88
- * @target `decodeAddress` should throw error when chain is not supported
89
- * @dependencies
90
- * @scenario
91
- * - run test & check thrown exception
92
- * @expected
93
- * - it should throw UnsupportedChain error
94
- */
95
- it('should throw error when chain is not supported', () => {
96
- expect(() => {
97
- decodeAddress('unsupported-chain', '0011223344');
98
- }).toThrow(UnsupportedChainError);
99
- });
100
-
101
- /**
102
- * @target `decodeAddress` should decode Doge address successfully
103
- * @dependencies
104
- * @scenario
105
- * - run test
106
- * - check returned value
107
- * @expected
108
- * - it should be address in hex format
109
- */
110
- it('should decode Doge address successfully', () => {
111
- const res = decodeAddress(DOGE_CHAIN, testData.encodedDogeAddress);
112
- expect(res).toEqual(testData.dogeAddress);
113
- });
114
-
115
- /**
116
- * @target `decodeAddress` should decode Runes address successfully
117
- * @dependencies
118
- * @scenario
119
- * - run test
120
- * - check returned value
121
- * @expected
122
- * - it should be address in hex format
123
- */
124
- it('should decode Runes address successfully', () => {
125
- const res = decodeAddress(
126
- RUNES_CHAIN,
127
- testData.encodedTaprootBitcoinAddress
128
- );
129
- expect(res).toEqual(testData.taprootBitcoinAddress);
130
- });
131
- });
@@ -1,143 +0,0 @@
1
- import * as testData from './testData';
2
- import {
3
- UnsupportedAddressError,
4
- UnsupportedChainError,
5
- encodeAddress,
6
- } from '../lib';
7
- import {
8
- BITCOIN_CHAIN,
9
- CARDANO_CHAIN,
10
- DOGE_CHAIN,
11
- ERGO_CHAIN,
12
- ETHEREUM_CHAIN,
13
- RUNES_CHAIN,
14
- } from '../lib/const';
15
-
16
- describe('encodeAddress', () => {
17
- /**
18
- * @target `encodeAddress` should encode Ergo address successfully
19
- * @dependencies
20
- * @scenario
21
- * - run test
22
- * - check returned value
23
- * @expected
24
- * - it should be public key of given address in hex
25
- */
26
- it('should encode Ergo address successfully', () => {
27
- const res = encodeAddress(ERGO_CHAIN, testData.ergoAddress);
28
- expect(res).toEqual(testData.encodedErgoAddress);
29
- });
30
-
31
- /**
32
- * @target `encodeAddress` should encode Cardano address successfully
33
- * @dependencies
34
- * @scenario
35
- * - run test
36
- * - check returned value
37
- * @expected
38
- * - it should be public key of given address in hex
39
- */
40
- it('should encode Cardano address successfully', () => {
41
- const res = encodeAddress(CARDANO_CHAIN, testData.cardanoAddress);
42
- expect(res).toEqual(testData.encodedCardanoAddress);
43
- });
44
-
45
- /**
46
- * @target `encodeAddress` should encode Bitcoin address successfully
47
- * @dependencies
48
- * @scenario
49
- * - run test
50
- * - check returned value
51
- * @expected
52
- * - it should be output script of given address in hex
53
- */
54
- it('should encode Bitcoin address successfully', () => {
55
- const res = encodeAddress(BITCOIN_CHAIN, testData.bitcoinAddress);
56
- expect(res).toEqual(testData.encodedBitcoinAddress);
57
- });
58
-
59
- /**
60
- * @target `encodeAddress` should encode Ethereum address successfully
61
- * @dependencies
62
- * @scenario
63
- * - run test
64
- * - check returned value
65
- * @expected
66
- * - it should be output script of given address in hex
67
- */
68
- it('should encode Ethereum address successfully', () => {
69
- const res = encodeAddress(ETHEREUM_CHAIN, testData.ethereumAddress);
70
- expect(res).toEqual(testData.encodedEthereumAddress);
71
- });
72
-
73
- /**
74
- * @target `encodeAddress` should throw error when address is not 40 bytes
75
- * @dependencies
76
- * @scenario
77
- * - run test
78
- * - run test & check thrown exception
79
- * @expected
80
- * - it should throw UnsupportedAddress error
81
- */
82
- it('should encode Ethereum address successfully', () => {
83
- expect(() => {
84
- encodeAddress(ETHEREUM_CHAIN, testData.invalidEthereumAddressLength);
85
- }).toThrow(UnsupportedAddressError);
86
- });
87
-
88
- /**
89
- * @target `encodeAddress` should throw error when encoded address is more than 60 bytes
90
- * @dependencies
91
- * @scenario
92
- * - run test & check thrown exception
93
- * @expected
94
- * - it should throw UnsupportedAddress error
95
- */
96
- it('should throw error when encoded address is more than 60 bytes', () => {
97
- expect(() => {
98
- encodeAddress(ERGO_CHAIN, testData.longErgoAddress);
99
- }).toThrow(UnsupportedAddressError);
100
- });
101
-
102
- /**
103
- * @target `encodeAddress` should throw error when chain is not supported
104
- * @dependencies
105
- * @scenario
106
- * - run test & check thrown exception
107
- * @expected
108
- * - it should throw UnsupportedChain error
109
- */
110
- it('should throw error when chain is not supported', () => {
111
- expect(() => {
112
- encodeAddress('unsupported-chain', 'address');
113
- }).toThrow(UnsupportedChainError);
114
- });
115
-
116
- /**
117
- * @target `encodeAddress` should encode Doge address successfully
118
- * @dependencies
119
- * @scenario
120
- * - run test
121
- * - check returned value
122
- * @expected
123
- * - it should be output script of given address in hex
124
- */
125
- it('should encode Doge address successfully', () => {
126
- const res = encodeAddress(DOGE_CHAIN, testData.dogeAddress);
127
- expect(res).toEqual(testData.encodedDogeAddress);
128
- });
129
-
130
- /**
131
- * @target `encodeAddress` should encode Runes address successfully
132
- * @dependencies
133
- * @scenario
134
- * - run test
135
- * - check returned value
136
- * @expected
137
- * - it should be output script of given address in hex
138
- */
139
- it('should encode Runes address successfully', () => {
140
- const res = encodeAddress(RUNES_CHAIN, testData.taprootBitcoinAddress);
141
- expect(res).toEqual(testData.encodedTaprootBitcoinAddress);
142
- });
143
- });
package/tests/testData.ts DELETED
@@ -1,43 +0,0 @@
1
- export const ergoAddress =
2
- '9iMjQx8PzwBKXRvsFUJFJAPoy31znfEeBUGz8DRkcnJX4rJYjVd';
3
- export const encodedErgoAddress =
4
- '03f999da8e6e42660e4464d17d29e63bc006734a6710a24eb489b466323d3a9339';
5
- export const invalidErgoAddress =
6
- '9iMjQx8PzwBKXRvsFUJFJAPoy31znfEeBUGz8DRkcnJX4rJYjVD';
7
-
8
- export const cardanoAddress =
9
- 'addr1qxxa3kfnnh40yqtepa5frt0tkw4a0rys7v33422lzt8glx43sqtd4vkhjzawajej8aujh27p5a54zx62xf3wvuplynqs3fsqet';
10
- export const encodedCardanoAddress =
11
- '018dd8d9339deaf201790f6891adebb3abd78c90f3231aa95f12ce8f9ab18016dab2d790baeecb323f792babc1a769511b4a3262e6703f24c1';
12
- export const invalidCardanoAddress =
13
- 'addr1qxxa3kfnnh40yqtepa5frt0tkw4a0rys7v33422lzt8glx43sqtd4vkhjzawajej8aujh27p5a54zx62xf3wvuplynqs3fsqee';
14
-
15
- export const bitcoinAddress = 'bc1qkgp89fjerymm5ltg0hygnumr0m2qa7n22gyw6h';
16
- export const invalidBitcoinAddress =
17
- 'bc1qkgp89fjerymm5ltg0hygnumr0m2qa7n22gyw6';
18
- export const taprootBitcoinAddress =
19
- 'bc1px0ad45qrfwc20yfd9wljeytrvfa6tmrcxv6pgxze2svvx00tp7mstj5rpk';
20
- export const encodedTaprootBitcoinAddress =
21
- '512033fadad0034bb0a7912d2bbf2c9163627ba5ec7833341418595418c33deb0fb7';
22
- export const encodedBitcoinAddress =
23
- '0014b20272a6591937ba7d687dc889f3637ed40efa6a';
24
-
25
- export const longErgoAddress =
26
- 'nB3L2PD3LBtiNhDYK7XhZ8nVt6uekBXN7RcPUKgdKLXFcrJiSPxmQsUKuUkTRQ1hbvDrxEQAKYurGFbaGD1RPxU7XqQimD78j23HHMQKL1boUGsnNhCxaVNAYMcFbQNo355Af8cWkhAN6';
27
- export const longEncodedAddress =
28
- '100304000e20a6ac381e6fa99929fd1477b3ba9499790a775e91d4c14c5aa86e9a118dfac8530400d801d601b2db6501fe730000ea02d1aedb63087201d901024d0e938c720201730198b2e4c672010510730200ade4c67201041ad901020ecdee7202';
29
-
30
- export const ethereumAddress = '0xb416c8a6d7ec94706a9ae2c26c11d320519482b1';
31
- export const encodedEthereumAddress =
32
- 'b416c8a6d7ec94706a9ae2c26c11d320519482b1';
33
-
34
- export const invalidEthereumAddressLength =
35
- '0xb416c8a7ec94706a9ae2c26c11d320519482b1';
36
- export const invalidEthereumIcapAddress = 'XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36';
37
- export const invalidEthereumChecksumAddress =
38
- '0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97';
39
-
40
- export const dogeAddress = 'A69cznKpaYVWjzU3sNFZnGhbpSmUVFzvHB';
41
- export const invalidDogeAddress = 'bc1qkgp89fjerymm5ltg0hygnumr0m2qa7n22gyw6h';
42
- export const encodedDogeAddress =
43
- 'a914966ba9f4755996c3d51025d53044b415121bc10287';