@alephium/web3 3.0.0-test.7 → 3.0.0-test.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- export declare function blakeHash(raw: Uint8Array): Uint8Array<ArrayBufferLike>;
1
+ export declare function blakeHash(raw: Uint8Array): Uint8Array;
2
2
  export declare function djbIntHash(bytes: Uint8Array): number;
3
3
  export declare function createHint(input: Uint8Array): number;
@@ -2,4 +2,4 @@ import { ArrayCodec } from './array-codec';
2
2
  import { FixedSizeCodec } from './codec';
3
3
  export type Signature = Uint8Array;
4
4
  export declare const signatureCodec: FixedSizeCodec;
5
- export declare const signaturesCodec: ArrayCodec<Uint8Array<ArrayBufferLike>>;
5
+ export declare const signaturesCodec: ArrayCodec<Uint8Array>;
@@ -1 +1 @@
1
- {"version":3,"file":"signature-codec.js","sourceRoot":"","sources":["../../../src/codec/signature-codec.ts"],"names":[],"mappings":";;;AAiBA,+CAA0C;AAC1C,mCAAwC;AAI3B,QAAA,cAAc,GAAG,IAAI,sBAAc,CAAC,EAAE,CAAC,CAAA;AACvC,QAAA,eAAe,GAAG,IAAI,wBAAU,CAAC,sBAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"signature-codec.js","sourceRoot":"","sources":["../../../src/codec/signature-codec.ts"],"names":[],"mappings":";;;AAiBA,+CAA0C;AAC1C,mCAAwC;AAI3B,QAAA,cAAc,GAAG,IAAI,sBAAc,CAAC,EAAE,CAAC,CAAA;AACvC,QAAA,eAAe,GAA2B,IAAI,wBAAU,CAAC,sBAAc,CAAC,CAAA"}
@@ -41,4 +41,4 @@ export type UnlockScript = {
41
41
  value: P2HMPK;
42
42
  };
43
43
  export declare const unlockScriptCodec: EnumCodec<UnlockScript>;
44
- export declare const encodedSameAsPrevious: Uint8Array<ArrayBufferLike>;
44
+ export declare const encodedSameAsPrevious: Uint8Array;
@@ -48,5 +48,8 @@ exports.unlockScriptCodec = new codec_1.EnumCodec('unlock script', {
48
48
  P2PK: p2pkCodec,
49
49
  P2HMPK: p2hmpkCodec
50
50
  });
51
- exports.encodedSameAsPrevious = exports.unlockScriptCodec.encode({ kind: 'SameAsPrevious', value: 'SameAsPrevious' });
51
+ exports.encodedSameAsPrevious = exports.unlockScriptCodec.encode({
52
+ kind: 'SameAsPrevious',
53
+ value: 'SameAsPrevious'
54
+ });
52
55
  //# sourceMappingURL=unlock-script-codec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unlock-script-codec.js","sourceRoot":"","sources":["../../../src/codec/unlock-script-codec.ts"],"names":[],"mappings":";;;AAiBA,+CAA0C;AAC1C,2DAA8C;AAC9C,mCAAuE;AACvE,iDAAoD;AACpD,+BAAsC;AACtC,mEAA2E;AA6B3E,MAAM,cAAc,GAAG,IAAI,sBAAc,CAAC,EAAE,CAAC,CAAA;AAC7C,MAAM,iBAAiB,GAAG,IAAI,mBAAW,CAAe;IACtD,SAAS,EAAE,cAAc;IACzB,KAAK,EAAE,4BAAQ;CAChB,CAAC,CAAA;AACF,MAAM,WAAW,GAAkB,IAAI,wBAAU,CAAC,iBAAiB,CAAC,CAAA;AACpE,MAAM,SAAS,GAAG,IAAI,mBAAW,CAAO;IACtC,MAAM,EAAE,0BAAW;IACnB,MAAM,EAAE,eAAS;CAClB,CAAC,CAAA;AACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAM,SAAQ,aAAqB;IAClE,MAAM;QACJ,OAAO,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA;IAC3B,CAAC;IACD,OAAO;QACL,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF,CAAC,EAAE,CAAA;AACJ,MAAM,SAAS,GAAG,IAAI,CAAC,KAAM,SAAQ,aAAW;IAC9C,MAAM;QACJ,OAAO,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA;IAC3B,CAAC;IACD,OAAO;QACL,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAC,EAAE,CAAA;AAEJ,MAAM,mBA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,CAAC,EAAE,CAAC,CAAA;IAC3B,CAAC;IACD,OAAO;QACL,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF,CAAC,EAAE,CAAA;AACJ,MAAM,SAAS,GAAG,IAAI,CAAC,KAAM,SAAQ,aAAW;IAC9C,MAAM;QACJ,OAAO,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA;IAC3B,CAAC;IACD,OAAO;QACL,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAC,EAAE,CAAA;AAEJ,MAAM,mBAAmB,GAAG,IAAI,wBAAU,CAAC,0CAAkB,CAAC,CAAA;AAC9D,MAAM,qBAAqB,GAAG,IAAI,wBAAU,CAAC,4BAAQ,CAAC,CAAA;AACtD,MAAM,WAAW,GAAG,IAAI,mBAAW,CAAS;IAC1C,UAAU,EAAE,mBAAmB;IAC/B,gBAAgB,EAAE,qBAAqB;CACxC,CAAC,CAAA;AAEW,QAAA,iBAAiB,GAAG,IAAI,iBAAS,CAAe,eAAe,EAAE;IAC5E,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,SAAS;IACf,cAAc,EAAE,mBAAmB;IACnC,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,WAAW;CACpB,CAAC,CAAA;AAEW,QAAA,qBAAqB,GAAe,yBAAiB,CAAC,MAAM,CAAC;IACxE,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,gBAAgB;CACxB,CAAC,CAAA"}
@@ -1,3 +1,3 @@
1
- export declare function blakeHash(raw: Uint8Array): Uint8Array<ArrayBufferLike>;
1
+ export declare function blakeHash(raw: Uint8Array): Uint8Array;
2
2
  export declare function djbIntHash(bytes: Uint8Array): number;
3
3
  export declare function createHint(input: Uint8Array): number;
@@ -2,4 +2,4 @@ import { ArrayCodec } from './array-codec.js';
2
2
  import { FixedSizeCodec } from './codec.js';
3
3
  export type Signature = Uint8Array;
4
4
  export declare const signatureCodec: FixedSizeCodec;
5
- export declare const signaturesCodec: ArrayCodec<Uint8Array<ArrayBufferLike>>;
5
+ export declare const signaturesCodec: ArrayCodec<Uint8Array>;
@@ -1 +1 @@
1
- {"version":3,"file":"signature-codec.js","sourceRoot":"","sources":["../../../src/codec/signature-codec.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,UAAU,CAAC,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"signature-codec.js","sourceRoot":"","sources":["../../../src/codec/signature-codec.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,eAAe,GAA2B,IAAI,UAAU,CAAC,cAAc,CAAC,CAAA"}
@@ -41,4 +41,4 @@ export type UnlockScript = {
41
41
  value: P2HMPK;
42
42
  };
43
43
  export declare const unlockScriptCodec: EnumCodec<UnlockScript>;
44
- export declare const encodedSameAsPrevious: Uint8Array<ArrayBufferLike>;
44
+ export declare const encodedSameAsPrevious: Uint8Array;
@@ -45,5 +45,8 @@ export const unlockScriptCodec = new EnumCodec('unlock script', {
45
45
  P2PK: p2pkCodec,
46
46
  P2HMPK: p2hmpkCodec
47
47
  });
48
- export const encodedSameAsPrevious = unlockScriptCodec.encode({ kind: 'SameAsPrevious', value: 'SameAsPrevious' });
48
+ export const encodedSameAsPrevious = unlockScriptCodec.encode({
49
+ kind: 'SameAsPrevious',
50
+ value: 'SameAsPrevious'
51
+ });
49
52
  //# sourceMappingURL=unlock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
2
  "name": "@alephium/web3",
3
- "version": "3.0.0-test.7",
3
+ "version": "3.0.0-test.8",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "type": "commonjs",
package/src/codec/hash.ts CHANGED
@@ -17,7 +17,7 @@ along with the library. If not, see <http://www.gnu.org/licenses/>.
17
17
  */
18
18
  import { blake2b } from '@noble/hashes/blake2b'
19
19
 
20
- export function blakeHash(raw: Uint8Array) {
20
+ export function blakeHash(raw: Uint8Array): Uint8Array {
21
21
  return blake2b(raw, { dkLen: 32 })
22
22
  }
23
23
 
@@ -21,4 +21,4 @@ import { FixedSizeCodec } from './codec'
21
21
  export type Signature = Uint8Array
22
22
 
23
23
  export const signatureCodec = new FixedSizeCodec(64)
24
- export const signaturesCodec = new ArrayCodec(signatureCodec)
24
+ export const signaturesCodec: ArrayCodec<Uint8Array> = new ArrayCodec(signatureCodec)
@@ -93,4 +93,7 @@ export const unlockScriptCodec = new EnumCodec<UnlockScript>('unlock script', {
93
93
  P2HMPK: p2hmpkCodec
94
94
  })
95
95
 
96
- export const encodedSameAsPrevious = unlockScriptCodec.encode({ kind: 'SameAsPrevious', value: 'SameAsPrevious' })
96
+ export const encodedSameAsPrevious: Uint8Array = unlockScriptCodec.encode({
97
+ kind: 'SameAsPrevious',
98
+ value: 'SameAsPrevious'
99
+ })