From 734c751882f43beec7ea3f0f4d988b502e3f24e4 Mon Sep 17 00:00:00 2001 From: Armani Ferrante Date: Fri, 5 Mar 2021 20:14:43 +0800 Subject: [PATCH] ts: Export sighash coder --- CHANGELOG.md | 1 + ts/package.json | 2 +- ts/src/coder.ts | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fea62935d7..f0949f48b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ incremented for features. ## Features * ts: Allow preloading instructions for state rpc transactions ([cf9c84](https://github.com/project-serum/anchor/commit/cf9c847e4144989b5bc1936149d171e90204777b)). +* ts: Export sighash coder function. * cli: Specify programs to embed into local validator genesis via Anchor.toml while testing. * cli: Allow skipping the creation of a local validator when testing against localnet. * cli: Adds support for tests with Typescript ([#94](https://github.com/project-serum/anchor/pull/94)). diff --git a/ts/package.json b/ts/package.json index 4b358ed33c..db5742d78f 100644 --- a/ts/package.json +++ b/ts/package.json @@ -1,6 +1,6 @@ { "name": "@project-serum/anchor", - "version": "0.2.2-beta.1", + "version": "0.2.2-beta.2", "description": "Anchor client", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", diff --git a/ts/src/coder.ts b/ts/src/coder.ts index c39e849b75..dd4639efc0 100644 --- a/ts/src/coder.ts +++ b/ts/src/coder.ts @@ -59,6 +59,10 @@ export default class Coder { this.state = new StateCoder(idl); } } + + public sighash(nameSpace: string, ixName: string): Buffer { + return sighash(nameSpace, ixName); + } } /**