Skip to content

Commit 4184cf2

Browse files
AndreAugusto11petermetz
authored andcommitted
refactor(plugin-odap-hermes): rename package, variables ODAP -> SATP
* renamed every variable from odap to satp * left out CHANGELOG files Signed-off-by: André Augusto <[email protected]>
1 parent 0804bab commit 4184cf2

File tree

158 files changed

+1380
-1378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+1380
-1378
lines changed

.cspell.json

+2
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@
138138
"recoverupdateackmessage",
139139
"RUSTC",
140140
"Rwset",
141+
"satp",
142+
"Satp",
141143
"sbjpubkey",
142144
"Secp",
143145
"shrn",

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1691,11 +1691,11 @@ jobs:
16911691
restore-keys: |
16921692
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
16931693
- run: ./tools/ci.sh
1694-
# cactus-plugin-odap-hermes:
1694+
# cactus-plugin-satp-hermes:
16951695
# continue-on-error: false
16961696
# env:
16971697
# FULL_BUILD_DISABLED: true
1698-
# JEST_TEST_PATTERN: packages/cactus-plugin-odap-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
1698+
# JEST_TEST_PATTERN: packages/cactus-plugin-satp-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
16991699
# JEST_TEST_RUNNER_DISABLED: false
17001700
# TAPE_TEST_RUNNER_DISABLED: true
17011701
# needs: build-dev

.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -206,19 +206,19 @@ jobs:
206206
name: cactus-plugin-keychain-memory-wasm-kotlin-client-${{ env.GITVERSION }}.jar
207207
path: packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar
208208

209-
- name: build-cactus-plugin-odap-hermes-kotlin-client
209+
- name: build-cactus-plugin-satp-hermes-kotlin-client
210210
run: |
211211
WDIR=`pwd`
212-
cd ${WDIR}/packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client
212+
cd ${WDIR}/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client
213213
chmod +x gradlew
214214
./gradlew clean
215215
./gradlew build
216216
217-
- name: publish-cactus-plugin-odap-hermes-kotlin-client
217+
- name: publish-cactus-plugin-satp-hermes-kotlin-client
218218
uses: actions/[email protected]
219219
with:
220-
name: cactus-plugin-odap-hermes-kotlin-client-${{ env.GITVERSION }}.jar
221-
path: packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar
220+
name: cactus-plugin-satp-hermes-kotlin-client-${{ env.GITVERSION }}.jar
221+
path: packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar
222222

223223
- name: build-cactus-example-supply-chain-business-logic-plugin-kotlin-client
224224
run: |

examples/cactus-example-cbdc-bridging-backend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-alpha.2",
6666
"@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0-alpha.2",
6767
"@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0-alpha.2",
68-
"@hyperledger/cactus-plugin-odap-hermes": "2.0.0-alpha.2",
68+
"@hyperledger/cactus-plugin-satp-hermes": "2.0.0-alpha.2",
6969
"@hyperledger/cactus-test-tooling": "2.0.0-alpha.2",
7070
"@openzeppelin/contracts": "4.9.3",
7171
"@openzeppelin/contracts-upgradeable": "4.9.3",

examples/cactus-example-cbdc-bridging-backend/src/main/typescript/cbdc-bridging-app.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ import {
1818
import {
1919
Configuration,
2020
DefaultApi as OdapApi,
21-
IOdapPluginKeyPair,
22-
} from "@hyperledger/cactus-plugin-odap-hermes";
21+
IKeyPair,
22+
} from "@hyperledger/cactus-plugin-satp-hermes";
2323
import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory";
2424
import { CbdcBridgingAppDummyInfrastructure } from "./infrastructure/cbdc-bridging-app-dummy-infrastructure";
2525
import { DefaultApi as FabricApi } from "@hyperledger/cactus-plugin-ledger-connector-fabric";
2626
import { DefaultApi as BesuApi } from "@hyperledger/cactus-plugin-ledger-connector-besu";
2727
import { DefaultApi as IpfsApi } from "@hyperledger/cactus-plugin-object-store-ipfs";
28-
import { FabricOdapGateway } from "./odap-extension/fabric-odap-gateway";
29-
import { BesuOdapGateway } from "./odap-extension/besu-odap-gateway";
28+
import { FabricSatpGateway } from "./satp-extension/fabric-satp-gateway";
29+
import { BesuSatpGateway } from "./satp-extension/besu-satp-gateway";
3030
import CryptoMaterial from "../../crypto-material/crypto-material.json";
3131

