Skip to content

Commit 838527b

Browse files
authored
v2.2.0
1 parent 0626686 commit 838527b

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## [2.2.0] - 2023-12-01
4+
5+
## Added
6+
7+
- Export validator utils:
8+
9+
```ts
10+
function isPassphrase(passphrase: unknown): passphrase is string;
11+
function isAdmAddress(address: unknown): address is AdamantAddress;
12+
function isAdmPublicKey(publicKey: unknown): publicKey is string;
13+
function isAdmVoteForPublicKey(publicKey: unknown): publicKey is string;
14+
function isAdmVoteForAddress(address: unknown): boolean;
15+
function isAdmVoteForDelegateName(delegateName: unknown): delegateName is string;
16+
function validateMessage(
17+
message: string,
18+
messageType: MessageType = MessageType.Chat
19+
): { success: false, error: string } | { success: true };
20+
function isDelegateName(name: unknown): name is string;
21+
function admToSats(amount: number): number;
22+
```
23+
324
## [2.1.0] - 2023-11-17
425

526
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "adamant-api",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "JavaScript API library for the ADAMANT Blockchain",
55
"keywords": [
66
"adm",

src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,14 @@ export * from './helpers/constants';
66
export * from './helpers/logger';
77
export * from './helpers/wsClient';
88
export * from './helpers/keys';
9+
export {
10+
isPassphrase,
11+
isAdmAddress,
12+
isAdmPublicKey,
13+
isAdmVoteForPublicKey,
14+
isAdmVoteForAddress,
15+
isAdmVoteForDelegateName,
16+
validateMessage,
17+
isDelegateName,
18+
admToSats,
19+
} from './helpers/validator';

0 commit comments

Comments
 (0)