fabric-shim
Advanced tools
Comparing version 2.5.3 to 2.5.4
@@ -1,1 +0,1 @@ | ||
{"processes":{"a0b30e8d-9dcb-41a1-b374-012681bf5fc7":{"parent":null,"children":[]},"e0df2405-4abe-4a1f-ba52-271adb5bc36e":{"parent":null,"children":[]}},"files":{"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/logger.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/stub.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/startCommand.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/chaincode.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/utils/utils.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/handler.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/iterators.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/server.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/utils/statebased.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/contract-spi/bootstrap.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/contract-spi/chaincodefromcontract.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/contract-spi/datamarshall.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/serverCommand.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/metadata.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/metadata/lib/generate.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/metadata/generateCommand.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/contract-spi/systemcontract.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/index.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/cli.js":["a0b30e8d-9dcb-41a1-b374-012681bf5fc7","e0df2405-4abe-4a1f-ba52-271adb5bc36e"]},"externalIds":{}} | ||
{"processes":{"22720406-8b90-45c7-899b-9a67cf17aee5":{"parent":null,"children":[]},"3a5bf8e3-9a5a-4336-9f80-89b93d8f0238":{"parent":null,"children":[]}},"files":{"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/logger.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/stub.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/startCommand.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/chaincode.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/utils/utils.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/handler.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/iterators.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/server.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/utils/statebased.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/contract-spi/bootstrap.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/contract-spi/chaincodefromcontract.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/contract-spi/datamarshall.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/serverCommand.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/metadata.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/metadata/lib/generate.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/cmds/metadata/generateCommand.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/lib/contract-spi/systemcontract.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/index.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"],"/home/runner/work/fabric-chaincode-node/fabric-chaincode-node/libraries/fabric-shim/cli.js":["22720406-8b90-45c7-899b-9a67cf17aee5","3a5bf8e3-9a5a-4336-9f80-89b93d8f0238"]},"externalIds":{}} |
{ | ||
"files": { | ||
"libraries/fabric-shim/.rush/temp/shrinkwrap-deps.json": "398a05173dc54ceefdc91a9f2ccef4a4baf971c7", | ||
"libraries/fabric-shim/.rush/temp/shrinkwrap-deps.json": "56675c611c0171cb1bee2bfd4c8c0a73b3e684b9", | ||
"libraries/fabric-shim/.npmignore": "dc2045f25a0bd5dc7b80476bbb2f651323ef99a5", | ||
@@ -9,3 +9,3 @@ "libraries/fabric-shim/LICENSE": "8f71f43fee3f78649d238238cbde51e6d7055c82", | ||
"libraries/fabric-shim/index.js": "eba64698d0a41ece8360afab76da78dc8ffd24c5", | ||
"libraries/fabric-shim/lib/chaincode.js": "39552cddb0e0d9d33c3a4d3af84ab09c881c4bf4", | ||
"libraries/fabric-shim/lib/chaincode.js": "65c1fc78f3187f67f9adae410d704fd27fcde3f9", | ||
"libraries/fabric-shim/lib/cmds/metadata.js": "73c4947600319e79d8f12db615890cbc75753426", | ||
@@ -20,11 +20,10 @@ "libraries/fabric-shim/lib/cmds/metadata/generateCommand.js": "ea6667afdee00ebc34323991a20ab6a4ba7e4af7", | ||
"libraries/fabric-shim/lib/contract-spi/systemcontract.js": "43fdcc31a79a5f505c1da39d8db03ab6a0de60b6", | ||
"libraries/fabric-shim/lib/handler.js": "c17db38706b15aca503166f918d8b384bf9b8d7a", | ||
"libraries/fabric-shim/lib/handler.js": "628ff68a4eefeaa9608bd81acbc976bd3ae9120a", | ||
"libraries/fabric-shim/lib/iterators.js": "9016c8abb253dce02a2984ad2fded76bb3997ff8", | ||
"libraries/fabric-shim/lib/logger.js": "930242e6c90270cf91378a4b167a4d5b3ba28d7e", | ||
"libraries/fabric-shim/lib/server.js": "f075086a990bf4dde90aa1863ca73b82633b9128", | ||
"libraries/fabric-shim/lib/stub.js": "65275cb783f91f8c8ec76ace5ea770261c8aa9f2", | ||
"libraries/fabric-shim/lib/server.js": "9d6336b6d5b1a3f29b76588559b967d87b90ea51", | ||
"libraries/fabric-shim/lib/stub.js": "1dae7847d688c5d39de019306d7fefdac05127e1", | ||
"libraries/fabric-shim/lib/utils/statebased.js": "c294ad5b1c97dd67d2e1499516c48ed70212c6fe", | ||
"libraries/fabric-shim/lib/utils/utils.js": "64a2a327844f7a3309beb0010f8389f8d038cf73", | ||
"libraries/fabric-shim/package-lock.json": "4d6f6feeb5804cdbaba3bc60f8b2a4a3c2754d90", | ||
"libraries/fabric-shim/package.json": "668866eb75b425fb6b5f618b9e3c061e28060a42", | ||
"libraries/fabric-shim/package.json": "e16993a38a12f1d5d6972ed476e41416d2c82e25", | ||
"libraries/fabric-shim/startup.sh": "b0f86946114cd70f0462ef99b8c2d14248c034cc", | ||
@@ -45,3 +44,3 @@ "libraries/fabric-shim/test/typescript/chaincode.ts": "7bcd8bd2cec46f62baeb039661b7a1e064cedadc", | ||
"libraries/fabric-shim/test/unit/contract-spi/systemcontract.js": "19e0aa5b074cf11f4296a3203ec891e36f86e787", | ||
"libraries/fabric-shim/test/unit/handler.js": "fb8b2389ff1d463fc14811d4c6d77312cf461c0b", | ||
"libraries/fabric-shim/test/unit/handler.js": "57d039461ab71c538f550e58815ffc3ebce5e2f1", | ||
"libraries/fabric-shim/test/unit/iterators.js": "324fe1fefe5bc35ee74216d84b13aa4ed4708a25", | ||
@@ -51,3 +50,3 @@ "libraries/fabric-shim/test/unit/logger.js": "b829e4015caac88a40f66408b393a7811e18c9b0", | ||
"libraries/fabric-shim/test/unit/server.js": "0c7373e15c5c7c52f46257bb15c92255d4ee4c57", | ||
"libraries/fabric-shim/test/unit/stub.js": "add33f45532a09fc2daae23fb18a2f70e2cefb6b", | ||
"libraries/fabric-shim/test/unit/stub.js": "b907fc2965fd781e806e76d2653d091f856e300c", | ||
"libraries/fabric-shim/test/unit/test-ca.base64": "fc88d63f685c3af6453ebf23f2194ea8b635eee6", | ||
@@ -61,3 +60,3 @@ "libraries/fabric-shim/test/unit/test-ca.pem": "d072ef5295645923b4dae01a6754b922a8fc6f78", | ||
"libraries/fabric-shim/test/unit/utils/utils.js": "dca365f20fac9afe63f749dd6dce2b2a203876da", | ||
"libraries/fabric-shim/types/index.d.ts": "2ebf37c70ce964775005c680a6a4b89af385a820", | ||
"libraries/fabric-shim/types/index.d.ts": "2e948ceffbeaa1f46b1fe5e6c54b334bde2da1c6", | ||
"libraries/fabric-shim/types/tsconfig.json": "ed09ed38db1792491a70a0300a3790c5ad4ae7cc" | ||
@@ -64,0 +63,0 @@ }, |
@@ -203,2 +203,7 @@ /* | ||
/** | ||
* @interface GRPCOptions | ||
* @description ChannelOptions on "@grpc/grpc-js". For a complete list, refer to <a href=https://www.npmjs.com/package/@grpc/grpc-js#supported-channel-options>@grpc/grpc-js Documentation</a> | ||
* @property {unknown[]} ['grpc.${string}'] Connection options defined on "@grpc/grpc-js" | ||
*/ | ||
/** | ||
* @interface ChaincodeServerTLSProperties | ||
@@ -211,2 +216,3 @@ * @property {Buffer} key Private key for TLS | ||
* @interface ChaincodeServerOpts | ||
* @extends GRPCOptions | ||
* @property {string} ccid Chaincode ID | ||
@@ -213,0 +219,0 @@ * @property {string} address Listen address for the server |
@@ -356,3 +356,3 @@ /* | ||
logger.debug('Chat stream ending'); | ||
stream.cancel(); | ||
stream.end(); | ||
}); | ||
@@ -359,0 +359,0 @@ |
@@ -61,4 +61,8 @@ /* | ||
const grpcOptions = Object.fromEntries( | ||
Object.entries(serverOpts).filter(([key]) => key.startsWith('grpc.')) | ||
); | ||
// Create GRPC Server and register RPC handler | ||
this._server = new grpc.Server(); | ||
this._server = new grpc.Server(grpcOptions); | ||
this._server.addService(peer.ChaincodeService, this); | ||
@@ -65,0 +69,0 @@ |
@@ -15,2 +15,3 @@ /* | ||
const {ChaincodeEvent} = require('@hyperledger/fabric-protos/lib/peer'); | ||
const Long = require('long'); | ||
@@ -420,3 +421,6 @@ const logger = require('./logger').getLogger('lib/stub.js'); | ||
getTxTimestamp() { | ||
return this.txTimestamp; | ||
return { | ||
nanos: this.txTimestamp.getNanos(), | ||
seconds: Long.fromNumber(this.txTimestamp.getSeconds(), true), | ||
}; | ||
} | ||
@@ -430,4 +434,3 @@ | ||
getDateTimestamp() { | ||
const date = new Date(this.txTimestamp.seconds * 1e3 + this.txTimestamp.nanos / 1e6); | ||
return date; | ||
return this.txTimestamp.toDate(); | ||
} | ||
@@ -758,9 +761,11 @@ | ||
/** | ||
* Allows the chaincode to propose an event on the transaction proposal. When the transaction | ||
* is included in a block and the block is successfully committed to the ledger, the block event | ||
* will be delivered to the current event listeners that have been registered with the peer's | ||
* event producer. Note that the block event gets delivered to the listeners regardless of the | ||
* status of the included transactions (can be either valid or invalid), so client applications | ||
* are responsible for checking the validity code on each transaction. Consult each SDK's documentation | ||
* for details. | ||
* Allows the chaincode to propose an event on the transaction proposal response. | ||
* When the transaction is included in a block and the block is successfully committed to the ledger, | ||
* the block event (including transaction level chaincode events) | ||
* will be delivered to the current client application event listeners that have been registered with the peer's event producer. | ||
* Consult each SDK's documentation for details. | ||
* Only a single chaincode event can be included in a transaction. | ||
* If setEvent() is called multiple times only the last event will be included in the transaction. | ||
* The event must originate from the outer-most invoked chaincode in chaincode-to-chaincode scenarios. | ||
* The marshaled ChaincodeEvent will be available in the transaction's ChaincodeAction.events field. | ||
* @param {string} name Name of the event | ||
@@ -767,0 +772,0 @@ * @param {byte[]} payload A payload can be used to include data about the event |
{ | ||
"name": "fabric-shim", | ||
"version": "2.5.3", | ||
"tag": "unstable", | ||
"version": "2.5.4", | ||
"tag": "latest", | ||
"description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other", | ||
@@ -45,3 +45,3 @@ "main": "index.js", | ||
"@fidm/x509": "^1.2.1", | ||
"@grpc/grpc-js": "1.8.1", | ||
"@grpc/grpc-js": "1.8.15", | ||
"@grpc/proto-loader": "^0.6.6", | ||
@@ -51,6 +51,7 @@ "@hyperledger/fabric-protos": "0.1.0-dev.2300102001.1", | ||
"ajv": "^6.12.2", | ||
"fabric-contract-api": "2.5.3", | ||
"fabric-shim-api": "2.5.3", | ||
"fabric-contract-api": "2.5.4", | ||
"fabric-shim-api": "2.5.4", | ||
"fast-safe-stringify": "^2.1.1", | ||
"fs-extra": "^10.0.1", | ||
"long": "^5.2.3", | ||
"reflect-metadata": "^0.1.13", | ||
@@ -57,0 +58,0 @@ "winston": "^3.7.2", |
@@ -9,4 +9,4 @@ /* | ||
import { EventEmitter } from 'events'; | ||
import { Logger } from 'winston'; | ||
import { ChannelOptions } from '@grpc/grpc-js' | ||
@@ -57,3 +57,7 @@ import { | ||
export interface ChaincodeServerOpts { | ||
type GRPCOptions = { | ||
[K in keyof ChannelOptions as string extends K ? never : K]?: ChannelOptions[K]; | ||
} | ||
export interface ChaincodeServerOpts extends GRPCOptions { | ||
ccid: string; | ||
@@ -145,3 +149,3 @@ address: string; | ||
addOrgs(role: string, ...newOrgs: string[]): void; | ||
delOrgs(...delOrgs: string[]):void; | ||
delOrgs(...delOrgs: string[]): void; | ||
listOrgs(): string[]; | ||
@@ -148,0 +152,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1680977
4968
17
15
+ Addedlong@^5.2.3
+ Added@grpc/grpc-js@1.8.15(transitive)
+ Addedfabric-contract-api@2.5.4(transitive)
+ Addedfabric-shim-api@2.5.4(transitive)
- Removed@grpc/grpc-js@1.8.1(transitive)
- Removedfabric-contract-api@2.5.3(transitive)
- Removedfabric-shim-api@2.5.3(transitive)
Updated@grpc/grpc-js@1.8.15
Updatedfabric-contract-api@2.5.4
Updatedfabric-shim-api@2.5.4