3232
export interface ICbdcBridgingApp {
3333
apiHost: string;
3434
apiServer1Port: number;
3535
apiServer2Port: number;
36-
clientGatewayKeyPair: IOdapPluginKeyPair;
37-
serverGatewayKeyPair: IOdapPluginKeyPair;
36+
clientGatewayKeyPair: IKeyPair;
37+
serverGatewayKeyPair: IKeyPair;
3838
logLevel?: LogLevelDesc;
3939
apiServerOptions?: ICactusApiServerOptions;
4040
disableSignalHandlers?: true;
@@ -236,6 +236,6 @@ export interface IStartInfo {
236236
readonly ipfsApiClient: IpfsApi;
237237
readonly besuApiClient: BesuApi;
238238
readonly fabricApiClient: FabricApi;
239-
readonly fabricOdapGateway: FabricOdapGateway;
240-
readonly besuOdapGateway: BesuOdapGateway;
239+
readonly fabricOdapGateway: FabricSatpGateway;
240+
readonly besuOdapGateway: BesuSatpGateway;
241241
}

examples/cactus-example-cbdc-bridging-backend/src/main/typescript/infrastructure/cbdc-bridging-app-dummy-infrastructure.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ import { PluginRegistry } from "@hyperledger/cactus-core";
3838
import { PluginObjectStoreIpfs } from "@hyperledger/cactus-plugin-object-store-ipfs";
3939
import AssetReferenceContractJson from "../../../solidity/asset-reference-contract/AssetReferenceContract.json";
4040
import CBDCcontractJson from "../../../solidity/cbdc-erc-20/CBDCcontract.json";
41-
import { IOdapPluginKeyPair } from "@hyperledger/cactus-plugin-odap-hermes";
42-
import { FabricOdapGateway } from "../odap-extension/fabric-odap-gateway";
43-
import { BesuOdapGateway } from "../odap-extension/besu-odap-gateway";
41+
import { IKeyPair } from "@hyperledger/cactus-plugin-satp-hermes";
42+
import { FabricSatpGateway } from "../satp-extension/fabric-satp-gateway";
43+
import { BesuSatpGateway } from "../satp-extension/besu-satp-gateway";
4444
import { PluginImportType } from "@hyperledger/cactus-core-api";
4545
import CryptoMaterial from "../../../crypto-material/crypto-material.json";
4646

@@ -303,12 +303,12 @@ export class CbdcBridgingAppDummyInfrastructure {
303303

304304
public async createClientGateway(
305305
nodeApiHost: string,
306-
keyPair: IOdapPluginKeyPair,
306+
keyPair: IKeyPair,
307307
ipfsPath: string,
308-
): Promise<FabricOdapGateway> {
308+
): Promise<FabricSatpGateway> {
309309
this.log.info(`Creating Source Gateway...`);
310-
const pluginSourceGateway = new FabricOdapGateway({
311-
name: "cactus-plugin-source#odapGateway",
310+
const pluginSourceGateway = new FabricSatpGateway({
311+
name: "cactus-plugin-source#satpGateway",
312312
dltIDs: ["DLT2"],
313313
instanceId: uuidv4(),
314314
keyPair: keyPair,
@@ -330,12 +330,12 @@ export class CbdcBridgingAppDummyInfrastructure {
330330

331331
public async createServerGateway(
332332
nodeApiHost: string,
333-
keyPair: IOdapPluginKeyPair,
333+
keyPair: IKeyPair,
334334
ipfsPath: string,
335-
): Promise<BesuOdapGateway> {
335+
): Promise<BesuSatpGateway> {
336336
this.log.info(`Creating Recipient Gateway...`);
337-
const pluginRecipientGateway = new BesuOdapGateway({
338-
name: "cactus-plugin-recipient#odapGateway",
337+
const pluginRecipientGateway = new BesuSatpGateway({
338+
name: "cactus-plugin-recipient#satpGateway",
339339
dltIDs: ["DLT1"],
340340
instanceId: uuidv4(),
341341
keyPair: keyPair,
+24-24
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ import {
88
InvokeContractV1Request as BesuInvokeContractV1Request,
99
} from "@hyperledger/cactus-plugin-ledger-connector-besu";
1010
import {
11-
IOdapPluginKeyPair,
12-
PluginOdapGateway,
13-
} from "@hyperledger/cactus-plugin-odap-hermes";
14-
import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-odap-hermes";
11+
IKeyPair,
12+
PluginSatpGateway,
13+
} from "@hyperledger/cactus-plugin-satp-hermes";
14+
import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes";
1515
import { ClientHelper } from "./client-helper";
1616
import { ServerHelper } from "./server-helper";
1717

18-
export interface IBesuOdapGatewayConstructorOptions {
18+
export interface IBesuSatpGatewayConstructorOptions {
1919
name: string;
2020
dltIDs: string[];
2121
instanceId: string;
22-
keyPair?: IOdapPluginKeyPair;
22+
keyPair?: IKeyPair;
2323
backupGatewaysAllowed?: string[];
2424

2525
ipfsPath?: string;
@@ -36,13 +36,13 @@ export interface IBesuOdapGatewayConstructorOptions {
3636
knexConfig?: Knex.Config;
3737
}
3838

39-
export class BesuOdapGateway extends PluginOdapGateway {
39+
export class BesuSatpGateway extends PluginSatpGateway {
4040
public besuApi?: BesuApi;
4141
public besuContractName?: string;
4242
public besuWeb3SigningCredential?: Web3SigningCredential;
4343
public besuKeychainId?: string;
4444

45-
public constructor(options: IBesuOdapGatewayConstructorOptions) {
45+
public constructor(options: IBesuSatpGatewayConstructorOptions) {
4646
super({
4747
name: options.name,
4848
dltIDs: options.dltIDs,
@@ -58,7 +58,7 @@ export class BesuOdapGateway extends PluginOdapGateway {
5858
}
5959

6060
private defineBesuConnection(
61-
options: IBesuOdapGatewayConstructorOptions,
61+
options: IBesuSatpGatewayConstructorOptions,
6262
): void {
6363
const fnTag = `${this.className}#defineBesuConnection()`;
6464

@@ -124,7 +124,7 @@ export class BesuOdapGateway extends PluginOdapGateway {
124124

125125
let besuCreateAssetProof = "";
126126

127-
await this.storeOdapLog({
127+
await this.storeLog({
128128
sessionID: sessionID,
129129
type: "exec",
130130
operation: "create-asset",
@@ -175,14 +175,14 @@ export class BesuOdapGateway extends PluginOdapGateway {
175175
`${fnTag}, proof of the asset creation: ${besuCreateAssetProof}`,
176176
);
177177

178-
await this.storeOdapProof({
178+
await this.storeProof({
179179
sessionID: sessionID,
180180
type: "proof",
181181
operation: "create",
182182
data: besuCreateAssetProof,
183183
});
184184

185-
await this.storeOdapLog({
185+
await this.storeLog({
186186
sessionID: sessionID,
187187
type: "done",
188188
operation: "create-asset",
@@ -207,7 +207,7 @@ export class BesuOdapGateway extends PluginOdapGateway {
207207

208208
let besuDeleteAssetProof = "";
209209

210-
await this.storeOdapLog({
210+
await this.storeLog({
211211
sessionID: sessionID,
212212
type: "exec",
213213
operation: "delete-asset",
@@ -254,14 +254,14 @@ export class BesuOdapGateway extends PluginOdapGateway {
254254
`${fnTag}, proof of the asset deletion: ${besuDeleteAssetProof}`,
255255
);
256256

257-
await this.storeOdapProof({
257+
await this.storeProof({
258258
sessionID: sessionID,
259259
type: "proof",
260260
operation: "delete",
261261
data: besuDeleteAssetProof,
262262
});
263263

264-
await this.storeOdapLog({
264+
await this.storeLog({
265265
sessionID: sessionID,
266266
type: "done",
267267
operation: "delete-asset",
@@ -286,7 +286,7 @@ export class BesuOdapGateway extends PluginOdapGateway {
286286

287287
let besuLockAssetProof = "";
288288

289-
await this.storeOdapLog({
289+
await this.storeLog({
290290
sessionID: sessionID,
291291
type: "exec",
292292
operation: "lock-asset",
@@ -330,14 +330,14 @@ export class BesuOdapGateway extends PluginOdapGateway {
330330

331331
this.log.info(`${fnTag}, proof of the asset lock: ${besuLockAssetProof}`);
332332

333-
await this.storeOdapProof({
333+
await this.storeProof({
334334
sessionID: sessionID,
335335
type: "proof",
336336
operation: "lock",
337337
data: besuLockAssetProof,
338338
});
339339

340-
await this.storeOdapLog({
340+
await this.storeLog({
341341
sessionID: sessionID,
342342
type: "done",
343343
operation: "lock-asset",
@@ -362,7 +362,7 @@ export class BesuOdapGateway extends PluginOdapGateway {
362362

363363
let besuUnlockAssetProof = "";
364364

365-
await this.storeOdapLog({
365+
await this.storeLog({
366366
sessionID: sessionID,
367367
type: "exec-rollback",
368368
operation: "unlock-asset",
@@ -412,14 +412,14 @@ export class BesuOdapGateway extends PluginOdapGateway {
412412
`${fnTag}, proof of the asset unlock: ${besuUnlockAssetProof}`,
413413
);
414414

415-
await this.storeOdapProof({
415+
await this.storeProof({
416416
sessionID: sessionID,
417417
type: "proof-rollback",
418418
operation: "unlock",
419419
data: besuUnlockAssetProof,
420420
});
421421

422-
await this.storeOdapLog({
422+
await this.storeLog({
423423
sessionID: sessionID,
424424
type: "done-rollback",
425425
operation: "unlock-asset",
@@ -450,7 +450,7 @@ export class BesuOdapGateway extends PluginOdapGateway {
450450

451451
let besuCreateAssetProof = "";
452452

453-
await this.storeOdapLog({
453+
await this.storeLog({
454454
sessionID: sessionID,
455455
type: "exec-rollback",
456456
operation: "create-asset",
@@ -504,14 +504,14 @@ export class BesuOdapGateway extends PluginOdapGateway {
504504
`${fnTag}, proof of the asset create: ${besuCreateAssetProof}`,
505505
);
506506

507-
await this.storeOdapProof({
507+
await this.storeProof({
508508
sessionID: sessionID,
509509
type: "proof-rollback",
510510
operation: "create",
511511
data: besuCreateAssetProof,
512512
});
513513

514-
await this.storeOdapLog({
514+
await this.storeLog({
515515
sessionID: sessionID,
516516
type: "done-rollback",
517517
operation: "create-asset",

0 commit comments

Comments
 (0)