diff --git a/packages/faucet/package.json b/packages/faucet/package.json index 13a21953..d051943e 100644 --- a/packages/faucet/package.json +++ b/packages/faucet/package.json @@ -36,7 +36,6 @@ "@iov/bcp": "^2.0.0-alpha.7", "@iov/crypto": "^2.0.0-alpha.7", "@iov/encoding": "^2.0.0-alpha.7", - "@iov/lisk": "^2.0.0-alpha.7", "@iov/multichain": "^2.0.0-alpha.7", "@koa/cors": "^3.0.0", "axios": "^0.19.0", diff --git a/packages/faucet/src/codec.spec.ts b/packages/faucet/src/codec.spec.ts index 2176ec63..5928ce09 100644 --- a/packages/faucet/src/codec.spec.ts +++ b/packages/faucet/src/codec.spec.ts @@ -2,10 +2,10 @@ import { Codec, codecFromString } from "./codec"; describe("Codec", () => { it("can convert string to codec", () => { - expect(codecFromString("lisk")).toEqual(Codec.Lisk); expect(codecFromString("cosmwasm")).toEqual(Codec.CosmWasm); expect(() => codecFromString("")).toThrowError(/not supported/i); + expect(() => codecFromString("lisk")).toThrowError(/not supported/i); expect(() => codecFromString("bns")).toThrowError(/not supported/i); expect(() => codecFromString("abc")).toThrowError(/not supported/i); expect(() => codecFromString("LISK")).toThrowError(/not supported/i); diff --git a/packages/faucet/src/codec.ts b/packages/faucet/src/codec.ts index dab2a092..035a3680 100644 --- a/packages/faucet/src/codec.ts +++ b/packages/faucet/src/codec.ts @@ -2,17 +2,13 @@ import { createCosmWasmConnector, TokenInfo } from "@cosmwasm/bcp"; import { ChainConnector, TokenTicker, TxCodec } from "@iov/bcp"; import { Slip10RawIndex } from "@iov/crypto"; import { HdPaths } from "@iov/keycontrol"; -import { createLiskConnector } from "@iov/lisk"; export const enum Codec { - Lisk, CosmWasm, } export function codecFromString(input: string): Codec { switch (input) { - case "lisk": - return Codec.Lisk; case "cosmwasm": return Codec.CosmWasm; default: @@ -23,8 +19,6 @@ export function codecFromString(input: string): Codec { export function createPathBuilderForCodec(codec: Codec): (derivation: number) => readonly Slip10RawIndex[] { const pathBuilder = (accountIndex: number): readonly Slip10RawIndex[] => { switch (codec) { - case Codec.Lisk: - return HdPaths.bip44Like(134, accountIndex); case Codec.CosmWasm: return HdPaths.cosmos(accountIndex); default: @@ -36,8 +30,6 @@ export function createPathBuilderForCodec(codec: Codec): (derivation: number) => export function createChainConnector(codec: Codec, url: string): ChainConnector { switch (codec) { - case Codec.Lisk: - return createLiskConnector(url); case Codec.CosmWasm: { const tokens: readonly TokenInfo[] = [ { @@ -66,8 +58,6 @@ export function codecImplementation(codec: Codec): TxCodec { export function codecDefaultFractionalDigits(codec: Codec): number { switch (codec) { - case Codec.Lisk: - return 8; case Codec.CosmWasm: return 6; default: diff --git a/packages/faucet/src/crypto.ts b/packages/faucet/src/crypto.ts index cfa370e4..a68c7d41 100644 --- a/packages/faucet/src/crypto.ts +++ b/packages/faucet/src/crypto.ts @@ -1,11 +1,9 @@ -import { Ed25519HdWallet, Secp256k1HdWallet, Wallet } from "@iov/keycontrol"; +import { Secp256k1HdWallet, Wallet } from "@iov/keycontrol"; import { Codec } from "./codec"; export function createWalletForCodec(input: Codec, mnemonic: string): Wallet { switch (input) { - case Codec.Lisk: - return Ed25519HdWallet.fromMnemonic(mnemonic); case Codec.CosmWasm: return Secp256k1HdWallet.fromMnemonic(mnemonic); default: diff --git a/yarn.lock b/yarn.lock index c0fb6f1d..32607f41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -159,23 +159,6 @@ type-tagger "^1.0.0" xstream "^11.10.0" -"@iov/lisk@^2.0.0-alpha.7": - version "2.0.0-alpha.7" - resolved "https://registry.yarnpkg.com/@iov/lisk/-/lisk-2.0.0-alpha.7.tgz#5ff6c617ac00e6be736ada34ad68dce0efd64637" - integrity sha512-m5mr2NDU7pxuS8d6SBXCZ1WBtCSXtV+EWqMEIuPSCJwZxnwmWotowX+WhSYn+dGyuvgTd7DpfQ5C6pliAyhcyQ== - dependencies: - "@iov/bcp" "^2.0.0-alpha.7" - "@iov/crypto" "^2.0.0-alpha.7" - "@iov/encoding" "^2.0.0-alpha.7" - "@iov/keycontrol" "^2.0.0-alpha.7" - "@iov/stream" "^2.0.0-alpha.7" - "@types/long" "^4.0.0" - axios "^0.19.0" - fast-deep-equal "^3.1.1" - long "^4.0.0" - readonly-date "^1.0.0" - xstream "^11.10.0" - "@iov/multichain@^2.0.0-alpha.7": version "2.0.0-alpha.7" resolved "https://registry.yarnpkg.com/@iov/multichain/-/multichain-2.0.0-alpha.7.tgz#29ec9f61ec2fa60c17d462c9be48feb7196c28ba"