[telegram] <Stepan> The bug was fixed by updating the nearest parent package.json file with the following entry:
{
"type": "module",
...} (re @Stepan: #gRPC #nodeJS
Hi. JS script when executed gives an error on import grpc from ('grpc'); "SyntaxError: Cannot use import statement outside a module". how to fix? ...example for the client side is not the most successful and simple, where is the kaizen concept)
it's simple: https://t.me/hyperledgeriroha/23128
and it's not easy anymore:
import grpc from 'grpc'
import {
QueryService_v1Client,
CommandService_v1Client
} from '../iroha-helpers/lib/proto/endpoint_grpc_pb'
import { commands, queries } from 'iroha-helpers'
const IROHA_ADDRESS = 'localhost:50051' ...)
[telegram] <Stepan> do you think such an example of a client script in JS will take off? )
...
var PROTO_PATH = __dirname + '/../../shared_model/endpoint.proto';
var grpc = require('@grpc/grpc-js');
var protoLoader = require('@grpc/proto-loader');
var packageDefinition = protoLoader.loadSync(
PROTO_PATH,
{keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true
});
var CommandService_v1= grpc.loadPackageDefinition(packageDefinition).grpc.CommandService_v1;
var commandService = new CommandService_v1(
IROHA_ADDRESS,
grpc.credentials.createInsecure()
) (re @Alexander: shared_model/endpoint.proto)
[telegram] <♌︎ Leo> Makes sense if u only need a few of the iroha APIs and don’t wish to add the iroha-helpers as a dependency. But, if u need a lot more APIs, then you run the of risk reinventing the whole iroha-helpers. (re @Stepan: do you think such an example of a client script in JS will take off? )
...
var PROTO_PATH = __dirname + '/../../shared_model/endpoint.proto';
var grpc = require('@grpc/grpc-js');
var protoLoader = require('@grpc/proto-loader');
var packageDefinition = protoLoader.loadSync(
PROTO_PATH,
{keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true
});
var CommandService_v1= grpc.loadPackageDefinition(packageDefinition).grpc.CommandService_v1;
var commandService = new CommandService_v1(
IROHA_ADDRESS,
grpc.credentials.createInsecure()
))
[telegram] <Grouvie> Is Hyperledger Burrow still supported by Iroha or is it suggested to use other solutions to implement smart contract functionality?
The Hyperledger Burrow Github states:
"Hyperledger Burrow has been moved to End of Life status by the original project maintainers."
[telegram] <Sara> Hi So, we discussed this with the team and decided to not remove the code that allows to work with Burrow as for now I do not think there is an alternative (unless @baziorek has something that could help in one of his mentorship projects?). So, you can use the last version of the Burrow but we cannot guarantee it will work well because the project is being closed. (re @Grouvie: Is Hyperledger Burrow still supported by Iroha or is it suggested to use other solutions to implement smart contract functionality?
The Hyperledger Burrow Github states:
"Hyperledger Burrow has been moved to End of Life status by the original project maintainers.")
[telegram] <baziorek> No I don't have:).
THere is iroha+burrow in iroha's official docker image. It can be used and it is working:). (re @Sara: Hi So, we discussed this with the team and decided to not remove the code that allows to work with Burrow as for now I do not think there is an alternative (unless @baziorek has something that could help in one of his mentorship projects?). So, you can use the last version of the Burrow but we cannot guarantee it will work well because the project is being closed.)
[telegram] <Sara> I think we'd need to ask Alexander on Monday to be sure. Please remind me about that if I forget, ok (re @Yasir: Thank you for the response. Before I talk more about the bug, could you clear one thing for me please?
Can I upgrade to 1.5.0 from 1.2.1 without overwritting the ledger? As I tried it on one node and it says that schema is not compatibile... @baziorek @liralemur)
[telegram] <Sara> Forwarded from Hyperledger Iroha news: Let's meet for our community call in an hour!
Updates from both Irohas, opportunity to ask questions if you have any or simply meet the maintainers :)
Just jump in at noon CET: https://zoom.us/my/hyperledger.community.3
Password: 475869