Skip to content

Commit

Permalink
0.20.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
rg911 committed Aug 14, 2020
1 parent b4e993f commit 98cca54
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 7 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.

The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.20.7] - 14-Aug-2020

**Milestone**: Gorilla.1(0.9.6.4)
Package | Version | Link
---|---|---
SDK Core| v0.20.7 | [symbol-sdk](https://www.npmjs.com/package/symbol-sdk)
Catbuffer | v0.0.21 | [catbuffer-typescript](https://www.npmjs.com/package/catbuffer-typescript)
Client Library | v0.9.6 | [symbol-openapi-typescript-fetch-client](https://www.npmjs.com/package/symbol-openapi-typescript-fetch-client)

- **[BREAKING CHANGE]** Refactored `Namespace`, `Receipt` and `Metadata` endpoints. Added new search endpoint and removed old endpoints.
- **[BREAKING CHANGE]** Updated encryption / decryption algorithm from `AES-CBC` to `AES-GCM` to meet the security standard.
- **[BREAKING CHANGE]** Updated PersistentDelegatedHarvesting message marker. Also added VRF private key paramter in PersistentDelegatedHarvesting message & trsnaction creation.
- Added optional parameter `TransactionHash` in `AggregateTransaction.signWith` method.
- Updated encoding methods to support emoji in message payload.

## [0.20.6] - 02-Jul-2020

**Milestone**: Gorilla.1(0.9.6.2)
Expand Down Expand Up @@ -625,6 +640,7 @@ Client Library | v0.7.20-alpha.6 | [nem2-sdk-openapi-typescript-node-client](ht

- Initial code release.

[0.20.7]: https://github.com/nemtech/symbol-sdk-typescript-javascript/compare/v0.20.6...v0.20.7
[0.20.6]: https://github.com/nemtech/symbol-sdk-typescript-javascript/compare/v0.20.5...v0.20.6
[0.20.5]: https://github.com/nemtech/symbol-sdk-typescript-javascript/compare/v0.20.4...v0.20.5
[0.20.4]: https://github.com/nemtech/symbol-sdk-typescript-javascript/compare/v0.20.3...v0.20.4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ The Symbol SDK for TypeScript / JavaScript allows you to develop web, mobile, an

## Important Notes

### _Gorilla.1_ Network Compatibility ([email protected].2)
### _Gorilla.1_ Network Compatibility ([email protected].4)

Due to a network upgrade with [catapult-server@Gorilla](https://github.com/nemtech/catapult-server/releases/tag/v0.9.6.2) version, **it is recommended to use this package's 0.20.6 version and upwards to use this package with Fushicho versioned networks**.
Due to a network upgrade with [catapult-server@Gorilla](https://github.com/nemtech/catapult-server/releases/tag/v0.9.6.4) version, **it is recommended to use this package's 0.20.7 version and upwards to use this package with Fushicho versioned networks**.

The upgrade to this package's [version v0.20.6](https://github.com/nemtech/symbol-sdk-typescript-javascript/releases/tag/v0.20.6) is mandatory for **_Gorilla compatibility**.

Expand Down
126 changes: 126 additions & 0 deletions e2e/infrastructure/PersistentHarvesting.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/*
* Copyright 2018 NEM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { Account } from '../../src/model/account/Account';
import { NetworkType } from '../../src/model/network/NetworkType';
import { Deadline } from '../../src/model/transaction/Deadline';
import { IntegrationTestHelper } from './IntegrationTestHelper';
import { LinkAction } from '../../src/model/transaction/LinkAction';
import { AccountKeyLinkTransaction } from '../../src/model/transaction/AccountKeyLinkTransaction';
import { PersistentDelegationRequestTransaction } from '../../src/model/transaction/PersistentDelegationRequestTransaction';
import { VrfKeyLinkTransaction } from '../../src/model/transaction/VrfKeyLinkTransaction';
import { NodeKeyLinkTransaction } from '../../src/model/transaction/NodeKeyLinkTransaction';

describe('PersistentHarvesting', () => {
const helper = new IntegrationTestHelper();
let account: Account;
let generationHash: string;
let networkType: NetworkType;
let remoteAccount: Account;
const vrfKeyPair = Account.createFromPrivateKey(
'82798EA9A2D2D202AFCCC82C40A287780BCA3C7F7A2FD5B754832804C6BE1BAA',
NetworkType.MIJIN_TEST,
);

before(() => {
return helper.start().then(() => {
remoteAccount = Account.generateNewAccount(helper.networkType);
console.log(remoteAccount.privateKey, remoteAccount.publicAccount);
account = helper.harvestingAccount;
generationHash = helper.generationHash;
networkType = helper.networkType;
});
});
before(() => {
return helper.listener.open();
});

after(() => {
helper.listener.close();
});

/**
* =========================
* Setup test data
* =========================
*/

describe('AccountKeyLinkTransaction', () => {
it('standalone', () => {
const accountLinkTransaction = AccountKeyLinkTransaction.create(
Deadline.create(),
remoteAccount.publicKey,
LinkAction.Link,
networkType,
helper.maxFee,
);
const signedTransaction = accountLinkTransaction.signWith(account, generationHash);

return helper.announce(signedTransaction);
});
});

describe('VrfKeyLinkTransaction', () => {
it('standalone', () => {
const vrfKeyLinkTransaction = VrfKeyLinkTransaction.create(
Deadline.create(),
vrfKeyPair.publicKey,
LinkAction.Link,
networkType,
helper.maxFee,
);
const signedTransaction = vrfKeyLinkTransaction.signWith(account, generationHash);

return helper.announce(signedTransaction);
});
});

describe('NodeKeyLinkTransaction', () => {
it('standalone', () => {
const nodeKeyLinkTransaction = NodeKeyLinkTransaction.create(
Deadline.create(),
'cfd84eca83508bbee954668e4aecca736caefa615367da76afe6985d695381db',
LinkAction.Link,
networkType,
helper.maxFee,
);
const signedTransaction = nodeKeyLinkTransaction.signWith(account, generationHash);

return helper.announce(signedTransaction);
});
});
/**
* =========================
* Tests
* =========================
*/

describe('transactions', () => {
it('should create delegated harvesting transaction', () => {
const tx = PersistentDelegationRequestTransaction.createPersistentDelegationRequestTransaction(
Deadline.create(),
remoteAccount.privateKey,
vrfKeyPair.privateKey,
'cfd84eca83508bbee954668e4aecca736caefa615367da76afe6985d695381db',
NetworkType.MIJIN_TEST,
helper.maxFee,
);

const signedTransaction = tx.signWith(account, generationHash);
return helper.announce(signedTransaction);
});
});
});
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"ripemd160": "^2.0.2",
"rxjs": "^6.5.3",
"rxjs-compat": "^6.5.3",
"symbol-openapi-typescript-fetch-client": "0.9.6-SNAPSHOT.202007311152",
"symbol-openapi-typescript-fetch-client": "0.9.6",
"tweetnacl": "^1.0.3",
"utf8": "^3.0.0",
"ws": "^7.2.3"
Expand Down

0 comments on commit 98cca54

Please sign in to comment.