Skip to content

Commit

Permalink
Added zk bytes signing method (#119)
Browse files Browse the repository at this point in the history
* adding zk bytes signing method and updated sui library version

* updated description

* version updated

* updated sui libraray and client version

* updated sui package to install latest version
  • Loading branch information
izeeshan100 authored Oct 7, 2024
1 parent 92bbc6b commit f1e7345
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bluefin-exchange/bluefin-v2-client",
"version": "5.4.8",
"version": "5.5.0",
"description": "The Bluefin client Library allows traders to sign, create, retrieve and listen to orders on Bluefin Exchange.",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -57,7 +57,7 @@
"webpack-node-externals": "^3.0.0"
},
"dependencies": {
"@firefly-exchange/library-sui": "^1.5.9",
"@firefly-exchange/library-sui": "^1.6.0",
"@mysten/bcs": "^1.0.2",
"@mysten/sui.js": "^0.45.0",
"@mysten/zklogin": "^0.3.4",
Expand Down
18 changes: 18 additions & 0 deletions src/bluefinClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,24 @@ export class BluefinClient {
return signature;
};

/**
* @description
* Gets the payload containing bytes mesasge to sign
* @returns SigPK
* */

signBytesPayloadUsingZkWallet = async (
payload: Uint8Array
): Promise<SigPK> => {
const signature = await OrderSigner.signBytesPayloadUsingZKSignature({
payload,
signer: this.signer,
zkPayload: this.getZkPayload(),
});

return signature;
};

/**
* @description
* Gets the wallets Public address
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -981,10 +981,10 @@
"@ethersproject/properties" "^5.7.0"
"@ethersproject/strings" "^5.7.0"

"@firefly-exchange/library-sui@^1.5.9":
version "1.5.9"
resolved "https://registry.yarnpkg.com/@firefly-exchange/library-sui/-/library-sui-1.5.9.tgz#ff72ff342607911d31c554218cac9624fad53a7c"
integrity sha512-3EvqH9yLPJA6PJJS0cCm0KRGL/jGxGG4mrEY8qU6qu8sPrEn3QcgTFL0CX5+3T85lciXmH+OOthNKD6Z7GvHIg==
"@firefly-exchange/library-sui@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@firefly-exchange/library-sui/-/library-sui-1.6.0.tgz#a07506273dec7af1a91d468af2f44887648992e3"
integrity sha512-o+qw2OM+BOc5Qyk+c0xLtMlfU8DwOzIkI8GW+JGpnQi/kUq9AGHLo3rTs/ErycWOMqeyqCCcf3ODs3dJ2JReUQ==
dependencies:
"@aws-sdk/client-kms" "^3.438.0"
"@mysten/sui.js" "^0.48.0"
Expand Down

0 comments on commit f1e7345

Please sign in to comment.