diff --git a/.babelrc.js b/.babelrc.js index 5188ea042..bea68180a 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -1 +1,4 @@ +// Copyright 2017-2020 @polkadot/util authors & contributors +// SPDX-License-Identifier: Apache-2.0 + module.exports = require('./babel.config.js'); diff --git a/.eslintrc.js b/.eslintrc.js index 048ac1f5f..f7b70ee7c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,6 @@ +// Copyright 2017-2020 @polkadot/util authors & contributors +// SPDX-License-Identifier: Apache-2.0 + const base = require('@polkadot/dev/config/eslint'); module.exports = { diff --git a/babel.config.js b/babel.config.js index 5e259bd31..14a429d52 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,4 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 module.exports = require('@polkadot/dev/config/babel'); diff --git a/copy-to-apps.sh b/copy-to-apps.sh index c0c381ad8..61e530b54 100755 --- a/copy-to-apps.sh +++ b/copy-to-apps.sh @@ -1,4 +1,6 @@ #!/bin/bash +# Copyright 2017-2020 @polkadot/util authors & contributors +# SPDX-License-Identifier: Apache-2.0 function copy_folder () { SRC="packages/$1/build" diff --git a/jest.config.js b/jest.config.js index 5818c91eb..f7da09d18 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 const config = require('@polkadot/dev/config/jest'); diff --git a/jest.resolver.js b/jest.resolver.js index 8455f8e14..c21bf2491 100644 --- a/jest.resolver.js +++ b/jest.resolver.js @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 const path = require('path'); diff --git a/packages/keyring/src/defaults.ts b/packages/keyring/src/defaults.ts index e53212f65..af18c7243 100644 --- a/packages/keyring/src/defaults.ts +++ b/packages/keyring/src/defaults.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // default substrate dev phrase const DEV_PHRASE = 'bottom drive obey lake curtain smoke basket hold race lonely fit walk'; diff --git a/packages/keyring/src/index.spec.ts b/packages/keyring/src/index.spec.ts index a1498cca5..eece6dca6 100644 --- a/packages/keyring/src/index.spec.ts +++ b/packages/keyring/src/index.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a, stringToU8a } from '@polkadot/util'; import { cryptoWaitReady, setSS58Format, encodeAddress } from '@polkadot/util-crypto'; diff --git a/packages/keyring/src/index.ts b/packages/keyring/src/index.ts index e171877ad..c49bad37b 100644 --- a/packages/keyring/src/index.ts +++ b/packages/keyring/src/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { detectPackage } from '@polkadot/util'; import { decodeAddress, encodeAddress, setSS58Format } from '@polkadot/util-crypto'; diff --git a/packages/keyring/src/keyring.ts b/packages/keyring/src/keyring.ts index 629e1edaf..e12dbf939 100644 --- a/packages/keyring/src/keyring.ts +++ b/packages/keyring/src/keyring.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeypairType, Keypair } from '@polkadot/util-crypto/types'; import { KeyringInstance, KeyringPair, KeyringPair$Json, KeyringPair$JsonEncodingTypes, KeyringPair$Meta, KeyringOptions } from './types'; diff --git a/packages/keyring/src/pair/decode.spec.ts b/packages/keyring/src/pair/decode.spec.ts index 55e18f1da..7437939ee 100644 --- a/packages/keyring/src/pair/decode.spec.ts +++ b/packages/keyring/src/pair/decode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import testingPairs from '../testingPairs'; diff --git a/packages/keyring/src/pair/decode.ts b/packages/keyring/src/pair/decode.ts index 061cdef01..7f927088b 100644 --- a/packages/keyring/src/pair/decode.ts +++ b/packages/keyring/src/pair/decode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeyringPair$JsonEncodingTypes } from '../types'; import { PairInfo } from './types'; diff --git a/packages/keyring/src/pair/defaults.ts b/packages/keyring/src/pair/defaults.ts index 5b4e3df59..e7b47d38b 100644 --- a/packages/keyring/src/pair/defaults.ts +++ b/packages/keyring/src/pair/defaults.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeyringPair$JsonEncodingTypes } from '../types'; diff --git a/packages/keyring/src/pair/encode.spec.ts b/packages/keyring/src/pair/encode.spec.ts index a9e98d15d..4852eeb7b 100644 --- a/packages/keyring/src/pair/encode.spec.ts +++ b/packages/keyring/src/pair/encode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import testingPairs from '../testingPairs'; import { PKCS8_DIVIDER, PKCS8_HEADER, NONCE_LENGTH, PUB_LENGTH, SCRYPT_LENGTH, SEC_LENGTH } from './defaults'; diff --git a/packages/keyring/src/pair/encode.ts b/packages/keyring/src/pair/encode.ts index 47c87ca0e..2c42bfd6d 100644 --- a/packages/keyring/src/pair/encode.ts +++ b/packages/keyring/src/pair/encode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { PairInfo } from './types'; diff --git a/packages/keyring/src/pair/index.spec.ts b/packages/keyring/src/pair/index.spec.ts index 532ec55ba..4a22c712d 100644 --- a/packages/keyring/src/pair/index.spec.ts +++ b/packages/keyring/src/pair/index.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { cryptoWaitReady, encodeAddress as toSS58, setSS58Format } from '@polkadot/util-crypto'; diff --git a/packages/keyring/src/pair/index.ts b/packages/keyring/src/pair/index.ts index c0856ca7e..2f0844ec4 100644 --- a/packages/keyring/src/pair/index.ts +++ b/packages/keyring/src/pair/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair, KeypairType } from '@polkadot/util-crypto/types'; import { KeyringPair, KeyringPair$Json, KeyringPair$JsonEncodingTypes, KeyringPair$Meta, SignOptions } from '../types'; diff --git a/packages/keyring/src/pair/nobody.ts b/packages/keyring/src/pair/nobody.ts index f36f38b90..4efd5bb51 100644 --- a/packages/keyring/src/pair/nobody.ts +++ b/packages/keyring/src/pair/nobody.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '../types'; diff --git a/packages/keyring/src/pair/toJson.spec.ts b/packages/keyring/src/pair/toJson.spec.ts index f3b671bf2..d8f4b8c8f 100644 --- a/packages/keyring/src/pair/toJson.spec.ts +++ b/packages/keyring/src/pair/toJson.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import testingPairs from '../testingPairs'; diff --git a/packages/keyring/src/pair/toJson.ts b/packages/keyring/src/pair/toJson.ts index d48cd4699..501cd2ee8 100644 --- a/packages/keyring/src/pair/toJson.ts +++ b/packages/keyring/src/pair/toJson.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeypairType } from '@polkadot/util-crypto/types'; import { KeyringPair$Json, KeyringPair$JsonEncodingTypes, KeyringPair$Meta } from '../types'; diff --git a/packages/keyring/src/pair/types.ts b/packages/keyring/src/pair/types.ts index 6a86609bd..f308573c6 100644 --- a/packages/keyring/src/pair/types.ts +++ b/packages/keyring/src/pair/types.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export interface PairInfo { publicKey: Uint8Array; diff --git a/packages/keyring/src/pairs.ts b/packages/keyring/src/pairs.ts index 69d0786d6..e326e0efd 100644 --- a/packages/keyring/src/pairs.ts +++ b/packages/keyring/src/pairs.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeyringPairs, KeyringPair } from './types'; diff --git a/packages/keyring/src/suri.spec.ts b/packages/keyring/src/suri.spec.ts index 32876e4c8..fe4aa2b5e 100644 --- a/packages/keyring/src/suri.spec.ts +++ b/packages/keyring/src/suri.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // From https://github.com/paritytech/substrate/wiki/Secret-URI-Test-Vectors diff --git a/packages/keyring/src/testing.ts b/packages/keyring/src/testing.ts index e6f1f5f24..db34fdafd 100644 --- a/packages/keyring/src/testing.ts +++ b/packages/keyring/src/testing.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeyringInstance, KeyringOptions } from './types'; diff --git a/packages/keyring/src/testingPairs.spec.ts b/packages/keyring/src/testingPairs.spec.ts index fe20f034f..f0507ea71 100644 --- a/packages/keyring/src/testingPairs.spec.ts +++ b/packages/keyring/src/testingPairs.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { cryptoWaitReady } from '@polkadot/util-crypto'; diff --git a/packages/keyring/src/testingPairs.ts b/packages/keyring/src/testingPairs.ts index 03e05465d..2d50c28bc 100644 --- a/packages/keyring/src/testingPairs.ts +++ b/packages/keyring/src/testingPairs.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeyringPair, KeyringOptions } from './types'; diff --git a/packages/keyring/src/types.ts b/packages/keyring/src/types.ts index 9b0e81daa..eb18e4c7d 100644 --- a/packages/keyring/src/types.ts +++ b/packages/keyring/src/types.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/keyring authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from '@polkadot/util-crypto/address/types'; import { KeypairType } from '@polkadot/util-crypto/types'; diff --git a/packages/util-crypto/src/address/check.spec.ts b/packages/util-crypto/src/address/check.spec.ts index 31448281a..71ea92dfc 100644 --- a/packages/util-crypto/src/address/check.spec.ts +++ b/packages/util-crypto/src/address/check.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import checkAddress from './check'; diff --git a/packages/util-crypto/src/address/check.ts b/packages/util-crypto/src/address/check.ts index fdf01cf6b..a8a991ec0 100644 --- a/packages/util-crypto/src/address/check.ts +++ b/packages/util-crypto/src/address/check.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from './types'; diff --git a/packages/util-crypto/src/address/checkChecksum.ts b/packages/util-crypto/src/address/checkChecksum.ts index af5e53acc..7cddd5830 100644 --- a/packages/util-crypto/src/address/checkChecksum.ts +++ b/packages/util-crypto/src/address/checkChecksum.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import sshash from './sshash'; diff --git a/packages/util-crypto/src/address/decode.spec.ts b/packages/util-crypto/src/address/decode.spec.ts index b0f0e6d32..516ad9024 100644 --- a/packages/util-crypto/src/address/decode.spec.ts +++ b/packages/util-crypto/src/address/decode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a, u8aToHex, hexToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/address/decode.ts b/packages/util-crypto/src/address/decode.ts index a349eb453..ac01edac3 100644 --- a/packages/util-crypto/src/address/decode.ts +++ b/packages/util-crypto/src/address/decode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from './types'; diff --git a/packages/util-crypto/src/address/defaults.ts b/packages/util-crypto/src/address/defaults.ts index 1f6090b23..831934fc2 100644 --- a/packages/util-crypto/src/address/defaults.ts +++ b/packages/util-crypto/src/address/defaults.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { allowedSS58 } from './ss58'; diff --git a/packages/util-crypto/src/address/derive.spec.ts b/packages/util-crypto/src/address/derive.spec.ts index 6b9c24f81..6785df861 100644 --- a/packages/util-crypto/src/address/derive.spec.ts +++ b/packages/util-crypto/src/address/derive.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/address/derive.ts b/packages/util-crypto/src/address/derive.ts index 71edc47e6..43b2d80f6 100644 --- a/packages/util-crypto/src/address/derive.ts +++ b/packages/util-crypto/src/address/derive.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from './types'; diff --git a/packages/util-crypto/src/address/encode.spec.ts b/packages/util-crypto/src/address/encode.spec.ts index 885ba0dfd..df1f54fb3 100644 --- a/packages/util-crypto/src/address/encode.spec.ts +++ b/packages/util-crypto/src/address/encode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import testingPairs from '@polkadot/keyring/testingPairs'; diff --git a/packages/util-crypto/src/address/encode.ts b/packages/util-crypto/src/address/encode.ts index 574119845..4a7857cb6 100644 --- a/packages/util-crypto/src/address/encode.ts +++ b/packages/util-crypto/src/address/encode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from './types'; diff --git a/packages/util-crypto/src/address/encodeDerived.spec.ts b/packages/util-crypto/src/address/encodeDerived.spec.ts index 41f4286d5..8b2d797f8 100644 --- a/packages/util-crypto/src/address/encodeDerived.spec.ts +++ b/packages/util-crypto/src/address/encodeDerived.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import encodeDerivedAddress from './encodeDerived'; diff --git a/packages/util-crypto/src/address/encodeDerived.ts b/packages/util-crypto/src/address/encodeDerived.ts index 953036416..f9ae846d9 100644 --- a/packages/util-crypto/src/address/encodeDerived.ts +++ b/packages/util-crypto/src/address/encodeDerived.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from './types'; diff --git a/packages/util-crypto/src/address/encodeMulti.spec.ts b/packages/util-crypto/src/address/encodeMulti.spec.ts index c24da9c80..4504cc48a 100644 --- a/packages/util-crypto/src/address/encodeMulti.spec.ts +++ b/packages/util-crypto/src/address/encodeMulti.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import encodeMultiAddress from './encodeMulti'; diff --git a/packages/util-crypto/src/address/encodeMulti.ts b/packages/util-crypto/src/address/encodeMulti.ts index da444f823..fa773bf97 100644 --- a/packages/util-crypto/src/address/encodeMulti.ts +++ b/packages/util-crypto/src/address/encodeMulti.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from './types'; diff --git a/packages/util-crypto/src/address/eq.spec.ts b/packages/util-crypto/src/address/eq.spec.ts index de722971d..a91c63c1c 100644 --- a/packages/util-crypto/src/address/eq.spec.ts +++ b/packages/util-crypto/src/address/eq.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import testingPairs from '@polkadot/keyring/testingPairs'; import { addressEq } from '.'; diff --git a/packages/util-crypto/src/address/eq.ts b/packages/util-crypto/src/address/eq.ts index 92f28b0a6..43cc6d036 100644 --- a/packages/util-crypto/src/address/eq.ts +++ b/packages/util-crypto/src/address/eq.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aEq } from '@polkadot/util'; diff --git a/packages/util-crypto/src/address/index.ts b/packages/util-crypto/src/address/index.ts index 9d63dfc90..c2c189478 100644 --- a/packages/util-crypto/src/address/index.ts +++ b/packages/util-crypto/src/address/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import checkAddress from './check'; import checkAddressChecksum from './checkChecksum'; diff --git a/packages/util-crypto/src/address/keyDerived.spec.ts b/packages/util-crypto/src/address/keyDerived.spec.ts index 6d40d309f..223a119fd 100644 --- a/packages/util-crypto/src/address/keyDerived.spec.ts +++ b/packages/util-crypto/src/address/keyDerived.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import createKeyDerived from './keyDerived'; diff --git a/packages/util-crypto/src/address/keyDerived.ts b/packages/util-crypto/src/address/keyDerived.ts index 043a1ddf6..ab181f9d3 100644 --- a/packages/util-crypto/src/address/keyDerived.ts +++ b/packages/util-crypto/src/address/keyDerived.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; import { bnToU8a, stringToU8a, u8aConcat } from '@polkadot/util'; diff --git a/packages/util-crypto/src/address/keyMulti.spec.ts b/packages/util-crypto/src/address/keyMulti.spec.ts index cfc81ba94..8710f9d16 100644 --- a/packages/util-crypto/src/address/keyMulti.spec.ts +++ b/packages/util-crypto/src/address/keyMulti.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { createKeyMulti } from '.'; diff --git a/packages/util-crypto/src/address/keyMulti.ts b/packages/util-crypto/src/address/keyMulti.ts index 87cca0a8a..b1a273d5e 100644 --- a/packages/util-crypto/src/address/keyMulti.ts +++ b/packages/util-crypto/src/address/keyMulti.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; import { bnToU8a, compactToU8a, stringToU8a, u8aConcat, u8aSorted } from '@polkadot/util'; diff --git a/packages/util-crypto/src/address/setSS58Format.spec.ts b/packages/util-crypto/src/address/setSS58Format.spec.ts index e47a5d167..162da0bd6 100644 --- a/packages/util-crypto/src/address/setSS58Format.spec.ts +++ b/packages/util-crypto/src/address/setSS58Format.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import encode from './encode'; import setSS58Format from './setSS58Format'; diff --git a/packages/util-crypto/src/address/setSS58Format.ts b/packages/util-crypto/src/address/setSS58Format.ts index b5ca0ab0c..42a46835c 100644 --- a/packages/util-crypto/src/address/setSS58Format.ts +++ b/packages/util-crypto/src/address/setSS58Format.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from './types'; diff --git a/packages/util-crypto/src/address/sort.spec.ts b/packages/util-crypto/src/address/sort.spec.ts index 972e5feca..234203ee1 100644 --- a/packages/util-crypto/src/address/sort.spec.ts +++ b/packages/util-crypto/src/address/sort.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { sortAddresses } from '.'; diff --git a/packages/util-crypto/src/address/sort.ts b/packages/util-crypto/src/address/sort.ts index ce9acbce7..6f6a1e8e5 100644 --- a/packages/util-crypto/src/address/sort.ts +++ b/packages/util-crypto/src/address/sort.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Prefix } from './types'; diff --git a/packages/util-crypto/src/address/ss58.ts b/packages/util-crypto/src/address/ss58.ts index 4ce645165..6df254614 100644 --- a/packages/util-crypto/src/address/ss58.ts +++ b/packages/util-crypto/src/address/ss58.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export const allowedSS58 = [ // Polkadot diff --git a/packages/util-crypto/src/address/sshash.ts b/packages/util-crypto/src/address/sshash.ts index d749429da..c7f5dcb3e 100644 --- a/packages/util-crypto/src/address/sshash.ts +++ b/packages/util-crypto/src/address/sshash.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a, u8aConcat } from '@polkadot/util'; diff --git a/packages/util-crypto/src/address/types.ts b/packages/util-crypto/src/address/types.ts index 54d70968a..990db4674 100644 --- a/packages/util-crypto/src/address/types.ts +++ b/packages/util-crypto/src/address/types.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // FIXME we really want this to map with what is in the allowedSS58 array... i.e. the // values there. As of now, we just map to number. diff --git a/packages/util-crypto/src/base32/bs32.ts b/packages/util-crypto/src/base32/bs32.ts index 7c0942459..d54547800 100644 --- a/packages/util-crypto/src/base32/bs32.ts +++ b/packages/util-crypto/src/base32/bs32.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // https://github.com/multiformats/js-multibase/blob/master/src/constants.js const BASE32_ALPHABET = 'abcdefghijklmnopqrstuvwxyz234567'; diff --git a/packages/util-crypto/src/base32/decode.spec.ts b/packages/util-crypto/src/base32/decode.spec.ts index 62b3d2b0b..261739e1f 100644 --- a/packages/util-crypto/src/base32/decode.spec.ts +++ b/packages/util-crypto/src/base32/decode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToString } from '@polkadot/util'; diff --git a/packages/util-crypto/src/base32/decode.ts b/packages/util-crypto/src/base32/decode.ts index 5ad5e9015..18f6530a9 100644 --- a/packages/util-crypto/src/base32/decode.ts +++ b/packages/util-crypto/src/base32/decode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // adapted from https://github.com/multiformats/js-multibase/blob/424709195b46ffb1d6f2f69a7707598ebe751e5e/src/rfc4648.js diff --git a/packages/util-crypto/src/base32/encode.spec.ts b/packages/util-crypto/src/base32/encode.spec.ts index c129cba31..0331213b8 100644 --- a/packages/util-crypto/src/base32/encode.spec.ts +++ b/packages/util-crypto/src/base32/encode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { base58Decode } from '../base58'; import { base32Encode } from './'; diff --git a/packages/util-crypto/src/base32/encode.ts b/packages/util-crypto/src/base32/encode.ts index 4040a26ad..bad95b03b 100644 --- a/packages/util-crypto/src/base32/encode.ts +++ b/packages/util-crypto/src/base32/encode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // adapted from https://github.com/multiformats/js-multibase/blob/424709195b46ffb1d6f2f69a7707598ebe751e5e/src/rfc4648.js diff --git a/packages/util-crypto/src/base32/index.ts b/packages/util-crypto/src/base32/index.ts index 01a852c4e..e47b7f071 100644 --- a/packages/util-crypto/src/base32/index.ts +++ b/packages/util-crypto/src/base32/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Encode and decode base32 values diff --git a/packages/util-crypto/src/base32/validate.ts b/packages/util-crypto/src/base32/validate.ts index 89eb48385..b25c9a292 100644 --- a/packages/util-crypto/src/base32/validate.ts +++ b/packages/util-crypto/src/base32/validate.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { validateChars } from '../base58/validate'; import { BASE32_ALPHABET } from './bs32'; diff --git a/packages/util-crypto/src/base58/bs58.ts b/packages/util-crypto/src/base58/bs58.ts index c0c70dcfd..3d97a1b8c 100644 --- a/packages/util-crypto/src/base58/bs58.ts +++ b/packages/util-crypto/src/base58/bs58.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import baseX from 'base-x'; diff --git a/packages/util-crypto/src/base58/decode.ts b/packages/util-crypto/src/base58/decode.ts index 0e01dbccb..f4ee9a880 100644 --- a/packages/util-crypto/src/base58/decode.ts +++ b/packages/util-crypto/src/base58/decode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { assert, bufferToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/base58/encode.spec.ts b/packages/util-crypto/src/base58/encode.spec.ts index 923e1ccab..78539f431 100644 --- a/packages/util-crypto/src/base58/encode.spec.ts +++ b/packages/util-crypto/src/base58/encode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { base32Decode } from '../base32'; import { base58Encode } from './'; diff --git a/packages/util-crypto/src/base58/encode.ts b/packages/util-crypto/src/base58/encode.ts index 2d6d5be01..b282e600b 100644 --- a/packages/util-crypto/src/base58/encode.ts +++ b/packages/util-crypto/src/base58/encode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToBuffer, u8aToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/base58/index.ts b/packages/util-crypto/src/base58/index.ts index e4d23020e..48880ed18 100644 --- a/packages/util-crypto/src/base58/index.ts +++ b/packages/util-crypto/src/base58/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Encode and decode base58 values diff --git a/packages/util-crypto/src/base58/validate.ts b/packages/util-crypto/src/base58/validate.ts index 532b995fc..ed26d4738 100644 --- a/packages/util-crypto/src/base58/validate.ts +++ b/packages/util-crypto/src/base58/validate.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { BASE58_ALPHABET } from './bs58'; diff --git a/packages/util-crypto/src/base64/decode.spec.ts b/packages/util-crypto/src/base64/decode.spec.ts index 19a81f4f2..67476ebf7 100644 --- a/packages/util-crypto/src/base64/decode.spec.ts +++ b/packages/util-crypto/src/base64/decode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/base64/decode.ts b/packages/util-crypto/src/base64/decode.ts index 22496ba13..256907b0a 100644 --- a/packages/util-crypto/src/base64/decode.ts +++ b/packages/util-crypto/src/base64/decode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { bufferToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/base64/encode.spec.ts b/packages/util-crypto/src/base64/encode.spec.ts index 305350887..ac0543433 100644 --- a/packages/util-crypto/src/base64/encode.spec.ts +++ b/packages/util-crypto/src/base64/encode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { base64Encode } from '.'; diff --git a/packages/util-crypto/src/base64/encode.ts b/packages/util-crypto/src/base64/encode.ts index dd376b86a..a0ef7038c 100644 --- a/packages/util-crypto/src/base64/encode.ts +++ b/packages/util-crypto/src/base64/encode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToBuffer, u8aToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/base64/index.ts b/packages/util-crypto/src/base64/index.ts index 81dc4bbfd..4558ca4f9 100644 --- a/packages/util-crypto/src/base64/index.ts +++ b/packages/util-crypto/src/base64/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Encode and decode base64 values diff --git a/packages/util-crypto/src/base64/validate.spec.ts b/packages/util-crypto/src/base64/validate.spec.ts index db38b7b24..ea91b7b1b 100644 --- a/packages/util-crypto/src/base64/validate.spec.ts +++ b/packages/util-crypto/src/base64/validate.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { base64Validate } from '.'; diff --git a/packages/util-crypto/src/base64/validate.ts b/packages/util-crypto/src/base64/validate.ts index ac605b242..16d3f4f9b 100644 --- a/packages/util-crypto/src/base64/validate.ts +++ b/packages/util-crypto/src/base64/validate.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name base64Validate diff --git a/packages/util-crypto/src/blake2/asHex.spec.ts b/packages/util-crypto/src/blake2/asHex.spec.ts index 574bad50e..25d313528 100644 --- a/packages/util-crypto/src/blake2/asHex.spec.ts +++ b/packages/util-crypto/src/blake2/asHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/blake2/asHex.ts b/packages/util-crypto/src/blake2/asHex.ts index c54cd2747..80d5d9c58 100644 --- a/packages/util-crypto/src/blake2/asHex.ts +++ b/packages/util-crypto/src/blake2/asHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/blake2/asU8a.spec.ts b/packages/util-crypto/src/blake2/asU8a.spec.ts index 106507fee..a641d5689 100644 --- a/packages/util-crypto/src/blake2/asU8a.spec.ts +++ b/packages/util-crypto/src/blake2/asU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/blake2/asU8a.ts b/packages/util-crypto/src/blake2/asU8a.ts index 6239f430b..9c82e9863 100644 --- a/packages/util-crypto/src/blake2/asU8a.ts +++ b/packages/util-crypto/src/blake2/asU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import blakejs from 'blakejs'; import { u8aToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/blake2/index.ts b/packages/util-crypto/src/blake2/index.ts index 8e4c6a74c..85a7685cd 100644 --- a/packages/util-crypto/src/blake2/index.ts +++ b/packages/util-crypto/src/blake2/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Create blake2b values with specified bitlengths diff --git a/packages/util-crypto/src/ethereum/encode.spec.ts b/packages/util-crypto/src/ethereum/encode.spec.ts index 396bc1bde..669b13925 100644 --- a/packages/util-crypto/src/ethereum/encode.spec.ts +++ b/packages/util-crypto/src/ethereum/encode.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { keccakAsU8a } from '../keccak'; import { ethereumEncode } from './'; diff --git a/packages/util-crypto/src/ethereum/encode.ts b/packages/util-crypto/src/ethereum/encode.ts index b9f33e22a..6dcfc0d6e 100644 --- a/packages/util-crypto/src/ethereum/encode.ts +++ b/packages/util-crypto/src/ethereum/encode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { assert, u8aToHex, u8aToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/ethereum/index.ts b/packages/util-crypto/src/ethereum/index.ts index ab5f54015..719beb9ee 100644 --- a/packages/util-crypto/src/ethereum/index.ts +++ b/packages/util-crypto/src/ethereum/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export { default as ethereumEncode } from './encode'; export { default as isEthereumAddress } from './isAddress'; diff --git a/packages/util-crypto/src/ethereum/isAddress.spec.ts b/packages/util-crypto/src/ethereum/isAddress.spec.ts index e9b5e5bbf..eefbd4337 100644 --- a/packages/util-crypto/src/ethereum/isAddress.spec.ts +++ b/packages/util-crypto/src/ethereum/isAddress.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isEthereumAddress } from './'; diff --git a/packages/util-crypto/src/ethereum/isAddress.ts b/packages/util-crypto/src/ethereum/isAddress.ts index ab4e2fe1c..51a935285 100644 --- a/packages/util-crypto/src/ethereum/isAddress.ts +++ b/packages/util-crypto/src/ethereum/isAddress.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/ethereum/isChecksum.ts b/packages/util-crypto/src/ethereum/isChecksum.ts index e3a66b7d8..065fbf589 100644 --- a/packages/util-crypto/src/ethereum/isChecksum.ts +++ b/packages/util-crypto/src/ethereum/isChecksum.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/ethereum/isCheksum.spec.ts b/packages/util-crypto/src/ethereum/isCheksum.spec.ts index c8484b91d..c977be0e6 100644 --- a/packages/util-crypto/src/ethereum/isCheksum.spec.ts +++ b/packages/util-crypto/src/ethereum/isCheksum.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isEthereumChecksum } from './'; diff --git a/packages/util-crypto/src/index.ts b/packages/util-crypto/src/index.ts index 1e5afcfe8..bc365f27b 100644 --- a/packages/util-crypto/src/index.ts +++ b/packages/util-crypto/src/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // polyfills import './polyfill'; diff --git a/packages/util-crypto/src/init.ts b/packages/util-crypto/src/init.ts index 6afedba3a..2f1c3f3ba 100644 --- a/packages/util-crypto/src/init.ts +++ b/packages/util-crypto/src/init.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import wasmCrypto from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/keccak/asHex.spec.ts b/packages/util-crypto/src/keccak/asHex.spec.ts index ec7a46ec5..64711f1f5 100644 --- a/packages/util-crypto/src/keccak/asHex.spec.ts +++ b/packages/util-crypto/src/keccak/asHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/keccak/asHex.ts b/packages/util-crypto/src/keccak/asHex.ts index 5740ff8b3..2e33ee49e 100644 --- a/packages/util-crypto/src/keccak/asHex.ts +++ b/packages/util-crypto/src/keccak/asHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/keccak/asU8a.spec.ts b/packages/util-crypto/src/keccak/asU8a.spec.ts index 7d7ed95e4..ecf0ee5e6 100644 --- a/packages/util-crypto/src/keccak/asU8a.spec.ts +++ b/packages/util-crypto/src/keccak/asU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a, stringToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/keccak/asU8a.ts b/packages/util-crypto/src/keccak/asU8a.ts index aa6e0f705..50421fac1 100644 --- a/packages/util-crypto/src/keccak/asU8a.ts +++ b/packages/util-crypto/src/keccak/asU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import jssha3 from 'js-sha3'; import { u8aToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/keccak/index.ts b/packages/util-crypto/src/keccak/index.ts index 527cae9b5..ff50d73cd 100644 --- a/packages/util-crypto/src/keccak/index.ts +++ b/packages/util-crypto/src/keccak/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Create Keccak256 values as hex & Uint8Array output diff --git a/packages/util-crypto/src/key/DeriveJunction.ts b/packages/util-crypto/src/key/DeriveJunction.ts index b8f29d80e..62c5d3bc3 100644 --- a/packages/util-crypto/src/key/DeriveJunction.ts +++ b/packages/util-crypto/src/key/DeriveJunction.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import type BN from 'bn.js'; diff --git a/packages/util-crypto/src/key/extractPath.spec.ts b/packages/util-crypto/src/key/extractPath.spec.ts index c4cc6b6e2..cb469055f 100644 --- a/packages/util-crypto/src/key/extractPath.spec.ts +++ b/packages/util-crypto/src/key/extractPath.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import keyExtractPath, { ExtractResult } from './extractPath'; diff --git a/packages/util-crypto/src/key/extractPath.ts b/packages/util-crypto/src/key/extractPath.ts index bbad57fb3..21cec422b 100644 --- a/packages/util-crypto/src/key/extractPath.ts +++ b/packages/util-crypto/src/key/extractPath.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import DeriveJunction from './DeriveJunction'; import { assert } from '@polkadot/util'; diff --git a/packages/util-crypto/src/key/extractSuri.spec.ts b/packages/util-crypto/src/key/extractSuri.spec.ts index de2acb50f..9562a347f 100644 --- a/packages/util-crypto/src/key/extractSuri.spec.ts +++ b/packages/util-crypto/src/key/extractSuri.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import keyExtractSuri, { ExtractResult } from './extractSuri'; diff --git a/packages/util-crypto/src/key/extractSuri.ts b/packages/util-crypto/src/key/extractSuri.ts index 075333ec8..34bd846c1 100644 --- a/packages/util-crypto/src/key/extractSuri.ts +++ b/packages/util-crypto/src/key/extractSuri.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { assert, isNull } from '@polkadot/util'; diff --git a/packages/util-crypto/src/key/fromPath.ts b/packages/util-crypto/src/key/fromPath.ts index 0e21f7b43..6fb66606e 100644 --- a/packages/util-crypto/src/key/fromPath.ts +++ b/packages/util-crypto/src/key/fromPath.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeypairType, Keypair } from '../types'; diff --git a/packages/util-crypto/src/key/hdkdEcdsa.ts b/packages/util-crypto/src/key/hdkdEcdsa.ts index 26bf09425..6b3a86319 100644 --- a/packages/util-crypto/src/key/hdkdEcdsa.ts +++ b/packages/util-crypto/src/key/hdkdEcdsa.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../types'; diff --git a/packages/util-crypto/src/key/hdkdEd25519.ts b/packages/util-crypto/src/key/hdkdEd25519.ts index 26aeca582..0b645fd46 100644 --- a/packages/util-crypto/src/key/hdkdEd25519.ts +++ b/packages/util-crypto/src/key/hdkdEd25519.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../types'; diff --git a/packages/util-crypto/src/key/hdkdSr25519.ts b/packages/util-crypto/src/key/hdkdSr25519.ts index cfbd0aa94..d0f224c58 100644 --- a/packages/util-crypto/src/key/hdkdSr25519.ts +++ b/packages/util-crypto/src/key/hdkdSr25519.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../types'; diff --git a/packages/util-crypto/src/key/index.ts b/packages/util-crypto/src/key/index.ts index d5d4b4496..e880acca5 100644 --- a/packages/util-crypto/src/key/index.ts +++ b/packages/util-crypto/src/key/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Create keys from paths, seeds and password diff --git a/packages/util-crypto/src/mnemonic/generate.spec.ts b/packages/util-crypto/src/mnemonic/generate.spec.ts index d86fba99b..87c42884a 100644 --- a/packages/util-crypto/src/mnemonic/generate.spec.ts +++ b/packages/util-crypto/src/mnemonic/generate.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import generate, { WordCount } from './generate'; import validate from './validate'; diff --git a/packages/util-crypto/src/mnemonic/generate.ts b/packages/util-crypto/src/mnemonic/generate.ts index 21870d259..ebaa65299 100644 --- a/packages/util-crypto/src/mnemonic/generate.ts +++ b/packages/util-crypto/src/mnemonic/generate.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '../polyfill'; diff --git a/packages/util-crypto/src/mnemonic/index.ts b/packages/util-crypto/src/mnemonic/index.ts index b4e818467..7a1537168 100644 --- a/packages/util-crypto/src/mnemonic/index.ts +++ b/packages/util-crypto/src/mnemonic/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '../polyfill'; diff --git a/packages/util-crypto/src/mnemonic/toBip39.spec.ts b/packages/util-crypto/src/mnemonic/toBip39.spec.ts index 8f5880117..bf826b83b 100644 --- a/packages/util-crypto/src/mnemonic/toBip39.spec.ts +++ b/packages/util-crypto/src/mnemonic/toBip39.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/mnemonic/toBip39.ts b/packages/util-crypto/src/mnemonic/toBip39.ts index 5af16def6..3866c4bb8 100644 --- a/packages/util-crypto/src/mnemonic/toBip39.ts +++ b/packages/util-crypto/src/mnemonic/toBip39.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { mnemonicToSeedSync } from 'bip39'; import { bufferToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/mnemonic/toEntropy.spec.ts b/packages/util-crypto/src/mnemonic/toEntropy.spec.ts index ed873ea86..43295264f 100644 --- a/packages/util-crypto/src/mnemonic/toEntropy.spec.ts +++ b/packages/util-crypto/src/mnemonic/toEntropy.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/mnemonic/toEntropy.ts b/packages/util-crypto/src/mnemonic/toEntropy.ts index e47acba6f..3fe68144a 100644 --- a/packages/util-crypto/src/mnemonic/toEntropy.ts +++ b/packages/util-crypto/src/mnemonic/toEntropy.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '../polyfill'; diff --git a/packages/util-crypto/src/mnemonic/toMiniSecret.spec.ts b/packages/util-crypto/src/mnemonic/toMiniSecret.spec.ts index 448cbf50b..18f957336 100644 --- a/packages/util-crypto/src/mnemonic/toMiniSecret.spec.ts +++ b/packages/util-crypto/src/mnemonic/toMiniSecret.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/mnemonic/toMiniSecret.ts b/packages/util-crypto/src/mnemonic/toMiniSecret.ts index 81ccd5645..c7d14949a 100644 --- a/packages/util-crypto/src/mnemonic/toMiniSecret.ts +++ b/packages/util-crypto/src/mnemonic/toMiniSecret.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '../polyfill'; diff --git a/packages/util-crypto/src/mnemonic/validate.spec.ts b/packages/util-crypto/src/mnemonic/validate.spec.ts index 9dac3de8c..876f1aaba 100644 --- a/packages/util-crypto/src/mnemonic/validate.spec.ts +++ b/packages/util-crypto/src/mnemonic/validate.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import validate from './validate'; import { cryptoWaitReady } from '..'; diff --git a/packages/util-crypto/src/mnemonic/validate.ts b/packages/util-crypto/src/mnemonic/validate.ts index b9a55ac64..59ae2b038 100644 --- a/packages/util-crypto/src/mnemonic/validate.ts +++ b/packages/util-crypto/src/mnemonic/validate.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '../polyfill'; diff --git a/packages/util-crypto/src/nacl/box/fromSecret.spec.ts b/packages/util-crypto/src/nacl/box/fromSecret.spec.ts index 6253c9dda..cde3370dc 100644 --- a/packages/util-crypto/src/nacl/box/fromSecret.spec.ts +++ b/packages/util-crypto/src/nacl/box/fromSecret.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { naclBoxKeypairFromSecret } from '..'; diff --git a/packages/util-crypto/src/nacl/box/fromSecret.ts b/packages/util-crypto/src/nacl/box/fromSecret.ts index 4bafc881c..07a07fa0e 100644 --- a/packages/util-crypto/src/nacl/box/fromSecret.ts +++ b/packages/util-crypto/src/nacl/box/fromSecret.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/nacl/decrypt.spec.ts b/packages/util-crypto/src/nacl/decrypt.spec.ts index 73a32e39f..62a55e8d8 100644 --- a/packages/util-crypto/src/nacl/decrypt.spec.ts +++ b/packages/util-crypto/src/nacl/decrypt.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { naclDecrypt, naclEncrypt } from '.'; diff --git a/packages/util-crypto/src/nacl/decrypt.ts b/packages/util-crypto/src/nacl/decrypt.ts index ebb1508e4..02ac88218 100644 --- a/packages/util-crypto/src/nacl/decrypt.ts +++ b/packages/util-crypto/src/nacl/decrypt.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import nacl from 'tweetnacl'; diff --git a/packages/util-crypto/src/nacl/deriveHard.ts b/packages/util-crypto/src/nacl/deriveHard.ts index c86c798e8..3fa5ec77d 100644 --- a/packages/util-crypto/src/nacl/deriveHard.ts +++ b/packages/util-crypto/src/nacl/deriveHard.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { compactAddLength, stringToU8a, u8aConcat } from '@polkadot/util'; diff --git a/packages/util-crypto/src/nacl/encrypt.spec.ts b/packages/util-crypto/src/nacl/encrypt.spec.ts index 0c923fbd3..d6d8696f6 100644 --- a/packages/util-crypto/src/nacl/encrypt.spec.ts +++ b/packages/util-crypto/src/nacl/encrypt.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { naclEncrypt } from '.'; diff --git a/packages/util-crypto/src/nacl/encrypt.ts b/packages/util-crypto/src/nacl/encrypt.ts index 919c992c8..95676c2d0 100644 --- a/packages/util-crypto/src/nacl/encrypt.ts +++ b/packages/util-crypto/src/nacl/encrypt.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import nacl from 'tweetnacl'; diff --git a/packages/util-crypto/src/nacl/index.ts b/packages/util-crypto/src/nacl/index.ts index 20b3c785a..8f3dcd13f 100644 --- a/packages/util-crypto/src/nacl/index.ts +++ b/packages/util-crypto/src/nacl/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Implements [NaCl](http://nacl.cr.yp.to/) secret-key authenticated encryption, public-key authenticated encryption, hashing, and public-key signatures diff --git a/packages/util-crypto/src/nacl/keypair/fromRandom.spec.ts b/packages/util-crypto/src/nacl/keypair/fromRandom.spec.ts index 6197258b2..0dec4e023 100644 --- a/packages/util-crypto/src/nacl/keypair/fromRandom.spec.ts +++ b/packages/util-crypto/src/nacl/keypair/fromRandom.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/nacl/keypair/fromRandom.ts b/packages/util-crypto/src/nacl/keypair/fromRandom.ts index c3b076692..87379728a 100644 --- a/packages/util-crypto/src/nacl/keypair/fromRandom.ts +++ b/packages/util-crypto/src/nacl/keypair/fromRandom.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/nacl/keypair/fromSecret.spec.ts b/packages/util-crypto/src/nacl/keypair/fromSecret.spec.ts index 57c2bffa3..5693a0d8d 100644 --- a/packages/util-crypto/src/nacl/keypair/fromSecret.spec.ts +++ b/packages/util-crypto/src/nacl/keypair/fromSecret.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { naclKeypairFromSecret } from '..'; diff --git a/packages/util-crypto/src/nacl/keypair/fromSecret.ts b/packages/util-crypto/src/nacl/keypair/fromSecret.ts index 84b7d107e..522c0f9f3 100644 --- a/packages/util-crypto/src/nacl/keypair/fromSecret.ts +++ b/packages/util-crypto/src/nacl/keypair/fromSecret.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/nacl/keypair/fromSeed.spec.ts b/packages/util-crypto/src/nacl/keypair/fromSeed.spec.ts index 4a3dfd260..96f56029d 100644 --- a/packages/util-crypto/src/nacl/keypair/fromSeed.spec.ts +++ b/packages/util-crypto/src/nacl/keypair/fromSeed.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/nacl/keypair/fromSeed.ts b/packages/util-crypto/src/nacl/keypair/fromSeed.ts index 47106902c..832f8a676 100644 --- a/packages/util-crypto/src/nacl/keypair/fromSeed.ts +++ b/packages/util-crypto/src/nacl/keypair/fromSeed.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/nacl/keypair/fromString.spec.ts b/packages/util-crypto/src/nacl/keypair/fromString.spec.ts index 20ba99132..ab7f3948b 100644 --- a/packages/util-crypto/src/nacl/keypair/fromString.spec.ts +++ b/packages/util-crypto/src/nacl/keypair/fromString.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { naclKeypairFromString } from '..'; diff --git a/packages/util-crypto/src/nacl/keypair/fromString.ts b/packages/util-crypto/src/nacl/keypair/fromString.ts index 1de18e14a..e7318766f 100644 --- a/packages/util-crypto/src/nacl/keypair/fromString.ts +++ b/packages/util-crypto/src/nacl/keypair/fromString.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/nacl/open.spec.ts b/packages/util-crypto/src/nacl/open.spec.ts index f0cbd3727..eed14c6ed 100644 --- a/packages/util-crypto/src/nacl/open.spec.ts +++ b/packages/util-crypto/src/nacl/open.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { naclBoxKeypairFromSecret, naclKeypairFromString, naclOpen, naclSeal } from '.'; import fromPath from '@polkadot/util-crypto/key/fromPath'; diff --git a/packages/util-crypto/src/nacl/open.ts b/packages/util-crypto/src/nacl/open.ts index 08b36228b..c990fc3ac 100644 --- a/packages/util-crypto/src/nacl/open.ts +++ b/packages/util-crypto/src/nacl/open.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import nacl from 'tweetnacl'; diff --git a/packages/util-crypto/src/nacl/seal.spec.ts b/packages/util-crypto/src/nacl/seal.spec.ts index 05b839043..eed94039f 100644 --- a/packages/util-crypto/src/nacl/seal.spec.ts +++ b/packages/util-crypto/src/nacl/seal.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { naclSeal, naclKeypairFromString, naclBoxKeypairFromSecret } from '.'; diff --git a/packages/util-crypto/src/nacl/seal.ts b/packages/util-crypto/src/nacl/seal.ts index 52b1d3379..d59966b17 100644 --- a/packages/util-crypto/src/nacl/seal.ts +++ b/packages/util-crypto/src/nacl/seal.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import nacl from 'tweetnacl'; diff --git a/packages/util-crypto/src/nacl/sign.spec.ts b/packages/util-crypto/src/nacl/sign.spec.ts index ce53c1c6b..132f3acfb 100644 --- a/packages/util-crypto/src/nacl/sign.spec.ts +++ b/packages/util-crypto/src/nacl/sign.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/nacl/sign.ts b/packages/util-crypto/src/nacl/sign.ts index f2e546135..924cc1369 100644 --- a/packages/util-crypto/src/nacl/sign.ts +++ b/packages/util-crypto/src/nacl/sign.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../types'; diff --git a/packages/util-crypto/src/nacl/verify.spec.ts b/packages/util-crypto/src/nacl/verify.spec.ts index 66e5316a5..61cb731dd 100644 --- a/packages/util-crypto/src/nacl/verify.spec.ts +++ b/packages/util-crypto/src/nacl/verify.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/nacl/verify.ts b/packages/util-crypto/src/nacl/verify.ts index 0dfac7cca..e805dfe93 100644 --- a/packages/util-crypto/src/nacl/verify.ts +++ b/packages/util-crypto/src/nacl/verify.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import nacl from 'tweetnacl'; import { assert, u8aToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/noWasm.ts b/packages/util-crypto/src/noWasm.ts index ab4330596..72f9a05d6 100644 --- a/packages/util-crypto/src/noWasm.ts +++ b/packages/util-crypto/src/noWasm.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export function isReady (): boolean { // always false, when true it will try and use non-existent functions diff --git a/packages/util-crypto/src/pbkdf2/encode.ts b/packages/util-crypto/src/pbkdf2/encode.ts index 2ea7c72a4..8af5712ae 100644 --- a/packages/util-crypto/src/pbkdf2/encode.ts +++ b/packages/util-crypto/src/pbkdf2/encode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { pbkdf2Sync } from 'pbkdf2'; import { bufferToU8a, u8aToBuffer, u8aToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/pbkdf2/index.ts b/packages/util-crypto/src/pbkdf2/index.ts index e1463e870..857b3e5e0 100644 --- a/packages/util-crypto/src/pbkdf2/index.ts +++ b/packages/util-crypto/src/pbkdf2/index.ts @@ -1,5 +1,4 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export { default as pbkdf2Encode } from './encode'; diff --git a/packages/util-crypto/src/polyfill.ts b/packages/util-crypto/src/polyfill.ts index 44878b694..6da128275 100644 --- a/packages/util-crypto/src/polyfill.ts +++ b/packages/util-crypto/src/polyfill.ts @@ -1,5 +1,4 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '@polkadot/wasm-crypto/crypto-polyfill'; diff --git a/packages/util-crypto/src/random/asHex.spec.ts b/packages/util-crypto/src/random/asHex.spec.ts index d0ade3020..d7716204c 100644 --- a/packages/util-crypto/src/random/asHex.spec.ts +++ b/packages/util-crypto/src/random/asHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/random/asHex.ts b/packages/util-crypto/src/random/asHex.ts index 7cf0ad0c7..9fe10b7ef 100644 --- a/packages/util-crypto/src/random/asHex.ts +++ b/packages/util-crypto/src/random/asHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/random/asNumber.spec.ts b/packages/util-crypto/src/random/asNumber.spec.ts index d24342777..787effb5d 100644 --- a/packages/util-crypto/src/random/asNumber.spec.ts +++ b/packages/util-crypto/src/random/asNumber.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { randomAsNumber } from '.'; diff --git a/packages/util-crypto/src/random/asNumber.ts b/packages/util-crypto/src/random/asNumber.ts index 7f66786b1..a6fd8b6f6 100644 --- a/packages/util-crypto/src/random/asNumber.ts +++ b/packages/util-crypto/src/random/asNumber.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; import { hexToBn } from '@polkadot/util'; diff --git a/packages/util-crypto/src/random/asU8a.spec.ts b/packages/util-crypto/src/random/asU8a.spec.ts index ebeb4be0c..46f55bee7 100644 --- a/packages/util-crypto/src/random/asU8a.spec.ts +++ b/packages/util-crypto/src/random/asU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/random/asU8a.ts b/packages/util-crypto/src/random/asU8a.ts index e30da02fc..ec80e0004 100644 --- a/packages/util-crypto/src/random/asU8a.ts +++ b/packages/util-crypto/src/random/asU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import nacl from 'tweetnacl'; diff --git a/packages/util-crypto/src/random/index.ts b/packages/util-crypto/src/random/index.ts index ffe4ae576..76602fa93 100644 --- a/packages/util-crypto/src/random/index.ts +++ b/packages/util-crypto/src/random/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Returns a sequence of secure random bytes in a variety of formats diff --git a/packages/util-crypto/src/schnorrkel/deriveHard.ts b/packages/util-crypto/src/schnorrkel/deriveHard.ts index bd93c8dae..0a92ac485 100644 --- a/packages/util-crypto/src/schnorrkel/deriveHard.ts +++ b/packages/util-crypto/src/schnorrkel/deriveHard.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../types'; diff --git a/packages/util-crypto/src/schnorrkel/derivePublic.ts b/packages/util-crypto/src/schnorrkel/derivePublic.ts index 9edf50899..319fd75e2 100644 --- a/packages/util-crypto/src/schnorrkel/derivePublic.ts +++ b/packages/util-crypto/src/schnorrkel/derivePublic.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '../polyfill'; diff --git a/packages/util-crypto/src/schnorrkel/deriveSoft.ts b/packages/util-crypto/src/schnorrkel/deriveSoft.ts index ac3278da6..51fb5701f 100644 --- a/packages/util-crypto/src/schnorrkel/deriveSoft.ts +++ b/packages/util-crypto/src/schnorrkel/deriveSoft.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../types'; diff --git a/packages/util-crypto/src/schnorrkel/index.ts b/packages/util-crypto/src/schnorrkel/index.ts index 047b09b7d..b799884c0 100644 --- a/packages/util-crypto/src/schnorrkel/index.ts +++ b/packages/util-crypto/src/schnorrkel/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '../polyfill'; diff --git a/packages/util-crypto/src/schnorrkel/keypair/fromSeed.spec.ts b/packages/util-crypto/src/schnorrkel/keypair/fromSeed.spec.ts index ea0e422e7..96ce74470 100644 --- a/packages/util-crypto/src/schnorrkel/keypair/fromSeed.spec.ts +++ b/packages/util-crypto/src/schnorrkel/keypair/fromSeed.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a, u8aToHex } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/schnorrkel/keypair/fromSeed.ts b/packages/util-crypto/src/schnorrkel/keypair/fromSeed.ts index 33eafd412..ed8001044 100644 --- a/packages/util-crypto/src/schnorrkel/keypair/fromSeed.ts +++ b/packages/util-crypto/src/schnorrkel/keypair/fromSeed.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/schnorrkel/keypair/fromU8a.ts b/packages/util-crypto/src/schnorrkel/keypair/fromU8a.ts index 6d0cdcaa9..ae0f025b3 100644 --- a/packages/util-crypto/src/schnorrkel/keypair/fromU8a.ts +++ b/packages/util-crypto/src/schnorrkel/keypair/fromU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/schnorrkel/keypair/testing.ts b/packages/util-crypto/src/schnorrkel/keypair/testing.ts index 8572f3c72..98374c621 100644 --- a/packages/util-crypto/src/schnorrkel/keypair/testing.ts +++ b/packages/util-crypto/src/schnorrkel/keypair/testing.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // mnemonic, entropy, seed, secret (expanded) type Test = [string, string, string, string]; diff --git a/packages/util-crypto/src/schnorrkel/keypair/toU8a.ts b/packages/util-crypto/src/schnorrkel/keypair/toU8a.ts index a9b8e203e..724a06f18 100644 --- a/packages/util-crypto/src/schnorrkel/keypair/toU8a.ts +++ b/packages/util-crypto/src/schnorrkel/keypair/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/schnorrkel/sign.ts b/packages/util-crypto/src/schnorrkel/sign.ts index 6d8053dbe..315a0595e 100644 --- a/packages/util-crypto/src/schnorrkel/sign.ts +++ b/packages/util-crypto/src/schnorrkel/sign.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../types'; diff --git a/packages/util-crypto/src/schnorrkel/signVerify.spec.ts b/packages/util-crypto/src/schnorrkel/signVerify.spec.ts index 9b959c190..170c02df2 100644 --- a/packages/util-crypto/src/schnorrkel/signVerify.spec.ts +++ b/packages/util-crypto/src/schnorrkel/signVerify.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/schnorrkel/verify.ts b/packages/util-crypto/src/schnorrkel/verify.ts index 72d234a1a..dbe9ffef7 100644 --- a/packages/util-crypto/src/schnorrkel/verify.ts +++ b/packages/util-crypto/src/schnorrkel/verify.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import '../polyfill'; diff --git a/packages/util-crypto/src/scrypt/defaults.ts b/packages/util-crypto/src/scrypt/defaults.ts index 5d9b9a943..8c8a72b33 100644 --- a/packages/util-crypto/src/scrypt/defaults.ts +++ b/packages/util-crypto/src/scrypt/defaults.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 const DEFAULT_PARAMS = { N: 1 << 15, diff --git a/packages/util-crypto/src/scrypt/encode.ts b/packages/util-crypto/src/scrypt/encode.ts index 6892c2a4d..ed90ca7e0 100644 --- a/packages/util-crypto/src/scrypt/encode.ts +++ b/packages/util-crypto/src/scrypt/encode.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Params } from './types'; diff --git a/packages/util-crypto/src/scrypt/fromU8a.ts b/packages/util-crypto/src/scrypt/fromU8a.ts index a0a313a4a..7a645054a 100644 --- a/packages/util-crypto/src/scrypt/fromU8a.ts +++ b/packages/util-crypto/src/scrypt/fromU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Params } from './types'; diff --git a/packages/util-crypto/src/scrypt/index.ts b/packages/util-crypto/src/scrypt/index.ts index 4ddc3bae0..2c224724f 100644 --- a/packages/util-crypto/src/scrypt/index.ts +++ b/packages/util-crypto/src/scrypt/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export { default as scryptEncode } from './encode'; export { default as scryptFromU8a } from './fromU8a'; diff --git a/packages/util-crypto/src/scrypt/toU8a.ts b/packages/util-crypto/src/scrypt/toU8a.ts index 4671485c0..522d2438d 100644 --- a/packages/util-crypto/src/scrypt/toU8a.ts +++ b/packages/util-crypto/src/scrypt/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Params } from './types'; diff --git a/packages/util-crypto/src/scrypt/types.ts b/packages/util-crypto/src/scrypt/types.ts index 2cf37fff1..aae4ba141 100644 --- a/packages/util-crypto/src/scrypt/types.ts +++ b/packages/util-crypto/src/scrypt/types.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export interface Params { N: number; diff --git a/packages/util-crypto/src/secp256k1/compress.spec.ts b/packages/util-crypto/src/secp256k1/compress.spec.ts index f64c51fcf..dbe399d14 100644 --- a/packages/util-crypto/src/secp256k1/compress.spec.ts +++ b/packages/util-crypto/src/secp256k1/compress.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/compress.ts b/packages/util-crypto/src/secp256k1/compress.ts index dbaf03ded..5419ef39b 100644 --- a/packages/util-crypto/src/secp256k1/compress.ts +++ b/packages/util-crypto/src/secp256k1/compress.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import elliptic from 'elliptic'; import { assert } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/deriveHard.ts b/packages/util-crypto/src/secp256k1/deriveHard.ts index 1d34857a3..0fa968321 100644 --- a/packages/util-crypto/src/secp256k1/deriveHard.ts +++ b/packages/util-crypto/src/secp256k1/deriveHard.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { compactAddLength, stringToU8a, u8aConcat } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/expand.spec.ts b/packages/util-crypto/src/secp256k1/expand.spec.ts index 8c8de3e99..d633e8bda 100644 --- a/packages/util-crypto/src/secp256k1/expand.spec.ts +++ b/packages/util-crypto/src/secp256k1/expand.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/expand.ts b/packages/util-crypto/src/secp256k1/expand.ts index 9a45443a0..c7c5fa37d 100644 --- a/packages/util-crypto/src/secp256k1/expand.ts +++ b/packages/util-crypto/src/secp256k1/expand.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import elliptic from 'elliptic'; import { assert, bnToU8a, u8aConcat } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/hasher.spec.ts b/packages/util-crypto/src/secp256k1/hasher.spec.ts index 4b83e33af..8ba0e1877 100644 --- a/packages/util-crypto/src/secp256k1/hasher.spec.ts +++ b/packages/util-crypto/src/secp256k1/hasher.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import hasher from './hasher'; diff --git a/packages/util-crypto/src/secp256k1/hasher.ts b/packages/util-crypto/src/secp256k1/hasher.ts index f00137ec9..ca8f3a3e3 100644 --- a/packages/util-crypto/src/secp256k1/hasher.ts +++ b/packages/util-crypto/src/secp256k1/hasher.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { HashType } from './types'; diff --git a/packages/util-crypto/src/secp256k1/index.ts b/packages/util-crypto/src/secp256k1/index.ts index c478ffe55..eae9c95cf 100644 --- a/packages/util-crypto/src/secp256k1/index.ts +++ b/packages/util-crypto/src/secp256k1/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export { default as secp256k1Compress } from './compress'; export { default as secp256k1Expand } from './expand'; diff --git a/packages/util-crypto/src/secp256k1/keypair/fromSeed.spec.ts b/packages/util-crypto/src/secp256k1/keypair/fromSeed.spec.ts index ef04c3a14..530e37d35 100644 --- a/packages/util-crypto/src/secp256k1/keypair/fromSeed.spec.ts +++ b/packages/util-crypto/src/secp256k1/keypair/fromSeed.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex, hexToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/keypair/fromSeed.ts b/packages/util-crypto/src/secp256k1/keypair/fromSeed.ts index b13775131..dc36ff4d8 100644 --- a/packages/util-crypto/src/secp256k1/keypair/fromSeed.ts +++ b/packages/util-crypto/src/secp256k1/keypair/fromSeed.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../../types'; diff --git a/packages/util-crypto/src/secp256k1/recover.spec.ts b/packages/util-crypto/src/secp256k1/recover.spec.ts index 34efc448b..0ee7d0d92 100644 --- a/packages/util-crypto/src/secp256k1/recover.spec.ts +++ b/packages/util-crypto/src/secp256k1/recover.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex, u8aToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/recover.ts b/packages/util-crypto/src/secp256k1/recover.ts index 087520911..77249fb24 100644 --- a/packages/util-crypto/src/secp256k1/recover.ts +++ b/packages/util-crypto/src/secp256k1/recover.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import elliptic from 'elliptic'; diff --git a/packages/util-crypto/src/secp256k1/sign.ts b/packages/util-crypto/src/secp256k1/sign.ts index 2db1a0f1a..437ee46a5 100644 --- a/packages/util-crypto/src/secp256k1/sign.ts +++ b/packages/util-crypto/src/secp256k1/sign.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Keypair } from '../types'; import { HashType } from './types'; diff --git a/packages/util-crypto/src/secp256k1/signVerify.spec.ts b/packages/util-crypto/src/secp256k1/signVerify.spec.ts index 90f8a8859..e7334e136 100644 --- a/packages/util-crypto/src/secp256k1/signVerify.spec.ts +++ b/packages/util-crypto/src/secp256k1/signVerify.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/types.ts b/packages/util-crypto/src/secp256k1/types.ts index d04f01059..f3a5809fc 100644 --- a/packages/util-crypto/src/secp256k1/types.ts +++ b/packages/util-crypto/src/secp256k1/types.ts @@ -1,5 +1,4 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export type HashType = 'blake2' | 'keccak'; diff --git a/packages/util-crypto/src/secp256k1/verify.ts b/packages/util-crypto/src/secp256k1/verify.ts index 4f01c6828..592450ebb 100644 --- a/packages/util-crypto/src/secp256k1/verify.ts +++ b/packages/util-crypto/src/secp256k1/verify.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { HashType } from './types'; diff --git a/packages/util-crypto/src/sha512/asU8a.spec.ts b/packages/util-crypto/src/sha512/asU8a.spec.ts index a022cede0..a23b00be1 100644 --- a/packages/util-crypto/src/sha512/asU8a.spec.ts +++ b/packages/util-crypto/src/sha512/asU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/sha512/asU8a.ts b/packages/util-crypto/src/sha512/asU8a.ts index 660c93871..090cca6dd 100644 --- a/packages/util-crypto/src/sha512/asU8a.ts +++ b/packages/util-crypto/src/sha512/asU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import nacl from 'tweetnacl'; import { isReady, sha512 } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/sha512/index.ts b/packages/util-crypto/src/sha512/index.ts index f6eb834bb..4d3642367 100644 --- a/packages/util-crypto/src/sha512/index.ts +++ b/packages/util-crypto/src/sha512/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Implements Sha-512 hashing functions for a variety of input and outputs diff --git a/packages/util-crypto/src/signature/index.ts b/packages/util-crypto/src/signature/index.ts index 7fa5fd2f8..728e9d41e 100644 --- a/packages/util-crypto/src/signature/index.ts +++ b/packages/util-crypto/src/signature/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Utilities for working with signatures diff --git a/packages/util-crypto/src/signature/verify.spec.ts b/packages/util-crypto/src/signature/verify.spec.ts index ea0ba47ce..fd8f4ee90 100644 --- a/packages/util-crypto/src/signature/verify.spec.ts +++ b/packages/util-crypto/src/signature/verify.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a, stringToU8a, u8aConcat, u8aToHex } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/signature/verify.ts b/packages/util-crypto/src/signature/verify.ts index f8b7e7d66..1d74fd59e 100644 --- a/packages/util-crypto/src/signature/verify.ts +++ b/packages/util-crypto/src/signature/verify.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { KeypairType, VerifyResult } from '../types'; diff --git a/packages/util-crypto/src/types.ts b/packages/util-crypto/src/types.ts index 4db609272..b22a1eda7 100644 --- a/packages/util-crypto/src/types.ts +++ b/packages/util-crypto/src/types.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export interface Keypair { publicKey: Uint8Array; diff --git a/packages/util-crypto/src/xxhash/asHex.spec.ts b/packages/util-crypto/src/xxhash/asHex.spec.ts index 115c9ea70..fcb61daee 100644 --- a/packages/util-crypto/src/xxhash/asHex.spec.ts +++ b/packages/util-crypto/src/xxhash/asHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/xxhash/asHex.ts b/packages/util-crypto/src/xxhash/asHex.ts index 7f8bf26a8..60d32ed1a 100644 --- a/packages/util-crypto/src/xxhash/asHex.ts +++ b/packages/util-crypto/src/xxhash/asHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '@polkadot/util'; diff --git a/packages/util-crypto/src/xxhash/asU8a.spec.ts b/packages/util-crypto/src/xxhash/asU8a.spec.ts index 42b3342e0..c2d8da194 100644 --- a/packages/util-crypto/src/xxhash/asU8a.spec.ts +++ b/packages/util-crypto/src/xxhash/asU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/xxhash/asU8a.ts b/packages/util-crypto/src/xxhash/asU8a.ts index a5eb97746..66ad94c00 100644 --- a/packages/util-crypto/src/xxhash/asU8a.ts +++ b/packages/util-crypto/src/xxhash/asU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToU8a } from '@polkadot/util'; import { isReady, twox } from '@polkadot/wasm-crypto'; diff --git a/packages/util-crypto/src/xxhash/index.ts b/packages/util-crypto/src/xxhash/index.ts index 597a30d23..5b2bd8292 100644 --- a/packages/util-crypto/src/xxhash/index.ts +++ b/packages/util-crypto/src/xxhash/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Create xxhash64 values with specified bitlengths diff --git a/packages/util-crypto/src/xxhash/xxhash64/asBn.spec.ts b/packages/util-crypto/src/xxhash/xxhash64/asBn.spec.ts index a4bf839d0..0e24ac2bc 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/asBn.spec.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/asBn.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { xxhash64AsBn } from '.'; diff --git a/packages/util-crypto/src/xxhash/xxhash64/asBn.ts b/packages/util-crypto/src/xxhash/xxhash64/asBn.ts index 00cd27119..5d949ef04 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/asBn.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/asBn.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util-crypto/src/xxhash/xxhash64/asHex.spec.ts b/packages/util-crypto/src/xxhash/xxhash64/asHex.spec.ts index a55163299..247504905 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/asHex.spec.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/asHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { xxhash64AsHex } from '.'; diff --git a/packages/util-crypto/src/xxhash/xxhash64/asHex.ts b/packages/util-crypto/src/xxhash/xxhash64/asHex.ts index 6118b72ef..ee42e7be3 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/asHex.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/asHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexAddPrefix } from '@polkadot/util'; diff --git a/packages/util-crypto/src/xxhash/xxhash64/asRaw.spec.ts b/packages/util-crypto/src/xxhash/xxhash64/asRaw.spec.ts index d35d511d3..b3034b6f3 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/asRaw.spec.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/asRaw.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { xxhash64AsRaw } from '.'; diff --git a/packages/util-crypto/src/xxhash/xxhash64/asRaw.ts b/packages/util-crypto/src/xxhash/xxhash64/asRaw.ts index b5458e442..e0ea185ad 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/asRaw.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/asRaw.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import xxhash64AsValue from './asValue'; diff --git a/packages/util-crypto/src/xxhash/xxhash64/asValue.spec.ts b/packages/util-crypto/src/xxhash/xxhash64/asValue.spec.ts index 68526b33e..60e058800 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/asValue.spec.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/asValue.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import xxhash64AsValue from './asValue'; diff --git a/packages/util-crypto/src/xxhash/xxhash64/asValue.ts b/packages/util-crypto/src/xxhash/xxhash64/asValue.ts index 88e6c5308..456dc149f 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/asValue.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/asValue.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import xxhashjs from 'xxhashjs'; import { isBuffer, isString, u8aToBuffer } from '@polkadot/util'; diff --git a/packages/util-crypto/src/xxhash/xxhash64/index.ts b/packages/util-crypto/src/xxhash/xxhash64/index.ts index 6807b9156..780b70a0f 100644 --- a/packages/util-crypto/src/xxhash/xxhash64/index.ts +++ b/packages/util-crypto/src/xxhash/xxhash64/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util-crypto authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import xxhash64AsBn from './asBn'; import xxhash64AsHex from './asHex'; diff --git a/packages/util/src/array/filter.spec.ts b/packages/util/src/array/filter.spec.ts index 12d6ccc2c..b65d1b3e0 100644 --- a/packages/util/src/array/filter.spec.ts +++ b/packages/util/src/array/filter.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { arrayFilter } from '.'; diff --git a/packages/util/src/array/filter.ts b/packages/util/src/array/filter.ts index 9061d8648..1355e66a4 100644 --- a/packages/util/src/array/filter.ts +++ b/packages/util/src/array/filter.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isNull from '../is/null'; import isUndefined from '../is/undefined'; diff --git a/packages/util/src/array/index.ts b/packages/util/src/array/index.ts index 6ccb51f6b..6c0f0d594 100644 --- a/packages/util/src/array/index.ts +++ b/packages/util/src/array/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Utility methods that operates on arrays diff --git a/packages/util/src/assert.spec.ts b/packages/util/src/assert.spec.ts index 4749eabe0..38651567f 100644 --- a/packages/util/src/assert.spec.ts +++ b/packages/util/src/assert.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { assert } from '.'; diff --git a/packages/util/src/assert.ts b/packages/util/src/assert.ts index 83795cefe..cc898df66 100644 --- a/packages/util/src/assert.ts +++ b/packages/util/src/assert.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isFunction from './is/function'; diff --git a/packages/util/src/bn/consts.spec.ts b/packages/util/src/bn/consts.spec.ts index 2a5984e0e..a7d988297 100644 --- a/packages/util/src/bn/consts.spec.ts +++ b/packages/util/src/bn/consts.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { BN_ZERO, BN_ONE, BN_TEN, BN_HUNDRED, BN_THOUSAND } from '.'; import BN from 'bn.js'; diff --git a/packages/util/src/bn/consts.ts b/packages/util/src/bn/consts.ts index b4f530188..8a9c3fff0 100644 --- a/packages/util/src/bn/consts.ts +++ b/packages/util/src/bn/consts.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/fromHex.spec.ts b/packages/util/src/bn/fromHex.spec.ts index 7b6c67393..a883920e7 100644 --- a/packages/util/src/bn/fromHex.spec.ts +++ b/packages/util/src/bn/fromHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isFunction from '../is/function'; diff --git a/packages/util/src/bn/fromHex.ts b/packages/util/src/bn/fromHex.ts index 54dc40122..8d19715d2 100644 --- a/packages/util/src/bn/fromHex.ts +++ b/packages/util/src/bn/fromHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import bnFromHex from '../hex/toBn'; diff --git a/packages/util/src/bn/index.ts b/packages/util/src/bn/index.ts index 5423268de..ac63f8ff5 100644 --- a/packages/util/src/bn/index.ts +++ b/packages/util/src/bn/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Utility methods to convert to and from `BN` objects diff --git a/packages/util/src/bn/max.spec.ts b/packages/util/src/bn/max.spec.ts index 67439ff2b..2be8c49c9 100644 --- a/packages/util/src/bn/max.spec.ts +++ b/packages/util/src/bn/max.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/max.ts b/packages/util/src/bn/max.ts index 44a025f56..74b8a68bc 100644 --- a/packages/util/src/bn/max.ts +++ b/packages/util/src/bn/max.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/min.spec.ts b/packages/util/src/bn/min.spec.ts index a651a3c50..27ccdded3 100644 --- a/packages/util/src/bn/min.spec.ts +++ b/packages/util/src/bn/min.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/min.ts b/packages/util/src/bn/min.ts index e8738f87e..37df64b29 100644 --- a/packages/util/src/bn/min.ts +++ b/packages/util/src/bn/min.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/sqrt.spec.ts b/packages/util/src/bn/sqrt.spec.ts index 929348cec..816fd5819 100644 --- a/packages/util/src/bn/sqrt.spec.ts +++ b/packages/util/src/bn/sqrt.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/sqrt.ts b/packages/util/src/bn/sqrt.ts index 740845bc4..7353c52fa 100644 --- a/packages/util/src/bn/sqrt.ts +++ b/packages/util/src/bn/sqrt.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/toBn.spec.ts b/packages/util/src/bn/toBn.spec.ts index 7c815099d..8d8925cd9 100644 --- a/packages/util/src/bn/toBn.spec.ts +++ b/packages/util/src/bn/toBn.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/toBn.ts b/packages/util/src/bn/toBn.ts index 301a352d4..d3c015271 100644 --- a/packages/util/src/bn/toBn.ts +++ b/packages/util/src/bn/toBn.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { ToBn } from '../types'; diff --git a/packages/util/src/bn/toHex.spec.ts b/packages/util/src/bn/toHex.spec.ts index c8925a5e5..7fc6b245f 100644 --- a/packages/util/src/bn/toHex.spec.ts +++ b/packages/util/src/bn/toHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/toHex.ts b/packages/util/src/bn/toHex.ts index 3db75cbd0..8c3cdd4f4 100644 --- a/packages/util/src/bn/toHex.ts +++ b/packages/util/src/bn/toHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { ToBn, ToBnOptions } from '../types'; diff --git a/packages/util/src/bn/toU8a.spec.ts b/packages/util/src/bn/toU8a.spec.ts index 59fcfcb33..5f17cc3db 100644 --- a/packages/util/src/bn/toU8a.spec.ts +++ b/packages/util/src/bn/toU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/bn/toU8a.ts b/packages/util/src/bn/toU8a.ts index 8e711badc..fcb3984d2 100644 --- a/packages/util/src/bn/toU8a.ts +++ b/packages/util/src/bn/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { ToBn, ToBnOptions } from '../types'; diff --git a/packages/util/src/buffer/index.ts b/packages/util/src/buffer/index.ts index 3441c9ae4..4caaa0755 100644 --- a/packages/util/src/buffer/index.ts +++ b/packages/util/src/buffer/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Utility methods to convert to and from `Buffer` objects diff --git a/packages/util/src/buffer/toU8a.spec.ts b/packages/util/src/buffer/toU8a.spec.ts index 9b271bca6..0fd6179d4 100644 --- a/packages/util/src/buffer/toU8a.spec.ts +++ b/packages/util/src/buffer/toU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { bufferToU8a } from '.'; diff --git a/packages/util/src/buffer/toU8a.ts b/packages/util/src/buffer/toU8a.ts index fe9e8c8b1..1393dd501 100644 --- a/packages/util/src/buffer/toU8a.ts +++ b/packages/util/src/buffer/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name bufferToU8a diff --git a/packages/util/src/compact/addLength.spec.ts b/packages/util/src/compact/addLength.spec.ts index 2463a9b94..a5b27a6f4 100644 --- a/packages/util/src/compact/addLength.spec.ts +++ b/packages/util/src/compact/addLength.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import compactAddLength from './addLength'; diff --git a/packages/util/src/compact/addLength.ts b/packages/util/src/compact/addLength.ts index a5e92c453..1a65c7335 100644 --- a/packages/util/src/compact/addLength.ts +++ b/packages/util/src/compact/addLength.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aConcat } from '../u8a'; import compactToU8a from './toU8a'; diff --git a/packages/util/src/compact/defaults.ts b/packages/util/src/compact/defaults.ts index 970012ca7..9e497aa12 100644 --- a/packages/util/src/compact/defaults.ts +++ b/packages/util/src/compact/defaults.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { BitLength } from './types'; diff --git a/packages/util/src/compact/fromU8a.ts b/packages/util/src/compact/fromU8a.ts index 18fbaf4fb..bd0dc8345 100644 --- a/packages/util/src/compact/fromU8a.ts +++ b/packages/util/src/compact/fromU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { BitLength } from './types'; diff --git a/packages/util/src/compact/index.ts b/packages/util/src/compact/index.ts index 25d66ddf7..52b64bf38 100644 --- a/packages/util/src/compact/index.ts +++ b/packages/util/src/compact/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @description diff --git a/packages/util/src/compact/stripLength.spec.ts b/packages/util/src/compact/stripLength.spec.ts index 12c61563f..7f008b654 100644 --- a/packages/util/src/compact/stripLength.spec.ts +++ b/packages/util/src/compact/stripLength.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import compactStripLength from './stripLength'; diff --git a/packages/util/src/compact/stripLength.ts b/packages/util/src/compact/stripLength.ts index 3f58b5978..165377b43 100644 --- a/packages/util/src/compact/stripLength.ts +++ b/packages/util/src/compact/stripLength.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { BitLength } from './types'; diff --git a/packages/util/src/compact/toU8a.ts b/packages/util/src/compact/toU8a.ts index 4e63fbd05..f0f7074b2 100644 --- a/packages/util/src/compact/toU8a.ts +++ b/packages/util/src/compact/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/compact/types.ts b/packages/util/src/compact/types.ts index 215140f46..5b13aef0e 100644 --- a/packages/util/src/compact/types.ts +++ b/packages/util/src/compact/types.ts @@ -1,5 +1,4 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export type BitLength = 8 | 16 | 32 | 64 | 128 | 256; diff --git a/packages/util/src/detectPackage.spec.ts b/packages/util/src/detectPackage.spec.ts index 80b5c1479..9f83fffd9 100644 --- a/packages/util/src/detectPackage.spec.ts +++ b/packages/util/src/detectPackage.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { detectPackage } from '.'; diff --git a/packages/util/src/detectPackage.ts b/packages/util/src/detectPackage.ts index 68ae0e550..442e4a769 100644 --- a/packages/util/src/detectPackage.ts +++ b/packages/util/src/detectPackage.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import assert from './assert'; import isString from './is/string'; diff --git a/packages/util/src/extractTime.spec.ts b/packages/util/src/extractTime.spec.ts index 71de6c5e3..3330546fa 100644 --- a/packages/util/src/extractTime.spec.ts +++ b/packages/util/src/extractTime.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { extractTime } from '.'; diff --git a/packages/util/src/extractTime.ts b/packages/util/src/extractTime.ts index 83d6d5078..2665fee4a 100644 --- a/packages/util/src/extractTime.ts +++ b/packages/util/src/extractTime.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Time } from './types'; diff --git a/packages/util/src/format/formatBalance.spec.ts b/packages/util/src/format/formatBalance.spec.ts index 628bf5e4a..d4325ab9a 100644 --- a/packages/util/src/format/formatBalance.spec.ts +++ b/packages/util/src/format/formatBalance.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/format/formatBalance.ts b/packages/util/src/format/formatBalance.ts index 295b277ec..79b752daa 100644 --- a/packages/util/src/format/formatBalance.ts +++ b/packages/util/src/format/formatBalance.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { SiDef, ToBn } from '../types'; diff --git a/packages/util/src/format/formatDate.spec.ts b/packages/util/src/format/formatDate.spec.ts index 3f07b7082..b0eb5a84c 100644 --- a/packages/util/src/format/formatDate.spec.ts +++ b/packages/util/src/format/formatDate.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import formatDate from './formatDate'; diff --git a/packages/util/src/format/formatDate.ts b/packages/util/src/format/formatDate.ts index 0d7adeb82..cf4795169 100644 --- a/packages/util/src/format/formatDate.ts +++ b/packages/util/src/format/formatDate.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** @internal */ function zeroPad (value: number): string { diff --git a/packages/util/src/format/formatDecimal.spec.ts b/packages/util/src/format/formatDecimal.spec.ts index 1f47cc2f7..7d2b3c9b3 100644 --- a/packages/util/src/format/formatDecimal.spec.ts +++ b/packages/util/src/format/formatDecimal.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import formatDecimal from './formatDecimal'; diff --git a/packages/util/src/format/formatDecimal.ts b/packages/util/src/format/formatDecimal.ts index 510627c0b..f9caff87e 100644 --- a/packages/util/src/format/formatDecimal.ts +++ b/packages/util/src/format/formatDecimal.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 const NUMBER_REGEX = new RegExp('(\\d+?)(?=(\\d{3})+(?!\\d)|$)', 'g'); diff --git a/packages/util/src/format/formatElapsed.spec.ts b/packages/util/src/format/formatElapsed.spec.ts index ed9a1d008..96c8d34d6 100644 --- a/packages/util/src/format/formatElapsed.spec.ts +++ b/packages/util/src/format/formatElapsed.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/format/formatElapsed.ts b/packages/util/src/format/formatElapsed.ts index d720e090e..188240493 100644 --- a/packages/util/src/format/formatElapsed.ts +++ b/packages/util/src/format/formatElapsed.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/ui-util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { ToBn } from '../types'; diff --git a/packages/util/src/format/formatNumber.spec.ts b/packages/util/src/format/formatNumber.spec.ts index 95029ae44..e040090c7 100644 --- a/packages/util/src/format/formatNumber.spec.ts +++ b/packages/util/src/format/formatNumber.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/format/formatNumber.ts b/packages/util/src/format/formatNumber.ts index b4e7a2a38..60a0ccd2f 100644 --- a/packages/util/src/format/formatNumber.ts +++ b/packages/util/src/format/formatNumber.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { ToBn } from '../types'; diff --git a/packages/util/src/format/index.ts b/packages/util/src/format/index.ts index 09be15d53..837d0fb6c 100644 --- a/packages/util/src/format/index.ts +++ b/packages/util/src/format/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 export { default as formatBalance } from './formatBalance'; export { default as formatDate } from './formatDate'; diff --git a/packages/util/src/format/si.ts b/packages/util/src/format/si.ts index 2681f662d..da7649930 100644 --- a/packages/util/src/format/si.ts +++ b/packages/util/src/format/si.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { SiDef } from '../types'; diff --git a/packages/util/src/hex/addPrefix.spec.ts b/packages/util/src/hex/addPrefix.spec.ts index 8045b5ba0..3618fb24c 100644 --- a/packages/util/src/hex/addPrefix.spec.ts +++ b/packages/util/src/hex/addPrefix.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexAddPrefix } from '.'; diff --git a/packages/util/src/hex/addPrefix.ts b/packages/util/src/hex/addPrefix.ts index 90b2267dc..37585134e 100644 --- a/packages/util/src/hex/addPrefix.ts +++ b/packages/util/src/hex/addPrefix.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import hasPrefix from './hasPrefix'; diff --git a/packages/util/src/hex/fixLength.spec.ts b/packages/util/src/hex/fixLength.spec.ts index 925ae9371..51a0e103e 100644 --- a/packages/util/src/hex/fixLength.spec.ts +++ b/packages/util/src/hex/fixLength.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexFixLength } from '.'; diff --git a/packages/util/src/hex/fixLength.ts b/packages/util/src/hex/fixLength.ts index 98af11ae4..f207ec903 100644 --- a/packages/util/src/hex/fixLength.ts +++ b/packages/util/src/hex/fixLength.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import hexAddPrefix from './addPrefix'; import hexStripPrefix from './stripPrefix'; diff --git a/packages/util/src/hex/hasPrefix.spec.ts b/packages/util/src/hex/hasPrefix.spec.ts index 48feeb5d7..07d7c505b 100644 --- a/packages/util/src/hex/hasPrefix.spec.ts +++ b/packages/util/src/hex/hasPrefix.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexHasPrefix } from '.'; diff --git a/packages/util/src/hex/hasPrefix.ts b/packages/util/src/hex/hasPrefix.ts index 3a21644c2..01ab73734 100644 --- a/packages/util/src/hex/hasPrefix.ts +++ b/packages/util/src/hex/hasPrefix.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isHex from '../is/hex'; diff --git a/packages/util/src/hex/index.ts b/packages/util/src/hex/index.ts index 9dfe84975..dbb279df1 100644 --- a/packages/util/src/hex/index.ts +++ b/packages/util/src/hex/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Internal utilities to create and test for hex values diff --git a/packages/util/src/hex/stripPrefix.spec.ts b/packages/util/src/hex/stripPrefix.spec.ts index 8d6af3ef4..be42c989e 100644 --- a/packages/util/src/hex/stripPrefix.spec.ts +++ b/packages/util/src/hex/stripPrefix.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexStripPrefix } from '.'; diff --git a/packages/util/src/hex/stripPrefix.ts b/packages/util/src/hex/stripPrefix.ts index b59bb742f..81221450a 100644 --- a/packages/util/src/hex/stripPrefix.ts +++ b/packages/util/src/hex/stripPrefix.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import hasPrefix from './hasPrefix'; diff --git a/packages/util/src/hex/toBn.spec.ts b/packages/util/src/hex/toBn.spec.ts index 933bba761..12efec32f 100644 --- a/packages/util/src/hex/toBn.spec.ts +++ b/packages/util/src/hex/toBn.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToBn } from '.'; diff --git a/packages/util/src/hex/toBn.ts b/packages/util/src/hex/toBn.ts index 738a03fe2..8405f385d 100644 --- a/packages/util/src/hex/toBn.ts +++ b/packages/util/src/hex/toBn.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/hex/toNumber.spec.ts b/packages/util/src/hex/toNumber.spec.ts index 850858605..cc15d8418 100644 --- a/packages/util/src/hex/toNumber.spec.ts +++ b/packages/util/src/hex/toNumber.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToNumber } from '.'; diff --git a/packages/util/src/hex/toNumber.ts b/packages/util/src/hex/toNumber.ts index e3af4ecfe..1dee3cab7 100644 --- a/packages/util/src/hex/toNumber.ts +++ b/packages/util/src/hex/toNumber.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import hexToBn from './toBn'; diff --git a/packages/util/src/hex/toString.spec.ts b/packages/util/src/hex/toString.spec.ts index e1731bcb8..cc94c43b5 100644 --- a/packages/util/src/hex/toString.spec.ts +++ b/packages/util/src/hex/toString.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToString } from '.'; diff --git a/packages/util/src/hex/toString.ts b/packages/util/src/hex/toString.ts index 031a6af99..c82af22f5 100644 --- a/packages/util/src/hex/toString.ts +++ b/packages/util/src/hex/toString.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import u8aToString from '../u8a/toString'; import hexToU8a from './toU8a'; diff --git a/packages/util/src/hex/toU8a.spec.ts b/packages/util/src/hex/toU8a.spec.ts index 857897a8e..7eef62dcb 100644 --- a/packages/util/src/hex/toU8a.spec.ts +++ b/packages/util/src/hex/toU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { hexToU8a } from '.'; diff --git a/packages/util/src/hex/toU8a.ts b/packages/util/src/hex/toU8a.ts index 86173fa12..4ae308802 100644 --- a/packages/util/src/hex/toU8a.ts +++ b/packages/util/src/hex/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import assert from '../assert'; import isHex from '../is/hex'; diff --git a/packages/util/src/index.spec.ts b/packages/util/src/index.spec.ts index 2defdee49..a19535255 100644 --- a/packages/util/src/index.spec.ts +++ b/packages/util/src/index.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { assert } from '.'; diff --git a/packages/util/src/index.ts b/packages/util/src/index.ts index 35e37cb0a..e4e63ae23 100644 --- a/packages/util/src/index.ts +++ b/packages/util/src/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import './polyfill'; diff --git a/packages/util/src/is/ascii.spec.ts b/packages/util/src/is/ascii.spec.ts index 97123f298..039c3660e 100644 --- a/packages/util/src/is/ascii.spec.ts +++ b/packages/util/src/is/ascii.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isAscii } from '.'; diff --git a/packages/util/src/is/ascii.ts b/packages/util/src/is/ascii.ts index b23db7eee..4ba4c7fcf 100644 --- a/packages/util/src/is/ascii.ts +++ b/packages/util/src/is/ascii.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import u8aToU8a from '../u8a/toU8a'; import isString from './string'; diff --git a/packages/util/src/is/bigInt.spec.ts b/packages/util/src/is/bigInt.spec.ts index 53e459908..312d8809e 100644 --- a/packages/util/src/is/bigInt.spec.ts +++ b/packages/util/src/is/bigInt.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isBigInt } from '.'; diff --git a/packages/util/src/is/bigInt.ts b/packages/util/src/is/bigInt.ts index de7e25f94..512ff042d 100644 --- a/packages/util/src/is/bigInt.ts +++ b/packages/util/src/is/bigInt.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name isBigInt diff --git a/packages/util/src/is/bn.spec.ts b/packages/util/src/is/bn.spec.ts index 3245d68b6..8d929f07f 100644 --- a/packages/util/src/is/bn.spec.ts +++ b/packages/util/src/is/bn.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/is/bn.ts b/packages/util/src/is/bn.ts index de9629c07..16022de0e 100644 --- a/packages/util/src/is/bn.ts +++ b/packages/util/src/is/bn.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/is/boolean.spec.ts b/packages/util/src/is/boolean.spec.ts index 0540bf596..602455940 100644 --- a/packages/util/src/is/boolean.spec.ts +++ b/packages/util/src/is/boolean.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isBoolean } from '.'; diff --git a/packages/util/src/is/boolean.ts b/packages/util/src/is/boolean.ts index 55fb16507..26b6b4eed 100644 --- a/packages/util/src/is/boolean.ts +++ b/packages/util/src/is/boolean.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name isBoolean diff --git a/packages/util/src/is/buffer.spec.ts b/packages/util/src/is/buffer.spec.ts index 50accda9d..a64062c04 100644 --- a/packages/util/src/is/buffer.spec.ts +++ b/packages/util/src/is/buffer.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isBuffer } from '.'; diff --git a/packages/util/src/is/buffer.ts b/packages/util/src/is/buffer.ts index 3dbc2fd24..5a9a128a0 100644 --- a/packages/util/src/is/buffer.ts +++ b/packages/util/src/is/buffer.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isInstanceOf from './instanceOf'; diff --git a/packages/util/src/is/childClass.spec.ts b/packages/util/src/is/childClass.spec.ts index 131f1143a..9dd4ac378 100644 --- a/packages/util/src/is/childClass.spec.ts +++ b/packages/util/src/is/childClass.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/is/childClass.ts b/packages/util/src/is/childClass.ts index b1f15efc6..6206099d8 100644 --- a/packages/util/src/is/childClass.ts +++ b/packages/util/src/is/childClass.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Constructor } from '../types'; diff --git a/packages/util/src/is/error.spec.ts b/packages/util/src/is/error.spec.ts index 47436653c..d230820d6 100644 --- a/packages/util/src/is/error.spec.ts +++ b/packages/util/src/is/error.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isError } from '.'; diff --git a/packages/util/src/is/error.ts b/packages/util/src/is/error.ts index e06cbb43a..22dea38d9 100644 --- a/packages/util/src/is/error.ts +++ b/packages/util/src/is/error.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isInstanceOf from './instanceOf'; diff --git a/packages/util/src/is/function.spec.ts b/packages/util/src/is/function.spec.ts index f21b93fe1..8e7b5ae13 100644 --- a/packages/util/src/is/function.spec.ts +++ b/packages/util/src/is/function.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isFunction } from '.'; diff --git a/packages/util/src/is/function.ts b/packages/util/src/is/function.ts index df000d666..ae491f7d0 100644 --- a/packages/util/src/is/function.ts +++ b/packages/util/src/is/function.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // eslint-disable-next-line @typescript-eslint/ban-types type FnType = Function; diff --git a/packages/util/src/is/hex.spec.ts b/packages/util/src/is/hex.spec.ts index 5a3788fc5..f2aad0c31 100644 --- a/packages/util/src/is/hex.spec.ts +++ b/packages/util/src/is/hex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isHex } from '.'; diff --git a/packages/util/src/is/hex.ts b/packages/util/src/is/hex.ts index 7f6a2d2ef..cf87b0ca9 100644 --- a/packages/util/src/is/hex.ts +++ b/packages/util/src/is/hex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isString from './string'; diff --git a/packages/util/src/is/index.ts b/packages/util/src/is/index.ts index 35a0e4bbf..5162f9887 100644 --- a/packages/util/src/is/index.ts +++ b/packages/util/src/is/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Type checking utilities diff --git a/packages/util/src/is/instanceOf.spec.ts b/packages/util/src/is/instanceOf.spec.ts index e57b3b5ac..9eba94c66 100644 --- a/packages/util/src/is/instanceOf.spec.ts +++ b/packages/util/src/is/instanceOf.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isInstanceOf } from '.'; diff --git a/packages/util/src/is/instanceOf.ts b/packages/util/src/is/instanceOf.ts index c20a74aa7..903502856 100644 --- a/packages/util/src/is/instanceOf.ts +++ b/packages/util/src/is/instanceOf.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name isInstanceOf diff --git a/packages/util/src/is/ip.spec.ts b/packages/util/src/is/ip.spec.ts index 11c9d6a2f..c6ef1cd37 100644 --- a/packages/util/src/is/ip.spec.ts +++ b/packages/util/src/is/ip.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isIp } from '.'; diff --git a/packages/util/src/is/ip.ts b/packages/util/src/is/ip.ts index 81d01b857..f5ddaffdc 100644 --- a/packages/util/src/is/ip.ts +++ b/packages/util/src/is/ip.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import ipRegex from 'ip-regex'; diff --git a/packages/util/src/is/jsonObject.spec.ts b/packages/util/src/is/jsonObject.spec.ts index 9e2dfb6ed..6735aee3c 100644 --- a/packages/util/src/is/jsonObject.spec.ts +++ b/packages/util/src/is/jsonObject.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isJsonObject } from '.'; diff --git a/packages/util/src/is/jsonObject.ts b/packages/util/src/is/jsonObject.ts index c395b026a..d75cd1a39 100644 --- a/packages/util/src/is/jsonObject.ts +++ b/packages/util/src/is/jsonObject.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 interface ObjectIndexed { // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/util/src/is/null.spec.ts b/packages/util/src/is/null.spec.ts index 65ab2668e..9fb90db6b 100644 --- a/packages/util/src/is/null.spec.ts +++ b/packages/util/src/is/null.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isNull } from '.'; diff --git a/packages/util/src/is/null.ts b/packages/util/src/is/null.ts index 94158d357..c298dacba 100644 --- a/packages/util/src/is/null.ts +++ b/packages/util/src/is/null.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name isNull diff --git a/packages/util/src/is/number.spec.ts b/packages/util/src/is/number.spec.ts index ffa8b5668..d9579d2dc 100644 --- a/packages/util/src/is/number.spec.ts +++ b/packages/util/src/is/number.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isNumber } from '.'; diff --git a/packages/util/src/is/number.ts b/packages/util/src/is/number.ts index 84dc6ca67..47f6fce1e 100644 --- a/packages/util/src/is/number.ts +++ b/packages/util/src/is/number.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name isNumber diff --git a/packages/util/src/is/object.spec.ts b/packages/util/src/is/object.spec.ts index 035c67ce7..e4a29b926 100644 --- a/packages/util/src/is/object.spec.ts +++ b/packages/util/src/is/object.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isObject } from '.'; diff --git a/packages/util/src/is/object.ts b/packages/util/src/is/object.ts index a3f127d44..47a443719 100644 --- a/packages/util/src/is/object.ts +++ b/packages/util/src/is/object.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 interface ObjectIndexed { // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/util/src/is/observable.spec.ts b/packages/util/src/is/observable.spec.ts index 8276e855d..63e7f4a3b 100644 --- a/packages/util/src/is/observable.spec.ts +++ b/packages/util/src/is/observable.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isObservable } from '.'; diff --git a/packages/util/src/is/observable.ts b/packages/util/src/is/observable.ts index 8da368016..23403cacb 100644 --- a/packages/util/src/is/observable.ts +++ b/packages/util/src/is/observable.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isFunction from './function'; import isObject from './object'; diff --git a/packages/util/src/is/string.spec.ts b/packages/util/src/is/string.spec.ts index 759d95599..c9888aae6 100644 --- a/packages/util/src/is/string.spec.ts +++ b/packages/util/src/is/string.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isString } from '.'; diff --git a/packages/util/src/is/string.ts b/packages/util/src/is/string.ts index bec5712d5..d0d2deb7c 100644 --- a/packages/util/src/is/string.ts +++ b/packages/util/src/is/string.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name isString diff --git a/packages/util/src/is/testChain.spec.ts b/packages/util/src/is/testChain.spec.ts index 1020e9144..9a8b7f6c7 100644 --- a/packages/util/src/is/testChain.spec.ts +++ b/packages/util/src/is/testChain.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isTestChain from './testChain'; diff --git a/packages/util/src/is/testChain.ts b/packages/util/src/is/testChain.ts index bf2ac751e..5958882c9 100644 --- a/packages/util/src/is/testChain.ts +++ b/packages/util/src/is/testChain.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 const re = new RegExp('(Development|Local Testnet)$'); diff --git a/packages/util/src/is/toBn.ts b/packages/util/src/is/toBn.ts index 4ccea7dab..3da43cb42 100644 --- a/packages/util/src/is/toBn.ts +++ b/packages/util/src/is/toBn.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { ToBn } from '../types'; diff --git a/packages/util/src/is/u8a.spec.ts b/packages/util/src/is/u8a.spec.ts index 4d1c186da..ee90c6031 100644 --- a/packages/util/src/is/u8a.spec.ts +++ b/packages/util/src/is/u8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isU8a } from '.'; diff --git a/packages/util/src/is/u8a.ts b/packages/util/src/is/u8a.ts index fc065479e..65104ea00 100644 --- a/packages/util/src/is/u8a.ts +++ b/packages/util/src/is/u8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isInstanceOf from './instanceOf'; diff --git a/packages/util/src/is/undefined.spec.ts b/packages/util/src/is/undefined.spec.ts index f7ea74b2d..b0191bc0d 100644 --- a/packages/util/src/is/undefined.spec.ts +++ b/packages/util/src/is/undefined.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isUndefined } from '.'; diff --git a/packages/util/src/is/undefined.ts b/packages/util/src/is/undefined.ts index c47aa82b6..36d492842 100644 --- a/packages/util/src/is/undefined.ts +++ b/packages/util/src/is/undefined.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name isUndefined diff --git a/packages/util/src/is/utf8.spec.ts b/packages/util/src/is/utf8.spec.ts index 811c3695a..134a5ec9c 100644 --- a/packages/util/src/is/utf8.spec.ts +++ b/packages/util/src/is/utf8.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { isUtf8 } from '.'; diff --git a/packages/util/src/is/utf8.ts b/packages/util/src/is/utf8.ts index 0c205b14c..3dd9ce3f1 100644 --- a/packages/util/src/is/utf8.ts +++ b/packages/util/src/is/utf8.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // Adapted from https://github.com/JulienPalard/is_utf8/blob/master/is_utf8.c diff --git a/packages/util/src/is/wasm.ts b/packages/util/src/is/wasm.ts index 1658e137d..ab6bbbe9c 100644 --- a/packages/util/src/is/wasm.ts +++ b/packages/util/src/is/wasm.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import u8aEq from '../u8a/eq'; diff --git a/packages/util/src/logger.spec.ts b/packages/util/src/logger.spec.ts index 301795c59..77a54900e 100644 --- a/packages/util/src/logger.spec.ts +++ b/packages/util/src/logger.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Logger } from './types'; diff --git a/packages/util/src/logger.ts b/packages/util/src/logger.ts index bdf746dab..556c16327 100644 --- a/packages/util/src/logger.ts +++ b/packages/util/src/logger.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { Logger, Logger$Data } from './types'; diff --git a/packages/util/src/number/index.ts b/packages/util/src/number/index.ts index d9fd9187b..50f57fe0e 100644 --- a/packages/util/src/number/index.ts +++ b/packages/util/src/number/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Utility methods to convert to and from `number` values diff --git a/packages/util/src/number/toHex.spec.ts b/packages/util/src/number/toHex.spec.ts index c9690226b..f2b5ac184 100644 --- a/packages/util/src/number/toHex.spec.ts +++ b/packages/util/src/number/toHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { numberToHex } from '.'; diff --git a/packages/util/src/number/toHex.ts b/packages/util/src/number/toHex.ts index 894e1e3b6..078de530b 100644 --- a/packages/util/src/number/toHex.ts +++ b/packages/util/src/number/toHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import hexFixLength from '../hex/fixLength'; import isNull from '../is/null'; diff --git a/packages/util/src/number/toU8a.spec.ts b/packages/util/src/number/toU8a.spec.ts index 64fff68ec..e6e279480 100644 --- a/packages/util/src/number/toU8a.spec.ts +++ b/packages/util/src/number/toU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { numberToU8a } from '.'; diff --git a/packages/util/src/number/toU8a.ts b/packages/util/src/number/toU8a.ts index 398efdcb7..b6276c4ad 100644 --- a/packages/util/src/number/toU8a.ts +++ b/packages/util/src/number/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import hexToU8a from '../hex/toU8a'; import isNull from '../is/null'; diff --git a/packages/util/src/polyfill/fill.spec.ts b/packages/util/src/polyfill/fill.spec.ts index b80fb4565..be8752cf9 100644 --- a/packages/util/src/polyfill/fill.spec.ts +++ b/packages/util/src/polyfill/fill.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /* eslint-disable no-extend-native */ /* eslint-disable @typescript-eslint/unbound-method */ diff --git a/packages/util/src/polyfill/fill.ts b/packages/util/src/polyfill/fill.ts index 24a4bb3c9..08c68f00c 100644 --- a/packages/util/src/polyfill/fill.ts +++ b/packages/util/src/polyfill/fill.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /* eslint-disable no-extend-native */ /* eslint-disable @typescript-eslint/unbound-method */ diff --git a/packages/util/src/polyfill/index.ts b/packages/util/src/polyfill/index.ts index 28b1c3784..cdefa6586 100644 --- a/packages/util/src/polyfill/index.ts +++ b/packages/util/src/polyfill/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import './fill'; import './padEnd'; diff --git a/packages/util/src/polyfill/padEnd.spec.ts b/packages/util/src/polyfill/padEnd.spec.ts index 5d6559d2c..f03feba53 100644 --- a/packages/util/src/polyfill/padEnd.spec.ts +++ b/packages/util/src/polyfill/padEnd.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /* eslint-disable @typescript-eslint/unbound-method */ diff --git a/packages/util/src/polyfill/padEnd.ts b/packages/util/src/polyfill/padEnd.ts index 453002d89..8e1e129e9 100644 --- a/packages/util/src/polyfill/padEnd.ts +++ b/packages/util/src/polyfill/padEnd.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /* eslint-disable no-extend-native */ /* eslint-disable @typescript-eslint/unbound-method */ diff --git a/packages/util/src/polyfill/padStart.spec.ts b/packages/util/src/polyfill/padStart.spec.ts index dc874fccf..f88ba5f48 100644 --- a/packages/util/src/polyfill/padStart.spec.ts +++ b/packages/util/src/polyfill/padStart.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /* eslint-disable @typescript-eslint/unbound-method */ diff --git a/packages/util/src/polyfill/padStart.ts b/packages/util/src/polyfill/padStart.ts index d229e34c4..38cb5bb68 100644 --- a/packages/util/src/polyfill/padStart.ts +++ b/packages/util/src/polyfill/padStart.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /* eslint-disable no-extend-native */ /* eslint-disable @typescript-eslint/unbound-method */ diff --git a/packages/util/src/polyfill/setPrototypeOf.spec.ts b/packages/util/src/polyfill/setPrototypeOf.spec.ts index 4ec217cbd..db32fce60 100644 --- a/packages/util/src/polyfill/setPrototypeOf.spec.ts +++ b/packages/util/src/polyfill/setPrototypeOf.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /* eslint-disable no-proto */ diff --git a/packages/util/src/polyfill/setPrototypeOf.ts b/packages/util/src/polyfill/setPrototypeOf.ts index ab23848fe..989cd4c69 100644 --- a/packages/util/src/polyfill/setPrototypeOf.ts +++ b/packages/util/src/polyfill/setPrototypeOf.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 // React Native does not have Object.setPrototypeOf if (!Object.setPrototypeOf) { diff --git a/packages/util/src/polyfill/textDecoder.spec.ts b/packages/util/src/polyfill/textDecoder.spec.ts index 85f17c1c2..22d6dbfa6 100644 --- a/packages/util/src/polyfill/textDecoder.spec.ts +++ b/packages/util/src/polyfill/textDecoder.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 describe('TextDecoder', (): void => { let origTD: TextDecoder; diff --git a/packages/util/src/polyfill/textDecoder.ts b/packages/util/src/polyfill/textDecoder.ts index 43e62294d..a7d6ab998 100644 --- a/packages/util/src/polyfill/textDecoder.ts +++ b/packages/util/src/polyfill/textDecoder.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 if (typeof TextDecoder === 'undefined') { try { diff --git a/packages/util/src/polyfill/textEncoder.spec.ts b/packages/util/src/polyfill/textEncoder.spec.ts index 14cd7c13a..ebec190ee 100644 --- a/packages/util/src/polyfill/textEncoder.spec.ts +++ b/packages/util/src/polyfill/textEncoder.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 describe('TextEncoder', (): void => { let origTE: TextEncoder; diff --git a/packages/util/src/polyfill/textEncoder.ts b/packages/util/src/polyfill/textEncoder.ts index 70f9fefda..d4eacf153 100644 --- a/packages/util/src/polyfill/textEncoder.ts +++ b/packages/util/src/polyfill/textEncoder.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 if (typeof TextEncoder === 'undefined') { try { diff --git a/packages/util/src/promisify.spec.ts b/packages/util/src/promisify.spec.ts index f02422705..ce5b4506f 100644 --- a/packages/util/src/promisify.spec.ts +++ b/packages/util/src/promisify.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { promisify } from '.'; diff --git a/packages/util/src/promisify.ts b/packages/util/src/promisify.ts index c57ac5ead..146575f71 100644 --- a/packages/util/src/promisify.ts +++ b/packages/util/src/promisify.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name promisify diff --git a/packages/util/src/string/camelCase.spec.ts b/packages/util/src/string/camelCase.spec.ts index ba0be1d1b..cf6139b50 100644 --- a/packages/util/src/string/camelCase.spec.ts +++ b/packages/util/src/string/camelCase.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringCamelCase } from '.'; diff --git a/packages/util/src/string/camelCase.ts b/packages/util/src/string/camelCase.ts index cf0001b1a..e2b8edcd7 100644 --- a/packages/util/src/string/camelCase.ts +++ b/packages/util/src/string/camelCase.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import stringCamelCase from 'camelcase'; diff --git a/packages/util/src/string/index.ts b/packages/util/src/string/index.ts index e988dc82d..a30939a0a 100644 --- a/packages/util/src/string/index.ts +++ b/packages/util/src/string/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Utility methods to convert to work with `string` values diff --git a/packages/util/src/string/lowerFirst.spec.ts b/packages/util/src/string/lowerFirst.spec.ts index 095723f81..9b0abec6c 100644 --- a/packages/util/src/string/lowerFirst.spec.ts +++ b/packages/util/src/string/lowerFirst.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringLowerFirst } from '.'; diff --git a/packages/util/src/string/lowerFirst.ts b/packages/util/src/string/lowerFirst.ts index d308ba347..52e7cf871 100644 --- a/packages/util/src/string/lowerFirst.ts +++ b/packages/util/src/string/lowerFirst.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name stringLowerFirst diff --git a/packages/util/src/string/shorten.spec.ts b/packages/util/src/string/shorten.spec.ts index a03e55b68..a7bfe8900 100644 --- a/packages/util/src/string/shorten.spec.ts +++ b/packages/util/src/string/shorten.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringShorten } from '.'; diff --git a/packages/util/src/string/shorten.ts b/packages/util/src/string/shorten.ts index d36c7b91a..4ea0549db 100644 --- a/packages/util/src/string/shorten.ts +++ b/packages/util/src/string/shorten.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name stringShorten diff --git a/packages/util/src/string/toHex.spec.ts b/packages/util/src/string/toHex.spec.ts index 267a5a86e..20d8f0950 100644 --- a/packages/util/src/string/toHex.spec.ts +++ b/packages/util/src/string/toHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToHex } from '.'; diff --git a/packages/util/src/string/toHex.ts b/packages/util/src/string/toHex.ts index dc7860bbc..022987051 100644 --- a/packages/util/src/string/toHex.ts +++ b/packages/util/src/string/toHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import u8aToHex from '../u8a/toHex'; import stringToU8a from './toU8a'; diff --git a/packages/util/src/string/toU8a.spec.ts b/packages/util/src/string/toU8a.spec.ts index 85c59a2cb..54614db39 100644 --- a/packages/util/src/string/toU8a.spec.ts +++ b/packages/util/src/string/toU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringToU8a } from '..'; diff --git a/packages/util/src/string/toU8a.ts b/packages/util/src/string/toU8a.ts index 3a7ccad13..0af1bf414 100644 --- a/packages/util/src/string/toU8a.ts +++ b/packages/util/src/string/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 let encoder: { encode: (value: string) => Uint8Array }; diff --git a/packages/util/src/string/upperFirst.spec.ts b/packages/util/src/string/upperFirst.spec.ts index a1c54b31f..c60576d9f 100644 --- a/packages/util/src/string/upperFirst.spec.ts +++ b/packages/util/src/string/upperFirst.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { stringUpperFirst } from '.'; diff --git a/packages/util/src/string/upperFirst.ts b/packages/util/src/string/upperFirst.ts index b35a30e02..d81e3797a 100644 --- a/packages/util/src/string/upperFirst.ts +++ b/packages/util/src/string/upperFirst.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name stringUpperFirst diff --git a/packages/util/src/types.ts b/packages/util/src/types.ts index 3e9fc1b44..e2d403af3 100644 --- a/packages/util/src/types.ts +++ b/packages/util/src/types.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import type BN from 'bn.js'; diff --git a/packages/util/src/u8a/concat.spec.ts b/packages/util/src/u8a/concat.spec.ts index 6a157c739..a3202b17b 100644 --- a/packages/util/src/u8a/concat.spec.ts +++ b/packages/util/src/u8a/concat.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aConcat } from '.'; diff --git a/packages/util/src/u8a/concat.ts b/packages/util/src/u8a/concat.ts index cfc35246a..787d365b6 100644 --- a/packages/util/src/u8a/concat.ts +++ b/packages/util/src/u8a/concat.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import u8aToU8a from './toU8a'; diff --git a/packages/util/src/u8a/eq.spec.ts b/packages/util/src/u8a/eq.spec.ts index 1b41c8cc3..3292fac1a 100644 --- a/packages/util/src/u8a/eq.spec.ts +++ b/packages/util/src/u8a/eq.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aEq } from '.'; diff --git a/packages/util/src/u8a/eq.ts b/packages/util/src/u8a/eq.ts index 5dcde0452..278e35c66 100644 --- a/packages/util/src/u8a/eq.ts +++ b/packages/util/src/u8a/eq.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import u8aToU8a from './toU8a'; diff --git a/packages/util/src/u8a/fixLength.spec.ts b/packages/util/src/u8a/fixLength.spec.ts index 18bb28a4b..3c597a138 100644 --- a/packages/util/src/u8a/fixLength.spec.ts +++ b/packages/util/src/u8a/fixLength.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aFixLength } from '.'; diff --git a/packages/util/src/u8a/fixLength.ts b/packages/util/src/u8a/fixLength.ts index 723ff7032..7df6d4460 100644 --- a/packages/util/src/u8a/fixLength.ts +++ b/packages/util/src/u8a/fixLength.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name u8aFixLength diff --git a/packages/util/src/u8a/index.ts b/packages/util/src/u8a/index.ts index acc7b46ba..d289fb84a 100644 --- a/packages/util/src/u8a/index.ts +++ b/packages/util/src/u8a/index.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @summary Utility methods to convert to and from `Uint8Array` objects diff --git a/packages/util/src/u8a/sorted.spec.ts b/packages/util/src/u8a/sorted.spec.ts index 31469b4cb..78f918c3e 100644 --- a/packages/util/src/u8a/sorted.spec.ts +++ b/packages/util/src/u8a/sorted.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aSorted } from '.'; diff --git a/packages/util/src/u8a/sorted.ts b/packages/util/src/u8a/sorted.ts index 368d75873..30898e560 100644 --- a/packages/util/src/u8a/sorted.ts +++ b/packages/util/src/u8a/sorted.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isUndefined from '../is/undefined'; diff --git a/packages/util/src/u8a/toBn.spec.ts b/packages/util/src/u8a/toBn.spec.ts index 4c25d0a10..a595c5ae1 100644 --- a/packages/util/src/u8a/toBn.spec.ts +++ b/packages/util/src/u8a/toBn.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToBn } from '.'; diff --git a/packages/util/src/u8a/toBn.ts b/packages/util/src/u8a/toBn.ts index e2595a509..012687d4f 100644 --- a/packages/util/src/u8a/toBn.ts +++ b/packages/util/src/u8a/toBn.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import BN from 'bn.js'; diff --git a/packages/util/src/u8a/toBuffer.spec.ts b/packages/util/src/u8a/toBuffer.spec.ts index bffefef0c..a19630aad 100644 --- a/packages/util/src/u8a/toBuffer.spec.ts +++ b/packages/util/src/u8a/toBuffer.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToBuffer } from '.'; diff --git a/packages/util/src/u8a/toBuffer.ts b/packages/util/src/u8a/toBuffer.ts index fd2ee0ee3..76ca50a9b 100644 --- a/packages/util/src/u8a/toBuffer.ts +++ b/packages/util/src/u8a/toBuffer.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 /** * @name u8aToBuffer diff --git a/packages/util/src/u8a/toHex.spec.ts b/packages/util/src/u8a/toHex.spec.ts index 59af59baf..788337b8b 100644 --- a/packages/util/src/u8a/toHex.spec.ts +++ b/packages/util/src/u8a/toHex.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToHex } from '.'; diff --git a/packages/util/src/u8a/toHex.ts b/packages/util/src/u8a/toHex.ts index 7f576c84d..49a813a90 100644 --- a/packages/util/src/u8a/toHex.ts +++ b/packages/util/src/u8a/toHex.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 const ALPHABET = new Array(256) as string[]; diff --git a/packages/util/src/u8a/toString.spec.ts b/packages/util/src/u8a/toString.spec.ts index 39053eb66..b98b5a563 100644 --- a/packages/util/src/u8a/toString.spec.ts +++ b/packages/util/src/u8a/toString.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToString } from '..'; diff --git a/packages/util/src/u8a/toString.ts b/packages/util/src/u8a/toString.ts index 1b4182b1d..029fdf1b8 100644 --- a/packages/util/src/u8a/toString.ts +++ b/packages/util/src/u8a/toString.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 let decoder: { decode: (value: Uint8Array) => string }; diff --git a/packages/util/src/u8a/toU8a.spec.ts b/packages/util/src/u8a/toU8a.spec.ts index f85d9b12a..13d2f9b8d 100644 --- a/packages/util/src/u8a/toU8a.spec.ts +++ b/packages/util/src/u8a/toU8a.spec.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import { u8aToU8a } from '.'; diff --git a/packages/util/src/u8a/toU8a.ts b/packages/util/src/u8a/toU8a.ts index 6430b9d0f..eb6c3186d 100644 --- a/packages/util/src/u8a/toU8a.ts +++ b/packages/util/src/u8a/toU8a.ts @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 import isBuffer from '../is/buffer'; import isHex from '../is/hex'; diff --git a/typedoc.js b/typedoc.js index 56a1d8621..f8f7c14df 100644 --- a/typedoc.js +++ b/typedoc.js @@ -1,6 +1,5 @@ // Copyright 2017-2020 @polkadot/util authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. +// SPDX-License-Identifier: Apache-2.0 module.exports = { exclude: '**/*+(index|e2e|spec).ts',