-
Notifications
You must be signed in to change notification settings - Fork 302
Expand file tree
/
Copy pathutils.ts
More file actions
40 lines (34 loc) · 908 Bytes
/
utils.ts
File metadata and controls
40 lines (34 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { VALID_ADDRESS_REGEX, VALID_PUBLIC_KEY_REGEX } from './constants';
/**
* Utility functions for Tempo
*/
/**
* Check if the address is valid
* @param address
*/
export function isValidAddress(address: string): boolean {
// TODO: Implement proper address validation for Tempo
return VALID_ADDRESS_REGEX.test(address);
}
/**
* Check if the public key is valid
* @param publicKey
*/
export function isValidPublicKey(publicKey: string): boolean {
// TODO: Implement proper public key validation for Tempo
return VALID_PUBLIC_KEY_REGEX.test(publicKey);
}
/**
* Check if the private key is valid
* @param privateKey
*/
export function isValidPrivateKey(privateKey: string): boolean {
// TODO: Implement proper private key validation for Tempo
return privateKey.length === 64;
}
const utils = {
isValidAddress,
isValidPublicKey,
isValidPrivateKey,
};
export default utils;