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

Commit 5ad26df

Browse files
authored
Merge pull request #1 from ABlockOfficial/renaming
Renaming
2 parents 780ca46 + cdad97b commit 5ad26df

File tree

15 files changed

+119
-119
lines changed

15 files changed

+119
-119
lines changed

README-DE.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Installieren Sie das Modul in Ihr Projekt:
9898
```typescript
9999
import { ABlockWallet } from '@a-block/a-blockjs';
100100
101-
const COMPUTE_HOST = 'beispiel.berechnung.host.com';
101+
const MEMPOOL_HOST = 'beispiel.berechnung.host.com';
102102
const INTERCOM_HOST = 'beispiel.intercom.host.com';
103103
const PASSPHRASE = 'ein sicheres Passwort';
104104
@@ -109,7 +109,7 @@ Installieren Sie das Modul in Ihr Projekt:
109109
// HINWEIS: Dies ist ein asynchroner Aufruf
110110
client
111111
.initNew({
112-
computeHost: COMPUTE_HOST,
112+
mempoolHost: MEMPOOL_HOST,
113113
intercomHost: INTERCOM_HOST,
114114
passPhrase: PASSPHRASE,
115115
})
@@ -126,7 +126,7 @@ Wenn der Client ohne vorab generierte Seed-Phrase oder vorhandenen Master-Key in
126126
127127
Einige Argumente während der Initialisierung sind optional, wie z.B. `initOffline`, das verwendet wird, um den Client im Offline-Modus zu initialisieren.
128128
129-
Die Schnittstellen-Elemente `computeHost` und `intercomHost` werden verwendet, um die API-Endpunkte für den Compute-Knoten bzw. den ABlock Intercom-Server festzulegen, mit denen der Client verbunden werden soll.
129+
Die Schnittstellen-Elemente `mempoolHost` und `intercomHost` werden verwendet, um die API-Endpunkte für den Mempool-Knoten bzw. den ABlock Intercom-Server festzulegen, mit denen der Client verbunden werden soll.
130130
131131
Während der Initialisierung muss dem Client ein benutzerdefiniertes `passPhrase` übergeben werden, da dieses Passwort zur Verschlüsselung/Entschlüsselung von Daten während der Operationen verwendet wird.
132132
@@ -135,7 +135,7 @@ Während der Initialisierung muss dem Client ein benutzerdefiniertes `passPhrase
135135
```typescript
136136
import { ABlockWallet } from '@a-block/a-blockjs';
137137
138-
const COMPUTE_HOST = 'beispiel.berechnung.host.com';
138+
const MEMPOOL_HOST = 'beispiel.berechnung.host.com';
139139
const INTERCOM_HOST = 'beispiel.intercom.host.com';
140140
const PASSPHRASE = 'ein sicheres Passwort';
141141
```
@@ -146,7 +146,7 @@ const client = new ABlockWallet();
146146
147147
// Initialisieren Sie den Client mit der benötigten Konfiguration
148148
client.initFromMasterKey({
149-
computeHost: COMPUTE_HOST,
149+
mempoolHost: MEMPOOL_HOST,
150150
intercomHost: INTERCOM_HOST,
151151
passPhrase: PASSPHRASE,
152152
},
@@ -161,7 +161,7 @@ Wenn bereits ein vorhandener Master-Schlüssel vorhanden ist, sollte diese Art d
161161
```typescript
162162
import { ABlockWallet } from '@a-block/a-blockjs';
163163
164-
const COMPUTE_HOST = 'beispiel.compute.host.com'
164+
const MEMPOOL_HOST = 'beispiel.mempool.host.com'
165165
const INTERCOM_HOST = 'beispiel.intercom.host.com'
166166
const PASSPHRASE = 'ein sicheres Passwort'
167167
const SEED_PHRASE = 'eine Seed-Phrase, die wie eine Ansammlung zufälliger Wörter aussehen sollte'
@@ -171,7 +171,7 @@ const client = new ABlockWallet();
171171
172172
// Initialisieren Sie den Client mit der benötigten Konfiguration
173173
client.initFromSeed({
174-
computeHost: COMPUTE_HOST,
174+
mempoolHost: MEMPOOL_HOST,
175175
intercomHost: INTERCOM_HOST,
176176
passPhrase: PASSPHRASE,
177177
},
@@ -204,7 +204,7 @@ Diese Art der Initialisierung gibt den entsprechenden Master-Schlüssel (in vers
204204
```typescript
205205
import { ABlockWallet } from '@a-block/a-blockjs';
206206
207-
const COMPUTE_HOST = 'example.compute.host.com';
207+
const MEMPOOL_HOST = 'example.mempool.host.com';
208208
const INTERCOM_HOST = 'example.intercom.host.com';
209209
const PASSPHRASE = 'a secure passphrase';
210210
@@ -213,7 +213,7 @@ const client = new ABlockWallet();
213213
214214
// Konfiguration
215215
const config = {
216-
computeHost: COMPUTE_HOST,
216+
mempoolHost: MEMPOOL_HOST,
217217
intercomHost: INTERCOM_HOST,
218218
passPhrase: PASSPHRASE,
219219
};
@@ -677,7 +677,7 @@ const zahlungsergebnis = await makeRbPayment(
677677
}
678678
},
679679
"status": "pending",
680-
"computeHost": "http://127.0.0.1:3003"
680+
"mempoolHost": "http://127.0.0.1:3003"
681681
}
682682
}
683683
}

