Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit cdad97b

Browse files
committed
Replaced "ZNP" and "Zeno" occurences
1 parent 6d2223c commit cdad97b

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

src/interfaces/error.interfaces.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { Result } from 'neverthrow';
77
export enum IErrorAll {
88
IErrorInternal,
99
IErrorNotary,
10-
IErrorZNP,
10+
IErrorNetwork,
1111
}
1212

13-
// ZNP Error Types
14-
export enum IErrorZNP {
13+
// Network Error Types
14+
export enum IErrorNetwork {
1515
InternalServerError = 'Internal Server Error',
1616
InvalidPassphrase = 'Invalid passphrase',
1717
BlankPassphrase = 'New passphrase cannot be blank',
@@ -40,11 +40,11 @@ export enum IErrorNotary {
4040
InternalServerError = 'Internal Server Error',
4141
NotaryNotAuthorized = 'Notary not authorized for operation',
4242
AddressConstructionFailed = 'Address construction from public keys failed',
43-
TransactionOutputsHaveNoZeno = 'Transaction outputs do not contain Zeno tokens',
43+
TransactionOutputsHaveNoTokens = 'Transaction outputs do not contain tokens',
4444
InputsDoNotBelongToPk = 'Previous inputs do not belong to the provided public keys',
4545
InvalidSignatures = 'Invalid signatures provided',
46-
InvalidBurnTransaction = 'Transaction outputs to burn address do not contain Zeno tokens',
47-
TransactionOutputsEmpty = 'Transaction outputs contain no Zeno tokens assigned to provided burn address',
46+
InvalidBurnTransaction = 'Transaction outputs to burn address do not contain tokens',
47+
TransactionOutputsEmpty = 'Transaction outputs contain no tokens assigned to provided burn address',
4848
KeypairUndefined = 'Key-pair undefined',
4949
}
5050

src/interfaces/network.interfaces.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export type IApiContentType = {
5555
};
5656

5757
export enum IAPIRoute {
58-
/* ------------------------------- MEMPOOL ZNP Routes ------------------------------- */
58+
/* ------------------------------- MEMPOOL Network Routes ------------------------------- */
5959
DebugData = '/debug_data',
6060
FetchBalance = '/fetch_balance',
6161
SignableTransactions = '/signable_transactions' /* NOTE: No implementation */,
@@ -65,7 +65,7 @@ export enum IAPIRoute {
6565
GetUtxoAddressList = '/utxo_addresses',
6666
CreateReceiptAsset = '/create_receipt_asset',
6767
FetchPending = '/fetch_pending' /* NOTE: Currently not available */,
68-
/* --------------------------- Storage ZNP Routes --------------------------- */
68+
/* --------------------------- Storage Network Routes --------------------------- */
6969
BlockchainEntry = '/blockchain_entry',
7070
Transactions = '/transactions_by_key',
7171
/* ----------------------------- Intercom Routes ---------------------------- */
@@ -78,7 +78,7 @@ export enum IAPIRoute {
7878
}
7979

8080
/* -------------------------------------------------------------------------- */
81-
/* ZNP Interfaces */
81+
/* Network Interfaces */
8282
/* -------------------------------------------------------------------------- */
8383

8484
/* --------------------------- Response Structures -------------------------- */

src/interfaces/success.interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export enum ISuccessAll {
22
IErrorInternal,
33
}
44

5-
export enum ISuccessZNP {
5+
export enum ISuccessNetwork {
66
FetchWalletInfo = 'Wallet info successfully fetched',
77
ExportKeypairs = 'Key-pairs successfully exported',
88
ImportKeypairs = 'Key-pairs successfully imported',

src/mgmt/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*====== MISC =======*/
22

3-
export const ZNP_NETWORK_VERSION = 2; /* Always keep up to date with ZNP version! */
3+
export const ABLOCK_NETWORK_VERSION = 2; /* Always keep up to date with ABlock network version! */
44
export const SEED_REGEN_THRES = 1000;
55
export const BAL_LIMIT = 10_000_000_000;
66
export const ADDRESS_VERSION_OLD = 1; /* Old (depreciated) address structure */
77
export const ADDRESS_VERSION = null; /* Always use `null` for latest address version */
88
export const TEMP_ADDRESS_VERSION = 99999; /* Depreciate after temporary addresses have retired */
99
export const RECEIPT_DEFAULT = 1000;
10-
export const ZENO_FRACTION = 25200;
10+
export const TOKEN_FRACTION = 25200;
1111
export const DEFAULT_DRS_TX_HASH = 'default_drs_tx_hash';
1212
export const DEFAULT_HEADERS = {
1313
headers: {

src/mgmt/tx.mgmt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
lhsAssetIsLessThanRhsAsset,
2929
subRhsAssetFromLhsAsset,
3030
} from '../utils';
31-
import { ZNP_NETWORK_VERSION } from './constants';
31+
import { ABLOCK_NETWORK_VERSION } from './constants';
3232
import { getAddressVersion } from './key.mgmt';
3333
import { constructSignature, constructTxInSignableData } from './script.mgmt';
3434

@@ -227,7 +227,7 @@ export function createTx(
227227
const createTransaction: ICreateTransaction = {
228228
inputs: inputs,
229229
outputs: outputs,
230-
version: ZNP_NETWORK_VERSION /* Always keep up to date with ZNP! */,
230+
version: ABLOCK_NETWORK_VERSION /* Always keep up to date with ABlock network version! */,
231231
druid_info: druidInfo,
232232
};
233233

src/services/znt.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export class ABlockWallet {
266266
/**
267267
* @deprecated due to instability.
268268
*
269-
* Get all the addresses present on the ZNP UTXO set
269+
* Get all the addresses present on the ABlock network UTXO set
270270
*
271271
* @return {*} {Promise<IClientResponse>}
272272
* @memberof ABlockWallet

src/tests/__tests__/key.mgmt.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ test('generates a valid payment address with the temporary address structure', (
117117
expect(actual).toEqual(expected);
118118
});
119119

120-
test('generates a valid payment address with latest ZNP version', () => {
120+
test('generates a valid payment address with latest ABlock network version', () => {
121121
const actual = [
122122
keyMgmt.constructAddress(getHexStringBytes(PUBLIC_KEYS[0]), ADDRESS_VERSION).unwrapOr(''),
123123
keyMgmt.constructAddress(getHexStringBytes(PUBLIC_KEYS[1]), ADDRESS_VERSION).unwrapOr(''),

src/utils/general.utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { BAL_LIMIT } from '../mgmt/constants';
77
import { IClientResponse, ICustomKeyPair, IErrorInternal, IResult } from '../interfaces';
88

99
/**
10-
* Cast `status` received from ZNP to lowercase string variant
10+
* Cast `status` received from ABlock network to lowercase string variant
1111
*
1212
* TODO: There's probably already a built-in function for this?
1313
*
@@ -113,7 +113,7 @@ export function truncateByBytesUTF8(chars: string, n: number): string {
113113
try {
114114
return fromBytesUTF8(bytes);
115115
// eslint-disable-next-line no-empty
116-
} catch (e) {}
116+
} catch (e) { }
117117
bytes = bytes.substring(0, bytes.length - 1);
118118
}
119119
}

0 commit comments

Comments
 (0)