Skip to content

Commit

Permalink
v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
martiliones authored Dec 2, 2023
1 parent 0626686 commit 838527b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## [2.2.0] - 2023-12-01

## Added

- Export validator utils:

```ts
function isPassphrase(passphrase: unknown): passphrase is string;
function isAdmAddress(address: unknown): address is AdamantAddress;
function isAdmPublicKey(publicKey: unknown): publicKey is string;
function isAdmVoteForPublicKey(publicKey: unknown): publicKey is string;
function isAdmVoteForAddress(address: unknown): boolean;
function isAdmVoteForDelegateName(delegateName: unknown): delegateName is string;
function validateMessage(
message: string,
messageType: MessageType = MessageType.Chat
): { success: false, error: string } | { success: true };
function isDelegateName(name: unknown): name is string;
function admToSats(amount: number): number;
```

## [2.1.0] - 2023-11-17

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adamant-api",
"version": "2.1.0",
"version": "2.2.0",
"description": "JavaScript API library for the ADAMANT Blockchain",
"keywords": [
"adm",
Expand Down
11 changes: 11 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,14 @@ export * from './helpers/constants';
export * from './helpers/logger';
export * from './helpers/wsClient';
export * from './helpers/keys';
export {
isPassphrase,
isAdmAddress,
isAdmPublicKey,
isAdmVoteForPublicKey,
isAdmVoteForAddress,
isAdmVoteForDelegateName,
validateMessage,
isDelegateName,
admToSats,
} from './helpers/validator';

0 comments on commit 838527b

Please sign in to comment.