About type definition of Hyperledger Fabric SDK for node.js

357 Views Asked by At

Sorry for the machine translation

Is type ByteBuffer in the type definition file index.d.ts of @ types / fabric-client the same as Buffer?

index.d.ts link

Please tell me if you have any other good inquiries.

1

There are 1 best solutions below

0
On BEST ANSWER

No, a ByteBuffer and Buffer are different objects. The Buffer is native to node.js and ByteBuffer is an npm package (see https://www.npmjs.com/package/bytebuffer). For example, see https://github.com/dcodeIO/ByteBuffer.js/issues/1 for converting a ByteBuffer to Buffer.