This repository was archived by the owner on Aug 11, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +10
-24
lines changed Expand file tree Collapse file tree 5 files changed +10
-24
lines changed Original file line number Diff line number Diff line change 34
34
"homepage" : " https://github.com/ipld/js-ipld-zcash#readme" ,
35
35
"dependencies" : {
36
36
"buffer" : " ^5.6.0" ,
37
- "cids" : " ^0.8.3 " ,
38
- "multicodec" : " ^1 .0.0" ,
39
- "multihashes" : " ^1 .0.1" ,
40
- "multihashing-async" : " ^1 .0.0" ,
37
+ "cids" : " ^1.0.0 " ,
38
+ "multicodec" : " ^2 .0.0" ,
39
+ "multihashes" : " ^3 .0.1" ,
40
+ "multihashing-async" : " ^2 .0.0" ,
41
41
"zcash-block" : " ^2.0.0"
42
42
},
43
43
"devDependencies" : {
44
- "aegir" : " ^25.0.0" ,
45
- "chai" : " ^4.2.0" ,
46
- "chai-as-promised" : " ^7.1.1" ,
47
- "dirty-chai" : " ^2.0.1"
44
+ "aegir" : " ^25.0.0"
48
45
},
49
46
"contributors" : [
50
47
" David Dias <daviddias.p@gmail.com>" ,
Original file line number Diff line number Diff line change @@ -23,15 +23,15 @@ const serialize = (dagNode) => {
23
23
/**
24
24
* Deserialize Zcash block into the internal representation.
25
25
*
26
- * @param {Buffer } binaryBlob - Binary representation of a Zcash block
26
+ * @param {Uint8Array } binaryBlob - Binary representation of a Zcash block
27
27
* @returns {ZcashBlock }
28
28
*/
29
29
const deserialize = ( binaryBlob ) => {
30
30
let deserialized
31
31
32
32
if ( ! Buffer . isBuffer ( binaryBlob ) ) {
33
33
// zcash only takes Buffers, not Uint8Arrays
34
- binaryBlob = Buffer . from ( binaryBlob )
34
+ binaryBlob = Buffer . from ( binaryBlob , binaryBlob . byteOffset , binaryBlob . byteLength )
35
35
}
36
36
37
37
if ( binaryBlob . length < ZCASH_BLOCK_HEADER_SIZE ) {
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
4
+ const { expect } = require ( 'aegir/utils/chai' )
8
5
const multicodec = require ( 'multicodec' )
9
6
10
7
const mod = require ( '../src' )
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const dirtyChai = require ( 'dirty-chai' )
6
- const expect = chai . expect
7
- chai . use ( dirtyChai )
4
+ const { expect } = require ( 'aegir/utils/chai' )
8
5
const CID = require ( 'cids' )
9
6
const IpldZcash = require ( '../src/index' )
10
7
const helpers = require ( './helpers' )
Original file line number Diff line number Diff line change 1
1
/* eslint-env mocha */
2
2
'use strict'
3
3
4
- const chai = require ( 'chai' )
5
- const chaiAsPromised = require ( 'chai-as-promised' )
6
- const dirtyChai = require ( 'dirty-chai' )
7
- const expect = chai . expect
8
- chai . use ( chaiAsPromised )
9
- chai . use ( dirtyChai )
4
+ const { expect } = require ( 'aegir/utils/chai' )
10
5
const CID = require ( 'cids' )
11
6
const multicodec = require ( 'multicodec' )
12
7
const { Buffer } = require ( 'buffer' )
You can’t perform that action at this time.
0 commit comments