[breaking] rename packages dependency prefix to `@harmony-js`

@types
neeboo 6 years ago
parent 4e20cd3884
commit 5859f91bbe
  1. 2
      packages/harmony-account/README.md
  2. 14
      packages/harmony-account/package.json
  3. 8
      packages/harmony-account/src/account.ts
  4. 8
      packages/harmony-account/src/utils.ts
  5. 8
      packages/harmony-account/src/wallet.ts
  6. 4
      packages/harmony-contract/__test__/abiCoder.test.ts
  7. 14
      packages/harmony-contract/package.json
  8. 4
      packages/harmony-contract/src/abi/abiCoder.ts
  9. 4
      packages/harmony-contract/src/abi/api.ts
  10. 4
      packages/harmony-contract/src/abi/utils.ts
  11. 6
      packages/harmony-contract/src/contract.ts
  12. 2
      packages/harmony-contract/src/contractFactory.ts
  13. 2
      packages/harmony-contract/src/events/event.ts
  14. 8
      packages/harmony-contract/src/methods/method.ts
  15. 2
      packages/harmony-contract/src/models/AbiItemModel.ts
  16. 4
      packages/harmony-contract/src/utils/formatter.ts
  17. 2
      packages/harmony-contract/src/utils/mapper.ts
  18. 2
      packages/harmony-core/__test__/blockchain.test.ts
  19. 16
      packages/harmony-core/package.json
  20. 6
      packages/harmony-core/src/blockchain.ts
  21. 12
      packages/harmony-core/src/harmony.ts
  22. 6
      packages/harmony-core/src/types.ts
  23. 6
      packages/harmony-crypto/package.json
  24. 2
      packages/harmony-crypto/src/keyTool.ts
  25. 2
      packages/harmony-crypto/src/keystore.ts
  26. 4
      packages/harmony-crypto/src/signature.ts
  27. 8
      packages/harmony-network/package.json
  28. 2
      packages/harmony-network/src/messenger/messenger.ts
  29. 2
      packages/harmony-network/src/messenger/responseMiddleware.ts
  30. 2
      packages/harmony-network/src/providers/baseSocket.ts
  31. 2
      packages/harmony-network/src/providers/ws.ts
  32. 2
      packages/harmony-network/src/tracker/baseTracker.ts
  33. 12
      packages/harmony-transaction/package.json
  34. 4
      packages/harmony-transaction/src/factory.ts
  35. 6
      packages/harmony-transaction/src/transaction.ts
  36. 6
      packages/harmony-transaction/src/utils.ts
  37. 2
      packages/harmony-utils/__test__/fixture.ts
  38. 4
      packages/harmony-utils/package.json
  39. 2
      scripts/projects.ts

