diff --git a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json b/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json index 4cc0d3870c..239399b6fa 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json +++ b/packages/cactus-plugin-bungee-hermes/src/main/json/openapi.json @@ -28,8 +28,8 @@ "PrivacyPolicyOpts": { "description": "identifier of the policy used to process a view", "type": "string", - "enum": ["pruneState"], - "x-enum-varnames": ["PruneState"] + "enum": ["pruneState", "singleTransaction"], + "x-enum-varnames": ["PruneState", "SingleTransaction"] }, "MergePolicyOpts": { "description": "identifier of the policy used to merge views (can be none)", diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts index 7a3d524e57..269ecff837 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -185,7 +185,8 @@ export interface MergeViewsResponse { */ export const PrivacyPolicyOpts = { - PruneState: 'pruneState' + PruneState: 'pruneState', + SingleTransaction: 'singleTransaction' } as const; export type PrivacyPolicyOpts = typeof PrivacyPolicyOpts[keyof typeof PrivacyPolicyOpts]; diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts index a32c5314d5..4e78f62009 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/privacy-policies.ts @@ -18,11 +18,24 @@ export class PrivacyPolicies { return view; } + public singleTransaction( + view: View, + stateId: string, + transactionId: string, + ): View { + const snapshot = view.getSnapshot(); + snapshot.filterTransaction(stateId, transactionId); + return view; + } + public getPrivacyPolicy(opts: PrivacyPolicyOpts): IPrivacyPolicy | undefined { switch (opts) { case PrivacyPolicyOpts.PruneState: return this.pruneState; break; + case PrivacyPolicyOpts.SingleTransaction: + return this.singleTransaction; + break; default: return undefined; break; diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts index 3a22583fa8..b8b73fcda2 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/snapshot.ts @@ -76,6 +76,22 @@ export class Snapshot { this.stateBins = stateBins; } + public selectStates(states: string[]): void { + const stateBins: State[] = []; + for (const state of this.stateBins) { + if (states.includes(state.getId())) { + stateBins.push(state); + } + } + this.stateBins = stateBins; + } + + public filterTransaction(stateId: string, transaction: string): void { + this.selectStates([stateId]); + const state = this.stateBins[0]; + state.selectTransactions([transaction]); + } + public getSnapshotJson(): string { const snapshotJson = { id: this.id, diff --git a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts index b390afa36c..ad1ed6bb65 100644 --- a/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts +++ b/packages/cactus-plugin-bungee-hermes/src/main/typescript/view-creation/state.ts @@ -54,6 +54,16 @@ export class State { return this.transactions; } + public selectTransactions(txs: string[]): void { + const transactions: Transaction[] = []; + for (const tx of this.transactions) { + if (txs.includes(tx.getId())) { + transactions.push(tx); + } + } + this.transactions = transactions; + } + public getInitialTime(): string { if (this.transactions.length >= 1) { return this.transactions[0].getTimeStamp(); diff --git a/packages/cactus-plugin-satp-hermes/.gitignore b/packages/cactus-plugin-satp-hermes/.gitignore index 55270896e4..2d414222df 100644 --- a/packages/cactus-plugin-satp-hermes/.gitignore +++ b/packages/cactus-plugin-satp-hermes/.gitignore @@ -4,3 +4,4 @@ src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator src/main/typescript/generated/gateway-client/typescript-axios/api.ts src/main/typescript/generated/gateway-client/typescript-axios/git_push.sh src/main/typescript/generated/gateway-client/typescript-axios/.openapi-generator/FILES +src/main/typescript/fabric-contracts/satp/chaincode-typescript/.yarn/ diff --git a/packages/cactus-plugin-satp-hermes/foundry.toml b/packages/cactus-plugin-satp-hermes/foundry.toml new file mode 100644 index 0000000000..2018a4da62 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/foundry.toml @@ -0,0 +1,3 @@ +[profile.default] +solc-version = "0.8.20" +evm-version = "paris" \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json index e1f6d2f686..fd9c257bf4 100644 --- a/packages/cactus-plugin-satp-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -31,6 +31,10 @@ { "name": "Rafael Belchior", "url": "https://github.com/RafaelAPB" + }, + { + "name": "Carlos Amaro", + "url": "https://github.com/LordKubaya" } ], "main": "dist/lib/main/typescript/index.js", @@ -46,8 +50,12 @@ "bundle-openapi-json": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/json/openapi-blo-bundled.json -r -t json", "bundle-openapi-yaml": "swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/yml/bol/openapi-blo-bundled.yml -r -t yaml", "codegen": "run-p 'codegen:*'", + "codegen:abi": "yarn forge:all && abi-types-generator './src/solidity/generated/satp-wrapper.sol/SATPWrapperContract.json' --output='./src/main/typescript/generated'", "codegen:openapi": "npm run generate-sdk", "codegen:proto": "npm run generate-proto", + "forge": "forge build ./src/solidity/*.sol --out ./src/solidity/generated", + "forge:all": "run-p 'forge' 'forge:test'", + "forge:test": "forge build ./src/test/solidity/contracts/*.sol --out ./src/test/solidity/generated", "generate-proto": "cd src/main/proto && buf generate --template buf.gen.yaml --config buf.yaml --verbose", "generate-sdk": "run-p 'generate-sdk:*'", "generate-sdk:go": "openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g go -o ./src/main/go/generated/gateway-client --additional-properties=packageName=generated,generateInterfaces=true,packageVersion=v0.0.1,moduleName=github.com/hyperledger/cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated --git-user-id hyperledger --git-repo-id cacti/packages/cactus-plugin-satp-hermes/src/main/go/generated", @@ -81,17 +89,20 @@ "@connectrpc/protoc-gen-connect-es": "1.3.0", "@bufbuild/protobuf": "1.10.0", "@hyperledger/cactus-plugin-bungee-hermes": "2.0.0", - "axios": "1.7.7", "body-parser": "1.20.2", "class-transformer": "0.5.1", "class-validator": "0.14.1", "crypto-js": "4.2.0", + "ethers": "^6.13.1", "express": "4.17.2", "fabric-network": "2.2.19", "fs-extra": "11.2.0", + "hardhat": "2.22.5", "knex": "2.4.0", "kubo-rpc-client": "3.0.1", + "npm-run-all": "4.1.5", + "openzeppelin-solidity": "3.4.2", "secp256k1": "4.0.3", "socket.io": "4.6.2", "sqlite3": "5.1.5", @@ -104,6 +115,7 @@ "devDependencies": { "@apidevtools/swagger-cli": "4.0.4", "@bufbuild/buf": "1.29.0", + "@bufbuild/protobuf": "1.7.2", "@bufbuild/protoc-gen-es": "1.8.0", "@quobix/vacuum": "^0.9.10", "@types/body-parser": "1.19.4", @@ -115,6 +127,7 @@ "@types/tape": "4.13.4", "@types/uuid": "10.0.0", "body-parser": "1.20.3", + "ethereum-abi-types-generator": "1.3.4", "express": "4.21.0", "fabric-network": "2.2.20", "kubo-rpc-client": "3.0.1", diff --git a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto index 11ff12313a..0f96e0dd1d 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto +++ b/packages/cactus-plugin-satp-hermes/src/main/proto/cacti/satp/v02/stage_3.proto @@ -21,7 +21,7 @@ message CommitReadyResponseMessage { message CommitFinalAssertionRequestMessage { cacti.satp.v02.common.CommonSatp common = 1; - cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 2; + string burn_assertion_claim = 2; cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 3; string client_transfer_number = 4; string client_signature = 5; @@ -30,7 +30,7 @@ message CommitFinalAssertionRequestMessage { message CommitFinalAcknowledgementReceiptResponseMessage { cacti.satp.v02.common.CommonSatp common = 1; - cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 2; + string assignment_assertion_claim = 2; cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 3; string server_transfer_number = 4; string server_signature = 5; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts index 76034e9f1e..626e05ea1c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/blo/admin/get-status-handler-service.ts @@ -3,7 +3,7 @@ import { StatusRequest, StatusResponse, Transact200ResponseStatusResponseOriginChain, -} from "../../generated/gateway-client/typescript-axios"; +} from "../../generated/gateway-client/typescript-axios/api"; import { Logger } from "@hyperledger/cactus-common"; export async function ExecuteGetStatus( diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts index 239b92132b..f98305679f 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/client/stage1-client-service.ts @@ -30,6 +30,7 @@ import { ISATPClientServiceOptions, ISATPServiceOptions, } from "../satp-service"; +import { ACCEPTANCE } from "../../../generated/proto/cacti/satp/v02/common/session_pb"; export class Stage1ClientService extends SATPService { public static readonly SATP_STAGE = "1"; @@ -211,7 +212,7 @@ export class Stage1ClientService extends SATPService { const fnTag = `${this.getServiceIdentifier()}#${stepTag}`; this.Log.debug(`${fnTag}, transferCommenceRequest...`); - if (!response || !response.common) { + if (response.common == undefined) { throw new Error("Response or response.common is undefined"); } @@ -226,11 +227,17 @@ export class Stage1ClientService extends SATPService { commonBody.messageType = MessageType.TRANSFER_COMMENCE_REQUEST; commonBody.sequenceNumber = response.common.sequenceNumber + BigInt(1); - //todo check when reject - commonBody.hashPreviousMessage = getMessageHash( - sessionData, - MessageType.INIT_RECEIPT, - ); + if (sessionData.acceptance == ACCEPTANCE.ACCEPTANCE_ACCEPTED) { + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.INIT_RECEIPT, + ); + } else if (sessionData.acceptance == ACCEPTANCE.ACCEPTANCE_CONDITIONAL) { + commonBody.hashPreviousMessage = getMessageHash( + sessionData, + MessageType.INIT_REJECT, + ); + } commonBody.clientGatewayPubkey = sessionData.clientGatewayPubkey; commonBody.serverGatewayPubkey = sessionData.serverGatewayPubkey; @@ -243,7 +250,15 @@ export class Stage1ClientService extends SATPService { transferCommenceRequestMessage.hashTransferInitClaims = sessionData.hashTransferInitClaims; - // transferCommenceRequestMessage.clientTransferNumber = sessionData.clientTransferNumber; + if (sessionData.transferContextId != undefined) { + transferCommenceRequestMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.clientTransferNumber != undefined) { + transferCommenceRequestMessage.clientTransferNumber = + sessionData.clientTransferNumber; + } const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferCommenceRequestMessage)), @@ -296,8 +311,6 @@ export class Stage1ClientService extends SATPService { throw new Error(`${fnTag}, satp common body is missing required fields`); } - // const sessionId = response.common.sessionId; - const sessionData = session.getSessionData(); if (sessionData == undefined) { @@ -369,6 +382,15 @@ export class Stage1ClientService extends SATPService { ); } + if ( + sessionData.transferContextId != undefined && + response.common.transferContextId != sessionData.transferContextId + ) { + throw new Error( + `${fnTag}, TransferProposalReceipt transferContextId mismatch or not received`, + ); + } + if ( response.common.messageType == MessageType.INIT_REJECT && response.transferCounterClaims == undefined diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts new file mode 100644 index 0000000000..c7fb4ed40b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/besu-bridge.ts @@ -0,0 +1,386 @@ +import { + BesuConfig, + TransactionResponse, +} from "../../../types/blockchain-interaction"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + RunTransactionResponse, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { NetworkBridge } from "./network-bridge"; +import { PluginBungeeHermes } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { StrategyBesu } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/strategy/strategy-besu"; +import { PrivacyPolicyOpts } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/generated/openapi/typescript-axios"; +import { BesuAsset, getVarTypes } from "./types/besu-asset"; +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { InteractionsRequest } from "../../../generated/SATPWrapperContract"; +import { getInteractionType } from "./types/asset"; +import { InteractionData } from "./types/interact"; + +interface BesuResponse { + success: boolean; + out: RunTransactionResponse; + callOutput: unknown; +} +export class BesuBridge implements NetworkBridge { + public static readonly CLASS_NAME = "BesuBridge"; + + network: string = "BESU"; + + public log: Logger; + + private connector: PluginLedgerConnectorBesu; + private bungee: PluginBungeeHermes; + private options: IPluginLedgerConnectorBesuOptions; + private config: BesuConfig; + + constructor(besuConfig: BesuConfig) { + this.config = besuConfig; + this.options = besuConfig.options; + const level = this.config.logLevel || "INFO"; + const label = BesuBridge.CLASS_NAME; + + this.log = LoggerProvider.getOrCreate({ label, level }); + + this.connector = new PluginLedgerConnectorBesu(besuConfig.options); + this.bungee = new PluginBungeeHermes(besuConfig.bungeeOptions); + this.bungee.addStrategy(this.network, new StrategyBesu("INFO")); + } + + public async wrapAsset(asset: BesuAsset): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#wrapAsset Wrapping Asset: {${asset.tokenId}, ${asset.owner}, ${asset.contractAddress}, ${asset.tokenType}}`, + ); + + if (asset.ontology === undefined) { + throw new Error( + `${BesuBridge.CLASS_NAME}#wrapAsset: Ontology is required to interact with tokens`, + ); + } + + const interactions = this.interactionList(asset.ontology); + + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "wrap", + params: [ + asset.contractAddress, + asset.tokenType, + asset.tokenId, + asset.owner, + interactions, + ], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#wrapAsset:Transaction failed`); + } + + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async unwrapAsset(assetId: string): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#UnwrapAsset Unwrapping Asset: ${assetId}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "unwrap", + params: [assetId], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error( + `${BesuBridge.CLASS_NAME}#unwrapAsset:Transaction failed`, + ); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async lockAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#lockAsset Locking Asset: ${assetId} amount: ${amount}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "lock", + params: [assetId, amount.toString()], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#lockAsset:Transaction failed}`); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async unlockAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#unlockAsset Unlocking Asset: ${assetId} amount: ${amount}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "unlock", + params: [assetId, amount.toString()], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error( + `${BesuBridge.CLASS_NAME}#unlockAsset:Transaction failed}`, + ); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async mintAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#mintAsset Minting Asset: ${assetId} amount: ${amount}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [assetId, amount.toString()], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#mintAsset:Transaction failed}`); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async burnAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#burnAsset Burning Asset: ${assetId} amount: ${amount}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "burn", + params: [assetId, amount.toString()], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#burnAsset:Transaction failed}`); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + public async assignAsset( + assetId: string, + to: string, + amount: number, + ): Promise { + this.log.debug( + `${BesuBridge.CLASS_NAME}#assignAsset Assigning Asset: ${assetId} amount: ${amount} to: ${to}`, + ); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Send, + methodName: "assign", + params: [assetId, to, amount], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + if (!response.success) { + throw new Error( + `${BesuBridge.CLASS_NAME}#assignAsset:Transaction failed}`, + ); + } + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + }; + } + + public async getAssets(): Promise { + this.log.debug(`${BesuBridge.CLASS_NAME}#getAssets Getting Assets`); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Call, + methodName: "getAllAssetsIDs", + params: [], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#getAssets: Transaction failed`); + } + + return response.callOutput as string[]; + } + + public async getAsset(assetId: string): Promise { + this.log.debug(`${BesuBridge.CLASS_NAME}#getAsset Getting Asset`); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: EthContractInvocationType.Call, + methodName: "getToken", + params: [assetId], + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + + if (!response.success) { + throw new Error(`${BesuBridge.CLASS_NAME}#getAsset: Transaction failed`); + } + + return response.callOutput as BesuAsset; + } + + public networkName(): string { + return this.network; + } + + public async runTransaction( + methodName: string, + params: string[], + invocationType: EthContractInvocationType, + ): Promise { + this.log.debug(`Running Transaction: ${methodName}`); + const response = (await this.connector.invokeContract({ + contractName: this.config.contractName, + keychainId: this.config.keychainId, + invocationType: invocationType, + methodName: methodName, + params: params, + signingCredential: this.config.signingCredential, + gas: this.config.gas, + })) as BesuResponse; + + if (!response.success) { + throw new Error( + `${BesuBridge.CLASS_NAME}#runTransaction:Transaction failed}`, + ); + } + + return { + transactionId: response.out.transactionReceipt.transactionHash ?? "", + transactionReceipt: JSON.stringify(response.out.transactionReceipt) ?? "", + output: response.callOutput ?? undefined, + }; + } + + public async getReceipt( + assetId: string, + transactionHash: string, + ): Promise { + this.log.debug( + `Getting Receipt: ${assetId} transactionHash: ${transactionHash}`, + ); + //todo needs implementation + const networkDetails = { + //connector: this.connector, + connectorApiPath: "", + signingCredential: this.config.signingCredential, + contractName: this.config.contractName, + contractAddress: this.config.contractAddress, + keychainId: this.config.keychainId, + participant: "Org1MSP", + }; + + const snapshot = await this.bungee.generateSnapshot( + [], + this.network, + networkDetails, + ); + + const generated = this.bungee.generateView( + snapshot, + "0", + Number.MAX_SAFE_INTEGER.toString(), + undefined, + ); + + if (generated.view == undefined) { + throw new Error("View is undefined"); + } + + const view = await this.bungee.processView( + generated.view, + //PrivacyPolicyOpts.SingleTransaction, + PrivacyPolicyOpts.PruneState, + [assetId, transactionHash], + ); + + return view.getViewStr(); + } + + private interactionList(jsonString: string): InteractionsRequest[] { + const ontologyJSON = JSON.parse(jsonString); + + const interactions: InteractionsRequest[] = []; + + for (const interaction in ontologyJSON["ontology"]) { + const functions: string[] = []; + const variables: string | number[][] = []; + + for (const signature of ontologyJSON["ontology"][ + interaction + ] as InteractionData[]) { + functions.push(signature.functionSignature); + const vars: string | number[] = []; + + for (const variable of signature.variables) { + vars.push(getVarTypes(variable)); + } + variables.push(vars); + } + + const interactionRequest: InteractionsRequest = { + interactionType: getInteractionType(interaction), + functionsSignature: functions, + variables: variables, + available: true, + }; + interactions.push(interactionRequest); + } + + return interactions; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/bridge-manager.ts new file mode 100644 index 0000000000..dcb63f272a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/bridge-manager.ts @@ -0,0 +1,79 @@ +// this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). +// should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output + +import { Asset } from "./types/asset"; + +export abstract class BridgeManager { + /** + * wraps an asset on the wrapper contract + * @param asset + * @returns transaction hash + */ + public abstract wrapAsset(asset: Asset): Promise; + /** + * unwraps an asset on the wrapper contract + * @param assetId + * @returns transaction hash + */ + public abstract unwrapAsset(assetId: string): Promise; + /** + * Locks an asset on the blockchain + * @param assetId + * @param amount + * @returns transaction hash + **/ + public abstract lockAsset(assetId: string, amount: number): Promise; + /** + * Unlocks an asset on the blockchain + * @param assetId + * @param amount + * @returns transaction hash + **/ + public abstract unlockAsset(assetId: string, amount: number): Promise; + /** + * Mints an asset on the blockchain + * @param assetId + * @param amount + * @returns transaction hash + **/ + public abstract mintAsset(assetId: string, amount: number): Promise; + /** + * Burns an asset on the blockchain + * @param assetId + * @param amount + * @returns transaction hash + **/ + public abstract burnAsset(assetId: string, amount: number): Promise; + /** + * Assigns an asset to a recipient on the blockchain + * @param assetId + * @param recipient + * @param amount + * @returns transaction hash + **/ + public abstract assignAsset( + assetId: string, + recipient: string, + amount: number, + ): Promise; + /** + * Verifies the existence of an asset on the blockchain + * @param assetId + * @returns boolean + **/ + + //TODO create-rollback + public abstract verifyAssetExistence( + assetId: string, + invocationType: unknown, + ): Promise; + /** + * Verifies if an asset is locked on the blockchain + * @param assetId + * @returns boolean + **/ + public abstract verifyLockAsset( + assetId: string, + invocationType: unknown, + ): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts new file mode 100644 index 0000000000..59d7b860c6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/fabric-bridge.ts @@ -0,0 +1,325 @@ +import { + FabricContractInvocationType, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { PluginBungeeHermes } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { StrategyFabric } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/strategy/strategy-fabric"; +import { + FabricConfig, + TransactionResponse, +} from "../../../types/blockchain-interaction"; +import { PrivacyPolicyOpts } from "@hyperledger/cactus-plugin-bungee-hermes/dist/lib/main/typescript/generated/openapi/typescript-axios"; +import { FabricAsset, getVarTypes } from "./types/fabric-asset"; +import { + Logger, + LogLevelDesc, + LoggerProvider, +} from "@hyperledger/cactus-common"; +import { NetworkBridge } from "./network-bridge"; +import { InteractionSignature } from "./types/fabric-asset"; +import { InteractionData } from "./types/interact"; +import { getInteractionType } from "./types/asset"; + +export class FabricBridge implements NetworkBridge { + public static readonly CLASS_NAME = "FabricBridge"; + + network: string = "FABRIC"; + + public log: Logger; + + connector: PluginLedgerConnectorFabric; + bungee: PluginBungeeHermes; + options: IPluginLedgerConnectorFabricOptions; + config: FabricConfig; + + constructor(fabricConfig: FabricConfig, level: LogLevelDesc) { + this.config = fabricConfig; + this.options = fabricConfig.options; + this.connector = new PluginLedgerConnectorFabric(fabricConfig.options); + this.bungee = new PluginBungeeHermes(fabricConfig.bungeeOptions); + this.bungee.addStrategy(this.network, new StrategyFabric("INFO")); + this.log = LoggerProvider.getOrCreate({ + label: StrategyFabric.CLASS_NAME, + level, + }); + } + public async wrapAsset(asset: FabricAsset): Promise { + this.log.debug(`Wrapping Asset: ${asset.tokenId}`); + + if (asset.ontology === undefined) { + throw new Error( + `${FabricBridge.CLASS_NAME}#wrapAsset: Ontology is required to interact with tokens`, + ); + } + + const interactions = this.interactionList(asset.ontology); + + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "wrap", + params: [ + asset.tokenType.toString(), + asset.tokenId, + asset.owner, + asset.mspId, + asset.channelName, + asset.contractName, + JSON.stringify(interactions), + ], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async unwrapAsset(assetId: string): Promise { + this.log.debug(`Unwrapping Asset: ${assetId}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "unwrap", + params: [assetId], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async lockAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug(`Locking Asset: ${assetId} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "lock", + params: [assetId, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async unlockAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug(`Unlocking Asset: ${assetId} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "unlock", + params: [assetId, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async mintAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug(`Minting Asset: ${assetId} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "mint", + params: [assetId, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async burnAsset( + assetId: string, + amount: number, + ): Promise { + this.log.debug(`Burning Asset: ${assetId} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "burn", + params: [assetId, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + public async assignAsset( + assetId: string, + to: string, + amount: number, + ): Promise { + this.log.debug(`Assigning Asset: ${assetId} to: ${to} amount: ${amount}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "assign", + params: [assetId, to, amount.toString()], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + output: response.functionOutput, + }; + } + + public async getAsset(assetId: string): Promise { + this.log.debug(`Getting Asset: ${assetId}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "GetAsset", + params: [assetId], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Call, + }); + + const token = JSON.parse(response.functionOutput) as FabricAsset; + + return token; + } + + public async getClientId(): Promise { + this.log.debug(`Getting Client Id`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: "ClientAccountID", + params: [], + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Call, + }); + + return response.functionOutput; + } + + public networkName(): string { + return this.network; + } + + public async runTransaction( + methodName: string, + params: string[], + ): Promise { + this.log.debug(`Running Transaction: ${methodName} with params: ${params}`); + const response = await this.connector.transact({ + signingCredential: this.config.signingCredential, + channelName: this.config.channelName, + methodName: methodName, + params: params, + contractName: this.config.contractName, + invocationType: FabricContractInvocationType.Send, + }); + + return { + transactionId: response.transactionId, + transactionReceipt: "response.transactionReceipt", + output: response.functionOutput, + }; + } + + public async getReceipt( + assetId: string, + transactionId: string, + ): Promise { + this.log.debug( + `Getting Receipt for Asset: ${assetId} Transaction: ${transactionId}`, + ); + //todo needs implementation + const networkDetails = { + //connector: this.connector, + connectorApiPath: "", //todo check this to not use api + signingCredential: this.config.signingCredential, + contractName: this.config.contractName, + channelName: this.config.channelName, + participant: "Org1MSP", + }; + + const snapshot = await this.bungee.generateSnapshot( + [], + this.network, + networkDetails, + ); + + const generated = this.bungee.generateView( + snapshot, + "0", + Number.MAX_SAFE_INTEGER.toString(), + undefined, + ); + + if (generated.view == undefined) { + throw new Error("View is undefined"); + } + + const view = await this.bungee.processView( + generated.view, + //PrivacyPolicyOpts.SingleTransaction, + PrivacyPolicyOpts.PruneState, + [assetId, transactionId], + ); + + return view.getViewStr(); + } + + private interactionList(jsonString: string): InteractionSignature[] { + const ontologyJSON = JSON.parse(jsonString); + + const interactions: InteractionSignature[] = []; + + for (const interaction in ontologyJSON["ontology"]) { + const functions: string[] = []; + const variables: string | number[][] = []; + + for (const signature of ontologyJSON["ontology"][ + interaction + ] as InteractionData[]) { + functions.push(signature.functionSignature); + const vars: string | number[] = []; + + for (const variable of signature.variables) { + vars.push(getVarTypes(variable)); + } + variables.push(vars); + } + + const interactionRequest: InteractionSignature = { + type: getInteractionType(interaction), + functionsSignature: functions, + variables: variables, + }; + interactions.push(interactionRequest); + } + + this.log.info(`Interactions: ${JSON.stringify(interactions)}`); + + return interactions; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts new file mode 100644 index 0000000000..acb851090b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/network-bridge.ts @@ -0,0 +1,51 @@ +import { TransactionResponse } from "../../../types/blockchain-interaction"; +import { Asset } from "./types/asset"; + +export abstract class NetworkBridge { + network!: string; + + public networkName(): string { + return this.network; + } + + public abstract wrapAsset(asset: Asset): Promise; + + public abstract unwrapAsset(assetId: string): Promise; + + public abstract lockAsset( + assetId: string, + amount: number, + ): Promise; + + public abstract unlockAsset( + assetId: string, + amount: number, + ): Promise; + + public abstract mintAsset( + assetId: string, + amount: number, + ): Promise; + + public abstract burnAsset( + assetId: string, + amount: number, + ): Promise; + + public abstract assignAsset( + assetId: string, + to: string, + amount: number, + ): Promise; + + public abstract runTransaction( + methodName: string, + params: string[], + invocationType: unknown, + ): Promise; + + public abstract getReceipt( + assetId: string, + transactionId: string, + ): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts new file mode 100644 index 0000000000..55ace0586e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/satp-bridge-manager.ts @@ -0,0 +1,200 @@ +// this file contains a class that encapsulates the logic for managing the SATP bridge (lock, unlock, etc). +// should inject satp gateway session data (having parameters/chains for transactions), and processes smart contract output +import { BridgeManager } from "./bridge-manager"; +import { Logger, LoggerProvider } from "@hyperledger/cactus-common"; +import { SATPBridgeConfig } from "../../types"; +import { Asset } from "./types/asset"; + +export class SatpBridgeManager implements BridgeManager { + public static readonly CLASS_NAME = "FabricBridgeManager"; + + private _log: Logger; + + public get log(): Logger { + return this._log; + } + + constructor(private config: SATPBridgeConfig) { + const level = "INFO"; + const label = SatpBridgeManager.CLASS_NAME; + this._log = LoggerProvider.getOrCreate({ level, label }); + } + + public async wrapAsset(asset: Asset): Promise { + const fnTag = `${this.className}#wrap()`; + + const response = await this.config.network.wrapAsset(asset); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = this.config.network.getReceipt( + asset.tokenId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset wrapping: ${receipt}`); + + return receipt; + } + public async unwrapAsset(assetId: string): Promise { + const fnTag = `${this.className}#unwrap()`; + + const response = await this.config.network.unwrapAsset(assetId); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = this.config.network.getReceipt( + assetId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset unwrapping: ${receipt}`); + + return receipt; + } + + public get className(): string { + return SatpBridgeManager.CLASS_NAME; + } + + public async lockAsset(assetId: string, amount: number): Promise { + const fnTag = `${this.className}#lockAsset()`; + + const response = await this.config.network.lockAsset(assetId, amount); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset lock: ${receipt}`); + + return receipt; + } + + public async unlockAsset(assetId: string, amount: number): Promise { + const fnTag = `${this.className}#unlockAsset()`; + + const response = await this.config.network.unlockAsset(assetId, amount); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset unlock: ${receipt}`); + + return receipt; + } + + public async mintAsset(assetId: string, amount: number): Promise { + const fnTag = `${this.className}#mintAsset()`; + + const transaction = await this.config.network.mintAsset(assetId, amount); + + if (transaction.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + transaction.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset creation: ${receipt}`); + + return receipt; + } + + public async burnAsset(assetId: string, amount: number): Promise { + const fnTag = `${this.className}#burnAsset()`; + + const transaction = await this.config.network.burnAsset(assetId, amount); + + if (transaction.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + transaction.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset deletion: ${receipt}`); + + return receipt; + } + + public async assignAsset( + assetId: string, + recipient: string, + amount: number, + ): Promise { + const fnTag = `${this.className}#assignAsset()`; + + const response = await this.config.network.assignAsset( + assetId, + recipient, + amount, + ); + + if (response.transactionId == undefined) { + throw new Error(`${fnTag}, transactionId is undefined`); + } + + const receipt = await this.config.network.getReceipt( + assetId, + response.transactionId, + ); + + this.log.info(`${fnTag}, proof of the asset assignment: ${receipt}`); + + return receipt; + } + public async verifyAssetExistence( + assetId: string, + invocationType: unknown, + ): Promise { + //todo: implement this + const assetExists = await this.config.network.runTransaction( + "AssetExists", + [assetId], + invocationType, + ); + + if (assetExists == undefined) { + return false; + } + + return true; + } + public async verifyLockAsset( + assetId: string, + invocationType: unknown, + ): Promise { + //todo: implement this + const lockAsset = await this.config.network.runTransaction( + "LockAsset", + [assetId], + invocationType, + ); + + if (lockAsset.output == undefined) { + return false; + } + + return true; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts new file mode 100644 index 0000000000..2c743e415f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/asset.ts @@ -0,0 +1,34 @@ +export interface Asset { + tokenId: string; + tokenType: TokenType; + owner: string; + amount: number; + ontology: string; +} + +//When there is new token type, add it here or it will break the code +export enum TokenType { + ERC20 = 0, + ERC721 = 1, + ERC1155 = 2, + NONSTANDARD = 3, +} + +export enum InteractionType { + MINT = 0, + BURN = 1, + ASSIGN = 2, + CHECKPERMISSION = 3, + LOCK = 4, + UNLOCK = 5, +} + +export function getTokenType(stringType: string) { + return TokenType[stringType.toUpperCase() as keyof typeof TokenType]; +} + +export function getInteractionType(stringType: string) { + return InteractionType[ + stringType.toUpperCase() as keyof typeof InteractionType + ]; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts new file mode 100644 index 0000000000..af5847b08b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/besu-asset.ts @@ -0,0 +1,20 @@ +import { Asset } from "./asset"; + +export interface BesuAsset extends Asset { + contractName: string; + contractAddress: string; +} + +export enum VarType { + CONTRACTADDRESS = 0, + TOKENTYPE = 1, + TOKENID = 2, + OWNER = 3, + AMOUNT = 4, + BRIDGE = 5, + RECEIVER = 6, +} + +export function getVarTypes(stringType: string) { + return VarType[stringType.toUpperCase() as keyof typeof VarType]; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts new file mode 100644 index 0000000000..6b0fc4e368 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/fabric-asset.ts @@ -0,0 +1,30 @@ +import { Asset, InteractionType } from "./asset"; + +export interface FabricAsset extends Asset { + mspId: string; + contractName: string; + channelName: string; +} + +export enum VarType { + CONTRACTNAME = 0, + CHANNELNAME = 1, + TOKENID = 2, + OWNER = 3, + OWNERMSPID = 4, + AMOUNT = 5, + BRIDGE = 6, + BRIDGEMSPID = 7, + RECEIVER = 8, + MSPID = 9, +} + +export function getVarTypes(stringType: string) { + return VarType[stringType.toUpperCase() as keyof typeof VarType]; +} + +export interface InteractionSignature { + type: InteractionType; + functionsSignature: string[]; + variables: VarType[][]; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/interact.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/interact.ts new file mode 100644 index 0000000000..0a1d8da403 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/satp-bridge/types/interact.ts @@ -0,0 +1,5 @@ +export interface InteractionData { + functionSignature: string; + variables: string[]; + available: boolean; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts index a2886b15bd..0efb0df4a1 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/stage-services/server/stage1-server-service.ts @@ -140,6 +140,11 @@ export class Stage1ServerService extends SATPService { } */ + if (sessionData.transferContextId != undefined) { + transferProposalReceiptMessage.common.transferContextId = + sessionData.transferContextId; + } + const messageSignature = bufArray2HexStr( sign(this.Signer, JSON.stringify(transferProposalReceiptMessage)), ); @@ -216,6 +221,16 @@ export class Stage1ServerService extends SATPService { new TransferCommenceResponseMessage(); transferCommenceResponseMessage.common = commonBody; + if (sessionData.transferContextId != undefined) { + transferCommenceResponseMessage.common.transferContextId = + sessionData.transferContextId; + } + + if (sessionData.serverTransferNumber != undefined) { + transferCommenceResponseMessage.serverTransferNumber = + sessionData.serverTransferNumber; + } + sessionData.lastSequenceNumber = commonBody.sequenceNumber; const messageSignature = bufArray2HexStr( @@ -281,12 +296,8 @@ export class Stage1ServerService extends SATPService { request.common.version == undefined || request.common.messageType == undefined || request.common.sessionId == undefined || - // request.common.transferContextId == undefined || request.common.sequenceNumber == undefined || request.common.resourceUrl == undefined || - // request.common.actionResponse == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || request.common.signature == undefined || request.common.clientGatewayPubkey == undefined || request.common.serverGatewayPubkey == undefined @@ -387,15 +398,13 @@ export class Stage1ServerService extends SATPService { request.common.version == undefined || request.common.messageType == undefined || request.common.sessionId == undefined || - // request.common.transferContextId == undefined || request.common.sequenceNumber == undefined || request.common.resourceUrl == undefined || - // request.common.actionResponse == undefined || - // request.common.payloadProfile == undefined || - // request.common.applicationProfile == undefined || request.common.signature == undefined || request.common.clientGatewayPubkey == undefined || - request.common.serverGatewayPubkey == undefined + request.common.serverGatewayPubkey == undefined || + request.common.hashPreviousMessage == undefined || + request.common.signature == undefined ) { throw new Error( `${fnTag}, message satp common body is missing or is missing required fields`, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts index 5278e09809..cc9260dc1c 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/core/types.ts @@ -1,7 +1,7 @@ import { LogLevelDesc } from "@hyperledger/cactus-common"; import { ValidatorOptions } from "class-validator"; import { BLODispatcher } from "../blo/dispatcher"; -import { ISignerKeyPairs } from "@hyperledger/cactus-common/src/main/typescript/signer-key-pairs"; +import { ISignerKeyPairs } from "@hyperledger/cactus-common/dist/lib/main/typescript/signer-key-pairs"; import { SATPSession } from "./satp-session"; import { SatpStage0Service } from "../generated/proto/cacti/satp/v02/stage_0_connect"; import { SatpStage1Service } from "../generated/proto/cacti/satp/v02/stage_1_connect"; @@ -22,6 +22,7 @@ export type SATPServiceClient = | typeof SatpStage1Service | typeof SatpStage2Service | typeof SatpStage3Service; +import { NetworkBridge } from "./stage-services/satp-bridge/network-bridge"; export enum CurrentDrafts { Core = "Core", @@ -116,3 +117,7 @@ export interface RemoteLog { signature: string; signerPubKey: string; } + +export interface SATPBridgeConfig { + network: NetworkBridge; +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore similarity index 96% rename from packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore rename to packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore index 79bfe1a3e0..1dc2dbe2a8 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/.gitignore @@ -10,6 +10,7 @@ coverage node_modules/ jspm_packages/ package-lock.json +.yarn/ # Compiled TypeScript files dist diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/package.json b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/package.json new file mode 100644 index 0000000000..8a267e2feb --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/package.json @@ -0,0 +1,65 @@ +{ + "name": "satp-wrapper-contract", + "version": "1.0.0", + "description": "SATP Wrapper contract implemented in TypeScript", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "engines": { + "node": ">=12", + "npm": ">=5" + }, + "scripts": { + "lint": "tslint -c tslint.json 'src/**/*.ts'", + "test": "nyc mocha -r ts-node/register test/**/*.test.ts", + "start": "fabric-chaincode-node start", + "build": "tsc", + "build:watch": "tsc -w", + "prepublishOnly": "npm run build" + }, + "engineStrict": true, + "author": "Hyperledger", + "license": "Apache-2.0", + "dependencies": { + "fabric-contract-api": "^2.4.1", + "fabric-shim": "^2.4.1" + }, + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/chai-as-promised": "^7.1.2", + "@types/mocha": "^7.0.2", + "@types/node": "18.11.9", + "@types/sinon": "^7.5.2", + "@types/sinon-chai": "^3.2.3", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "mocha": "^9.2.0", + "nyc": "^15.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.5.0", + "ts-node": "^8.8.1", + "tslint": "^6.1.0", + "typescript": "5.3.3", + "winston": "^3.2.1" + }, + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "coverage/**", + "dist/**" + ], + "reporter": [ + "text-summary", + "html" + ], + "all": true, + "check-coverage": true, + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } + } + \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts new file mode 100644 index 0000000000..f0596b3843 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/ITraceableContract.ts @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +export interface ITraceableContract { + // GetAllAssetsKey returns all assets key found in the world state. + GetAllAssetsKey(ctx: Context): Promise; + + // GetAllTxByKey returns all transations for a specific key. + GetAllTxByKey(ctx: Context, key: string): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts new file mode 100644 index 0000000000..537c947067 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { SATPContractWrapper } from "./satp-wrapper"; + +export { SATPContractWrapper } from "./satp-wrapper"; + +export const contracts: any[] = [SATPContractWrapper]; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts new file mode 100644 index 0000000000..e8b691516c --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/interaction-signature.ts @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +export enum InteractionSignatureType { + MINT = 0, + BURN = 1, + ASSIGN = 2, + CHECKPERMITION = 3, + LOCK = 4, + UNLOCK = 5, +} + +export enum VarType { + CONTRACTNAME = 0, + CHANNELNAME = 1, + TOKENID = 2, + OWNER = 3, + OWNERMSPID = 4, + AMOUNT = 5, + BRIDGE = 6, + BRIDGEMSPID = 7, + RECEIVER = 8, + MSPID = 9, +} + +export class InteractionSignature { + type: InteractionSignatureType; + functionsSignature: string[]; + variables: VarType[][]; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts new file mode 100644 index 0000000000..14c2719384 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/satp-wrapper.ts @@ -0,0 +1,517 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + Context, + Info, + Returns, + Transaction, + Contract, +} from "fabric-contract-api"; +import { ITraceableContract } from "./ITraceableContract"; + +import { Token } from "./token"; +import { + InteractionSignatureType, + VarType, + InteractionSignature, +} from "./interaction-signature"; + +@Info({ + title: "SATPContractWrapper", + description: "SATP Wrapper contract for trading assets", +}) +export class SATPContractWrapper + extends Contract + implements ITraceableContract +{ + constructor() { + super(); + } + + @Transaction() + public async Initialize(ctx: Context, ownerMSPID: string): Promise { + await ctx.stub.putState("ownerMSPID", Buffer.from(ownerMSPID)); + return true; + } + + @Transaction() + public async setBridge( + ctx: Context, + bridgeMSPID: string, + bridgeID: string, + ): Promise { + await this.checkPermission(ctx); + await ctx.stub.putState("bridgeMSPID", Buffer.from(bridgeMSPID)); + await ctx.stub.putState("bridgeID", Buffer.from(bridgeID)); + return true; + } + + @Transaction() + public async getToken(ctx: Context, tokenId: string): Promise { + const valueBytes = await ctx.stub.getState(tokenId); + + if (!valueBytes || valueBytes.length === 0) { + throw new Error(`Asset with ID ${tokenId} does not exist`); + } + + return JSON.parse(valueBytes.toString()) as Token; + } + + @Transaction() + @Returns("boolean") + public async wrap( + ctx: Context, + tokenType: string, + tokenId: string, + owner: string, + mspId: string, + channelName: string, + contractName: string, + interactions: string, + ): Promise { + await this.checkPermission(ctx); + + const valueBytes = await ctx.stub.getState(tokenId); + + const bridge = await ctx.stub.getState("bridgeMSPID"); + + if (valueBytes && valueBytes.length > 0) { + throw new Error( + `Asset with ID ${tokenId} is already wrapped ${valueBytes.toString()}`, + ); + } + + if (!bridge || bridge.length === 0) { + throw new Error(`Bridge is not set`); + } + + const list = await this.createNonStandardTokenOntology( + ctx, + tokenId, + interactions, + ); + + const checkPermission = await this.getOntologyMethodFromList( + list, + InteractionSignatureType.CHECKPERMITION, + ); + + const token: Token = { + tokenType: tokenType, + tokenId: tokenId, + owner: owner, + mspId: mspId, + channelName: channelName, + contractName: contractName, + amount: 0, + }; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + + try { + if (checkPermission) { + await this.interact(ctx, checkPermission, token); + } + } catch (error) { + await ctx.stub.deleteState(tokenId); //maybe is not needed + throw new Error(`Wrap failed: ${error}`); + } + + return true; + } + + @Transaction() + @Returns("boolean") + public async unwrap(ctx: Context, tokenId: string): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount > 0) { + throw new Error("Token has locked amount"); + } + + await ctx.stub.deleteState(tokenId); + + for (const interactionType in InteractionSignatureType) { + await ctx.stub.deleteState(tokenId + ":" + interactionType); + } + + return true; + } + + @Transaction() + @Returns("number") + public async lockedAmount(ctx: Context, tokenId: string): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + return token.amount; + } + + @Transaction() + @Returns("boolean") + public async lock( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + // const to = await ctx.clientIdentity.getID(); + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.LOCK), + token, + amount, + ); + + token.amount += amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + public async unlock( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error( + "No sufficient amount locked, total tried to unlock: " + + amount + + " total locked: " + + token.amount, + ); + } + + await this.interact( + ctx, + await this.getOntologyMethod( + ctx, + tokenId, + InteractionSignatureType.UNLOCK, + ), + token, + amount, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async mint( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.MINT), + token, + amount, + ); + + token.amount += amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async burn( + ctx: Context, + tokenId: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error("No sufficient amount locked"); + } + + await this.interact( + ctx, + await this.getOntologyMethod(ctx, tokenId, InteractionSignatureType.BURN), + token, + amount, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction() + @Returns("boolean") + public async assign( + ctx: Context, + tokenId: string, + to: string, + amount: number, + ): Promise { + await this.checkPermission(ctx); + + const token = await this.getToken(ctx, tokenId); + + if (token.amount < amount) { + throw new Error("No sufficient amount locked"); + } + + //const from = await ctx.clientIdentity.getID(); + + await this.interact( + ctx, + await this.getOntologyMethod( + ctx, + tokenId, + InteractionSignatureType.ASSIGN, + ), + token, + amount, + to, + ); + + token.amount -= amount; + + await ctx.stub.putState(tokenId, Buffer.from(JSON.stringify(token))); + return true; + } + + @Transaction(false) + @Returns("string") + public async GetAsset(ctx: Context, id: string): Promise { + const assetBytes = await ctx.stub.getState(id); // get the asset from chaincode state + if (!assetBytes || assetBytes.length === 0) { + throw new Error(`Asset with key ${id} does not exist`); + } + return JSON.parse(assetBytes.toString()); + } + + // GetAllAssetsKey returns all assets key found in the world state. + @Transaction(false) + @Returns("string") + public async GetAllAssetsKey(ctx: Context): Promise { + const allResults = []; + // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + allResults.push(result.value.key); + result = await iterator.next(); + } + return allResults.toString(); + } + + // GetAllTxByKey returns all transations for a specific key. + @Transaction(false) + @Returns("string") + public async GetAllTxByKey(ctx: Context, key: string): Promise { + const allResults = []; + const iterator = await ctx.stub.getHistoryForKey(key); + let result = await iterator.next(); + while (!result.done) { + const strValue = JSON.stringify(result); + let record; + try { + record = JSON.parse(strValue); + } catch (err) { + console.log(err); + record = strValue; + } + allResults.push(record); + result = await iterator.next(); + } + return JSON.stringify(allResults); + } + + // add two number checking for overflow + add(a, b) { + const c = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a, b) { + const c = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } + + private async checkPermission(ctx: Context) { + let owner = await ctx.stub.getState("ownerMSPID"); + let bridge = await ctx.stub.getState("bridgeMSPID"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + const clientMSPID = await ctx.clientIdentity.getMSPID(); + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `wrapper: client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + } + + @Transaction(false) + @Returns("string") + async ClientAccountID(ctx: Context): Promise { + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + return clientAccountID; + } + + private async createNonStandardTokenOntology( + ctx: Context, + tokenId: string, + interactions: string, + ): Promise { + const interactionsJson = JSON.parse(interactions) as InteractionSignature[]; + for (const interaction of interactionsJson) { + await ctx.stub.putState( + tokenId + "-" + interaction.type, + Buffer.from(JSON.stringify(interaction)), + ); + } + return interactionsJson; + } + + private async getOntologyMethod( + ctx: Context, + tokenId: string, + interactionType: InteractionSignatureType, + ): Promise { + const valueBytes = await ctx.stub.getState(tokenId + "-" + interactionType); + + if (!valueBytes || valueBytes.length === 0) { + throw new Error( + `Asset method with ID ${tokenId} and ${interactionType} does not exist`, + ); + } + return JSON.parse(valueBytes.toString()) as InteractionSignature; + } + + private async getOntologyMethodFromList( + interactions: InteractionSignature[], + interactionType: InteractionSignatureType, + ): Promise { + for (const interaction of interactions) { + if (interaction.type === interactionType) { + return interaction; + } + } + return undefined; + //throw new Error(`Interaction type ${interactionType} not found`); + } + + private async interact( + ctx: Context, + interaction: InteractionSignature, + token: Token, + amount?: number, + receiver?: string, + ): Promise { + for (let i = 0; i < interaction.functionsSignature.length; i++) { + const response = await ctx.stub.invokeChaincode( + token.contractName, + await this.dynamicParams( + ctx, + interaction.functionsSignature[i], + interaction.variables[i], + token, + amount, + receiver, + ), + token.channelName, + ); + + if (response.status !== 200) { + throw new Error( + `Interact failed: ${response.message} ${response.payload}`, + ); + } + } + } + + private async dynamicParams( + ctx: Context, + functionSignature: string, + variables: VarType[], + token: Token, + amount?: number, + receiver?: string, + ): Promise { + const list = []; + list.push(functionSignature); + for (const variable of variables) { + switch (variable) { + case VarType.CONTRACTNAME: + list.push(token.contractName); + break; + case VarType.CHANNELNAME: + list.push(token.channelName); + break; + case VarType.TOKENID: + list.push(token.tokenId); + break; + case VarType.OWNER: + list.push(token.owner); + break; + case VarType.OWNERMSPID: + list.push(token.mspId); + break; + case VarType.BRIDGE: + list.push(await ctx.stub.getState("bridgeID")); + break; + case VarType.BRIDGEMSPID: + list.push(await ctx.stub.getState("bridgeMSPID")); + break; + case VarType.AMOUNT: + list.push(amount.toString()); + break; + case VarType.BRIDGE: + list.push(await ctx.stub.getState("bridge")); + break; + case VarType.RECEIVER: + list.push(receiver); + break; + case VarType.MSPID: + list.push(await ctx.clientIdentity.getMSPID()); + break; + } + } + return list; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts new file mode 100644 index 0000000000..eca6d255df --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/src/token.ts @@ -0,0 +1,29 @@ +/* + SPDX-License-Identifier: Apache-2.0 +*/ + +import { Object, Property } from "fabric-contract-api"; + +@Object() +export class Token { + @Property() + tokenType: string; + + @Property() + tokenId: string; + + @Property() + owner: string; + + @Property() + mspId: string; + + @Property() + channelName: string; + + @Property() + contractName: string; + + @Property() + amount: number; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts new file mode 100644 index 0000000000..59f2f0cde1 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/test/satp-wrapper.test.ts @@ -0,0 +1,418 @@ +/* + * SPDX-License-Identifier: Apache 2.0 + */ + +import { Context } from "fabric-contract-api"; +import { ChaincodeStub, ClientIdentity } from "fabric-shim"; +import { SATPContractWrapper } from "../src/satp-wrapper"; + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import sinon from "sinon"; +import sinonChai from "sinon-chai"; +import { TokenType } from "../src/token"; + +const bridgedOutAmountKey = "amountBridgedOut"; + +const USER_A_FABRIC_ID = + "x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com"; + +chai.should(); +chai.use(chaiAsPromised); +chai.use(sinonChai); + +describe("Wrapper", () => { + let ctx; + let contract: SATPContractWrapper; + + beforeEach(() => { + contract = new SATPContractWrapper("bridge_address"); + ctx = sinon.createStubInstance(Context); + ctx.stub = sinon.createStubInstance(ChaincodeStub); + ctx.clientIdentity = sinon.createStubInstance(ClientIdentity); + + ctx.clientIdentity.getMSPID.resolves("bridge"); + ctx.stub.getState.withArgs(bridgedOutAmountKey).resolves(Buffer.from("50")); + ctx.stub.getState + .withArgs("1001") + .resolves( + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":0}`, + ), + ); + ctx.stub.getState + .withArgs("1002") + .resolves( + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":99}`, + ), + ); + + ctx.stub.getState.withArgs("owner").resolves("Org1MSP"); + ctx.stub.getState.withArgs("bridge").resolves("bridge"); + }); + + describe("#tokenExists", () => { + it("should return true for a token reference", async () => { + (await contract.getToken(ctx, "1001")).should.not.be.undefined; + }); + + it("should throw an error for a token reference that does not exist", async () => { + await contract + .getToken(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#wrap", () => { + it("should wrap an asset", async () => { + await contract.wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1003", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1003", + Buffer.from( + `{"address":"chainCodeID","tokenType":"ERC20","tokenId":"1003","owner":"${USER_A_FABRIC_ID}","channelName":"channelName","contractName":"contractName","amount":0}`, + ), + ); + }); + it("should throw an error for an asset that already exists", async () => { + await contract + .wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1001", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ) + .should.be.rejectedWith(/Asset with ID 1001 is already wrapped/); + }); + }); + + describe("#unwrap", () => { + it("should delete an asset reference", async () => { + await contract.unwrap(ctx, "1001"); + ctx.stub.deleteState.should.have.been.calledOnceWithExactly("1001"); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .unwrap(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + + it("should throw an error for an asset reference with locked amount", async () => { + await contract + .unwrap(ctx, "1002") + .should.be.rejectedWith(/Token has locked amount/); + }); + }); + + describe("#createAssetReference", () => { + it("should create an asset reference", async () => { + await contract.wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1003", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1003", + Buffer.from( + `{"address":"chainCodeID","tokenType":"ERC20","tokenId":"1003","owner":"${USER_A_FABRIC_ID}","channelName":"channelName","contractName":"contractName","amount":0}`, + ), + ); + }); + + it("should throw an error for an asset reference that already exists", async () => { + await contract + .wrap( + ctx, + "chainCodeID", + TokenType.ERC20, + "1001", + USER_A_FABRIC_ID, + "channelName", + "contractName", + ) + .should.be.rejectedWith(/Asset with ID 1001 is already wrapped/); + }); + }); + + describe("#getToken", () => { + it("should return a token reference", async () => { + await contract.getToken(ctx, "1001").should.eventually.deep.equal({ + address: "token_address", + tokenType: TokenType.ERC20, + tokenId: 1001, + owner: USER_A_FABRIC_ID, + channelName: "channel", + contractName: "contract", + amount: 0, + }); + }); + + it("should throw an error for a token reference that does not exist", async () => { + await contract + .getToken(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#IsLocked", () => { + it("should return true for a locked asset reference", async () => { + const result1 = await contract.lockedAmount(ctx, "1001"); + const result2 = await contract.lockedAmount(ctx, "1002"); + chai.expect(result1).to.be.equal(0); + chai.expect(result2).to.be.equal(99); + + await contract + .lockedAmount(ctx, "1003") + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#lockAsset", () => { + it("should lock an asset", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract", + ["transfer", USER_A_FABRIC_ID, "bridge", "10"], + "channel", + ) + .resolves({ status: 200 }); + await contract.lock(ctx, "1001", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1001", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":10}`, + ), + ); + }); + + it("should throw and error if response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract", + ["transfer", USER_A_FABRIC_ID, "bridge", "10"], + "channel", + ) + .resolves({ status: 404 }); + await contract + .lock(ctx, "1001", 10) + .should.be.rejectedWith(/Lock failed/); + }); + + it("should throw an error for an asset reference that does not exist", async () => { + await contract + .lock(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#unlockAsset", () => { + it("should unlock an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 200 }); + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["transfer", USER_A_FABRIC_ID, "bridge", "30"], + "channel2", + ) + .resolves({ status: 200 }); + await contract.unlock(ctx, "1002", 30); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":69}`, + ), + ); + }); + + it("should throw and error if the amount to unlock is greater than the locked amount", async () => { + await contract + .unlock(ctx, "1002", 100) + .should.be.rejectedWith( + /No sufficient amount locked, total tried to unlock: 100 total locked: 99/, + ); + }); + + it("should throw an error if approve response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 404 }); + await contract + .unlock(ctx, "1002", 30) + .should.be.rejectedWith(/Approve failed/); + }); + + it("should throw an error if transfer response status is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["Approve", "bridge", "30"], "channel2") + .resolves({ status: 200 }); + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["transfer", USER_A_FABRIC_ID, "bridge", "30"], + "channel2", + ) + .resolves({ status: 404 }); + await contract + .unlock(ctx, "1002", 30) + .should.be.rejectedWith(/Unlock failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .unlock(ctx, "1003", 99) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#mint", () => { + it("should mint an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract", ["mint", "10"], "channel") + .resolves({ status: 200 }); + await contract.mint(ctx, "1001", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1001", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1001,"owner":"${USER_A_FABRIC_ID}","channelName":"channel","contractName":"contract","amount":10}`, + ), + ); + }); + it("should throw and error if status response is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract", ["mint", "10"], "channel") + .resolves({ status: 404 }); + await contract + .mint(ctx, "1001", 10) + .should.be.rejectedWith(/Mint failed/); + }); + it("should throw an error for an asset that does not exist", async () => { + await contract + .burn(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#burn", () => { + it("should burn an asset", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["burn", "10"], "channel2") + .resolves({ status: 200 }); + await contract.burn(ctx, "1002", 10); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":89}`, + ), + ); + }); + + it("should throw an error if the amount to burn is greater than the locked amount", async () => { + await contract + .burn(ctx, "1002", 100) + .should.be.rejectedWith(/No sufficient amount locked/); + }); + + it("should throw and error if status response is different from 200", async () => { + ctx.stub.invokeChaincode + .withArgs("contract2", ["burn", "10"], "channel2") + .resolves({ status: 404 }); + await contract + .burn(ctx, "1002", 10) + .should.be.rejectedWith(/Burn failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .burn(ctx, "1003", 2) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + }); + + describe("#assign", () => { + it("should assign an asset", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["assign", "bridge", USER_A_FABRIC_ID, "99"], + "channel2", + ) + .resolves({ status: 200 }); + await contract.assign(ctx, "1002", USER_A_FABRIC_ID, 99); + ctx.stub.putState.should.have.been.calledOnceWithExactly( + "1002", + Buffer.from( + `{"address":"token_address","tokenType":"ERC20","tokenId":1002,"owner":"${USER_A_FABRIC_ID}","channelName":"channel2","contractName":"contract2","amount":0}`, + ), + ); + }); + + it("should throw an error when the response is not 200", async () => { + ctx.stub.invokeChaincode + .withArgs( + "contract2", + ["assign", "bridge", USER_A_FABRIC_ID, "99"], + "channel2", + ) + .resolves({ status: 404 }); + await contract + .assign(ctx, "1002", USER_A_FABRIC_ID, 99) + .should.be.rejectedWith(/Assign failed/); + }); + + it("should throw an error for an asset that does not exist", async () => { + await contract + .assign(ctx, "1003", USER_A_FABRIC_ID, 10) + .should.be.rejectedWith(/Asset with ID 1003 does not exist/); + }); + + it("should throw an error if no amount available to assign", async () => { + await contract + .assign(ctx, "1002", USER_A_FABRIC_ID, 100) + .should.be.rejectedWith(/No sufficient amount locked/); + }); + }); + + describe("#operations", () => { + const number1 = 10; + const number2 = 500; + + it("add two numbers", () => { + const result = contract.add(number1, number2); + chai.expect(result).to.equal(number1 + number2); + }); + + it("subtract two numbers", () => { + const result = contract.sub(number2, number1); + chai.expect(result).to.equal(number2 - number1); + }); + }); + + describe("#checkPermission", () => { + it("user from organization other than Org2 is not authorized to perform operations", () => { + ctx.clientIdentity.getMSPID.resolves("Org1MSP"); + contract + .lock(ctx, "1001", 10) + .should.be.rejectedWith( + `client is not authorized to perform the operation. Org1MSP"`, + ); + }); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json similarity index 79% rename from packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json rename to packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json index 80d8e12d8c..a1c5ccb234 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/tsconfig.json @@ -7,12 +7,13 @@ "moduleResolution": "node", "module": "commonjs", "declaration": true, - "sourceMap": true + "sourceMap": true, + "skipLibCheck": true, }, "include": [ "./src/**/*" ], "exclude": [ - "./src/**/*.spec.ts" + "./src/**/*.test.ts" ] } diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock new file mode 100644 index 0000000000..3261b6e7da --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript/yarn.lock @@ -0,0 +1,3662 @@ +# This file is generated by running "yarn install" inside your project. + # Manual changes might be lost - proceed with caution! + + __metadata: + version: 8 + cacheKey: 10 + + "@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab + languageName: node + linkType: hard + + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/code-frame@npm:7.24.7" + dependencies: + "@babel/highlight": "npm:^7.24.7" + picocolors: "npm:^1.0.0" + checksum: 10/4812e94885ba7e3213d49583a155fdffb05292330f0a9b2c41b49288da70cf3c746a3fda0bf1074041a6d741c33f8d7be24be5e96f41ef77395eeddc5c9ff624 + languageName: node + linkType: hard + + "@babel/compat-data@npm:^7.24.8": + version: 7.24.9 + resolution: "@babel/compat-data@npm:7.24.9" + checksum: 10/fcdbf3dd978305880f06ae20a23f4f68a8eddbe64fc5d2fbc98dfe4cdf15c174cff41e3a8eb9d935f9f3a68d3a23fa432044082ee9768a2ed4b15f769b8f6853 + languageName: node + linkType: hard + + "@babel/core@npm:^7.7.5": + version: 7.24.9 + resolution: "@babel/core@npm:7.24.9" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.24.9" + "@babel/helper-compilation-targets": "npm:^7.24.8" + "@babel/helper-module-transforms": "npm:^7.24.9" + "@babel/helpers": "npm:^7.24.8" + "@babel/parser": "npm:^7.24.8" + "@babel/template": "npm:^7.24.7" + "@babel/traverse": "npm:^7.24.8" + "@babel/types": "npm:^7.24.9" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/f00a372fa547f6e21f4db1b6e521e6eb01f77f5931726897aae6f4cf29a687f615b9b77147b539e851a68bf94e4850bcfba7eb11091dd8e2bc625f6d831ce257 + languageName: node + linkType: hard + + "@babel/generator@npm:^7.24.8, @babel/generator@npm:^7.24.9": + version: 7.24.10 + resolution: "@babel/generator@npm:7.24.10" + dependencies: + "@babel/types": "npm:^7.24.9" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10/c2491fb7d985527a165546cbcf9e5f6a2518f2a968c7564409c012acce1019056b21e67a152af89b3f4d4a295ca2e75a1a16858152f750efbc4b5087f0cb7253 + languageName: node + linkType: hard + + "@babel/helper-compilation-targets@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-compilation-targets@npm:7.24.8" + dependencies: + "@babel/compat-data": "npm:^7.24.8" + "@babel/helper-validator-option": "npm:^7.24.8" + browserslist: "npm:^4.23.1" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/3489280d07b871af565b32f9b11946ff9a999fac0db9bec5df960760f6836c7a4b52fccb9d64229ccce835d37a43afb85659beb439ecedde04dcea7eb062a143 + languageName: node + linkType: hard + + "@babel/helper-environment-visitor@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-environment-visitor@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/079d86e65701b29ebc10baf6ed548d17c19b808a07aa6885cc141b690a78581b180ee92b580d755361dc3b16adf975b2d2058b8ce6c86675fcaf43cf22f2f7c6 + languageName: node + linkType: hard + + "@babel/helper-function-name@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-function-name@npm:7.24.7" + dependencies: + "@babel/template": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/2ceb3d9b2b35a0fc4100fc06ed7be3bc38f03ff0bf128ff0edbc0cc7dd842967b1496fc70b5c616c747d7711c2b87e7d025c8888f48740631d6148a9d3614f85 + languageName: node + linkType: hard + + "@babel/helper-hoist-variables@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-hoist-variables@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/6cfdcf2289cd12185dcdbdf2435fa8d3447b797ac75851166de9fc8503e2fd0021db6baf8dfbecad3753e582c08e6a3f805c8d00cbed756060a877d705bd8d8d + languageName: node + linkType: hard + + "@babel/helper-module-imports@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-module-imports@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/df8bfb2bb18413aa151ecd63b7d5deb0eec102f924f9de6bc08022ced7ed8ca7fed914562d2f6fa5b59b74a5d6e255dc35612b2bc3b8abf361e13f61b3704770 + languageName: node + linkType: hard + + "@babel/helper-module-transforms@npm:^7.24.9": + version: 7.24.9 + resolution: "@babel/helper-module-transforms@npm:7.24.9" + dependencies: + "@babel/helper-environment-visitor": "npm:^7.24.7" + "@babel/helper-module-imports": "npm:^7.24.7" + "@babel/helper-simple-access": "npm:^7.24.7" + "@babel/helper-split-export-declaration": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/eaed9cb93edb11626758f76bfb482f9c3b6583f6756813c5ef849d6d52bbe7c2cb39f61646758e860732d14c2588b60eb4e2af78d7751450649a8d3d7ca41697 + languageName: node + linkType: hard + + "@babel/helper-simple-access@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-simple-access@npm:7.24.7" + dependencies: + "@babel/traverse": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/5083e190186028e48fc358a192e4b93ab320bd016103caffcfda81302a13300ccce46c9cd255ae520c25d2a6a9b47671f93e5fe5678954a2329dc0a685465c49 + languageName: node + linkType: hard + + "@babel/helper-split-export-declaration@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-split-export-declaration@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10/ff04a3071603c87de0d6ee2540b7291ab36305b329bd047cdbb6cbd7db335a12f9a77af1cf708779f75f13c4d9af46093c00b34432e50b2411872c658d1a2e5e + languageName: node + linkType: hard + + "@babel/helper-string-parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-string-parser@npm:7.24.8" + checksum: 10/6d1bf8f27dd725ce02bdc6dffca3c95fb9ab8a06adc2edbd9c1c9d68500274230d1a609025833ed81981eff560045b6b38f7b4c6fb1ab19fc90e5004e3932535 + languageName: node + linkType: hard + + "@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b + languageName: node + linkType: hard + + "@babel/helper-validator-option@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-validator-option@npm:7.24.8" + checksum: 10/a52442dfa74be6719c0608fee3225bd0493c4057459f3014681ea1a4643cd38b68ff477fe867c4b356da7330d085f247f0724d300582fa4ab9a02efaf34d107c + languageName: node + linkType: hard + + "@babel/helpers@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helpers@npm:7.24.8" + dependencies: + "@babel/template": "npm:^7.24.7" + "@babel/types": "npm:^7.24.8" + checksum: 10/61c08a2baa87382a87c7110e9b5574c782603e247b7e6267769ee0e8b7b54b70ff05f16466f05bb318622b7ac28e79b449edff565abf5adcb1adb1b0f42fee9c + languageName: node + linkType: hard + + "@babel/highlight@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/highlight@npm:7.24.7" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.24.7" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/69b73f38cdd4f881b09b939a711e76646da34f4834f4ce141d7a49a6bb1926eab1c594148970a8aa9360398dff800f63aade4e81fafdd7c8d8a8489ea93bfec1 + languageName: node + linkType: hard + + "@babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/parser@npm:7.24.8" + bin: + parser: ./bin/babel-parser.js + checksum: 10/e44b8327da46e8659bc9fb77f66e2dc4364dd66495fb17d046b96a77bf604f0446f1e9a89cf2f011d78fc3f5cdfbae2e9e0714708e1c985988335683b2e781ef + languageName: node + linkType: hard + + "@babel/template@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/template@npm:7.24.7" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/parser": "npm:^7.24.7" + "@babel/types": "npm:^7.24.7" + checksum: 10/5975d404ef51cf379515eb0f80b115981d0b9dff5539e53a47516644abb8c83d7559f5b083eb1d4977b20d8359ebb2f911ccd4f729143f8958fdc465f976d843 + languageName: node + linkType: hard + + "@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/traverse@npm:7.24.8" + dependencies: + "@babel/code-frame": "npm:^7.24.7" + "@babel/generator": "npm:^7.24.8" + "@babel/helper-environment-visitor": "npm:^7.24.7" + "@babel/helper-function-name": "npm:^7.24.7" + "@babel/helper-hoist-variables": "npm:^7.24.7" + "@babel/helper-split-export-declaration": "npm:^7.24.7" + "@babel/parser": "npm:^7.24.8" + "@babel/types": "npm:^7.24.8" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/47d8ecf8cfff58fe621fc4d8454b82c97c407816d8f9c435caa0c849ea7c357b91119a06f3c69f21a0228b5d06ac0b44f49d1f78cff032d6266317707f1fe615 + languageName: node + linkType: hard + + "@babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.24.9, @babel/types@npm:^7.8.3": + version: 7.24.9 + resolution: "@babel/types@npm:7.24.9" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.8" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/21873a08a124646824aa230de06af52149ab88206dca59849dcb3003990a6306ec2cdaa4147ec1127c0cfc5f133853cfc18f80d7f6337b6662a3c378ed565f15 + languageName: node + linkType: hard + + "@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": + version: 1.6.0 + resolution: "@colors/colors@npm:1.6.0" + checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 + languageName: node + linkType: hard + + "@dabh/diagnostics@npm:^2.0.2": + version: 2.0.3 + resolution: "@dabh/diagnostics@npm:2.0.3" + dependencies: + colorspace: "npm:1.1.x" + enabled: "npm:2.0.x" + kuler: "npm:^2.0.0" + checksum: 10/14e449a7f42f063f959b472f6ce02d16457a756e852a1910aaa831b63fc21d86f6c32b2a1aa98a4835b856548c926643b51062d241fb6e9b2b7117996053e6b9 + languageName: node + linkType: hard + + "@fidm/asn1@npm:^1.0.4": + version: 1.0.4 + resolution: "@fidm/asn1@npm:1.0.4" + checksum: 10/38b47e1739fcf7405ae96308679a0b24b3a9c4b2f4d5737f0c114b539b68a9d4ff6d20044311651862fda05d95d53b6590ffff3a73b35cf674dad2a8917d899f + languageName: node + linkType: hard + + "@fidm/x509@npm:^1.2.1": + version: 1.2.1 + resolution: "@fidm/x509@npm:1.2.1" + dependencies: + "@fidm/asn1": "npm:^1.0.4" + tweetnacl: "npm:^1.0.1" + checksum: 10/30ff6de908d57d2a7a85f7e8d56af96153a4ef17864cf8263777fec0eee575b9383eb7cf48f8cc33e33074735570214c5495c03c43452c6a207e181166e219b9 + languageName: node + linkType: hard + + "@grpc/grpc-js@npm:^1.9.0": + version: 1.11.0 + resolution: "@grpc/grpc-js@npm:1.11.0" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/d41f8d666a228ff0b09855448319ad0400e2079312d032447e86e4b1d7e8bb8a01d653de36b529b35eb07f5cfd6996a6153c8700248a8a32f5fad2e03df06445 + languageName: node + linkType: hard + + "@grpc/grpc-js@npm:~1.10.9": + version: 1.10.11 + resolution: "@grpc/grpc-js@npm:1.10.11" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/fe08e39702b2b567453e2a25bae9eaa84bde1712e3ef463f89be5163a305f4663a1a57188f812677e225422d7ea9c10adf94fc9124548d0953b85f21f78d9808 + languageName: node + linkType: hard + + "@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" + dependencies: + lodash.camelcase: "npm:^4.3.0" + long: "npm:^5.0.0" + protobufjs: "npm:^7.2.5" + yargs: "npm:^17.7.2" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/7e2d842c2061cbaf6450c71da0077263be3bab165454d5c8a3e1ae4d3c6d2915f02fd27da63ff01f05e127b1221acd40705273f5d29303901e60514e852992f4 + languageName: node + linkType: hard + + "@hyperledger/fabric-protos@npm:~0.2.1": + version: 0.2.1 + resolution: "@hyperledger/fabric-protos@npm:0.2.1" + dependencies: + "@grpc/grpc-js": "npm:^1.9.0" + google-protobuf: "npm:^3.21.0" + checksum: 10/9873eccf5707ecc6a10b7d803053e5cd17b44a30f946c50acf2e07a65d2e7980c87aee84241b1140afd888abc25d8e7c730ba796bb8c50cdfbf0cb2b2138f436 + languageName: node + linkType: hard + + "@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 + languageName: node + linkType: hard + + "@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: "npm:^5.3.1" + find-up: "npm:^4.1.0" + get-package-type: "npm:^0.1.0" + js-yaml: "npm:^3.13.1" + resolve-from: "npm:^5.0.0" + checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 + languageName: node + linkType: hard + + "@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b + languageName: node + linkType: hard + + "@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/81587b3c4dd8e6c60252122937cea0c637486311f4ed208b52b62aae2e7a87598f63ec330e6cd0984af494bfb16d3f0d60d3b21d7e5b4aedd2602ff3fe9d32e2 + languageName: node + linkType: hard + + "@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + + "@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + + "@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 10/4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd + languageName: node + linkType: hard + + "@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + + "@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: 10/ac64e3f0615ecc015461c9f527f124d2edaa9e68de153c1e270c627e01e83d046522d7e872692fd57a8c514578b539afceff75831c0d8b2a9a7a347fbed35af4 + languageName: node + linkType: hard + + "@npmcli/agent@npm:^2.0.0": + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/96fc0036b101bae5032dc2a4cd832efb815ce9b33f9ee2f29909ee49d96a0026b3565f73c507a69eb8603f5cb32e0ae45a70cab1e2655990a4e06ae99f7f572a + languageName: node + linkType: hard + + "@npmcli/fs@npm:^3.1.0": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd + languageName: node + linkType: hard + + "@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff + languageName: node + linkType: hard + + "@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 10/8a938d84fe4889411296db66b29287bd61ea3c14c2d23e7a8325f46a2b8ce899857c5f038d65d7641805e6c1d06b495525c7faf00c44f85a7ee6476649034969 + languageName: node + linkType: hard + + "@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 10/c71b100daeb3c9bdccab5cbc29495b906ba0ae22ceedc200e1ba49717d9c4ab15a6256839cebb6f9c6acae4ed7c25c67e0a95e734f612b258261d1a3098fe342 + languageName: node + linkType: hard + + "@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 10/c6ee5fa172a8464f5253174d3c2353ea520c2573ad7b6476983d9b1346f4d8f2b44aa29feb17a949b83c1816bc35286a5ea265ed9d8fdd2865acfa09668c0447 + languageName: node + linkType: hard + + "@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 10/03af3e99f17ad421283d054c88a06a30a615922a817741b43ca1b13e7c6b37820a37f6eba9980fb5150c54dba6e26cb6f7b64a6f7d8afa83596fafb3afa218c3 + languageName: node + linkType: hard + + "@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.1" + "@protobufjs/inquire": "npm:^1.1.0" + checksum: 10/67ae40572ad536e4ef94269199f252c024b66e3059850906bdaee161ca1d75c73d04d35cd56f147a8a5a079f5808e342b99e61942c1dae15604ff0600b09a958 + languageName: node + linkType: hard + + "@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 10/634c2c989da0ef2f4f19373d64187e2a79f598c5fb7991afb689d29a2ea17c14b796b29725945fa34b9493c17fb799e08ac0a7ccaae460ee1757d3083ed35187 + languageName: node + linkType: hard + + "@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: 10/c09efa34a5465cb120775e1a482136f2340a58b4abce7e93d72b8b5a9324a0e879275016ef9fcd73d72a4731639c54f2bb755bb82f916e4a78892d1d840bb3d2 + languageName: node + linkType: hard + + "@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 10/bb709567935fd385a86ad1f575aea98131bbd719c743fb9b6edd6b47ede429ff71a801cecbd64fc72deebf4e08b8f1bd8062793178cdaed3713b8d15771f9b83 + languageName: node + linkType: hard + + "@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: 10/b9c7047647f6af28e92aac54f6f7c1f7ff31b201b4bfcc7a415b2861528854fce3ec666d7e7e10fd744da905f7d4aef2205bbcc8944ca0ca7a82e18134d00c46 + languageName: node + linkType: hard + + "@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: 10/131e289c57534c1d73a0e55782d6751dd821db1583cb2f7f7e017c9d6747addaebe79f28120b2e0185395d990aad347fb14ffa73ef4096fa38508d61a0e64602 + languageName: node + linkType: hard + + "@sinonjs/commons@npm:^1.6.0, @sinonjs/commons@npm:^1.7.0, @sinonjs/commons@npm:^1.8.1": + version: 1.8.6 + resolution: "@sinonjs/commons@npm:1.8.6" + dependencies: + type-detect: "npm:4.0.8" + checksum: 10/51987338fd8b4d1e135822ad593dd23a3288764aa41d83c695124d512bc38b87eece859078008651ecc7f1df89a7e558a515dc6f02d21a93be4ba50b39a28914 + languageName: node + linkType: hard + + "@sinonjs/fake-timers@npm:^6.0.0, @sinonjs/fake-timers@npm:^6.0.1": + version: 6.0.1 + resolution: "@sinonjs/fake-timers@npm:6.0.1" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + checksum: 10/c7ee19f62bd0ca52553dd5fca9b3921373218c9fed0f02af2f8e5261f65ce9ff0a5e55ca612ded6daf4088a243e905d61bd6dce1c6d325794283b55c71708395 + languageName: node + linkType: hard + + "@sinonjs/samsam@npm:^5.3.1": + version: 5.3.1 + resolution: "@sinonjs/samsam@npm:5.3.1" + dependencies: + "@sinonjs/commons": "npm:^1.6.0" + lodash.get: "npm:^4.4.2" + type-detect: "npm:^4.0.8" + checksum: 10/6850b9980f042a844072a34ce3ca80b098d4550c8c7a83b2b2e7beb1e06ad19608699544b7a8b0c7db882528d8b74321dfd185d0651cff08cbe793cb73dd39d3 + languageName: node + linkType: hard + + "@sinonjs/text-encoding@npm:^0.7.1": + version: 0.7.2 + resolution: "@sinonjs/text-encoding@npm:0.7.2" + checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 + languageName: node + linkType: hard + + "@types/chai-as-promised@npm:^7.1.2": + version: 7.1.8 + resolution: "@types/chai-as-promised@npm:7.1.8" + dependencies: + "@types/chai": "npm:*" + checksum: 10/88e2d42f14d1de19ba1c7b5c35f263fef37d3ad241c71f5eb59b10763706f3902f4131b93854c9c6ed520081c7e36be555849f202418357f905bea71178b7d02 + languageName: node + linkType: hard + + "@types/chai@npm:*, @types/chai@npm:^4.2.11": + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: 10/f84a9049a7f13284f7237236872ed4afce5045dd6ea3926c8b0ac995490f5a524b247b2e70fcd3ebc85832201349a8f026bd0c336b90b5baca9eed0c7a4dbd3f + languageName: node + linkType: hard + + "@types/mocha@npm:^7.0.2": + version: 7.0.2 + resolution: "@types/mocha@npm:7.0.2" + checksum: 10/8d9cfcd2fcaf0dcd4840c2f54e737e88b3999c334b363b0ed184db40e765da20befa8281211b351d213781231a2372bfb4ca043e9ee8188885bf7be83c2928fd + languageName: node + linkType: hard + + "@types/node@npm:18.11.9": + version: 18.11.9 + resolution: "@types/node@npm:18.11.9" + checksum: 10/d87a947519d8c1569b812a95cd18383f7a1500204c18454b69ba817f4aef2a563bb925432debcab25a3db1ba116c8ddb1ef79d8fded054fb3866424847325bae + languageName: node + linkType: hard + + "@types/node@npm:>=13.7.0": + version: 20.14.10 + resolution: "@types/node@npm:20.14.10" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 10/672892cf94d0d95cf052f11271990686a0fd204cd1e5fe7a4ef240e5315e06711765dc47b9ec98627d3adac18b8c92bb7e2d8db21d18faa20bc3e3203a143e79 + languageName: node + linkType: hard + + "@types/node@npm:^16.11.1": + version: 16.18.101 + resolution: "@types/node@npm:16.18.101" + checksum: 10/97592d3b2e29711a2c98ca3e9f6e52c8792d57e4ad45a18d68cdd6f9386615738d476b5366169ccae38099b60f6d63d15a2a6dced8e804f70dc32cc5b8f36c0c + languageName: node + linkType: hard + + "@types/sinon-chai@npm:^3.2.3": + version: 3.2.12 + resolution: "@types/sinon-chai@npm:3.2.12" + dependencies: + "@types/chai": "npm:*" + "@types/sinon": "npm:*" + checksum: 10/d906f2f766613534c5e9fe1437ec740fb6a9a550f02d1a0abe180c5f18fe73a99f0c12935195404d42f079f5f72a371e16b81e2aef963a6ef0ee0ed9d5d7f391 + languageName: node + linkType: hard + + "@types/sinon@npm:*": + version: 17.0.3 + resolution: "@types/sinon@npm:17.0.3" + dependencies: + "@types/sinonjs__fake-timers": "npm:*" + checksum: 10/3f82b4a477c0c57fa4f4f4fb7585cb72c2a65a7e41e5271b54edca296c8dc242c2d8e709de7a8f16af8693c87cb3ad9d96981069ae683f7197a1134892035833 + languageName: node + linkType: hard + + "@types/sinon@npm:^7.5.2": + version: 7.5.2 + resolution: "@types/sinon@npm:7.5.2" + checksum: 10/66163c371dd84f1c485ae4c60401e4cfdb376974c85d91123dcc8c38334ecc4909c4ae9ffc5008bf0f5212593c7d91f70f460963c01510d2dfe93a689fc8e9ea + languageName: node + linkType: hard + + "@types/sinonjs__fake-timers@npm:*": + version: 8.1.5 + resolution: "@types/sinonjs__fake-timers@npm:8.1.5" + checksum: 10/3a0b285fcb8e1eca435266faa27ffff206608b69041022a42857274e44d9305822e85af5e7a43a9fae78d2ab7dc0fcb49f3ae3bda1fa81f0203064dbf5afd4f6 + languageName: node + linkType: hard + + "@types/triple-beam@npm:^1.3.2": + version: 1.3.5 + resolution: "@types/triple-beam@npm:1.3.5" + checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 + languageName: node + linkType: hard + + "@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 10/ee8fe811becd830f5e276ec63469ec66c22503eb140064580e712c9fccadfd54157c462188640ba6765d5c21f829e7120eb37afb5ead512684b9a1ab86d2db66 + languageName: node + linkType: hard + + "abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 + languageName: node + linkType: hard + + "agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" + dependencies: + debug: "npm:^4.3.4" + checksum: 10/c478fec8f79953f118704d007a38f2a185458853f5c45579b9669372bd0e12602e88dc2ad0233077831504f7cd6fcc8251c383375bba5eaaf563b102938bda26 + languageName: node + linkType: hard + + "aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + + "ajv@npm:^6.12.2": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c + languageName: node + linkType: hard + + "ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 + languageName: node + linkType: hard + + "ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + + "ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + + "ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.0" + checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + + "ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + + "ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 + languageName: node + linkType: hard + + "anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + + "append-transform@npm:^2.0.0": + version: 2.0.0 + resolution: "append-transform@npm:2.0.0" + dependencies: + default-require-extensions: "npm:^3.0.0" + checksum: 10/f26f393bf7a428fd1bb18f2758a819830a582243310c5170edb3f98fdc5a535333d02b952f7c2d9b14522bd8ead5b132a0b15000eca18fa9f49172963ebbc231 + languageName: node + linkType: hard + + "archy@npm:^1.0.0": + version: 1.0.0 + resolution: "archy@npm:1.0.0" + checksum: 10/d7928049a57988b86df3f4de75ca16a4252ccee591d085c627e649fc54c5ae5daa833f17aa656bd825bd00bc0a2756ae03d2b983050bdbda1046b6d832bf7303 + languageName: node + linkType: hard + + "arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 + languageName: node + linkType: hard + + "argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e + languageName: node + linkType: hard + + "argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef + languageName: node + linkType: hard + + "assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: 10/fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + + "async@npm:^3.2.3": + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 10/323c3615c3f0ab1ac25a6f953296bc0ac3213d5e0f1c0debdb12964e55963af288d570293c11e44f7967af58c06d2a88d0ea588c86ec0fbf62fa98037f604a0f + languageName: node + linkType: hard + + "balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + + "binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + + "brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + + "brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + + "braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + + "browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: 10/ac70a84e346bb7afc5045ec6f22f6a681b15a4057447d4cc1c48a25c6dedb302a49a46dd4ddfb5cdd9c96e0c905a8539be1b98ae7bc440512152967009ec7015 + languageName: node + linkType: hard + + "browserslist@npm:^4.23.1": + version: 4.23.2 + resolution: "browserslist@npm:4.23.2" + dependencies: + caniuse-lite: "npm:^1.0.30001640" + electron-to-chromium: "npm:^1.4.820" + node-releases: "npm:^2.0.14" + update-browserslist-db: "npm:^1.1.0" + bin: + browserslist: cli.js + checksum: 10/326a98b1c39bcc9a99b197f15790dc28e122b1aead3257c837421899377ac96239123f26868698085b3d9be916d72540602738e1f857e86a387e810af3fda6e5 + languageName: node + linkType: hard + + "buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + + "builtin-modules@npm:^1.1.1": + version: 1.1.1 + resolution: "builtin-modules@npm:1.1.1" + checksum: 10/0fbf69ffe77fecf11c441b9a7d1e664bb8119a7d3004831d9bd6ce0eacfd5d121ed4b667172870b5f66ecfce4bd54f7c20060d21c339c29049a7a5dd2bb7bf8c + languageName: node + linkType: hard + + "cacache@npm:^18.0.0": + version: 18.0.4 + resolution: "cacache@npm:18.0.4" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/ca2f7b2d3003f84d362da9580b5561058ccaecd46cba661cbcff0375c90734b610520d46b472a339fd032d91597ad6ed12dde8af81571197f3c9772b5d35b104 + languageName: node + linkType: hard + + "caching-transform@npm:^4.0.0": + version: 4.0.0 + resolution: "caching-transform@npm:4.0.0" + dependencies: + hasha: "npm:^5.0.0" + make-dir: "npm:^3.0.0" + package-hash: "npm:^4.0.0" + write-file-atomic: "npm:^3.0.0" + checksum: 10/7e7ca628511ab18c86eea1231834d2591de29a13ae771a7d9ab85be8c6e53e45c5a5b0d0d95d4a3274fc4f26c16956a98162e40c191c131204b5d5aa949660b5 + languageName: node + linkType: hard + + "camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + + "camelcase@npm:^6.0.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + + "caniuse-lite@npm:^1.0.30001640": + version: 1.0.30001642 + resolution: "caniuse-lite@npm:1.0.30001642" + checksum: 10/8d80ea82be453ae0fdfea8766d82740a4945c1b99189650f29bfc458d4e235d7e99027a8f8bc5a4228d8c4457ba896315284b0703f300353ad5f09d8e693de10 + languageName: node + linkType: hard + + "chai-as-promised@npm:^7.1.1": + version: 7.1.2 + resolution: "chai-as-promised@npm:7.1.2" + dependencies: + check-error: "npm:^1.0.2" + peerDependencies: + chai: ">= 2.1.2 < 6" + checksum: 10/be372540dad92ef85cde3954bc0e9b0b33e4e6454f3740b17bfb16e36eda638911619089c05a4e4f2bf6722563bf893bb78c2af59b318c23abb2199e5c20ca1f + languageName: node + linkType: hard + + "chai@npm:^4.2.0": + version: 4.4.1 + resolution: "chai@npm:4.4.1" + dependencies: + assertion-error: "npm:^1.1.0" + check-error: "npm:^1.0.3" + deep-eql: "npm:^4.1.3" + get-func-name: "npm:^2.0.2" + loupe: "npm:^2.3.6" + pathval: "npm:^1.1.1" + type-detect: "npm:^4.0.8" + checksum: 10/c6d7aba913a67529c68dbec3673f94eb9c586c5474cc5142bd0b587c9c9ec9e5fbaa937e038ecaa6475aea31433752d5fabdd033b9248bde6ae53befcde774ae + languageName: node + linkType: hard + + "chalk@npm:^2.3.0, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 + languageName: node + linkType: hard + + "chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + + "check-error@npm:^1.0.2, check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: "npm:^2.0.2" + checksum: 10/e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + + "chokidar@npm:3.5.3": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 + languageName: node + linkType: hard + + "chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10/c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + + "class-transformer@npm:^0.4.0": + version: 0.4.0 + resolution: "class-transformer@npm:0.4.0" + checksum: 10/4751bbcf0ec8a754053eca1cce2e6d883a8fc7d400fac32368b18f05353e22e8415f7223a53daa35705e6d690516f221ec1c46e68c7ad731e31c4f8e46101fb8 + languageName: node + linkType: hard + + "clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + + "cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^6.2.0" + checksum: 10/44afbcc29df0899e87595590792a871cd8c4bc7d6ce92832d9ae268d141a77022adafca1aeaeccff618b62a613b8354e57fe22a275c199ec04baf00d381ef6ab + languageName: node + linkType: hard + + "cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef + languageName: node + linkType: hard + + "cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 + languageName: node + linkType: hard + + "color-convert@npm:^1.9.0, color-convert@npm:^1.9.3": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: "npm:1.1.3" + checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 + languageName: node + linkType: hard + + "color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + + "color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + + "color-name@npm:^1.0.0, color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + + "color-string@npm:^1.6.0": + version: 1.9.1 + resolution: "color-string@npm:1.9.1" + dependencies: + color-name: "npm:^1.0.0" + simple-swizzle: "npm:^0.2.2" + checksum: 10/72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd + languageName: node + linkType: hard + + "color@npm:^3.1.3": + version: 3.2.1 + resolution: "color@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.3" + color-string: "npm:^1.6.0" + checksum: 10/bf70438e0192f4f62f4bfbb303e7231289e8cc0d15ff6b6cbdb722d51f680049f38d4fdfc057a99cb641895cf5e350478c61d98586400b060043afc44285e7ae + languageName: node + linkType: hard + + "colorspace@npm:1.1.x": + version: 1.1.4 + resolution: "colorspace@npm:1.1.4" + dependencies: + color: "npm:^3.1.3" + text-hex: "npm:1.0.x" + checksum: 10/bb3934ef3c417e961e6d03d7ca60ea6e175947029bfadfcdb65109b01881a1c0ecf9c2b0b59abcd0ee4a0d7c1eae93beed01b0e65848936472270a0b341ebce8 + languageName: node + linkType: hard + + "commander@npm:^2.12.1": + version: 2.20.3 + resolution: "commander@npm:2.20.3" + checksum: 10/90c5b6898610cd075984c58c4f88418a4fb44af08c1b1415e9854c03171bec31b336b7f3e4cefe33de994b3f12b03c5e2d638da4316df83593b9e82554e7e95b + languageName: node + linkType: hard + + "commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 10/4620bc4936a4ef12ce7dfcd272bb23a99f2ad68889a4e4ad766c9f8ad21af982511934d6f7050d4a8bde90011b1c15d56e61a1b4576d9913efbf697a20172d6c + languageName: node + linkType: hard + + "concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 + languageName: node + linkType: hard + + "convert-source-map@npm:^1.7.0": + version: 1.9.0 + resolution: "convert-source-map@npm:1.9.0" + checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 + languageName: node + linkType: hard + + "convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 + languageName: node + linkType: hard + + "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce + languageName: node + linkType: hard + + "debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4": + version: 4.3.5 + resolution: "debug@npm:4.3.5" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 + languageName: node + linkType: hard + + "debug@npm:4.3.3": + version: 4.3.3 + resolution: "debug@npm:4.3.3" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/723a9570dcd15d146ea4992f0dca12467d1b00f534abb42473df166d36826fcae8bab045aef59ac2f407b47a23266110bc0e646df8ac82f7800c11384f82050e + languageName: node + linkType: hard + + "decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + + "decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: 10/b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + + "deep-eql@npm:^4.1.3": + version: 4.1.4 + resolution: "deep-eql@npm:4.1.4" + dependencies: + type-detect: "npm:^4.0.0" + checksum: 10/f04f4d581f044a824a6322fe4f68fbee4d6780e93fc710cd9852cbc82bfc7010df00f0e05894b848abbe14dc3a25acac44f424e181ae64d12f2ab9d0a875a5ef + languageName: node + linkType: hard + + "default-require-extensions@npm:^3.0.0": + version: 3.0.1 + resolution: "default-require-extensions@npm:3.0.1" + dependencies: + strip-bom: "npm:^4.0.0" + checksum: 10/45882fc971dd157faf6716ced04c15cf252c0a2d6f5c5844b66ca49f46ed03396a26cd940771aa569927aee22923a961bab789e74b25aabc94d90742c9dd1217 + languageName: node + linkType: hard + + "diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: 10/4a179a75b17cbb420eb9145be913f9ddb34b47cb2ba4301e80ae745122826a468f02ca8f5e56945958de26ace594899c8381acb6659c88e7803ef078b53d690c + languageName: node + linkType: hard + + "diff@npm:^4.0.1, diff@npm:^4.0.2": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 + languageName: node + linkType: hard + + "eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 + languageName: node + linkType: hard + + "electron-to-chromium@npm:^1.4.820": + version: 1.4.828 + resolution: "electron-to-chromium@npm:1.4.828" + checksum: 10/5962877ab1239f93683729b07403ffa89559aad358b863d11f40edbc073a79414238296a628bc602a07eedcf41e9fa01b4a84d6813237dfeb4183b0e387b6136 + languageName: node + linkType: hard + + "emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + + "emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 + languageName: node + linkType: hard + + "enabled@npm:2.0.x": + version: 2.0.0 + resolution: "enabled@npm:2.0.0" + checksum: 10/9d256d89f4e8a46ff988c6a79b22fa814b4ffd82826c4fdacd9b42e9b9465709d3b748866d0ab4d442dfc6002d81de7f7b384146ccd1681f6a7f868d2acca063 + languageName: node + linkType: hard + + "encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + + "env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + + "err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd + languageName: node + linkType: hard + + "es6-error@npm:^4.0.1": + version: 4.1.1 + resolution: "es6-error@npm:4.1.1" + checksum: 10/48483c25701dc5a6376f39bbe2eaf5da0b505607ec5a98cd3ade472c1939242156660636e2e508b33211e48e88b132d245341595c067bd4a95ac79fa7134da06 + languageName: node + linkType: hard + + "escalade@npm:^3.1.1, escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 + languageName: node + linkType: hard + + "escape-string-regexp@npm:4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + + "escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + + "esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb + languageName: node + linkType: hard + + "exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 10/2d9bbb6473de7051f96790d5f9a678f32e60ed0aa70741dc7fdc96fec8d631124ec3374ac144387604f05afff9500f31a1d45bd9eee4cdc2e4f9ad2d9b9d5dbd + languageName: node + linkType: hard + + "fabric-contract-api@npm:2.5.6, fabric-contract-api@npm:^2.4.1": + version: 2.5.6 + resolution: "fabric-contract-api@npm:2.5.6" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.5.6" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + checksum: 10/fe47af74162dcc7fb4342726829b8d8c309caae00d59fd882c8c8009c49b5bf39e6ba00e239b4df4af0ba5027b0781a29584e656a20321f33989d72dc1ffbaf9 + languageName: node + linkType: hard + + "fabric-shim-api@npm:2.5.6": + version: 2.5.6 + resolution: "fabric-shim-api@npm:2.5.6" + checksum: 10/d24c6f23c5d25fda6794410d5155f80df68fa8f3b5d40c68df275e5ab3ac126d3bcf345ba7dc34c3471e58c31be047227879359c282283b3392b4f8b1b5cdd39 + languageName: node + linkType: hard + + "fabric-shim@npm:^2.4.1": + version: 2.5.6 + resolution: "fabric-shim@npm:2.5.6" + dependencies: + "@fidm/x509": "npm:^1.2.1" + "@grpc/grpc-js": "npm:~1.10.9" + "@hyperledger/fabric-protos": "npm:~0.2.1" + "@types/node": "npm:^16.11.1" + ajv: "npm:^6.12.2" + fabric-contract-api: "npm:2.5.6" + fabric-shim-api: "npm:2.5.6" + fast-safe-stringify: "npm:^2.1.1" + long: "npm:^5.2.3" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + yargs: "npm:^17.4.0" + yargs-parser: "npm:^21.0.1" + bin: + fabric-chaincode-node: cli.js + checksum: 10/ac21dd16ba6bfef868ba5215e2f8530cda9541d897f9b53f93b55c06130a7f6c9c5a87e0ac30f11de37338253feecb0f7378531e085af71d46c0b482555cad7c + languageName: node + linkType: hard + + "fast-deep-equal@npm:^3.1.1": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + + "fast-json-stable-stringify@npm:^2.0.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e + languageName: node + linkType: hard + + "fast-safe-stringify@npm:^2.1.1": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 + languageName: node + linkType: hard + + "fecha@npm:^4.2.0": + version: 4.2.3 + resolution: "fecha@npm:4.2.3" + checksum: 10/534ce630c8f63c116292145607fc18c0f06bfa2fd74094357bf65daacc5d3f4f2b285bf8eb112c3bbf98c5caa6d386cced797f44b9b1b33da0c0a81020444826 + languageName: node + linkType: hard + + "fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + + "find-cache-dir@npm:^3.2.0": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" + dependencies: + commondir: "npm:^1.0.1" + make-dir: "npm:^3.0.2" + pkg-dir: "npm:^4.1.0" + checksum: 10/3907c2e0b15132704ed67083686cd3e68ab7d9ecc22e50ae9da20678245d488b01fa22c0e34c0544dc6edc4354c766f016c8c186a787be7c17f7cde8c5281e85 + languageName: node + linkType: hard + + "find-up@npm:5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: "npm:^6.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + + "find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + + "flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 10/72479e651c15eab53e25ce04c31bab18cfaac0556505cac19221dbbe85bbb9686bc76e4d397e89e5bf516ce667dcf818f8b07e585568edba55abc2bf1f698fb5 + languageName: node + linkType: hard + + "fn.name@npm:1.x.x": + version: 1.1.0 + resolution: "fn.name@npm:1.1.0" + checksum: 10/000198af190ae02f0138ac5fa4310da733224c628e0230c81e3fff7c4e094af7e0e8bb9f4357cabd21db601759d89f3445da744afbae20623cfa41edf3888397 + languageName: node + linkType: hard + + "foreground-child@npm:^2.0.0": + version: 2.0.0 + resolution: "foreground-child@npm:2.0.0" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^3.0.2" + checksum: 10/f36574ad8e19d69ce06fceac7d86161b863968e4ba292c14b7b40e5c464e3e9bcd7711250d33427d95cc2bb0d48cf101df9687433dbbc7fd3c7e4f595be8305e + languageName: node + linkType: hard + + "foreground-child@npm:^3.1.0": + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 10/77b33b3c438a499201727ca84de39a66350ccd54a8805df712773e963cefb5c4632dbc4386109e97a0df8fb1585aee95fa35acb07587e3e04cfacabfc0ae15dc + languageName: node + linkType: hard + + "fromentries@npm:^1.2.0": + version: 1.3.2 + resolution: "fromentries@npm:1.3.2" + checksum: 10/10d6e07d289db102c0c1eaf5c3e3fa55ddd6b50033d7de16d99a7cd89f1e1a302dfadb26457031f9bb5d2ed95a179aaf0396092dde5abcae06e8a2f0476826be + languageName: node + linkType: hard + + "fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/03191781e94bc9a54bd376d3146f90fe8e082627c502185dbf7b9b3032f66b0b142c1115f3b2cc5936575fc1b44845ce903dd4c21bec2a8d69f3bd56f9cee9ec + languageName: node + linkType: hard + + "fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f + languageName: node + linkType: hard + + "fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 + languageName: node + linkType: hard + + "fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + + "fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + + "function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 + languageName: node + linkType: hard + + "gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd + languageName: node + linkType: hard + + "get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + + "get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 10/3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + + "get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + + "get-params@npm:^0.1.2": + version: 0.1.2 + resolution: "get-params@npm:0.1.2" + checksum: 10/7768710dd5e68805b51981a6fbb0a689728d280357f5dd1a080fd7e732d9b4ccf7fc5e0fc792ff482022d8af37242ff5e72b2b50dbafccb21db4f77eb9c646c4 + languageName: node + linkType: hard + + "glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + + "glob@npm:7.2.0": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/bc78b6ea0735b6e23d20678aba4ae6a4760e8c9527e3c4683ac25b14e70f55f9531245dcf25959b70cbc4aa3dcce1fc37ab65fd026a4cbd70aa3a44880bd396b + languageName: node + linkType: hard + + "glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/698dfe11828b7efd0514cd11e573eaed26b2dff611f0400907281ce3eab0c1e56143ef9b35adc7c77ecc71fba74717b510c7c223d34ca8a98ec81777b293d4ac + languageName: node + linkType: hard + + "glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b + languageName: node + linkType: hard + + "globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 + languageName: node + linkType: hard + + "google-protobuf@npm:^3.21.0": + version: 3.21.4 + resolution: "google-protobuf@npm:3.21.4" + checksum: 10/0d87fe8ef221d105cbaa808f4024bd577638524d8e461469e3733f2e4933391ad4da86b7fcbd11e8781bee04eacf2e8ba19aaacd5f9deb336a220485841d980f + languageName: node + linkType: hard + + "graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + + "growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 10/1391a9add951964de566adc0aee8b0e2b2321e768c1fdccb7a8e156d6a6cd7ea72782883ba8c2c307baf524e3059519423b72e585eba5e7a5f6e83a1e2359b0d + languageName: node + linkType: hard + + "has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + + "has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + + "hasha@npm:^5.0.0": + version: 5.2.2 + resolution: "hasha@npm:5.2.2" + dependencies: + is-stream: "npm:^2.0.0" + type-fest: "npm:^0.8.0" + checksum: 10/06cc474bed246761ff61c19d629977eb5f53fa817be4313a255a64ae0f433e831a29e83acb6555e3f4592b348497596f1d1653751008dda4f21c9c21ca60ac5a + languageName: node + linkType: hard + + "hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + languageName: node + linkType: hard + + "he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 + languageName: node + linkType: hard + + "html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + + "http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f + languageName: node + linkType: hard + + "http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + languageName: node + linkType: hard + + "https-proxy-agent@npm:^7.0.1": + version: 7.0.5 + resolution: "https-proxy-agent@npm:7.0.5" + dependencies: + agent-base: "npm:^7.0.2" + debug: "npm:4" + checksum: 10/6679d46159ab3f9a5509ee80c3a3fc83fba3a920a5e18d32176c3327852c3c00ad640c0c4210a8fd70ea3c4a6d3a1b375bf01942516e7df80e2646bdc77658ab + languageName: node + linkType: hard + + "iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f + languageName: node + linkType: hard + + "imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 + languageName: node + linkType: hard + + "indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 + languageName: node + linkType: hard + + "inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 + languageName: node + linkType: hard + + "inherits@npm:2, inherits@npm:^2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 + languageName: node + linkType: hard + + "ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + + "is-arrayish@npm:^0.3.1": + version: 0.3.2 + resolution: "is-arrayish@npm:0.3.2" + checksum: 10/81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade + languageName: node + linkType: hard + + "is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e + languageName: node + linkType: hard + + "is-core-module@npm:^2.13.0": + version: 2.14.0 + resolution: "is-core-module@npm:2.14.0" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10/1e0d1a16cb3a94746f6a28db09ccab4562860c94c74bacedb3a6729736d61cfb97001d2052f9622637aa7ea8e0643a3f0f4f16965c70ba6ce30a8ccfe8074af8 + languageName: node + linkType: hard + + "is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + + "is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + + "is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + + "is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10/93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + + "is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + + "is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + + "is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + + "is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c + languageName: node + linkType: hard + + "is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 10/a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + + "is-windows@npm:^1.0.2": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 10/438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 + languageName: node + linkType: hard + + "isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + + "isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 + languageName: node + linkType: hard + + "isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + + "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 + languageName: node + linkType: hard + + "istanbul-lib-hook@npm:^3.0.0": + version: 3.0.0 + resolution: "istanbul-lib-hook@npm:3.0.0" + dependencies: + append-transform: "npm:^2.0.0" + checksum: 10/512a996cce6b1b9003ba59eab42299dd1527176c01f3ceb7b16bf68f437eeab4958f9df7df0a6b258d45d5f1a2ca2a1bdb915970711e1a5d7b2de911c582f721 + languageName: node + linkType: hard + + "istanbul-lib-instrument@npm:^4.0.0": + version: 4.0.3 + resolution: "istanbul-lib-instrument@npm:4.0.3" + dependencies: + "@babel/core": "npm:^7.7.5" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.0.0" + semver: "npm:^6.3.0" + checksum: 10/6e04ab365b95644ec4954b645f901be90be8ad81233d6df536300cdafcf70dd1ed22a912ceda38b32053c7fc9830c44cd23550c603f493329a8532073d1d6c42 + languageName: node + linkType: hard + + "istanbul-lib-processinfo@npm:^2.0.2": + version: 2.0.3 + resolution: "istanbul-lib-processinfo@npm:2.0.3" + dependencies: + archy: "npm:^1.0.0" + cross-spawn: "npm:^7.0.3" + istanbul-lib-coverage: "npm:^3.2.0" + p-map: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + uuid: "npm:^8.3.2" + checksum: 10/60e7b3441687249460f34a817c7204967b07830a69b6e430e60a45615319c2ab4e2b2eaeb8b3decf549fccd419cd600d21173961632229967608d7d1b194f39e + languageName: node + linkType: hard + + "istanbul-lib-report@npm:^3.0.0": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 + languageName: node + linkType: hard + + "istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" + dependencies: + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + source-map: "npm:^0.6.1" + checksum: 10/5526983462799aced011d776af166e350191b816821ea7bcf71cab3e5272657b062c47dc30697a22a43656e3ced78893a42de677f9ccf276a28c913190953b82 + languageName: node + linkType: hard + + "istanbul-reports@npm:^3.0.2": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa + languageName: node + linkType: hard + + "jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 + languageName: node + linkType: hard + + "js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 + languageName: node + linkType: hard + + "js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 + languageName: node + linkType: hard + + "js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 + languageName: node + linkType: hard + + "jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + + "jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10/d2096abdcdec56969764b40ffc91d4a23408aa2f351b4d1c13f736f25476643238c43fdbaf38a191c26b1b78fd856d965f5d4d0dde7b89459cd94025190cdf13 + languageName: node + linkType: hard + + "json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + + "json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da + languageName: node + linkType: hard + + "just-extend@npm:^4.0.2": + version: 4.2.1 + resolution: "just-extend@npm:4.2.1" + checksum: 10/375389c0847d56300873fa622fbc5c5e208933e372bbedb39c82f583299cdad4fe9c4773bc35fcd9c42cd85744f07474ca4163aa0f9125dd5be37bc09075eb49 + languageName: node + linkType: hard + + "kuler@npm:^2.0.0": + version: 2.0.0 + resolution: "kuler@npm:2.0.0" + checksum: 10/9e10b5a1659f9ed8761d38df3c35effabffbd19fc6107324095238e4ef0ff044392cae9ac64a1c2dda26e532426485342226b93806bd97504b174b0dcf04ed81 + languageName: node + linkType: hard + + "locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: "npm:^4.1.0" + checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + + "locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: "npm:^5.0.0" + checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + + "lodash.camelcase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.camelcase@npm:4.3.0" + checksum: 10/c301cc379310441dc73cd6cebeb91fb254bea74e6ad3027f9346fc43b4174385153df420ffa521654e502fd34c40ef69ca4e7d40ee7129a99e06f306032bfc65 + languageName: node + linkType: hard + + "lodash.flattendeep@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flattendeep@npm:4.4.0" + checksum: 10/0d0b41d8d86999e8bea94905ac65347404d427aacddbc6654dc2f85905e27cd2b708139671ecea135fa6f0a17ed94b9d4cab8ce12b08eddcbb1ddd83952ee4c2 + languageName: node + linkType: hard + + "lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: 10/2a4925f6e89bc2c010a77a802d1ba357e17ed1ea03c2ddf6a146429f2856a216663e694a6aa3549a318cbbba3fd8b7decb392db457e6ac0b83dc745ed0a17380 + languageName: node + linkType: hard + + "log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 10/fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + + "logform@npm:^2.6.0, logform@npm:^2.6.1": + version: 2.6.1 + resolution: "logform@npm:2.6.1" + dependencies: + "@colors/colors": "npm:1.6.0" + "@types/triple-beam": "npm:^1.3.2" + fecha: "npm:^4.2.0" + ms: "npm:^2.1.1" + safe-stable-stringify: "npm:^2.3.1" + triple-beam: "npm:^1.3.0" + checksum: 10/e67f414787fbfe1e6a997f4c84300c7e06bee3d0bd579778af667e24b36db3ea200ed195d41b61311ff738dab7faabc615a07b174b22fe69e0b2f39e985be64b + languageName: node + linkType: hard + + "long@npm:^5.0.0, long@npm:^5.2.3": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 10/9167ec6947a825b827c30da169a7384eec6c0c9ec2f0b9c74da2e93d81159bbe39fb09c3f13dae9721d4b807ccfa09797a7dd1012f5d478e3e33ca3c78b608e6 + languageName: node + linkType: hard + + "loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: "npm:^2.0.1" + checksum: 10/635c8f0914c2ce7ecfe4e239fbaf0ce1d2c00e4246fafcc4ed000bfdb1b8f89d05db1a220054175cca631ebf3894872a26fffba0124477fcb562f78762848fb1 + languageName: node + linkType: hard + + "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10/e6e90267360476720fa8e83cc168aa2bf0311f3f2eea20a6ba78b90a885ae72071d9db132f40fda4129c803e7dcec3a6b6a6fbb44ca90b081630b810b5d6a41a + languageName: node + linkType: hard + + "lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: "npm:^3.0.2" + checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + languageName: node + linkType: hard + + "make-dir@npm:^3.0.0, make-dir@npm:^3.0.2": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" + dependencies: + semver: "npm:^6.0.0" + checksum: 10/484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 + languageName: node + linkType: hard + + "make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + + "make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + + "make-fetch-happen@npm:^13.0.0": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" + dependencies: + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10/11bae5ad6ac59b654dbd854f30782f9de052186c429dfce308eda42374528185a100ee40ac9ffdc36a2b6c821ecaba43913e4730a12f06f15e895ea9cb23fa59 + languageName: node + linkType: hard + + "minimatch@npm:4.2.1": + version: 4.2.1 + resolution: "minimatch@npm:4.2.1" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/27e49fb720116face9588c29634404edc0c6677e5448ba01b4ec6179002461cc4fabc842497a0537edc5aa87bc93e65cfb0fe6dc32b850563429a64836dd1d54 + languageName: node + linkType: hard + + "minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + languageName: node + linkType: hard + + "minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/dd6a8927b063aca6d910b119e1f2df6d2ce7d36eab91de83167dd136bb85e1ebff97b0d3de1cb08bd1f7e018ca170b4962479fefab5b2a69e2ae12cb2edc8348 + languageName: node + linkType: hard + + "minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f + languageName: node + linkType: hard + + "minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + + "minipass-fetch@npm:^3.0.0": + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10/c669948bec1373313aaa8f104b962a3ced9f45c49b26366a4b0ae27ccdfa9c5740d72c8a84d3f8623d7a61c5fc7afdfda44789008c078f61a62441142efc4a97 + languageName: node + linkType: hard + + "minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + + "minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + + "minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + languageName: node + linkType: hard + + "minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 + languageName: node + linkType: hard + + "minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10/61682162d29f45d3152b78b08bab7fb32ca10899bc5991ffe98afc18c9e9543bd1e3be94f8b8373ba6262497db63607079dc242ea62e43e7b2270837b7347c93 + languageName: node + linkType: hard + + "minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10/ae0f45436fb51344dcb87938446a32fbebb540d0e191d63b35e1c773d47512e17307bf54aa88326cc6d176594d00e4423563a091f7266c2f9a6872cdc1e234d1 + languageName: node + linkType: hard + + "mkdirp@npm:^0.5.3": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: "npm:^1.2.6" + bin: + mkdirp: bin/cmd.js + checksum: 10/0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + + "mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 + languageName: node + linkType: hard + + "mocha@npm:^9.2.0": + version: 9.2.2 + resolution: "mocha@npm:9.2.2" + dependencies: + "@ungap/promise-all-settled": "npm:1.1.2" + ansi-colors: "npm:4.1.1" + browser-stdout: "npm:1.3.1" + chokidar: "npm:3.5.3" + debug: "npm:4.3.3" + diff: "npm:5.0.0" + escape-string-regexp: "npm:4.0.0" + find-up: "npm:5.0.0" + glob: "npm:7.2.0" + growl: "npm:1.10.5" + he: "npm:1.2.0" + js-yaml: "npm:4.1.0" + log-symbols: "npm:4.1.0" + minimatch: "npm:4.2.1" + ms: "npm:2.1.3" + nanoid: "npm:3.3.1" + serialize-javascript: "npm:6.0.0" + strip-json-comments: "npm:3.1.1" + supports-color: "npm:8.1.1" + which: "npm:2.0.2" + workerpool: "npm:6.2.0" + yargs: "npm:16.2.0" + yargs-parser: "npm:20.2.4" + yargs-unparser: "npm:2.0.0" + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 10/8ee58bff8694ad4013fc0fbb5670c5ec6d8404c601df2d4ae798fad01dd03b5f9395347cf59167006b315a14813a6f839290d60dcbdee8ef4246afe43609d2dc + languageName: node + linkType: hard + + "ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 10/673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + + "ms@npm:2.1.3, ms@npm:^2.1.1": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + + "nanoid@npm:3.3.1": + version: 3.3.1 + resolution: "nanoid@npm:3.3.1" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/306f2cb9e4dcfb94738b09de9dc63839a37db33626f66b24dbcc8f66d4b91784645794a7c4f250d629e4d66f5385164c6748c58ac5b7c95217e9e048590efbe4 + languageName: node + linkType: hard + + "negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 + languageName: node + linkType: hard + + "nise@npm:^4.0.4": + version: 4.1.0 + resolution: "nise@npm:4.1.0" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + "@sinonjs/fake-timers": "npm:^6.0.0" + "@sinonjs/text-encoding": "npm:^0.7.1" + just-extend: "npm:^4.0.2" + path-to-regexp: "npm:^1.7.0" + checksum: 10/ff7c2e316c8ae8327573417fefcc84070d9dcfa423b123d014d21db5f7de07580f76a85143c2f91eaf5f1a979f3f9a3721e3652753e58ddaa703aa8d65539b0b + languageName: node + linkType: hard + + "node-gyp@npm:latest": + version: 10.2.0 + resolution: "node-gyp@npm:10.2.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^13.0.0" + nopt: "npm:^7.0.0" + proc-log: "npm:^4.1.0" + semver: "npm:^7.3.5" + tar: "npm:^6.2.1" + which: "npm:^4.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/41773093b1275751dec942b985982fd4e7a69b88cae719b868babcef3880ee6168aaec8dcaa8cd0b9fa7c84873e36cc549c6cac6a124ee65ba4ce1f1cc108cfe + languageName: node + linkType: hard + + "node-preload@npm:^0.2.1": + version: 0.2.1 + resolution: "node-preload@npm:0.2.1" + dependencies: + process-on-spawn: "npm:^1.0.0" + checksum: 10/de36ed365b7e474eaf05c41f976774dece23a7f398fe76dbf9705f9670a1f49e6a27c5f31fe58b4e43d96413fdce4806192c60d35317b25725636c90889d5bab + languageName: node + linkType: hard + + "node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 + languageName: node + linkType: hard + + "nopt@npm:^7.0.0": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae + languageName: node + linkType: hard + + "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + + "nyc@npm:^15.0.0": + version: 15.1.0 + resolution: "nyc@npm:15.1.0" + dependencies: + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + caching-transform: "npm:^4.0.0" + convert-source-map: "npm:^1.7.0" + decamelize: "npm:^1.2.0" + find-cache-dir: "npm:^3.2.0" + find-up: "npm:^4.1.0" + foreground-child: "npm:^2.0.0" + get-package-type: "npm:^0.1.0" + glob: "npm:^7.1.6" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-hook: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^4.0.0" + istanbul-lib-processinfo: "npm:^2.0.2" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-reports: "npm:^3.0.2" + make-dir: "npm:^3.0.0" + node-preload: "npm:^0.2.1" + p-map: "npm:^3.0.0" + process-on-spawn: "npm:^1.0.0" + resolve-from: "npm:^5.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + spawn-wrap: "npm:^2.0.0" + test-exclude: "npm:^6.0.0" + yargs: "npm:^15.0.2" + bin: + nyc: bin/nyc.js + checksum: 10/c987f04f4192dfd94e9e69869c76a54220b3ed555016751f380a413a378cceff8ec346df579e9126035b6acbc60ab893cc65e67729cc427c0171361bcb481e66 + languageName: node + linkType: hard + + "once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + + "one-time@npm:^1.0.0": + version: 1.0.0 + resolution: "one-time@npm:1.0.0" + dependencies: + fn.name: "npm:1.x.x" + checksum: 10/64d0160480eeae4e3b2a6fc0a02f452e05bb0cc8373a4ed56a4fc08c3939dcb91bc20075003ed499655bd16919feb63ca56f86eee7932c5251f7d629b55dfc90 + languageName: node + linkType: hard + + "p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + + "p-limit@npm:^3.0.2": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: "npm:^0.1.0" + checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + + "p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + + "p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: "npm:^3.0.2" + checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + + "p-map@npm:^3.0.0": + version: 3.0.0 + resolution: "p-map@npm:3.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/d4a0664d2af05d7e5f6f342e6493d4cad48f7398ac803c5066afb1f8d2010bfc2a83d935689437288f7b1a743772085b8fa0909a8282b5df4210bcda496c37c8 + languageName: node + linkType: hard + + "p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c + languageName: node + linkType: hard + + "p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + + "package-hash@npm:^4.0.0": + version: 4.0.0 + resolution: "package-hash@npm:4.0.0" + dependencies: + graceful-fs: "npm:^4.1.15" + hasha: "npm:^5.0.0" + lodash.flattendeep: "npm:^4.4.0" + release-zalgo: "npm:^1.0.0" + checksum: 10/c7209d98ac31926e0c1753d014f8b6b924e1e6a1aacf833dc99edece9c8381424c41c97c26c7eee82026944a79e99023cde5998bf515d7465c87005d52152040 + languageName: node + linkType: hard + + "package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + + "path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + + "path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + + "path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + + "path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + + "path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + languageName: node + linkType: hard + + "path-to-regexp@npm:^1.7.0": + version: 1.8.0 + resolution: "path-to-regexp@npm:1.8.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add + languageName: node + linkType: hard + + "pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 10/b50a4751068aa3a5428f5a0b480deecedc6f537666a3630a0c2ae2d5e7c0f4bf0ee77b48404441ec1220bef0c91625e6030b3d3cf5a32ab0d9764018d1d9dbb6 + languageName: node + linkType: hard + + "picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 + languageName: node + linkType: hard + + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + + "pkg-dir@npm:^4.1.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: "npm:^4.0.0" + checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + + "proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a + languageName: node + linkType: hard + + "process-on-spawn@npm:^1.0.0": + version: 1.0.0 + resolution: "process-on-spawn@npm:1.0.0" + dependencies: + fromentries: "npm:^1.2.0" + checksum: 10/8795d71742798e5a059e13da2a9c13988aa7c673a3a57f276c1ff6ed942ba9b7636139121c6a409eaa2ea6a8fda7af4be19c3dc576320515bb3f354e3544106e + languageName: node + linkType: hard + + "promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 + languageName: node + linkType: hard + + "protobufjs@npm:^7.2.5": + version: 7.3.2 + resolution: "protobufjs@npm:7.3.2" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/node": "npm:>=13.7.0" + long: "npm:^5.0.0" + checksum: 10/816604aa0649a93fd5d3ef2858ef038f482d18eebcfb4201fe85c0d3bcccc12410f9e3e73262f1219e6b5bed4f27b28c3bf7c931c409dfb1fd563a304d541d89 + languageName: node + linkType: hard + + "punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 + languageName: node + linkType: hard + + "randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + + "readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.2": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10/d9e3e53193adcdb79d8f10f2a1f6989bd4389f5936c6f8b870e77570853561c362bee69feca2bbb7b32368ce96a85504aa4cedf7cf80f36e6a9de30d64244048 + languageName: node + linkType: hard + + "readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 + languageName: node + linkType: hard + + "reflect-metadata@npm:^0.1.13": + version: 0.1.14 + resolution: "reflect-metadata@npm:0.1.14" + checksum: 10/fcab9c17ec3b9fea0e2f748c2129aceb57c24af6d8d13842b8a77c8c79dde727d7456ce293e76e8d7b267d1dbf93eea4c5b3c9101299a789a075824f2e40f1ee + languageName: node + linkType: hard + + "release-zalgo@npm:^1.0.0": + version: 1.0.0 + resolution: "release-zalgo@npm:1.0.0" + dependencies: + es6-error: "npm:^4.0.1" + checksum: 10/1719e44b240ee1f57d034b26ea167f3cbf3c36fdae6d6efd0e6e5b202d9852baffc1c5595d378b5f8b2ad729b907ddd962f3d051d89499f83584993a5399f964 + languageName: node + linkType: hard + + "require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + + "require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: 10/8604a570c06a69c9d939275becc33a65676529e1c3e5a9f42d58471674df79357872b96d70bb93a0380a62d60dc9031c98b1a9dad98c946ffdd61b7ac0c8cedd + languageName: node + linkType: hard + + "resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 + languageName: node + linkType: hard + + "resolve@npm:^1.3.2": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 + languageName: node + linkType: hard + + "resolve@patch:resolve@npm%3A^1.3.2#optional!builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a + languageName: node + linkType: hard + + "retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 + languageName: node + linkType: hard + + "rimraf@npm:^3.0.0": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 + languageName: node + linkType: hard + + "safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + + "safe-stable-stringify@npm:^2.3.1": + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 10/a6c192bbefe47770a11072b51b500ed29be7b1c15095371c1ee1dc13e45ce48ee3c80330214c56764d006c485b88bd0b24940d868948170dddc16eed312582d8 + languageName: node + linkType: hard + + "safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 + languageName: node + linkType: hard + + "satp-wrapper-contract@workspace:.": + version: 0.0.0-use.local + resolution: "satp-wrapper-contract@workspace:." + dependencies: + "@types/chai": "npm:^4.2.11" + "@types/chai-as-promised": "npm:^7.1.2" + "@types/mocha": "npm:^7.0.2" + "@types/node": "npm:18.11.9" + "@types/sinon": "npm:^7.5.2" + "@types/sinon-chai": "npm:^3.2.3" + chai: "npm:^4.2.0" + chai-as-promised: "npm:^7.1.1" + fabric-contract-api: "npm:^2.4.1" + fabric-shim: "npm:^2.4.1" + mocha: "npm:^9.2.0" + nyc: "npm:^15.0.0" + sinon: "npm:^9.0.1" + sinon-chai: "npm:^3.5.0" + ts-node: "npm:^8.8.1" + tslint: "npm:^6.1.0" + typescript: "npm:5.3.3" + winston: "npm:^3.2.1" + languageName: unknown + linkType: soft + + "semver@npm:^5.3.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: 10/fca14418a174d4b4ef1fecb32c5941e3412d52a4d3d85165924ce3a47fbc7073372c26faf7484ceb4bbc2bde25880c6b97e492473dc7e9708fdfb1c6a02d546e + languageName: node + linkType: hard + + "semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10/1ef3a85bd02a760c6ef76a45b8c1ce18226de40831e02a00bad78485390b98b6ccaa31046245fc63bba4a47a6a592b6c7eedc65cc47126e60489f9cc1ce3ed7e + languageName: node + linkType: hard + + "semver@npm:^7.3.5, semver@npm:^7.5.3": + version: 7.6.2 + resolution: "semver@npm:7.6.2" + bin: + semver: bin/semver.js + checksum: 10/296b17d027f57a87ef645e9c725bff4865a38dfc9caf29b26aa084b85820972fbe7372caea1ba6857162fa990702c6d9c1d82297cecb72d56c78ab29070d2ca2 + languageName: node + linkType: hard + + "serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/ed3dabfbb565c48c9eb1ca8fe58f0d256902ab70a8a605be634ddd68388d5f728bb0bd1268e94fab628748ba8ad8392f01b05f3cbe1e4878b5c58c669fd3d1b4 + languageName: node + linkType: hard + + "set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 10/8980ebf7ae9eb945bb036b6e283c547ee783a1ad557a82babf758a065e2fb6ea337fd82cac30dd565c1e606e423f30024a19fff7afbf4977d784720c4026a8ef + languageName: node + linkType: hard + + "shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + + "shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + + "signal-exit@npm:^3.0.2": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + + "signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f + languageName: node + linkType: hard + + "simple-swizzle@npm:^0.2.2": + version: 0.2.2 + resolution: "simple-swizzle@npm:0.2.2" + dependencies: + is-arrayish: "npm:^0.3.1" + checksum: 10/c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc + languageName: node + linkType: hard + + "sinon-chai@npm:^3.5.0": + version: 3.7.0 + resolution: "sinon-chai@npm:3.7.0" + peerDependencies: + chai: ^4.0.0 + sinon: ">=4.0.0" + checksum: 10/028853eb8a545ca613c6863014a40f07d1e6b81467e20939fefcd13f170206d24165b91099fb297aeb4d137745e321da25daa8e2d665cc0a78f90d5b877e8bbe + languageName: node + linkType: hard + + "sinon@npm:^9.0.1": + version: 9.2.4 + resolution: "sinon@npm:9.2.4" + dependencies: + "@sinonjs/commons": "npm:^1.8.1" + "@sinonjs/fake-timers": "npm:^6.0.1" + "@sinonjs/samsam": "npm:^5.3.1" + diff: "npm:^4.0.2" + nise: "npm:^4.0.4" + supports-color: "npm:^7.1.0" + checksum: 10/4597c12e2490b22aaae5fb1edca169a10e71dee73c13d2d12d6d9fa7f3bdbdb53ec5ad52c631c301fb3eab79471a30b05be65155c30ca415169470ea4789eae6 + languageName: node + linkType: hard + + "smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 + languageName: node + linkType: hard + + "socks-proxy-agent@npm:^8.0.3": + version: 8.0.4 + resolution: "socks-proxy-agent@npm:8.0.4" + dependencies: + agent-base: "npm:^7.1.1" + debug: "npm:^4.3.4" + socks: "npm:^2.8.3" + checksum: 10/c8e7c2b398338b49a0a0f4d2bae5c0602aeeca6b478b99415927b6c5db349ca258448f2c87c6958ebf83eea17d42cbc5d1af0bfecb276cac10b9658b0f07f7d7 + languageName: node + linkType: hard + + "socks@npm:^2.8.3": + version: 2.8.3 + resolution: "socks@npm:2.8.3" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/ffcb622c22481dfcd7589aae71fbfd71ca34334064d181df64bf8b7feaeee19706aba4cffd1de35cc7bbaeeaa0af96be2d7f40fcbc7bc0ab69533a7ae9ffc4fb + languageName: node + linkType: hard + + "source-map-support@npm:^0.5.17": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + + "source-map@npm:^0.6.0, source-map@npm:^0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + + "spawn-wrap@npm:^2.0.0": + version: 2.0.0 + resolution: "spawn-wrap@npm:2.0.0" + dependencies: + foreground-child: "npm:^2.0.0" + is-windows: "npm:^1.0.2" + make-dir: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + which: "npm:^2.0.1" + checksum: 10/ce6ca08d66c3a41a28a7ecc10bf4945d7930fd3ae961d40804ee109cee6ee9f8436125f53bc07918ca1eb461fe2ff0033af1dc3cb803469b585639675fc2d2e7 + languageName: node + linkType: hard + + "sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + + "sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa + languageName: node + linkType: hard + + "ssri@npm:^10.0.0": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/f92c1b3cc9bfd0a925417412d07d999935917bc87049f43ebec41074661d64cf720315661844106a77da9f8204b6d55ae29f9514e673083cae39464343af2a8b + languageName: node + linkType: hard + + "stack-trace@npm:0.0.x": + version: 0.0.10 + resolution: "stack-trace@npm:0.0.10" + checksum: 10/7bd633f0e9ac46e81a0b0fe6538482c1d77031959cf94478228731709db4672fbbed59176f5b9a9fd89fec656b5dae03d084ef2d1b0c4c2f5683e05f2dbb1405 + languageName: node + linkType: hard + + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + + "string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + + "string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 + languageName: node + linkType: hard + + "strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + + "strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + languageName: node + linkType: hard + + "strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + + "strip-json-comments@npm:3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + + "supports-color@npm:8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + + "supports-color@npm:^5.3.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10/5f505c6fa3c6e05873b43af096ddeb22159831597649881aeb8572d6fe3b81e798cc10840d0c9735e0026b250368851b7f77b65e84f4e4daa820a4f69947f55b + languageName: node + linkType: hard + + "supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + + "supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e + languageName: node + linkType: hard + + "tar@npm:^6.1.11, tar@npm:^6.2.1": + version: 6.2.1 + resolution: "tar@npm:6.2.1" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10/bfbfbb2861888077fc1130b84029cdc2721efb93d1d1fb80f22a7ac3a98ec6f8972f29e564103bbebf5e97be67ebc356d37fa48dbc4960600a1eb7230fbd1ea0 + languageName: node + linkType: hard + + "test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^7.1.4" + minimatch: "npm:^3.0.4" + checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 + languageName: node + linkType: hard + + "text-hex@npm:1.0.x": + version: 1.0.0 + resolution: "text-hex@npm:1.0.0" + checksum: 10/1138f68adc97bf4381a302a24e2352f04992b7b1316c5003767e9b0d3367ffd0dc73d65001ea02b07cd0ecc2a9d186de0cf02f3c2d880b8a522d4ccb9342244a + languageName: node + linkType: hard + + "to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10/be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + + "to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard + + "triple-beam@npm:^1.3.0": + version: 1.4.1 + resolution: "triple-beam@npm:1.4.1" + checksum: 10/2e881a3e8e076b6f2b85b9ec9dd4a900d3f5016e6d21183ed98e78f9abcc0149e7d54d79a3f432b23afde46b0885bdcdcbff789f39bc75de796316961ec07f61 + languageName: node + linkType: hard + + "ts-node@npm:^8.8.1": + version: 8.10.2 + resolution: "ts-node@npm:8.10.2" + dependencies: + arg: "npm:^4.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + source-map-support: "npm:^0.5.17" + yn: "npm:3.1.1" + peerDependencies: + typescript: ">=2.7" + bin: + ts-node: dist/bin.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 10/1431026e6e9e8971ecaba14fdf9960541918c0560344d95e4942b765dbd96d5648b99ca02a5090046130aa9870164b82ba8090a4eda048d19da3ad7aceeb0b49 + languageName: node + linkType: hard + + "tslib@npm:^1.13.0, tslib@npm:^1.8.1": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb + languageName: node + linkType: hard + + "tslint@npm:^6.1.0": + version: 6.1.3 + resolution: "tslint@npm:6.1.3" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + builtin-modules: "npm:^1.1.1" + chalk: "npm:^2.3.0" + commander: "npm:^2.12.1" + diff: "npm:^4.0.1" + glob: "npm:^7.1.1" + js-yaml: "npm:^3.13.1" + minimatch: "npm:^3.0.4" + mkdirp: "npm:^0.5.3" + resolve: "npm:^1.3.2" + semver: "npm:^5.3.0" + tslib: "npm:^1.13.0" + tsutils: "npm:^2.29.0" + peerDependencies: + typescript: ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + bin: + tslint: bin/tslint + checksum: 10/26720946260151c6b4e91e637443f3c09466dcd29bb3455ba4ae39a8d8d249a5f63cb6ec09ae916bd9e4385533f1df9954a2b349349336fb44ed826f5c38e6ec + languageName: node + linkType: hard + + "tsutils@npm:^2.29.0": + version: 2.29.0 + resolution: "tsutils@npm:2.29.0" + dependencies: + tslib: "npm:^1.8.1" + peerDependencies: + typescript: ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + checksum: 10/9724fee9a21c399e5914f50d888467f6d116f2e466ba77d294de0437ee7bb4a60e0c919a36518845af8c6fa0aabf6b72a4a01d4464db16fa719ff4e0dd45cb82 + languageName: node + linkType: hard + + "tweetnacl@npm:^1.0.1": + version: 1.0.3 + resolution: "tweetnacl@npm:1.0.3" + checksum: 10/ca122c2f86631f3c0f6d28efb44af2a301d4a557a62a3e2460286b08e97567b258c2212e4ad1cfa22bd6a57edcdc54ba76ebe946847450ab0999e6d48ccae332 + languageName: node + linkType: hard + + "type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d + languageName: node + linkType: hard + + "type-fest@npm:^0.8.0": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 + languageName: node + linkType: hard + + "typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c + languageName: node + linkType: hard + + "typescript@npm:5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + languageName: node + linkType: hard + + "typescript@patch:typescript@npm%3A5.3.3#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + languageName: node + linkType: hard + + "undici-types@npm:~5.26.4": + version: 5.26.5 + resolution: "undici-types@npm:5.26.5" + checksum: 10/0097779d94bc0fd26f0418b3a05472410408877279141ded2bd449167be1aed7ea5b76f756562cb3586a07f251b90799bab22d9019ceba49c037c76445f7cddd + languageName: node + linkType: hard + + "unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 10/8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + + "unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/40912a8963fc02fb8b600cf50197df4a275c602c60de4cac4f75879d3c48558cfac48de08a25cc10df8112161f7180b3bbb4d662aadb711568602f9eddee54f0 + languageName: node + linkType: hard + + "update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" + dependencies: + escalade: "npm:^3.1.2" + picocolors: "npm:^1.0.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/d70b9efeaf4601aadb1a4f6456a7a5d9118e0063d995866b8e0c5e0cf559482671dab6ce7b079f9536b06758a344fbd83f974b965211e1c6e8d1958540b0c24c + languageName: node + linkType: hard + + "uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + languageName: node + linkType: hard + + "util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + + "uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 + languageName: node + linkType: hard + + "which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 10/1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + + "which@npm:2.0.2, which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f + languageName: node + linkType: hard + + "which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + + "winston-transport@npm:^4.7.0": + version: 4.7.1 + resolution: "winston-transport@npm:4.7.1" + dependencies: + logform: "npm:^2.6.1" + readable-stream: "npm:^3.6.2" + triple-beam: "npm:^1.3.0" + checksum: 10/bc48c921ec9b4a71c1445bf274aa6b00c01089a6c26fc0b19534f8a32fa2710c6766c9e6db53a23492c20772934025d312dd9fb08df157ccb6579ad6b9dae9a7 + languageName: node + linkType: hard + + "winston@npm:^3.2.1, winston@npm:^3.7.2": + version: 3.13.1 + resolution: "winston@npm:3.13.1" + dependencies: + "@colors/colors": "npm:^1.6.0" + "@dabh/diagnostics": "npm:^2.0.2" + async: "npm:^3.2.3" + is-stream: "npm:^2.0.0" + logform: "npm:^2.6.0" + one-time: "npm:^1.0.0" + readable-stream: "npm:^3.4.0" + safe-stable-stringify: "npm:^2.3.1" + stack-trace: "npm:0.0.x" + triple-beam: "npm:^1.3.0" + winston-transport: "npm:^4.7.0" + checksum: 10/bc78202708800f74b94a2cc4fbdd46569dea90f939ad2149a936b2deee612d63a512f9e5725251349090bc12ba35351dd67336b3c92bf094892f9ea03d34fdc4 + languageName: node + linkType: hard + + "workerpool@npm:6.2.0": + version: 6.2.0 + resolution: "workerpool@npm:6.2.0" + checksum: 10/c7dce6eae02098d70fe9924503bd95688564a1316cbb96fe55600f7ede0e66f1f2fea4d18aaec71fcee32373d17eda0bf87ac4dac8e5823e90ca1524aac90bdc + languageName: node + linkType: hard + + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + + "wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/0d64f2d438e0b555e693b95aee7b2689a12c3be5ac458192a1ce28f542a6e9e59ddfecc37520910c2c88eb1f82a5411260566dba5064e8f9895e76e169e76187 + languageName: node + linkType: hard + + "wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/7b1e4b35e9bb2312d2ee9ee7dc95b8cb5f8b4b5a89f7dde5543fe66c1e3715663094defa50d75454ac900bd210f702d575f15f3f17fa9ec0291806d2578d1ddf + languageName: node + linkType: hard + + "wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10/159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + + "write-file-atomic@npm:^3.0.0": + version: 3.0.3 + resolution: "write-file-atomic@npm:3.0.3" + dependencies: + imurmurhash: "npm:^0.1.4" + is-typedarray: "npm:^1.0.0" + signal-exit: "npm:^3.0.2" + typedarray-to-buffer: "npm:^3.1.5" + checksum: 10/0955ab94308b74d32bc252afe69d8b42ba4b8a28b8d79f399f3f405969f82623f981e35d13129a52aa2973450f342107c06d86047572637584e85a1c0c246bf3 + languageName: node + linkType: hard + + "y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 10/392870b2a100bbc643bc035fe3a89cef5591b719c7bdc8721bcdb3d27ab39fa4870acdca67b0ee096e146d769f311d68eda6b8195a6d970f227795061923013f + languageName: node + linkType: hard + + "y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + + "yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb + languageName: node + linkType: hard + + "yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10/4cb02b42b8a93b5cf50caf5d8e9beb409400a8a4d85e83bb0685c1457e9ac0b7a00819e9f5991ac25ffabb56a78e2f017c1acc010b3a1babfe6de690ba531abd + languageName: node + linkType: hard + + "yargs-parser@npm:20.2.4": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: 10/db8f251ae40e24782d5c089ed86883ba3c0ce7f3c174002a67ec500802f928df9d505fea5d04829769221ce20b0f69f6fb1138fbb2e2fb102e3e9d426d20edab + languageName: node + linkType: hard + + "yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: "npm:^5.0.0" + decamelize: "npm:^1.2.0" + checksum: 10/235bcbad5b7ca13e5abc54df61d42f230857c6f83223a38e4ed7b824681875b7f8b6ed52139d88a3ad007050f28dc0324b3c805deac7db22ae3b4815dae0e1bf + languageName: node + linkType: hard + + "yargs-parser@npm:^20.2.2": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc + languageName: node + linkType: hard + + "yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e + languageName: node + linkType: hard + + "yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: "npm:^6.0.0" + decamelize: "npm:^4.0.0" + flat: "npm:^5.0.2" + is-plain-obj: "npm:^2.1.0" + checksum: 10/68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + + "yargs@npm:16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: "npm:^7.0.2" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^20.2.2" + checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e + languageName: node + linkType: hard + + "yargs@npm:^15.0.2": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: "npm:^6.0.0" + decamelize: "npm:^1.2.0" + find-up: "npm:^4.1.0" + get-caller-file: "npm:^2.0.1" + require-directory: "npm:^2.1.1" + require-main-filename: "npm:^2.0.0" + set-blocking: "npm:^2.0.0" + string-width: "npm:^4.2.0" + which-module: "npm:^2.0.0" + y18n: "npm:^4.0.0" + yargs-parser: "npm:^18.1.2" + checksum: 10/bbcc82222996c0982905b668644ca363eebe6ffd6a572fbb52f0c0e8146661d8ce5af2a7df546968779bb03d1e4186f3ad3d55dfaadd1c4f0d5187c0e3a5ba16 + languageName: node + linkType: hard + + "yargs@npm:^17.4.0, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + + "yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 10/2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + + "yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: 10/f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard + \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts index 0c775ad781..fc168aa4a4 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway-utils.ts @@ -32,6 +32,26 @@ export function verifySignature( return true; } +export async function storeProof( + gateway: SATPGateway, + localLog: LocalLog, +): Promise { + if (localLog.data == undefined) return; + + localLog.key = getSatpLogKey( + localLog.sessionID, + localLog.type, + localLog.operation, + ); + localLog.timestamp = Date.now().toString(); + + await storeInDatabase(gateway, localLog); + + const hash = SHA256(localLog.data).toString(); + + await storeRemoteLog(gateway, localLog.key, hash); +} + export async function storeLog( gateway: SATPGateway, localLog: LocalLog, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore new file mode 100644 index 0000000000..149b576547 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore new file mode 100644 index 0000000000..999d88df69 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi-blo/typescript-axios/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts index a66127f94a..8825e5e212 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/common/session_pb.ts @@ -260,7 +260,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.LockAssertionClaim lock_assertion_claim = 45; */ - lockAssertionClaim?: LockAssertionClaim; + lockAssertionClaim = ""; /** * @generated from field: cacti.satp.v02.common.LockAssertionClaimFormat lock_assertion_claim_format = 46; @@ -280,7 +280,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.BurnAssertionClaim burn_assertion_claim = 49; */ - burnAssertionClaim?: BurnAssertionClaim; + burnAssertionClaim = ""; /** * @generated from field: cacti.satp.v02.common.BurnAssertionClaimFormat burn_assertion_claim_format = 50; @@ -290,7 +290,7 @@ export class SessionData extends Message { /** * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaim assignment_assertion_claim = 51; */ - assignmentAssertionClaim?: AssignmentAssertionClaim; + assignmentAssertionClaim = ""; /** * @generated from field: cacti.satp.v02.common.AssignmentAssertionClaimFormat assignment_assertion_claim_format = 52; diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts index 2fb9380d15..f646d858e9 100644 --- a/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/generated/proto/cacti/satp/v02/stage_2_pb.ts @@ -17,9 +17,9 @@ export class LockAssertionRequestMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, - { no: 2, name: "burn_assertion_claim", kind: "message", T: BurnAssertionClaim }, + { no: 2, name: "burn_assertion_claim", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "burn_assertion_claim_format", kind: "message", T: BurnAssertionClaimFormat }, { no: 4, name: "client_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "client_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, @@ -188,9 +188,9 @@ export class CommitFinalAcknowledgementReceiptResponseMessage extends Message [ { no: 1, name: "common", kind: "message", T: CommonSatp }, - { no: 2, name: "assignment_assertion_claim", kind: "message", T: AssignmentAssertionClaim }, + { no: 2, name: "assignment_assertion_claim", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "assignment_assertion_claim_format", kind: "message", T: AssignmentAssertionClaimFormat }, { no: 4, name: "server_transfer_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "server_signature", kind: "scalar", T: 9 /* ScalarType.STRING */ }, diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts new file mode 100644 index 0000000000..f4a83a82e3 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/blockchain-interaction.ts @@ -0,0 +1,42 @@ +// TODO: define alias types for SATPLedgerConnector, which encapsulates IPluginLedgerConnector + +import { + FabricSigningCredential, + IPluginLedgerConnectorFabricOptions, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + IPluginLedgerConnectorBesuOptions, + Web3SigningCredential, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { LogLevelDesc } from "@hyperledger/cactus-common"; + +// inject gateway, get connectors +export type SATPLedgerConnector = string; + +// TODO Define lock interfaces and strategy pattern for locking (as function of locking blockchain) (see what smart contract implementations return) + +export interface FabricConfig { + signingCredential: FabricSigningCredential; + channelName: string; + contractName: string; + options: IPluginLedgerConnectorFabricOptions; + bungeeOptions: IPluginBungeeHermesOptions; + logLevel?: LogLevelDesc; +} +export interface BesuConfig { + keychainId: string; + signingCredential: Web3SigningCredential; + contractName: string; + contractAddress: string; + gas: number; + options: IPluginLedgerConnectorBesuOptions; + bungeeOptions: IPluginBungeeHermesOptions; + logLevel?: LogLevelDesc; +} + +export interface TransactionResponse { + transactionId?: string; + transactionReceipt?: string; + output?: unknown; +} diff --git a/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-session.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-session.ts new file mode 100644 index 0000000000..acedba3053 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/types/satp-session.ts @@ -0,0 +1,31 @@ +import { v4 as uuidv4 } from "uuid"; +import { SessionData } from "../generated/proto/cacti/satp/v02/common/session_pb"; + +export interface ISATPSessionOptions { + contextID: string; +} + +export class SATPSession { + private static readonly CLASS_NAME = "SATPSession"; + private sessionData: SessionData; + + constructor(ops: ISATPSessionOptions) { + this.sessionData = new SessionData(); + this.sessionData.transferContextId = ops.contextID; + + // TODO algorithm to create session ID from context ID + this.sessionData.id = ops.contextID + "-" + uuidv4(); + } + + private initializeSessionID(): void { + if (this.sessionData.id === undefined) { + this.sessionData.id = uuidv4() + "-" + this.sessionData.transferContextId; + } else { + throw new Error("Session ID already initialized"); + } + } + + public getSessionData(): SessionData { + return this.sessionData; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/ITraceableContract.sol b/packages/cactus-plugin-satp-hermes/src/solidity/ITraceableContract.sol new file mode 100644 index 0000000000..1e10d5f55d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/ITraceableContract.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: UNKNOWN +pragma solidity >=0.7.0; + +interface ITraceableContract { + //All transactions that change the state of and asset, should emmit this event + event Changed(string indexed id, bytes[] value); + + //Should return a list of asset IDs to be tracked by Bungee + function getAllAssetsIDs() external view returns (string[] memory); +} diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper-without-json.sol b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper-without-json.sol new file mode 100644 index 0000000000..00b5024ca6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper-without-json.sol @@ -0,0 +1,184 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "./ITraceableContract.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; + +enum TokenType { ERC20, ERC721, ERC1155 } + +struct Token { + address contractAddress; + string tokenType; + string tokenId; + address owner; + uint amount; //ammount that is approved by the contract owner +} + +error TokenNotAvailable(string tokenId); + +error TokenAlreadyWrapped(string tokenId); + +error TokenNotLocked(string tokenId); + +error TokenLocked(string tokenId); + +error TokenNotUnlocked(string tokenId); + +error InsuficientAmountLocked(string tokenId, uint256 amount); + +contract SATPWrapperContract is Ownable, ITraceableContract{ + + bytes32 public BRIDGE_ROLE; + + mapping (string => Token) public tokens; //contract address to Token + + string[] ids; + + address public bridge_address; + + event Wrap(address contractAddress, string tokenType, string tokenId, address owner); + event Unwrap(string tokenId); + event Lock(string tokenId, uint256 amount); + event Unlock(string tokenId, uint256 amount); + event Mint(string tokenId, uint256 amount); + event Burn(string tokenId, uint256 amount); + event Assign(string tokenId, address receiver_account, uint256 amount); + + constructor(address _bridge_address, bytes32 role_given) Ownable(_bridge_address) { + bridge_address = address(_bridge_address); + BRIDGE_ROLE = role_given; + } + + function wrap(address contractAddress, string memory tokenType, string memory tokenId, address owner) external onlyOwner returns (bool wrapSuccess) { + if(tokens[tokenId].contractAddress != address(0)) { + revert TokenAlreadyWrapped(tokenId); + } + + (bool hasRoleSuccess, ) = contractAddress.call(abi.encodeWithSignature("hasPermission(bytes32,address)", BRIDGE_ROLE, address(this))); + + if(!hasRoleSuccess) { + revert OwnableUnauthorizedAccount(tokens[tokenId].contractAddress); + } + + tokens[tokenId] = Token(contractAddress, tokenType, tokenId, owner, 0); + + ids.push(tokenId); + + emit Wrap(contractAddress, tokenType, tokenId, owner); + return true; + } + + function unwrap(string memory tokenId) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)) { + revert TokenNotAvailable(tokenId); + } + if(tokens[tokenId].amount > 0) { + revert TokenLocked(tokenId); + } + deleteFromArray(tokens[tokenId].tokenId); + delete tokens[tokenId]; + + emit Unwrap(tokenId); + return true; + } + + function lock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + (bool lockSuccess,) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("transfer(address,address,uint256)", tokens[tokenId].owner, address(this), amount)); + + if(lockSuccess) { + tokens[tokenId].amount += amount; + emit Lock(tokenId, amount); + return true; + } + + revert TokenNotLocked(tokenId); + } + + function unlock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { //ammount + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + if(tokens[tokenId].amount < amount) { + revert InsuficientAmountLocked(tokenId, amount); + } + + (bool successAprov,) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("approve(address,uint256)", address(this), amount)); + if(!successAprov) { + revert TokenNotUnlocked(tokenId); + } + + (bool unlockSuccess,) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("transfer(address,address,uint256)", address(this), tokens[tokenId].owner, tokens[tokenId].amount)); + if(unlockSuccess) { + tokens[tokenId].amount -= amount; + emit Unlock(tokenId, amount); + return true; + } + + revert TokenNotUnlocked(tokenId); + } + + function mint(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + (bool mintSuccess, ) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("mint(address,uint256)", address(this), amount)); + + require(mintSuccess, "mint asset call failed"); + + tokens[tokenId].amount = amount; + emit Mint(tokenId, amount); + return true; + } + + function burn(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "burn asset asset is not locked"); + + (bool burnSuccess, ) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("burn(address,uint256)", address(this), amount)); + + require(burnSuccess, "burn asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Burn(tokenId, amount); + return true; + } + + function assign(string memory tokenId, address receiver_account, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "assign asset asset is not locked"); + + (bool assignSuccess, ) = tokens[tokenId].contractAddress.call(abi.encodeWithSignature("assign(address,address,uint256)", address(this), receiver_account, amount)); + require(assignSuccess, "assign asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Assign(tokenId, receiver_account, amount); + return true; + } + + + function getAllAssetsIDs() external view returns (string[] memory) { + return ids; + } + + function deleteFromArray(string memory id) internal { + for (uint256 i = 0; i < ids.length; i++) { + if (Strings.equal(ids[i], id)) { + ids[i] = ids[ids.length - 1]; + ids.pop(); + break; + } + } + } + + function getToken(string memory tokenId) view public returns (Token memory token) { + return tokens[tokenId]; + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol new file mode 100644 index 0000000000..83c8ce1855 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/solidity/satp-wrapper.sol @@ -0,0 +1,251 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "./ITraceableContract.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; + +enum TokenType { ERC20, ERC721, ERC1155, OTHER } +enum InteractionType { MINT, BURN, ASSIGN, CHECKPERMITION, LOCK, UNLOCK } +enum VarType {CONTRACTADDRESS, TOKENTYPE, TOKENID, OWNER, AMOUNT, BRIDGE, RECEIVER} + +struct Token { + address contractAddress; + TokenType tokenType; + string tokenId; + address owner; + uint amount; //ammount that is approved by the contract owner +} + + +struct InteractionSignature { + InteractionType interactionType; + string[] functionsSignature; + VarType[][] variables; + bool available; +} + +error TokenNotAvailable(string tokenId); + +error TokenAlreadyWrapped(string tokenId); + +error TokenNotLocked(string tokenId); + +error TokenLocked(string tokenId); + +error TokenNotUnlocked(string tokenId); + +error InsuficientAmountLocked(string tokenId, uint256 amount); + +contract SATPWrapperContract is Ownable, ITraceableContract{ + + mapping (string => Token) public tokens; //contract address to Token + + mapping (string => mapping(InteractionType => InteractionSignature)) public tokensInteractions; + + string[] ids; + + address public bridge_address; + + event Wrap(address contractAddress, TokenType tokenType, string tokenId, address owner); + event Unwrap(string tokenId); + event Lock(string tokenId, uint256 amount); + event Unlock(string tokenId, uint256 amount); + event Mint(string tokenId, uint256 amount); + event Burn(string tokenId, uint256 amount); + event Assign(string tokenId, address receiver_account, uint256 amount); + + constructor(address _bridge_address) Ownable(_bridge_address) { + bridge_address = address(_bridge_address); + } + + function wrap(address contractAddress, TokenType tokenType, string memory tokenId, address owner, InteractionSignature[] memory interactions ) external onlyOwner returns (bool wrapSuccess) { + if(tokens[tokenId].contractAddress != address(0)) { + revert TokenAlreadyWrapped(tokenId); + } + + createNonStandardTokenOntology(tokenId, interactions); + + if(tokensInteractions[tokenId][InteractionType.CHECKPERMITION].available) { + require(interact(tokenId, InteractionType.CHECKPERMITION), "Contract does not have permission to interact with the token"); + } + + tokens[tokenId] = Token(contractAddress, tokenType, tokenId, owner, 0); + + ids.push(tokenId); + + emit Wrap(contractAddress, tokenType, tokenId, owner); + return true; + } + + function wrap(address contractAddress, TokenType tokenType, string memory tokenId, address owner) external onlyOwner returns (bool wrapSuccess) { + return this.wrap(contractAddress, tokenType, tokenId, owner, new InteractionSignature[](0)); + } + + function unwrap(string memory tokenId) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)) { + revert TokenNotAvailable(tokenId); + } + if(tokens[tokenId].amount > 0) { + revert TokenLocked(tokenId); + } + deleteFromArray(tokens[tokenId].tokenId); + delete tokens[tokenId]; + + emit Unwrap(tokenId); + return true; + } + + function lock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + bool lockSuccess = interact(tokenId, InteractionType.LOCK, amount); + + if(lockSuccess) { + tokens[tokenId].amount += amount; + emit Lock(tokenId, amount); + return true; + } + + revert TokenNotLocked(tokenId); + } + + function unlock(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { //ammount + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + if(tokens[tokenId].amount < amount) { + revert InsuficientAmountLocked(tokenId, amount); + } + + bool unlockSuccess = interact(tokenId, InteractionType.UNLOCK, amount); + + if(unlockSuccess) { + tokens[tokenId].amount -= amount; + emit Unlock(tokenId, amount); + return true; + } + + revert TokenNotUnlocked(tokenId); + } + + function mint(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + if(tokens[tokenId].contractAddress == address(0)){ + revert TokenNotAvailable(tokenId); + } + + require(interact(tokenId, InteractionType.MINT, amount) , "mint asset call failed"); + + tokens[tokenId].amount = amount; + emit Mint(tokenId, amount); + return true; + } + + function burn(string memory tokenId, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "burn asset asset is not locked"); + + require(interact(tokenId, InteractionType.BURN, amount), "burn asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Burn(tokenId, amount); + return true; + } + + function assign(string memory tokenId, address receiver_account, uint256 amount) external onlyOwner returns (bool success) { + require(tokens[tokenId].amount >= amount, "assign asset asset is not locked"); + + require(interact(tokenId, InteractionType.ASSIGN, amount, receiver_account), "assign asset call failed"); + + tokens[tokenId].amount -= amount; + + emit Assign(tokenId, receiver_account, amount); + return true; + } + + + function getAllAssetsIDs() external view returns (string[] memory) { + return ids; + } + + function deleteFromArray(string memory id) internal { + for (uint256 i = 0; i < ids.length; i++) { + if (Strings.equal(ids[i], id)) { + ids[i] = ids[ids.length - 1]; + ids.pop(); + break; + } + } + } + + function getToken(string memory tokenId) view public returns (Token memory token) { + return tokens[tokenId]; + } + + function createNonStandardTokenOntology(string memory tokenId, InteractionSignature[] memory interactions) internal { + for(uint i = 0; i < interactions.length; i++) { + tokensInteractions[tokenId][interactions[i].interactionType] = interactions[i]; + } + } + + function interact(string memory tokenId, InteractionType interactionType) internal returns (bool success) { + return interact(tokenId, interactionType, 0, address(0)); + } + + function interact(string memory tokenId, InteractionType interactionType, uint256 amount) internal returns (bool success) { + return interact(tokenId, interactionType, amount, address(0)); + } + + function interact(string memory tokenId, InteractionType interactionType, uint256 amount, address receiver) internal returns (bool) { + if (!tokensInteractions[tokenId][interactionType].available) { + return false; + } + + for (uint i = 0; i < tokensInteractions[tokenId][interactionType].functionsSignature.length; i++) { + bytes4 functionSelector = bytes4(keccak256(abi.encodePacked(tokensInteractions[tokenId][interactionType].functionsSignature[i]))); + + bytes memory encodedParams = encodeDynamicParams(functionSelector, encodeParams(tokensInteractions[tokenId][interactionType].variables[i], tokenId, receiver, amount)); + + (bool callSuccess, ) = tokens[tokenId].contractAddress.call(encodedParams); + if (!callSuccess) { + return false; + } + } + + return true; + } + + function encodeDynamicParams(bytes4 functionSelector, bytes[] memory dynamicParams) internal pure returns (bytes memory encodedParams) { + encodedParams = abi.encodePacked(functionSelector); + for (uint256 i = 0; i < dynamicParams.length; i++) { + encodedParams = abi.encodePacked(encodedParams, dynamicParams[i]); + } + return encodedParams; + } + + function encodeParams(VarType[] memory variables, string memory tokenId, address receiver, uint256 amount) internal view returns (bytes[] memory){ + bytes[] memory dynamicParams = new bytes[](variables.length); + for (uint i = 0; i < variables.length; i++) { + if (variables[i] == VarType.BRIDGE) { + dynamicParams[i] = abi.encode(address(this)); + } else if (variables[i] == VarType.TOKENID) { + dynamicParams[i] = abi.encode(tokenId); + } else if (variables[i] == VarType.AMOUNT) { + dynamicParams[i] = abi.encode(amount); + } else if (variables[i] == VarType.OWNER) { + dynamicParams[i] = abi.encode(tokens[tokenId].owner); + } else if (variables[i] == VarType.CONTRACTADDRESS) { + dynamicParams[i] = abi.encode(tokens[tokenId].contractAddress); + } else if (variables[i] == VarType.RECEIVER) { + dynamicParams[i] = abi.encode(receiver); + } else { + revert("Variable not supported"); + } + } + return dynamicParams; + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/ITraceableContract.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/ITraceableContract.sol new file mode 100644 index 0000000000..1e10d5f55d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/ITraceableContract.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: UNKNOWN +pragma solidity >=0.7.0; + +interface ITraceableContract { + //All transactions that change the state of and asset, should emmit this event + event Changed(string indexed id, bytes[] value); + + //Should return a list of asset IDs to be tracked by Bungee + function getAllAssetsIDs() external view returns (string[] memory); +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-contract-interface.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-contract-interface.sol new file mode 100644 index 0000000000..1432b1559d --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-contract-interface.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: UNKNOWN + +pragma solidity >=0.7.0; + +/* + * Smart Contract Interface to define the methods needed by SATP Wrapper Contract. + */ + +interface SATPContractInterface { + // mint creates new tokens with the given amount and assigns them to the owner. + function mint(address account, uint256 amount) external returns (bool); + // burn destroys the given amount of tokens from the owner. + function burn(address account, uint256 amount) external returns (bool); + // assign assigns the given amount of tokens from the owner to the target, without approval. + function assign(address from, address recipient, uint256 amount) external returns (bool); + // transfer transfers the given amount of tokens from the sender to the target, with approval needed. + function transfer(address from, address recipient, uint256 amount) external returns (bool); + // checks if the given account has the given role. + function hasPermission(address account) external view returns (bool); +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-erc20.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-erc20.sol new file mode 100644 index 0000000000..51c09dbb0e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/satp-erc20.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/AccessControl.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import "./ITraceableContract.sol"; + +import "./satp-contract-interface.sol"; + +error noPermission(address adr); + +contract SATPContract is AccessControl, ERC20, ITraceableContract, SATPContractInterface { + + bytes32 public constant BRIDGE_ROLE = keccak256("BRIDGE_ROLE"); + bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE"); + + string public id; + + constructor(address _owner, string memory _id) ERC20("SATPToken", "SATP") { + _grantRole(OWNER_ROLE, _owner); + _grantRole(BRIDGE_ROLE, _owner); + + id = _id; + } + + function mint(address account, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + _mint(account, amount); + return true; + } + + function burn(address account, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + _burn(account, amount); + return true; + } + + function assign(address from, address recipient, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + require(from == _msgSender(), "The msgSender is not the owner"); + _transfer(from, recipient, amount); + return true; + } + + function transfer(address from, address recipient, uint256 amount) external onlyRole(BRIDGE_ROLE) returns (bool success) { + transferFrom(from, recipient, amount); + return true; + } + + function getAllAssetsIDs() external view returns (string[] memory) { + string[] memory myArray = new string[](1); + myArray[0] = id; + return myArray; + } + + function getId() view public returns (string memory) { + return id; + } + + function giveRole(address account) external onlyRole(OWNER_ROLE) returns (bool success) { + _grantRole(BRIDGE_ROLE, account); + return true; + } + + function hasPermission(address account) external view returns (bool success) { + if(hasRole(BRIDGE_ROLE, account)){ + return true; + } + revert noPermission(account); + } + + function checkBalance(address account) external view returns (uint256) { + return balanceOf(account); + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol new file mode 100644 index 0000000000..cd46b6ee79 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity ^0.8.15; + +import "./../contracts/satp-erc20.sol"; +import "remix_tests.sol"; +import "remix_accounts.sol"; + +import "remix_accounts.sol"; + +contract SATPContractTest { + + SATPContract satpContract; + + function beforeEach () public { + satpContract = new SATPContract(address(this), "ID1"); + } + + function testTokenNameAndSymbol () public { + Assert.equal(satpContract.name(), "SATPToken", "token name did not match"); + Assert.equal(satpContract.symbol(), "SATP", "token symbol did not match"); + } + + function mintTokens () public { + satpContract.mint(address(this), 99); + uint256 balance = satpContract.balanceOf(address(this)); + Assert.equal(balance, 99, "tokens minted did not match"); + } + + function mintToOtherAccoutTokens () public { + satpContract.mint(TestsAccounts.getAccount(1), 99); + uint256 balance = satpContract.balanceOf(TestsAccounts.getAccount(1)); + Assert.equal(balance, 99, "tokens minted did not match"); + } + + function burnTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + satpContract.mint(address(this), 99); + satpContract.burn(address(this), 99); + uint256 balance = satpContract.balanceOf(address(this)); + Assert.equal(balance, initBalance, "tokens burned did not match"); + } + + function assignTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + + satpContract.mint(address(this), 99); + + satpContract.assign(address(this), TestsAccounts.getAccount(1), 99); + + Assert.equal(satpContract.balanceOf(TestsAccounts.getAccount(1)), 99, "tokens not assigned"); + Assert.equal(satpContract.balanceOf(address(this)), initBalance, "balance of account did not change"); + } + + function transferTokens () public { + uint256 initBalance = satpContract.balanceOf(address(this)); + satpContract.mint(address(this), 99); + satpContract.approve(address(this), 99); + satpContract.transfer(address(this), TestsAccounts.getAccount(1), 99); + Assert.equal(satpContract.balanceOf(TestsAccounts.getAccount(1)), 99, "tokens not transferred"); + Assert.equal(satpContract.balanceOf(address(this)), initBalance, "balance of account did not change"); + } +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol new file mode 100644 index 0000000000..2ba3e52521 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.4.22 <0.9.0; + +// This import is automatically injected by Remix +import "remix_tests.sol"; + +// This import is required to use custom transaction context +// Although it may fail compilation in 'Solidity Compiler' plugin +// But it will work fine in 'Solidity Unit Testing' plugin +import "remix_accounts.sol"; +import "../contracts/satp-wrapper.sol"; +import "./../contracts/satp-erc20.sol"; + +contract SATPWrapTest { + + SATPContract contract1; + SATPContract contract2; + + InteractionSignature[] signatures; + + SATPWrapperContract wrapperContract; + + string[] lockInteractions; + Types[][] lockVariables; + string[] unlockInteractions; + Types[][] unlockVariables; + string[] minInteractions; + Types[][] mintVariables; + string[] burnInteractions; + Types[][] burnVariables; + string[] assignInteractions; + Types[][] assignVariables; + string[] checkPermissionInteractions; + Types[][] checkPermissionVariables; + + function beforeEach() public { + // Remix does not offer a set of methods that can change the msg.sender so every contract owner is the same + + wrapperContract = new SATPWrapperContract(address(this)); + + contract1 = new SATPContract(address(wrapperContract), "ID1"); + contract2 = new SATPContract(address(this), "ID2"); + + lockInteractions.push("transfer(address,address,uint256)"); + + lockVariables.push([Types.OWNER, Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory lock = InteractionSignature(InteractionType.LOCK,lockInteractions,lockVariables, true); + signatures.push(lock); + + unlockInteractions.push("approve(address,uint256)"); + unlockInteractions.push("transfer(address,address,uint256)"); + + unlockVariables.push([Types.BRIDGE, Types.AMOUNT]); + unlockVariables.push([Types.BRIDGE, Types.OWNER, Types.AMOUNT]); + InteractionSignature memory unlock = InteractionSignature(InteractionType.UNLOCK,lockInteractions,lockVariables, true); + signatures.push(unlock); + + + minInteractions.push("mint(address,uint256)"); + + mintVariables.push([Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory mint = InteractionSignature(InteractionType.MINT,lockInteractions,lockVariables, true); + signatures.push(mint); + + + burnInteractions.push("burn(address,uint256)"); + + burnVariables.push([Types.BRIDGE, Types.AMOUNT]); + InteractionSignature memory burn = InteractionSignature(InteractionType.BURN,lockInteractions,lockVariables, true); + signatures.push(burn); + + + assignInteractions.push("assign(address,address,uint256)"); + + assignVariables.push([Types.BRIDGE, Types.RECEIVER, Types.AMOUNT]); + InteractionSignature memory assign = InteractionSignature(InteractionType.ASSIGN,lockInteractions,lockVariables, true); + signatures.push(assign); + + checkPermissionInteractions.push("hasPermission(address)"); + + checkPermissionVariables.push([Types.BRIDGE]); + InteractionSignature memory checkPermition = InteractionSignature(InteractionType.CHECKPERMITION,lockInteractions,lockVariables, true); + signatures.push(checkPermition); + } + + function checkWrap() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + Token memory tokenReceived = wrapperContract.getToken(contract1.getId()); + + Assert.equal(tokenReceived.contractAddress, address(contract1), "Tokens don't match"); + + Assert.equal(wrapperContract.getAllAssetsIDs()[0], contract1.getId(), "Ids don't match"); + } + + function checkWrapTokenAlreadyWrapped() public { + + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + try wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + + function checkUnwrap() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + wrapperContract.unwrap(contract1.getId()); + + Token memory tokenReceived = wrapperContract.getToken(contract1.getId()); + + Assert.notEqual(tokenReceived.contractAddress, address(contract1), "Tokens don't match"); + } + + function checkUnwrapATokenNotWrapped() public { + try wrapperContract.unwrap(contract1.getId()) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + + function checkUnwrapATokenWithValueLocked() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + wrapperContract.mint(contract1.getId(), 10); + + try wrapperContract.unwrap(contract1.getId()) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } + function checkMint() public { + wrapperContract.wrap(address(contract1), TokenType.OTHER, contract1.getId(), address(this), signatures); + + + wrapperContract.mint(contract1.getId(), 10); + + Assert.equal(contract1.balanceOf(address(wrapperContract)), 10, "Token not minted"); + } + + function checkMintATokenNotWrapped() public { + try wrapperContract.mint(contract1.getId(), 10) returns (bool s) { + require(!s, "Expected an error"); + } + catch Error(string memory) { + } + catch (bytes memory /*lowLevelData*/) { + } + } +} + \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json deleted file mode 100644 index fda660818a..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json +++ /dev/null @@ -1,2504 +0,0 @@ -{ - "contractName": "LockAsset", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "name": "createAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "deleteAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "getAsset", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "creator", - "type": "address" - }, - { - "internalType": "bool", - "name": "isLock", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "size", - "type": "uint256" - } - ], - "internalType": "struct Asset", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isAssetLocked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "isPresent", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "lockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "id", - "type": "string" - } - ], - "name": "unLockAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"createAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"deleteAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"getAsset\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isLock\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"internalType\":\"struct Asset\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isAssetLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"isPresent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"lockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"id\",\"type\":\"string\"}],\"name\":\"unLockAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":\"LockAsset\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":{\"keccak256\":\"0xde0438e010cd77bfc1516697230fbcec20e85bd7fdbc8df9225abb5c9dd6c7ed\",\"urls\":[\"bzz-raw://865f301eada0615be375c9313d3abce9458dcbb5311dedf805cad921accda557\",\"dweb:/ipfs/QmY1r6Z7PM8ypYy59rWqozy3Mkcv9nMd4xRcfpCbwN4LQK\"]}},\"version\":1}", - "bytecode": "608060405234801561001057600080fd5b506105f9806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063cd5286d01161005b578063cd5286d0146100d2578063db9cc41014610112578063def60e0d14610125578063e24aa37c1461013857600080fd5b80631ae4eb68146100825780635e82d0a6146100aa578063bc548275146100bf575b600080fd5b610095610090366004610525565b61014b565b60405190151581526020015b60405180910390f35b6100bd6100b8366004610525565b6101b5565b005b6100956100cd366004610525565b61022a565b6100e56100e0366004610525565b610259565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100a1565b6100bd610120366004610567565b6102d1565b6100bd610133366004610525565b6103bc565b6100bd610146366004610525565b610402565b600080600184846040516101609291906105b3565b9081526040519081900360200190205460ff1690508061017f57600080fd5b600084846040516101919291906105b3565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b6000600183836040516101c99291906105b3565b9081526040519081900360200190205460ff169050806101e857600080fd5b6001600084846040516101fc9291906105b3565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60006001838360405161023e9291906105b3565b9081526040519081900360200190205460ff16905092915050565b6040805160608101825260008082526020820181905291810191909152600083836040516102889291906105b3565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116102de57600080fd5b80600084846040516102f19291906105b3565b90815260200160405180910390206001018190555033600084846040516103199291906105b3565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b031990931692909217909155600090819061035b90869086906105b3565b9081526040519081900360200181208054921515600160a01b0260ff60a01b1990931692909217909155600190819061039790869086906105b3565b908152604051908190036020019020805491151560ff19909216919091179055505050565b6000600183836040516103d09291906105b3565b9081526040519081900360200190205460ff169050806103ef57600080fd5b60008084846040516101fc9291906105b3565b6000600183836040516104169291906105b3565b9081526040519081900360200190205460ff1690508061043557600080fd5b60008084846040516104489291906105b3565b9081526040519081900360200190205460ff600160a01b9091041690508061046f57600080fd5b600084846040516104819291906105b3565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916104b690879087906105b3565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b60008083601f8401126104ee57600080fd5b50813567ffffffffffffffff81111561050657600080fd5b60208301915083602082850101111561051e57600080fd5b9250929050565b6000806020838503121561053857600080fd5b823567ffffffffffffffff81111561054f57600080fd5b61055b858286016104dc565b90969095509350505050565b60008060006040848603121561057c57600080fd5b833567ffffffffffffffff81111561059357600080fd5b61059f868287016104dc565b909790965060209590950135949350505050565b818382376000910190815291905056fea2646970667358221220256d00c6b6e97111d048c9a6a3069f078880240932a634dae7aec643dc6ade7664736f6c634300080f0033", - "deployedBytecode": "608060405234801561001057600080fd5b506004361061007d5760003560e01c8063cd5286d01161005b578063cd5286d0146100d2578063db9cc41014610112578063def60e0d14610125578063e24aa37c1461013857600080fd5b80631ae4eb68146100825780635e82d0a6146100aa578063bc548275146100bf575b600080fd5b610095610090366004610525565b61014b565b60405190151581526020015b60405180910390f35b6100bd6100b8366004610525565b6101b5565b005b6100956100cd366004610525565b61022a565b6100e56100e0366004610525565b610259565b6040805182516001600160a01b0316815260208084015115159082015291810151908201526060016100a1565b6100bd610120366004610567565b6102d1565b6100bd610133366004610525565b6103bc565b6100bd610146366004610525565b610402565b600080600184846040516101609291906105b3565b9081526040519081900360200190205460ff1690508061017f57600080fd5b600084846040516101919291906105b3565b9081526040519081900360200190205460ff600160a01b9091041691505092915050565b6000600183836040516101c99291906105b3565b9081526040519081900360200190205460ff169050806101e857600080fd5b6001600084846040516101fc9291906105b3565b9081526040519081900360200190208054911515600160a01b0260ff60a01b19909216919091179055505050565b60006001838360405161023e9291906105b3565b9081526040519081900360200190205460ff16905092915050565b6040805160608101825260008082526020820181905291810191909152600083836040516102889291906105b3565b908152604080516020928190038301812060608201835280546001600160a01b0381168352600160a01b900460ff16151593820193909352600190920154908201529392505050565b600081116102de57600080fd5b80600084846040516102f19291906105b3565b90815260200160405180910390206001018190555033600084846040516103199291906105b3565b90815260405190819003602001812080546001600160a01b03939093166001600160a01b031990931692909217909155600090819061035b90869086906105b3565b9081526040519081900360200181208054921515600160a01b0260ff60a01b1990931692909217909155600190819061039790869086906105b3565b908152604051908190036020019020805491151560ff19909216919091179055505050565b6000600183836040516103d09291906105b3565b9081526040519081900360200190205460ff169050806103ef57600080fd5b60008084846040516101fc9291906105b3565b6000600183836040516104169291906105b3565b9081526040519081900360200190205460ff1690508061043557600080fd5b60008084846040516104489291906105b3565b9081526040519081900360200190205460ff600160a01b9091041690508061046f57600080fd5b600084846040516104819291906105b3565b90815260405190819003602001812080546001600160a81b031916815560006001918201819055916104b690879087906105b3565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b60008083601f8401126104ee57600080fd5b50813567ffffffffffffffff81111561050657600080fd5b60208301915083602082850101111561051e57600080fd5b9250929050565b6000806020838503121561053857600080fd5b823567ffffffffffffffff81111561054f57600080fd5b61055b858286016104dc565b90969095509350505050565b60008060006040848603121561057c57600080fd5b833567ffffffffffffffff81111561059357600080fd5b61059f868287016104dc565b909790965060209590950135949350505050565b818382376000910190815291905056fea2646970667358221220256d00c6b6e97111d048c9a6a3069f078880240932a634dae7aec643dc6ade7664736f6c634300080f0033", - "sourceMap": "543:1460:0:-:0;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "543:1460:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1770:231;;;;;;:::i;:::-;;:::i;:::-;;;948:14:1;;941:22;923:41;;911:2;896:18;1770:231:0;;;;;;;;1011:144;;;;;;:::i;:::-;;:::i;:::-;;1665:101;;;;;;:::i;:::-;;:::i;865:103::-;;;;;;:::i;:::-;;:::i;:::-;;;;1183:13:1;;-1:-1:-1;;;;;1179:39:1;1161:58;;1289:4;1277:17;;;1271:24;1264:32;1257:40;1235:20;;;1228:70;1342:17;;;1336:24;1314:20;;;1307:54;1149:2;1134:18;865:103:0;975:392:1;643:218:0;;;;;;:::i;:::-;;:::i;1200:147::-;;;;;;:::i;:::-;;:::i;1351:310::-;;;;;;:::i;:::-;;:::i;1770:231::-;1834:4;1848:11;1862;1874:2;;1862:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1862:15:0;1885;;;;;;1979:6;1986:2;;1979:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1979:17:0;;;;;-1:-1:-1;;1770:231:0;;;;:::o;1011:144::-;1065:11;1079;1091:2;;1079:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1079:15:0;1102;;;;;;1146:4;1126:6;1133:2;;1126:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:24;;;;;-1:-1:-1;;;1126:24:0;-1:-1:-1;;;;1126:24:0;;;;;;;;;-1:-1:-1;;;1011:144:0:o;1665:101::-;1725:4;1746:11;1758:2;;1746:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1665:101:0;;;;:::o;865:103::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;953:6:0;960:2;;953:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;946:17;;;;;;;-1:-1:-1;;;;;946:17:0;;;;-1:-1:-1;;;946:17:0;;;;;;;;;;;;;;;;;;;;;;953:10;865:103;-1:-1:-1;;;865:103:0:o;643:218::-;723:1;718:4;:6;710:15;;;;;;750:4;733:6;740:2;;733:10;;;;;;;:::i;:::-;;;;;;;;;;;;;:15;;:21;;;;783:10;762:6;769:2;;762:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:31;;-1:-1:-1;;;;;762:31:0;;;;-1:-1:-1;;;;;;762:31:0;;;;;;;;;;:18;;;;801:10;;808:2;;;;801:10;:::i;:::-;;;;;;;;;;;;;;:25;;;;;-1:-1:-1;;;801:25:0;-1:-1:-1;;;;801:25:0;;;;;;;;;;-1:-1:-1;;;;834:15:0;;846:2;;;;834:15;:::i;:::-;;;;;;;;;;;;;;:22;;;;;-1:-1:-1;;834:22:0;;;;;;;;;-1:-1:-1;;;643:218:0:o;1200:147::-;1256:11;1270;1282:2;;1270:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1270:15:0;1293;;;;;;1337:5;1317:6;1324:2;;1317:10;;;;;;;:::i;1351:310::-;1407:11;1421;1433:2;;1421:15;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;-1:-1:-1;1421:15:0;1444;;;;;;1531:18;1552:6;1559:2;;1552:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;:17;;-1:-1:-1;;;1552:17:0;;;;;-1:-1:-1;1552:17:0;1577:22;;;;;;1615:6;1622:2;;1615:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;1608:17;;-1:-1:-1;;;;;;1608:17:0;;;1615:10;1608:17;;;;;;;1615:10;1633:15;;1645:2;;;;1633:15;:::i;:::-;;;;;;;;;;;;;;:23;;;;;-1:-1:-1;;1633:23:0;;;;;;;;;-1:-1:-1;;;;1351:310:0:o;14:348:1:-;66:8;76:6;130:3;123:4;115:6;111:17;107:27;97:55;;148:1;145;138:12;97:55;-1:-1:-1;171:20:1;;214:18;203:30;;200:50;;;246:1;243;236:12;200:50;283:4;275:6;271:17;259:29;;335:3;328:4;319:6;311;307:19;303:30;300:39;297:59;;;352:1;349;342:12;297:59;14:348;;;;;:::o;367:411::-;438:6;446;499:2;487:9;478:7;474:23;470:32;467:52;;;515:1;512;505:12;467:52;555:9;542:23;588:18;580:6;577:30;574:50;;;620:1;617;610:12;574:50;659:59;710:7;701:6;690:9;686:22;659:59;:::i;:::-;737:8;;633:85;;-1:-1:-1;367:411:1;-1:-1:-1;;;;367:411:1:o;1372:479::-;1452:6;1460;1468;1521:2;1509:9;1500:7;1496:23;1492:32;1489:52;;;1537:1;1534;1527:12;1489:52;1577:9;1564:23;1610:18;1602:6;1599:30;1596:50;;;1642:1;1639;1632:12;1596:50;1681:59;1732:7;1723:6;1712:9;1708:22;1681:59;:::i;:::-;1759:8;;1655:85;;-1:-1:-1;1841:2:1;1826:18;;;;1813:32;;1372:479;-1:-1:-1;;;;1372:479:1:o;1856:273::-;2041:6;2033;2028:3;2015:33;1997:3;2067:16;;2092:13;;;2067:16;1856:273;-1:-1:-1;1856:273:1:o", - "sourcePath": "/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", - "compiler": { - "name": "solc", - "version": "0.8.15+commit.e14f2714" - }, - "ast": { - "absolutePath": "/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", - "exportedSymbols": { - "Asset": [ - 8 - ], - "LockAsset": [ - 192 - ] - }, - "id": 193, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - ">=", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "413:24:0" - }, - { - "canonicalName": "Asset", - "id": 8, - "members": [ - { - "constant": false, - "id": 3, - "mutability": "mutable", - "name": "creator", - "nameLocation": "464:7:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "456:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "456:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 5, - "mutability": "mutable", - "name": "isLock", - "nameLocation": "482:6:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "477:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 4, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "size", - "nameLocation": "499:4:0", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "494:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "494:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "name": "Asset", - "nameLocation": "445:5:0", - "nodeType": "StructDefinition", - "scope": 193, - "src": "438:68:0", - "visibility": "public" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "LockAsset", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 192, - "linearizedBaseContracts": [ - 192 - ], - "name": "LockAsset", - "nameLocation": "552:9:0", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 13, - "mutability": "mutable", - "name": "assets", - "nameLocation": "592:6:0", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "566:32:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "typeName": { - "id": 12, - "keyType": { - "id": 9, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "575:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "566:25:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string => struct Asset)" - }, - "valueType": { - "id": 11, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 10, - "name": "Asset", - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "585:5:0" - }, - "referencedDeclaration": 8, - "src": "585:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 17, - "mutability": "mutable", - "name": "assetExists", - "nameLocation": "627:11:0", - "nodeType": "VariableDeclaration", - "scope": 192, - "src": "602:36:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "typeName": { - "id": 16, - "keyType": { - "id": 14, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "611:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "nodeType": "Mapping", - "src": "602:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string => bool)" - }, - "valueType": { - "id": 15, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "621:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "visibility": "internal" - }, - { - "body": { - "id": 58, - "nodeType": "Block", - "src": "702:159:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 25, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "718:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 26, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "723:1:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "718:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 24, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "710:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "710:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 29, - "nodeType": "ExpressionStatement", - "src": "710:15:0" - }, - { - "expression": { - "id": 35, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 30, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "733:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 32, - "indexExpression": { - "id": 31, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "740:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "733:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 33, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "size", - "nodeType": "MemberAccess", - "referencedDeclaration": 7, - "src": "733:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 34, - "name": "size", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 21, - "src": "750:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "733:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 36, - "nodeType": "ExpressionStatement", - "src": "733:21:0" - }, - { - "expression": { - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 37, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "762:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 39, - "indexExpression": { - "id": 38, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "769:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "762:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 40, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "creator", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "762:18:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 41, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4294967281, - "src": "783:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 42, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "783:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "762:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 44, - "nodeType": "ExpressionStatement", - "src": "762:31:0" - }, - { - "expression": { - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 45, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "801:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 47, - "indexExpression": { - "id": 46, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "808:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "801:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 48, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "801:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 49, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "821:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "801:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 51, - "nodeType": "ExpressionStatement", - "src": "801:25:0" - }, - { - "expression": { - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 52, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "834:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 54, - "indexExpression": { - "id": 53, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 19, - "src": "846:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "834:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "852:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "834:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 57, - "nodeType": "ExpressionStatement", - "src": "834:22:0" - } - ] - }, - "functionSelector": "db9cc410", - "id": 59, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "createAsset", - "nameLocation": "652:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 22, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 19, - "mutability": "mutable", - "name": "id", - "nameLocation": "681:2:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "665:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 18, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "665:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 21, - "mutability": "mutable", - "name": "size", - "nameLocation": "690:4:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "685:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 20, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "685:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "663:32:0" - }, - "returnParameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [], - "src": "702:0:0" - }, - "scope": 192, - "src": "643:218:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 71, - "nodeType": "Block", - "src": "938:30:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 67, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "953:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 69, - "indexExpression": { - "id": 68, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "960:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "953:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "946:17:0" - } - ] - }, - "functionSelector": "cd5286d0", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getAsset", - "nameLocation": "874:8:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 62, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 61, - "mutability": "mutable", - "name": "id", - "nameLocation": "899:2:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "883:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 60, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "883:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "882:20:0" - }, - "returnParameters": { - "id": 66, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "924:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_memory_ptr", - "typeString": "struct Asset" - }, - "typeName": { - "id": 64, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 63, - "name": "Asset", - "nodeType": "IdentifierPath", - "referencedDeclaration": 8, - "src": "924:5:0" - }, - "referencedDeclaration": 8, - "src": "924:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage_ptr", - "typeString": "struct Asset" - } - }, - "visibility": "internal" - } - ], - "src": "923:14:0" - }, - "scope": 192, - "src": "865:103:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 94, - "nodeType": "Block", - "src": "1057:98:0", - "statements": [ - { - "assignments": [ - 78 - ], - "declarations": [ - { - "constant": false, - "id": 78, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1070:6:0", - "nodeType": "VariableDeclaration", - "scope": 94, - "src": "1065:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 77, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1065:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 82, - "initialValue": { - "baseExpression": { - "id": 79, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1079:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 81, - "indexExpression": { - "id": 80, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "1091:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1079:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1065:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 84, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "1110:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 83, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1102:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 85, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1102:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 86, - "nodeType": "ExpressionStatement", - "src": "1102:15:0" - }, - { - "expression": { - "id": 92, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 87, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1126:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 89, - "indexExpression": { - "id": 88, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "1133:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1126:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 90, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1126:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "74727565", - "id": 91, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1146:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1126:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 93, - "nodeType": "ExpressionStatement", - "src": "1126:24:0" - } - ] - }, - "functionSelector": "5e82d0a6", - "id": 95, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "lockAsset", - "nameLocation": "1020:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 75, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "id", - "nameLocation": "1046:2:0", - "nodeType": "VariableDeclaration", - "scope": 95, - "src": "1030:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 73, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1030:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1029:20:0" - }, - "returnParameters": { - "id": 76, - "nodeType": "ParameterList", - "parameters": [], - "src": "1057:0:0" - }, - "scope": 192, - "src": "1011:144:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 117, - "nodeType": "Block", - "src": "1248:99:0", - "statements": [ - { - "assignments": [ - 101 - ], - "declarations": [ - { - "constant": false, - "id": 101, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1261:6:0", - "nodeType": "VariableDeclaration", - "scope": 117, - "src": "1256:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 100, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1256:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 105, - "initialValue": { - "baseExpression": { - "id": 102, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1270:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 104, - "indexExpression": { - "id": 103, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "1282:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1270:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1256:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 107, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 101, - "src": "1301:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 106, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1293:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 108, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1293:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 109, - "nodeType": "ExpressionStatement", - "src": "1293:15:0" - }, - { - "expression": { - "id": 115, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "expression": { - "baseExpression": { - "id": 110, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1317:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 112, - "indexExpression": { - "id": 111, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 97, - "src": "1324:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1317:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 113, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1317:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1337:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1317:25:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 116, - "nodeType": "ExpressionStatement", - "src": "1317:25:0" - } - ] - }, - "functionSelector": "def60e0d", - "id": 118, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "unLockAsset", - "nameLocation": "1209:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 98, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 97, - "mutability": "mutable", - "name": "id", - "nameLocation": "1237:2:0", - "nodeType": "VariableDeclaration", - "scope": 118, - "src": "1221:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 96, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1221:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1220:20:0" - }, - "returnParameters": { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "1248:0:0" - }, - "scope": 192, - "src": "1200:147:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 155, - "nodeType": "Block", - "src": "1399:262:0", - "statements": [ - { - "assignments": [ - 124 - ], - "declarations": [ - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1412:6:0", - "nodeType": "VariableDeclaration", - "scope": 155, - "src": "1407:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 123, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1407:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 128, - "initialValue": { - "baseExpression": { - "id": 125, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1421:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 127, - "indexExpression": { - "id": 126, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1433:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1421:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1407:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 130, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "1452:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 129, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1444:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1444:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 132, - "nodeType": "ExpressionStatement", - "src": "1444:15:0" - }, - { - "assignments": [ - 134 - ], - "declarations": [ - { - "constant": false, - "id": 134, - "mutability": "mutable", - "name": "assetIsLocked", - "nameLocation": "1536:13:0", - "nodeType": "VariableDeclaration", - "scope": 155, - "src": "1531:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 133, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1531:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 139, - "initialValue": { - "expression": { - "baseExpression": { - "id": 135, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1552:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 137, - "indexExpression": { - "id": 136, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1559:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1552:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 138, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1552:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1531:38:0" - }, - { - "expression": { - "arguments": [ - { - "id": 141, - "name": "assetIsLocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 134, - "src": "1585:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 140, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1577:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 142, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1577:22:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 143, - "nodeType": "ExpressionStatement", - "src": "1577:22:0" - }, - { - "expression": { - "id": 147, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "1608:17:0", - "subExpression": { - "baseExpression": { - "id": 144, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1615:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 146, - "indexExpression": { - "id": 145, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1622:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1615:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 148, - "nodeType": "ExpressionStatement", - "src": "1608:17:0" - }, - { - "expression": { - "id": 153, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 149, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1633:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 151, - "indexExpression": { - "id": 150, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "1645:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1633:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "hexValue": "66616c7365", - "id": 152, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1651:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "1633:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 154, - "nodeType": "ExpressionStatement", - "src": "1633:23:0" - } - ] - }, - "functionSelector": "e24aa37c", - "id": 156, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deleteAsset", - "nameLocation": "1360:11:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 121, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 120, - "mutability": "mutable", - "name": "id", - "nameLocation": "1388:2:0", - "nodeType": "VariableDeclaration", - "scope": 156, - "src": "1372:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 119, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1372:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1371:20:0" - }, - "returnParameters": { - "id": 122, - "nodeType": "ParameterList", - "parameters": [], - "src": "1399:0:0" - }, - "scope": 192, - "src": "1351:310:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 167, - "nodeType": "Block", - "src": "1731:35:0", - "statements": [ - { - "expression": { - "baseExpression": { - "id": 163, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1746:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 165, - "indexExpression": { - "id": 164, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 158, - "src": "1758:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1746:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 162, - "id": 166, - "nodeType": "Return", - "src": "1739:22:0" - } - ] - }, - "functionSelector": "bc548275", - "id": 168, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isPresent", - "nameLocation": "1674:9:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 159, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 158, - "mutability": "mutable", - "name": "id", - "nameLocation": "1700:2:0", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "1684:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 157, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1684:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1683:20:0" - }, - "returnParameters": { - "id": 162, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 161, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 168, - "src": "1725:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 160, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1725:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "1724:6:0" - }, - "scope": 192, - "src": "1665:101:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 190, - "nodeType": "Block", - "src": "1840:161:0", - "statements": [ - { - "assignments": [ - 176 - ], - "declarations": [ - { - "constant": false, - "id": 176, - "mutability": "mutable", - "name": "exists", - "nameLocation": "1853:6:0", - "nodeType": "VariableDeclaration", - "scope": 190, - "src": "1848:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 175, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1848:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "id": 180, - "initialValue": { - "baseExpression": { - "id": 177, - "name": "assetExists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 17, - "src": "1862:11:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_bool_$", - "typeString": "mapping(string memory => bool)" - } - }, - "id": 179, - "indexExpression": { - "id": 178, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "1874:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1862:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1848:29:0" - }, - { - "expression": { - "arguments": [ - { - "id": 182, - "name": "exists", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 176, - "src": "1893:6:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 181, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 4294967278, - 4294967278 - ], - "referencedDeclaration": 4294967278, - "src": "1885:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1885:15:0", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 184, - "nodeType": "ExpressionStatement", - "src": "1885:15:0" - }, - { - "expression": { - "expression": { - "baseExpression": { - "id": 185, - "name": "assets", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13, - "src": "1979:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_string_memory_ptr_$_t_struct$_Asset_$8_storage_$", - "typeString": "mapping(string memory => struct Asset storage ref)" - } - }, - "id": 187, - "indexExpression": { - "id": 186, - "name": "id", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 170, - "src": "1986:2:0", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string calldata" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1979:10:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Asset_$8_storage", - "typeString": "struct Asset storage ref" - } - }, - "id": 188, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isLock", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "1979:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 174, - "id": 189, - "nodeType": "Return", - "src": "1972:24:0" - } - ] - }, - "functionSelector": "1ae4eb68", - "id": 191, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isAssetLocked", - "nameLocation": "1779:13:0", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 171, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 170, - "mutability": "mutable", - "name": "id", - "nameLocation": "1809:2:0", - "nodeType": "VariableDeclaration", - "scope": 191, - "src": "1793:18:0", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_string_calldata_ptr", - "typeString": "string" - }, - "typeName": { - "id": 169, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1793:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "visibility": "internal" - } - ], - "src": "1792:20:0" - }, - "returnParameters": { - "id": 174, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 173, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 191, - "src": "1834:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 172, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1834:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "1833:6:0" - }, - "scope": 192, - "src": "1770:231:0", - "stateMutability": "view", - "virtual": false, - "visibility": "public" - } - ], - "scope": 193, - "src": "543:1460:0", - "usedErrors": [] - } - ], - "src": "413:1591:0" - }, - "functionHashes": { - "createAsset(string,uint256)": "db9cc410", - "deleteAsset(string)": "e24aa37c", - "getAsset(string)": "cd5286d0", - "isAssetLocked(string)": "1ae4eb68", - "isPresent(string)": "bc548275", - "lockAsset(string)": "5e82d0a6", - "unLockAsset(string)": "def60e0d" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "305800", - "executionCost": "343", - "totalCost": "306143" - }, - "external": { - "createAsset(string,uint256)": "infinite", - "deleteAsset(string)": "infinite", - "getAsset(string)": "infinite", - "isAssetLocked(string)": "infinite", - "isPresent(string)": "infinite", - "lockAsset(string)": "infinite", - "unLockAsset(string)": "infinite" - } - } -} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol b/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol deleted file mode 100644 index 35378109d7..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol +++ /dev/null @@ -1,70 +0,0 @@ -// ***************************************************************************** -// IMPORTANT: If you update this code then make sure to recompile -// it and update the .json file as well so that they -// remain in sync for consistent test executions. -// With that said, there shouldn't be any reason to recompile this, like ever... -// ***************************************************************************** - -pragma solidity >=0.7.0; -struct Asset{ - address creator; - bool isLock; - uint size; -} -//TODO: DETEMINE CALLDATA VS MEMORY -contract LockAsset { - mapping (string => Asset) assets; - mapping (string => bool) assetExists; - - function createAsset( string calldata id, uint size) public{ - require(size>0); - assets[id].size= size; - assets[id].creator = msg.sender; - assets[id].isLock = false; - assetExists[id] = true; - } - - function getAsset(string calldata id) public view returns (Asset memory) { - return assets[id]; - } - - //Don't care if it is already locked - function lockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - assets[id].isLock = true; - } - - //Don't care if it is already unlocked - function unLockAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - assets[id].isLock = false; - } - - function deleteAsset(string calldata id) public { - bool exists = assetExists[id]; - require(exists); - - //an asset could only be deleted if it is already locked - bool assetIsLocked = assets[id].isLock; - require(assetIsLocked); - - delete assets[id]; - assetExists[id] = false; - } - - function isPresent(string calldata id) public view returns (bool) { - return assetExists[id]; - } - - function isAssetLocked(string calldata id) public view returns (bool) { - bool exists = assetExists[id]; - require(exists); - - //an asset could only be deleted if it is already locked - return assets[id].isLock; - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json new file mode 100644 index 0000000000..fd1c73cebe --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/satp-erc20-interact.json @@ -0,0 +1,49 @@ +{ + "name": "SATP-ERC20", + "contract": "solidity", + "ontology": { + "lock": [{ + "functionSignature": "transfer(address,address,uint256)", + "variables": ["owner", "bridge", "amount"], + "available": true + } + ], + "unlock": [{ + "functionSignature": "approve(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + }, + { + "functionSignature": "transfer(address,address,uint256)", + "variables": ["bridge", "owner", "amount"], + "available": true + } + ], + "mint": [{ + "functionSignature": "mint(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + } + ], + "burn": [{ + "functionSignature": "burn(address,uint256)", + "variables": ["bridge", "amount"], + "available": true + } + ], + "assign": [{ + "functionSignature": "assign(address,address,uint256)", + "variables": ["bridge", "receiver", "amount"], + "available": true + } + ], + "checkPermission": [{ + "functionSignature": "hasPermission(address)", + "variables": ["bridge"], + "available": true + } + ] + }, + "ownerSignature": "", + "bridgeSignature": "" +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts deleted file mode 100644 index f93f19710e..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - SPDX-License-Identifier: Apache-2.0 -*/ - -import { Object, Property } from "fabric-contract-api"; - -@Object() -export class Asset { - @Property() - public docType?: string; - - @Property() - public ID: string; - - @Property() - public isLocked: boolean; - - @Property() - public size: number; -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts deleted file mode 100644 index a98006bfa5..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts +++ /dev/null @@ -1,182 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - Context, - Contract, - Info, - Returns, - Transaction, -} from "fabric-contract-api"; -import { Asset } from "./asset"; - -@Info({ - title: "AssetTransfer", - description: "Smart contract for trading assets", -}) -export class AssetTransferContract extends Contract { - @Transaction() - public async InitLedger(ctx: Context): Promise { - const assets: Asset[] = [ - { - ID: "asset1", - size: 5, - isLocked: false, - }, - { - ID: "asset2", - size: 5, - isLocked: false, - }, - ]; - - for (const asset of assets) { - asset.docType = "asset"; - await ctx.stub.putState(asset.ID, Buffer.from(JSON.stringify(asset))); - console.info(`Asset ${asset.ID} initialized`); - } - } - - // CreateAsset issues a new asset to the world state with given details. - @Transaction() - public async CreateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const asset: Asset = { - ID: id, - size: size, - isLocked: false, - }; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // ReadAsset returns the asset stored in the world state with given id. - @Transaction(false) - public async ReadAsset(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); // get the asset from chaincode state - if (!assetJSON || assetJSON.length === 0) { - throw new Error(`The asset ${id} does not exist`); - } - return assetJSON.toString(); - } - - // UpdateAsset updates an existing asset in the world state with provided parameters. - @Transaction() - public async UpdateAsset( - ctx: Context, - id: string, - size: number, - ): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - if (this.IsAssetLocked(ctx, id)) { - throw new Error(`The asset ${id} is locked`); - } - - // overwriting original asset with new asset - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.size = size; - return ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - } - - // DeleteAsset deletes an given asset from the world state. - @Transaction() - public async DeleteAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - return ctx.stub.deleteState(id); - } - - // AssetExists returns true when asset with given ID exists in world state. - @Transaction(false) - @Returns("boolean") - public async AssetExists(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - return assetJSON && assetJSON.length > 0; - } - - // IsAssetLocked returns true when asset with given ID is locked in world state. - @Transaction(false) - @Returns("boolean") - public async IsAssetLocked(ctx: Context, id: string): Promise { - const assetJSON = await ctx.stub.getState(id); - - if (assetJSON && assetJSON.length > 0) { - const asset = JSON.parse(assetJSON.toString()); - return asset.isLocked; - } else { - throw new Error(`The asset ${id} does not exist`); - } - } - - @Transaction(false) - @Returns("boolean") - public async LockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - // if (this.IsAssetLocked(ctx, id)) { - // throw new Error(`The asset ${id} is already locked`); - // } - - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.isLocked = true; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - @Transaction(false) - @Returns("boolean") - public async UnlockAsset(ctx: Context, id: string): Promise { - const exists = await this.AssetExists(ctx, id); - - if (!exists) { - throw new Error(`The asset ${id} does not exist`); - } - - const assetString = await this.ReadAsset(ctx, id); - const asset: Asset = JSON.parse(assetString); - asset.isLocked = false; - await ctx.stub.putState(id, Buffer.from(JSON.stringify(asset))); - return true; - } - - // GetAllAssets returns all assets found in the world state. - @Transaction(false) - @Returns("string") - public async GetAllAssets(ctx: Context): Promise { - const allResults = []; - // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. - const iterator = await ctx.stub.getStateByRange("", ""); - let result = await iterator.next(); - while (!result.done) { - const strValue = Buffer.from(result.value.value.toString()).toString( - "utf8", - ); - let record; - try { - record = JSON.parse(strValue); - } catch (err) { - console.log(err); - record = strValue; - } - allResults.push({ Key: result.value.key, Record: record }); - result = await iterator.next(); - } - return JSON.stringify(allResults); - } -} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts deleted file mode 100644 index 020a09f410..0000000000 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - */ - -import { AssetTransferContract } from "./assetTransfer"; - -export { AssetTransferContract } from "./assetTransfer"; - -export const contracts: any[] = [AssetTransferContract]; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/.gitignore b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/.gitignore new file mode 100644 index 0000000000..1dc2dbe2a8 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/.gitignore @@ -0,0 +1,17 @@ +# +# SPDX-License-Identifier: Apache-2.0 +# + + +# Coverage directory used by tools like istanbul +coverage + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json +.yarn/ + +# Compiled TypeScript files +dist + diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js new file mode 100644 index 0000000000..f04e64cb64 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/lib/tokenERC20.js @@ -0,0 +1,516 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const { Contract } = require("fabric-contract-api"); + +// Define objectType names for prefix +const balancePrefix = "balance"; +const allowancePrefix = "allowance"; + +// Define key names for options +const nameKey = "name"; +const symbolKey = "symbol"; +const decimalsKey = "decimals"; +const totalSupplyKey = "totalSupply"; + +class TokenERC20Contract extends Contract { + /** + * Return the name of the token - e.g. "MyToken". + * The original function name is `name` in ERC20 specification. + * However, 'name' conflicts with a parameter `name` in `Contract` class. + * As a work around, we use `TokenName` as an alternative function name. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the name of the token + */ + async TokenName(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const nameBytes = await ctx.stub.getState(nameKey); + + return nameBytes.toString(); + } + + /** + * Return the symbol of the token. E.g. “HIX”. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the symbol of the token + */ + async Symbol(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const symbolBytes = await ctx.stub.getState(symbolKey); + return symbolBytes.toString(); + } + + /** + * Return the number of decimals the token uses + * e.g. 8, means to divide the token amount by 100000000 to get its user representation. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the number of decimals + */ + async Decimals(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const decimalsBytes = await ctx.stub.getState(decimalsKey); + const decimals = parseInt(decimalsBytes.toString()); + return decimals; + } + + /** + * Return the total token supply. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the total token supply + */ + async TotalSupply(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + const totalSupply = parseInt(totalSupplyBytes.toString()); + return totalSupply; + } + + /** + * BalanceOf returns the balance of the given account. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner from which the balance will be retrieved + * @returns {Number} Returns the account balance + */ + async BalanceOf(ctx, owner) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [owner]); + + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${owner} does not exist`); + } + const balance = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * Transfer transfers tokens from client account to recipient account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Transfer(ctx, to, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from = ctx.clientIdentity.getID(); + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { from, to, value: parseInt(value) }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + return true; + } + + /** + * Transfer `value` amount of tokens from `from` to `to`. + * + * @param {Context} ctx the transaction context + * @param {String} from The sender + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async TransferFrom(ctx, from, to, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const spender = ctx.clientIdentity.getID(); + + // Retrieve the allowance of the spender + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + from, + spender, + ]); + const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); + + if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${from}`); + } + + const currentAllowance = parseInt(currentAllowanceBytes.toString()); + + // Convert value from string to int + const valueInt = parseInt(value); + + // Check if the transferred value is less than the allowance + if (currentAllowance < valueInt) { + throw new Error("The spender does not have enough allowance to spend."); + } + + const transferResp = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Decrease the allowance + const updatedAllowance = this.sub(currentAllowance, valueInt); + await ctx.stub.putState( + allowanceKey, + Buffer.from(updatedAllowance.toString()), + ); + console.log( + `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, + ); + + // Emit the Transfer event + const transferEvent = { from, to, value: valueInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log("transferFrom ended successfully"); + return true; + } + + async _transfer(ctx, from, to, value) { + if (from === to) { + throw new Error("cannot transfer to and from same client account"); + } + + // Convert value from string to int + const valueInt = parseInt(value); + + if (valueInt < 0) { + // transfer of 0 is allowed in ERC20, so just validate against negative amounts + throw new Error("transfer amount cannot be negative"); + } + + // Retrieve the current balance of the sender + const fromBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [from]); + const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); + + if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { + throw new Error(`client account ${from} has no balance`); + } + + const fromCurrentBalance = parseInt(fromCurrentBalanceBytes.toString()); + + // Check if the sender has enough tokens to spend. + if (fromCurrentBalance < valueInt) { + throw new Error(`client account ${from} has insufficient funds.`); + } + + // Retrieve the current balance of the recepient + const toBalanceKey = ctx.stub.createCompositeKey(balancePrefix, [to]); + const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); + + let toCurrentBalance; + // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 + if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { + toCurrentBalance = 0; + } else { + toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); + } + + // Update the balance + const fromUpdatedBalance = this.sub(fromCurrentBalance, valueInt); + const toUpdatedBalance = this.add(toCurrentBalance, valueInt); + + await ctx.stub.putState( + fromBalanceKey, + Buffer.from(fromUpdatedBalance.toString()), + ); + await ctx.stub.putState( + toBalanceKey, + Buffer.from(toUpdatedBalance.toString()), + ); + + console.log( + `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, + ); + console.log( + `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, + ); + + return true; + } + + /** + * Allows `spender` to spend `value` amount of tokens from the owner. + * + * @param {Context} ctx the transaction context + * @param {String} spender The spender + * @param {Integer} value The amount of tokens to be approved for transfer + * @returns {Boolean} Return whether the approval was successful or not + */ + async Approve(ctx, spender, value) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const owner = ctx.clientIdentity.getID(); + + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + let valueInt = parseInt(value); + await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); + + // Emit the Approval event + const approvalEvent = { owner, spender, value: valueInt }; + ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); + + console.log("approve ended successfully"); + return true; + } + + /** + * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner of tokens + * @param {String} spender The spender who are able to transfer the tokens + * @returns {Number} Return the amount of remaining tokens allowed to spent + */ + async Allowance(ctx, owner, spender) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const allowanceKey = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const allowanceBytes = await ctx.stub.getState(allowanceKey); + if (!allowanceBytes || allowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${owner}`); + } + + const allowance = parseInt(allowanceBytes.toString()); + return allowance; + } + + // ================== Extended Functions ========================== + + /** + * Set optional infomation for a token. + * + * @param {Context} ctx the transaction context + * @param {String} name The name of the token + * @param {String} symbol The symbol of the token + * @param {String} decimals The decimals of the token + * @param {String} totalSupply The totalSupply of the token + */ + async Initialize(ctx, name, symbol, decimals) { + // Check contract options are not already set, client is not authorized to change them once intitialized + const nameBytes = await ctx.stub.getState(nameKey); + console.log("nameBytes: ", nameBytes); + if (nameBytes && nameBytes.length > 0) { + throw new Error( + "contract options are already set, client is not authorized to change them", + ); + } + + await ctx.stub.putState(nameKey, Buffer.from(name)); + await ctx.stub.putState(symbolKey, Buffer.from(symbol)); + await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); + + console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); + return true; + } + + /** + * Mint creates new tokens and adds them to minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be minted + * @returns {Object} The balance + */ + async Mint(ctx, amount) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const minter = ctx.clientIdentity.getID(); + + const amountInt = parseInt(amount); + if (amountInt <= 0) { + throw new Error("mint amount must be a positive integer"); + } + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 + let currentBalance; + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + currentBalance = 0; + } else { + currentBalance = parseInt(currentBalanceBytes.toString()); + } + const updatedBalance = this.add(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Increase totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + let totalSupply; + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + console.log("Initialize the tokenSupply"); + totalSupply = 0; + } else { + totalSupply = parseInt(totalSupplyBytes.toString()); + } + totalSupply = this.add(totalSupply, amountInt); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: "0x0", to: minter, value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * Burn redeem tokens from minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be burned + * @returns {Object} The balance + */ + async Burn(ctx, amount) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const minter = ctx.clientIdentity.getID(); + + const amountInt = parseInt(amount); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [minter]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + throw new Error("The balance does not exist"); + } + const currentBalance = parseInt(currentBalanceBytes.toString()); + const updatedBalance = this.sub(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Decrease totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + throw new Error("totalSupply does not exist."); + } + const totalSupply = this.sub( + parseInt(totalSupplyBytes.toString()), + amountInt, + ); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: minter, to: "0x0", value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * ClientAccountBalance returns the balance of the requesting client's account. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the account balance + */ + async ClientAccountBalance(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID = ctx.clientIdentity.getID(); + + const balanceKey = ctx.stub.createCompositeKey(balancePrefix, [ + clientAccountID, + ]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${clientAccountID} does not exist`); + } + const balance = parseInt(balanceBytes.toString()); + + return balance; + } + + // ClientAccountID returns the id of the requesting client's account. + // In this implementation, the client account ID is the clientId itself. + // Users can use this function to get their own account id, which they can then give to others as the payment address + async ClientAccountID(ctx) { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID = ctx.clientIdentity.getID(); + return clientAccountID; + } + + // Checks that contract options have been already initialized + async CheckInitialized(ctx) { + const nameBytes = await ctx.stub.getState(nameKey); + + if (!nameBytes || nameBytes.length === 0) { + throw new Error( + "contract options need to be set before calling any function, call Initialize() to initialize contract", + ); + } + } + + // add two number checking for overflow + add(a, b) { + let c = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a, b) { + let c = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } +} + +module.exports = TokenERC20Contract; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/package.json similarity index 57% rename from packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json rename to packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/package.json index d8f1c89341..2594a3ae2f 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/package.json @@ -1,7 +1,7 @@ { - "name": "asset-transfer-basic", + "name": "satp-contract", "version": "1.0.0", - "description": "Asset Transfer Basic contract implemented in TypeScript", + "description": "SATP contract implemented in TypeScript", "main": "dist/index.js", "typings": "dist/index.d.ts", "engines": { @@ -10,8 +10,7 @@ }, "scripts": { "lint": "tslint -c tslint.json 'src/**/*.ts'", - "pretest": "npm run lint", - "test": "nyc mocha -r ts-node/register src/**/*.spec.ts", + "test": "nyc mocha -r ts-node/register test/**/*.test.ts", "start": "fabric-chaincode-node start", "build": "tsc", "build:watch": "tsc -w", @@ -21,23 +20,26 @@ "author": "Hyperledger", "license": "Apache-2.0", "dependencies": { - "fabric-contract-api": "2.2.2", - "fabric-shim": "2.2.2" + "fabric-contract-api": "^2.4.1", + "fabric-shim": "2.4.1" }, "devDependencies": { - "@types/chai": "4.3.0", - "@types/mocha": "5.2.7", + "@types/chai": "^4.2.11", + "@types/chai-as-promised": "^7.1.2", + "@types/mocha": "^7.0.2", "@types/node": "18.11.9", - "@types/sinon": "5.0.7", - "@types/sinon-chai": "3.2.8", - "chai": "4.3.6", - "mocha": "5.2.0", - "nyc": "14.1.1", - "sinon": "7.5.0", - "sinon-chai": "3.7.0", - "ts-node": "7.0.1", - "tslint": "5.20.1", - "typescript": "5.5.2" + "@types/sinon": "^7.5.2", + "@types/sinon-chai": "^3.2.3", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "mocha": "^9.2.0", + "nyc": "^15.0.0", + "sinon": "^9.0.1", + "sinon-chai": "^3.5.0", + "ts-node": "^8.8.1", + "tslint": "^6.1.0", + "typescript": "5.5.2", + "winston": "^3.2.1" }, "nyc": { "extension": [ diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts new file mode 100644 index 0000000000..f0596b3843 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/ITraceableContract.ts @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +export interface ITraceableContract { + // GetAllAssetsKey returns all assets key found in the world state. + GetAllAssetsKey(ctx: Context): Promise; + + // GetAllTxByKey returns all transations for a specific key. + GetAllTxByKey(ctx: Context, key: string): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/index.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/index.ts new file mode 100644 index 0000000000..420ce3ba19 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/index.ts @@ -0,0 +1,9 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { SATPContract } from "./satp-contract"; + +export { SATPContract } from "./satp-contract"; + +export const contracts: any[] = [SATPContract]; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts new file mode 100644 index 0000000000..d3651eb3c5 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract-interface.ts @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context } from "fabric-contract-api"; + +/* + * Smart Contract Interface to define the methods needed by SATP Wrapper Contract. + */ + +export interface SATPContractInterface { + // mint creates new tokens with the given amount and assigns them to the owner. + mint(ctx: Context, amount: string): Promise; + // burn destroys the given amount of tokens from the owner. + burn(ctx: Context, amount: string): Promise; + // assign assigns the given amount of tokens from the owner to the target, without approval. + assign( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise; + // transfer transfers the given amount of tokens from the sender to the target, with approval needed. + transfer( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise; + // hasPermission checks if the clientMSPID has the permission to perform actions. + hasPermission(ctx: Context, clientMSPID: string): Promise; +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract.ts new file mode 100644 index 0000000000..684a0c1ec7 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/satp-contract.ts @@ -0,0 +1,174 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Context, Info, Returns, Transaction } from "fabric-contract-api"; +import { ITraceableContract } from "./ITraceableContract"; + +import TokenERC20Contract from "./tokenERC20"; +import { SATPContractInterface } from "./satp-contract-interface"; + +@Info({ + title: "SATPContract", + description: "SATP ERC20 contract for trading asset", +}) +export class SATPContract + extends TokenERC20Contract + implements ITraceableContract, SATPContractInterface +{ + constructor() { + super("SATP-token"); + } + + @Transaction() + public async InitToken( + ctx: Context, + owner: string, + id: string, + ): Promise { + await super.Initialize(ctx, "SATPContract", "SATP", "2"); + + await ctx.stub.putState("ID", Buffer.from(id)); + await ctx.stub.putState("owner", Buffer.from(owner)); + return true; + } + + @Transaction() + public async setBridge(ctx: Context, bridge: string): Promise { + this.checkPermission(ctx); + await ctx.stub.putState("bridge", Buffer.from(bridge)); + return true; + } + + @Transaction(false) + @Returns("string") + public async GetAllAssetsKey(ctx: Context): Promise { + const allResults = []; + // range query with empty string for startKey and endKey does an open-ended query of all assets in the chaincode namespace. + const iterator = await ctx.stub.getStateByRange("", ""); + let result = await iterator.next(); + while (!result.done) { + allResults.push(result.value.key); + result = await iterator.next(); + } + return allResults.toString(); + } + + // GetAllTxByKey returns all transations for a specific key. + @Transaction(false) + @Returns("string") + public async GetAllTxByKey(ctx: Context, key: string): Promise { + const allResults = []; + const iterator = await ctx.stub.getHistoryForKey(key); + let result = await iterator.next(); + while (!result.done) { + const strValue = JSON.stringify(result); + let record; + try { + record = JSON.parse(strValue); + } catch (err) { + console.log(err); + record = strValue; + } + allResults.push(record); + result = await iterator.next(); + } + return JSON.stringify(allResults); + } + + @Transaction() + public async mint(ctx: Context, amount: string): Promise { + this.checkPermission(ctx); + await super.Mint(ctx, amount); + return true; + } + + @Transaction() + public async burn(ctx: Context, amount: string): Promise { + this.checkPermission(ctx); + await this.Burn(ctx, amount); + return true; + } + + @Transaction() + public async assign( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + const clientID = await ctx.clientIdentity.getID(); + + if (from !== clientID) { + throw new Error( + `client is not authorized to perform the operation. ${clientID} != ${from}`, + ); + } + await this._transfer(ctx, from, to, amount); + return true; + } + + @Transaction() + public async transferFrom( + ctx: Context, + from: string, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + await this.TransferFrom(ctx, from, to, amount); + return true; + } + + @Transaction() + public async transfer( + ctx: Context, + to: string, + amount: string, + ): Promise { + this.checkPermission(ctx); + await this.Transfer(ctx, to, amount); + return true; + } + + private async checkPermission(ctx: Context) { + let owner = await ctx.stub.getState("owner"); + let bridge = await ctx.stub.getState("bridge"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + const clientMSPID = await ctx.clientIdentity.getMSPID(); + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + } + + @Transaction() + public async hasPermission( + ctx: Context, + clientMSPID: string, + ): Promise { + let owner = await ctx.stub.getState("owner"); + let bridge = await ctx.stub.getState("bridge"); + + owner = owner ? owner : Buffer.from(""); + + bridge = bridge ? bridge : Buffer.from(""); + + if ( + !(clientMSPID == owner.toString() || clientMSPID == bridge.toString()) + ) { + throw new Error( + `client is not authorized to perform the operation. ${clientMSPID}`, + ); + } + return true; + } +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts new file mode 100644 index 0000000000..4ae3089c5f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/src/tokenERC20.ts @@ -0,0 +1,565 @@ +import { Context, Contract, Transaction } from "fabric-contract-api"; + +// Define objectType names for prefix +const balancePrefix: string = "balance"; +const allowancePrefix: string = "allowance"; + +// Define key names for options +const nameKey: string = "name"; +const symbolKey: string = "symbol"; +const decimalsKey: string = "decimals"; +const totalSupplyKey: string = "totalSupply"; + +class TokenERC20Contract extends Contract { + /** + * Return the name of the token - e.g. "MyToken". + * The original function name is `name` in ERC20 specification. + * However, 'name' conflicts with a parameter `name` in `Contract` class. + * As a work around, we use `TokenName` as an alternative function name. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the name of the token + */ + async TokenName(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const nameBytes = await ctx.stub.getState(nameKey); + + return nameBytes.toString(); + } + + /** + * Return the symbol of the token. E.g. “HIX”. + * + * @param {Context} ctx the transaction context + * @returns {String} Returns the symbol of the token + */ + async Symbol(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const symbolBytes = await ctx.stub.getState(symbolKey); + return symbolBytes.toString(); + } + + /** + * Return the number of decimals the token uses + * e.g. 8, means to divide the token amount by 100000000 to get its user representation. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the number of decimals + */ + async Decimals(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const decimalsBytes = await ctx.stub.getState(decimalsKey); + const decimals: number = parseInt(decimalsBytes.toString()); + return decimals; + } + + /** + * Return the total token supply. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the total token supply + */ + async TotalSupply(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + const totalSupply: number = parseInt(totalSupplyBytes.toString()); + return totalSupply; + } + + /** + * BalanceOf returns the balance of the given account. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner from which the balance will be retrieved + * @returns {Number} Returns the account balance + */ + async BalanceOf(ctx: Context, owner: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + owner, + ]); + + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${owner} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * Transfer transfers tokens from client account to recipient account. + * recipient account must be a valid clientID as returned by the ClientAccountID() function. + * + * @param {Context} ctx the transaction context + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async Transfer(ctx: Context, to: string, value: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const from: string = ctx.clientIdentity.getID(); + + const transferResp: boolean = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Emit the Transfer event + const transferEvent = { from, to, value: parseInt(value) }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + return true; + } + + /** + * Transfer `value` amount of tokens from `from` to `to`. + * + * @param {Context} ctx the transaction context + * @param {String} from The sender + * @param {String} to The recipient + * @param {Integer} value The amount of token to be transferred + * @returns {Boolean} Return whether the transfer was successful or not + */ + async TransferFrom( + ctx: Context, + from: string, + to: string, + value: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const spender: string = ctx.clientIdentity.getID(); + + // Retrieve the allowance of the spender + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + from, + spender, + ]); + const currentAllowanceBytes = await ctx.stub.getState(allowanceKey); + + if (!currentAllowanceBytes || currentAllowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${from}`); + } + + const currentAllowance: number = parseInt(currentAllowanceBytes.toString()); + + // Convert value from string to int + const valueInt: number = parseInt(value); + + // Check if the transferred value is less than the allowance + if (currentAllowance < valueInt) { + throw new Error("The spender does not have enough allowance to spend."); + } + + const transferResp: boolean = await this._transfer(ctx, from, to, value); + if (!transferResp) { + throw new Error("Failed to transfer"); + } + + // Decrease the allowance + const updatedAllowance: number = this.sub(currentAllowance, valueInt); + await ctx.stub.putState( + allowanceKey, + Buffer.from(updatedAllowance.toString()), + ); + console.log( + `spender ${spender} allowance updated from ${currentAllowance} to ${updatedAllowance}`, + ); + + // Emit the Transfer event + const transferEvent = { from, to, value: valueInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log("transferFrom ended successfully"); + return true; + } + + async _transfer( + ctx: Context, + from: string, + to: string, + value: string, + ): Promise { + if (from === to) { + throw new Error("cannot transfer to and from same client account"); + } + + // Convert value from string to int + const valueInt: number = parseInt(value); + + if (valueInt < 0) { + // transfer of 0 is allowed in ERC20, so just validate against negative amounts + throw new Error("transfer amount cannot be negative"); + } + + // Retrieve the current balance of the sender + const fromBalanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + from, + ]); + const fromCurrentBalanceBytes = await ctx.stub.getState(fromBalanceKey); + + if (!fromCurrentBalanceBytes || fromCurrentBalanceBytes.length === 0) { + throw new Error(`client account ${from} has no balance`); + } + + const fromCurrentBalance: number = parseInt( + fromCurrentBalanceBytes.toString(), + ); + + // Check if the sender has enough tokens to spend. + if (fromCurrentBalance < valueInt) { + throw new Error(`client account ${from} has insufficient funds.`); + } + + // Retrieve the current balance of the recepient + const toBalanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + to, + ]); + const toCurrentBalanceBytes = await ctx.stub.getState(toBalanceKey); + + let toCurrentBalance: number; + // If recipient current balance doesn't yet exist, we'll create it with a current balance of 0 + if (!toCurrentBalanceBytes || toCurrentBalanceBytes.length === 0) { + toCurrentBalance = 0; + } else { + toCurrentBalance = parseInt(toCurrentBalanceBytes.toString()); + } + + // Update the balance + const fromUpdatedBalance: number = this.sub(fromCurrentBalance, valueInt); + const toUpdatedBalance: number = this.add(toCurrentBalance, valueInt); + + await ctx.stub.putState( + fromBalanceKey, + Buffer.from(fromUpdatedBalance.toString()), + ); + await ctx.stub.putState( + toBalanceKey, + Buffer.from(toUpdatedBalance.toString()), + ); + + console.log( + `client ${from} balance updated from ${fromCurrentBalance} to ${fromUpdatedBalance}`, + ); + console.log( + `recipient ${to} balance updated from ${toCurrentBalance} to ${toUpdatedBalance}`, + ); + + return true; + } + + /** + * Allows `spender` to spend `value` amount of tokens from the owner. + * + * @param {Context} ctx the transaction context + * @param {String} spender The spender + * @param {Integer} value The amount of tokens to be approved for transfer + * @returns {Boolean} Return whether the approval was successful or not + */ + @Transaction(true) + async Approve( + ctx: Context, + spender: string, + value: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const owner: string = ctx.clientIdentity.getID(); + + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const valueInt: number = parseInt(value); + await ctx.stub.putState(allowanceKey, Buffer.from(valueInt.toString())); + + // Emit the Approval event + const approvalEvent = { owner, spender, value: valueInt }; + ctx.stub.setEvent("Approval", Buffer.from(JSON.stringify(approvalEvent))); + + console.log("approve ended successfully"); + return true; + } + + /** + * Returns the amount of tokens which `spender` is allowed to withdraw from `owner`. + * + * @param {Context} ctx the transaction context + * @param {String} owner The owner of tokens + * @param {String} spender The spender who are able to transfer the tokens + * @returns {Number} Return the amount of remaining tokens allowed to spent + */ + async Allowance( + ctx: Context, + owner: string, + spender: string, + ): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const allowanceKey: string = ctx.stub.createCompositeKey(allowancePrefix, [ + owner, + spender, + ]); + + const allowanceBytes = await ctx.stub.getState(allowanceKey); + if (!allowanceBytes || allowanceBytes.length === 0) { + throw new Error(`spender ${spender} has no allowance from ${owner}`); + } + + const allowance: number = parseInt(allowanceBytes.toString()); + return allowance; + } + + // ================== Extended Functions ========================== + + /** + * Set optional infomation for a token. + * + * @param {Context} ctx the transaction context + * @param {String} name The name of the token + * @param {String} symbol The symbol of the token + * @param {String} decimals The decimals of the token + * @param {String} totalSupply The totalSupply of the token + */ + async Initialize( + ctx: Context, + name: string, + symbol: string, + decimals: string, + ): Promise { + // Check contract options are not already set, client is not authorized to change them once intitialized + const nameBytes = await ctx.stub.getState(nameKey); + console.log("nameBytes: ", nameBytes); + if (nameBytes && nameBytes.length > 0) { + throw new Error( + "contract options are already set, client is not authorized to change them", + ); + } + + await ctx.stub.putState(nameKey, Buffer.from(name)); + await ctx.stub.putState(symbolKey, Buffer.from(symbol)); + await ctx.stub.putState(decimalsKey, Buffer.from(decimals)); + + console.log(`name: ${name}, symbol: ${symbol}, decimals: ${decimals}`); + return true; + } + + /** + * Mint creates new tokens and adds them to minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be minted + * @returns {Object} The balance + */ + @Transaction(true) + async Mint(ctx: Context, amount: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const minter: string = ctx.clientIdentity.getID(); + + const amountInt: number = parseInt(amount); + if (amountInt <= 0) { + throw new Error("mint amount must be a positive integer"); + } + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + minter, + ]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + // If minter current balance doesn't yet exist, we'll create it with a current balance of 0 + let currentBalance: number; + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + currentBalance = 0; + } else { + currentBalance = parseInt(currentBalanceBytes.toString()); + } + const updatedBalance: number = this.add(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Increase totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + let totalSupply: number; + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + console.log("Initialize the tokenSupply"); + totalSupply = 0; + } else { + totalSupply = parseInt(totalSupplyBytes.toString()); + } + totalSupply = this.add(totalSupply, amountInt); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: "0x0", to: minter, value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * Burn redeem tokens from minter's account balance + * + * @param {Context} ctx the transaction context + * @param {Integer} amount amount of tokens to be burned + * @returns {Object} The balance + */ + async Burn(ctx: Context, amount: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const minter: string = ctx.clientIdentity.getID(); + + const amountInt: number = parseInt(amount); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + minter, + ]); + + const currentBalanceBytes = await ctx.stub.getState(balanceKey); + if (!currentBalanceBytes || currentBalanceBytes.length === 0) { + throw new Error("The balance does not exist"); + } + const currentBalance: number = parseInt(currentBalanceBytes.toString()); + const updatedBalance: number = this.sub(currentBalance, amountInt); + + await ctx.stub.putState(balanceKey, Buffer.from(updatedBalance.toString())); + + // Decrease totalSupply + const totalSupplyBytes = await ctx.stub.getState(totalSupplyKey); + if (!totalSupplyBytes || totalSupplyBytes.length === 0) { + throw new Error("totalSupply does not exist."); + } + const totalSupply: number = this.sub( + parseInt(totalSupplyBytes.toString()), + amountInt, + ); + await ctx.stub.putState( + totalSupplyKey, + Buffer.from(totalSupply.toString()), + ); + + // Emit the Transfer event + const transferEvent = { from: minter, to: "0x0", value: amountInt }; + ctx.stub.setEvent("Transfer", Buffer.from(JSON.stringify(transferEvent))); + + console.log( + `minter account ${minter} balance updated from ${currentBalance} to ${updatedBalance}`, + ); + return true; + } + + /** + * ClientAccountBalance returns the balance of the requesting client's account. + * + * @param {Context} ctx the transaction context + * @returns {Number} Returns the account balance + */ + @Transaction(false) + async ClientAccountBalance(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [ + clientAccountID, + ]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${clientAccountID} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + /** + * ClientIDAccountBalance returns the balance of the given client's account. + * The clientID must be a valid clientID as returned by the ClientAccountID() function. + * */ + @Transaction(false) + async ClientIDAccountBalance(ctx: Context, id: string): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + const balanceKey: string = ctx.stub.createCompositeKey(balancePrefix, [id]); + const balanceBytes = await ctx.stub.getState(balanceKey); + if (!balanceBytes || balanceBytes.length === 0) { + throw new Error(`the account ${id} does not exist`); + } + const balance: number = parseInt(balanceBytes.toString()); + + return balance; + } + + // ClientAccountID returns the id of the requesting client's account. + // In this implementation, the client account ID is the clientId itself. + // Users can use this function to get their own account id, which they can then give to others as the payment address + async ClientAccountID(ctx: Context): Promise { + // Check contract options are already set first to execute the function + await this.CheckInitialized(ctx); + + // Get ID of submitting client identity + const clientAccountID: string = ctx.clientIdentity.getID(); + return clientAccountID; + } + + // Checks that contract options have been already initialized + async CheckInitialized(ctx: Context): Promise { + const nameBytes = await ctx.stub.getState(nameKey); + + if (!nameBytes || nameBytes.length === 0) { + throw new Error( + "contract options need to be set before calling any function, call Initialize() to initialize contract", + ); + } + } + + // add two number checking for overflow + add(a: number, b: number): number { + const c: number = a + b; + if (a !== c - b || b !== c - a) { + throw new Error(`Math: addition overflow occurred ${a} + ${b}`); + } + return c; + } + + // add two number checking for overflow + sub(a: number, b: number): number { + const c: number = a - b; + if (a !== c + b || b !== a - c) { + throw new Error(`Math: subtraction overflow occurred ${a} - ${b}`); + } + return c; + } +} + +export default TokenERC20Contract; diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts new file mode 100644 index 0000000000..95daf7b306 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/satp-contract.test.ts @@ -0,0 +1,230 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ +import { ChaincodeStub, ClientIdentity } from "fabric-shim"; +import { SATPContract } from "./../src/satp-contract"; + +import chai from "chai"; +import chaiAsPromised from "chai-as-promised"; +import sinon from "sinon"; +import sinonChai from "sinon-chai"; +import { expect } from "chai"; + +chai.should(); +chai.use(chaiAsPromised); +chai.use(sinonChai); + +describe("SATPContract", () => { + let contract: SATPContract; + let sandbox; + let ctx; + + beforeEach(async () => { + sandbox = sinon.createSandbox(); + contract = new SATPContract(); + ctx = sinon.createStubInstance(ChaincodeStub); + ctx.stub = sinon.createStubInstance(ChaincodeStub); + ctx.clientIdentity = sinon.createStubInstance(ClientIdentity); + + ctx.clientIdentity.getMSPID.returns("Org1MSP"); + ctx.stub.getState.withArgs("owner").resolves("Org1MSP"); + ctx.stub.getState.withArgs("bridge").resolves("bridge"); + + await contract.InitToken(ctx, "Org1MSP"); + ctx.stub.getState.withArgs("name").resolves("SATPContract"); + }); + + afterEach(() => { + sandbox.restore(); + }); + + describe("#mint", () => { + it("should add token to a new account and a new total supply", async () => { + ctx.clientIdentity.getID.returns("Org1MSP"); + ctx.stub.createCompositeKey.returns("balance_Org1MSP"); + ctx.stub.getState.withArgs("balance_Org1MSP").resolves(null); + ctx.stub.getState.withArgs("totalSupply").resolves(null); + + const response = await contract.mint(ctx, 1000); + + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Org1MSP", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#burn", () => { + it("should work", async () => { + ctx.clientIdentity.getID.returns("Org1MSP"); + ctx.stub.createCompositeKey.returns("balance_Org1MSP"); + ctx.stub.getState + .withArgs("balance_Org1MSP") + .resolves(Buffer.from("1000")); + ctx.stub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await contract.burn(ctx, 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Org1MSP", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#assign", () => { + it("should fail when the sender and the recipient are the same", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + await expect( + contract.assign(ctx, "bridge", "bridge", 1000), + ).to.be.rejectedWith( + Error, + "cannot transfer to and from same client account", + ); + }); + + it("should fail when the message sender does not have permition", async () => { + ctx.clientIdentity.getMSPID.returns("attacker"); + await expect( + contract.assign(ctx, "bridge", "attacker", 1000), + ).to.be.rejectedWith( + Error, + "client is not authorized to perform the operation. attacker", + ); + }); + + it("should fail when the sender does not have enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState.withArgs("balance_bridge").resolves(Buffer.from("500")); + + await expect( + contract.assign(ctx, "bridge", "Alice", 1000), + ).to.be.rejectedWith( + Error, + "client account bridge has insufficient funds.", + ); + }); + + it("should transfer to a new account when the sender has enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState + .withArgs("balance_bridge") + .resolves(Buffer.from("1000")); + + ctx.stub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + ctx.stub.getState.withArgs("balance_Bob").resolves(null); + + const response = await contract.assign(ctx, "bridge", "Bob", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_bridge", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Bob", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should transfer to the existing account when the sender has enough token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.stub.createCompositeKey + .withArgs("balance", ["bridge"]) + .returns("balance_bridge"); + ctx.stub.getState + .withArgs("balance_bridge") + .resolves(Buffer.from("1000")); + + ctx.stub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + ctx.stub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); + + const response = await contract.assign(ctx, "bridge", "Bob", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_bridge", + Buffer.from("0"), + ); + sinon.assert.calledWith( + ctx.stub.putState, + "balance_Bob", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + describe("#transfer", () => { + it("should fail when the spender is not allowed to spend the token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.clientIdentity.getID.returns("bridge"); + + ctx.stub.createCompositeKey + .withArgs("allowance", ["owner", "bridge"]) + .returns("allowance_owner_bridge"); + ctx.stub.getState + .withArgs("allowance_owner_bridge") + .resolves(Buffer.from("0")); + + await expect( + contract.transfer(ctx, "owner", "bridge", 1000), + ).to.be.rejectedWith( + Error, + "The spender does not have enough allowance to spend.", + ); + }); + + it("should transfer when the spender is allowed to spend the token", async () => { + ctx.clientIdentity.getMSPID.returns("bridge"); + ctx.clientIdentity.getID.returns("bridge"); + + ctx.stub.createCompositeKey + .withArgs("allowance", ["owner", "bridge"]) + .returns("allowance_owner_bridge"); + ctx.stub.getState + .withArgs("allowance_owner_bridge") + .resolves(Buffer.from("3000")); + + sinon.stub(contract, "_transfer").resolves(true); + + const response = await contract.transfer(ctx, "owner", "bridge", 1000); + sinon.assert.calledWith( + ctx.stub.putState, + "allowance_owner_bridge", + Buffer.from("2000"), + ); + const event = { from: "owner", to: "bridge", value: 1000 }; + sinon.assert.calledWith( + ctx.stub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js new file mode 100644 index 0000000000..0f11a84957 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/test/tokenERC20.test.js @@ -0,0 +1,397 @@ +/* + * Copyright IBM Corp. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +"use strict"; + +const { Context } = require("fabric-contract-api"); +const { ChaincodeStub, ClientIdentity } = require("fabric-shim"); + +const { TokenERC20Contract } = require("../lib/tokenERC20"); + +const chai = require("chai"); +const chaiAsPromised = require("chai-as-promised"); +const sinon = require("sinon"); +const expect = chai.expect; + +chai.should(); +chai.use(chaiAsPromised); + +describe("Chaincode", () => { + let sandbox; + let token; + let ctx; + let mockStub; + let mockClientIdentity; + + beforeEach("Sandbox creation", async () => { + sandbox = sinon.createSandbox(); + token = new TokenERC20Contract("token-erc20"); + + ctx = sinon.createStubInstance(Context); + mockStub = sinon.createStubInstance(ChaincodeStub); + ctx.stub = mockStub; + mockClientIdentity = sinon.createStubInstance(ClientIdentity); + ctx.clientIdentity = mockClientIdentity; + + await token.Initialize(ctx, "some name", "some symbol", "2"); + + mockStub.putState.resolves("some state"); + mockStub.setEvent.returns("set event"); + }); + + afterEach("Sandbox restoration", () => { + sandbox.restore(); + }); + + describe("#TokenName", () => { + it("should work", async () => { + mockStub.getState.resolves("some state"); + + const response = await token.TokenName(ctx); + sinon.assert.calledWith(mockStub.getState, "name"); + expect(response).to.equals("some state"); + }); + }); + + describe("#Symbol", () => { + it("should work", async () => { + mockStub.getState.resolves("some state"); + + const response = await token.Symbol(ctx); + sinon.assert.calledWith(mockStub.getState, "symbol"); + expect(response).to.equals("some state"); + }); + }); + + describe("#Decimals", () => { + it("should work", async () => { + mockStub.getState.resolves(Buffer.from("2")); + + const response = await token.Decimals(ctx); + sinon.assert.calledWith(mockStub.getState, "decimals"); + expect(response).to.equals(2); + }); + }); + + describe("#TotalSupply", () => { + it("should work", async () => { + mockStub.getState.resolves(Buffer.from("10000")); + + const response = await token.TotalSupply(ctx); + sinon.assert.calledWith(mockStub.getState, "totalSupply"); + expect(response).to.equals(10000); + }); + }); + + describe("#BalanceOf", () => { + it("should work", async () => { + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.BalanceOf(ctx, "Alice"); + expect(response).to.equals(1000); + }); + }); + + describe("#_transfer", () => { + it("should fail when the sender and the receipient are the same", async () => { + await expect( + token._transfer(ctx, "Alice", "Alice", "1000"), + ).to.be.rejectedWith( + Error, + "cannot transfer to and from same client account", + ); + }); + + it("should fail when the sender does not have enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("500")); + + await expect( + token._transfer(ctx, "Alice", "Bob", "1000"), + ).to.be.rejectedWith( + Error, + "client account Alice has insufficient funds.", + ); + }); + + it("should transfer to a new account when the sender has enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + + mockStub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + mockStub.getState.withArgs("balance_Bob").resolves(null); + + const response = await token._transfer(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "balance_Bob", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should transfer to the existing account when the sender has enough token", async () => { + mockStub.createCompositeKey + .withArgs("balance", ["Alice"]) + .returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + + mockStub.createCompositeKey + .withArgs("balance", ["Bob"]) + .returns("balance_Bob"); + mockStub.getState.withArgs("balance_Bob").resolves(Buffer.from("2000")); + + const response = await token._transfer(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "balance_Bob", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Transfer", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Alice"); + sinon.stub(token, "_transfer").returns(true); + + const response = await token.Transfer(ctx, "Bob", "1000"); + const event = { from: "Alice", to: "Bob", value: 1000 }; + sinon.assert.calledWith( + mockStub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); + + describe("#TransferFrom", () => { + it("should fail when the spender is not allowed to spend the token", async () => { + mockClientIdentity.getID.returns("Charlie"); + + mockStub.createCompositeKey + .withArgs("allowance", ["Alice", "Charlie"]) + .returns("allowance_Alice_Charlie"); + mockStub.getState + .withArgs("allowance_Alice_Charlie") + .resolves(Buffer.from("0")); + + await expect( + token.TransferFrom(ctx, "Alice", "Bob", "1000"), + ).to.be.rejectedWith( + Error, + "The spender does not have enough allowance to spend.", + ); + }); + + it("should transfer when the spender is allowed to spend the token", async () => { + mockClientIdentity.getID.returns("Charlie"); + + mockStub.createCompositeKey + .withArgs("allowance", ["Alice", "Charlie"]) + .returns("allowance_Alice_Charlie"); + mockStub.getState + .withArgs("allowance_Alice_Charlie") + .resolves(Buffer.from("3000")); + + sinon.stub(token, "_transfer").returns(true); + + const response = await token.TransferFrom(ctx, "Alice", "Bob", "1000"); + sinon.assert.calledWith( + mockStub.putState, + "allowance_Alice_Charlie", + Buffer.from("2000"), + ); + const event = { from: "Alice", to: "Bob", value: 1000 }; + sinon.assert.calledWith( + mockStub.setEvent, + "Transfer", + Buffer.from(JSON.stringify(event)), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Approve", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Dave"); + mockStub.createCompositeKey.returns("allowance_Dave_Eve"); + + const response = await token.Approve(ctx, "Ellen", "1000"); + sinon.assert.calledWith( + mockStub.putState, + "allowance_Dave_Eve", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Allowance", () => { + it("should work", async () => { + mockStub.createCompositeKey.returns("allowance_Dave_Eve"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.Allowance(ctx, "Dave", "Eve"); + expect(response).to.equals(1000); + }); + }); + + describe("#Initialize", () => { + it("should work", async () => { + // We consider it has already been initialized in the before-each statement + sinon.assert.calledWith( + mockStub.putState, + "name", + Buffer.from("some name"), + ); + sinon.assert.calledWith( + mockStub.putState, + "symbol", + Buffer.from("some symbol"), + ); + sinon.assert.calledWith(mockStub.putState, "decimals", Buffer.from("2")); + }); + + it("should failed if called a second time", async () => { + // We consider it has already been initialized in the before-each statement + await expect( + await token.Initialize(ctx, "some name", "some symbol", "2"), + ).to.be.rejectedWith( + Error, + "contract options are already set, client is not authorized to change them", + ); + }); + }); + + describe("#Mint", () => { + it("should add token to a new account and a new total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(null); + mockStub.getState.withArgs("totalSupply").resolves(null); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + + it("should add token to the existing account and the existing total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("2000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + + it("should add token to a new account and the existing total supply", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(null); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Mint(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("1000"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("3000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#Burn", () => { + it("should work", async () => { + mockClientIdentity.getMSPID.returns("Org1MSP"); + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.withArgs("balance_Alice").resolves(Buffer.from("1000")); + mockStub.getState.withArgs("totalSupply").resolves(Buffer.from("2000")); + + const response = await token.Burn(ctx, "1000"); + sinon.assert.calledWith( + mockStub.putState.getCall(0), + "balance_Alice", + Buffer.from("0"), + ); + sinon.assert.calledWith( + mockStub.putState.getCall(1), + "totalSupply", + Buffer.from("1000"), + ); + expect(response).to.equals(true); + }); + }); + + describe("#ClientAccountBalance", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("Alice"); + mockStub.createCompositeKey.returns("balance_Alice"); + mockStub.getState.resolves(Buffer.from("1000")); + + const response = await token.ClientAccountBalance(ctx); + expect(response).to.equals(1000); + }); + }); + + describe("#ClientAccountID", () => { + it("should work", async () => { + mockClientIdentity.getID.returns("x509::{subject DN}::{issuer DN}"); + + const response = await token.ClientAccountID(ctx); + sinon.assert.calledOnce(mockClientIdentity.getID); + expect(response).to.equals("x509::{subject DN}::{issuer DN}"); + }); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/tsconfig.json b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/tsconfig.json new file mode 100644 index 0000000000..a1c5ccb234 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "outDir": "dist", + "target": "es2017", + "moduleResolution": "node", + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "skipLibCheck": true, + }, + "include": [ + "./src/**/*" + ], + "exclude": [ + "./src/**/*.test.ts" + ] +} diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/yarn.lock b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/yarn.lock new file mode 100644 index 0000000000..8e3447999e --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/contracts/satp-contract/chaincode-typescript/yarn.lock @@ -0,0 +1,3747 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10 + +"@ampproject/remapping@npm:^2.2.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/f3451525379c68a73eb0a1e65247fbf28c0cccd126d93af21c75fceff77773d43c0d4a2d51978fb131aff25b5f2cb41a9fe48cc296e61ae65e679c4f6918b0ab + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.2": + version: 7.24.2 + resolution: "@babel/code-frame@npm:7.24.2" + dependencies: + "@babel/highlight": "npm:^7.24.2" + picocolors: "npm:^1.0.0" + checksum: 10/7db8f5b36ffa3f47a37f58f61e3d130b9ecad21961f3eede7e2a4ac2c7e4a5efb6e9d03a810c669bc986096831b6c0dfc2c3082673d93351b82359c1b03e0590 + languageName: node + linkType: hard + +"@babel/compat-data@npm:^7.23.5": + version: 7.24.4 + resolution: "@babel/compat-data@npm:7.24.4" + checksum: 10/e51faec0ac8259f03cc5029d2b4a944b4fee44cb5188c11530769d5beb81f384d031dba951febc3e33dbb48ceb8045b1184f5c1ac4c5f86ab1f5e951e9aaf7af + languageName: node + linkType: hard + +"@babel/core@npm:^7.7.5": + version: 7.24.5 + resolution: "@babel/core@npm:7.24.5" + dependencies: + "@ampproject/remapping": "npm:^2.2.0" + "@babel/code-frame": "npm:^7.24.2" + "@babel/generator": "npm:^7.24.5" + "@babel/helper-compilation-targets": "npm:^7.23.6" + "@babel/helper-module-transforms": "npm:^7.24.5" + "@babel/helpers": "npm:^7.24.5" + "@babel/parser": "npm:^7.24.5" + "@babel/template": "npm:^7.24.0" + "@babel/traverse": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + convert-source-map: "npm:^2.0.0" + debug: "npm:^4.1.0" + gensync: "npm:^1.0.0-beta.2" + json5: "npm:^2.2.3" + semver: "npm:^6.3.1" + checksum: 10/b0d02c51f39cc4c6f8fcaab7052d17dea63aab36d7e2567bfbad074e5a027df737ebcaf3029c3a659bc719bbac806311c2e8786be1d686abd093c48a6068395c + languageName: node + linkType: hard + +"@babel/generator@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/generator@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^2.5.1" + checksum: 10/7a3782f1d2f824025a538444a0fce44f5b30a7b013984279561bcb3450eec91a41526533fd0b25b1a6fde627bebd0e645c0ea2aa907cc15c7f3da2d9eb71f069 + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helper-compilation-targets@npm:7.23.6" + dependencies: + "@babel/compat-data": "npm:^7.23.5" + "@babel/helper-validator-option": "npm:^7.23.5" + browserslist: "npm:^4.22.2" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10/05595cd73087ddcd81b82d2f3297aac0c0422858dfdded43d304786cf680ec33e846e2317e6992d2c964ee61d93945cbf1fa8ec80b55aee5bfb159227fb02cb9 + languageName: node + linkType: hard + +"@babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: 10/d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 + languageName: node + linkType: hard + +"@babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" + dependencies: + "@babel/template": "npm:^7.22.15" + "@babel/types": "npm:^7.23.0" + checksum: 10/7b2ae024cd7a09f19817daf99e0153b3bf2bc4ab344e197e8d13623d5e36117ed0b110914bc248faa64e8ccd3e97971ec7b41cc6fd6163a2b980220c58dcdf6d + languageName: node + linkType: hard + +"@babel/helper-hoist-variables@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-hoist-variables@npm:7.22.5" + dependencies: + "@babel/types": "npm:^7.22.5" + checksum: 10/394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.24.3": + version: 7.24.3 + resolution: "@babel/helper-module-imports@npm:7.24.3" + dependencies: + "@babel/types": "npm:^7.24.0" + checksum: 10/42fe124130b78eeb4bb6af8c094aa749712be0f4606f46716ce74bc18a5ea91c918c547c8bb2307a2e4b33f163e4ad2cb6a7b45f80448e624eae45b597ea3499 + languageName: node + linkType: hard + +"@babel/helper-module-transforms@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-module-transforms@npm:7.24.5" + dependencies: + "@babel/helper-environment-visitor": "npm:^7.22.20" + "@babel/helper-module-imports": "npm:^7.24.3" + "@babel/helper-simple-access": "npm:^7.24.5" + "@babel/helper-split-export-declaration": "npm:^7.24.5" + "@babel/helper-validator-identifier": "npm:^7.24.5" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10/1a91e8abc2f427f8273ce3b99ef7b9c013eb3628221428553e0d4bc9c6db2e73bc4fc1b8535bd258544936accab9380e0d095f2449f913cad650ddee744b2124 + languageName: node + linkType: hard + +"@babel/helper-simple-access@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-simple-access@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + checksum: 10/db8768a16592faa1bde9061cac3d903bdbb2ddb2a7e9fb73c5904daee1f1b1dc69ba4d249dc22c45885c0d4b54fd0356ee78e6d67a9a90330c7dd37e6cd3acff + languageName: node + linkType: hard + +"@babel/helper-split-export-declaration@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-split-export-declaration@npm:7.24.5" + dependencies: + "@babel/types": "npm:^7.24.5" + checksum: 10/84777b6304ef0fe6501038985b61aaa118082688aa54eca8265f14f3ae2e01adf137e9111f4eb9870e0e9bc23901e0b8859bb2a9e4362ddf89d05e1c409c2422 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.24.1": + version: 7.24.1 + resolution: "@babel/helper-string-parser@npm:7.24.1" + checksum: 10/04c0ede77b908b43e6124753b48bc485528112a9335f0a21a226bff1ace75bb6e64fab24c85cb4b1610ef3494dacd1cb807caeb6b79a7b36c43d48c289b35949 + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-string-parser@npm:7.24.7" + checksum: 10/603d8d962bbe89907aa99a8f19a006759ab7b2464615f20a6a22e3e2e8375af37ddd0e5175c9e622e1c4b2d83607ffb41055a59d0ce34404502af30fde573a5c + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helper-validator-identifier@npm:7.24.5" + checksum: 10/38aaf6a64a0ea2e84766165b461deda3c24fd2173dff18419a2cc9e1ea1d3e709039aee94db29433a07011492717c80900a5eb564cdca7d137757c3c69e26898 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 10/86875063f57361471b531dbc2ea10bbf5406e12b06d249b03827d361db4cad2388c6f00936bcd9dc86479f7e2c69ea21412c2228d4b3672588b754b70a449d4b + languageName: node + linkType: hard + +"@babel/helper-validator-option@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/helper-validator-option@npm:7.23.5" + checksum: 10/537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e + languageName: node + linkType: hard + +"@babel/helpers@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/helpers@npm:7.24.5" + dependencies: + "@babel/template": "npm:^7.24.0" + "@babel/traverse": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + checksum: 10/efd74325823c70a32aa9f5e263c8eb0a1f729f5e9ea168e3226fa92a10b1702593b76034812e9f7b560d6447f9cd446bad231d7086af842129c6596306300094 + languageName: node + linkType: hard + +"@babel/highlight@npm:^7.24.2": + version: 7.24.5 + resolution: "@babel/highlight@npm:7.24.5" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.24.5" + chalk: "npm:^2.4.2" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10/afde0403154ad69ecd58a98903058e776760444bf4d0363fb740a8596bc6278b72c5226637c4f6b3674d70acb1665207fe2fcecfe93a74f2f4ab033e89fd7e8c + languageName: node + linkType: hard + +"@babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/parser@npm:7.24.5" + bin: + parser: ./bin/babel-parser.js + checksum: 10/f5ed1c5fd4b0045a364fb906f54fd30e2fff93a45069068b6d80d3ab2b64f5569c90fb41d39aff80fb7e925ca4d44917965a76776a3ca11924ec1fae3be5d1ea + languageName: node + linkType: hard + +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/template@npm:7.24.0" + dependencies: + "@babel/code-frame": "npm:^7.23.5" + "@babel/parser": "npm:^7.24.0" + "@babel/types": "npm:^7.24.0" + checksum: 10/8c538338c7de8fac8ada691a5a812bdcbd60bd4a4eb5adae2cc9ee19773e8fb1a724312a00af9e1ce49056ffd3c3475e7287b5668cf6360bfb3f8ac827a06ffe + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/traverse@npm:7.24.5" + dependencies: + "@babel/code-frame": "npm:^7.24.2" + "@babel/generator": "npm:^7.24.5" + "@babel/helper-environment-visitor": "npm:^7.22.20" + "@babel/helper-function-name": "npm:^7.23.0" + "@babel/helper-hoist-variables": "npm:^7.22.5" + "@babel/helper-split-export-declaration": "npm:^7.24.5" + "@babel/parser": "npm:^7.24.5" + "@babel/types": "npm:^7.24.5" + debug: "npm:^4.3.1" + globals: "npm:^11.1.0" + checksum: 10/e237de56e0c30795293fdb6f2cb09a75e6230836e3dc67dc4fa21781eb4d5842996bf3af95bc57ac5c7e6e97d06446f14732d0952eb57d5d9643de7c4f95bee6 + languageName: node + linkType: hard + +"@babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.5": + version: 7.24.5 + resolution: "@babel/types@npm:7.24.5" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.1" + "@babel/helper-validator-identifier": "npm:^7.24.5" + to-fast-properties: "npm:^2.0.0" + checksum: 10/259e7512476ae64830e73f2addf143159232bcbf0eba6a6a27cab25a960cd353a11c826eb54185fdf7d8d9865922cbcd6522149e9ec55b967131193f9c9111a1 + languageName: node + linkType: hard + +"@babel/types@npm:^7.8.3": + version: 7.24.7 + resolution: "@babel/types@npm:7.24.7" + dependencies: + "@babel/helper-string-parser": "npm:^7.24.7" + "@babel/helper-validator-identifier": "npm:^7.24.7" + to-fast-properties: "npm:^2.0.0" + checksum: 10/ad3c8c0d6fb4acb0bb74bb5b4bb849b181bf6185677ef9c59c18856c81e43628d0858253cf232f0eca806f02e08eff85a1d3e636a3e94daea737597796b0b430 + languageName: node + linkType: hard + +"@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": + version: 1.6.0 + resolution: "@colors/colors@npm:1.6.0" + checksum: 10/66d00284a3a9a21e5e853b256942e17edbb295f4bd7b9aa7ef06bbb603568d5173eb41b0f64c1e51748bc29d382a23a67d99956e57e7431c64e47e74324182d9 + languageName: node + linkType: hard + +"@dabh/diagnostics@npm:^2.0.2": + version: 2.0.3 + resolution: "@dabh/diagnostics@npm:2.0.3" + dependencies: + colorspace: "npm:1.1.x" + enabled: "npm:2.0.x" + kuler: "npm:^2.0.0" + checksum: 10/14e449a7f42f063f959b472f6ce02d16457a756e852a1910aaa831b63fc21d86f6c32b2a1aa98a4835b856548c926643b51062d241fb6e9b2b7117996053e6b9 + languageName: node + linkType: hard + +"@fidm/asn1@npm:^1.0.4": + version: 1.0.4 + resolution: "@fidm/asn1@npm:1.0.4" + checksum: 10/38b47e1739fcf7405ae96308679a0b24b3a9c4b2f4d5737f0c114b539b68a9d4ff6d20044311651862fda05d95d53b6590ffff3a73b35cf674dad2a8917d899f + languageName: node + linkType: hard + +"@fidm/x509@npm:^1.2.1": + version: 1.2.1 + resolution: "@fidm/x509@npm:1.2.1" + dependencies: + "@fidm/asn1": "npm:^1.0.4" + tweetnacl: "npm:^1.0.1" + checksum: 10/30ff6de908d57d2a7a85f7e8d56af96153a4ef17864cf8263777fec0eee575b9383eb7cf48f8cc33e33074735570214c5495c03c43452c6a207e181166e219b9 + languageName: node + linkType: hard + +"@grpc/grpc-js@npm:^1.4.1": + version: 1.10.9 + resolution: "@grpc/grpc-js@npm:1.10.9" + dependencies: + "@grpc/proto-loader": "npm:^0.7.13" + "@js-sdsl/ordered-map": "npm:^4.4.2" + checksum: 10/8991a997798f19ae849d0f274280f5fdba981048f77211744a301e22207620bb24661d0dfaea51ee6259c5c8e6c159b62fe2499c879d9f14decf20957c219124 + languageName: node + linkType: hard + +"@grpc/proto-loader@npm:^0.6.6": + version: 0.6.13 + resolution: "@grpc/proto-loader@npm:0.6.13" + dependencies: + "@types/long": "npm:^4.0.1" + lodash.camelcase: "npm:^4.3.0" + long: "npm:^4.0.0" + protobufjs: "npm:^6.11.3" + yargs: "npm:^16.2.0" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/a881bea00a1ab1c8d50e4bdf106c7e74f905121116fbcda91b9688548da1267edf1302bb754164a6f60ece82a949a28cefc503bfe058ffc1531dc26fa5188df3 + languageName: node + linkType: hard + +"@grpc/proto-loader@npm:^0.7.13": + version: 0.7.13 + resolution: "@grpc/proto-loader@npm:0.7.13" + dependencies: + lodash.camelcase: "npm:^4.3.0" + long: "npm:^5.0.0" + protobufjs: "npm:^7.2.5" + yargs: "npm:^17.7.2" + bin: + proto-loader-gen-types: build/bin/proto-loader-gen-types.js + checksum: 10/7e2d842c2061cbaf6450c71da0077263be3bab165454d5c8a3e1ae4d3c6d2915f02fd27da63ff01f05e127b1221acd40705273f5d29303901e60514e852992f4 + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10/e9ed5fd27c3aec1095e3a16e0c0cf148d1fee55a38665c35f7b3f86a9b5d00d042ddaabc98e8a1cb7463b9378c15f22a94eb35e99469c201453eb8375191f243 + languageName: node + linkType: hard + +"@istanbuljs/load-nyc-config@npm:^1.0.0": + version: 1.1.0 + resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" + dependencies: + camelcase: "npm:^5.3.1" + find-up: "npm:^4.1.0" + get-package-type: "npm:^0.1.0" + js-yaml: "npm:^3.13.1" + resolve-from: "npm:^5.0.0" + checksum: 10/b000a5acd8d4fe6e34e25c399c8bdbb5d3a202b4e10416e17bfc25e12bab90bb56d33db6089ae30569b52686f4b35ff28ef26e88e21e69821d2b85884bd055b8 + languageName: node + linkType: hard + +"@istanbuljs/schema@npm:^0.1.2": + version: 0.1.3 + resolution: "@istanbuljs/schema@npm:0.1.3" + checksum: 10/a9b1e49acdf5efc2f5b2359f2df7f90c5c725f2656f16099e8b2cd3a000619ecca9fc48cf693ba789cf0fd989f6e0df6a22bc05574be4223ecdbb7997d04384b + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": "npm:^1.2.1" + "@jridgewell/sourcemap-codec": "npm:^1.4.10" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10/81587b3c4dd8e6c60252122937cea0c637486311f4ed208b52b62aae2e7a87598f63ec330e6cd0984af494bfb16d3f0d60d3b21d7e5b4aedd2602ff3fe9d32e2 + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:^3.1.0": + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 10/97106439d750a409c22c8bff822d648f6a71f3aa9bc8e5129efdc36343cd3096ddc4eeb1c62d2fe48e9bdd4db37b05d4646a17114ecebd3bbcacfa2de51c3c1d + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 10/832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": + version: 1.4.15 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" + checksum: 10/89960ac087781b961ad918978975bcdf2051cd1741880469783c42de64239703eab9db5230d776d8e6a09d73bb5e4cb964e07d93ee6e2e7aea5a7d726e865c09 + languageName: node + linkType: hard + +"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": "npm:^3.1.0" + "@jridgewell/sourcemap-codec": "npm:^1.4.14" + checksum: 10/dced32160a44b49d531b80a4a2159dceab6b3ddf0c8e95a0deae4b0e894b172defa63d5ac52a19c2068e1fe7d31ea4ba931fbeec103233ecb4208953967120fc + languageName: node + linkType: hard + +"@js-sdsl/ordered-map@npm:^4.4.2": + version: 4.4.2 + resolution: "@js-sdsl/ordered-map@npm:4.4.2" + checksum: 10/ac64e3f0615ecc015461c9f527f124d2edaa9e68de153c1e270c627e01e83d046522d7e872692fd57a8c514578b539afceff75831c0d8b2a9a7a347fbed35af4 + languageName: node + linkType: hard + +"@npmcli/agent@npm:^2.0.0": + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^10.0.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10/96fc0036b101bae5032dc2a4cd832efb815ce9b33f9ee2f29909ee49d96a0026b3565f73c507a69eb8603f5cb32e0ae45a70cab1e2655990a4e06ae99f7f572a + languageName: node + linkType: hard + +"@npmcli/fs@npm:^3.1.0": + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" + dependencies: + semver: "npm:^7.3.5" + checksum: 10/1e0e04087049b24b38bc0b30d87a9388ee3ca1d3fdfc347c2f77d84fcfe6a51f250bc57ba2c1f614d7e4285c6c62bf8c769bc19aa0949ea39e5b043ee023b0bd + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10/115e8ceeec6bc69dff2048b35c0ab4f8bbee12d8bb6c1f4af758604586d802b6e669dcb02dda61d078de42c2b4ddce41b3d9e726d7daa6b4b850f4adbf7333ff + languageName: node + linkType: hard + +"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/aspromise@npm:1.1.2" + checksum: 10/8a938d84fe4889411296db66b29287bd61ea3c14c2d23e7a8325f46a2b8ce899857c5f038d65d7641805e6c1d06b495525c7faf00c44f85a7ee6476649034969 + languageName: node + linkType: hard + +"@protobufjs/base64@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/base64@npm:1.1.2" + checksum: 10/c71b100daeb3c9bdccab5cbc29495b906ba0ae22ceedc200e1ba49717d9c4ab15a6256839cebb6f9c6acae4ed7c25c67e0a95e734f612b258261d1a3098fe342 + languageName: node + linkType: hard + +"@protobufjs/codegen@npm:^2.0.4": + version: 2.0.4 + resolution: "@protobufjs/codegen@npm:2.0.4" + checksum: 10/c6ee5fa172a8464f5253174d3c2353ea520c2573ad7b6476983d9b1346f4d8f2b44aa29feb17a949b83c1816bc35286a5ea265ed9d8fdd2865acfa09668c0447 + languageName: node + linkType: hard + +"@protobufjs/eventemitter@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/eventemitter@npm:1.1.0" + checksum: 10/03af3e99f17ad421283d054c88a06a30a615922a817741b43ca1b13e7c6b37820a37f6eba9980fb5150c54dba6e26cb6f7b64a6f7d8afa83596fafb3afa218c3 + languageName: node + linkType: hard + +"@protobufjs/fetch@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/fetch@npm:1.1.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.1" + "@protobufjs/inquire": "npm:^1.1.0" + checksum: 10/67ae40572ad536e4ef94269199f252c024b66e3059850906bdaee161ca1d75c73d04d35cd56f147a8a5a079f5808e342b99e61942c1dae15604ff0600b09a958 + languageName: node + linkType: hard + +"@protobufjs/float@npm:^1.0.2": + version: 1.0.2 + resolution: "@protobufjs/float@npm:1.0.2" + checksum: 10/634c2c989da0ef2f4f19373d64187e2a79f598c5fb7991afb689d29a2ea17c14b796b29725945fa34b9493c17fb799e08ac0a7ccaae460ee1757d3083ed35187 + languageName: node + linkType: hard + +"@protobufjs/inquire@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/inquire@npm:1.1.0" + checksum: 10/c09efa34a5465cb120775e1a482136f2340a58b4abce7e93d72b8b5a9324a0e879275016ef9fcd73d72a4731639c54f2bb755bb82f916e4a78892d1d840bb3d2 + languageName: node + linkType: hard + +"@protobufjs/path@npm:^1.1.2": + version: 1.1.2 + resolution: "@protobufjs/path@npm:1.1.2" + checksum: 10/bb709567935fd385a86ad1f575aea98131bbd719c743fb9b6edd6b47ede429ff71a801cecbd64fc72deebf4e08b8f1bd8062793178cdaed3713b8d15771f9b83 + languageName: node + linkType: hard + +"@protobufjs/pool@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/pool@npm:1.1.0" + checksum: 10/b9c7047647f6af28e92aac54f6f7c1f7ff31b201b4bfcc7a415b2861528854fce3ec666d7e7e10fd744da905f7d4aef2205bbcc8944ca0ca7a82e18134d00c46 + languageName: node + linkType: hard + +"@protobufjs/utf8@npm:^1.1.0": + version: 1.1.0 + resolution: "@protobufjs/utf8@npm:1.1.0" + checksum: 10/131e289c57534c1d73a0e55782d6751dd821db1583cb2f7f7e017c9d6747addaebe79f28120b2e0185395d990aad347fb14ffa73ef4096fa38508d61a0e64602 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^1.6.0, @sinonjs/commons@npm:^1.7.0, @sinonjs/commons@npm:^1.8.1": + version: 1.8.6 + resolution: "@sinonjs/commons@npm:1.8.6" + dependencies: + type-detect: "npm:4.0.8" + checksum: 10/51987338fd8b4d1e135822ad593dd23a3288764aa41d83c695124d512bc38b87eece859078008651ecc7f1df89a7e558a515dc6f02d21a93be4ba50b39a28914 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^6.0.0, @sinonjs/fake-timers@npm:^6.0.1": + version: 6.0.1 + resolution: "@sinonjs/fake-timers@npm:6.0.1" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + checksum: 10/c7ee19f62bd0ca52553dd5fca9b3921373218c9fed0f02af2f8e5261f65ce9ff0a5e55ca612ded6daf4088a243e905d61bd6dce1c6d325794283b55c71708395 + languageName: node + linkType: hard + +"@sinonjs/samsam@npm:^5.3.1": + version: 5.3.1 + resolution: "@sinonjs/samsam@npm:5.3.1" + dependencies: + "@sinonjs/commons": "npm:^1.6.0" + lodash.get: "npm:^4.4.2" + type-detect: "npm:^4.0.8" + checksum: 10/6850b9980f042a844072a34ce3ca80b098d4550c8c7a83b2b2e7beb1e06ad19608699544b7a8b0c7db882528d8b74321dfd185d0651cff08cbe793cb73dd39d3 + languageName: node + linkType: hard + +"@sinonjs/text-encoding@npm:^0.7.1": + version: 0.7.2 + resolution: "@sinonjs/text-encoding@npm:0.7.2" + checksum: 10/ec713fb44888c852d84ca54f6abf9c14d036c11a5d5bfab7825b8b9d2b22127dbe53412c68f4dbb0c05ea5ed61c64679bd2845c177d81462db41e0d3d7eca499 + languageName: node + linkType: hard + +"@types/chai-as-promised@npm:^7.1.2": + version: 7.1.8 + resolution: "@types/chai-as-promised@npm:7.1.8" + dependencies: + "@types/chai": "npm:*" + checksum: 10/88e2d42f14d1de19ba1c7b5c35f263fef37d3ad241c71f5eb59b10763706f3902f4131b93854c9c6ed520081c7e36be555849f202418357f905bea71178b7d02 + languageName: node + linkType: hard + +"@types/chai@npm:*, @types/chai@npm:^4.2.11": + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: 10/f84a9049a7f13284f7237236872ed4afce5045dd6ea3926c8b0ac995490f5a524b247b2e70fcd3ebc85832201349a8f026bd0c336b90b5baca9eed0c7a4dbd3f + languageName: node + linkType: hard + +"@types/long@npm:^4.0.1": + version: 4.0.2 + resolution: "@types/long@npm:4.0.2" + checksum: 10/68afa05fb20949d88345876148a76f6ccff5433310e720db51ac5ca21cb8cc6714286dbe04713840ddbd25a8b56b7a23aa87d08472fabf06463a6f2ed4967707 + languageName: node + linkType: hard + +"@types/mocha@npm:^7.0.2": + version: 7.0.2 + resolution: "@types/mocha@npm:7.0.2" + checksum: 10/8d9cfcd2fcaf0dcd4840c2f54e737e88b3999c334b363b0ed184db40e765da20befa8281211b351d213781231a2372bfb4ca043e9ee8188885bf7be83c2928fd + languageName: node + linkType: hard + +"@types/node@npm:18.11.9, @types/node@npm:>=13.7.0": + version: 18.11.9 + resolution: "@types/node@npm:18.11.9" + checksum: 10/d87a947519d8c1569b812a95cd18383f7a1500204c18454b69ba817f4aef2a563bb925432debcab25a3db1ba116c8ddb1ef79d8fded054fb3866424847325bae + languageName: node + linkType: hard + +"@types/node@npm:^16.11.1": + version: 16.18.97 + resolution: "@types/node@npm:16.18.97" + checksum: 10/c7ffc135852b658ab6737f818492cab4f43a1c092ad4b032dd591c0ab2f66781191df4ddd08ba91436d7ee64c259987f94da8fa97e3b7d8d0fd5dae6f2775c26 + languageName: node + linkType: hard + +"@types/sinon-chai@npm:^3.2.3": + version: 3.2.12 + resolution: "@types/sinon-chai@npm:3.2.12" + dependencies: + "@types/chai": "npm:*" + "@types/sinon": "npm:*" + checksum: 10/d906f2f766613534c5e9fe1437ec740fb6a9a550f02d1a0abe180c5f18fe73a99f0c12935195404d42f079f5f72a371e16b81e2aef963a6ef0ee0ed9d5d7f391 + languageName: node + linkType: hard + +"@types/sinon@npm:*, @types/sinon@npm:^7.5.2": + version: 7.5.2 + resolution: "@types/sinon@npm:7.5.2" + checksum: 10/66163c371dd84f1c485ae4c60401e4cfdb376974c85d91123dcc8c38334ecc4909c4ae9ffc5008bf0f5212593c7d91f70f460963c01510d2dfe93a689fc8e9ea + languageName: node + linkType: hard + +"@types/triple-beam@npm:^1.3.2": + version: 1.3.5 + resolution: "@types/triple-beam@npm:1.3.5" + checksum: 10/519b6a1b30d4571965c9706ad5400a200b94e4050feca3e7856e3ea7ac00ec9903e32e9a10e2762d0f7e472d5d03e5f4b29c16c0bd8c1f77c8876c683b2231f1 + languageName: node + linkType: hard + +"@ungap/promise-all-settled@npm:1.1.2": + version: 1.1.2 + resolution: "@ungap/promise-all-settled@npm:1.1.2" + checksum: 10/ee8fe811becd830f5e276ec63469ec66c22503eb140064580e712c9fccadfd54157c462188640ba6765d5c21f829e7120eb37afb5ead512684b9a1ab86d2db66 + languageName: node + linkType: hard + +"abbrev@npm:^2.0.0": + version: 2.0.0 + resolution: "abbrev@npm:2.0.0" + checksum: 10/ca0a54e35bea4ece0ecb68a47b312e1a9a6f772408d5bcb9051230aaa94b0460671c5b5c9cb3240eb5b7bc94c52476550eb221f65a0bbd0145bdc9f3113a6707 + languageName: node + linkType: hard + +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" + dependencies: + debug: "npm:^4.3.4" + checksum: 10/c478fec8f79953f118704d007a38f2a185458853f5c45579b9669372bd0e12602e88dc2ad0233077831504f7cd6fcc8251c383375bba5eaaf563b102938bda26 + languageName: node + linkType: hard + +"aggregate-error@npm:^3.0.0": + version: 3.1.0 + resolution: "aggregate-error@npm:3.1.0" + dependencies: + clean-stack: "npm:^2.0.0" + indent-string: "npm:^4.0.0" + checksum: 10/1101a33f21baa27a2fa8e04b698271e64616b886795fd43c31068c07533c7b3facfcaf4e9e0cab3624bd88f729a592f1c901a1a229c9e490eafce411a8644b79 + languageName: node + linkType: hard + +"ajv@npm:^6.12.2": + version: 6.12.6 + resolution: "ajv@npm:6.12.6" + dependencies: + fast-deep-equal: "npm:^3.1.1" + fast-json-stable-stringify: "npm:^2.0.0" + json-schema-traverse: "npm:^0.4.1" + uri-js: "npm:^4.2.2" + checksum: 10/48d6ad21138d12eb4d16d878d630079a2bda25a04e745c07846a4ad768319533031e28872a9b3c5790fa1ec41aabdf2abed30a56e5a03ebc2cf92184b8ee306c + languageName: node + linkType: hard + +"ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 10/e862fddd0a9ca88f1e7c9312ea70674cec3af360c994762309f6323730525e92c77d2715ee5f08aa8f438b7ca18efe378af647f501fc92b15b8e4b3b52d09db4 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10/2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.0.1 + resolution: "ansi-regex@npm:6.0.1" + checksum: 10/1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169 + languageName: node + linkType: hard + +"ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.0" + checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10/b4494dfbfc7e4591b4711a396bd27e540f8153914123dccb4cdbbcb514015ada63a3809f362b9d8d4f6b17a706f1d7bea3c6f974b15fa5ae76b5b502070889ff + languageName: node + linkType: hard + +"ansi-styles@npm:^6.1.0": + version: 6.2.1 + resolution: "ansi-styles@npm:6.2.1" + checksum: 10/70fdf883b704d17a5dfc9cde206e698c16bcd74e7f196ab821511651aee4f9f76c9514bdfa6ca3a27b5e49138b89cb222a28caf3afe4567570139577f991df32 + languageName: node + linkType: hard + +"anymatch@npm:~3.1.2": + version: 3.1.3 + resolution: "anymatch@npm:3.1.3" + dependencies: + normalize-path: "npm:^3.0.0" + picomatch: "npm:^2.0.4" + checksum: 10/3e044fd6d1d26545f235a9fe4d7a534e2029d8e59fa7fd9f2a6eb21230f6b5380ea1eaf55136e60cbf8e613544b3b766e7a6fa2102e2a3a117505466e3025dc2 + languageName: node + linkType: hard + +"append-transform@npm:^2.0.0": + version: 2.0.0 + resolution: "append-transform@npm:2.0.0" + dependencies: + default-require-extensions: "npm:^3.0.0" + checksum: 10/f26f393bf7a428fd1bb18f2758a819830a582243310c5170edb3f98fdc5a535333d02b952f7c2d9b14522bd8ead5b132a0b15000eca18fa9f49172963ebbc231 + languageName: node + linkType: hard + +"archy@npm:^1.0.0": + version: 1.0.0 + resolution: "archy@npm:1.0.0" + checksum: 10/d7928049a57988b86df3f4de75ca16a4252ccee591d085c627e649fc54c5ae5daa833f17aa656bd825bd00bc0a2756ae03d2b983050bdbda1046b6d832bf7303 + languageName: node + linkType: hard + +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 10/969b491082f20cad166649fa4d2073ea9e974a4e5ac36247ca23d2e5a8b3cb12d60e9ff70a8acfe26d76566c71fd351ee5e6a9a6595157eb36f92b1fd64e1599 + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10/c6a621343a553ff3779390bb5ee9c2263d6643ebcd7843227bdde6cc7adbed796eb5540ca98db19e3fd7b4714e1faa51551f8849b268bb62df27ddb15cbcd91e + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10/18640244e641a417ec75a9bd38b0b2b6b95af5199aa241b131d4b2fb206f334d7ecc600bd194861610a5579084978bfcbb02baa399dbe442d56d0ae5e60dbaef + languageName: node + linkType: hard + +"assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: 10/fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + +"async@npm:^3.2.3": + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 10/323c3615c3f0ab1ac25a6f953296bc0ac3213d5e0f1c0debdb12964e55963af288d570293c11e44f7967af58c06d2a88d0ea588c86ec0fbf62fa98037f604a0f + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10/9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: "npm:^1.0.0" + concat-map: "npm:0.0.1" + checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.1 + resolution: "brace-expansion@npm:2.0.1" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1 + languageName: node + linkType: hard + +"braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10/fad11a0d4697a27162840b02b1fad249c1683cbc510cd5bf1a471f2f8085c046d41094308c577a50a03a579dd99d5a6b3724c4b5e8b14df2c4443844cfcda2c6 + languageName: node + linkType: hard + +"browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: 10/ac70a84e346bb7afc5045ec6f22f6a681b15a4057447d4cc1c48a25c6dedb302a49a46dd4ddfb5cdd9c96e0c905a8539be1b98ae7bc440512152967009ec7015 + languageName: node + linkType: hard + +"browserslist@npm:^4.22.2": + version: 4.23.0 + resolution: "browserslist@npm:4.23.0" + dependencies: + caniuse-lite: "npm:^1.0.30001587" + electron-to-chromium: "npm:^1.4.668" + node-releases: "npm:^2.0.14" + update-browserslist-db: "npm:^1.0.13" + bin: + browserslist: cli.js + checksum: 10/496c3862df74565dd942b4ae65f502c575cbeba1fa4a3894dad7aa3b16130dc3033bc502d8848147f7b625154a284708253d9598bcdbef5a1e34cf11dc7bad8e + languageName: node + linkType: hard + +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 10/0448524a562b37d4d7ed9efd91685a5b77a50672c556ea254ac9a6d30e3403a517d8981f10e565db24e8339413b43c97ca2951f10e399c6125a0d8911f5679bb + languageName: node + linkType: hard + +"builtin-modules@npm:^1.1.1": + version: 1.1.1 + resolution: "builtin-modules@npm:1.1.1" + checksum: 10/0fbf69ffe77fecf11c441b9a7d1e664bb8119a7d3004831d9bd6ce0eacfd5d121ed4b667172870b5f66ecfce4bd54f7c20060d21c339c29049a7a5dd2bb7bf8c + languageName: node + linkType: hard + +"cacache@npm:^18.0.0": + version: 18.0.3 + resolution: "cacache@npm:18.0.3" + dependencies: + "@npmcli/fs": "npm:^3.1.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^10.2.2" + lru-cache: "npm:^10.0.1" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^4.0.0" + ssri: "npm:^10.0.0" + tar: "npm:^6.1.11" + unique-filename: "npm:^3.0.0" + checksum: 10/d4c161f071524bb636334b8cf94780c014e29c180a886b8184da8f2f44d2aca88d5664797c661e9f74bdbd34697c2f231ed7c24c256cecbb0a0563ad1ada2219 + languageName: node + linkType: hard + +"caching-transform@npm:^4.0.0": + version: 4.0.0 + resolution: "caching-transform@npm:4.0.0" + dependencies: + hasha: "npm:^5.0.0" + make-dir: "npm:^3.0.0" + package-hash: "npm:^4.0.0" + write-file-atomic: "npm:^3.0.0" + checksum: 10/7e7ca628511ab18c86eea1231834d2591de29a13ae771a7d9ab85be8c6e53e45c5a5b0d0d95d4a3274fc4f26c16956a98162e40c191c131204b5d5aa949660b5 + languageName: node + linkType: hard + +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10/e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + +"camelcase@npm:^6.0.0": + version: 6.3.0 + resolution: "camelcase@npm:6.3.0" + checksum: 10/8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d + languageName: node + linkType: hard + +"caniuse-lite@npm:^1.0.30001587": + version: 1.0.30001621 + resolution: "caniuse-lite@npm:1.0.30001621" + checksum: 10/238187b8565edd98b041829a4157ff23406e8b573a8f5a7f7d75fd6bd46c508e4d1a07eb4a0086cfa1bce2f45fcd3b08ea7ffc36584ef2b1d38f8215b7301853 + languageName: node + linkType: hard + +"chai-as-promised@npm:^7.1.1": + version: 7.1.2 + resolution: "chai-as-promised@npm:7.1.2" + dependencies: + check-error: "npm:^1.0.2" + peerDependencies: + chai: ">= 2.1.2 < 6" + checksum: 10/be372540dad92ef85cde3954bc0e9b0b33e4e6454f3740b17bfb16e36eda638911619089c05a4e4f2bf6722563bf893bb78c2af59b318c23abb2199e5c20ca1f + languageName: node + linkType: hard + +"chai@npm:^4.2.0": + version: 4.4.1 + resolution: "chai@npm:4.4.1" + dependencies: + assertion-error: "npm:^1.1.0" + check-error: "npm:^1.0.3" + deep-eql: "npm:^4.1.3" + get-func-name: "npm:^2.0.2" + loupe: "npm:^2.3.6" + pathval: "npm:^1.1.1" + type-detect: "npm:^4.0.8" + checksum: 10/c6d7aba913a67529c68dbec3673f94eb9c586c5474cc5142bd0b587c9c9ec9e5fbaa937e038ecaa6475aea31433752d5fabdd033b9248bde6ae53befcde774ae + languageName: node + linkType: hard + +"chalk@npm:^2.3.0, chalk@npm:^2.4.2": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: "npm:^3.2.1" + escape-string-regexp: "npm:^1.0.5" + supports-color: "npm:^5.3.0" + checksum: 10/3d1d103433166f6bfe82ac75724951b33769675252d8417317363ef9d54699b7c3b2d46671b772b893a8e50c3ece70c4b933c73c01e81bc60ea4df9b55afa303 + languageName: node + linkType: hard + +"chalk@npm:^4.1.0": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10/cb3f3e594913d63b1814d7ca7c9bafbf895f75fbf93b92991980610dfd7b48500af4e3a5d4e3a8f337990a96b168d7eb84ee55efdce965e2ee8efc20f8c8f139 + languageName: node + linkType: hard + +"check-error@npm:^1.0.2, check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: "npm:^2.0.2" + checksum: 10/e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + +"chokidar@npm:3.5.3": + version: 3.5.3 + resolution: "chokidar@npm:3.5.3" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10/863e3ff78ee7a4a24513d2a416856e84c8e4f5e60efbe03e8ab791af1a183f569b62fc6f6b8044e2804966cb81277ddbbc1dc374fba3265bd609ea8efd62f5b3 + languageName: node + linkType: hard + +"chownr@npm:^2.0.0": + version: 2.0.0 + resolution: "chownr@npm:2.0.0" + checksum: 10/c57cf9dd0791e2f18a5ee9c1a299ae6e801ff58fee96dc8bfd0dcb4738a6ce58dd252a3605b1c93c6418fe4f9d5093b28ffbf4d66648cb2a9c67eaef9679be2f + languageName: node + linkType: hard + +"class-transformer@npm:^0.4.0": + version: 0.4.0 + resolution: "class-transformer@npm:0.4.0" + checksum: 10/4751bbcf0ec8a754053eca1cce2e6d883a8fc7d400fac32368b18f05353e22e8415f7223a53daa35705e6d690516f221ec1c46e68c7ad731e31c4f8e46101fb8 + languageName: node + linkType: hard + +"clean-stack@npm:^2.0.0": + version: 2.2.0 + resolution: "clean-stack@npm:2.2.0" + checksum: 10/2ac8cd2b2f5ec986a3c743935ec85b07bc174d5421a5efc8017e1f146a1cf5f781ae962618f416352103b32c9cd7e203276e8c28241bbe946160cab16149fb68 + languageName: node + linkType: hard + +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^6.2.0" + checksum: 10/44afbcc29df0899e87595590792a871cd8c4bc7d6ce92832d9ae268d141a77022adafca1aeaeccff618b62a613b8354e57fe22a275c199ec04baf00d381ef6ab + languageName: node + linkType: hard + +"cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.0" + wrap-ansi: "npm:^7.0.0" + checksum: 10/db858c49af9d59a32d603987e6fddaca2ce716cd4602ba5a2bb3a5af1351eebe82aba8dff3ef3e1b331f7fa9d40ca66e67bdf8e7c327ce0ea959747ead65c0ef + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10/eaa5561aeb3135c2cddf7a3b3f562fc4238ff3b3fc666869ef2adf264be0f372136702f16add9299087fb1907c2e4ec5dbfe83bd24bce815c70a80c6c1a2e950 + languageName: node + linkType: hard + +"color-convert@npm:^1.9.0, color-convert@npm:^1.9.3": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: "npm:1.1.3" + checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10/fa00c91b4332b294de06b443923246bccebe9fab1b253f7fe1772d37b06a2269b4039a85e309abe1fe11b267b11c08d1d0473fda3badd6167f57313af2887a64 + languageName: node + linkType: hard + +"color-name@npm:1.1.3, color-name@npm:^1.0.0": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"color-string@npm:^1.6.0": + version: 1.9.1 + resolution: "color-string@npm:1.9.1" + dependencies: + color-name: "npm:^1.0.0" + simple-swizzle: "npm:^0.2.2" + checksum: 10/72aa0b81ee71b3f4fb1ac9cd839cdbd7a011a7d318ef58e6cb13b3708dca75c7e45029697260488709f1b1c7ac4e35489a87e528156c1e365917d1c4ccb9b9cd + languageName: node + linkType: hard + +"color@npm:^3.1.3": + version: 3.2.1 + resolution: "color@npm:3.2.1" + dependencies: + color-convert: "npm:^1.9.3" + color-string: "npm:^1.6.0" + checksum: 10/bf70438e0192f4f62f4bfbb303e7231289e8cc0d15ff6b6cbdb722d51f680049f38d4fdfc057a99cb641895cf5e350478c61d98586400b060043afc44285e7ae + languageName: node + linkType: hard + +"colorspace@npm:1.1.x": + version: 1.1.4 + resolution: "colorspace@npm:1.1.4" + dependencies: + color: "npm:^3.1.3" + text-hex: "npm:1.0.x" + checksum: 10/bb3934ef3c417e961e6d03d7ca60ea6e175947029bfadfcdb65109b01881a1c0ecf9c2b0b59abcd0ee4a0d7c1eae93beed01b0e65848936472270a0b341ebce8 + languageName: node + linkType: hard + +"commander@npm:^2.12.1": + version: 2.15.1 + resolution: "commander@npm:2.15.1" + checksum: 10/6f4545833348d61dd0c3b285c7f0dc9bc8b1bdac38b512d263184918811382c646c38d58c1102caeff0eb57d4bbd526efc5e6116a78b6af7c1aad6fb628678a8 + languageName: node + linkType: hard + +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 10/4620bc4936a4ef12ce7dfcd272bb23a99f2ad68889a4e4ad766c9f8ad21af982511934d6f7050d4a8bde90011b1c15d56e61a1b4576d9913efbf697a20172d6c + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 10/9680699c8e2b3af0ae22592cb764acaf973f292a7b71b8a06720233011853a58e256c89216a10cbe889727532fd77f8bcd49a760cedfde271b8e006c20e079f2 + languageName: node + linkType: hard + +"convert-source-map@npm:^1.7.0": + version: 1.9.0 + resolution: "convert-source-map@npm:1.9.0" + checksum: 10/dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 + languageName: node + linkType: hard + +"convert-source-map@npm:^2.0.0": + version: 2.0.0 + resolution: "convert-source-map@npm:2.0.0" + checksum: 10/c987be3ec061348cdb3c2bfb924bec86dea1eacad10550a85ca23edb0fe3556c3a61c7399114f3331ccb3499d7fd0285ab24566e5745929412983494c3926e15 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": + version: 7.0.3 + resolution: "cross-spawn@npm:7.0.3" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10/e1a13869d2f57d974de0d9ef7acbf69dc6937db20b918525a01dacb5032129bd552d290d886d981e99f1b624cb03657084cc87bd40f115c07ecf376821c729ce + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.3.4": + version: 4.3.5 + resolution: "debug@npm:4.3.5" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/cb6eab424c410e07813ca1392888589972ce9a32b8829c6508f5e1f25f3c3e70a76731610ae55b4bbe58d1a2fffa1424b30e97fa8d394e49cd2656a9643aedd2 + languageName: node + linkType: hard + +"debug@npm:4.3.3": + version: 4.3.3 + resolution: "debug@npm:4.3.3" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/723a9570dcd15d146ea4992f0dca12467d1b00f534abb42473df166d36826fcae8bab045aef59ac2f407b47a23266110bc0e646df8ac82f7800c11384f82050e + languageName: node + linkType: hard + +"debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: "npm:2.1.2" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10/0073c3bcbd9cb7d71dd5f6b55be8701af42df3e56e911186dfa46fac3a5b9eb7ce7f377dd1d3be6db8977221f8eb333d945216f645cf56f6b688cd484837d255 + languageName: node + linkType: hard + +"decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + +"decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: 10/b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + +"deep-eql@npm:^4.1.3": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" + dependencies: + type-detect: "npm:^4.0.0" + checksum: 10/12ce93ae63de187e77b076d3d51bfc28b11f98910a22c18714cce112791195e86a94f97788180994614b14562a86c9763f67c69f785e4586f806b5df39bf9301 + languageName: node + linkType: hard + +"default-require-extensions@npm:^3.0.0": + version: 3.0.1 + resolution: "default-require-extensions@npm:3.0.1" + dependencies: + strip-bom: "npm:^4.0.0" + checksum: 10/45882fc971dd157faf6716ced04c15cf252c0a2d6f5c5844b66ca49f46ed03396a26cd940771aa569927aee22923a961bab789e74b25aabc94d90742c9dd1217 + languageName: node + linkType: hard + +"diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: 10/4a179a75b17cbb420eb9145be913f9ddb34b47cb2ba4301e80ae745122826a468f02ca8f5e56945958de26ace594899c8381acb6659c88e7803ef078b53d690c + languageName: node + linkType: hard + +"diff@npm:^4.0.1, diff@npm:^4.0.2": + version: 4.0.2 + resolution: "diff@npm:4.0.2" + checksum: 10/ec09ec2101934ca5966355a229d77afcad5911c92e2a77413efda5455636c4cf2ce84057e2d7715227a2eeeda04255b849bd3ae3a4dd22eb22e86e76456df069 + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10/9b1d3e1baefeaf7d70799db8774149cef33b97183a6addceeba0cf6b85ba23ee2686f302f14482006df32df75d32b17c509c143a3689627929e4a8efaf483952 + languageName: node + linkType: hard + +"electron-to-chromium@npm:^1.4.668": + version: 1.4.782 + resolution: "electron-to-chromium@npm:1.4.782" + checksum: 10/d5550876e4ee04df75e3bf6e0809de2b8d6129dd1ef3a8508020c0620bc814c496b5852b3a99cfe1bb79662c8dd5182ae18844af089414e6e92790d5deeea864 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10/c72d67a6821be15ec11997877c437491c313d924306b8da5d87d2a2bcc2cec9903cb5b04ee1a088460501d8e5b44f10df82fdc93c444101a7610b80c8b6938e1 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10/915acf859cea7131dac1b2b5c9c8e35c4849e325a1d114c30adb8cd615970f6dca0e27f64f3a4949d7d6ed86ecd79a1c5c63f02e697513cddd7b5835c90948b8 + languageName: node + linkType: hard + +"enabled@npm:2.0.x": + version: 2.0.0 + resolution: "enabled@npm:2.0.0" + checksum: 10/9d256d89f4e8a46ff988c6a79b22fa814b4ffd82826c4fdacd9b42e9b9465709d3b748866d0ab4d442dfc6002d81de7f7b384146ccd1681f6a7f868d2acca063 + languageName: node + linkType: hard + +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10/bb98632f8ffa823996e508ce6a58ffcf5856330fde839ae42c9e1f436cc3b5cc651d4aeae72222916545428e54fd0f6aa8862fd8d25bdbcc4589f1e3f3715e7f + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10/65b5df55a8bab92229ab2b40dad3b387fad24613263d103a97f91c9fe43ceb21965cd3392b1ccb5d77088021e525c4e0481adb309625d0cb94ade1d1fb8dc17e + languageName: node + linkType: hard + +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10/1d20d825cdcce8d811bfbe86340f4755c02655a7feb2f13f8c880566d9d72a3f6c92c192a6867632e490d6da67b678271f46e01044996a6443e870331100dfdd + languageName: node + linkType: hard + +"es6-error@npm:^4.0.1": + version: 4.1.1 + resolution: "es6-error@npm:4.1.1" + checksum: 10/48483c25701dc5a6376f39bbe2eaf5da0b505607ec5a98cd3ade472c1939242156660636e2e508b33211e48e88b132d245341595c067bd4a95ac79fa7134da06 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1, escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3 + languageName: node + linkType: hard + +"escape-string-regexp@npm:4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10/98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10/f1d3c622ad992421362294f7acf866aa9409fbad4eb2e8fa230bd33944ce371d32279667b242d8b8907ec2b6ad7353a717f3c0e60e748873a34a7905174bc0eb + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.1 + resolution: "exponential-backoff@npm:3.1.1" + checksum: 10/2d9bbb6473de7051f96790d5f9a678f32e60ed0aa70741dc7fdc96fec8d631124ec3374ac144387604f05afff9500f31a1d45bd9eee4cdc2e4f9ad2d9b9d5dbd + languageName: node + linkType: hard + +"fabric-contract-api@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-contract-api@npm:2.4.1" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.4.1" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.3.3" + checksum: 10/3708814be206f3130e0264bc591a67a2ed631b9979af3e7589ca7b8e61c8f098a6fae0acb931f5211c8346a728e0f8d112671a20fd9ecdafbe48695b082e1226 + languageName: node + linkType: hard + +"fabric-contract-api@npm:^2.4.1": + version: 2.5.4 + resolution: "fabric-contract-api@npm:2.5.4" + dependencies: + class-transformer: "npm:^0.4.0" + fabric-shim-api: "npm:2.5.4" + fast-safe-stringify: "npm:^2.1.1" + get-params: "npm:^0.1.2" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.7.2" + checksum: 10/09001db44761f9afa50ba8af7f0740fd7a33bce0a6e4ee597767169f2b187f13a13d2a1713400f42e3eaf53c999fd0ae0d07619faf6da8344efbe6a6e9ffc4bb + languageName: node + linkType: hard + +"fabric-shim-api@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-shim-api@npm:2.4.1" + checksum: 10/fa344ba5d45faafaccff05be21fb822ba39e3fd93fdaaafe8790d579e136f17795f6438a7fb399e2b40126f8d45cfd2596bdebe606743e6920851958ed6f856b + languageName: node + linkType: hard + +"fabric-shim-api@npm:2.5.4": + version: 2.5.4 + resolution: "fabric-shim-api@npm:2.5.4" + checksum: 10/aee691043d245a99dd8c8dd44ca7e29feb2de60e44bcc572050bfefa17a8e64d978c8264308d4ce079e5f1ec3779e58d962af9adc52bdeb0b579fe857b4bacad + languageName: node + linkType: hard + +"fabric-shim@npm:2.4.1": + version: 2.4.1 + resolution: "fabric-shim@npm:2.4.1" + dependencies: + "@fidm/x509": "npm:^1.2.1" + "@grpc/grpc-js": "npm:^1.4.1" + "@grpc/proto-loader": "npm:^0.6.6" + "@types/node": "npm:^16.11.1" + ajv: "npm:^6.12.2" + fabric-contract-api: "npm:2.4.1" + fabric-shim-api: "npm:2.4.1" + fs-extra: "npm:^10.0.0" + reflect-metadata: "npm:^0.1.13" + winston: "npm:^3.3.3" + yargs: "npm:^17.2.1" + yargs-parser: "npm:^20.2.9" + bin: + fabric-chaincode-node: cli.js + checksum: 10/5684f966fdfff43d5f9d45598445be5232f015a702b1cadfc6d82d701d524db8cfffc174376aca13cc15fe9377b0942422fa7d299fd6c4fc9af8e8017a88276f + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.1": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10/e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d + languageName: node + linkType: hard + +"fast-json-stable-stringify@npm:^2.0.0": + version: 2.1.0 + resolution: "fast-json-stable-stringify@npm:2.1.0" + checksum: 10/2c20055c1fa43c922428f16ca8bb29f2807de63e5c851f665f7ac9790176c01c3b40335257736b299764a8d383388dabc73c8083b8e1bc3d99f0a941444ec60e + languageName: node + linkType: hard + +"fast-safe-stringify@npm:^2.1.1": + version: 2.1.1 + resolution: "fast-safe-stringify@npm:2.1.1" + checksum: 10/dc1f063c2c6ac9533aee14d406441f86783a8984b2ca09b19c2fe281f9ff59d315298bc7bc22fd1f83d26fe19ef2f20e2ddb68e96b15040292e555c5ced0c1e4 + languageName: node + linkType: hard + +"fecha@npm:^4.2.0": + version: 4.2.3 + resolution: "fecha@npm:4.2.3" + checksum: 10/534ce630c8f63c116292145607fc18c0f06bfa2fd74094357bf65daacc5d3f4f2b285bf8eb112c3bbf98c5caa6d386cced797f44b9b1b33da0c0a81020444826 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10/a7095cb39e5bc32fada2aa7c7249d3f6b01bd1ce461a61b0adabacccabd9198500c6fb1f68a7c851a657e273fce2233ba869638897f3d7ed2e87a2d89b4436ea + languageName: node + linkType: hard + +"find-cache-dir@npm:^3.2.0": + version: 3.3.2 + resolution: "find-cache-dir@npm:3.3.2" + dependencies: + commondir: "npm:^1.0.1" + make-dir: "npm:^3.0.2" + pkg-dir: "npm:^4.1.0" + checksum: 10/3907c2e0b15132704ed67083686cd3e68ab7d9ecc22e50ae9da20678245d488b01fa22c0e34c0544dc6edc4354c766f016c8c186a787be7c17f7cde8c5281e85 + languageName: node + linkType: hard + +"find-up@npm:5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: "npm:^6.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"find-up@npm:^4.0.0, find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: "npm:^5.0.0" + path-exists: "npm:^4.0.0" + checksum: 10/4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + +"flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 10/72479e651c15eab53e25ce04c31bab18cfaac0556505cac19221dbbe85bbb9686bc76e4d397e89e5bf516ce667dcf818f8b07e585568edba55abc2bf1f698fb5 + languageName: node + linkType: hard + +"fn.name@npm:1.x.x": + version: 1.1.0 + resolution: "fn.name@npm:1.1.0" + checksum: 10/000198af190ae02f0138ac5fa4310da733224c628e0230c81e3fff7c4e094af7e0e8bb9f4357cabd21db601759d89f3445da744afbae20623cfa41edf3888397 + languageName: node + linkType: hard + +"foreground-child@npm:^2.0.0": + version: 2.0.0 + resolution: "foreground-child@npm:2.0.0" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^3.0.2" + checksum: 10/f36574ad8e19d69ce06fceac7d86161b863968e4ba292c14b7b40e5c464e3e9bcd7711250d33427d95cc2bb0d48cf101df9687433dbbc7fd3c7e4f595be8305e + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" + dependencies: + cross-spawn: "npm:^7.0.0" + signal-exit: "npm:^4.0.1" + checksum: 10/77b33b3c438a499201727ca84de39a66350ccd54a8805df712773e963cefb5c4632dbc4386109e97a0df8fb1585aee95fa35acb07587e3e04cfacabfc0ae15dc + languageName: node + linkType: hard + +"fromentries@npm:^1.2.0": + version: 1.3.2 + resolution: "fromentries@npm:1.3.2" + checksum: 10/10d6e07d289db102c0c1eaf5c3e3fa55ddd6b50033d7de16d99a7cd89f1e1a302dfadb26457031f9bb5d2ed95a179aaf0396092dde5abcae06e8a2f0476826be + languageName: node + linkType: hard + +"fs-extra@npm:^10.0.0": + version: 10.1.0 + resolution: "fs-extra@npm:10.1.0" + dependencies: + graceful-fs: "npm:^4.2.0" + jsonfile: "npm:^6.0.1" + universalify: "npm:^2.0.0" + checksum: 10/05ce2c3b59049bcb7b52001acd000e44b3c4af4ec1f8839f383ef41ec0048e3cfa7fd8a637b1bddfefad319145db89be91f4b7c1db2908205d38bf91e7d1d3b7 + languageName: node + linkType: hard + +"fs-minipass@npm:^2.0.0": + version: 2.1.0 + resolution: "fs-minipass@npm:2.1.0" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/03191781e94bc9a54bd376d3146f90fe8e082627c502185dbf7b9b3032f66b0b142c1115f3b2cc5936575fc1b44845ce903dd4c21bec2a8d69f3bd56f9cee9ec + languageName: node + linkType: hard + +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/af143246cf6884fe26fa281621d45cfe111d34b30535a475bfa38dafe343dadb466c047a924ffc7d6b7b18265df4110224ce3803806dbb07173bf2087b648d7f + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 10/e703107c28e362d8d7b910bbcbfd371e640a3bb45ae157a362b5952c0030c0b6d4981140ec319b347bce7adc025dd7813da1ff908a945ac214d64f5402a51b96 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10/4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + +"function-bind@npm:^1.1.2": + version: 1.1.2 + resolution: "function-bind@npm:1.1.2" + checksum: 10/185e20d20f10c8d661d59aac0f3b63b31132d492e1b11fcc2a93cb2c47257ebaee7407c38513efd2b35cafdf972d9beb2ea4593c1e0f3bf8f2744836928d7454 + languageName: node + linkType: hard + +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: 10/17d8333460204fbf1f9160d067e1e77f908a5447febb49424b8ab043026049835c9ef3974445c57dbd39161f4d2b04356d7de12b2eecaa27a7a7ea7d871cbedd + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10/b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 10/3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + +"get-package-type@npm:^0.1.0": + version: 0.1.0 + resolution: "get-package-type@npm:0.1.0" + checksum: 10/bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 + languageName: node + linkType: hard + +"get-params@npm:^0.1.2": + version: 0.1.2 + resolution: "get-params@npm:0.1.2" + checksum: 10/7768710dd5e68805b51981a6fbb0a689728d280357f5dd1a080fd7e732d9b4ccf7fc5e0fc792ff482022d8af37242ff5e72b2b50dbafccb21db4f77eb9c646c4 + languageName: node + linkType: hard + +"glob-parent@npm:~5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10/32cd106ce8c0d83731966d31517adb766d02c3812de49c30cfe0675c7c0ae6630c11214c54a5ae67aca882cf738d27fd7768f21aa19118b9245950554be07247 + languageName: node + linkType: hard + +"glob@npm:7.2.0, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.0.4" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/bc78b6ea0735b6e23d20678aba4ae6a4760e8c9527e3c4683ac25b14e70f55f9531245dcf25959b70cbc4aa3dcce1fc37ab65fd026a4cbd70aa3a44880bd396b + languageName: node + linkType: hard + +"glob@npm:^10.2.2, glob@npm:^10.3.10": + version: 10.4.2 + resolution: "glob@npm:10.4.2" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10/e412776b5952a818eba790c830bea161c9a56813fd767d8c4c49f855603b1fb962b3e73f1f627a47298a57d2992b9f0f2fe15cf93e74ecaaa63fb45d63fdd090 + languageName: node + linkType: hard + +"glob@npm:^7.1.6": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: "npm:^1.0.0" + inflight: "npm:^1.0.4" + inherits: "npm:2" + minimatch: "npm:^3.1.1" + once: "npm:^1.3.0" + path-is-absolute: "npm:^1.0.0" + checksum: 10/59452a9202c81d4508a43b8af7082ca5c76452b9fcc4a9ab17655822e6ce9b21d4f8fbadabe4fe3faef448294cec249af305e2cd824b7e9aaf689240e5e96a7b + languageName: node + linkType: hard + +"globals@npm:^11.1.0": + version: 11.12.0 + resolution: "globals@npm:11.12.0" + checksum: 10/9f054fa38ff8de8fa356502eb9d2dae0c928217b8b5c8de1f09f5c9b6c8a96d8b9bd3afc49acbcd384a98a81fea713c859e1b09e214c60509517bb8fc2bc13c2 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2 + languageName: node + linkType: hard + +"growl@npm:1.10.5": + version: 1.10.5 + resolution: "growl@npm:1.10.5" + checksum: 10/1391a9add951964de566adc0aee8b0e2b2321e768c1fdccb7a8e156d6a6cd7ea72782883ba8c2c307baf524e3059519423b72e585eba5e7a5f6e83a1e2359b0d + languageName: node + linkType: hard + +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + +"has-flag@npm:^4.0.0": + version: 4.0.0 + resolution: "has-flag@npm:4.0.0" + checksum: 10/261a1357037ead75e338156b1f9452c016a37dcd3283a972a30d9e4a87441ba372c8b81f818cd0fbcd9c0354b4ae7e18b9e1afa1971164aef6d18c2b6095a8ad + languageName: node + linkType: hard + +"hasha@npm:^5.0.0": + version: 5.2.2 + resolution: "hasha@npm:5.2.2" + dependencies: + is-stream: "npm:^2.0.0" + type-fest: "npm:^0.8.0" + checksum: 10/06cc474bed246761ff61c19d629977eb5f53fa817be4313a255a64ae0f433e831a29e83acb6555e3f4592b348497596f1d1653751008dda4f21c9c21ca60ac5a + languageName: node + linkType: hard + +"hasown@npm:^2.0.0": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" + dependencies: + function-bind: "npm:^1.1.2" + checksum: 10/7898a9c1788b2862cf0f9c345a6bec77ba4a0c0983c7f19d610c382343d4f98fa260686b225dfb1f88393a66679d2ec58ee310c1d6868c081eda7918f32cc70a + languageName: node + linkType: hard + +"he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 10/d09b2243da4e23f53336e8de3093e5c43d2c39f8d0d18817abfa32ce3e9355391b2edb4bb5edc376aea5d4b0b59d6a0482aab4c52bc02ef95751e4b818e847f1 + languageName: node + linkType: hard + +"html-escaper@npm:^2.0.0": + version: 2.0.2 + resolution: "html-escaper@npm:2.0.2" + checksum: 10/034d74029dcca544a34fb6135e98d427acd73019796ffc17383eaa3ec2fe1c0471dcbbc8f8ed39e46e86d43ccd753a160631615e4048285e313569609b66d5b7 + languageName: node + linkType: hard + +"http-cache-semantics@npm:^4.1.1": + version: 4.1.1 + resolution: "http-cache-semantics@npm:4.1.1" + checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10/d062acfa0cb82beeb558f1043c6ba770ea892b5fb7b28654dbc70ea2aeea55226dd34c02a294f6c1ca179a5aa483c4ea641846821b182edbd9cc5d89b54c6848 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1": + version: 7.0.4 + resolution: "https-proxy-agent@npm:7.0.4" + dependencies: + agent-base: "npm:^7.0.2" + debug: "npm:4" + checksum: 10/405fe582bba461bfe5c7e2f8d752b384036854488b828ae6df6a587c654299cbb2c50df38c4b6ab303502c3c5e029a793fbaac965d1e86ee0be03faceb554d63 + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.2": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10/24e3292dd3dadaa81d065c6f8c41b274a47098150d444b96e5f53b4638a9a71482921ea6a91a1f59bb71d9796de25e04afd05919fa64c360347ba65d3766f10f + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10/2d30b157a91fe1c1d7c6f653cbf263f039be6c5bfa959245a16d4ee191fc0f2af86c08545b6e6beeb041c56b574d2d5b9f95343d378ab49c0f37394d541e7fc8 + languageName: node + linkType: hard + +"indent-string@npm:^4.0.0": + version: 4.0.0 + resolution: "indent-string@npm:4.0.0" + checksum: 10/cd3f5cbc9ca2d624c6a1f53f12e6b341659aba0e2d3254ae2b4464aaea8b4294cdb09616abbc59458f980531f2429784ed6a420d48d245bcad0811980c9efae9 + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: "npm:^1.3.0" + wrappy: "npm:1" + checksum: 10/d2ebd65441a38c8336c223d1b80b921b9fa737e37ea466fd7e253cb000c64ae1f17fa59e68130ef5bda92cfd8d36b83d37dab0eb0a4558bcfec8e8cdfd2dcb67 + languageName: node + linkType: hard + +"inherits@npm:2, inherits@npm:^2.0.3": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 10/cd45e923bee15186c07fa4c89db0aace24824c482fb887b528304694b2aa6ff8a898da8657046a5dcf3e46cd6db6c61629551f9215f208d7c3f157cf9b290521 + languageName: node + linkType: hard + +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: "npm:1.1.0" + sprintf-js: "npm:^1.1.3" + checksum: 10/1ed81e06721af012306329b31f532b5e24e00cb537be18ddc905a84f19fe8f83a09a1699862bf3a1ec4b9dea93c55a3fa5faf8b5ea380431469df540f38b092c + languageName: node + linkType: hard + +"is-arrayish@npm:^0.3.1": + version: 0.3.2 + resolution: "is-arrayish@npm:0.3.2" + checksum: 10/81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade + languageName: node + linkType: hard + +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e + languageName: node + linkType: hard + +"is-core-module@npm:^2.13.0": + version: 2.13.1 + resolution: "is-core-module@npm:2.13.1" + dependencies: + hasown: "npm:^2.0.0" + checksum: 10/d53bd0cc24b0a0351fb4b206ee3908f71b9bbf1c47e9c9e14e5f06d292af1663704d2abd7e67700d6487b2b7864e0d0f6f10a1edf1892864bdffcb197d1845a2 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10/df033653d06d0eb567461e58a7a8c9f940bd8c22274b94bf7671ab36df5719791aae15eef6d83bbb5e23283967f2f984b8914559d4449efda578c775c4be6f85 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10/44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10/3ed74f2b0cdf4f401f38edb0442ddfde3092d79d7d35c9919c86641efdbcbb32e45aa3c0f70ce5eecc946896cd5a0f26e4188b9f2b881876f7cb6c505b82da11 + languageName: node + linkType: hard + +"is-lambda@npm:^1.0.1": + version: 1.0.1 + resolution: "is-lambda@npm:1.0.1" + checksum: 10/93a32f01940220532e5948538699ad610d5924ac86093fcee83022252b363eb0cc99ba53ab084a04e4fb62bf7b5731f55496257a4c38adf87af9c4d352c71c35 + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10/6a6c3383f68afa1e05b286af866017c78f1226d43ac8cb064e115ff9ed85eb33f5c4f7216c96a71e4dfea289ef52c5da3aef5bbfade8ffe47a0465d70c0c8e86 + languageName: node + linkType: hard + +"is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: 10/cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + +"is-stream@npm:^2.0.0": + version: 2.0.1 + resolution: "is-stream@npm:2.0.1" + checksum: 10/b8e05ccdf96ac330ea83c12450304d4a591f9958c11fd17bed240af8d5ffe08aedafa4c0f4cfccd4d28dc9d4d129daca1023633d5c11601a6cbc77521f6fae66 + languageName: node + linkType: hard + +"is-typedarray@npm:^1.0.0": + version: 1.0.0 + resolution: "is-typedarray@npm:1.0.0" + checksum: 10/4b433bfb0f9026f079f4eb3fbaa4ed2de17c9995c3a0b5c800bec40799b4b2a8b4e051b1ada77749deb9ded4ae52fe2096973f3a93ff83df1a5a7184a669478c + languageName: node + linkType: hard + +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 10/a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + +"is-windows@npm:^1.0.2": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 10/438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 + languageName: node + linkType: hard + +"isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 10/49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10/7c9f715c03aff08f35e98b1fadae1b9267b38f0615d501824f9743f3aab99ef10e303ce7db3f186763a0b70a19de5791ebfc854ff884d5a8c4d92211f642ec92 + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10/7fe1931ee4e88eb5aa524cd3ceb8c882537bc3a81b02e438b240e47012eef49c86904d0f0e593ea7c3a9996d18d0f1f3be8d3eaa92333977b0c3a9d353d5563e + languageName: node + linkType: hard + +"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": + version: 3.2.2 + resolution: "istanbul-lib-coverage@npm:3.2.2" + checksum: 10/40bbdd1e937dfd8c830fa286d0f665e81b7a78bdabcd4565f6d5667c99828bda3db7fb7ac6b96a3e2e8a2461ddbc5452d9f8bc7d00cb00075fa6a3e99f5b6a81 + languageName: node + linkType: hard + +"istanbul-lib-hook@npm:^3.0.0": + version: 3.0.0 + resolution: "istanbul-lib-hook@npm:3.0.0" + dependencies: + append-transform: "npm:^2.0.0" + checksum: 10/512a996cce6b1b9003ba59eab42299dd1527176c01f3ceb7b16bf68f437eeab4958f9df7df0a6b258d45d5f1a2ca2a1bdb915970711e1a5d7b2de911c582f721 + languageName: node + linkType: hard + +"istanbul-lib-instrument@npm:^4.0.0": + version: 4.0.3 + resolution: "istanbul-lib-instrument@npm:4.0.3" + dependencies: + "@babel/core": "npm:^7.7.5" + "@istanbuljs/schema": "npm:^0.1.2" + istanbul-lib-coverage: "npm:^3.0.0" + semver: "npm:^6.3.0" + checksum: 10/6e04ab365b95644ec4954b645f901be90be8ad81233d6df536300cdafcf70dd1ed22a912ceda38b32053c7fc9830c44cd23550c603f493329a8532073d1d6c42 + languageName: node + linkType: hard + +"istanbul-lib-processinfo@npm:^2.0.2": + version: 2.0.3 + resolution: "istanbul-lib-processinfo@npm:2.0.3" + dependencies: + archy: "npm:^1.0.0" + cross-spawn: "npm:^7.0.3" + istanbul-lib-coverage: "npm:^3.2.0" + p-map: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + uuid: "npm:^8.3.2" + checksum: 10/60e7b3441687249460f34a817c7204967b07830a69b6e430e60a45615319c2ab4e2b2eaeb8b3decf549fccd419cd600d21173961632229967608d7d1b194f39e + languageName: node + linkType: hard + +"istanbul-lib-report@npm:^3.0.0": + version: 3.0.1 + resolution: "istanbul-lib-report@npm:3.0.1" + dependencies: + istanbul-lib-coverage: "npm:^3.0.0" + make-dir: "npm:^4.0.0" + supports-color: "npm:^7.1.0" + checksum: 10/86a83421ca1cf2109a9f6d193c06c31ef04a45e72a74579b11060b1e7bb9b6337a4e6f04abfb8857e2d569c271273c65e855ee429376a0d7c91ad91db42accd1 + languageName: node + linkType: hard + +"istanbul-lib-source-maps@npm:^4.0.0": + version: 4.0.1 + resolution: "istanbul-lib-source-maps@npm:4.0.1" + dependencies: + debug: "npm:^4.1.1" + istanbul-lib-coverage: "npm:^3.0.0" + source-map: "npm:^0.6.1" + checksum: 10/5526983462799aced011d776af166e350191b816821ea7bcf71cab3e5272657b062c47dc30697a22a43656e3ced78893a42de677f9ccf276a28c913190953b82 + languageName: node + linkType: hard + +"istanbul-reports@npm:^3.0.2": + version: 3.1.7 + resolution: "istanbul-reports@npm:3.1.7" + dependencies: + html-escaper: "npm:^2.0.0" + istanbul-lib-report: "npm:^3.0.0" + checksum: 10/f1faaa4684efaf57d64087776018d7426312a59aa6eeb4e0e3a777347d23cd286ad18f427e98f0e3dee666103d7404c9d7abc5f240406a912fa16bd6695437fa + languageName: node + linkType: hard + +"jackspeak@npm:^3.1.2": + version: 3.4.0 + resolution: "jackspeak@npm:3.4.0" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/5032c43c0c1fb92e72846ce496df559214253bc6870c90399cbd7858571c53169d9494b7c152df04abcb75f2fb5e9cffe65651c67d573380adf3a482b150d84b + languageName: node + linkType: hard + +"js-tokens@npm:^4.0.0": + version: 4.0.0 + resolution: "js-tokens@npm:4.0.0" + checksum: 10/af37d0d913fb56aec6dc0074c163cc71cd23c0b8aad5c2350747b6721d37ba118af35abdd8b33c47ec2800de07dedb16a527ca9c530ee004093e04958bd0cbf2 + languageName: node + linkType: hard + +"js-yaml@npm:4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/c138a34a3fd0d08ebaf71273ad4465569a483b8a639e0b118ff65698d257c2791d3199e3f303631f2cb98213fa7b5f5d6a4621fd0fff819421b990d30d967140 + languageName: node + linkType: hard + +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/9e22d80b4d0105b9899135365f746d47466ed53ef4223c529b3c0f7a39907743fdbd3c4379f94f1106f02755b5e90b2faaf84801a891135544e1ea475d1a1379 + languageName: node + linkType: hard + +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 10/bebe7ae829bbd586ce8cbe83501dd8cb8c282c8902a8aeeed0a073a89dc37e8103b1244f3c6acd60278bcbfe12d93a3f83c9ac396868a3b3bbc3c5e5e3b648ef + languageName: node + linkType: hard + +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 10/d2096abdcdec56969764b40ffc91d4a23408aa2f351b4d1c13f736f25476643238c43fdbaf38a191c26b1b78fd856d965f5d4d0dde7b89459cd94025190cdf13 + languageName: node + linkType: hard + +"json-schema-traverse@npm:^0.4.1": + version: 0.4.1 + resolution: "json-schema-traverse@npm:0.4.1" + checksum: 10/7486074d3ba247769fda17d5181b345c9fb7d12e0da98b22d1d71a5db9698d8b4bd900a3ec1a4ffdd60846fc2556274a5c894d0c48795f14cb03aeae7b55260b + languageName: node + linkType: hard + +"json5@npm:^2.2.3": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 10/1db67b853ff0de3534085d630691d3247de53a2ed1390ba0ddff681ea43e9b3e30ecbdb65c5e9aab49435e44059c23dbd6fee8ee619419ba37465bb0dd7135da + languageName: node + linkType: hard + +"jsonfile@npm:^6.0.1": + version: 6.1.0 + resolution: "jsonfile@npm:6.1.0" + dependencies: + graceful-fs: "npm:^4.1.6" + universalify: "npm:^2.0.0" + dependenciesMeta: + graceful-fs: + optional: true + checksum: 10/03014769e7dc77d4cf05fa0b534907270b60890085dd5e4d60a382ff09328580651da0b8b4cdf44d91e4c8ae64d91791d965f05707beff000ed494a38b6fec85 + languageName: node + linkType: hard + +"just-extend@npm:^4.0.2": + version: 4.2.1 + resolution: "just-extend@npm:4.2.1" + checksum: 10/375389c0847d56300873fa622fbc5c5e208933e372bbedb39c82f583299cdad4fe9c4773bc35fcd9c42cd85744f07474ca4163aa0f9125dd5be37bc09075eb49 + languageName: node + linkType: hard + +"kuler@npm:^2.0.0": + version: 2.0.0 + resolution: "kuler@npm:2.0.0" + checksum: 10/9e10b5a1659f9ed8761d38df3c35effabffbd19fc6107324095238e4ef0ff044392cae9ac64a1c2dda26e532426485342226b93806bd97504b174b0dcf04ed81 + languageName: node + linkType: hard + +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: "npm:^4.1.0" + checksum: 10/83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + +"locate-path@npm:^6.0.0": + version: 6.0.0 + resolution: "locate-path@npm:6.0.0" + dependencies: + p-locate: "npm:^5.0.0" + checksum: 10/72eb661788a0368c099a184c59d2fee760b3831c9c1c33955e8a19ae4a21b4116e53fa736dc086cdeb9fce9f7cc508f2f92d2d3aae516f133e16a2bb59a39f5a + languageName: node + linkType: hard + +"lodash.camelcase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.camelcase@npm:4.3.0" + checksum: 10/c301cc379310441dc73cd6cebeb91fb254bea74e6ad3027f9346fc43b4174385153df420ffa521654e502fd34c40ef69ca4e7d40ee7129a99e06f306032bfc65 + languageName: node + linkType: hard + +"lodash.flattendeep@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flattendeep@npm:4.4.0" + checksum: 10/0d0b41d8d86999e8bea94905ac65347404d427aacddbc6654dc2f85905e27cd2b708139671ecea135fa6f0a17ed94b9d4cab8ce12b08eddcbb1ddd83952ee4c2 + languageName: node + linkType: hard + +"lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: 10/2a4925f6e89bc2c010a77a802d1ba357e17ed1ea03c2ddf6a146429f2856a216663e694a6aa3549a318cbbba3fd8b7decb392db457e6ac0b83dc745ed0a17380 + languageName: node + linkType: hard + +"log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 10/fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + +"logform@npm:^2.3.2, logform@npm:^2.4.0": + version: 2.6.0 + resolution: "logform@npm:2.6.0" + dependencies: + "@colors/colors": "npm:1.6.0" + "@types/triple-beam": "npm:^1.3.2" + fecha: "npm:^4.2.0" + ms: "npm:^2.1.1" + safe-stable-stringify: "npm:^2.3.1" + triple-beam: "npm:^1.3.0" + checksum: 10/92de5696a529a7ccf4359fe65a21fce2398ba20c4b4e5769cba187b8fde01d590a22d3c83f797d31b436f49770fb1b2f28646e7c881d30b8d1f4080a05ae7006 + languageName: node + linkType: hard + +"long@npm:^4.0.0": + version: 4.0.0 + resolution: "long@npm:4.0.0" + checksum: 10/8296e2ba7bab30f9cfabb81ebccff89c819af6a7a78b4bb5a70ea411aa764ee0532f7441381549dfa6a1a98d72abe9138bfcf99f4fa41238629849bc035b845b + languageName: node + linkType: hard + +"long@npm:^5.0.0": + version: 5.2.3 + resolution: "long@npm:5.2.3" + checksum: 10/9167ec6947a825b827c30da169a7384eec6c0c9ec2f0b9c74da2e93d81159bbe39fb09c3f13dae9721d4b807ccfa09797a7dd1012f5d478e3e33ca3c78b608e6 + languageName: node + linkType: hard + +"loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: "npm:^2.0.1" + checksum: 10/635c8f0914c2ce7ecfe4e239fbaf0ce1d2c00e4246fafcc4ed000bfdb1b8f89d05db1a220054175cca631ebf3894872a26fffba0124477fcb562f78762848fb1 + languageName: node + linkType: hard + +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.2.2 + resolution: "lru-cache@npm:10.2.2" + checksum: 10/ff1a496d30b5eaec2c9079080965bb0cede203cf878371f7033a007f1e54cd4aa13cc8abf7ccec4c994a83a22ed5476e83a55bb57cc07e6c1547a42937e42c37 + languageName: node + linkType: hard + +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: "npm:^3.0.2" + checksum: 10/951d2673dcc64a7fb888bf3d13bc2fdf923faca97d89cdb405ba3dfff77e2b26e5798d405e78fcd7094c9e7b8b4dab2ddc5a4f8a11928af24a207b7c738ca3f8 + languageName: node + linkType: hard + +"make-dir@npm:^3.0.0, make-dir@npm:^3.0.2": + version: 3.1.0 + resolution: "make-dir@npm:3.1.0" + dependencies: + semver: "npm:^6.0.0" + checksum: 10/484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 + languageName: node + linkType: hard + +"make-dir@npm:^4.0.0": + version: 4.0.0 + resolution: "make-dir@npm:4.0.0" + dependencies: + semver: "npm:^7.5.3" + checksum: 10/bf0731a2dd3aab4db6f3de1585cea0b746bb73eb5a02e3d8d72757e376e64e6ada190b1eddcde5b2f24a81b688a9897efd5018737d05e02e2a671dda9cff8a8a + languageName: node + linkType: hard + +"make-error@npm:^1.1.1": + version: 1.3.6 + resolution: "make-error@npm:1.3.6" + checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + languageName: node + linkType: hard + +"make-fetch-happen@npm:^13.0.0": + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" + dependencies: + "@npmcli/agent": "npm:^2.0.0" + cacache: "npm:^18.0.0" + http-cache-semantics: "npm:^4.1.1" + is-lambda: "npm:^1.0.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^3.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^0.6.3" + proc-log: "npm:^4.2.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^10.0.0" + checksum: 10/11bae5ad6ac59b654dbd854f30782f9de052186c429dfce308eda42374528185a100ee40ac9ffdc36a2b6c821ecaba43913e4730a12f06f15e895ea9cb23fa59 + languageName: node + linkType: hard + +"minimatch@npm:4.2.1": + version: 4.2.1 + resolution: "minimatch@npm:4.2.1" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/27e49fb720116face9588c29634404edc0c6677e5448ba01b4ec6179002461cc4fabc842497a0537edc5aa87bc93e65cfb0fe6dc32b850563429a64836dd1d54 + languageName: node + linkType: hard + +"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: "npm:^1.1.7" + checksum: 10/e0b25b04cd4ec6732830344e5739b13f8690f8a012d73445a4a19fbc623f5dd481ef7a5827fde25954cd6026fede7574cc54dc4643c99d6c6b653d6203f94634 + languageName: node + linkType: hard + +"minimatch@npm:^9.0.4": + version: 9.0.4 + resolution: "minimatch@npm:9.0.4" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/4cdc18d112b164084513e890d6323370db14c22249d536ad1854539577a895e690a27513dc346392f61a4a50afbbd8abc88f3f25558bfbbbb862cd56508b20f5 + languageName: node + linkType: hard + +"minimist@npm:^1.2.6": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 10/908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f + languageName: node + linkType: hard + +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + +"minipass-fetch@npm:^3.0.0": + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^1.0.3" + minizlib: "npm:^2.1.2" + dependenciesMeta: + encoding: + optional: true + checksum: 10/c669948bec1373313aaa8f104b962a3ced9f45c49b26366a4b0ae27ccdfa9c5740d72c8a84d3f8623d7a61c5fc7afdfda44789008c078f61a62441142efc4a97 + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/56269a0b22bad756a08a94b1ffc36b7c9c5de0735a4dd1ab2b06c066d795cfd1f0ac44a0fcae13eece5589b908ecddc867f04c745c7009be0b566421ea0944cf + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/b14240dac0d29823c3d5911c286069e36d0b81173d7bdf07a7e4a91ecdef92cdff4baaf31ea3746f1c61e0957f652e641223970870e2353593f382112257971b + languageName: node + linkType: hard + +"minipass-sized@npm:^1.0.3": + version: 1.0.3 + resolution: "minipass-sized@npm:1.0.3" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10/40982d8d836a52b0f37049a0a7e5d0f089637298e6d9b45df9c115d4f0520682a78258905e5c8b180fb41b593b0a82cc1361d2c74b45f7ada66334f84d1ecfdd + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10/a5c6ef069f70d9a524d3428af39f2b117ff8cd84172e19b754e7264a33df460873e6eb3d6e55758531580970de50ae950c496256bb4ad3691a2974cddff189f0 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0": + version: 5.0.0 + resolution: "minipass@npm:5.0.0" + checksum: 10/61682162d29f45d3152b78b08bab7fb32ca10899bc5991ffe98afc18c9e9543bd1e3be94f8b8373ba6262497db63607079dc242ea62e43e7b2270837b7347c93 + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" + dependencies: + minipass: "npm:^3.0.0" + yallist: "npm:^4.0.0" + checksum: 10/ae0f45436fb51344dcb87938446a32fbebb540d0e191d63b35e1c773d47512e17307bf54aa88326cc6d176594d00e4423563a091f7266c2f9a6872cdc1e234d1 + languageName: node + linkType: hard + +"mkdirp@npm:^0.5.3": + version: 0.5.6 + resolution: "mkdirp@npm:0.5.6" + dependencies: + minimist: "npm:^1.2.6" + bin: + mkdirp: bin/cmd.js + checksum: 10/0c91b721bb12c3f9af4b77ebf73604baf350e64d80df91754dc509491ae93bf238581e59c7188360cec7cb62fc4100959245a42cfe01834efedc5e9d068376c2 + languageName: node + linkType: hard + +"mkdirp@npm:^1.0.3": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 10/d71b8dcd4b5af2fe13ecf3bd24070263489404fe216488c5ba7e38ece1f54daf219e72a833a3a2dc404331e870e9f44963a33399589490956bff003a3404d3b2 + languageName: node + linkType: hard + +"mocha@npm:^9.2.0": + version: 9.2.2 + resolution: "mocha@npm:9.2.2" + dependencies: + "@ungap/promise-all-settled": "npm:1.1.2" + ansi-colors: "npm:4.1.1" + browser-stdout: "npm:1.3.1" + chokidar: "npm:3.5.3" + debug: "npm:4.3.3" + diff: "npm:5.0.0" + escape-string-regexp: "npm:4.0.0" + find-up: "npm:5.0.0" + glob: "npm:7.2.0" + growl: "npm:1.10.5" + he: "npm:1.2.0" + js-yaml: "npm:4.1.0" + log-symbols: "npm:4.1.0" + minimatch: "npm:4.2.1" + ms: "npm:2.1.3" + nanoid: "npm:3.3.1" + serialize-javascript: "npm:6.0.0" + strip-json-comments: "npm:3.1.1" + supports-color: "npm:8.1.1" + which: "npm:2.0.2" + workerpool: "npm:6.2.0" + yargs: "npm:16.2.0" + yargs-parser: "npm:20.2.4" + yargs-unparser: "npm:2.0.0" + bin: + _mocha: bin/_mocha + mocha: bin/mocha + checksum: 10/8ee58bff8694ad4013fc0fbb5670c5ec6d8404c601df2d4ae798fad01dd03b5f9395347cf59167006b315a14813a6f839290d60dcbdee8ef4246afe43609d2dc + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 10/673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"ms@npm:2.1.3, ms@npm:^2.1.1": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10/aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d + languageName: node + linkType: hard + +"nanoid@npm:3.3.1": + version: 3.3.1 + resolution: "nanoid@npm:3.3.1" + bin: + nanoid: bin/nanoid.cjs + checksum: 10/306f2cb9e4dcfb94738b09de9dc63839a37db33626f66b24dbcc8f66d4b91784645794a7c4f250d629e4d66f5385164c6748c58ac5b7c95217e9e048590efbe4 + languageName: node + linkType: hard + +"negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 10/2723fb822a17ad55c93a588a4bc44d53b22855bf4be5499916ca0cab1e7165409d0b288ba2577d7b029f10ce18cf2ed8e703e5af31c984e1e2304277ef979837 + languageName: node + linkType: hard + +"nise@npm:^4.0.4": + version: 4.1.0 + resolution: "nise@npm:4.1.0" + dependencies: + "@sinonjs/commons": "npm:^1.7.0" + "@sinonjs/fake-timers": "npm:^6.0.0" + "@sinonjs/text-encoding": "npm:^0.7.1" + just-extend: "npm:^4.0.2" + path-to-regexp: "npm:^1.7.0" + checksum: 10/ff7c2e316c8ae8327573417fefcc84070d9dcfa423b123d014d21db5f7de07580f76a85143c2f91eaf5f1a979f3f9a3721e3652753e58ddaa703aa8d65539b0b + languageName: node + linkType: hard + +"node-gyp@npm:latest": + version: 10.1.0 + resolution: "node-gyp@npm:10.1.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + glob: "npm:^10.3.10" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^13.0.0" + nopt: "npm:^7.0.0" + proc-log: "npm:^3.0.0" + semver: "npm:^7.3.5" + tar: "npm:^6.1.2" + which: "npm:^4.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10/89e105e495e66cd4568af3cf79cdeb67d670eb069e33163c7781d3366470a30367c9bd8dea59e46db16370020139e5bf78b1fbc03284cb571754dfaa59744db5 + languageName: node + linkType: hard + +"node-preload@npm:^0.2.1": + version: 0.2.1 + resolution: "node-preload@npm:0.2.1" + dependencies: + process-on-spawn: "npm:^1.0.0" + checksum: 10/de36ed365b7e474eaf05c41f976774dece23a7f398fe76dbf9705f9670a1f49e6a27c5f31fe58b4e43d96413fdce4806192c60d35317b25725636c90889d5bab + languageName: node + linkType: hard + +"node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 10/0f7607ec7db5ef1dc616899a5f24ae90c869b6a54c2d4f36ff6d84a282ab9343c7ff3ca3670fe4669171bb1e8a9b3e286e1ef1c131f09a83d70554f855d54f24 + languageName: node + linkType: hard + +"nopt@npm:^7.0.0": + version: 7.2.1 + resolution: "nopt@npm:7.2.1" + dependencies: + abbrev: "npm:^2.0.0" + bin: + nopt: bin/nopt.js + checksum: 10/95a1f6dec8a81cd18cdc2fed93e6f0b4e02cf6bdb4501c848752c6e34f9883d9942f036a5e3b21a699047d8a448562d891e67492df68ec9c373e6198133337ae + languageName: node + linkType: hard + +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": + version: 3.0.0 + resolution: "normalize-path@npm:3.0.0" + checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 + languageName: node + linkType: hard + +"nyc@npm:^15.0.0": + version: 15.1.0 + resolution: "nyc@npm:15.1.0" + dependencies: + "@istanbuljs/load-nyc-config": "npm:^1.0.0" + "@istanbuljs/schema": "npm:^0.1.2" + caching-transform: "npm:^4.0.0" + convert-source-map: "npm:^1.7.0" + decamelize: "npm:^1.2.0" + find-cache-dir: "npm:^3.2.0" + find-up: "npm:^4.1.0" + foreground-child: "npm:^2.0.0" + get-package-type: "npm:^0.1.0" + glob: "npm:^7.1.6" + istanbul-lib-coverage: "npm:^3.0.0" + istanbul-lib-hook: "npm:^3.0.0" + istanbul-lib-instrument: "npm:^4.0.0" + istanbul-lib-processinfo: "npm:^2.0.2" + istanbul-lib-report: "npm:^3.0.0" + istanbul-lib-source-maps: "npm:^4.0.0" + istanbul-reports: "npm:^3.0.2" + make-dir: "npm:^3.0.0" + node-preload: "npm:^0.2.1" + p-map: "npm:^3.0.0" + process-on-spawn: "npm:^1.0.0" + resolve-from: "npm:^5.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + spawn-wrap: "npm:^2.0.0" + test-exclude: "npm:^6.0.0" + yargs: "npm:^15.0.2" + bin: + nyc: bin/nyc.js + checksum: 10/c987f04f4192dfd94e9e69869c76a54220b3ed555016751f380a413a378cceff8ec346df579e9126035b6acbc60ab893cc65e67729cc427c0171361bcb481e66 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 10/cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"one-time@npm:^1.0.0": + version: 1.0.0 + resolution: "one-time@npm:1.0.0" + dependencies: + fn.name: "npm:1.x.x" + checksum: 10/64d0160480eeae4e3b2a6fc0a02f452e05bb0cc8373a4ed56a4fc08c3939dcb91bc20075003ed499655bd16919feb63ca56f86eee7932c5251f7d629b55dfc90 + languageName: node + linkType: hard + +"p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10/84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + +"p-limit@npm:^3.0.2": + version: 3.1.0 + resolution: "p-limit@npm:3.1.0" + dependencies: + yocto-queue: "npm:^0.1.0" + checksum: 10/7c3690c4dbf62ef625671e20b7bdf1cbc9534e83352a2780f165b0d3ceba21907e77ad63401708145ca4e25bfc51636588d89a8c0aeb715e6c37d1c066430360 + languageName: node + linkType: hard + +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: "npm:^2.2.0" + checksum: 10/513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + +"p-locate@npm:^5.0.0": + version: 5.0.0 + resolution: "p-locate@npm:5.0.0" + dependencies: + p-limit: "npm:^3.0.2" + checksum: 10/1623088f36cf1cbca58e9b61c4e62bf0c60a07af5ae1ca99a720837356b5b6c5ba3eb1b2127e47a06865fee59dd0453cad7cc844cda9d5a62ac1a5a51b7c86d3 + languageName: node + linkType: hard + +"p-map@npm:^3.0.0": + version: 3.0.0 + resolution: "p-map@npm:3.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/d4a0664d2af05d7e5f6f342e6493d4cad48f7398ac803c5066afb1f8d2010bfc2a83d935689437288f7b1a743772085b8fa0909a8282b5df4210bcda496c37c8 + languageName: node + linkType: hard + +"p-map@npm:^4.0.0": + version: 4.0.0 + resolution: "p-map@npm:4.0.0" + dependencies: + aggregate-error: "npm:^3.0.0" + checksum: 10/7ba4a2b1e24c05e1fc14bbaea0fc6d85cf005ae7e9c9425d4575550f37e2e584b1af97bcde78eacd7559208f20995988d52881334db16cf77bc1bcf68e48ed7c + languageName: node + linkType: hard + +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10/f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + +"package-hash@npm:^4.0.0": + version: 4.0.0 + resolution: "package-hash@npm:4.0.0" + dependencies: + graceful-fs: "npm:^4.1.15" + hasha: "npm:^5.0.0" + lodash.flattendeep: "npm:^4.4.0" + release-zalgo: "npm:^1.0.0" + checksum: 10/c7209d98ac31926e0c1753d014f8b6b924e1e6a1aacf833dc99edece9c8381424c41c97c26c7eee82026944a79e99023cde5998bf515d7465c87005d52152040 + languageName: node + linkType: hard + +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10/ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 10/505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 10/060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10/55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020 + languageName: node + linkType: hard + +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 10/49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + languageName: node + linkType: hard + +"path-to-regexp@npm:^1.7.0": + version: 1.8.0 + resolution: "path-to-regexp@npm:1.8.0" + dependencies: + isarray: "npm:0.0.1" + checksum: 10/45a01690f72919163cf89714e31a285937b14ad54c53734c826363fcf7beba9d9d0f2de802b4986b1264374562d6a3398a2e5289753a764e3a256494f1e52add + languageName: node + linkType: hard + +"pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: 10/b50a4751068aa3a5428f5a0b480deecedc6f537666a3630a0c2ae2d5e7c0f4bf0ee77b48404441ec1220bef0c91625e6030b3d3cf5a32ab0d9764018d1d9dbb6 + languageName: node + linkType: hard + +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc + languageName: node + linkType: hard + +"pkg-dir@npm:^4.1.0": + version: 4.2.0 + resolution: "pkg-dir@npm:4.2.0" + dependencies: + find-up: "npm:^4.0.0" + checksum: 10/9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 + languageName: node + linkType: hard + +"proc-log@npm:^3.0.0": + version: 3.0.0 + resolution: "proc-log@npm:3.0.0" + checksum: 10/02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 + languageName: node + linkType: hard + +"proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 10/4e1394491b717f6c1ade15c570ecd4c2b681698474d3ae2d303c1e4b6ab9455bd5a81566211e82890d5a5ae9859718cc6954d5150bb18b09b72ecb297beae90a + languageName: node + linkType: hard + +"process-on-spawn@npm:^1.0.0": + version: 1.0.0 + resolution: "process-on-spawn@npm:1.0.0" + dependencies: + fromentries: "npm:^1.2.0" + checksum: 10/8795d71742798e5a059e13da2a9c13988aa7c673a3a57f276c1ff6ed942ba9b7636139121c6a409eaa2ea6a8fda7af4be19c3dc576320515bb3f354e3544106e + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10/96e1a82453c6c96eef53a37a1d6134c9f2482f94068f98a59145d0986ca4e497bf110a410adf73857e588165eab3899f0ebcf7b3890c1b3ce802abc0d65967d4 + languageName: node + linkType: hard + +"protobufjs@npm:^6.11.3": + version: 6.11.4 + resolution: "protobufjs@npm:6.11.4" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/long": "npm:^4.0.1" + "@types/node": "npm:>=13.7.0" + long: "npm:^4.0.0" + bin: + pbjs: bin/pbjs + pbts: bin/pbts + checksum: 10/6b7fd7540d74350d65c38f69f398c9995ae019da070e79d9cd464a458c6d19b40b07c9a026be4e10704c824a344b603307745863310c50026ebd661ce4da0663 + languageName: node + linkType: hard + +"protobufjs@npm:^7.2.5": + version: 7.3.0 + resolution: "protobufjs@npm:7.3.0" + dependencies: + "@protobufjs/aspromise": "npm:^1.1.2" + "@protobufjs/base64": "npm:^1.1.2" + "@protobufjs/codegen": "npm:^2.0.4" + "@protobufjs/eventemitter": "npm:^1.1.0" + "@protobufjs/fetch": "npm:^1.1.0" + "@protobufjs/float": "npm:^1.0.2" + "@protobufjs/inquire": "npm:^1.1.0" + "@protobufjs/path": "npm:^1.1.2" + "@protobufjs/pool": "npm:^1.1.0" + "@protobufjs/utf8": "npm:^1.1.0" + "@types/node": "npm:>=13.7.0" + long: "npm:^5.0.0" + checksum: 10/aff4aa2a3a2f011accb51e23fcae122acbee35cb761abe51f799675a61ab39ad9a506911f307e0fdb9a1703bed1f522cfbdaafaeefd2b3aaca2ddc18f03029d9 + languageName: node + linkType: hard + +"punycode@npm:^2.1.0": + version: 2.3.1 + resolution: "punycode@npm:2.3.1" + checksum: 10/febdc4362bead22f9e2608ff0171713230b57aff9dddc1c273aa2a651fbd366f94b7d6a71d78342a7c0819906750351ca7f2edd26ea41b626d87d6a13d1bd059 + languageName: node + linkType: hard + +"randombytes@npm:^2.1.0": + version: 2.1.0 + resolution: "randombytes@npm:2.1.0" + dependencies: + safe-buffer: "npm:^5.1.0" + checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc + languageName: node + linkType: hard + +"readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: 10/d9e3e53193adcdb79d8f10f2a1f6989bd4389f5936c6f8b870e77570853561c362bee69feca2bbb7b32368ce96a85504aa4cedf7cf80f36e6a9de30d64244048 + languageName: node + linkType: hard + +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10/196b30ef6ccf9b6e18c4e1724b7334f72a093d011a99f3b5920470f0b3406a51770867b3e1ae9711f227ef7a7065982f6ee2ce316746b2cb42c88efe44297fe7 + languageName: node + linkType: hard + +"reflect-metadata@npm:^0.1.13": + version: 0.1.14 + resolution: "reflect-metadata@npm:0.1.14" + checksum: 10/fcab9c17ec3b9fea0e2f748c2129aceb57c24af6d8d13842b8a77c8c79dde727d7456ce293e76e8d7b267d1dbf93eea4c5b3c9101299a789a075824f2e40f1ee + languageName: node + linkType: hard + +"release-zalgo@npm:^1.0.0": + version: 1.0.0 + resolution: "release-zalgo@npm:1.0.0" + dependencies: + es6-error: "npm:^4.0.1" + checksum: 10/1719e44b240ee1f57d034b26ea167f3cbf3c36fdae6d6efd0e6e5b202d9852baffc1c5595d378b5f8b2ad729b907ddd962f3d051d89499f83584993a5399f964 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10/a72468e2589270d91f06c7d36ec97a88db53ae5d6fe3787fadc943f0b0276b10347f89b363b2a82285f650bdcc135ad4a257c61bdd4d00d6df1fa24875b0ddaf + languageName: node + linkType: hard + +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: 10/8604a570c06a69c9d939275becc33a65676529e1c3e5a9f42d58471674df79357872b96d70bb93a0380a62d60dc9031c98b1a9dad98c946ffdd61b7ac0c8cedd + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10/be18a5e4d76dd711778664829841cde690971d02b6cbae277735a09c1c28f407b99ef6ef3cd585a1e6546d4097b28df40ed32c4a287b9699dcf6d7f208495e23 + languageName: node + linkType: hard + +"resolve@npm:^1.3.2": + version: 1.22.8 + resolution: "resolve@npm:1.22.8" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/c473506ee01eb45cbcfefb68652ae5759e092e6b0fb64547feadf9736a6394f258fbc6f88e00c5ca36d5477fbb65388b272432a3600fa223062e54333c156753 + languageName: node + linkType: hard + +"resolve@patch:resolve@npm%3A^1.3.2#optional!builtin": + version: 1.22.8 + resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10/f345cd37f56a2c0275e3fe062517c650bb673815d885e7507566df589375d165bbbf4bdb6aa95600a9bc55f4744b81f452b5a63f95b9f10a72787dba3c90890a + languageName: node + linkType: hard + +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10/1f914879f97e7ee931ad05fe3afa629bd55270fc6cf1c1e589b6a99fab96d15daad0fa1a52a00c729ec0078045fe3e399bd4fd0c93bcc906957bdc17f89cb8e6 + languageName: node + linkType: hard + +"rimraf@npm:^3.0.0": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" + dependencies: + glob: "npm:^7.1.3" + bin: + rimraf: bin.js + checksum: 10/063ffaccaaaca2cfd0ef3beafb12d6a03dd7ff1260d752d62a6077b5dfff6ae81bea571f655bb6b589d366930ec1bdd285d40d560c0dae9b12f125e54eb743d5 + languageName: node + linkType: hard + +"safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 + languageName: node + linkType: hard + +"safe-stable-stringify@npm:^2.3.1": + version: 2.4.3 + resolution: "safe-stable-stringify@npm:2.4.3" + checksum: 10/a6c192bbefe47770a11072b51b500ed29be7b1c15095371c1ee1dc13e45ce48ee3c80330214c56764d006c485b88bd0b24940d868948170dddc16eed312582d8 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10/7eaf7a0cf37cc27b42fb3ef6a9b1df6e93a1c6d98c6c6702b02fe262d5fcbd89db63320793b99b21cb5348097d0a53de81bd5f4e8b86e20cc9412e3f1cfb4e83 + languageName: node + linkType: hard + +"satp-contract@workspace:.": + version: 0.0.0-use.local + resolution: "satp-contract@workspace:." + dependencies: + "@types/chai": "npm:^4.2.11" + "@types/chai-as-promised": "npm:^7.1.2" + "@types/mocha": "npm:^7.0.2" + "@types/node": "npm:18.11.9" + "@types/sinon": "npm:^7.5.2" + "@types/sinon-chai": "npm:^3.2.3" + chai: "npm:^4.2.0" + chai-as-promised: "npm:^7.1.1" + fabric-contract-api: "npm:^2.4.1" + fabric-shim: "npm:2.4.1" + mocha: "npm:^9.2.0" + nyc: "npm:^15.0.0" + sinon: "npm:^9.0.1" + sinon-chai: "npm:^3.5.0" + ts-node: "npm:^8.8.1" + tslint: "npm:^6.1.0" + typescript: "npm:5.3.3" + winston: "npm:^3.2.1" + languageName: unknown + linkType: soft + +"semver@npm:^5.3.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: 10/fca14418a174d4b4ef1fecb32c5941e3412d52a4d3d85165924ce3a47fbc7073372c26faf7484ceb4bbc2bde25880c6b97e492473dc7e9708fdfb1c6a02d546e + languageName: node + linkType: hard + +"semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: 10/1ef3a85bd02a760c6ef76a45b8c1ce18226de40831e02a00bad78485390b98b6ccaa31046245fc63bba4a47a6a592b6c7eedc65cc47126e60489f9cc1ce3ed7e + languageName: node + linkType: hard + +"semver@npm:^7.3.5, semver@npm:^7.5.3": + version: 7.6.2 + resolution: "semver@npm:7.6.2" + bin: + semver: bin/semver.js + checksum: 10/296b17d027f57a87ef645e9c725bff4865a38dfc9caf29b26aa084b85820972fbe7372caea1ba6857162fa990702c6d9c1d82297cecb72d56c78ab29070d2ca2 + languageName: node + linkType: hard + +"serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: "npm:^2.1.0" + checksum: 10/ed3dabfbb565c48c9eb1ca8fe58f0d256902ab70a8a605be634ddd68388d5f728bb0bd1268e94fab628748ba8ad8392f01b05f3cbe1e4878b5c58c669fd3d1b4 + languageName: node + linkType: hard + +"set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 10/8980ebf7ae9eb945bb036b6e283c547ee783a1ad557a82babf758a065e2fb6ea337fd82cac30dd565c1e606e423f30024a19fff7afbf4977d784720c4026a8ef + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10/6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10/1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222 + languageName: node + linkType: hard + +"signal-exit@npm:^3.0.2": + version: 3.0.7 + resolution: "signal-exit@npm:3.0.7" + checksum: 10/a2f098f247adc367dffc27845853e9959b9e88b01cb301658cfe4194352d8d2bb32e18467c786a7fe15f1d44b233ea35633d076d5e737870b7139949d1ab6318 + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10/c9fa63bbbd7431066174a48ba2dd9986dfd930c3a8b59de9c29d7b6854ec1c12a80d15310869ea5166d413b99f041bfa3dd80a7947bcd44ea8e6eb3ffeabfa1f + languageName: node + linkType: hard + +"simple-swizzle@npm:^0.2.2": + version: 0.2.2 + resolution: "simple-swizzle@npm:0.2.2" + dependencies: + is-arrayish: "npm:^0.3.1" + checksum: 10/c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc + languageName: node + linkType: hard + +"sinon-chai@npm:^3.5.0": + version: 3.7.0 + resolution: "sinon-chai@npm:3.7.0" + peerDependencies: + chai: ^4.0.0 + sinon: ">=4.0.0" + checksum: 10/028853eb8a545ca613c6863014a40f07d1e6b81467e20939fefcd13f170206d24165b91099fb297aeb4d137745e321da25daa8e2d665cc0a78f90d5b877e8bbe + languageName: node + linkType: hard + +"sinon@npm:^9.0.1": + version: 9.2.4 + resolution: "sinon@npm:9.2.4" + dependencies: + "@sinonjs/commons": "npm:^1.8.1" + "@sinonjs/fake-timers": "npm:^6.0.1" + "@sinonjs/samsam": "npm:^5.3.1" + diff: "npm:^4.0.2" + nise: "npm:^4.0.4" + supports-color: "npm:^7.1.0" + checksum: 10/4597c12e2490b22aaae5fb1edca169a10e71dee73c13d2d12d6d9fa7f3bdbdb53ec5ad52c631c301fb3eab79471a30b05be65155c30ca415169470ea4789eae6 + languageName: node + linkType: hard + +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10/927484aa0b1640fd9473cee3e0a0bcad6fce93fd7bbc18bac9ad0c33686f5d2e2c422fba24b5899c184524af01e11dd2bd051c2bf2b07e47aff8ca72cbfc60d2 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.3 + resolution: "socks-proxy-agent@npm:8.0.3" + dependencies: + agent-base: "npm:^7.1.1" + debug: "npm:^4.3.4" + socks: "npm:^2.7.1" + checksum: 10/c2112c66d6322e497d68e913c3780f3683237fd394bfd480b9283486a86e36095d0020db96145d88f8ccd9cc73261b98165b461f9c1bf5dc17abfe75c18029ce + languageName: node + linkType: hard + +"socks@npm:^2.7.1": + version: 2.8.3 + resolution: "socks@npm:2.8.3" + dependencies: + ip-address: "npm:^9.0.5" + smart-buffer: "npm:^4.2.0" + checksum: 10/ffcb622c22481dfcd7589aae71fbfd71ca34334064d181df64bf8b7feaeee19706aba4cffd1de35cc7bbaeeaa0af96be2d7f40fcbc7bc0ab69533a7ae9ffc4fb + languageName: node + linkType: hard + +"source-map-support@npm:^0.5.17": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 10/8317e12d84019b31e34b86d483dd41d6f832f389f7417faf8fc5c75a66a12d9686e47f589a0554a868b8482f037e23df9d040d29387eb16fa14cb85f091ba207 + languageName: node + linkType: hard + +"source-map@npm:^0.6.0, source-map@npm:^0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 10/59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff + languageName: node + linkType: hard + +"spawn-wrap@npm:^2.0.0": + version: 2.0.0 + resolution: "spawn-wrap@npm:2.0.0" + dependencies: + foreground-child: "npm:^2.0.0" + is-windows: "npm:^1.0.2" + make-dir: "npm:^3.0.0" + rimraf: "npm:^3.0.0" + signal-exit: "npm:^3.0.2" + which: "npm:^2.0.1" + checksum: 10/ce6ca08d66c3a41a28a7ecc10bf4945d7930fd3ae961d40804ee109cee6ee9f8436125f53bc07918ca1eb461fe2ff0033af1dc3cb803469b585639675fc2d2e7 + languageName: node + linkType: hard + +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: 10/e7587128c423f7e43cc625fe2f87e6affdf5ca51c1cc468e910d8aaca46bb44a7fbcfa552f787b1d3987f7043aeb4527d1b99559e6621e01b42b3f45e5a24cbb + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10/c34828732ab8509c2741e5fd1af6b767c3daf2c642f267788f933a65b1614943c282e74c4284f4fa749c264b18ee016a0d37a3e5b73aee446da46277d3a85daa + languageName: node + linkType: hard + +"ssri@npm:^10.0.0": + version: 10.0.6 + resolution: "ssri@npm:10.0.6" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10/f92c1b3cc9bfd0a925417412d07d999935917bc87049f43ebec41074661d64cf720315661844106a77da9f8204b6d55ae29f9514e673083cae39464343af2a8b + languageName: node + linkType: hard + +"stack-trace@npm:0.0.x": + version: 0.0.10 + resolution: "stack-trace@npm:0.0.10" + checksum: 10/7bd633f0e9ac46e81a0b0fe6538482c1d77031959cf94478228731709db4672fbbed59176f5b9a9fd89fec656b5dae03d084ef2d1b0c4c2f5683e05f2dbb1405 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10/e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10/7369deaa29f21dda9a438686154b62c2c5f661f8dda60449088f9f980196f7908fc39fdd1803e3e01541970287cf5deae336798337e9319a7055af89dafa7193 + languageName: node + linkType: hard + +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 10/54d23f4a6acae0e93f999a585e673be9e561b65cd4cca37714af1e893ab8cd8dfa52a9e4f58f48f87b4a44918d3a9254326cb80ed194bf2e4c226e2b21767e56 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10/ae3b5436d34fadeb6096367626ce987057713c566e1e7768818797e00ac5d62023d0f198c4e681eae9e20701721980b26a64a8f5b91238869592a9c6800719a2 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1": + version: 7.1.0 + resolution: "strip-ansi@npm:7.1.0" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10/475f53e9c44375d6e72807284024ac5d668ee1d06010740dec0b9744f2ddf47de8d7151f80e5f6190fc8f384e802fdf9504b76a7e9020c9faee7103623338be2 + languageName: node + linkType: hard + +"strip-bom@npm:^4.0.0": + version: 4.0.0 + resolution: "strip-bom@npm:4.0.0" + checksum: 10/9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 + languageName: node + linkType: hard + +"strip-json-comments@npm:3.1.1": + version: 3.1.1 + resolution: "strip-json-comments@npm:3.1.1" + checksum: 10/492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 + languageName: node + linkType: hard + +"supports-color@npm:8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/157b534df88e39c5518c5e78c35580c1eca848d7dbaf31bbe06cdfc048e22c7ff1a9d046ae17b25691128f631a51d9ec373c1b740c12ae4f0de6e292037e4282 + languageName: node + linkType: hard + +"supports-color@npm:^5.3.0": + version: 5.4.0 + resolution: "supports-color@npm:5.4.0" + dependencies: + has-flag: "npm:^3.0.0" + checksum: 10/11a1faa8e02c1c4f528cdfea6a41d4c823c0b9d7280e14684bbac554c6a32a1c800c0fcc5d148764a071fd94be5c2dbd301cd1fe95daa029296c4ef36ae62d01 + languageName: node + linkType: hard + +"supports-color@npm:^7.1.0": + version: 7.2.0 + resolution: "supports-color@npm:7.2.0" + dependencies: + has-flag: "npm:^4.0.0" + checksum: 10/c8bb7afd564e3b26b50ca6ee47572c217526a1389fe018d00345856d4a9b08ffbd61fadaf283a87368d94c3dcdb8f5ffe2650a5a65863e21ad2730ca0f05210a + languageName: node + linkType: hard + +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 10/a9dc19ae2220c952bd2231d08ddeecb1b0328b61e72071ff4000c8384e145cc07c1c0bdb3b5a1cb06e186a7b2790f1dee793418b332f6ddf320de25d9125be7e + languageName: node + linkType: hard + +"tar@npm:^6.1.11, tar@npm:^6.1.2": + version: 6.2.1 + resolution: "tar@npm:6.2.1" + dependencies: + chownr: "npm:^2.0.0" + fs-minipass: "npm:^2.0.0" + minipass: "npm:^5.0.0" + minizlib: "npm:^2.1.1" + mkdirp: "npm:^1.0.3" + yallist: "npm:^4.0.0" + checksum: 10/bfbfbb2861888077fc1130b84029cdc2721efb93d1d1fb80f22a7ac3a98ec6f8972f29e564103bbebf5e97be67ebc356d37fa48dbc4960600a1eb7230fbd1ea0 + languageName: node + linkType: hard + +"test-exclude@npm:^6.0.0": + version: 6.0.0 + resolution: "test-exclude@npm:6.0.0" + dependencies: + "@istanbuljs/schema": "npm:^0.1.2" + glob: "npm:^7.1.4" + minimatch: "npm:^3.0.4" + checksum: 10/8fccb2cb6c8fcb6bb4115394feb833f8b6cf4b9503ec2485c2c90febf435cac62abe882a0c5c51a37b9bbe70640cdd05acf5f45e486ac4583389f4b0855f69e5 + languageName: node + linkType: hard + +"text-hex@npm:1.0.x": + version: 1.0.0 + resolution: "text-hex@npm:1.0.0" + checksum: 10/1138f68adc97bf4381a302a24e2352f04992b7b1316c5003767e9b0d3367ffd0dc73d65001ea02b07cd0ecc2a9d186de0cf02f3c2d880b8a522d4ccb9342244a + languageName: node + linkType: hard + +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: 10/be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10/10dda13571e1f5ad37546827e9b6d4252d2e0bc176c24a101252153ef435d83696e2557fe128c4678e4e78f5f01e83711c703eef9814eb12dab028580d45980a + languageName: node + linkType: hard + +"triple-beam@npm:^1.3.0": + version: 1.4.1 + resolution: "triple-beam@npm:1.4.1" + checksum: 10/2e881a3e8e076b6f2b85b9ec9dd4a900d3f5016e6d21183ed98e78f9abcc0149e7d54d79a3f432b23afde46b0885bdcdcbff789f39bc75de796316961ec07f61 + languageName: node + linkType: hard + +"ts-node@npm:^8.8.1": + version: 8.10.2 + resolution: "ts-node@npm:8.10.2" + dependencies: + arg: "npm:^4.1.0" + diff: "npm:^4.0.1" + make-error: "npm:^1.1.1" + source-map-support: "npm:^0.5.17" + yn: "npm:3.1.1" + peerDependencies: + typescript: ">=2.7" + bin: + ts-node: dist/bin.js + ts-node-script: dist/bin-script.js + ts-node-transpile-only: dist/bin-transpile.js + ts-script: dist/bin-script-deprecated.js + checksum: 10/1431026e6e9e8971ecaba14fdf9960541918c0560344d95e4942b765dbd96d5648b99ca02a5090046130aa9870164b82ba8090a4eda048d19da3ad7aceeb0b49 + languageName: node + linkType: hard + +"tslib@npm:^1.13.0, tslib@npm:^1.8.1": + version: 1.14.1 + resolution: "tslib@npm:1.14.1" + checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb + languageName: node + linkType: hard + +"tslint@npm:^6.1.0": + version: 6.1.3 + resolution: "tslint@npm:6.1.3" + dependencies: + "@babel/code-frame": "npm:^7.0.0" + builtin-modules: "npm:^1.1.1" + chalk: "npm:^2.3.0" + commander: "npm:^2.12.1" + diff: "npm:^4.0.1" + glob: "npm:^7.1.1" + js-yaml: "npm:^3.13.1" + minimatch: "npm:^3.0.4" + mkdirp: "npm:^0.5.3" + resolve: "npm:^1.3.2" + semver: "npm:^5.3.0" + tslib: "npm:^1.13.0" + tsutils: "npm:^2.29.0" + peerDependencies: + typescript: ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + bin: + tslint: bin/tslint + checksum: 10/26720946260151c6b4e91e637443f3c09466dcd29bb3455ba4ae39a8d8d249a5f63cb6ec09ae916bd9e4385533f1df9954a2b349349336fb44ed826f5c38e6ec + languageName: node + linkType: hard + +"tsutils@npm:^2.29.0": + version: 2.29.0 + resolution: "tsutils@npm:2.29.0" + dependencies: + tslib: "npm:^1.8.1" + peerDependencies: + typescript: ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + checksum: 10/9724fee9a21c399e5914f50d888467f6d116f2e466ba77d294de0437ee7bb4a60e0c919a36518845af8c6fa0aabf6b72a4a01d4464db16fa719ff4e0dd45cb82 + languageName: node + linkType: hard + +"tweetnacl@npm:^1.0.1": + version: 1.0.3 + resolution: "tweetnacl@npm:1.0.3" + checksum: 10/ca122c2f86631f3c0f6d28efb44af2a301d4a557a62a3e2460286b08e97567b258c2212e4ad1cfa22bd6a57edcdc54ba76ebe946847450ab0999e6d48ccae332 + languageName: node + linkType: hard + +"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 10/5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d + languageName: node + linkType: hard + +"type-fest@npm:^0.8.0": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 + languageName: node + linkType: hard + +"typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: "npm:^1.0.0" + checksum: 10/7c850c3433fbdf4d04f04edfc751743b8f577828b8e1eb93b95a3bce782d156e267d83e20fb32b3b47813e69a69ab5e9b5342653332f7d21c7d1210661a7a72c + languageName: node + linkType: hard + +"typescript@npm:5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/6e4e6a14a50c222b3d14d4ea2f729e79f972fa536ac1522b91202a9a65af3605c2928c4a790a4a50aa13694d461c479ba92cedaeb1e7b190aadaa4e4b96b8e18 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A5.3.3#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10/c93786fcc9a70718ba1e3819bab56064ead5817004d1b8186f8ca66165f3a2d0100fee91fa64c840dcd45f994ca5d615d8e1f566d39a7470fc1e014dbb4cf15d + languageName: node + linkType: hard + +"unique-filename@npm:^3.0.0": + version: 3.0.0 + resolution: "unique-filename@npm:3.0.0" + dependencies: + unique-slug: "npm:^4.0.0" + checksum: 10/8e2f59b356cb2e54aab14ff98a51ac6c45781d15ceaab6d4f1c2228b780193dc70fae4463ce9e1df4479cb9d3304d7c2043a3fb905bdeca71cc7e8ce27e063df + languageName: node + linkType: hard + +"unique-slug@npm:^4.0.0": + version: 4.0.0 + resolution: "unique-slug@npm:4.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10/40912a8963fc02fb8b600cf50197df4a275c602c60de4cac4f75879d3c48558cfac48de08a25cc10df8112161f7180b3bbb4d662aadb711568602f9eddee54f0 + languageName: node + linkType: hard + +"universalify@npm:^2.0.0": + version: 2.0.1 + resolution: "universalify@npm:2.0.1" + checksum: 10/ecd8469fe0db28e7de9e5289d32bd1b6ba8f7183db34f3bfc4ca53c49891c2d6aa05f3fb3936a81285a905cc509fb641a0c3fc131ec786167eff41236ae32e60 + languageName: node + linkType: hard + +"update-browserslist-db@npm:^1.0.13": + version: 1.0.16 + resolution: "update-browserslist-db@npm:1.0.16" + dependencies: + escalade: "npm:^3.1.2" + picocolors: "npm:^1.0.1" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10/071bf0b2fb8568db6cd42ee2598ac9b87c794a7229fcbf1b035ae7f883e770c07143f16a5371525d5bcb94b99f9a1b279036142b0195ffd4cf5a0008fc4a500e + languageName: node + linkType: hard + +"uri-js@npm:^4.2.2": + version: 4.4.1 + resolution: "uri-js@npm:4.4.1" + dependencies: + punycode: "npm:^2.1.0" + checksum: 10/b271ca7e3d46b7160222e3afa3e531505161c9a4e097febae9664e4b59912f4cbe94861361a4175edac3a03fee99d91e44b6a58c17a634bc5a664b19fc76fbcb + languageName: node + linkType: hard + +"util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 10/474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2 + languageName: node + linkType: hard + +"uuid@npm:^8.3.2": + version: 8.3.2 + resolution: "uuid@npm:8.3.2" + bin: + uuid: dist/bin/uuid + checksum: 10/9a5f7aa1d6f56dd1e8d5f2478f855f25c645e64e26e347a98e98d95781d5ed20062d6cca2eecb58ba7c84bc3910be95c0451ef4161906abaab44f9cb68ffbdd1 + languageName: node + linkType: hard + +"which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 10/1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + +"which@npm:2.0.2, which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10/4782f8a1d6b8fc12c65e968fea49f59752bf6302dc43036c3bf87da718a80710f61a062516e9764c70008b487929a73546125570acea95c5b5dcc8ac3052c70f + languageName: node + linkType: hard + +"which@npm:^4.0.0": + version: 4.0.0 + resolution: "which@npm:4.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10/f17e84c042592c21e23c8195108cff18c64050b9efb8459589116999ea9da6dd1509e6a1bac3aeebefd137be00fabbb61b5c2bc0aa0f8526f32b58ee2f545651 + languageName: node + linkType: hard + +"winston-transport@npm:^4.7.0": + version: 4.7.0 + resolution: "winston-transport@npm:4.7.0" + dependencies: + logform: "npm:^2.3.2" + readable-stream: "npm:^3.6.0" + triple-beam: "npm:^1.3.0" + checksum: 10/c8eae7b110e68396edcf26aec86608bd8ac98f3cc05961064e2e577b023d9c4aa485546cacba84efaf48b7d6b1e282dc211fd959ee16cbd31d34476d96daea43 + languageName: node + linkType: hard + +"winston@npm:^3.2.1, winston@npm:^3.3.3, winston@npm:^3.7.2": + version: 3.13.0 + resolution: "winston@npm:3.13.0" + dependencies: + "@colors/colors": "npm:^1.6.0" + "@dabh/diagnostics": "npm:^2.0.2" + async: "npm:^3.2.3" + is-stream: "npm:^2.0.0" + logform: "npm:^2.4.0" + one-time: "npm:^1.0.0" + readable-stream: "npm:^3.4.0" + safe-stable-stringify: "npm:^2.3.1" + stack-trace: "npm:0.0.x" + triple-beam: "npm:^1.3.0" + winston-transport: "npm:^4.7.0" + checksum: 10/436675598359af27e4eabde2ce578cf77da893ffd57d0479f037fef939e8eb721031f0102b14399eee93b3412b545946c431d1fff23db3beeac2ffa395537f7b + languageName: node + linkType: hard + +"workerpool@npm:6.2.0": + version: 6.2.0 + resolution: "workerpool@npm:6.2.0" + checksum: 10/c7dce6eae02098d70fe9924503bd95688564a1316cbb96fe55600f7ede0e66f1f2fea4d18aaec71fcee32373d17eda0bf87ac4dac8e5823e90ca1524aac90bdc + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/cebdaeca3a6880da410f75209e68cd05428580de5ad24535f22696d7d9cab134d1f8498599f344c3cf0fb37c1715807a183778d8c648d6cc0cb5ff2bb4236540 + languageName: node + linkType: hard + +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10/0d64f2d438e0b555e693b95aee7b2689a12c3be5ac458192a1ce28f542a6e9e59ddfecc37520910c2c88eb1f82a5411260566dba5064e8f9895e76e169e76187 + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10/7b1e4b35e9bb2312d2ee9ee7dc95b8cb5f8b4b5a89f7dde5543fe66c1e3715663094defa50d75454ac900bd210f702d575f15f3f17fa9ec0291806d2578d1ddf + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 10/159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"write-file-atomic@npm:^3.0.0": + version: 3.0.3 + resolution: "write-file-atomic@npm:3.0.3" + dependencies: + imurmurhash: "npm:^0.1.4" + is-typedarray: "npm:^1.0.0" + signal-exit: "npm:^3.0.2" + typedarray-to-buffer: "npm:^3.1.5" + checksum: 10/0955ab94308b74d32bc252afe69d8b42ba4b8a28b8d79f399f3f405969f82623f981e35d13129a52aa2973450f342107c06d86047572637584e85a1c0c246bf3 + languageName: node + linkType: hard + +"y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 10/392870b2a100bbc643bc035fe3a89cef5591b719c7bdc8721bcdb3d27ab39fa4870acdca67b0ee096e146d769f311d68eda6b8195a6d970f227795061923013f + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10/5f1b5f95e3775de4514edbb142398a2c37849ccfaf04a015be5d75521e9629d3be29bd4432d23c57f37e5b61ade592fb0197022e9993f81a06a5afbdcda9346d + languageName: node + linkType: hard + +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 10/9af0a4329c3c6b779ac4736c69fae4190ac03029fa27c1aef4e6bcc92119b73dea6fe5db5fe881fb0ce2a0e9539a42cdf60c7c21eda04d1a0b8c082e38509efb + languageName: node + linkType: hard + +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10/4cb02b42b8a93b5cf50caf5d8e9beb409400a8a4d85e83bb0685c1457e9ac0b7a00819e9f5991ac25ffabb56a78e2f017c1acc010b3a1babfe6de690ba531abd + languageName: node + linkType: hard + +"yargs-parser@npm:20.2.4": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: 10/db8f251ae40e24782d5c089ed86883ba3c0ce7f3c174002a67ec500802f928df9d505fea5d04829769221ce20b0f69f6fb1138fbb2e2fb102e3e9d426d20edab + languageName: node + linkType: hard + +"yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: "npm:^5.0.0" + decamelize: "npm:^1.2.0" + checksum: 10/235bcbad5b7ca13e5abc54df61d42f230857c6f83223a38e4ed7b824681875b7f8b6ed52139d88a3ad007050f28dc0324b3c805deac7db22ae3b4815dae0e1bf + languageName: node + linkType: hard + +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.9": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 10/0188f430a0f496551d09df6719a9132a3469e47fe2747208b1dd0ab2bb0c512a95d0b081628bbca5400fb20dbf2fabe63d22badb346cecadffdd948b049f3fcc + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e + languageName: node + linkType: hard + +"yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: "npm:^6.0.0" + decamelize: "npm:^4.0.0" + flat: "npm:^5.0.2" + is-plain-obj: "npm:^2.1.0" + checksum: 10/68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + +"yargs@npm:16.2.0, yargs@npm:^16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: "npm:^7.0.2" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.0" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^20.2.2" + checksum: 10/807fa21211d2117135d557f95fcd3c3d390530cda2eca0c840f1d95f0f40209dcfeb5ec18c785a1f3425896e623e3b2681e8bb7b6600060eda1c3f4804e7957e + languageName: node + linkType: hard + +"yargs@npm:^15.0.2": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: "npm:^6.0.0" + decamelize: "npm:^1.2.0" + find-up: "npm:^4.1.0" + get-caller-file: "npm:^2.0.1" + require-directory: "npm:^2.1.1" + require-main-filename: "npm:^2.0.0" + set-blocking: "npm:^2.0.0" + string-width: "npm:^4.2.0" + which-module: "npm:^2.0.0" + y18n: "npm:^4.0.0" + yargs-parser: "npm:^18.1.2" + checksum: 10/bbcc82222996c0982905b668644ca363eebe6ffd6a572fbb52f0c0e8146661d8ce5af2a7df546968779bb03d1e4186f3ad3d55dfaadd1c4f0d5187c0e3a5ba16 + languageName: node + linkType: hard + +"yargs@npm:^17.2.1, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10/abb3e37678d6e38ea85485ed86ebe0d1e3464c640d7d9069805ea0da12f69d5a32df8e5625e370f9c96dd1c2dc088ab2d0a4dd32af18222ef3c4224a19471576 + languageName: node + linkType: hard + +"yn@npm:3.1.1": + version: 3.1.1 + resolution: "yn@npm:3.1.1" + checksum: 10/2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6 + languageName: node + linkType: hard + +"yocto-queue@npm:^0.1.0": + version: 0.1.0 + resolution: "yocto-queue@npm:0.1.0" + checksum: 10/f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 + languageName: node + linkType: hard diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/satp-erc20-interact.json b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/satp-erc20-interact.json new file mode 100644 index 0000000000..472d18de98 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/fabric/satp-erc20-interact.json @@ -0,0 +1,38 @@ +{ + "name": "SATP-ERC20", + "contract": "fabric", + "ontology": { + "lock": [{ + "functionSignature": "transferFrom", + "variables": ["owner", "bridge", "amount"] + } + ], + "unlock": [{ + "functionSignature": "transfer", + "variables": ["owner", "amount"] + } + ], + "mint": [{ + "functionSignature": "mint", + "variables": ["amount"] + } + ], + "burn": [{ + "functionSignature": "burn", + "variables": ["amount"] + } + ], + "assign": [{ + "functionSignature": "assign", + "variables": ["bridge", "receiver", "amount"] + } + ], + "checkPermission": [{ + "functionSignature": "hasPermission", + "variables": ["bridgeMSPID"] + } + ] + }, + "ownerSignature": "", + "bridgeSignature": "" +} \ No newline at end of file diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts new file mode 100644 index 0000000000..099c368482 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/besu-bridge.test.ts @@ -0,0 +1,592 @@ +import { + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, +} from "@hyperledger/cactus-common"; +import { + pruneDockerAllIfGithubAction, + Containers, + BesuTestLedger, +} from "@hyperledger/cactus-test-tooling"; +import { v4 as uuidv4 } from "uuid"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import SATPContract from "../../../solidity/generated/satp-erc20.sol/SATPContract.json"; +import SATPWrapperContract from "../../../../solidity/generated/satp-wrapper.sol/SATPWrapperContract.json"; +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { + EthContractInvocationType, + IPluginLedgerConnectorBesuOptions, + PluginLedgerConnectorBesu, + ReceiptType, + Web3SigningCredentialType, +} from "@hyperledger/cactus-plugin-ledger-connector-besu"; +import Web3 from "web3"; +import { Account } from "web3-core"; +import { BesuBridge } from "../../../../main/typescript/core/stage-services/satp-bridge/besu-bridge"; +import { BesuAsset } from "../../../../main/typescript/core/stage-services/satp-bridge/types/besu-asset"; +import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { BesuConfig } from "../../../../main/typescript/types/blockchain-interaction"; +import SATPInteraction from "../../../solidity/satp-erc20-interact.json"; + +const logLevel: LogLevelDesc = "DEBUG"; + +let besuLedger: BesuTestLedger; +let erc20TokenContract: string; +let contractNameWrapper: string; + +let rpcApiHttpHost: string; +let rpcApiWsHost: string; +let web3: Web3; +let firstHighNetWorthAccount: string; +let testing_connector: PluginLedgerConnectorBesu; +let besuKeyPair: { privateKey: string }; +let bridgeEthAccount: Account; +let assigneeEthAccount: Account; +const BESU_ASSET_ID = uuidv4(); + +let keychainPlugin1: PluginKeychainMemory; +let keychainPlugin2: PluginKeychainMemory; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "BUNGEE - Hermes", +}); + +let pluginBungeeHermesOptions: IPluginBungeeHermesOptions; + +let besuBridge: BesuBridge; +let besuConfig: BesuConfig; +let besuOptions: IPluginLedgerConnectorBesuOptions; + +let assetContractAddress: string; +let wrapperContractAddress: string; + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + { + besuLedger = new BesuTestLedger({ + logLevel, + emitContainerLogs: true, + envVars: ["BESU_NETWORK=dev"], + }); + await besuLedger.start(); + + rpcApiHttpHost = await besuLedger.getRpcApiHttpHost(); + rpcApiWsHost = await besuLedger.getRpcApiWsHost(); + web3 = new Web3(rpcApiHttpHost); + firstHighNetWorthAccount = besuLedger.getGenesisAccountPubKey(); + + bridgeEthAccount = await besuLedger.createEthTestAccount(); + + assigneeEthAccount = await besuLedger.createEthTestAccount(); + + besuKeyPair = { + privateKey: besuLedger.getGenesisAccountPrivKey(), + }; + + erc20TokenContract = "SATPContract"; + contractNameWrapper = "SATPWrapperContract"; + + const keychainEntryValue = besuKeyPair.privateKey; + const keychainEntryKey = uuidv4(); + keychainPlugin1 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin2 = new PluginKeychainMemory({ + instanceId: uuidv4(), + keychainId: uuidv4(), + + backend: new Map([[keychainEntryKey, keychainEntryValue]]), + logLevel, + }); + + keychainPlugin1.set(erc20TokenContract, JSON.stringify(SATPContract)); + keychainPlugin2.set( + contractNameWrapper, + JSON.stringify(SATPWrapperContract), + ); + + const pluginRegistry = new PluginRegistry({ + plugins: [keychainPlugin1, keychainPlugin2], + }); + + besuOptions = { + instanceId: uuidv4(), + rpcApiHttpHost, + rpcApiWsHost, + pluginRegistry, + logLevel, + }; + testing_connector = new PluginLedgerConnectorBesu(besuOptions); + pluginRegistry.add(testing_connector); + + await testing_connector.transact({ + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + consistencyStrategy: { + blockConfirmations: 0, + receiptType: ReceiptType.NodeTxPoolAck, + }, + transactionConfig: { + from: firstHighNetWorthAccount, + to: bridgeEthAccount.address, + value: 10e9, + gas: 1000000, + }, + }); + + const balance = await web3.eth.getBalance(bridgeEthAccount.address); + expect(balance).toBeTruthy(); + expect(parseInt(balance, 10)).toBeGreaterThan(10e9); + log.info("Connector initialized"); + + const deployOutSATPContract = await testing_connector.deployContract({ + keychainId: keychainPlugin1.getKeychainId(), + contractName: erc20TokenContract, + contractAbi: SATPContract.abi, + constructorArgs: [firstHighNetWorthAccount, BESU_ASSET_ID], + web3SigningCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutSATPContract).toBeTruthy(); + expect(deployOutSATPContract.transactionReceipt).toBeTruthy(); + expect( + deployOutSATPContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + + assetContractAddress = + deployOutSATPContract.transactionReceipt.contractAddress ?? ""; + + log.info("SATPContract Deployed successfully"); + + const deployOutWrapperContract = await testing_connector.deployContract({ + keychainId: keychainPlugin2.getKeychainId(), + contractName: contractNameWrapper, + contractAbi: SATPWrapperContract.abi, + constructorArgs: [bridgeEthAccount.address], + web3SigningCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + bytecode: SATPWrapperContract.bytecode.object, + gas: 999999999999999, + }); + expect(deployOutWrapperContract).toBeTruthy(); + expect(deployOutWrapperContract.transactionReceipt).toBeTruthy(); + expect( + deployOutWrapperContract.transactionReceipt.contractAddress, + ).toBeTruthy(); + log.info("SATPWrapperContract Deployed successfully"); + + wrapperContractAddress = + deployOutWrapperContract.transactionReceipt.contractAddress ?? ""; + + pluginBungeeHermesOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + //pluginRegistry: new PluginRegistry(), + logLevel, + }; + + besuConfig = { + keychainId: keychainPlugin2.getKeychainId(), + signingCredential: { + ethAccount: bridgeEthAccount.address, + secret: bridgeEthAccount.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + contractName: contractNameWrapper, + contractAddress: wrapperContractAddress, + options: besuOptions, + bungeeOptions: pluginBungeeHermesOptions, + gas: 9999999999999, + logLevel, + }; + + const giveRoleRes = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "giveRole", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 1000000, + }); + + expect(giveRoleRes).toBeTruthy(); + expect(giveRoleRes.success).toBeTruthy(); + log.info("BRIDGE_ROLE given to SATPWrapperContract successfully"); + } +}); + +afterAll(async () => { + await besuLedger.stop(); + await besuLedger.destroy(); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); + +describe("Besu Bridge Test", () => { + it("Should Initialize the bridge", async () => { + besuBridge = new BesuBridge(besuConfig); + expect(besuBridge).toBeDefined(); + }); + it("Should Wrap a token", async () => { + const asset = { + tokenId: BESU_ASSET_ID, + tokenType: TokenType.NONSTANDARD, + owner: firstHighNetWorthAccount, + contractName: erc20TokenContract, + contractAddress: assetContractAddress, + ontology: JSON.stringify(SATPInteraction), + } as BesuAsset; + + const response = await besuBridge.wrapAsset(asset); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await besuBridge.getAssets(); + expect(response2).toBeDefined(); + expect(response2.length).toBe(1); + expect(response2[0]).toBe(BESU_ASSET_ID); + + const response3 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response3).toBeDefined(); + expect(response3.tokenId).toBe(BESU_ASSET_ID); + expect(response3.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response3.owner).toBe(firstHighNetWorthAccount); + expect(response3.contractAddress).toBe(assetContractAddress); + }); + + it("Should Lock a token", async () => { + const responseMint = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "mint", + params: [firstHighNetWorthAccount, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseMint).toBeTruthy(); + expect(responseMint.success).toBeTruthy(); + log.info("Minted 100 tokens to firstHighNetWorthAccount"); + + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); + + const response = await besuBridge.lockAsset(BESU_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(BESU_ASSET_ID); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.owner).toBe(firstHighNetWorthAccount); + expect(response2.contractAddress).toBe(assetContractAddress); + expect(response2.amount).toBe("100"); + log.info("Locked 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("100"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + }); + + it("Should Unlock a token", async () => { + const response = await besuBridge.unlockAsset(BESU_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(BESU_ASSET_ID); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.owner).toBe(firstHighNetWorthAccount); + expect(response2.contractAddress).toBe(assetContractAddress); + expect(response2.amount).toBe("0"); + log.info("Unlocked 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was transfer correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [firstHighNetWorthAccount], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("100"); + log.info("Amount was transfer correctly from the Wrapper account"); + }); + + it("Should Burn a token", async () => { + const responseApprove = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Send, + methodName: "approve", + params: [wrapperContractAddress, "100"], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseApprove).toBeTruthy(); + expect(responseApprove.success).toBeTruthy(); + log.info("Approved 100 tokens to SATPWrapperContract"); + + const response = await besuBridge.lockAsset(BESU_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Locked 100 tokens successfully"); + + const response2 = await besuBridge.burnAsset(BESU_ASSET_ID, 100); + expect(response2).toBeDefined(); + expect(response2.transactionId).toBeDefined(); + expect(response2.transactionReceipt).toBeDefined(); + log.info("Burned 100 tokens successfully"); + + const response3 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response3).toBeDefined(); + expect(response3.tokenId).toBe(BESU_ASSET_ID); + expect(response3.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response3.owner).toBe(firstHighNetWorthAccount); + expect(response3.contractAddress).toBe(assetContractAddress); + expect(response3.amount).toBe("0"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was burned correctly to the Wrapper account"); + }); + + it("Should Mint a token", async () => { + const response = await besuBridge.mintAsset(BESU_ASSET_ID, 100); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Minted 100 tokens successfully"); + + const response2 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(BESU_ASSET_ID); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.owner).toBe(firstHighNetWorthAccount); + expect(response2.contractAddress).toBe(assetContractAddress); + expect(response2.amount).toBe("100"); + log.info("Minted 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("100"); + log.info("Amount was minted correctly to the Wrapper account"); + }); + + it("Should Assign a token", async () => { + const response = await besuBridge.assignAsset( + BESU_ASSET_ID, + assigneeEthAccount.address, + 100, + ); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + log.info("Assigned 100 tokens successfully"); + + const response2 = await besuBridge.getAsset(BESU_ASSET_ID); + expect(response2).toBeDefined(); + expect(response2.tokenId).toBe(BESU_ASSET_ID); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.contractAddress).toBe(assetContractAddress); + expect(response2.amount).toBe("0"); + log.info("Assigned 100 tokens successfully"); + + const responseBalanceBridge = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [wrapperContractAddress], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceBridge).toBeTruthy(); + expect(responseBalanceBridge.success).toBeTruthy(); + expect(responseBalanceBridge.callOutput).toBe("0"); + log.info("Amount was assigned correctly to the Wrapper account"); + + const responseBalanceOwner = await testing_connector.invokeContract({ + contractName: erc20TokenContract, + keychainId: keychainPlugin1.getKeychainId(), + invocationType: EthContractInvocationType.Call, + methodName: "checkBalance", + params: [assigneeEthAccount.address], + signingCredential: { + ethAccount: firstHighNetWorthAccount, + secret: besuKeyPair.privateKey, + type: Web3SigningCredentialType.PrivateKeyHex, + }, + gas: 999999999, + }); + expect(responseBalanceOwner).toBeTruthy(); + expect(responseBalanceOwner.success).toBeTruthy(); + expect(responseBalanceOwner.callOutput).toBe("100"); + log.info("Amount was assigned correctly to the Assignee account"); + }); + + it("Should Unwrap a token", async () => { + const response = await besuBridge.unwrapAsset(BESU_ASSET_ID); + expect(response).toBeDefined(); + expect(response.transactionId).toBeDefined(); + expect(response.transactionReceipt).toBeDefined(); + + const response2 = await besuBridge.getAssets(); + expect(response2).toBeDefined(); + expect(response2.length).toBe(0); + log.info("Unwrapped 100 tokens successfully"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts new file mode 100644 index 0000000000..fea1d1122b --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/bridge/fabric-bridge.test.ts @@ -0,0 +1,1062 @@ +import { + IListenOptions, + LogLevelDesc, + LoggerProvider, + Secp256k1Keys, + Servers, +} from "@hyperledger/cactus-common"; +import "jest-extended"; + +import { PluginRegistry } from "@hyperledger/cactus-core"; +import { PluginKeychainMemory } from "@hyperledger/cactus-plugin-keychain-memory"; +import { DiscoveryOptions } from "fabric-network"; +import bodyParser from "body-parser"; +import path from "path"; + +import http, { Server } from "http"; + +import fs from "fs-extra"; + +import { + Configuration, + DefaultEventHandlerStrategy, + FabricSigningCredential, + IPluginLedgerConnectorFabricOptions, + PluginLedgerConnectorFabric, + DefaultApi as FabricApi, + FileBase64, + ChainCodeProgrammingLanguage, + FabricContractInvocationType, +} from "@hyperledger/cactus-plugin-ledger-connector-fabric"; +import { + Containers, + FABRIC_25_LTS_AIO_FABRIC_VERSION, + FABRIC_25_LTS_AIO_IMAGE_VERSION, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + FabricTestLedgerV1, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import express from "express"; +import { AddressInfo } from "net"; + +import { v4 as uuidv4 } from "uuid"; +import { FabricBridge } from "../../../../main/typescript/core/stage-services/satp-bridge/fabric-bridge"; +import { FabricConfig } from "../../../../main/typescript/types/blockchain-interaction"; +import { IPluginBungeeHermesOptions } from "@hyperledger/cactus-plugin-bungee-hermes"; +import { TokenType } from "../../../../main/typescript/core/stage-services/satp-bridge/types/asset"; +import SATPInteraction from "../../../../test/typescript/fabric/satp-erc20-interact.json"; +let fabricServer: Server; + +let fabricSigningCredential: FabricSigningCredential; +let bridgeFabricSigningCredential: FabricSigningCredential; +const logLevel: LogLevelDesc = "DEBUG"; + +let fabricLedger: FabricTestLedgerV1; +let satpContractName: string; +let satpWrapperContractName: string; +let fabricChannelName: string; + +let configFabric: Configuration; +let apiClient: FabricApi; + +let fabricConnector: PluginLedgerConnectorFabric; + +let pluginBungeeFabricOptions: IPluginBungeeHermesOptions; + +let fabricBridge: FabricBridge; +let fabricConfig: FabricConfig; + +let clientId: string; + +let bridgeId: string; + +const FABRIC_ASSET_ID = uuidv4(); + +const BRIDGE_ID = + "x509::/OU=org2/OU=client/OU=department1/CN=bridge::/C=UK/ST=Hampshire/L=Hursley/O=org2.example.com/CN=ca.org2.example.com"; + +const log = LoggerProvider.getOrCreate({ + level: logLevel, + label: "Satp - Hermes", +}); + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + { + // Fabric ledger connection + const channelId = "mychannel"; + fabricChannelName = channelId; + + fabricLedger = new FabricTestLedgerV1({ + emitContainerLogs: true, + publishAllPorts: true, + imageName: "ghcr.io/hyperledger/cactus-fabric2-all-in-one", + imageVersion: FABRIC_25_LTS_AIO_IMAGE_VERSION, + envVars: new Map([["FABRIC_VERSION", FABRIC_25_LTS_AIO_FABRIC_VERSION]]), + logLevel, + }); + + await fabricLedger.start(); + log.info("Fabric Ledger started"); + + const connectionProfile = await fabricLedger.getConnectionProfileOrg1(); + expect(connectionProfile).not.toBeUndefined(); + + const bridgeProfile = await fabricLedger.getConnectionProfileOrgX("org2"); + expect(bridgeProfile).not.toBeUndefined(); + + const enrollAdminOut = await fabricLedger.enrollAdmin(); + const adminWallet = enrollAdminOut[1]; + + const enrollAdminBridgeOut = await fabricLedger.enrollAdminV2({ + organization: "org2", + }); + const bridgeWallet = enrollAdminBridgeOut[1]; + + const [userIdentity] = await fabricLedger.enrollUser(adminWallet); + + const opts = { + enrollmentID: "bridge", + organization: "org2", + wallet: bridgeWallet, + }; + + const [bridgeIdentity] = await fabricLedger.enrollUserV2(opts); + + const sshConfig = await fabricLedger.getSshConfig(); + + log.info("enrolled admin"); + + const keychainInstanceId = uuidv4(); + const keychainId = uuidv4(); + const keychainEntryKey = "user1"; + const keychainEntryValue = JSON.stringify(userIdentity); + + console.log("keychainEntryValue: ", keychainEntryValue); + + const keychainInstanceIdBridge = uuidv4(); + const keychainIdBridge = uuidv4(); + const keychainEntryKeyBridge = "bridge1"; + const keychainEntryValueBridge = JSON.stringify(bridgeIdentity); + + console.log("keychainEntryValue: ", keychainEntryValueBridge); + + const keychainPlugin = new PluginKeychainMemory({ + instanceId: keychainInstanceId, + keychainId, + logLevel, + backend: new Map([ + [keychainEntryKey, keychainEntryValue], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const keychainPluginBridge = new PluginKeychainMemory({ + instanceId: keychainInstanceIdBridge, + keychainId: keychainIdBridge, + logLevel, + backend: new Map([ + [keychainEntryKeyBridge, keychainEntryValueBridge], + ["some-other-entry-key", "some-other-entry-value"], + ]), + }); + + const pluginRegistry = new PluginRegistry({ plugins: [keychainPlugin] }); + + const pluginRegistryBridge = new PluginRegistry({ + plugins: [keychainPluginBridge], + }); + + const discoveryOptions: DiscoveryOptions = { + enabled: true, + asLocalhost: true, + }; + + const pluginOptions: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + sshConfig, + logLevel: "DEBUG", + connectionProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConnector = new PluginLedgerConnectorFabric(pluginOptions); + + const expressApp = express(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + fabricServer = http.createServer(expressApp); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 3000, + server: fabricServer, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + + await fabricConnector.getOrCreateWebServices(); + await fabricConnector.registerWebServices(expressApp); + + log.info("Fabric Ledger connector check"); + + const apiUrl = `http://${address}:${port}`; + + configFabric = new Configuration({ basePath: apiUrl }); + + apiClient = new FabricApi(configFabric); + + // deploy contracts ... + satpContractName = "satp-contract"; + satpWrapperContractName = "satp-wrapper-contract"; + const satpContractRelPath = + "../../../../test/typescript/fabric/contracts/satp-contract/chaincode-typescript"; + const wrapperSatpContractRelPath = + "../../../../main/typescript/fabric-contracts/satp-wrapper/chaincode-typescript"; + const satpContractDir = path.join(__dirname, satpContractRelPath); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-contract-interface.ts + // │ ├── satp-contract.ts + // ├── tsconfig.json + // ├── lib + // │ └── tokenERC20.js + // -------- + const satpSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract-interface.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-contract.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./tokenERC20.ts"; + const relativePath = "./src/"; + const filePath = path.join(satpContractDir, relativePath, filename); + const buffer = await fs.readFile(filePath); + satpSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const wrapperSatpContractDir = path.join( + __dirname, + wrapperSatpContractRelPath, + ); + + // ├── package.json + // ├── src + // │ ├── index.ts + // │ ├── interaction-signature.ts + // │ ├── ITraceableContract.ts + // │ ├── satp-wrapper.ts + // │ └── token.ts + // ├── tsconfig.json + // -------- + const wrapperSourceFiles: FileBase64[] = []; + { + const filename = "./tsconfig.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./package.json"; + const relativePath = "./"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./index.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./interaction-signature.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./ITraceableContract.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./satp-wrapper.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + { + const filename = "./token.ts"; + const relativePath = "./src/"; + const filePath = path.join( + wrapperSatpContractDir, + relativePath, + filename, + ); + const buffer = await fs.readFile(filePath); + wrapperSourceFiles.push({ + body: buffer.toString("base64"), + filepath: relativePath, + filename, + }); + } + + const res = await apiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + sourceFiles: satpSourceFiles, + ccName: satpContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { packageIds, lifecycle, success } = res.data; + expect(res.status).toBe(200); + expect(success).toBe(true); + expect(lifecycle).not.toBeUndefined(); + + const { + approveForMyOrgList, + installList, + queryInstalledList, + commit, + packaging, + queryCommitted, + } = lifecycle; + + expect(packageIds).toBeTruthy(); + expect(packageIds).toBeArray(); + + expect(approveForMyOrgList).toBeTruthy(); + expect(approveForMyOrgList).toBeArray(); + + expect(installList).toBeTruthy(); + expect(installList).toBeArray(); + expect(queryInstalledList).toBeTruthy(); + expect(queryInstalledList).toBeArray(); + + expect(commit).toBeTruthy(); + expect(packaging).toBeTruthy(); + expect(queryCommitted).toBeTruthy(); + log.info("SATP Contract deployed"); + + const res2 = await apiClient.deployContractV1({ + channelId, + ccVersion: "1.0.0", + sourceFiles: wrapperSourceFiles, + ccName: satpWrapperContractName, + targetOrganizations: [ + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_1, + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + ], + caFile: + FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2.ORDERER_TLS_ROOTCERT_FILE, + ccLabel: "satp-wrapper-contract", + ccLang: ChainCodeProgrammingLanguage.Typescript, + ccSequence: 1, + orderer: "orderer.example.com:7050", + ordererTLSHostnameOverride: "orderer.example.com", + connTimeout: 60, + }); + + const { + packageIds: packageIds2, + lifecycle: lifecycle2, + success: success2, + } = res2.data; + expect(res2.status).toBe(200); + expect(success2).toBe(true); + + const { + approveForMyOrgList: approveForMyOrgList2, + installList: installList2, + queryInstalledList: queryInstalledList2, + commit: commit2, + packaging: packaging2, + queryCommitted: queryCommitted2, + } = lifecycle2; + + expect(packageIds2).toBeTruthy(); + expect(packageIds2).toBeArray(); + + expect(approveForMyOrgList2).toBeTruthy(); + expect(approveForMyOrgList2).toBeArray(); + + expect(installList2).toBeTruthy(); + expect(installList2).toBeArray(); + expect(queryInstalledList2).toBeTruthy(); + expect(queryInstalledList2).toBeArray(); + + expect(commit2).toBeTruthy(); + expect(packaging2).toBeTruthy(); + expect(queryCommitted2).toBeTruthy(); + + log.info("SATP Wrapper Contract deployed"); + + fabricSigningCredential = { + keychainId, + keychainRef: keychainEntryKey, + }; + + bridgeFabricSigningCredential = { + keychainId: keychainIdBridge, + keychainRef: keychainEntryKeyBridge, + }; + + const mspId: string = userIdentity.mspId; + + const initializeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [mspId, FABRIC_ASSET_ID], + methodName: "InitToken", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse).not.toBeUndefined(); + expect(initializeResponse.status).toBeGreaterThan(199); + expect(initializeResponse.status).toBeLessThan(300); + + log.info( + `SATPContract.InitToken(): ${JSON.stringify(initializeResponse.data)}`, + ); + + const initializeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [mspId], + methodName: "Initialize", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(initializeResponse2).not.toBeUndefined(); + expect(initializeResponse2.status).toBeGreaterThan(199); + expect(initializeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.Initialize(): ${JSON.stringify(initializeResponse2.data)}`, + ); + + const setBridgeResponse = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["Org2MSP"], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + const setBridgeResponse2 = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: ["Org2MSP", BRIDGE_ID], + methodName: "setBridge", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(setBridgeResponse2).not.toBeUndefined(); + expect(setBridgeResponse2.status).toBeGreaterThan(199); + expect(setBridgeResponse2.status).toBeLessThan(300); + + log.info( + `SATPWrapper.setBridge(): ${JSON.stringify(setBridgeResponse.data)}`, + ); + + const responseClientId = await apiClient.runTransactionV1({ + contractName: satpWrapperContractName, + channelName: fabricChannelName, + params: [], + methodName: "ClientAccountID", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + clientId = responseClientId.data.functionOutput.toString(); + + pluginBungeeFabricOptions = { + keyPair: Secp256k1Keys.generateKeyPairsBuffer(), + instanceId: uuidv4(), + //pluginRegistry: new PluginRegistry(), + logLevel, + }; + + const pluginOptionsFabricBridge: IPluginLedgerConnectorFabricOptions = { + instanceId: uuidv4(), + dockerBinary: "/usr/local/bin/docker", + peerBinary: "/fabric-samples/bin/peer", + goBinary: "/usr/local/go/bin/go", + pluginRegistry: pluginRegistryBridge, + cliContainerEnv: FABRIC_25_LTS_FABRIC_SAMPLES_ENV_INFO_ORG_2, + sshConfig, + logLevel: "DEBUG", + connectionProfile: bridgeProfile, + discoveryOptions, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategy.NetworkScopeAllfortx, + commitTimeout: 300, + }, + }; + + fabricConfig = { + signingCredential: bridgeFabricSigningCredential, + channelName: fabricChannelName, + contractName: satpWrapperContractName, + options: pluginOptionsFabricBridge, + bungeeOptions: pluginBungeeFabricOptions, + logLevel, + } as FabricConfig; + + // networkDetails = { + // connectorApiPath: fabricPath, + // signingCredential: fabricSigningCredential, + // channelName: fabricChannelName, + // contractName: satpContractName, + // participant: "Org1MSP", + // }; + } +}); + +describe("Fabric Bridge Test", () => { + it("Should Initialize the bridge", async () => { + fabricBridge = new FabricBridge(fabricConfig, logLevel); + expect(fabricBridge).not.toBeUndefined(); + + bridgeId = await fabricBridge.getClientId(); + expect(bridgeId).not.toBeUndefined(); + log.debug(`Bridge ID: ${bridgeId}`); + }); + + it("Wrap asset", async () => { + const response = await fabricBridge.wrapAsset({ + tokenId: FABRIC_ASSET_ID, + tokenType: TokenType.NONSTANDARD, + owner: clientId, + mspId: "Org1MSP", + channelName: fabricChannelName, + contractName: satpContractName, + amount: 0, + ontology: JSON.stringify(SATPInteraction), + }); + + expect(response).not.toBeUndefined(); + expect(response.transactionId).not.toBeUndefined(); + expect(response.output).not.toBeUndefined(); + + log.info(`Wrap asset response: ${JSON.stringify(response)}`); + + const response2 = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + log.info(`GetAsset response: ${JSON.stringify(response2)}`); + + expect(response2).not.toBeUndefined(); + expect(response2.amount).toBe(0); + expect(response2.owner).toBe(clientId); + expect(response2.mspId).toBe("Org1MSP"); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.tokenId).toBe(FABRIC_ASSET_ID); + expect(response2.contractName).toBe(satpContractName); + expect(response2.channelName).toBe(fabricChannelName); + }); + + it("lock asset", async () => { + const responseMint = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: ["2"], + methodName: "Mint", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseMint).not.toBeUndefined(); + expect(responseMint.status).toBeGreaterThan(199); + expect(responseMint.status).toBeLessThan(300); + expect(responseMint.data).not.toBeUndefined(); + + log.info( + `Mint 2 amount asset by the owner response: ${JSON.stringify(responseMint.data)}`, + ); + + const responseApprove = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId, "2"], + methodName: "Approve", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseApprove).not.toBeUndefined(); + expect(responseApprove.status).toBeGreaterThan(199); + expect(responseApprove.status).toBeLessThan(300); + expect(responseApprove.data).not.toBeUndefined(); + + log.info( + `Approve 2 amount asset by the owner response: ${JSON.stringify(responseApprove.data)}`, + ); + + const responseLock = await fabricBridge.lockAsset(FABRIC_ASSET_ID, 2); + + expect(responseLock).not.toBeUndefined(); + expect(responseLock.transactionId).not.toBeUndefined(); + expect(responseLock.output).not.toBeUndefined(); + + log.info(`Lock asset response: ${JSON.stringify(responseLock)}`); + + const response2 = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response2).not.toBeUndefined(); + expect(response2.amount).toBe(2); + expect(response2.owner).toBe(clientId); + expect(response2.mspId).toBe("Org1MSP"); + expect(response2.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response2.tokenId).toBe(FABRIC_ASSET_ID); + expect(response2.contractName).toBe(satpContractName); + expect(response2.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response2)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("2"); + log.info("Amount was transfer correctly to the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Owner account"); + }); + + it("unlock asset", async () => { + const responseUnlock = await fabricBridge.unlockAsset(FABRIC_ASSET_ID, 2); + + expect(responseUnlock).not.toBeUndefined(); + expect(responseUnlock.transactionId).not.toBeUndefined(); + expect(responseUnlock.output).not.toBeUndefined(); + + log.info(`Unlock asset response: ${JSON.stringify(responseUnlock)}`); + + const response = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response).not.toBeUndefined(); + expect(response.amount).toBe(0); + expect(response.owner).toBe(clientId); + expect(response.mspId).toBe("Org1MSP"); + expect(response.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response.tokenId).toBe(FABRIC_ASSET_ID); + expect(response.contractName).toBe(satpContractName); + expect(response.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was transfer correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("2"); + log.info("Amount was transfer correctly to the Owner account"); + }); + + it("Should Burn a token", async () => { + const responseApprove = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId, "2"], + methodName: "Approve", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseApprove).not.toBeUndefined(); + expect(responseApprove.status).toBeGreaterThan(199); + expect(responseApprove.status).toBeLessThan(300); + expect(responseApprove.data).not.toBeUndefined(); + + log.info( + `Approve 2 amount asset by the owner response: ${JSON.stringify(responseApprove.data)}`, + ); + const responseLock = await fabricBridge.lockAsset(FABRIC_ASSET_ID, 2); + + expect(responseLock).not.toBeUndefined(); + expect(responseLock.transactionId).not.toBeUndefined(); + expect(responseLock.output).not.toBeUndefined(); + + log.info(`Lock asset response: ${JSON.stringify(responseLock)}`); + + const responseBurn = await fabricBridge.burnAsset(FABRIC_ASSET_ID, 2); + + expect(responseBurn).not.toBeUndefined(); + expect(responseBurn.transactionId).not.toBeUndefined(); + expect(responseBurn.output).not.toBeUndefined(); + + log.info( + `Burn 2 amount asset by the owner response: ${JSON.stringify(responseBurn)}`, + ); + + const response = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response).not.toBeUndefined(); + expect(response.amount).toBe(0); + expect(response.owner).toBe(clientId); + expect(response.mspId).toBe("Org1MSP"); + expect(response.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response.tokenId).toBe(FABRIC_ASSET_ID); + expect(response.contractName).toBe(satpContractName); + expect(response.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("0"); + log.info("Amount was burned correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("0"); + log.info("Amount was burned correctly from the Owner account"); + }); + + it("Should Mint a token", async () => { + const responseMint = await fabricBridge.mintAsset(FABRIC_ASSET_ID, 2); + expect(responseMint).not.toBeUndefined(); + expect(responseMint.transactionId).not.toBeUndefined(); + expect(responseMint.output).not.toBeUndefined(); + + log.info(`Mint asset response: ${JSON.stringify(responseMint)}`); + + const response = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response).not.toBeUndefined(); + expect(response.amount).toBe(2); + expect(response.owner).toBe(clientId); + expect(response.mspId).toBe("Org1MSP"); + expect(response.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response.tokenId).toBe(FABRIC_ASSET_ID); + expect(response.contractName).toBe(satpContractName); + expect(response.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("2"); + log.info("Amount was minted correctly to the Bridge account"); + }); + + it("Should Assign a token", async () => { + const responseAssign = await fabricBridge.assignAsset( + FABRIC_ASSET_ID, + clientId, + 2, + ); + expect(responseAssign).not.toBeUndefined(); + expect(responseAssign.transactionId).not.toBeUndefined(); + expect(responseAssign.output).not.toBeUndefined(); + + log.info(`Assign asset response: ${JSON.stringify(responseAssign)}`); + + const response = await fabricBridge.getAsset(FABRIC_ASSET_ID); + + expect(response).not.toBeUndefined(); + expect(response.amount).toBe(0); + expect(response.owner).toBe(clientId); + expect(response.mspId).toBe("Org1MSP"); + expect(response.tokenType).toBe(TokenType.NONSTANDARD.toString()); + expect(response.tokenId).toBe(FABRIC_ASSET_ID); + expect(response.contractName).toBe(satpContractName); + expect(response.channelName).toBe(fabricChannelName); + + log.info(`GetAsset response: ${JSON.stringify(response)}`); + + const responseBalance1 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [clientId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance1).not.toBeUndefined(); + expect(responseBalance1.status).toBeGreaterThan(199); + expect(responseBalance1.status).toBeLessThan(300); + expect(responseBalance1.data).not.toBeUndefined(); + expect(responseBalance1.data.functionOutput).toBe("2"); + log.info("Amount was assigned correctly from the Bridge account"); + + const responseBalance2 = await apiClient.runTransactionV1({ + contractName: satpContractName, + channelName: fabricChannelName, + params: [bridgeId], + methodName: "ClientIDAccountBalance", + invocationType: FabricContractInvocationType.Send, + signingCredential: fabricSigningCredential, + }); + + expect(responseBalance2).not.toBeUndefined(); + expect(responseBalance2.status).toBeGreaterThan(199); + expect(responseBalance2.status).toBeLessThan(300); + expect(responseBalance2.data).not.toBeUndefined(); + expect(responseBalance2.data.functionOutput).toBe("0"); + log.info("Amount was assigned correctly to the Owner account"); + }); + + it("Should Unwrap a token", async () => { + const responseUnwrap = await fabricBridge.unwrapAsset(FABRIC_ASSET_ID); + expect(responseUnwrap).not.toBeUndefined(); + expect(responseUnwrap.transactionId).not.toBeUndefined(); + expect(responseUnwrap.output).not.toBeUndefined(); + + log.info(`Unwrap asset response: ${JSON.stringify(responseUnwrap)}`); + + expect( + async () => await fabricBridge.getAsset(FABRIC_ASSET_ID), + ).rejects.toThrow(); + }); +}); + +afterAll(async () => { + await fabricLedger.stop(); + await fabricLedger.destroy(); + await Servers.shutdown(fabricServer); + + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + log.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts index e115d7cd87..8e20ce2bd8 100644 --- a/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/test-utils.ts @@ -1,9 +1,9 @@ import { Logger } from "@hyperledger/cactus-common"; import { - Configuration, AdminApi, TransactionApi, -} from "../../main/typescript/generated/gateway-client/typescript-axios"; +} from "../../main/typescript/generated/gateway-client/typescript-axios/api"; +import { Configuration } from "../../main/typescript/generated/gateway-client/typescript-axios"; //import { Api } from "@bufbuild/protobuf"; export function createClient( diff --git a/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts new file mode 100644 index 0000000000..5350589cad --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/satp-bridge-manager.test.ts @@ -0,0 +1,145 @@ +import "jest-extended"; +import { + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; +import { LogLevelDesc, LoggerProvider } from "@hyperledger/cactus-common"; + +import { SATPBridgeConfig } from "../../../main/typescript/core/types"; +import { SatpBridgeManager } from "../../../main/typescript/core/stage-services/satp-bridge/satp-bridge-manager"; +import { NetworkBridge } from "../../../main/typescript/core/stage-services/satp-bridge/network-bridge"; +import { + Asset, + TokenType, +} from "../../../main/typescript/core/stage-services/satp-bridge/types/asset"; + +const logLevel: LogLevelDesc = "DEBUG"; +const logger = LoggerProvider.getOrCreate({ + level: logLevel, + label: "satp-bridge-manager-test", +}); + +let network: NetworkBridge; + +beforeAll(async () => { + pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + logger.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); + + network = { + runTransaction: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + getReceipt: jest.fn().mockReturnValue("testReceipt"), + network: "testNetwork", + networkName: function (): string { + return this.network; + }, + wrapAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + unwrapAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + lockAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + unlockAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + mintAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + burnAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + assignAsset: jest.fn().mockReturnValue({ + transactionId: "testTransaction", + output: "testOutput", + }), + }; +}); + +describe("SATP bridge function testing", () => { + test("Lock asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.lockAsset(assetId, 2); + expect(receipt).toBeDefined(); + }); + test("Unlock asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.unlockAsset(assetId, 2); + expect(receipt).toBeDefined(); + }); + test("Mint asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.mintAsset(assetId, 2); + expect(receipt).toBeDefined(); + }); + test("Burn asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.burnAsset(assetId, 2); + expect(receipt).toBeDefined(); + }); + test("Assign asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const recipient = "testRecipient"; + const receipt = await bridgeManager.assignAsset(assetId, recipient, 2); + expect(receipt).toBeDefined(); + }); + test("Verify wrap asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const asset: Asset = { + tokenId: "testAssetId", + tokenType: TokenType.ERC20, + owner: "testOwner", + amount: 0, + ontology: "", + }; + const receipt = await bridgeManager.wrapAsset(asset); + expect(receipt).toBeDefined(); + }); + + test("Verify unwrap asset function works", async () => { + const bridgeConfig: SATPBridgeConfig = { network }; + const bridgeManager = new SatpBridgeManager(bridgeConfig); + const assetId = "testAssetId"; + const receipt = await bridgeManager.unwrapAsset(assetId); + expect(receipt).toBeDefined(); + }); +}); + +afterAll(async () => { + await pruneDockerAllIfGithubAction({ logLevel }) + .then(() => { + logger.info("Pruning throw OK"); + }) + .catch(async () => { + await Containers.logDiagnostics({ logLevel }); + fail("Pruning didn't throw OK"); + }); +}); diff --git a/packages/cactus-plugin-satp-hermes/tsconfig.json b/packages/cactus-plugin-satp-hermes/tsconfig.json index 430c7cd63a..179fef0810 100644 --- a/packages/cactus-plugin-satp-hermes/tsconfig.json +++ b/packages/cactus-plugin-satp-hermes/tsconfig.json @@ -19,7 +19,8 @@ "src/**/*.json" ], "exclude":[ - "./src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/**/*.ts" + "./src/main/typescript/fabric-contracts/**/*.ts", + "./src/test/typescript/fabric/**/*.ts" ], "references": [ { diff --git a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts index ff7072aa39..d6828327f4 100644 --- a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts @@ -27,7 +27,7 @@ export interface IBesuTestLedgerConstructorOptions { } export const BESU_TEST_LEDGER_DEFAULT_OPTIONS = Object.freeze({ - containerImageVersion: "2021-01-08-7a055c3", + containerImageVersion: "2024-06-09-cc2f9c5", containerImageName: "ghcr.io/hyperledger/cactus-besu-all-in-one", rpcApiHttpPort: 8545, rpcApiWsPort: 8546, diff --git a/yarn.lock b/yarn.lock index be1aa444d9..e18b07a1f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5917,6 +5917,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/protobuf@npm:1.7.2": + version: 1.7.2 + resolution: "@bufbuild/protobuf@npm:1.7.2" + checksum: 10/f23ccc77066100157043cf36bd2506acdcb235f0a902f7662fbbb992e78df4202780aeb55bd2e3fd1945bd9e52a4fca759351f333f2ff779e32996e13eb56d34 + languageName: node + linkType: hard + "@bufbuild/protobuf@npm:1.8.0, @bufbuild/protobuf@npm:^1.7.2, @bufbuild/protobuf@npm:^1.8.0": version: 1.8.0 resolution: "@bufbuild/protobuf@npm:1.8.0" @@ -8807,6 +8814,41 @@ __metadata: languageName: node linkType: hard +"@foundry-rs/easy-foundryup@npm:^0.1.3": + version: 0.1.3 + resolution: "@foundry-rs/easy-foundryup@npm:0.1.3" + dependencies: + command-exists: "npm:^1.2.9" + ts-interface-checker: "npm:^0.1.9" + checksum: 10/a653a11e670dc0d75b58d4039049706ab078cb9baea22dbc133aabe9edb4421e65bfd08c81f9e23b35985850555764edec5f28f06cf33bf23df37051b3358c43 + languageName: node + linkType: hard + +"@foundry-rs/hardhat-forge@npm:0.1.17": + version: 0.1.17 + resolution: "@foundry-rs/hardhat-forge@npm:0.1.17" + dependencies: + "@foundry-rs/easy-foundryup": "npm:^0.1.3" + "@nomiclabs/hardhat-ethers": "npm:^2.0.0" + "@nomiclabs/hardhat-waffle": "npm:^2.0.0" + "@types/sinon-chai": "npm:^3.2.3" + "@types/web3": "npm:1.0.19" + camelcase-keys: "npm:7.0.2" + debug: "npm:^4.1.1" + ethers: "npm:^5.0.0" + fs-extra: "npm:^10.1.0" + glob: "npm:^7.1.3" + true-case-path: "npm:^2.2.1" + ts-interface-checker: "npm:^0.1.9" + peerDependencies: + "@nomiclabs/hardhat-ethers": ^2.0.0 + ethereum-waffle: ^3.2.0 + ethers: ^5.0.0 + hardhat: ^2.0.0 + checksum: 10/fcdcfee1b1f244536db9ec1758e32bac0eb0b8cf4b24fdc871857fe89d1a46b48b75e2d965dca9a06793d10c81ad1a52b3034f149690648a705f9d7133cc0614 + languageName: node + linkType: hard + "@gar/promisify@npm:^1.0.1, @gar/promisify@npm:^1.1.3": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" @@ -10858,11 +10900,16 @@ __metadata: class-transformer: "npm:0.5.1" class-validator: "npm:0.14.1" crypto-js: "npm:4.2.0" + ethereum-abi-types-generator: "npm:1.3.4" + ethers: "npm:^6.13.1" express: "npm:4.21.0" fabric-network: "npm:2.2.20" fs-extra: "npm:11.2.0" + hardhat: "npm:2.22.5" knex: "npm:2.4.0" kubo-rpc-client: "npm:3.0.1" + npm-run-all: "npm:4.1.5" + openzeppelin-solidity: "npm:3.4.2" secp256k1: "npm:4.0.3" socket.io: "npm:4.6.2" sqlite3: "npm:5.1.5" @@ -13461,6 +13508,70 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-darwin-arm64@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.4.2" + checksum: 10/331d34e15127215102a4eb5698b196d5dfb1fe7f7452ef08aad39827d4b294b2424372525aa19bc88374815328321a4c2cf9fb4ba6fa0edb0bb03f65d539a905 + languageName: node + linkType: hard + +"@nomicfoundation/edr-darwin-x64@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.4.2" + checksum: 10/72f82ca892a7e1436e36445d38ecd6a448b3bc6287dfc132c133f24a6450c47f6e7ec2f73272b55b8630b25072ba82e54b3e0dc67edea20a51718c066f831bae + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2" + checksum: 10/e0fd03020d525834743a0a84fb6cea77fda6d23dcec158766cbf4e282b1ddb11370de9cf29cac5a6392c671477db5cd8b2cae4b08fc147f16f42f8fda7015a8b + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2" + checksum: 10/ce3cd5241c399540f65ec1b158ed1dd4f4defdb982f14c0476078c36d648177c901f65f03f1a8e4b248be4793f449a3c5d40b820fefc1415ee15e2a8e341d65c + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2" + checksum: 10/6104d48dbbc4ab9fb3e7caf35863868e0619e0f19fa513f0f531d50dda319025c57a0909b8a3217cc1ce6ced4b8191d3feb80735d34d2311e10c8fe6e938491b + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-x64-musl@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2" + checksum: 10/528b9fbdf73bb61e0d184f7d53abb38729369a1c1e7d00cded35e3979df2945b72f692d93588d0024dfa8d638091b086b20eee930a839ca047f372de7c4920a2 + languageName: node + linkType: hard + +"@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2" + checksum: 10/3d09106954f19ce641435289d63aa224241a45e05ae05b0bb66d6d6e2a4005f32062e2cf7244a96c01ac5ef6382a2a21dcd2fb7a6bb3b4f042f518e815665a05 + languageName: node + linkType: hard + +"@nomicfoundation/edr@npm:^0.4.0": + version: 0.4.2 + resolution: "@nomicfoundation/edr@npm:0.4.2" + dependencies: + "@nomicfoundation/edr-darwin-arm64": "npm:0.4.2" + "@nomicfoundation/edr-darwin-x64": "npm:0.4.2" + "@nomicfoundation/edr-linux-arm64-gnu": "npm:0.4.2" + "@nomicfoundation/edr-linux-arm64-musl": "npm:0.4.2" + "@nomicfoundation/edr-linux-x64-gnu": "npm:0.4.2" + "@nomicfoundation/edr-linux-x64-musl": "npm:0.4.2" + "@nomicfoundation/edr-win32-x64-msvc": "npm:0.4.2" + checksum: 10/25a2d59f82057c4df0df7c619a77fa30bb9dae5ff57b0ada8fb86ffa0eb95b7f932e9c83769ab8f82a16f65bcbd12a9be334aed7e23c6d514b9339e34bb6f5c4 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-block@npm:5.0.2": version: 5.0.2 resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.2" @@ -13507,6 +13618,15 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-common@npm:4.0.4": + version: 4.0.4 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.4" + dependencies: + "@nomicfoundation/ethereumjs-util": "npm:9.0.4" + checksum: 10/1daaede087c5dee92cb1e5309a548da2d64484722b917eccda4118d627293b61f705a990075f4d7f0f350100ed79396b3a25e7ea67824242d36d23716fe75e97 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-ethash@npm:3.0.2": version: 3.0.2 resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.2" @@ -13546,6 +13666,15 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-rlp@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.4" + bin: + rlp: bin/rlp.cjs + checksum: 10/39fb26340bb2643a66c642315aa7b6fcfbdbddddeee18b4b683b77aa93b8a031bc86d4d4144368e5dd20499dc96b8b27751c6a285ff34e7a9969b530b306ce8c + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2": version: 2.0.2 resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2" @@ -13587,6 +13716,23 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-tx@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.4" + dependencies: + "@nomicfoundation/ethereumjs-common": "npm:4.0.4" + "@nomicfoundation/ethereumjs-rlp": "npm:5.0.4" + "@nomicfoundation/ethereumjs-util": "npm:9.0.4" + ethereum-cryptography: "npm:0.1.3" + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 10/5e84de14fa464501c5c60ac6519f536d39ebc52c4d1fb79c63a66ea86f992bde4f338b0b0fdd2e5bc811ebd984e8ff41e4205e47d30001bad5b45370568bc41c + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-util@npm:9.0.2": version: 9.0.2 resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" @@ -13598,6 +13744,21 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-util@npm:9.0.4": + version: 9.0.4 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" + dependencies: + "@nomicfoundation/ethereumjs-rlp": "npm:5.0.4" + ethereum-cryptography: "npm:0.1.3" + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 10/891806c7edda29c7b3f61551949ff0c1fa5f4e122fba84878bf27362a9e058768fd01194dc0e031de2e523c30ecbeb22e6841b8ab3772c8567fef4af6480872d + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-vm@npm:7.0.2": version: 7.0.2 resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" @@ -13728,6 +13889,29 @@ __metadata: languageName: node linkType: hard +"@nomiclabs/hardhat-ethers@npm:^2.0.0": + version: 2.2.3 + resolution: "@nomiclabs/hardhat-ethers@npm:2.2.3" + peerDependencies: + ethers: ^5.0.0 + hardhat: ^2.0.0 + checksum: 10/bd239a00d3384b6dfefbf2444bacd7fdaccc9df40efac2255b4f8314f0414416e65296945bbe6debec65479a3f8a5f9d1e69aa66a39d1852e5ac1d690c3b458a + languageName: node + linkType: hard + +"@nomiclabs/hardhat-waffle@npm:^2.0.0": + version: 2.0.6 + resolution: "@nomiclabs/hardhat-waffle@npm:2.0.6" + peerDependencies: + "@nomiclabs/hardhat-ethers": ^2.0.0 + "@types/sinon-chai": ^3.2.3 + ethereum-waffle: "*" + ethers: ^5.0.0 + hardhat: ^2.0.0 + checksum: 10/55e5edd8ddbd9a1579bfd997d96e431057850ef640f826f0f0c22dcfc9db46e04f4ecd8f3ca8b3d1715a951e184b8bcfadf94ceee5f2db000ac896f617cfa2ae + languageName: node + linkType: hard + "@npmcli/agent@npm:^2.0.0": version: 2.1.1 resolution: "@npmcli/agent@npm:2.1.1" @@ -14263,13 +14447,6 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.4.0": - version: 4.4.0 - resolution: "@openzeppelin/contracts@npm:4.4.0" - checksum: 10/1c830b5ec2a9df32d94ec14bfaead2feb4f67db2ed0e0085cf074d64b4240f9cf0760858c6f0b5a19e57e81f22f9daa892b9993bd83fdc25db2fdc48ea37b7a2 - languageName: node - linkType: hard - "@openzeppelin/contracts@npm:4.9.6": version: 4.9.6 resolution: "@openzeppelin/contracts@npm:4.9.6" @@ -14277,6 +14454,13 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/contracts@npm:5.0.2": + version: 5.0.2 + resolution: "@openzeppelin/contracts@npm:5.0.2" + checksum: 10/938ebffbdade7dc59ea3df5b562c0e457bbefde9d82be8fa2acfd11da887df11653ac07922f41746b80cdbc106430e1e6978ce244fe99b00a7d9dc1418fc7670 + languageName: node + linkType: hard + "@peculiar/asn1-schema@npm:^2.3.6": version: 2.3.8 resolution: "@peculiar/asn1-schema@npm:2.3.8" @@ -16682,7 +16866,7 @@ __metadata: languageName: node linkType: hard -"@types/bn.js@npm:^4.11.3, @types/bn.js@npm:^4.11.5": +"@types/bn.js@npm:^4.11.3, @types/bn.js@npm:^4.11.5, @types/bn.js@npm:^4.11.6": version: 4.11.6 resolution: "@types/bn.js@npm:4.11.6" dependencies: @@ -16767,6 +16951,13 @@ __metadata: languageName: node linkType: hard +"@types/chai@npm:*": + version: 5.0.0 + resolution: "@types/chai@npm:5.0.0" + checksum: 10/a6c03aa6b6d59ad40ddb48d07807690efb874628c15b9d89c17d97045a9305a487933398c1e5b5f94087b1a6a9a67a7c828eb9b635104526fd25bb5f9d4c4175 + languageName: node + linkType: hard + "@types/compression@npm:1.7.4": version: 1.7.4 resolution: "@types/compression@npm:1.7.4" @@ -18086,6 +18277,32 @@ __metadata: languageName: node linkType: hard +"@types/sinon-chai@npm:^3.2.3": + version: 3.2.12 + resolution: "@types/sinon-chai@npm:3.2.12" + dependencies: + "@types/chai": "npm:*" + "@types/sinon": "npm:*" + checksum: 10/d906f2f766613534c5e9fe1437ec740fb6a9a550f02d1a0abe180c5f18fe73a99f0c12935195404d42f079f5f72a371e16b81e2aef963a6ef0ee0ed9d5d7f391 + languageName: node + linkType: hard + +"@types/sinon@npm:*": + version: 17.0.3 + resolution: "@types/sinon@npm:17.0.3" + dependencies: + "@types/sinonjs__fake-timers": "npm:*" + checksum: 10/3f82b4a477c0c57fa4f4f4fb7585cb72c2a65a7e41e5271b54edca296c8dc242c2d8e709de7a8f16af8693c87cb3ad9d96981069ae683f7197a1134892035833 + languageName: node + linkType: hard + +"@types/sinonjs__fake-timers@npm:*": + version: 8.1.5 + resolution: "@types/sinonjs__fake-timers@npm:8.1.5" + checksum: 10/3a0b285fcb8e1eca435266faa27ffff206608b69041022a42857274e44d9305822e85af5e7a43a9fae78d2ab7dc0fcb49f3ae3bda1fa81f0203064dbf5afd4f6 + languageName: node + linkType: hard + "@types/sockjs@npm:^0.3.33": version: 0.3.33 resolution: "@types/sockjs@npm:0.3.33" @@ -18267,6 +18484,13 @@ __metadata: languageName: node linkType: hard +"@types/underscore@npm:*": + version: 1.11.15 + resolution: "@types/underscore@npm:1.11.15" + checksum: 10/5a9c262566551f61744e066d33578c0fad1139c2d5314ed77a8f867487a6d7dd18616f32df4c605070fbd569b942c6d2c083be9f9ae649f41a562b52812b06be + languageName: node + linkType: hard + "@types/uuid@npm:10.0.0": version: 10.0.0 resolution: "@types/uuid@npm:10.0.0" @@ -18288,6 +18512,16 @@ __metadata: languageName: node linkType: hard +"@types/web3@npm:1.0.19": + version: 1.0.19 + resolution: "@types/web3@npm:1.0.19" + dependencies: + "@types/bn.js": "npm:*" + "@types/underscore": "npm:*" + checksum: 10/bf61a77d63cafed92a431df32505ea7e5d91f044f50ecd57e22efa10c76ec1093367403c060b8e72021f4e52513aceebb9c3edfb801b90dee09dc16dc0339d25 + languageName: node + linkType: hard + "@types/ws@npm:8.5.3, @types/ws@npm:^8.2.2": version: 8.5.3 resolution: "@types/ws@npm:8.5.3" @@ -21613,7 +21847,7 @@ __metadata: languageName: node linkType: hard -"boxen@npm:^5.0.0": +"boxen@npm:^5.0.0, boxen@npm:^5.1.2": version: 5.1.2 resolution: "boxen@npm:5.1.2" dependencies: @@ -22445,18 +22679,7 @@ __metadata: languageName: node linkType: hard -"camelcase-keys@npm:^6.2.2": - version: 6.2.2 - resolution: "camelcase-keys@npm:6.2.2" - dependencies: - camelcase: "npm:^5.3.1" - map-obj: "npm:^4.0.0" - quick-lru: "npm:^4.0.1" - checksum: 10/c1999f5b6d03bee7be9a36e48eef3da9e93e51b000677348ec8d15d51fc4418375890fb6c7155e387322d2ebb2a2cdebf9cd96607a6753d1d6c170d9b1e2eed5 - languageName: node - linkType: hard - -"camelcase-keys@npm:^7.0.0": +"camelcase-keys@npm:7.0.2, camelcase-keys@npm:^7.0.0": version: 7.0.2 resolution: "camelcase-keys@npm:7.0.2" dependencies: @@ -22468,6 +22691,17 @@ __metadata: languageName: node linkType: hard +"camelcase-keys@npm:^6.2.2": + version: 6.2.2 + resolution: "camelcase-keys@npm:6.2.2" + dependencies: + camelcase: "npm:^5.3.1" + map-obj: "npm:^4.0.0" + quick-lru: "npm:^4.0.1" + checksum: 10/c1999f5b6d03bee7be9a36e48eef3da9e93e51b000677348ec8d15d51fc4418375890fb6c7155e387322d2ebb2a2cdebf9cd96607a6753d1d6c170d9b1e2eed5 + languageName: node + linkType: hard + "camelcase@npm:^4.1.0": version: 4.1.0 resolution: "camelcase@npm:4.1.0" @@ -23390,7 +23624,7 @@ __metadata: languageName: node linkType: hard -"colors@npm:1.4.0, colors@npm:^1.1.2": +"colors@npm:1.4.0, colors@npm:^1.1.2, colors@npm:^1.4.0": version: 1.4.0 resolution: "colors@npm:1.4.0" checksum: 10/90b2d5465159813a3983ea72ca8cff75f784824ad70f2cc2b32c233e95bcfbcda101ebc6d6766bc50f57263792629bfb4f1f8a4dfbd1d240f229fc7f69b785fc @@ -23426,7 +23660,7 @@ __metadata: languageName: node linkType: hard -"command-exists@npm:^1.2.8": +"command-exists@npm:^1.2.8, command-exists@npm:^1.2.9": version: 1.2.9 resolution: "command-exists@npm:1.2.9" checksum: 10/46fb3c4d626ca5a9d274f8fe241230817496abc34d12911505370b7411999e183c11adff7078dd8a03ec4cf1391290facda40c6a4faac8203ae38c985eaedd63 @@ -26250,7 +26484,7 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:8.6.0": +"dotenv@npm:8.6.0, dotenv@npm:^8.2.0": version: 8.6.0 resolution: "dotenv@npm:8.6.0" checksum: 10/31d7b5c010cebb80046ba6853d703f9573369b00b15129536494f04b0af4ea0060ce8646e3af58b455af2f6f1237879dd261a5831656410ec92561ae1ea44508 @@ -28115,6 +28349,26 @@ __metadata: languageName: node linkType: hard +"ethereum-abi-types-generator@npm:1.3.4": + version: 1.3.4 + resolution: "ethereum-abi-types-generator@npm:1.3.4" + dependencies: + "@types/bn.js": "npm:^4.11.6" + bignumber.js: "npm:^9.0.0" + colors: "npm:^1.4.0" + dotenv: "npm:^8.2.0" + ethers: "npm:^4.0.47" + ethersv5: "npm:ethers@^5.0.32" + fs-extra: "npm:^9.0.0" + prettier: "npm:^2.0.5" + reflect-metadata: "npm:^0.1.13" + yargs: "npm:^15.3.1" + bin: + abi-types-generator: dist/bin/generator-cli.js + checksum: 10/b9b294f1c7e58af824526d408f8590a3d8e81ab9917f32ba80b586977978e9e9af15bf57dd8d772ec845f648105f79363212394647884a58106fdcce066eeafc + languageName: node + linkType: hard + "ethereum-bloom-filters@npm:^1.0.6": version: 1.0.10 resolution: "ethereum-bloom-filters@npm:1.0.10" @@ -28283,7 +28537,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^4.0.32": +"ethers@npm:^4.0.32, ethers@npm:^4.0.47": version: 4.0.49 resolution: "ethers@npm:4.0.49" dependencies: @@ -28300,7 +28554,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.0.13, ethers@npm:^5.7.1": +"ethers@npm:^5.0.0, ethers@npm:^5.0.13, ethers@npm:^5.7.1, ethersv5@npm:ethers@^5.0.32": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -28338,6 +28592,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.13.1": + version: 6.13.3 + resolution: "ethers@npm:6.13.3" + dependencies: + "@adraffy/ens-normalize": "npm:1.10.1" + "@noble/curves": "npm:1.2.0" + "@noble/hashes": "npm:1.3.2" + "@types/node": "npm:18.15.13" + aes-js: "npm:4.0.0-beta.5" + tslib: "npm:2.4.0" + ws: "npm:8.17.1" + checksum: 10/a3b11a5bd97269f2aa5e5cb844642a84fe139a188fd3c0d7d0c4c7b4958d56286e84c14cd41d1c53bd5dff8bf1060c73bd7a9bde8313f8a994d94881f4010037 + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -30000,7 +30269,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:10.1.0": +"fs-extra@npm:10.1.0, fs-extra@npm:^10.1.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" dependencies: @@ -31527,6 +31796,67 @@ __metadata: languageName: node linkType: hard +"hardhat@npm:2.22.5": + version: 2.22.5 + resolution: "hardhat@npm:2.22.5" + dependencies: + "@ethersproject/abi": "npm:^5.1.2" + "@metamask/eth-sig-util": "npm:^4.0.0" + "@nomicfoundation/edr": "npm:^0.4.0" + "@nomicfoundation/ethereumjs-common": "npm:4.0.4" + "@nomicfoundation/ethereumjs-tx": "npm:5.0.4" + "@nomicfoundation/ethereumjs-util": "npm:9.0.4" + "@nomicfoundation/solidity-analyzer": "npm:^0.1.0" + "@sentry/node": "npm:^5.18.1" + "@types/bn.js": "npm:^5.1.0" + "@types/lru-cache": "npm:^5.1.0" + adm-zip: "npm:^0.4.16" + aggregate-error: "npm:^3.0.0" + ansi-escapes: "npm:^4.3.0" + boxen: "npm:^5.1.2" + chalk: "npm:^2.4.2" + chokidar: "npm:^3.4.0" + ci-info: "npm:^2.0.0" + debug: "npm:^4.1.1" + enquirer: "npm:^2.3.0" + env-paths: "npm:^2.2.0" + ethereum-cryptography: "npm:^1.0.3" + ethereumjs-abi: "npm:^0.6.8" + find-up: "npm:^2.1.0" + fp-ts: "npm:1.19.3" + fs-extra: "npm:^7.0.1" + glob: "npm:7.2.0" + immutable: "npm:^4.0.0-rc.12" + io-ts: "npm:1.10.4" + keccak: "npm:^3.0.2" + lodash: "npm:^4.17.11" + mnemonist: "npm:^0.38.0" + mocha: "npm:^10.0.0" + p-map: "npm:^4.0.0" + raw-body: "npm:^2.4.1" + resolve: "npm:1.17.0" + semver: "npm:^6.3.0" + solc: "npm:0.7.3" + source-map-support: "npm:^0.5.13" + stacktrace-parser: "npm:^0.1.10" + tsort: "npm:0.0.1" + undici: "npm:^5.14.0" + uuid: "npm:^8.3.2" + ws: "npm:^7.4.6" + peerDependencies: + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + bin: + hardhat: internal/cli/bootstrap.js + checksum: 10/8b5fa8d57ac9dc7f28e4747a9dca7a8ebf2c1e9fe697d7adab3b56e98691cf7732d383ac6dbabfe093229c23a5bfa04f72a060bce35cc1851a21299dacaab0eb + languageName: node + linkType: hard + "harmony-reflect@npm:^1.4.6": version: 1.6.2 resolution: "harmony-reflect@npm:1.6.2" @@ -40983,6 +41313,13 @@ __metadata: languageName: node linkType: hard +"openzeppelin-solidity@npm:3.4.2": + version: 3.4.2 + resolution: "openzeppelin-solidity@npm:3.4.2" + checksum: 10/f5b49e3cd2918b1853a94b5a8cc0e2a1096611a94448f05a3c1a71def21f6fbf46832f5fda5e3684bb9cc3f52b342dd20a0aff4488d256eeb73a612d3cba0400 + languageName: node + linkType: hard + "optionator@npm:^0.8.2": version: 0.8.3 resolution: "optionator@npm:0.8.3" @@ -43747,6 +44084,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^2.0.5": + version: 2.8.8 + resolution: "prettier@npm:2.8.8" + bin: + prettier: bin-prettier.js + checksum: 10/00cdb6ab0281f98306cd1847425c24cbaaa48a5ff03633945ab4c701901b8e96ad558eb0777364ffc312f437af9b5a07d0f45346266e8245beaf6247b9c62b24 + languageName: node + linkType: hard + "pretty-bytes@npm:^5.3.0, pretty-bytes@npm:^5.4.1": version: 5.6.0 resolution: "pretty-bytes@npm:5.6.0" @@ -49985,6 +50331,13 @@ __metadata: languageName: node linkType: hard +"true-case-path@npm:^2.2.1": + version: 2.2.1 + resolution: "true-case-path@npm:2.2.1" + checksum: 10/8c6ddd8dab044012a7bb1bed0b31cbb8f9924e903e996f7378d9b86113cde29251e684075203490d4dca2a199ef401ba89228c602bc5e2a3e4550446e8ae1ccf + languageName: node + linkType: hard + "truffle@npm:5.11.2": version: 5.11.2 resolution: "truffle@npm:5.11.2"