validator0x 0.1.3 → 0.2.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.
- package/README.md +64 -9
- package/dist/detectors/chain-detector.d.ts +6 -1
- package/dist/detectors/chain-detector.d.ts.map +1 -1
- package/dist/formatters/index.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/validators/base.d.ts +2 -2
- package/dist/validators/base.d.ts.map +1 -1
- package/dist/validators/bitcoin.d.ts +2 -2
- package/dist/validators/bitcoin.d.ts.map +1 -1
- package/dist/validators/cardano.d.ts +9 -0
- package/dist/validators/cardano.d.ts.map +1 -0
- package/dist/validators/dogecoin.d.ts +7 -0
- package/dist/validators/dogecoin.d.ts.map +1 -0
- package/dist/validators/evm.d.ts +18 -0
- package/dist/validators/evm.d.ts.map +1 -0
- package/dist/validators/litecoin.d.ts +9 -0
- package/dist/validators/litecoin.d.ts.map +1 -0
- package/dist/validators/ripple.d.ts +7 -0
- package/dist/validators/ripple.d.ts.map +1 -0
- package/dist/validators/solana.d.ts +2 -2
- package/dist/validators/solana.d.ts.map +1 -1
- package/package.json +10 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AddressValidator } from './base';
|
|
2
|
+
import { ValidationResult, FormatOptions } from '../types';
|
|
3
|
+
export declare class LitecoinValidator extends AddressValidator {
|
|
4
|
+
protected validateImplementation(address: string): ValidationResult;
|
|
5
|
+
private validateLegacy;
|
|
6
|
+
private validateBech32;
|
|
7
|
+
format(address: string, options?: FormatOptions): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=litecoin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"litecoin.d.ts","sourceRoot":"","sources":["../../src/validators/litecoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAmB,MAAM,UAAU,CAAC;AAK5E,qBAAa,iBAAkB,SAAQ,gBAAgB;IACnD,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAcnE,OAAO,CAAC,cAAc;IA0BtB,OAAO,CAAC,cAAc;IAkCtB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;CAO3D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AddressValidator } from './base';
|
|
2
|
+
import { ValidationResult, FormatOptions } from '../types';
|
|
3
|
+
export declare class RippleValidator extends AddressValidator {
|
|
4
|
+
protected validateImplementation(address: string): ValidationResult;
|
|
5
|
+
format(address: string, options?: FormatOptions): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ripple.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple.d.ts","sourceRoot":"","sources":["../../src/validators/ripple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAmB,MAAM,UAAU,CAAC;AA4D5E,qBAAa,eAAgB,SAAQ,gBAAgB;IACjD,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAgCnE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;CAO3D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AddressValidator } from './base';
|
|
2
|
-
import { ValidationResult,
|
|
2
|
+
import { ValidationResult, FormatOptions } from '../types';
|
|
3
3
|
export declare class SolanaValidator extends AddressValidator {
|
|
4
|
-
protected validateImplementation(address: string
|
|
4
|
+
protected validateImplementation(address: string): ValidationResult;
|
|
5
5
|
format(address: string, options?: FormatOptions): string;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=solana.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../src/validators/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../src/validators/solana.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAmB,MAAM,UAAU,CAAC;AAG5E,qBAAa,eAAgB,SAAQ,gBAAgB;IACjD,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAgCnE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;CAO3D"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "validator0x",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Multi-chain wallet address validator and formatter for Ethereum, Solana, Bitcoin, and
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Multi-chain wallet address validator and formatter for Ethereum, Solana, Bitcoin, Polygon, Litecoin, Dogecoin, Cardano, Ripple, and more. Supports batch validation and zero dependencies.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"browser": "dist/index.umd.js",
|
|
@@ -33,8 +33,15 @@
|
|
|
33
33
|
"solana",
|
|
34
34
|
"bitcoin",
|
|
35
35
|
"polygon",
|
|
36
|
+
"litecoin",
|
|
37
|
+
"dogecoin",
|
|
38
|
+
"cardano",
|
|
39
|
+
"ripple",
|
|
40
|
+
"evm",
|
|
36
41
|
"web3",
|
|
37
42
|
"crypto",
|
|
43
|
+
"batch-validation",
|
|
44
|
+
"checksum",
|
|
38
45
|
"validator0x"
|
|
39
46
|
],
|
|
40
47
|
"author": "Samarth Patel",
|
|
@@ -54,6 +61,6 @@
|
|
|
54
61
|
"ts-jest": "^29.0.0",
|
|
55
62
|
"ts-node": "^10.0.0",
|
|
56
63
|
"tslib": "^2.8.1",
|
|
57
|
-
"typescript": "
|
|
64
|
+
"typescript": "5.3.3"
|
|
58
65
|
}
|
|
59
66
|
}
|