diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e428aa0..4f20698d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [4.10.3](https://github.com/nash-io/nash-protocol/compare/v4.10.1...v4.10.3) (2023-05-22) + ### [4.10.1](https://github.com/nash-io/nash-protocol/compare/v4.9.9...v4.10.1) (2023-05-19) ### [4.9.9](https://github.com/nash-io/nash-protocol/compare/v4.9.7...v4.9.9) (2023-02-21) diff --git a/package.json b/package.json index 75261e5a..6d93ea31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neon-exchange/nash-protocol", - "version": "4.10.1", + "version": "4.10.3", "description": "TypeScript implementation of Nash crypto routines", "main": "build/main/index.js", "typings": "build/main/index.d.ts", diff --git a/src/__tests__/signatureVectors.json b/src/__tests__/signatureVectors.json index a5962024..6c70d0a5 100644 --- a/src/__tests__/signatureVectors.json +++ b/src/__tests__/signatureVectors.json @@ -205,10 +205,10 @@ "timestamp": 1565362799120, "signature": "30440220083a73aaaa2b69476c74b64e0f1a1bdc1f6e5d311472729712eba8b5f3343a0a02204dcd5a5aac2693865b140c041cf85d6bd079c9a4803fe83caa218bb09d13d2c2", "raw": { - "polygon": "03FA39FDDDE46CEA3060B91F80ABED8672F77C5BEA000100000000121278900052E62CFA39FDDDE46CEA3060B91F80ABED8672F77C5BEA" + "polygon": "03FA39FDDDE46CEA3060B91F80ABED8672F77C5BEA000300000000121278900052E62CFA39FDDDE46CEA3060B91F80ABED8672F77C5BEA" }, "blockchainSignatures": { - "polygon": "aea25dfbd61a2e0013e06f728d49f9bda50a135db0e2df1bdaa8101e0bc5d698f276adafdfed4d743291a8d0b97003e531c642fbdab5a88995162752aae8c06301" + "polygon": "e0b4e31781887a3639f24a0dee44356118f9ccc65158e7e06ef90581c7833be620ac6c6ff8906d3d0f87563c442944140b0da5ffb60d2cbfc8017a58d969bfc401" } } }, diff --git a/src/generateWallet/generateWallet.ts b/src/generateWallet/generateWallet.ts index a414a689..55e5c19b 100644 --- a/src/generateWallet/generateWallet.ts +++ b/src/generateWallet/generateWallet.ts @@ -96,6 +96,7 @@ export function deriveIndex(extendedKey: bip32.BIP32Interface, index: number): b export const coinTypeFromString = (s: string): CoinType => { const m: Record = { + arbitrum: CoinType.ABRITRUM, avaxc: CoinType.AVAXC, bch: CoinType.BCH, btc: CoinType.BTC, @@ -107,8 +108,7 @@ export const coinTypeFromString = (s: string): CoinType => { ltc: CoinType.LTC, neo: CoinType.NEO, neo3: CoinType.NEO3, - polygon: CoinType.POLYGON, - arbitrum: CoinType.ABRITRUM + polygon: CoinType.POLYGON } if (!(s in m)) { diff --git a/src/mpc/generateAPIKeys.ts b/src/mpc/generateAPIKeys.ts index b815d4b5..4641bf07 100644 --- a/src/mpc/generateAPIKeys.ts +++ b/src/mpc/generateAPIKeys.ts @@ -53,6 +53,13 @@ export async function generateAPIKeys(params: GenerateApiKeysParams): Promise { expect(payloadRes.blockchainMovement).toEqual({ address: 'fa39fddde46cea3060b91f80abed8672f77c5bea', amount: '303200400', - asset: '0001', + asset: '0003', nonce: '0052e62c', prefix: '03', userPubKey: 'fa39fddde46cea3060b91f80abed8672f77c5bea', @@ -117,6 +117,6 @@ test('sign MATIC/DERC20 market buy order', async () => { orderData ) expect(rawData).toBe( - '019BAE2051097DC5DDF68D3C01D5FA5CCC7833109D000100000000001700000005FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF00000000000000000000002A' + '019BAE2051097DC5DDF68D3C01D5FA5CCC7833109D000300000000001700000005FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF00000000000000000000002A' ) }) diff --git a/src/types/MPC.ts b/src/types/MPC.ts index 2299675f..0b995c13 100644 --- a/src/types/MPC.ts +++ b/src/types/MPC.ts @@ -91,7 +91,8 @@ export enum BIP44 { NEO = "m/44'/888'/0'/0/0", NEO3 = "m/44'/888'/1'/0/0", POLYGON = "m/44'/966'/0'/0/0", - AVAXC = "m/44'/9000'/0'/0/0" + AVAXC = "m/44'/9000'/0'/0/0", + ABRITRUM = "m/44'/9001'/0'/0/0" } export interface ChildKey { @@ -115,6 +116,7 @@ export interface APIKey { [BIP44.AVAXC]?: ChildKey [BIP44.POLYGON]?: ChildKey [BIP44.NEO3]?: ChildKey + [BIP44.ABRITRUM]?: ChildKey } payload_signing_key: string payload_public_key: string