From d60740ac83c780240b883bb96ef47fa71b814a17 Mon Sep 17 00:00:00 2001 From: jaeseung-bae Date: Wed, 19 Apr 2023 13:36:26 +0900 Subject: [PATCH 1/4] chore: rename package 'ln.v2' -> 'sdk' --- README.md | 10 +++++----- ...dk.kotlin-application-conventions.gradle.kts} | 2 +- ...hia.sdk.kotlin-common-conventions.gradle.kts} | 0 ...ia.sdk.kotlin-library-conventions.gradle.kts} | 2 +- crypto/build.gradle.kts | 2 +- .../finschia/{ln/v2 => sdk}/crypto/Amino.java | 2 +- .../{ln/v2 => sdk}/crypto/Bech32Utils.java | 2 +- .../{ln/v2 => sdk}/crypto/Bip44WalletUtils.java | 8 +++----- .../{ln/v2 => sdk}/crypto/ECDSASignature.java | 2 +- .../finschia/{ln/v2 => sdk}/crypto/KeyStore.java | 8 ++++---- .../finschia/{ln/v2 => sdk}/crypto/LinkKeys.java | 4 ++-- .../{ln/v2 => sdk}/crypto/SecureRandomUtils.java | 2 +- .../crypto/TendermintArmoredOutputStream.java | 2 +- .../{ln/v2 => sdk}/crypto/Xsalsa20Symmetric.java | 2 +- .../finschia/{ln/v2 => sdk}/account/Account.kt | 2 +- .../finschia/{ln/v2 => sdk}/account/Address.kt | 13 +++++++------ .../finschia/{ln/v2 => sdk}/account/Coin.kt | 2 +- .../finschia/{ln/v2 => sdk}/account/HDWallet.kt | 6 +++--- .../finschia/{ln/v2 => sdk}/account/KeyWallet.kt | 10 +++++----- .../finschia/{ln/v2 => sdk}/account/PubKey.kt | 16 ++++++++-------- .../finschia/{ln/v2 => sdk}/account/Type.kt | 2 +- .../finschia/{ln/v2 => sdk}/account/Wallet.kt | 2 +- .../{ln/v2 => sdk}/common/CommonMapperModule.kt | 4 ++-- .../finschia/{ln/v2 => sdk}/common/Converter.kt | 2 +- .../finschia/{ln/v2 => sdk}/common/Hash.kt | 2 +- .../finschia/{ln/v2 => sdk}/common/KeyValue.kt | 2 +- .../{ln/v2 => sdk}/common/ToStringConverters.kt | 8 ++++---- .../finschia/{ln/v2 => sdk}/common/TypedValue.kt | 2 +- .../{ln/v2 => sdk}/account/AddressTest.java | 2 +- .../{ln/v2 => sdk}/account/HDWalletTest.java | 2 +- .../{ln/v2 => sdk}/account/KeyWalletTest.java | 2 +- .../{ln/v2 => sdk}/account/PubKeyTest.java | 2 +- .../common/CommonObjectModuleTest.java | 11 +++++++---- .../{ln/v2 => sdk}/common/TypedValueTest.java | 2 +- .../{ln/v2 => sdk}/crypto/AminoTest.java | 2 +- .../v2 => sdk}/crypto/ECDSASignatureTest.java | 10 ++++------ .../{ln/v2 => sdk}/crypto/KeyStoreTest.java | 2 +- .../{ln/v2 => sdk}/crypto/LinkKeysTest.java | 4 +--- .../v2 => sdk}/crypto/SecureRandomUtilsTest.java | 6 +++--- .../TendermintArmoredOutputStreamTest.java | 2 +- .../v2 => sdk}/crypto/Xsalsa20SymmetricTest.java | 2 +- .../finschia/{ln/v2 => sdk}/account/TypeTest.kt | 10 +++++----- examples/multisig-example/build.gradle.kts | 4 ++-- .../finschia/{ln/v2 => sdk}/example/Client.kt | 10 +++++----- examples/query-example/build.gradle.kts | 4 ++-- .../v2 => sdk}/example/AccountQueryClient.java | 2 +- .../with-tx-wrapper-example/build.gradle.kts | 4 ++-- .../finschia/{ln/v2 => sdk}/example/Client.kt | 6 +++--- .../without-tx-wrapper-example/build.gradle.kts | 4 ++-- .../finschia/{ln/v2 => sdk}/example/Client.kt | 8 ++++---- protobuf/build.gradle.kts | 2 +- tx/build.gradle.kts | 2 +- .../network/finschia/{ln/v2 => sdk}/base/Tx.kt | 6 +++--- .../{ln/v2 => sdk}/legacymultisig/Address.kt | 4 ++-- .../{ln/v2 => sdk}/legacymultisig/Coin.kt | 2 +- .../{ln/v2 => sdk}/legacymultisig/Encoding.kt | 2 +- .../{ln/v2 => sdk}/legacymultisig/Hex.kt | 2 +- .../{ln/v2 => sdk}/legacymultisig/Multisig.kt | 2 +- .../v2 => sdk}/legacymultisig/Multisignature.kt | 2 +- .../{ln/v2 => sdk}/legacymultisig/Pubkey.kt | 2 +- .../{ln/v2 => sdk}/legacymultisig/SignDoc.kt | 2 +- .../finschia/{ln/v2 => sdk}/base/TxTest.kt | 4 ++-- .../{ln/v2 => sdk}/legacymultisig/AddressTest.kt | 4 ++-- .../v2 => sdk}/legacymultisig/EncodingTest.kt | 4 ++-- .../{ln/v2 => sdk}/legacymultisig/HexTest.kt | 2 +- .../v2 => sdk}/legacymultisig/MultisigTest.kt | 2 +- .../legacymultisig/MultisignatureTest.kt | 2 +- .../{ln/v2 => sdk}/legacymultisig/PubkeyTest.kt | 2 +- .../{ln/v2 => sdk}/legacymultisig/SignDocTest.kt | 2 +- .../{ln/v2 => sdk}/legacymultisig/TestUtils.kt | 2 +- 70 files changed, 136 insertions(+), 138 deletions(-) rename buildSrc/src/main/kotlin/{network.finschia.ln.v2.kotlin-application-conventions.gradle.kts => network.finschia.sdk.kotlin-application-conventions.gradle.kts} (83%) rename buildSrc/src/main/kotlin/{network.finschia.ln.v2.kotlin-common-conventions.gradle.kts => network.finschia.sdk.kotlin-common-conventions.gradle.kts} (100%) rename buildSrc/src/main/kotlin/{network.finschia.ln.v2.kotlin-library-conventions.gradle.kts => network.finschia.sdk.kotlin-library-conventions.gradle.kts} (82%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/Amino.java (98%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/Bech32Utils.java (97%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/Bip44WalletUtils.java (81%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/ECDSASignature.java (99%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/KeyStore.java (95%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/LinkKeys.java (95%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/SecureRandomUtils.java (97%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/TendermintArmoredOutputStream.java (99%) rename crypto/src/main/java/network/finschia/{ln/v2 => sdk}/crypto/Xsalsa20Symmetric.java (97%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/account/Account.kt (96%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/account/Address.kt (93%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/account/Coin.kt (96%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/account/HDWallet.kt (90%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/account/KeyWallet.kt (92%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/account/PubKey.kt (93%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/account/Type.kt (97%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/account/Wallet.kt (96%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/common/CommonMapperModule.kt (95%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/common/Converter.kt (95%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/common/Hash.kt (97%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/common/KeyValue.kt (95%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/common/ToStringConverters.kt (94%) rename crypto/src/main/kotlin/network/finschia/{ln/v2 => sdk}/common/TypedValue.kt (98%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/account/AddressTest.java (99%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/account/HDWalletTest.java (99%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/account/KeyWalletTest.java (99%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/account/PubKeyTest.java (98%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/common/CommonObjectModuleTest.java (92%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/common/TypedValueTest.java (99%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/crypto/AminoTest.java (98%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/crypto/ECDSASignatureTest.java (86%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/crypto/KeyStoreTest.java (99%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/crypto/LinkKeysTest.java (95%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/crypto/SecureRandomUtilsTest.java (82%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/crypto/TendermintArmoredOutputStreamTest.java (96%) rename crypto/src/test/java/network/finschia/{ln/v2 => sdk}/crypto/Xsalsa20SymmetricTest.java (97%) rename crypto/src/test/kotlin/network/finschia/{ln/v2 => sdk}/account/TypeTest.kt (73%) rename examples/multisig-example/src/main/kotlin/network/finschia/{ln/v2 => sdk}/example/Client.kt (97%) rename examples/query-example/src/main/java/network/finschia/{ln/v2 => sdk}/example/AccountQueryClient.java (98%) rename examples/with-tx-wrapper-example/src/main/kotlin/network/finschia/{ln/v2 => sdk}/example/Client.kt (95%) rename examples/without-tx-wrapper-example/src/main/kotlin/network/finschia/{ln/v2 => sdk}/example/Client.kt (97%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/base/Tx.kt (96%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/Address.kt (95%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/Coin.kt (88%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/Encoding.kt (98%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/Hex.kt (94%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/Multisig.kt (97%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/Multisignature.kt (98%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/Pubkey.kt (95%) rename tx/src/main/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/SignDoc.kt (97%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/base/TxTest.kt (96%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/AddressTest.kt (97%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/EncodingTest.kt (97%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/HexTest.kt (97%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/MultisigTest.kt (99%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/MultisignatureTest.kt (99%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/PubkeyTest.kt (98%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/SignDocTest.kt (99%) rename tx/src/test/kotlin/network/finschia/{ln/v2 => sdk}/legacymultisig/TestUtils.kt (98%) diff --git a/README.md b/README.md index 9505b2e..fa3ad5e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # finschia-kt -gRPC client library in kotlin for finschia (https://github.com/line/finschia). +gRPC client library in kotlin for finschia (https://github.com/Finschia/finschia). -Requires [lbm-sdk v0.47.0-alpha1](https://github.com/line/lbm-sdk/tree/v0.47.0-alpha1) +Requires [lbm-sdk v0.47.0-alpha1](https://github.com/Finschia/finschia-sdk/tree/v0.47.0-alpha1) -Current lbm-sdk version applied to finschia-kt/protobuf is [lbm-sdk v0.47.0-alpha1](https://github.com/line/lbm-sdk/tree/v0.47.0-alpha1) +Current finschia-sdk version applied to finschia-kt/protobuf is [finschia-sdk v0.47.0-alpha1](https://github.com/Finschia/finschia-sdk/tree/v0.47.0-alpha1) ## Build @@ -90,7 +90,7 @@ The former is using the tx wrapper, while the latter does not use the wrapper. ### 1. Run lbm-sdk simapp -Build with reference to [Quick Start build](https://github.com/line/lbm-sdk/tree/v0.47.0-alpha1#quick-start). +Build with reference to [Quick Start build](https://github.com/Finschia/finschia-sdk/tree/v0.47.0-alpha1#quick-start). Initialize and configure simapp. @@ -114,7 +114,7 @@ $ simd start --home ~/simapp ### 2. Replace hard-coded arguments To confirm it's possible to send transactions to the chain created above using finschia-kt, replace the following -three parts of the [without-tx-wrapper-example/src/main/kotlin/network/link/ln/v2/example/Client.kt](https://github.com/line/finschia-kt/blob/main/examples/without-tx-wrapper-example/src/main/kotlin/network/link/ln/v2/example/Client.kt). +three parts of the [without-tx-wrapper-example/src/main/kotlin/network/link/sdk/example/Client.kt](https://github.com/Finschia/finschia-kt/blob/main/examples/without-tx-wrapper-example/src/main/kotlin/network/link/sdk/example/Client.kt). 1. **Chain ID**: constant of the name `CHAIN_ID` in `ConcreteScenarios` ```go diff --git a/buildSrc/src/main/kotlin/network.finschia.ln.v2.kotlin-application-conventions.gradle.kts b/buildSrc/src/main/kotlin/network.finschia.sdk.kotlin-application-conventions.gradle.kts similarity index 83% rename from buildSrc/src/main/kotlin/network.finschia.ln.v2.kotlin-application-conventions.gradle.kts rename to buildSrc/src/main/kotlin/network.finschia.sdk.kotlin-application-conventions.gradle.kts index 0894d24..9b2d54a 100644 --- a/buildSrc/src/main/kotlin/network.finschia.ln.v2.kotlin-application-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/network.finschia.sdk.kotlin-application-conventions.gradle.kts @@ -4,7 +4,7 @@ plugins { // Apply the common convention plugin for shared build configuration between library and application projects. - id("network.finschia.ln.v2.kotlin-common-conventions") + id("network.finschia.sdk.kotlin-common-conventions") // Apply the application plugin to add support for building a CLI application in Java. application diff --git a/buildSrc/src/main/kotlin/network.finschia.ln.v2.kotlin-common-conventions.gradle.kts b/buildSrc/src/main/kotlin/network.finschia.sdk.kotlin-common-conventions.gradle.kts similarity index 100% rename from buildSrc/src/main/kotlin/network.finschia.ln.v2.kotlin-common-conventions.gradle.kts rename to buildSrc/src/main/kotlin/network.finschia.sdk.kotlin-common-conventions.gradle.kts diff --git a/buildSrc/src/main/kotlin/network.finschia.ln.v2.kotlin-library-conventions.gradle.kts b/buildSrc/src/main/kotlin/network.finschia.sdk.kotlin-library-conventions.gradle.kts similarity index 82% rename from buildSrc/src/main/kotlin/network.finschia.ln.v2.kotlin-library-conventions.gradle.kts rename to buildSrc/src/main/kotlin/network.finschia.sdk.kotlin-library-conventions.gradle.kts index 61e7903..3e297aa 100644 --- a/buildSrc/src/main/kotlin/network.finschia.ln.v2.kotlin-library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/network.finschia.sdk.kotlin-library-conventions.gradle.kts @@ -4,7 +4,7 @@ plugins { // Apply the common convention plugin for shared build configuration between library and application projects. - id("network.finschia.ln.v2.kotlin-common-conventions") + id("network.finschia.sdk.kotlin-common-conventions") // Apply the java-library plugin for API and implementation separation. `java-library` diff --git a/crypto/build.gradle.kts b/crypto/build.gradle.kts index a8fb544..226526d 100644 --- a/crypto/build.gradle.kts +++ b/crypto/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("network.finschia.ln.v2.kotlin-library-conventions") + id("network.finschia.sdk.kotlin-library-conventions") } val guavaVersion = "28.1-jre" diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/Amino.java b/crypto/src/main/java/network/finschia/sdk/crypto/Amino.java similarity index 98% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/Amino.java rename to crypto/src/main/java/network/finschia/sdk/crypto/Amino.java index 7df98c5..6b3f470 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/Amino.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/Amino.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import java.util.Arrays; diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/Bech32Utils.java b/crypto/src/main/java/network/finschia/sdk/crypto/Bech32Utils.java similarity index 97% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/Bech32Utils.java rename to crypto/src/main/java/network/finschia/sdk/crypto/Bech32Utils.java index 854d0cc..d0b41db 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/Bech32Utils.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/Bech32Utils.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import java.io.ByteArrayOutputStream; diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/Bip44WalletUtils.java b/crypto/src/main/java/network/finschia/sdk/crypto/Bip44WalletUtils.java similarity index 81% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/Bip44WalletUtils.java rename to crypto/src/main/java/network/finschia/sdk/crypto/Bip44WalletUtils.java index 68584eb..7ba3414 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/Bip44WalletUtils.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/Bip44WalletUtils.java @@ -1,7 +1,5 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; -import static network.finschia.ln.v2.crypto.LinkKeys.PRIVATE_KEY_SIZE; -import static network.finschia.ln.v2.crypto.SecureRandomUtils.secureRandom; import static org.web3j.crypto.Bip32ECKeyPair.HARDENED_BIT; import org.bouncycastle.util.BigIntegers; @@ -19,7 +17,7 @@ private Bip44WalletUtils() {} public static String generateMnemonic() { final byte[] initialEntropy = new byte[16]; - secureRandom().nextBytes(initialEntropy); + SecureRandomUtils.secureRandom().nextBytes(initialEntropy); return MnemonicUtils.generateMnemonic(initialEntropy); } @@ -27,7 +25,7 @@ public static byte[] generatePrivateKey(String mnemonic, int accountNumber, int final byte[] seed = MnemonicUtils.generateSeed(mnemonic, null); final Bip32ECKeyPair masterKeypair = Bip32ECKeyPair.generateKeyPair(seed); final Bip32ECKeyPair bip44Keypair = generateBip44KeyPair(masterKeypair, accountNumber, index); - return BigIntegers.asUnsignedByteArray(PRIVATE_KEY_SIZE, bip44Keypair.getPrivateKey()); + return BigIntegers.asUnsignedByteArray(LinkKeys.PRIVATE_KEY_SIZE, bip44Keypair.getPrivateKey()); } static Bip32ECKeyPair generateBip44KeyPair(Bip32ECKeyPair master, int accountNumber, int index) { diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/ECDSASignature.java b/crypto/src/main/java/network/finschia/sdk/crypto/ECDSASignature.java similarity index 99% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/ECDSASignature.java rename to crypto/src/main/java/network/finschia/sdk/crypto/ECDSASignature.java index 132aa9c..8f88d34 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/ECDSASignature.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/ECDSASignature.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import java.math.BigInteger; import java.nio.ByteBuffer; diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/KeyStore.java b/crypto/src/main/java/network/finschia/sdk/crypto/KeyStore.java similarity index 95% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/KeyStore.java rename to crypto/src/main/java/network/finschia/sdk/crypto/KeyStore.java index 86c4dab..ebc3f65 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/KeyStore.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/KeyStore.java @@ -1,8 +1,8 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; -import static network.finschia.ln.v2.crypto.Amino.addAminoPrefix; -import static network.finschia.ln.v2.crypto.Amino.removeAminoPrefix; -import static network.finschia.ln.v2.crypto.SecureRandomUtils.secureRandom; +import static network.finschia.sdk.crypto.Amino.addAminoPrefix; +import static network.finschia.sdk.crypto.Amino.removeAminoPrefix; +import static network.finschia.sdk.crypto.SecureRandomUtils.secureRandom; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/LinkKeys.java b/crypto/src/main/java/network/finschia/sdk/crypto/LinkKeys.java similarity index 95% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/LinkKeys.java rename to crypto/src/main/java/network/finschia/sdk/crypto/LinkKeys.java index 5861fc4..e0831c3 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/LinkKeys.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/LinkKeys.java @@ -1,6 +1,6 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; -import static network.finschia.ln.v2.crypto.SecureRandomUtils.secureRandom; +import static network.finschia.sdk.crypto.SecureRandomUtils.secureRandom; import java.math.BigInteger; import java.security.InvalidAlgorithmParameterException; diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/SecureRandomUtils.java b/crypto/src/main/java/network/finschia/sdk/crypto/SecureRandomUtils.java similarity index 97% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/SecureRandomUtils.java rename to crypto/src/main/java/network/finschia/sdk/crypto/SecureRandomUtils.java index 2643c06..5fd6925 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/SecureRandomUtils.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/SecureRandomUtils.java @@ -10,7 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import java.security.SecureRandom; diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/TendermintArmoredOutputStream.java b/crypto/src/main/java/network/finschia/sdk/crypto/TendermintArmoredOutputStream.java similarity index 99% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/TendermintArmoredOutputStream.java rename to crypto/src/main/java/network/finschia/sdk/crypto/TendermintArmoredOutputStream.java index 4050c4e..61647ae 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/TendermintArmoredOutputStream.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/TendermintArmoredOutputStream.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import java.io.IOException; import java.io.OutputStream; diff --git a/crypto/src/main/java/network/finschia/ln/v2/crypto/Xsalsa20Symmetric.java b/crypto/src/main/java/network/finschia/sdk/crypto/Xsalsa20Symmetric.java similarity index 97% rename from crypto/src/main/java/network/finschia/ln/v2/crypto/Xsalsa20Symmetric.java rename to crypto/src/main/java/network/finschia/sdk/crypto/Xsalsa20Symmetric.java index c233241..a691121 100644 --- a/crypto/src/main/java/network/finschia/ln/v2/crypto/Xsalsa20Symmetric.java +++ b/crypto/src/main/java/network/finschia/sdk/crypto/Xsalsa20Symmetric.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import java.util.Arrays; import java.util.Optional; diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Account.kt b/crypto/src/main/kotlin/network/finschia/sdk/account/Account.kt similarity index 96% rename from crypto/src/main/kotlin/network/finschia/ln/v2/account/Account.kt rename to crypto/src/main/kotlin/network/finschia/sdk/account/Account.kt index b9908b1..fe1888c 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Account.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/account/Account.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package network.finschia.ln.v2.account +package network.finschia.sdk.account /** * Account interface represents the account information such as address, account number, sequence number diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Address.kt b/crypto/src/main/kotlin/network/finschia/sdk/account/Address.kt similarity index 93% rename from crypto/src/main/kotlin/network/finschia/ln/v2/account/Address.kt rename to crypto/src/main/kotlin/network/finschia/sdk/account/Address.kt index 3713360..ecff90b 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Address.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/account/Address.kt @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package network.finschia.ln.v2.account +package network.finschia.sdk.account -import network.finschia.ln.v2.account.Type.ACCOUNT -import network.finschia.ln.v2.account.Type.Companion.DEFAULT_BECH32_HRP_PREFIX -import network.finschia.ln.v2.account.Type.Companion.toHrpPrefix -import network.finschia.ln.v2.crypto.Bech32Utils +import network.finschia.sdk.account.Type.ACCOUNT +import network.finschia.sdk.account.Type.Companion.DEFAULT_BECH32_HRP_PREFIX +import network.finschia.sdk.account.Type.Companion.toHrpPrefix +import network.finschia.sdk.crypto.Bech32Utils import org.bitcoinj.core.Bech32 import org.bouncycastle.jcajce.provider.digest.RIPEMD160 import org.bouncycastle.jcajce.provider.digest.SHA256 @@ -118,7 +118,8 @@ class Address private constructor(val type: Type, val body: ByteArray) { */ @JvmStatic @JvmName("of") - operator fun invoke(body: ByteArray): Address = invoke(ACCOUNT, body) + operator fun invoke(body: ByteArray): Address = + invoke(ACCOUNT, body) /** * initiates an address from [bech32Address] diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Coin.kt b/crypto/src/main/kotlin/network/finschia/sdk/account/Coin.kt similarity index 96% rename from crypto/src/main/kotlin/network/finschia/ln/v2/account/Coin.kt rename to crypto/src/main/kotlin/network/finschia/sdk/account/Coin.kt index ed1408f..0c21105 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Coin.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/account/Coin.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package network.finschia.ln.v2.account +package network.finschia.sdk.account import java.math.BigInteger diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/account/HDWallet.kt b/crypto/src/main/kotlin/network/finschia/sdk/account/HDWallet.kt similarity index 90% rename from crypto/src/main/kotlin/network/finschia/ln/v2/account/HDWallet.kt rename to crypto/src/main/kotlin/network/finschia/sdk/account/HDWallet.kt index 96cd4b9..6f4d6a6 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/account/HDWallet.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/account/HDWallet.kt @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package network.finschia.ln.v2.account +package network.finschia.sdk.account -import network.finschia.ln.v2.crypto.Bip44WalletUtils.generateMnemonic -import network.finschia.ln.v2.crypto.Bip44WalletUtils.generatePrivateKey +import network.finschia.sdk.crypto.Bip44WalletUtils.generateMnemonic +import network.finschia.sdk.crypto.Bip44WalletUtils.generatePrivateKey import java.security.InvalidAlgorithmParameterException import java.security.NoSuchAlgorithmException import java.security.NoSuchProviderException diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/account/KeyWallet.kt b/crypto/src/main/kotlin/network/finschia/sdk/account/KeyWallet.kt similarity index 92% rename from crypto/src/main/kotlin/network/finschia/ln/v2/account/KeyWallet.kt rename to crypto/src/main/kotlin/network/finschia/sdk/account/KeyWallet.kt index 357a4c9..d76af1c 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/account/KeyWallet.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/account/KeyWallet.kt @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package network.finschia.ln.v2.account +package network.finschia.sdk.account -import network.finschia.ln.v2.account.PubKey.Companion.createFromPrivateKey -import network.finschia.ln.v2.crypto.ECDSASignature -import network.finschia.ln.v2.crypto.KeyStore -import network.finschia.ln.v2.crypto.LinkKeys +import network.finschia.sdk.account.PubKey.Companion.createFromPrivateKey +import network.finschia.sdk.crypto.ECDSASignature +import network.finschia.sdk.crypto.KeyStore +import network.finschia.sdk.crypto.LinkKeys import java.io.InputStream import java.io.OutputStream import java.io.Reader diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/account/PubKey.kt b/crypto/src/main/kotlin/network/finschia/sdk/account/PubKey.kt similarity index 93% rename from crypto/src/main/kotlin/network/finschia/ln/v2/account/PubKey.kt rename to crypto/src/main/kotlin/network/finschia/sdk/account/PubKey.kt index 37a95d9..6af015c 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/account/PubKey.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/account/PubKey.kt @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package network.finschia.ln.v2.account - -import network.finschia.ln.v2.account.Type.Companion.DEFAULT_BECH32_HRP_PREFIX -import network.finschia.ln.v2.account.Type.Companion.toHrpPrefix -import network.finschia.ln.v2.common.TypedValue -import network.finschia.ln.v2.crypto.Amino -import network.finschia.ln.v2.crypto.Bech32Utils -import network.finschia.ln.v2.crypto.LinkKeys +package network.finschia.sdk.account + +import network.finschia.sdk.account.Type.Companion.DEFAULT_BECH32_HRP_PREFIX +import network.finschia.sdk.account.Type.Companion.toHrpPrefix +import network.finschia.sdk.common.TypedValue +import network.finschia.sdk.crypto.Amino +import network.finschia.sdk.crypto.Bech32Utils +import network.finschia.sdk.crypto.LinkKeys import org.bitcoinj.core.Bech32 import org.bouncycastle.util.encoders.Hex diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Type.kt b/crypto/src/main/kotlin/network/finschia/sdk/account/Type.kt similarity index 97% rename from crypto/src/main/kotlin/network/finschia/ln/v2/account/Type.kt rename to crypto/src/main/kotlin/network/finschia/sdk/account/Type.kt index eb9d2ff..e25f2e3 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Type.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/account/Type.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.account +package network.finschia.sdk.account /** * Defines the types of Addresses and PubKeys diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Wallet.kt b/crypto/src/main/kotlin/network/finschia/sdk/account/Wallet.kt similarity index 96% rename from crypto/src/main/kotlin/network/finschia/ln/v2/account/Wallet.kt rename to crypto/src/main/kotlin/network/finschia/sdk/account/Wallet.kt index 2a4c196..0484dba 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/account/Wallet.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/account/Wallet.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package network.finschia.ln.v2.account +package network.finschia.sdk.account /** * Wallet class signs the message using own keys diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/common/CommonMapperModule.kt b/crypto/src/main/kotlin/network/finschia/sdk/common/CommonMapperModule.kt similarity index 95% rename from crypto/src/main/kotlin/network/finschia/ln/v2/common/CommonMapperModule.kt rename to crypto/src/main/kotlin/network/finschia/sdk/common/CommonMapperModule.kt index a8c930b..6c2d774 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/common/CommonMapperModule.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/common/CommonMapperModule.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package network.finschia.ln.v2.common +package network.finschia.sdk.common import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.JsonSerializer @@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.PropertyNamingStrategy import com.fasterxml.jackson.databind.SerializerProvider import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml.jackson.module.kotlin.KotlinModule -import network.finschia.ln.v2.account.Type +import network.finschia.sdk.account.Type /** * Predefined basic JSON serializing and deserializing rules for Jackson-databind diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/common/Converter.kt b/crypto/src/main/kotlin/network/finschia/sdk/common/Converter.kt similarity index 95% rename from crypto/src/main/kotlin/network/finschia/ln/v2/common/Converter.kt rename to crypto/src/main/kotlin/network/finschia/sdk/common/Converter.kt index 698007e..225ba89 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/common/Converter.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/common/Converter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package network.finschia.ln.v2.common +package network.finschia.sdk.common /** * An interface of converter diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/common/Hash.kt b/crypto/src/main/kotlin/network/finschia/sdk/common/Hash.kt similarity index 97% rename from crypto/src/main/kotlin/network/finschia/ln/v2/common/Hash.kt rename to crypto/src/main/kotlin/network/finschia/sdk/common/Hash.kt index c6ff38a..20309ca 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/common/Hash.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/common/Hash.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package network.finschia.ln.v2.common +package network.finschia.sdk.common import org.bouncycastle.util.encoders.Hex diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/common/KeyValue.kt b/crypto/src/main/kotlin/network/finschia/sdk/common/KeyValue.kt similarity index 95% rename from crypto/src/main/kotlin/network/finschia/ln/v2/common/KeyValue.kt rename to crypto/src/main/kotlin/network/finschia/sdk/common/KeyValue.kt index efc08e7..52ecec6 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/common/KeyValue.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/common/KeyValue.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package network.finschia.ln.v2.common +package network.finschia.sdk.common /** * Container to ease passing around a key and value pair diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/common/ToStringConverters.kt b/crypto/src/main/kotlin/network/finschia/sdk/common/ToStringConverters.kt similarity index 94% rename from crypto/src/main/kotlin/network/finschia/ln/v2/common/ToStringConverters.kt rename to crypto/src/main/kotlin/network/finschia/sdk/common/ToStringConverters.kt index 04de1e9..6250b36 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/common/ToStringConverters.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/common/ToStringConverters.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package network.finschia.ln.v2.common +package network.finschia.sdk.common -import network.finschia.ln.v2.account.Address -import network.finschia.ln.v2.account.PubKey -import network.finschia.ln.v2.account.Type.Companion.DEFAULT_BECH32_HRP_PREFIX +import network.finschia.sdk.account.Address +import network.finschia.sdk.account.PubKey +import network.finschia.sdk.account.Type.Companion.DEFAULT_BECH32_HRP_PREFIX import java.lang.reflect.Type import java.math.BigInteger diff --git a/crypto/src/main/kotlin/network/finschia/ln/v2/common/TypedValue.kt b/crypto/src/main/kotlin/network/finschia/sdk/common/TypedValue.kt similarity index 98% rename from crypto/src/main/kotlin/network/finschia/ln/v2/common/TypedValue.kt rename to crypto/src/main/kotlin/network/finschia/sdk/common/TypedValue.kt index 9243307..38133ae 100644 --- a/crypto/src/main/kotlin/network/finschia/ln/v2/common/TypedValue.kt +++ b/crypto/src/main/kotlin/network/finschia/sdk/common/TypedValue.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package network.finschia.ln.v2.common +package network.finschia.sdk.common /** * Wraps an object with type to recognize struct to unmarshal. diff --git a/crypto/src/test/java/network/finschia/ln/v2/account/AddressTest.java b/crypto/src/test/java/network/finschia/sdk/account/AddressTest.java similarity index 99% rename from crypto/src/test/java/network/finschia/ln/v2/account/AddressTest.java rename to crypto/src/test/java/network/finschia/sdk/account/AddressTest.java index 6e56f48..8ea2f79 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/account/AddressTest.java +++ b/crypto/src/test/java/network/finschia/sdk/account/AddressTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.account; +package network.finschia.sdk.account; import static com.google.common.truth.Truth.assertThat; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; diff --git a/crypto/src/test/java/network/finschia/ln/v2/account/HDWalletTest.java b/crypto/src/test/java/network/finschia/sdk/account/HDWalletTest.java similarity index 99% rename from crypto/src/test/java/network/finschia/ln/v2/account/HDWalletTest.java rename to crypto/src/test/java/network/finschia/sdk/account/HDWalletTest.java index a87272c..14d602e 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/account/HDWalletTest.java +++ b/crypto/src/test/java/network/finschia/sdk/account/HDWalletTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.account; +package network.finschia.sdk.account; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/crypto/src/test/java/network/finschia/ln/v2/account/KeyWalletTest.java b/crypto/src/test/java/network/finschia/sdk/account/KeyWalletTest.java similarity index 99% rename from crypto/src/test/java/network/finschia/ln/v2/account/KeyWalletTest.java rename to crypto/src/test/java/network/finschia/sdk/account/KeyWalletTest.java index 56d62c4..f583072 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/account/KeyWalletTest.java +++ b/crypto/src/test/java/network/finschia/sdk/account/KeyWalletTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.account; +package network.finschia.sdk.account; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/crypto/src/test/java/network/finschia/ln/v2/account/PubKeyTest.java b/crypto/src/test/java/network/finschia/sdk/account/PubKeyTest.java similarity index 98% rename from crypto/src/test/java/network/finschia/ln/v2/account/PubKeyTest.java rename to crypto/src/test/java/network/finschia/sdk/account/PubKeyTest.java index 0f281cd..968ca9e 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/account/PubKeyTest.java +++ b/crypto/src/test/java/network/finschia/sdk/account/PubKeyTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.account; +package network.finschia.sdk.account; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/crypto/src/test/java/network/finschia/ln/v2/common/CommonObjectModuleTest.java b/crypto/src/test/java/network/finschia/sdk/common/CommonObjectModuleTest.java similarity index 92% rename from crypto/src/test/java/network/finschia/ln/v2/common/CommonObjectModuleTest.java rename to crypto/src/test/java/network/finschia/sdk/common/CommonObjectModuleTest.java index 480cbcf..dcb3090 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/common/CommonObjectModuleTest.java +++ b/crypto/src/test/java/network/finschia/sdk/common/CommonObjectModuleTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.common; +package network.finschia.sdk.common; import static com.google.common.truth.Truth.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -8,14 +8,17 @@ import java.math.BigInteger; import java.security.SecureRandom; +import network.finschia.sdk.account.Address; +import network.finschia.sdk.account.Coin; +import network.finschia.sdk.account.PubKey; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import com.fasterxml.jackson.databind.ObjectMapper; -import network.finschia.ln.v2.account.Address; -import network.finschia.ln.v2.account.Coin; -import network.finschia.ln.v2.account.PubKey; +import network.finschia.sdk.account.Address; +import network.finschia.sdk.account.Coin; +import network.finschia.sdk.account.PubKey; @SuppressWarnings("unused") class CommonObjectModuleTest { diff --git a/crypto/src/test/java/network/finschia/ln/v2/common/TypedValueTest.java b/crypto/src/test/java/network/finschia/sdk/common/TypedValueTest.java similarity index 99% rename from crypto/src/test/java/network/finschia/ln/v2/common/TypedValueTest.java rename to crypto/src/test/java/network/finschia/sdk/common/TypedValueTest.java index 95e499c..fce5e30 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/common/TypedValueTest.java +++ b/crypto/src/test/java/network/finschia/sdk/common/TypedValueTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package network.finschia.ln.v2.common; +package network.finschia.sdk.common; import static com.google.common.truth.Truth.assertThat; diff --git a/crypto/src/test/java/network/finschia/ln/v2/crypto/AminoTest.java b/crypto/src/test/java/network/finschia/sdk/crypto/AminoTest.java similarity index 98% rename from crypto/src/test/java/network/finschia/ln/v2/crypto/AminoTest.java rename to crypto/src/test/java/network/finschia/sdk/crypto/AminoTest.java index 4ff20fa..96b37ad 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/crypto/AminoTest.java +++ b/crypto/src/test/java/network/finschia/sdk/crypto/AminoTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/crypto/src/test/java/network/finschia/ln/v2/crypto/ECDSASignatureTest.java b/crypto/src/test/java/network/finschia/sdk/crypto/ECDSASignatureTest.java similarity index 86% rename from crypto/src/test/java/network/finschia/ln/v2/crypto/ECDSASignatureTest.java rename to crypto/src/test/java/network/finschia/sdk/crypto/ECDSASignatureTest.java index 7dd3ca8..41a0602 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/crypto/ECDSASignatureTest.java +++ b/crypto/src/test/java/network/finschia/sdk/crypto/ECDSASignatureTest.java @@ -10,12 +10,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import static org.junit.jupiter.api.Assertions.assertEquals; -import static network.finschia.ln.v2.crypto.ECDSASignature.publicFromPoint; -import static network.finschia.ln.v2.crypto.ECDSASignature.publicKeyFromPrivate; -import static network.finschia.ln.v2.crypto.ECDSASignature.publicPointFromPrivate; +import static network.finschia.sdk.crypto.ECDSASignature.publicFromPoint; +import static network.finschia.sdk.crypto.ECDSASignature.publicKeyFromPrivate; +import static network.finschia.sdk.crypto.ECDSASignature.publicPointFromPrivate; import java.math.BigInteger; import java.util.Base64; @@ -23,8 +23,6 @@ import org.bouncycastle.math.ec.ECPoint; import org.junit.jupiter.api.Test; -import network.finschia.ln.v2.crypto.ECDSASignature; - public class ECDSASignatureTest { public static final String PRIVATE_KEY_STRING = "a392604efc2fad9c0b3da43b5f698a2e3f270f170d859912be0d54742275c5f6"; diff --git a/crypto/src/test/java/network/finschia/ln/v2/crypto/KeyStoreTest.java b/crypto/src/test/java/network/finschia/sdk/crypto/KeyStoreTest.java similarity index 99% rename from crypto/src/test/java/network/finschia/ln/v2/crypto/KeyStoreTest.java rename to crypto/src/test/java/network/finschia/sdk/crypto/KeyStoreTest.java index c5f3748..27d55dd 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/crypto/KeyStoreTest.java +++ b/crypto/src/test/java/network/finschia/sdk/crypto/KeyStoreTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/crypto/src/test/java/network/finschia/ln/v2/crypto/LinkKeysTest.java b/crypto/src/test/java/network/finschia/sdk/crypto/LinkKeysTest.java similarity index 95% rename from crypto/src/test/java/network/finschia/ln/v2/crypto/LinkKeysTest.java rename to crypto/src/test/java/network/finschia/sdk/crypto/LinkKeysTest.java index 5f452e7..ad291d5 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/crypto/LinkKeysTest.java +++ b/crypto/src/test/java/network/finschia/sdk/crypto/LinkKeysTest.java @@ -10,7 +10,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -19,8 +19,6 @@ import org.junit.jupiter.api.Test; -import network.finschia.ln.v2.crypto.LinkKeys; - public class LinkKeysTest { @Test diff --git a/crypto/src/test/java/network/finschia/ln/v2/crypto/SecureRandomUtilsTest.java b/crypto/src/test/java/network/finschia/sdk/crypto/SecureRandomUtilsTest.java similarity index 82% rename from crypto/src/test/java/network/finschia/ln/v2/crypto/SecureRandomUtilsTest.java rename to crypto/src/test/java/network/finschia/sdk/crypto/SecureRandomUtilsTest.java index bcf7587..022d561 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/crypto/SecureRandomUtilsTest.java +++ b/crypto/src/test/java/network/finschia/sdk/crypto/SecureRandomUtilsTest.java @@ -10,10 +10,10 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; -import static network.finschia.ln.v2.crypto.SecureRandomUtils.isAndroidRuntime; -import static network.finschia.ln.v2.crypto.SecureRandomUtils.secureRandom; +import static network.finschia.sdk.crypto.SecureRandomUtils.isAndroidRuntime; +import static network.finschia.sdk.crypto.SecureRandomUtils.secureRandom; import static org.junit.jupiter.api.Assertions.assertFalse; import org.junit.jupiter.api.Test; diff --git a/crypto/src/test/java/network/finschia/ln/v2/crypto/TendermintArmoredOutputStreamTest.java b/crypto/src/test/java/network/finschia/sdk/crypto/TendermintArmoredOutputStreamTest.java similarity index 96% rename from crypto/src/test/java/network/finschia/ln/v2/crypto/TendermintArmoredOutputStreamTest.java rename to crypto/src/test/java/network/finschia/sdk/crypto/TendermintArmoredOutputStreamTest.java index a3aa5a2..cf61ae2 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/crypto/TendermintArmoredOutputStreamTest.java +++ b/crypto/src/test/java/network/finschia/sdk/crypto/TendermintArmoredOutputStreamTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/crypto/src/test/java/network/finschia/ln/v2/crypto/Xsalsa20SymmetricTest.java b/crypto/src/test/java/network/finschia/sdk/crypto/Xsalsa20SymmetricTest.java similarity index 97% rename from crypto/src/test/java/network/finschia/ln/v2/crypto/Xsalsa20SymmetricTest.java rename to crypto/src/test/java/network/finschia/sdk/crypto/Xsalsa20SymmetricTest.java index a3063c3..83a8ae8 100644 --- a/crypto/src/test/java/network/finschia/ln/v2/crypto/Xsalsa20SymmetricTest.java +++ b/crypto/src/test/java/network/finschia/sdk/crypto/Xsalsa20SymmetricTest.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.crypto; +package network.finschia.sdk.crypto; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/crypto/src/test/kotlin/network/finschia/ln/v2/account/TypeTest.kt b/crypto/src/test/kotlin/network/finschia/sdk/account/TypeTest.kt similarity index 73% rename from crypto/src/test/kotlin/network/finschia/ln/v2/account/TypeTest.kt rename to crypto/src/test/kotlin/network/finschia/sdk/account/TypeTest.kt index ceba47a..49f4703 100644 --- a/crypto/src/test/kotlin/network/finschia/ln/v2/account/TypeTest.kt +++ b/crypto/src/test/kotlin/network/finschia/sdk/account/TypeTest.kt @@ -1,10 +1,10 @@ -package network.finschia.ln.v2.account +package network.finschia.sdk.account import com.google.common.truth.Truth.assertThat -import network.finschia.ln.v2.account.Type.ACCOUNT -import network.finschia.ln.v2.account.Type.Companion.toHrpPrefix -import network.finschia.ln.v2.account.Type.VALIDATOR_CONSENSUS -import network.finschia.ln.v2.account.Type.VALIDATOR_OPERATOR +import network.finschia.sdk.account.Type.ACCOUNT +import network.finschia.sdk.account.Type.Companion.toHrpPrefix +import network.finschia.sdk.account.Type.VALIDATOR_CONSENSUS +import network.finschia.sdk.account.Type.VALIDATOR_OPERATOR import org.junit.jupiter.api.Assertions.assertThrows import org.junit.jupiter.api.Test diff --git a/examples/multisig-example/build.gradle.kts b/examples/multisig-example/build.gradle.kts index 365acfa..a52388e 100644 --- a/examples/multisig-example/build.gradle.kts +++ b/examples/multisig-example/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("network.finschia.ln.v2.kotlin-application-conventions") + id("network.finschia.sdk.kotlin-application-conventions") kotlin("plugin.serialization") version "1.5.30" } @@ -16,5 +16,5 @@ dependencies { } application { - mainClass.set("network.finschia.ln.v2.example.ClientKt") + mainClass.set("network.finschia.sdk.example.ClientKt") } diff --git a/examples/multisig-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt b/examples/multisig-example/src/main/kotlin/network/finschia/sdk/example/Client.kt similarity index 97% rename from examples/multisig-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt rename to examples/multisig-example/src/main/kotlin/network/finschia/sdk/example/Client.kt index b249f73..f1350e4 100644 --- a/examples/multisig-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt +++ b/examples/multisig-example/src/main/kotlin/network/finschia/sdk/example/Client.kt @@ -1,15 +1,15 @@ -package network.finschia.ln.v2.example +package network.finschia.sdk.example -import network.finschia.ln.v2.legacymultisig.* +import network.finschia.sdk.legacymultisig.* import com.google.protobuf.ByteString import io.grpc.ManagedChannel import io.grpc.ManagedChannelBuilder import java.io.Closeable import java.util.concurrent.TimeUnit import kotlinx.serialization.json.* -import network.finschia.ln.v2.account.Address -import network.finschia.ln.v2.account.HDWallet -import network.finschia.ln.v2.account.KeyWallet +import network.finschia.sdk.account.Address +import network.finschia.sdk.account.HDWallet +import network.finschia.sdk.account.KeyWallet import org.bouncycastle.jcajce.provider.digest.SHA256 class TxClient(private val channel: ManagedChannel) : Closeable { diff --git a/examples/query-example/build.gradle.kts b/examples/query-example/build.gradle.kts index 74fdd7c..dd8cede 100644 --- a/examples/query-example/build.gradle.kts +++ b/examples/query-example/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("network.finschia.ln.v2.kotlin-application-conventions") + id("network.finschia.sdk.kotlin-application-conventions") } dependencies { @@ -10,5 +10,5 @@ dependencies { } application { - mainClass.set("network.finschia.ln.v2.example.AccountQueryClient") + mainClass.set("network.finschia.sdk.example.AccountQueryClient") } diff --git a/examples/query-example/src/main/java/network/finschia/ln/v2/example/AccountQueryClient.java b/examples/query-example/src/main/java/network/finschia/sdk/example/AccountQueryClient.java similarity index 98% rename from examples/query-example/src/main/java/network/finschia/ln/v2/example/AccountQueryClient.java rename to examples/query-example/src/main/java/network/finschia/sdk/example/AccountQueryClient.java index c60a1bf..48191eb 100644 --- a/examples/query-example/src/main/java/network/finschia/ln/v2/example/AccountQueryClient.java +++ b/examples/query-example/src/main/java/network/finschia/sdk/example/AccountQueryClient.java @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.example; +package network.finschia.sdk.example; import cosmos.auth.v1beta1.QueryGrpc; import cosmos.auth.v1beta1.QueryOuterClass; diff --git a/examples/with-tx-wrapper-example/build.gradle.kts b/examples/with-tx-wrapper-example/build.gradle.kts index b60ddc8..25ea97d 100644 --- a/examples/with-tx-wrapper-example/build.gradle.kts +++ b/examples/with-tx-wrapper-example/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("network.finschia.ln.v2.kotlin-application-conventions") + id("network.finschia.sdk.kotlin-application-conventions") } dependencies { @@ -10,5 +10,5 @@ dependencies { } application { - mainClass.set("network.finschia.ln.v2.example.ClientKt") + mainClass.set("network.finschia.sdk.example.ClientKt") } diff --git a/examples/with-tx-wrapper-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt b/examples/with-tx-wrapper-example/src/main/kotlin/network/finschia/sdk/example/Client.kt similarity index 95% rename from examples/with-tx-wrapper-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt rename to examples/with-tx-wrapper-example/src/main/kotlin/network/finschia/sdk/example/Client.kt index 1f9d667..0fb347b 100644 --- a/examples/with-tx-wrapper-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt +++ b/examples/with-tx-wrapper-example/src/main/kotlin/network/finschia/sdk/example/Client.kt @@ -1,8 +1,8 @@ -package network.finschia.ln.v2.example +package network.finschia.sdk.example -import network.finschia.ln.v2.base.Tx +import network.finschia.sdk.base.Tx import cosmos.tx.v1beta1.ServiceOuterClass.BroadcastMode -import network.finschia.ln.v2.account.HDWallet +import network.finschia.sdk.account.HDWallet import io.grpc.ManagedChannel import io.grpc.ManagedChannelBuilder diff --git a/examples/without-tx-wrapper-example/build.gradle.kts b/examples/without-tx-wrapper-example/build.gradle.kts index 5d3f242..b0cf46e 100644 --- a/examples/without-tx-wrapper-example/build.gradle.kts +++ b/examples/without-tx-wrapper-example/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("network.finschia.ln.v2.kotlin-application-conventions") + id("network.finschia.sdk.kotlin-application-conventions") } val bitcoinjVersion = "0.15.6" @@ -13,5 +13,5 @@ dependencies { } application { - mainClass.set("network.finschia.ln.v2.example.ClientKt") + mainClass.set("network.finschia.sdk.example.ClientKt") } diff --git a/examples/without-tx-wrapper-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt b/examples/without-tx-wrapper-example/src/main/kotlin/network/finschia/sdk/example/Client.kt similarity index 97% rename from examples/without-tx-wrapper-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt rename to examples/without-tx-wrapper-example/src/main/kotlin/network/finschia/sdk/example/Client.kt index e15d0ee..d5fc4d2 100644 --- a/examples/without-tx-wrapper-example/src/main/kotlin/network/finschia/ln/v2/example/Client.kt +++ b/examples/without-tx-wrapper-example/src/main/kotlin/network/finschia/sdk/example/Client.kt @@ -1,13 +1,13 @@ -package network.finschia.ln.v2.example +package network.finschia.sdk.example import com.google.protobuf.Message import com.google.protobuf.Any import com.google.protobuf.ByteString import cosmos.tx.v1beta1.ServiceOuterClass.BroadcastMode -import network.finschia.ln.v2.account.HDWallet -import network.finschia.ln.v2.account.KeyWallet -import network.finschia.ln.v2.account.Address +import network.finschia.sdk.account.HDWallet +import network.finschia.sdk.account.KeyWallet +import network.finschia.sdk.account.Address import io.grpc.ManagedChannel import io.grpc.ManagedChannelBuilder diff --git a/protobuf/build.gradle.kts b/protobuf/build.gradle.kts index e83a63e..e8a1fca 100644 --- a/protobuf/build.gradle.kts +++ b/protobuf/build.gradle.kts @@ -5,7 +5,7 @@ import com.google.protobuf.gradle.id import com.google.protobuf.gradle.generateProtoTasks plugins { - id("network.finschia.ln.v2.kotlin-library-conventions") + id("network.finschia.sdk.kotlin-library-conventions") id("com.google.protobuf") id("distribution") } diff --git a/tx/build.gradle.kts b/tx/build.gradle.kts index fa79212..80c5c17 100644 --- a/tx/build.gradle.kts +++ b/tx/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("network.finschia.ln.v2.kotlin-library-conventions") + id("network.finschia.sdk.kotlin-library-conventions") kotlin("plugin.serialization") version "1.5.30" } diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/base/Tx.kt b/tx/src/main/kotlin/network/finschia/sdk/base/Tx.kt similarity index 96% rename from tx/src/main/kotlin/network/finschia/ln/v2/base/Tx.kt rename to tx/src/main/kotlin/network/finschia/sdk/base/Tx.kt index 6ffe6d1..b5540e7 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/base/Tx.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/base/Tx.kt @@ -1,7 +1,7 @@ -package network.finschia.ln.v2.base +package network.finschia.sdk.base -import network.finschia.ln.v2.account.Wallet -import network.finschia.ln.v2.account.KeyWallet +import network.finschia.sdk.account.Wallet +import network.finschia.sdk.account.KeyWallet import cosmos.crypto.secp256k1.Keys.PubKey import cosmos.tx.signing.v1beta1.Signing.SignMode diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Address.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Address.kt similarity index 95% rename from tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Address.kt rename to tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Address.kt index 44bb195..ca67c38 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Address.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Address.kt @@ -1,6 +1,6 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig -import network.finschia.ln.v2.crypto.Bech32Utils +import network.finschia.sdk.crypto.Bech32Utils import org.bitcoinj.core.Bech32 import org.bouncycastle.jcajce.provider.digest.RIPEMD160 import org.bouncycastle.jcajce.provider.digest.SHA256 diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Coin.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Coin.kt similarity index 88% rename from tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Coin.kt rename to tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Coin.kt index 7c9412c..b29c302 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Coin.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Coin.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Encoding.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Encoding.kt similarity index 98% rename from tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Encoding.kt rename to tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Encoding.kt index 2cbe613..25081de 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Encoding.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Encoding.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import java.util.Base64 diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Hex.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Hex.kt similarity index 94% rename from tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Hex.kt rename to tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Hex.kt index a1ead4f..f34aa2e 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Hex.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Hex.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig /** * Implement with reference to diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Multisig.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisig.kt similarity index 97% rename from tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Multisig.kt rename to tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisig.kt index bfec835..b50c0b2 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Multisig.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisig.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig /** * Implement with reference to diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Multisignature.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisignature.kt similarity index 98% rename from tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Multisignature.kt rename to tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisignature.kt index ae93d89..6f01c7d 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Multisignature.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisignature.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import com.google.protobuf.ByteString import org.bitcoinj.core.Bech32 diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Pubkey.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Pubkey.kt similarity index 95% rename from tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Pubkey.kt rename to tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Pubkey.kt index 79c7734..0374f9e 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/Pubkey.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Pubkey.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig /** * Implement with reference to diff --git a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/SignDoc.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/SignDoc.kt similarity index 97% rename from tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/SignDoc.kt rename to tx/src/main/kotlin/network/finschia/sdk/legacymultisig/SignDoc.kt index 8056a45..642fc78 100644 --- a/tx/src/main/kotlin/network/finschia/ln/v2/legacymultisig/SignDoc.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/SignDoc.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/base/TxTest.kt b/tx/src/test/kotlin/network/finschia/sdk/base/TxTest.kt similarity index 96% rename from tx/src/test/kotlin/network/finschia/ln/v2/base/TxTest.kt rename to tx/src/test/kotlin/network/finschia/sdk/base/TxTest.kt index 082e006..15ece90 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/base/TxTest.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/base/TxTest.kt @@ -1,6 +1,6 @@ -package network.finschia.ln.v2.base +package network.finschia.sdk.base -import network.finschia.ln.v2.account.HDWallet +import network.finschia.sdk.account.HDWallet import org.junit.jupiter.api.Test import org.junit.jupiter.api.Assertions.* diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/AddressTest.kt b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/AddressTest.kt similarity index 97% rename from tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/AddressTest.kt rename to tx/src/test/kotlin/network/finschia/sdk/legacymultisig/AddressTest.kt index 58ff9a5..095ebeb 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/AddressTest.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/AddressTest.kt @@ -1,6 +1,6 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig -import network.finschia.ln.v2.crypto.Bech32Utils +import network.finschia.sdk.crypto.Bech32Utils import org.bitcoinj.core.Bech32 import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/EncodingTest.kt b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/EncodingTest.kt similarity index 97% rename from tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/EncodingTest.kt rename to tx/src/test/kotlin/network/finschia/sdk/legacymultisig/EncodingTest.kt index 046d0b8..55d8ae1 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/EncodingTest.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/EncodingTest.kt @@ -1,6 +1,6 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig -import network.finschia.ln.v2.crypto.Bech32Utils +import network.finschia.sdk.crypto.Bech32Utils import org.bitcoinj.core.Bech32 import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/HexTest.kt b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/HexTest.kt similarity index 97% rename from tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/HexTest.kt rename to tx/src/test/kotlin/network/finschia/sdk/legacymultisig/HexTest.kt index ec3328d..b39b4c9 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/HexTest.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/HexTest.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/MultisigTest.kt b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/MultisigTest.kt similarity index 99% rename from tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/MultisigTest.kt rename to tx/src/test/kotlin/network/finschia/sdk/legacymultisig/MultisigTest.kt index fcda44b..150bded 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/MultisigTest.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/MultisigTest.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/MultisignatureTest.kt b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/MultisignatureTest.kt similarity index 99% rename from tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/MultisignatureTest.kt rename to tx/src/test/kotlin/network/finschia/sdk/legacymultisig/MultisignatureTest.kt index 7379df8..2ede880 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/MultisignatureTest.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/MultisignatureTest.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import cosmos.crypto.multisig.v1beta1.compactBitArray import com.google.protobuf.ByteString diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/PubkeyTest.kt b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/PubkeyTest.kt similarity index 98% rename from tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/PubkeyTest.kt rename to tx/src/test/kotlin/network/finschia/sdk/legacymultisig/PubkeyTest.kt index 92999b2..e94621a 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/PubkeyTest.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/PubkeyTest.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/SignDocTest.kt b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/SignDocTest.kt similarity index 99% rename from tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/SignDocTest.kt rename to tx/src/test/kotlin/network/finschia/sdk/legacymultisig/SignDocTest.kt index 1b811bd..42e36ae 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/SignDocTest.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/SignDocTest.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig import org.junit.jupiter.api.Test import kotlinx.serialization.* diff --git a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/TestUtils.kt b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/TestUtils.kt similarity index 98% rename from tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/TestUtils.kt rename to tx/src/test/kotlin/network/finschia/sdk/legacymultisig/TestUtils.kt index bccb2a3..fe98e91 100644 --- a/tx/src/test/kotlin/network/finschia/ln/v2/legacymultisig/TestUtils.kt +++ b/tx/src/test/kotlin/network/finschia/sdk/legacymultisig/TestUtils.kt @@ -1,4 +1,4 @@ -package network.finschia.ln.v2.legacymultisig +package network.finschia.sdk.legacymultisig /** * Implement with reference to From 42fd9487b3b83ddb1170cf44142f366e7f88f43c Mon Sep 17 00:00:00 2001 From: jaeseung-bae Date: Wed, 19 Apr 2023 13:40:17 +0900 Subject: [PATCH 2/4] chore: update changelog --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05638e8..c6c44e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Added ### Changed +* [\#6](https://github.com/Finschia/finschia-kt/pull/6) Rename package 'ln.v2' -> 'sdk' ### Deprecated @@ -52,9 +53,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Build, CI -* (build) [\#4](https://github.com/line/finschia-kt/pull/4) Add gradle `updateSubmodule` task and `checkoutSubModule` task to run `git submodule update --init --remote` with specific version before `build task` +* (build) [\#4](https://github.com/Finschia/finschia-kt/pull/4) Add gradle `updateSubmodule` task and `checkoutSubModule` task to run `git submodule update --init --remote` with specific version before `build task` ### Document Updates -[Unreleased]: https://github.com/line/finschia-kt/compare/8aa2005...HEAD +[Unreleased]: https://github.com/Finschia/finschia-kt/compare/8aa2005...HEAD From 5a0a1f81b3bd47140776e7c056f0bda92afaf14a Mon Sep 17 00:00:00 2001 From: jaeseung-bae Date: Wed, 19 Apr 2023 15:09:33 +0900 Subject: [PATCH 3/4] Removed submodule protobuf/repositories/lbm-sdk --- .gitmodules | 3 +++ protobuf/repositories/finschia-sdk | 1 + 2 files changed, 4 insertions(+) create mode 160000 protobuf/repositories/finschia-sdk diff --git a/.gitmodules b/.gitmodules index 2540ae6..59887d4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "ibc-go"] path = protobuf/repositories/ibc-go url = https://github.com/line/ibc-go.git +[submodule "protobuf/repositories/finschia-sdk"] + path = protobuf/repositories/finschia-sdk + url = https://github.com/Finschia/finschia-sdk diff --git a/protobuf/repositories/finschia-sdk b/protobuf/repositories/finschia-sdk new file mode 160000 index 0000000..4845096 --- /dev/null +++ b/protobuf/repositories/finschia-sdk @@ -0,0 +1 @@ +Subproject commit 484509608285663c4f83e752675a3c95e32a0b0a From bea7fe4606a50106e40190de4e00b40238cacb5e Mon Sep 17 00:00:00 2001 From: jaeseung-bae Date: Wed, 19 Apr 2023 15:35:57 +0900 Subject: [PATCH 4/4] chore: update submodule for finschia --- .gitmodules | 15 ++++++--------- README.md | 18 +++++++++--------- .../network/finschia/sdk/example/Client.kt | 2 +- protobuf/build.gradle.kts | 6 +++--- protobuf/repositories/finschia-sdk | 2 +- protobuf/repositories/lbm-sdk | 1 - .../finschia/sdk/legacymultisig/Multisig.kt | 2 +- 7 files changed, 21 insertions(+), 25 deletions(-) delete mode 160000 protobuf/repositories/lbm-sdk diff --git a/.gitmodules b/.gitmodules index 59887d4..7913d0f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,9 @@ -[submodule "lbm-sdk"] - path = protobuf/repositories/lbm-sdk - url = https://github.com/line/lbm-sdk.git -[submodule "wasmd"] - path = protobuf/repositories/wasmd - url = https://github.com/line/wasmd.git -[submodule "ibc-go"] - path = protobuf/repositories/ibc-go - url = https://github.com/line/ibc-go.git [submodule "protobuf/repositories/finschia-sdk"] path = protobuf/repositories/finschia-sdk url = https://github.com/Finschia/finschia-sdk +[submodule "protobuf/repositories/ibc-go"] + path = protobuf/repositories/ibc-go + url = https://github.com/Finschia/ibc-go +[submodule "protobuf/repositories/wasmd"] + path = protobuf/repositories/wasmd + url = https://github.com/Finschia/wasmd diff --git a/README.md b/README.md index fa3ad5e..ddb8c38 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ gRPC client library in kotlin for finschia (https://github.com/Finschia/finschia). -Requires [lbm-sdk v0.47.0-alpha1](https://github.com/Finschia/finschia-sdk/tree/v0.47.0-alpha1) +Requires [finschia-sdk v0.47.0-alpha1](https://github.com/Finschia/finschia-sdk/tree/v0.47.0-alpha1) Current finschia-sdk version applied to finschia-kt/protobuf is [finschia-sdk v0.47.0-alpha1](https://github.com/Finschia/finschia-sdk/tree/v0.47.0-alpha1) @@ -15,20 +15,20 @@ $ git submodule update --init $ ./gradlew build ``` -Note that any version of finschia-kt is only compatible with a certain lbm-sdk version. The corresponding lbm-sdk -version that the current repository supports can be found in the tag or commit hash of `proto/repositories/lbm-sdk` +Note that any version of finschia-kt is only compatible with a certain finschia-sdk version. The corresponding finschia-sdk +version that the current repository supports can be found in the tag or commit hash of `proto/repositories/finschia-sdk` submodule, using the following command. ```shell -$ cd protobuf/repositories/lbm-sdk && git describe --always && cd - +$ cd protobuf/repositories/finschia-sdk && git describe --always && cd - ``` -If you are a finschia-kt developer or contributor and trying to use another version of lbm-sdk, `git checkout` -the appropriate version in the lbm-sdk submodule before building this repository. The following command is an example -of using lbm-sdk `v0.47.0-alpha1`. +If you are a finschia-kt developer or contributor and trying to use another version of finschia-sdk, `git checkout` +the appropriate version in the finschia-sdk submodule before building this repository. The following command is an example +of using finschia-sdk `v0.47.0-alpha1`. ```shell -$ cd protobuf/repositories/lbm-sdk && git checkout v0.47.0-alpha1 && cd - +$ cd protobuf/repositories/finschia-sdk && git checkout v0.47.0-alpha1 && cd - ``` ## How to use @@ -88,7 +88,7 @@ The former is using the tx wrapper, while the latter does not use the wrapper. ## How to run `without-tx-wrapper-example` -### 1. Run lbm-sdk simapp +### 1. Run finschia-sdk simapp Build with reference to [Quick Start build](https://github.com/Finschia/finschia-sdk/tree/v0.47.0-alpha1#quick-start). diff --git a/examples/multisig-example/src/main/kotlin/network/finschia/sdk/example/Client.kt b/examples/multisig-example/src/main/kotlin/network/finschia/sdk/example/Client.kt index f1350e4..9f1820d 100644 --- a/examples/multisig-example/src/main/kotlin/network/finschia/sdk/example/Client.kt +++ b/examples/multisig-example/src/main/kotlin/network/finschia/sdk/example/Client.kt @@ -152,7 +152,7 @@ suspend fun main() { // // You need to input `txSigLimit`. `txSigLimit` means the upper limit of multi-sig public key number. // `txSigLimit` is different for each chain. Please check your chain `txSigLimit` with reference to - // https://github.com/line/lbm-sdk/blob/main/x/auth/spec/07_client.md#params-1. + // https://github.com/Finschia/finschia-sdk/blob/main/x/auth/spec/07_client.md#params-1. // // `pubKeylist` size should not exceed the upper limit. If it exceeds the upper limit, you will not // be able to remit payment from the address generated by its `pubKeylist`. This means that the assets diff --git a/protobuf/build.gradle.kts b/protobuf/build.gradle.kts index e8a1fca..3b3da0e 100644 --- a/protobuf/build.gradle.kts +++ b/protobuf/build.gradle.kts @@ -13,8 +13,8 @@ plugins { sourceSets { main { proto { - srcDir ("./repositories/lbm-sdk/proto") - srcDir ("./repositories/lbm-sdk/third_party/proto") + srcDir ("./repositories/finschia-sdk/proto") + srcDir ("./repositories/finschia-sdk/third_party/proto") srcDir ("./repositories/wasmd/proto") srcDir ("./repositories/ibc-go/proto") } @@ -59,7 +59,7 @@ tasks.named("build") { tasks.register("checkoutSubModules") { var subModules = mapOf( // {moduleName} to {version} - "lbm-sdk" to "v0.47.0-alpha1", + "finschia-sdk" to "v0.47.0-alpha1", "ibc-go" to "v3.3.2", "wasmd" to "v0.1.0" ) diff --git a/protobuf/repositories/finschia-sdk b/protobuf/repositories/finschia-sdk index 4845096..958dd22 160000 --- a/protobuf/repositories/finschia-sdk +++ b/protobuf/repositories/finschia-sdk @@ -1 +1 @@ -Subproject commit 484509608285663c4f83e752675a3c95e32a0b0a +Subproject commit 958dd22f43ae3f878d83fe0ad82ad6f038fee49b diff --git a/protobuf/repositories/lbm-sdk b/protobuf/repositories/lbm-sdk deleted file mode 160000 index 958dd22..0000000 --- a/protobuf/repositories/lbm-sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 958dd22f43ae3f878d83fe0ad82ad6f038fee49b diff --git a/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisig.kt b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisig.kt index b50c0b2..011b2ac 100644 --- a/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisig.kt +++ b/tx/src/main/kotlin/network/finschia/sdk/legacymultisig/Multisig.kt @@ -27,7 +27,7 @@ fun compareArrays(a: ByteArray, b: ByteArray): Int { * @param txSigLimit * You need to input `txSigLimit`. `txSigLimit` means the upper limit of multi-sig public key number. * `txSigLimit` is different for each chain. Please check your chain `txSigLimit` with reference to - * https://github.com/line/lbm-sdk/blob/main/x/auth/spec/07_client.md#params-1. + * https://github.com/Finschia/finschia-sdk/blob/main/x/auth/spec/07_client.md#params-1. * * `pubKeylist` size should not exceed the upper limit. If it exceeds the upper limit, you will not * be able to remit payment from the address generated by its `pubKeylist`. This means that the assets