README-FR.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Installez le module dans votre projet :
9898
```typescript
9999
import { ABlockWallet } from '@a-block/a-blockjs';
100100
101-
const COMPUTE_HOST = 'exemple.hote.calcul.com';
101+
const MEMPOOL_HOST = 'exemple.hote.calcul.com';
102102
const INTERCOM_HOST = 'exemple.hote.intercom.com';
103103
const PASSPHRASE = 'une phrase secrète';
104104
@@ -109,7 +109,7 @@ Installez le module dans votre projet :
109109
// REMARQUE : C'est un appel asynchrone
110110
client
111111
.initNew({
112-
computeHost: COMPUTE_HOST,
112+
mempoolHost: MEMPOOL_HOST,
113113
intercomHost: INTERCOM_HOST,
114114
passPhrase: PASSPHRASE,
115115
})
@@ -126,7 +126,7 @@ Lorsque le client est initialisé sans phrase de récupération pré-générée
126126
127127
Certains arguments lors de l'initialisation sont facultatifs, tels que `initOffline`, qui est utilisé pour initialiser le client dans un état hors ligne.
128128
129-
Les éléments d'interface `computeHost` et `intercomHost` sont utilisés pour déterminer les points d'extrémité de l'API pour le nœud de Calcul et le serveur ABlock Intercom auxquels le client doit se connecter, respectivement.
129+
Les éléments d'interface `mempoolHost` et `intercomHost` sont utilisés pour déterminer les points d'extrémité de l'API pour le nœud de Calcul et le serveur ABlock Intercom auxquels le client doit se connecter, respectivement.
130130
131131
Une `passPhrase` définie par l'utilisateur doit être fournie au client lors de l'initialisation, car cette phrase sera utilisée pour chiffrer/déchiffrer les données lors des opérations.
132132
@@ -135,7 +135,7 @@ Une `passPhrase` définie par l'utilisateur doit être fournie au client lors de
135135
```typescript
136136
import { ABlockWallet } from '@a-block/a-blockjs';
137137
138-
const COMPUTE_HOST = 'exemple.hote.calcul.com';
138+
const MEMPOOL_HOST = 'exemple.hote.calcul.com';
139139
const INTERCOM_HOST = 'exemple.hote.intercom.com';
140140
const PASSPHRASE = 'une phrase secrète';
141141
```
@@ -146,7 +146,7 @@ const client = new ABlockWallet();
146146
147147
// Initialisez le client avec la configuration nécessaire
148148
client.initFromMasterKey({
149-
computeHost: COMPUTE_HOST,
149+
mempoolHost: MEMPOOL_HOST,
150150
intercomHost: INTERCOM_HOST,
151151
passPhrase: PASSPHRASE,
152152
},
@@ -161,7 +161,7 @@ Lorsqu'une clé maître existante est disponible, ce type d'initialisation **doi
161161
```typescript
162162
import { ABlockWallet } from '@a-block/a-blockjs';
163163
164-
const COMPUTE_HOST = 'example.compute.host.com'
164+
const MEMPOOL_HOST = 'example.mempool.host.com'
165165
const INTERCOM_HOST = 'example.intercom.host.com'
166166
const PASSPHRASE = 'une phrase secrète sécurisée'
167167
const SEED_PHRASE = 'une phrase de départ qui devrait ressembler à un tas de mots aléatoires'
@@ -171,7 +171,7 @@ const client = new ABlockWallet();
171171
172172
// Initialisez le client avec la configuration nécessaire
173173
client.initFromSeed({
174-
computeHost: COMPUTE_HOST,
174+
mempoolHost: MEMPOOL_HOST,
175175
intercomHost: INTERCOM_HOST,
176176
passPhrase: PASSPHRASE,
177177
},
@@ -204,7 +204,7 @@ Ce type d'initialisation renverra la clé maître correspondante (sous une forme
204204
```typescript
205205
import { ABlockWallet } from '@a-block/a-blockjs';
206206
207-
const COMPUTE_HOST = 'example.compute.host.com';
207+
const MEMPOOL_HOST = 'example.mempool.host.com';
208208
const INTERCOM_HOST = 'example.intercom.host.com';
209209
const PASSPHRASE = 'a secure passphrase';
210210
@@ -213,7 +213,7 @@ const client = new ABlockWallet();
213213
214214
// Configuration
215215
const config = {
216-
computeHost: COMPUTE_HOST,
216+
mempoolHost: MEMPOOL_HOST,
217217
intercomHost: INTERCOM_HOST,
218218
passPhrase: PASSPHRASE,
219219
};
@@ -676,7 +676,7 @@ saveEncryptedTx(druid, encryptedTx);
676676
}
677677
},
678678
"status": "pending",
679-
"computeHost": "http://127.0.0.1:3003"
679+
"mempoolHost": "http://127.0.0.1:3003"
680680
}
681681
}
682682
}

src/interfaces/error.interfaces.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ 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',
1818
InvalidRequestBody = 'Invalid request body',
1919
CannotParseAddress = 'Cannot parse address',
2020
CannotAccessWallet = 'Cannot access wallet',
2121
CannotAccessUserNode = 'Cannot access user node',
22-
CannotAccessComputeNode = 'Cannot access compute node',
22+
CannotAccessMempoolNode = 'Cannot access mempool node',
2323
CannotAccessPeerUserNode = 'Cannot access peer user node',
2424
CannotSaveAddressesToWallet = 'Cannot save address to wallet',
2525
CannotFetchBalance = 'Cannot fetch balance',
@@ -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/general.interfaces.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// Config needed for initialization
66
export type IClientConfig = {
7-
computeHost?: string;
7+
mempoolHost?: string;
88
storageHost?: string;
99
intercomHost?: string;
1010
notaryHost?: string;
@@ -96,7 +96,7 @@ export type IDruidExpectation = {
9696
asset: IAssetToken | IAssetReceipt;
9797
};
9898

99-
// DDE/DRUID droplet value as stored on compute node
99+
// DDE/DRUID droplet value as stored on mempool node
100100
export type IDruidDroplet = {
101101
participants: number;
102102
tx: { [key: string]: ITransaction };
@@ -116,7 +116,7 @@ export type IAssetToken = {
116116
Token: number;
117117
};
118118

119-
// `Script` part of body sent to compute node for processing
119+
// `Script` part of body sent to mempool node for processing
120120
export type ICreateTxInScript = {
121121
Pay2PkH: {
122122
signable_data: string;
@@ -126,13 +126,13 @@ export type ICreateTxInScript = {
126126
};
127127
};
128128

129-
// `Transaction inputs` part of body sent to compute node for processing
129+
// `Transaction inputs` part of body sent to mempool node for processing
130130
export type ICreateTxIn = {
131131
previous_out: IOutPoint | null;
132132
script_signature: ICreateTxInScript | null;
133133
};
134134

135-
// Entire request body sent to compute node for transaction processing
135+
// Entire request body sent to mempool node for transaction processing
136136
export type ICreateTransaction = {
137137
inputs: ICreateTxIn[];
138138
outputs: ITxOut[];

src/interfaces/network.interfaces.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export type IContentType = {
4040
decryptKeypairResponse?: IKeypair;
4141
} & IApiContentType;
4242

43-
// Content received from compute node / intercom server API endpoints
43+
// Content received from mempool node / intercom server API endpoints
4444
export type IApiContentType = {
4545
fetchUtxoAddressesResponse?: IFetchUtxoAddressesResponse;
4646
fetchBalanceResponse?: IFetchBalanceResponse;
@@ -55,7 +55,7 @@ export type IApiContentType = {
5555
};
5656

5757
export enum IAPIRoute {
58-
/* ------------------------------- COMPUTE 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,12 +78,12 @@ export enum IAPIRoute {
7878
}
7979

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

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

86-
// Response structure received from compute API endpoints
86+
// Response structure received from mempool API endpoints
8787
export type INetworkResponse = {
8888
id?: string;
8989
status: 'Success' | 'Error' | 'InProgress' | 'Unknown';
@@ -229,7 +229,7 @@ export type IPendingRbTxDetails = {
229229
senderExpectation: IDruidExpectation;
230230
receiverExpectation: IDruidExpectation;
231231
status: 'pending' | 'rejected' | 'accepted'; // Status of the DDE transaction
232-
computeHost: string; // Correlation between clients; send txs to the same compute node; chosen by the sender
232+
mempoolHost: string; // Correlation between clients; send txs to the same mempool node; chosen by the sender
233233
};
234234

235235
/* -------------------------------------------------------------------------- */

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/receipt.mgmt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { createTx, getInputsForTx } from './tx.mgmt';
2222
/* -------------------------------------------------------------------------- */
2323

2424
/**
25-
* Create a payload needed to create receipt assets which is suitable for processing by a compute node
25+
* Create a payload needed to create receipt assets which is suitable for processing by a mempool node
2626
*
2727
* @export
2828
* @param {Uint8Array} secretKey - Secret key as Uint8Array
@@ -69,7 +69,7 @@ export function createReceiptPayload(
6969
* Create one "half" of a receipt-based payment
7070
*
7171
* @export
72-
* @param {IFetchBalanceResponse} fetchBalanceResponse - Balance as received from the compute node
72+
* @param {IFetchBalanceResponse} fetchBalanceResponse - Balance as received from the mempool node
7373
* @param {string} druid - Unique DRUID value associated with this transaction; needs to match the other "half" of this receipt-based payment
7474
* @param {IDruidExpectation} senderExpectation - Expectation for the sender of this transaction
7575
* @param {IDruidExpectation} receiverExpectation - Expectation for the receiver of this transaction

0 commit comments

Comments
 (0)