@ -14,7 +14,7 @@
```js
import { Wallet } from '@harmony/account';
import { Wallet } from '@harmony-js/account';
const wallet = new Wallet();

@ -1,5 +1,5 @@
{
"name": "@harmony/account",
"name": "@harmony-js/account",
"version": "0.0.6",
"description": "account and wallet for harmony",
"main": "dist/index.js",
@ -17,11 +17,11 @@
"author": "neeboo@firestack.one",
"license": "ISC",
"dependencies": {
"@harmony/core": "0.0.6",
"@harmony/crypto": "0.0.6",
"@harmony/network": "0.0.6",
"@harmony/transaction": "0.0.6",
"@harmony/utils": "0.0.6"
"@harmony-js/core": "0.0.6",
"@harmony-js/crypto": "0.0.6",
"@harmony-js/network": "0.0.6",
"@harmony-js/transaction": "0.0.6",
"@harmony-js/utils": "0.0.6"
},
"gitHead": "fcb10df63e2369534342a235edd70091154e2390"
"gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1"
}

@ -8,11 +8,11 @@ import {
EncryptOptions,
Keystore,
Signature,
} from '@harmony/crypto';
} from '@harmony-js/crypto';
import { isPrivateKey, add0xToString, hexToNumber } from '@harmony/utils';
import { Transaction } from '@harmony/transaction';
import { Messenger, RPCMethod } from '@harmony/network';
import { isPrivateKey, add0xToString, hexToNumber } from '@harmony-js/utils';
import { Transaction } from '@harmony-js/transaction';
import { Messenger, RPCMethod } from '@harmony-js/network';
import { Shards } from './types';
import { RLPSign, defaultMessenger } from './utils';

@ -1,7 +1,7 @@
import { HttpProvider, Messenger } from '@harmony/network';
import { Transaction, TxParams } from '@harmony/transaction';
import { sign, keccak256, Signature } from '@harmony/crypto';
import { ChainType } from '@harmony/utils';
import { HttpProvider, Messenger } from '@harmony-js/network';
import { Transaction, TxParams } from '@harmony-js/transaction';
import { sign, keccak256, Signature } from '@harmony-js/crypto';
import { ChainType } from '@harmony-js/utils';
export const RLPSign = (
transaction: Transaction,

@ -1,8 +1,8 @@
import { bip39, hdkey, EncryptOptions } from '@harmony/crypto';
import { Messenger } from '@harmony/network';
import { isPrivateKey, isAddress } from '@harmony/utils';
import { bip39, hdkey, EncryptOptions } from '@harmony-js/crypto';
import { Messenger } from '@harmony-js/network';
import { isPrivateKey, isAddress } from '@harmony-js/utils';
import { Account } from './account';
import { Transaction } from '@harmony/transaction';
import { Transaction } from '@harmony-js/transaction';
import { defaultMessenger } from './utils';
class Wallet {

@ -1,6 +1,6 @@
import { AbiCoder } from '../src/abi/abiCoder';
import { BN } from '@harmony/crypto';
import { isArray } from '@harmony/utils';
import { BN } from '@harmony-js/crypto';
import { isArray } from '@harmony-js/utils';
import { abis } from './fixtures/abiv2';
function getValues(object: any, format?: any, named?: any): any {

@ -1,5 +1,5 @@
{
"name": "@harmony/contract",
"name": "@harmony-js/contract",
"version": "0.0.6",
"description": "contract libraries for harmony",
"main": "dist/index.js",
@ -17,12 +17,12 @@
},
"license": "ISC",
"dependencies": {
"@harmony/account": "0.0.6",
"@harmony/crypto": "0.0.6",
"@harmony/network": "0.0.6",
"@harmony/transaction": "0.0.6",
"@harmony/utils": "0.0.6",
"@harmony-js/account": "0.0.6",
"@harmony-js/crypto": "0.0.6",
"@harmony-js/network": "0.0.6",
"@harmony-js/transaction": "0.0.6",
"@harmony-js/utils": "0.0.6",
"abi-decoder": "^1.2.0"
},
"gitHead": "fcb10df63e2369534342a235edd70091154e2390"
"gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1"
}

@ -18,8 +18,8 @@ import {
Arrayish,
checkNew,
bytesPadRight,
} from '@harmony/crypto';
import { hexToBN } from '@harmony/utils';
} from '@harmony-js/crypto';
import { hexToBN } from '@harmony-js/utils';
const NegativeOne: BN = new BN(-1);
const One: BN = new BN(1);

@ -1,6 +1,6 @@
import { AbiCoder as ABICoder, ParamType, toUtf8Bytes } from './abiCoder';
import { isObject, isArray } from '@harmony/utils';
import { keccak256, Arrayish } from '@harmony/crypto';
import { isObject, isArray } from '@harmony-js/utils';
import { keccak256, Arrayish } from '@harmony-js/crypto';
import { jsonInterfaceMethodToString, bnToString } from './utils';
export class AbiCoderClass {

@ -1,5 +1,5 @@
import { isObject, isArray } from '@harmony/utils';
import { BN } from '@harmony/crypto';
import { isObject, isArray } from '@harmony-js/utils';
import { BN } from '@harmony-js/crypto';
export const jsonInterfaceMethodToString = (json: any): string => {
if (isObject(json) && json.name && json.name.includes('(')) {

@ -1,6 +1,6 @@
import { Wallet } from '@harmony/account';
// import { Emitter } from '@harmony/network';
import { Transaction } from '@harmony/transaction';
import { Wallet } from '@harmony-js/account';
// import { Emitter } from '@harmony-js/network';
import { Transaction } from '@harmony-js/transaction';
import { AbiCoder } from './abi/index';
import { abiMapper } from './utils/mapper';
import { ContractOptions } from './utils/options';

@ -1,4 +1,4 @@
import { Wallet } from '@harmony/account';
import { Wallet } from '@harmony-js/account';
import { Contract } from './contract';
import { ContractOptions } from './utils/options';

@ -1,5 +1,5 @@
import { AbiItemModel } from '../models/types';
import { Messenger, RPCMethod, WSProvider } from '@harmony/network';
import { Messenger, RPCMethod, WSProvider } from '@harmony-js/network';
import { Contract } from '../contract';
import { decode as eventLogDecoder } from '../utils/decoder';
import { inputLogFormatter, outputLogFormatter } from '../utils/formatter';

@ -1,11 +1,11 @@
import { Wallet } from '@harmony/account';
import { Wallet } from '@harmony-js/account';
import {
TransactionFactory,
Transaction,
// TxStatus,
} from '@harmony/transaction';
import { RPCMethod, getResultForData, Emitter } from '@harmony/network';
import { hexToNumber, hexToBN } from '@harmony/utils';
} from '@harmony-js/transaction';
import { RPCMethod, getResultForData, Emitter } from '@harmony-js/network';
import { hexToNumber, hexToBN } from '@harmony-js/utils';
import { AbiItemModel } from '../models/types';
import { Contract } from '../contract';
import { methodEncoder } from '../utils/encoder';

@ -1,4 +1,4 @@
import { isArray } from '@harmony/utils';
import { isArray } from '@harmony-js/utils';
import { AbiItemModel, AbiOutput, AbiInput } from './types';
export class AbiItem {

@ -3,14 +3,14 @@ import {
isHexString,
keccak256,
toChecksumAddress,
} from '@harmony/crypto';
} from '@harmony-js/crypto';
import {
numberToHex,
isArray,
hexToNumber,
isString,
isAddress,
} from '@harmony/utils';
} from '@harmony-js/utils';
import { toUtf8Bytes } from '../abi/abiCoder';
export const inputLogFormatter = (options: any) => {

@ -1,4 +1,4 @@
import { isArray } from '@harmony/utils';
import { isArray } from '@harmony-js/utils';
import { AbiItem } from '../models/AbiItemModel';
import { AbiModel } from '../models/AbiModel';
import { AbiItemModel } from '../models/types';

@ -1,7 +1,7 @@
// tslint:disable-next-line: no-implicit-dependencies
import fetch from 'jest-fetch-mock';
import { Blockchain } from '../src/blockchain';
import { HttpProvider, Messenger } from '@harmony/network';
import { HttpProvider, Messenger } from '@harmony-js/network';
const provider = new HttpProvider('https://mock.com');
const messenger = new Messenger(provider);

@ -1,5 +1,5 @@
{
"name": "@harmony/core",
"name": "@harmony-js/core",
"version": "0.0.6",
"description": "harmony core package",
"main": "dist/index.js",
@ -17,12 +17,12 @@
"author": "neeboo@firestack.one",
"license": "ISC",
"dependencies": {
"@harmony/account": "0.0.6",
"@harmony/contract": "0.0.6",
"@harmony/crypto": "0.0.6",
"@harmony/network": "0.0.6",
"@harmony/transaction": "0.0.6",
"@harmony/utils": "0.0.6"
"@harmony-js/account": "0.0.6",
"@harmony-js/contract": "0.0.6",
"@harmony-js/crypto": "0.0.6",
"@harmony-js/network": "0.0.6",
"@harmony-js/transaction": "0.0.6",
"@harmony-js/utils": "0.0.6"
},
"gitHead": "fcb10df63e2369534342a235edd70091154e2390"
"gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1"
}

@ -3,16 +3,16 @@ import {
Messenger,
ResponseMiddleware,
WSProvider,
} from '@harmony/network';
} from '@harmony-js/network';
import {
assertObject,
AssertType,
HarmonyCore,
DefaultBlockParams,
} from '@harmony/utils';
} from '@harmony-js/utils';
import { Transaction } from '@harmony/transaction';
import { Transaction } from '@harmony-js/transaction';
class Blockchain extends HarmonyCore {
messenger: Messenger;

@ -1,10 +1,10 @@
import * as crypto from '@harmony/crypto';
import * as utils from '@harmony/utils';
import * as crypto from '@harmony-js/crypto';
import * as utils from '@harmony-js/utils';
import { HttpProvider, Messenger, WSProvider } from '@harmony/network';
import { TransactionFactory, Transaction } from '@harmony/transaction';
import { ContractFactory, Contract } from '@harmony/contract';
import { Wallet, Account } from '@harmony/account';
import { HttpProvider, Messenger, WSProvider } from '@harmony-js/network';
import { TransactionFactory, Transaction } from '@harmony-js/transaction';
import { ContractFactory, Contract } from '@harmony-js/contract';
import { Wallet, Account } from '@harmony-js/account';
import { Blockchain } from './blockchain';
export class Harmony extends utils.HarmonyCore {

@ -1,6 +1,6 @@
import { HttpProvider, Messenger } from '@harmony/network';
import { TransactionFactory, Transaction } from '@harmony/transaction';
import { Wallet, Account } from '@harmony/account';
import { HttpProvider, Messenger } from '@harmony-js/network';
import { TransactionFactory, Transaction } from '@harmony-js/transaction';
import { Wallet, Account } from '@harmony-js/account';
import { Blockchain } from './blockchain';
export interface HarmonyModule {

@ -1,5 +1,5 @@
{
"name": "@harmony/crypto",
"name": "@harmony-js/crypto",
"version": "0.0.6",
"description": "crypto libraries for harmony",
"main": "dist/index.js",
@ -17,7 +17,7 @@
},
"license": "ISC",
"dependencies": {
"@harmony/utils": "0.0.6",
"@harmony-js/utils": "0.0.6",
"aes-js": "^3.1.2",
"base-x": "^3.0.5",
"bip39": "^2.5.0",
@ -30,5 +30,5 @@
"scrypt.js": "^0.3.0",
"uuid": "^3.3.2"
},
"gitHead": "fcb10df63e2369534342a235edd70091154e2390"
"gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1"
}

@ -4,7 +4,7 @@ import * as errors from './errors';
import { keccak256 } from './keccak256';
import { randomBytes } from './random';
import { isPrivateKey, strip0x } from '@harmony/utils';
import { isPrivateKey, strip0x } from '@harmony-js/utils';
import { encode } from './rlp';
const secp256k1 = elliptic.ec('secp256k1');

@ -2,7 +2,7 @@ import aes from 'aes-js';
import scrypt from 'scrypt.js';
import { pbkdf2Sync } from 'pbkdf2';
import uuid from 'uuid';
import { isPrivateKey } from '@harmony/utils';
import { isPrivateKey } from '@harmony-js/utils';
import { randomBytes } from './random';
import { getAddressFromPrivateKey } from './keyTool';
import {

@ -0,0 +1,4 @@
// Copyright (c) 2019 suwei
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT

@ -1,5 +1,5 @@
{
"name": "@harmony/network",
"name": "@harmony-js/network",
"version": "0.0.6",
"description": "network suites for harmony",
"main": "dist/index.js",
@ -17,11 +17,11 @@
"author": "neeboo@firestack.one",
"license": "ISC",
"dependencies": {
"@harmony/core": "0.0.6",
"@harmony/utils": "0.0.6",
"@harmony-js/core": "0.0.6",
"@harmony-js/utils": "0.0.6",
"cross-fetch": "^3.0.2",
"mitt": "^1.1.3",
"websocket": "^1.0.28"
},
"gitHead": "fcb10df63e2369534342a235edd70091154e2390"
"gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1"
}

@ -1,4 +1,4 @@
import { HarmonyCore, ChainType, isString, ChainID } from '@harmony/utils';
import { HarmonyCore, ChainType, isString, ChainID } from '@harmony-js/utils';
import { JsonRpc } from '../rpcMethod/rpcbuilder';
import { ResponseMiddleware } from './responseMiddleware';
import { HttpProvider } from '../providers/http';

@ -1,5 +1,5 @@
import { RPCResponseBody } from '../types';
import { isObject } from '@harmony/utils';
import { isObject } from '@harmony-js/utils';
/**
* @class ResponseMiddleware
* @description Response middleware of RPC

@ -1,4 +1,4 @@
import { isWs } from '@harmony/utils';
import { isWs } from '@harmony-js/utils';
import mitt from 'mitt';
import { BaseProvider } from './baseProvider';

@ -6,7 +6,7 @@ import {
SocketState,
// EmittType,
} from './baseSocket';
import { isWs, isObject, isArray } from '@harmony/utils';
import { isWs, isObject, isArray } from '@harmony-js/utils';
import { JsonRpc } from '../rpcMethod/rpcbuilder';
import { composeMiddleware } from '../rpcMethod/net';
import { RPCRequestPayload } from '../types';

@ -1,4 +1,4 @@
import { isHex, hexToNumber } from '@harmony/utils';
import { isHex, hexToNumber } from '@harmony-js/utils';
import { Emitter } from '../providers/emitter';
const sec = 1000;

@ -1,5 +1,5 @@
{
"name": "@harmony/transaction",
"name": "@harmony-js/transaction",
"version": "0.0.6",
"description": "transaction package for harmony",
"main": "dist/index.js",
@ -17,10 +17,10 @@
"author": "neeboo@firestack.one",
"license": "ISC",
"dependencies": {
"@harmony/core": "0.0.6",
"@harmony/crypto": "0.0.6",
"@harmony/network": "0.0.6",
"@harmony/utils": "0.0.6"
"@harmony-js/core": "0.0.6",
"@harmony-js/crypto": "0.0.6",
"@harmony-js/network": "0.0.6",
"@harmony-js/utils": "0.0.6"
},
"gitHead": "fcb10df63e2369534342a235edd70091154e2390"
"gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1"
}

@ -1,5 +1,5 @@
import { getContractAddress } from '@harmony/crypto';
import { Messenger } from '@harmony/network';
import { getContractAddress } from '@harmony-js/crypto';
import { Messenger } from '@harmony-js/network';
import { Transaction } from './transaction';
import { TxParams, TxStatus } from './types';

@ -6,9 +6,9 @@ import {
stripZeros,
Signature,
splitSignature,
} from '@harmony/crypto';
import { add0xToString, numberToHex } from '@harmony/utils';
import { Messenger, RPCMethod, Emitter } from '@harmony/network';
} from '@harmony-js/crypto';
import { add0xToString, numberToHex } from '@harmony-js/utils';
import { Messenger, RPCMethod, Emitter } from '@harmony-js/network';
import { TxParams, TxStatus, TransasctionReceipt } from './types';
import {
recover,

@ -4,7 +4,7 @@ import {
isAddress,
strip0x,
ChainType,
} from '@harmony/utils';
} from '@harmony-js/utils';
import {
decode,
encode,
@ -13,8 +13,8 @@ import {
BN,
hexZeroPad,
recoverAddress,
} from '@harmony/crypto';
import { HttpProvider, Messenger } from '@harmony/network';
} from '@harmony-js/crypto';
import { HttpProvider, Messenger } from '@harmony-js/network';
import { TxParams } from './types';
export const transactionFields = [

@ -5,7 +5,7 @@ export const basicType = {
float: 0.1,
text: 'testString',
jsonString:
'{"name":"@harmony/utils","version":"0.0.48","description":"utils for harmony"}',
'{"name":"@harmony-js/utils","version":"0.0.48","description":"utils for harmony"}',
hexNumber: 0x123,
hexString: '0x123',
bool: true,

@ -1,5 +1,5 @@
{
"name": "@harmony/utils",
"name": "@harmony-js/utils",
"version": "0.0.6",
"description": "utils for harmony",
"main": "dist/index.js",
@ -20,5 +20,5 @@
"@types/bn.js": "^4.11.3",
"bn.js": "^4.11.8"
},
"gitHead": "fcb10df63e2369534342a235edd70091154e2390"
"gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1"
}

@ -65,7 +65,7 @@ export const projects = fs
const pkgGlobalName = camelCase(pkgName);
const pkgPath = path.join(packagesPath, p);
const pkgSrc = path.join(pkgPath, 'src');
const pkgScopedName = `@harmony/${p.replace('harmony-', '')}`;
const pkgScopedName = `@harmony-js/${p.replace('harmony-', '')}`;
const pkgDist = path.join(pkgPath, 'dist');
const pkgUmd = path.join(pkgDist, 'index.umd.js');

Loading…
Cancel
Save