From 47c3a5308059229ed88d68c96d4d3858d5ec03e9 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Tue, 24 Dec 2024 11:10:20 -0500 Subject: [PATCH] refactor/internal (#1216) * refactor: update import paths in gateway handlers * refactor: remove obsolete devtools Makefile and README * build: optimize build process for improved efficiency * refactor: remove obsolete pkl files related to Matrix and Sonr network configurations * refactor: move embed code to x/dwn/types --- .cz.toml | 4 +- Makefile | 2 - Taskfile.yml | 1 + app/gateway/context/middleware.go | 4 +- app/gateway/context/resolver.go | 2 +- app/gateway/context/sessions.go | 2 +- app/gateway/context/vaults.go | 4 +- app/gateway/gateway.go | 2 +- app/gateway/handlers/register.go | 2 +- cmd/hway/cmds.go | 2 +- contrib/devtools/Makefile | 85 ------- contrib/devtools/README.md | 6 - deploy/apps/chainindex/reset.sql | 78 ------ deploy/apps/chainindex/schema.sql | 94 ------- deploy/apps/chainindex/seed.sql | 29 --- deploy/devbox.lock | 232 ------------------ {pkg => internal}/chain/README.md | 0 .../chain/appmodule/environment.go | 8 +- {pkg => internal}/chain/branch/branch.go | 0 {pkg => internal}/chain/log/logger.go | 0 {pkg => internal}/chain/router/service.go | 2 +- .../chain/transaction/service.go | 0 .../chain/transaction/transaction.go | 0 {pkg => internal}/common/chain_query.go | 0 {pkg => internal}/common/http_cookies.go | 0 {pkg => internal}/common/http_headers.go | 0 {pkg => internal}/common/ipfs_api.go | 0 {pkg => internal}/common/ipfs_file.go | 0 {pkg => internal}/common/ipfs_folder.go | 0 {pkg => internal}/common/ucan_store.go | 4 +- .../crypto}/accumulator/accumulator.go | 2 +- .../crypto}/accumulator/accumulator_test.go | 2 +- .../crypto}/accumulator/key.go | 2 +- .../crypto}/accumulator/key_test.go | 2 +- .../crypto}/accumulator/lib.go | 2 +- .../crypto}/accumulator/lib_test.go | 2 +- .../crypto}/accumulator/proof.go | 2 +- .../crypto}/accumulator/proof_test.go | 2 +- .../crypto}/accumulator/witness.go | 2 +- .../crypto}/accumulator/witness_test.go | 2 +- .../crypto}/bulletproof/generators.go | 2 +- .../crypto}/bulletproof/generators_test.go | 2 +- .../crypto}/bulletproof/helpers.go | 2 +- .../crypto}/bulletproof/helpers_test.go | 2 +- .../crypto}/bulletproof/ipp_prover.go | 2 +- .../crypto}/bulletproof/ipp_prover_test.go | 2 +- .../crypto}/bulletproof/ipp_verifier.go | 2 +- .../crypto}/bulletproof/ipp_verifier_test.go | 2 +- .../crypto}/bulletproof/range_batch_prover.go | 2 +- .../bulletproof/range_batch_prover_test.go | 2 +- .../bulletproof/range_batch_verifier.go | 2 +- .../bulletproof/range_batch_verifier_test.go | 2 +- .../crypto}/bulletproof/range_prover.go | 2 +- .../crypto}/bulletproof/range_prover_test.go | 2 +- .../crypto}/bulletproof/range_verifier.go | 2 +- .../bulletproof/range_verifier_test.go | 2 +- {crypto => internal/crypto}/core/README.md | 0 {crypto => internal/crypto}/core/commit.go | 0 .../crypto}/core/commit_test.go | 0 .../crypto}/core/curves/bls12377_curve.go | 2 +- .../crypto}/core/curves/bls12381_curve.go | 6 +- .../crypto}/core/curves/curve.go | 2 +- .../crypto}/core/curves/ec_point.go | 4 +- .../crypto}/core/curves/ec_point_test.go | 4 +- .../crypto}/core/curves/ec_scalar.go | 6 +- .../crypto}/core/curves/ecdsa.go | 0 .../crypto}/core/curves/ed25519_curve.go | 2 +- .../crypto}/core/curves/ed25519_curve_test.go | 2 +- .../crypto}/core/curves/field.go | 0 .../crypto}/core/curves/field_test.go | 0 .../crypto}/core/curves/k256_bench_test.go | 4 +- .../crypto}/core/curves/k256_curve.go | 10 +- .../crypto}/core/curves/k256_curve_test.go | 0 .../core/curves/native/bls12381/bls12381.go | 2 +- .../crypto}/core/curves/native/bls12381/fp.go | 4 +- .../core/curves/native/bls12381/fp12.go | 0 .../core/curves/native/bls12381/fp12_test.go | 0 .../core/curves/native/bls12381/fp2.go | 0 .../core/curves/native/bls12381/fp2_test.go | 0 .../core/curves/native/bls12381/fp6.go | 0 .../core/curves/native/bls12381/fp6_test.go | 0 .../core/curves/native/bls12381/fp_test.go | 2 +- .../crypto}/core/curves/native/bls12381/fq.go | 2 +- .../core/curves/native/bls12381/fq_test.go | 4 +- .../crypto}/core/curves/native/bls12381/g1.go | 4 +- .../core/curves/native/bls12381/g1_test.go | 2 +- .../crypto}/core/curves/native/bls12381/g2.go | 4 +- .../core/curves/native/bls12381/g2_test.go | 2 +- .../crypto}/core/curves/native/bls12381/gt.go | 4 +- .../core/curves/native/bls12381/pairings.go | 0 .../curves/native/bls12381/pairings_test.go | 2 +- .../crypto}/core/curves/native/field.go | 2 +- .../crypto}/core/curves/native/hash2field.go | 0 .../crypto}/core/curves/native/isogeny.go | 0 .../crypto}/core/curves/native/k256/fp/fp.go | 2 +- .../core/curves/native/k256/fp/fp_test.go | 4 +- .../curves/native/k256/fp/secp256k1_fp.go | 0 .../crypto}/core/curves/native/k256/fq/fq.go | 2 +- .../core/curves/native/k256/fq/fq_test.go | 4 +- .../curves/native/k256/fq/secp256k1_fq.go | 0 .../crypto}/core/curves/native/k256/point.go | 6 +- .../core/curves/native/k256/point_test.go | 4 +- .../crypto}/core/curves/native/osswu.go | 0 .../crypto}/core/curves/native/p256/fp/fp.go | 2 +- .../core/curves/native/p256/fp/fp_test.go | 4 +- .../core/curves/native/p256/fp/p256_fp.go | 0 .../crypto}/core/curves/native/p256/fq/fq.go | 2 +- .../core/curves/native/p256/fq/fq_test.go | 4 +- .../core/curves/native/p256/fq/p256_fq.go | 0 .../crypto}/core/curves/native/p256/point.go | 6 +- .../core/curves/native/p256/point_test.go | 8 +- .../core/curves/native/pasta/README.md | 0 .../crypto}/core/curves/native/pasta/fp/fp.go | 2 +- .../core/curves/native/pasta/fp/fp_test.go | 0 .../core/curves/native/pasta/fp/pasta_fp.go | 0 .../crypto}/core/curves/native/pasta/fq/fq.go | 2 +- .../core/curves/native/pasta/fq/fq_test.go | 0 .../core/curves/native/pasta/fq/pasta_fq.go | 0 .../core/curves/native/pasta/pallas.go | 0 .../crypto}/core/curves/native/point.go | 0 .../crypto}/core/curves/p256_bench_test.go | 2 +- .../crypto}/core/curves/p256_curve.go | 10 +- .../crypto}/core/curves/p256_curve_test.go | 0 .../crypto}/core/curves/pallas_curve.go | 4 +- .../crypto}/core/curves/pallas_curve_test.go | 4 +- .../core/curves/secp256k1/secp256k1.go | 0 .../crypto}/core/curves/sp256_curve.go | 0 {crypto => internal/crypto}/core/hash.go | 2 +- {crypto => internal/crypto}/core/hash_test.go | 0 {crypto => internal/crypto}/core/mod.go | 2 +- {crypto => internal/crypto}/core/mod_test.go | 2 +- {crypto => internal/crypto}/core/primes.go | 0 .../crypto}/core/protocol/protocol.go | 0 {crypto => internal/crypto}/daed/aes_siv.go | 0 .../crypto}/daed/aes_siv_test.go | 4 +- .../crypto}/dkg/frost/README.md | 0 .../crypto}/dkg/frost/dkg_round1.go | 6 +- .../crypto}/dkg/frost/dkg_round2.go | 6 +- .../crypto}/dkg/frost/dkg_rounds_test.go | 4 +- .../crypto}/dkg/frost/participant.go | 6 +- .../crypto}/dkg/gennaro/README.md | 0 .../crypto}/dkg/gennaro/participant.go | 6 +- .../crypto}/dkg/gennaro/participant_test.go | 4 +- .../crypto}/dkg/gennaro/round1.go | 6 +- .../crypto}/dkg/gennaro/round2.go | 4 +- .../crypto}/dkg/gennaro/round3.go | 4 +- .../crypto}/dkg/gennaro/round4.go | 8 +- .../crypto}/dkg/gennaro/rounds_test.go | 4 +- .../crypto}/dkg/gennaro2p/README.md | 0 .../crypto}/dkg/gennaro2p/genarro2p.go | 6 +- .../crypto}/dkg/gennaro2p/genarro2p_test.go | 4 +- {crypto => internal/crypto}/ecies/encrypt.go | 0 {crypto => internal/crypto}/ecies/keys.go | 2 +- .../crypto}/ecies/keys_test.go | 2 +- {crypto => internal/crypto}/internal/err.go | 0 {crypto => internal/crypto}/internal/hash.go | 0 .../crypto}/internal/hash_test.go | 0 {crypto => internal/crypto}/internal/point.go | 0 .../crypto}/internal/testutils.go | 0 {crypto => internal/crypto}/keys/didkey.go | 0 {crypto => internal/crypto}/keys/methods.go | 0 .../crypto}/keys/parsers/btc_parser.go | 0 .../crypto}/keys/parsers/cosmos_parser.go | 0 .../crypto}/keys/parsers/eth_parser.go | 0 .../crypto}/keys/parsers/fil_parser.go | 0 .../crypto}/keys/parsers/key_parser.go | 0 .../crypto}/keys/parsers/sol_parser.go | 0 .../crypto}/keys/parsers/ton_parser.go | 0 {crypto => internal/crypto}/keys/pubkey.go | 2 +- {crypto => internal/crypto}/keys/utils.go | 2 +- {crypto => internal/crypto}/mpc/codec.go | 8 +- {crypto => internal/crypto}/mpc/codec_test.go | 0 {crypto => internal/crypto}/mpc/enclave.go | 4 +- {crypto => internal/crypto}/mpc/protocol.go | 6 +- {crypto => internal/crypto}/mpc/spec/jwt.go | 0 .../crypto}/mpc/spec/source.go | 4 +- {crypto => internal/crypto}/mpc/spec/ucan.go | 4 +- {crypto => internal/crypto}/mpc/utils.go | 6 +- .../crypto}/ot/base/simplest/ot.go | 4 +- .../crypto}/ot/base/simplest/ot_test.go | 6 +- .../crypto}/ot/base/simplest/stream.go | 4 +- .../crypto}/ot/base/simplest/util.go | 0 .../crypto}/ot/extension/kos/kos.go | 4 +- .../crypto}/ot/extension/kos/kos_test.go | 6 +- .../crypto}/ot/extension/kos/stream.go | 4 +- {crypto => internal/crypto}/ot/ottest/util.go | 4 +- .../crypto}/paillier/README.md | 0 .../crypto}/paillier/paillier.go | 4 +- {crypto => internal/crypto}/paillier/psf.go | 6 +- .../crypto}/paillier/psf_test.go | 6 +- {crypto => internal/crypto}/sharing/README.md | 0 .../crypto}/sharing/ed25519_feldman_test.go | 2 +- .../crypto}/sharing/feldman.go | 2 +- .../crypto}/sharing/pedersen.go | 2 +- .../crypto}/sharing/polynomial.go | 2 +- .../crypto}/sharing/polynomial_test.go | 2 +- {crypto => internal/crypto}/sharing/shamir.go | 2 +- .../crypto}/sharing/shamir_test.go | 2 +- .../sharing/v1/bls12381g1_feldman_test.go | 2 +- .../crypto}/sharing/v1/bls12381g1curve.go | 6 +- .../sharing/v1/bls12381g2_feldman_test.go | 0 .../crypto}/sharing/v1/bls12381g2curve.go | 4 +- .../crypto}/sharing/v1/common.go | 2 +- .../sharing/v1/ed25519_feldman_test.go | 0 .../sharing/v1/ed25519_pedersen_test.go | 4 +- .../crypto}/sharing/v1/ed25519curve.go | 4 +- .../crypto}/sharing/v1/ed25519curve_test.go | 0 .../crypto}/sharing/v1/feldman.go | 2 +- .../crypto}/sharing/v1/k256_feldman_test.go | 0 .../crypto}/sharing/v1/k256_pedersen_test.go | 2 +- .../crypto}/sharing/v1/p256_feldman_test.go | 0 .../crypto}/sharing/v1/pedersen.go | 4 +- .../crypto}/sharing/v1/polynomial.go | 2 +- .../crypto}/sharing/v1/polynomial_test.go | 0 .../crypto}/sharing/v1/shamir.go | 2 +- .../crypto}/sharing/v1/shamir_test.go | 2 +- .../crypto}/signatures/bbs/blind_signature.go | 4 +- .../signatures/bbs/blind_signature_context.go | 6 +- .../bbs/blind_signature_context_test.go | 2 +- .../signatures/bbs/message_generators.go | 2 +- .../crypto}/signatures/bbs/pok_signature.go | 4 +- .../signatures/bbs/pok_signature_proof.go | 4 +- .../bbs/pok_signature_proof_test.go | 4 +- .../crypto}/signatures/bbs/public_key.go | 2 +- .../crypto}/signatures/bbs/secret_key.go | 2 +- .../crypto}/signatures/bbs/signature.go | 2 +- .../crypto}/signatures/bbs/signature_test.go | 2 +- .../crypto}/signatures/bls/README.md | 0 .../crypto}/signatures/bls/bls_sig/lib.go | 10 +- .../signatures/bls/bls_sig/lib_test.go | 4 +- .../signatures/bls/bls_sig/tiny_bls.go | 0 .../signatures/bls/bls_sig/tiny_bls_sig.go | 6 +- .../bls/bls_sig/tiny_bls_sig_aug_test.go | 2 +- .../bls/bls_sig/tiny_bls_sig_basic_test.go | 2 +- .../bls/bls_sig/tiny_bls_sig_pop_test.go | 2 +- .../signatures/bls/bls_sig/usual_bls.go | 0 .../signatures/bls/bls_sig/usual_bls_sig.go | 6 +- .../bls/bls_sig/usual_bls_sig_aug_test.go | 2 +- .../bls/bls_sig/usual_bls_sig_basic_test.go | 2 +- .../bls/bls_sig/usual_bls_sig_pop_test.go | 2 +- .../crypto}/signatures/bls/rust/Cargo.toml | 0 .../crypto}/signatures/bls/rust/README.md | 0 .../crypto}/signatures/bls/rust/src/main.rs | 0 .../crypto}/signatures/bls/tests/bls/main.go | 2 +- .../crypto}/signatures/bls/tmp.json | 0 .../crypto}/signatures/common/challenge.go | 2 +- .../crypto}/signatures/common/commitment.go | 2 +- .../crypto}/signatures/common/hmacdrbg.go | 0 .../crypto}/signatures/common/nonce.go | 2 +- .../common/proof_committed_builder.go | 2 +- .../signatures/common/proof_message.go | 2 +- .../signatures/common/signature_blinding.go | 2 +- .../signatures/schnorr/mina/bitvector.go | 0 .../schnorr/mina/challenge_derive.go | 2 +- .../crypto}/signatures/schnorr/mina/keys.go | 6 +- .../signatures/schnorr/mina/keys_test.go | 2 +- .../schnorr/mina/poseidon_config.go | 2 +- .../signatures/schnorr/mina/poseidon_hash.go | 4 +- .../schnorr/mina/poseidon_hash_test.go | 4 +- .../signatures/schnorr/mina/roinput.go | 4 +- .../signatures/schnorr/mina/signature.go | 4 +- .../crypto}/signatures/schnorr/mina/txn.go | 2 +- .../signatures/schnorr/nem/ed25519_keccak.go | 2 +- .../schnorr/nem/ed25519_keccak_test.go | 0 {crypto => internal/crypto}/subtle/hkdf.go | 0 .../crypto}/subtle/random/random.go | 0 {crypto => internal/crypto}/subtle/subtle.go | 0 {crypto => internal/crypto}/subtle/x25519.go | 0 .../crypto}/tecdsa/dklsv1/README.md | 0 .../crypto}/tecdsa/dklsv1/boilerplate.go | 10 +- .../crypto}/tecdsa/dklsv1/dealer/dealer.go | 8 +- .../tecdsa/dklsv1/dealer/dealer_test.go | 6 +- .../crypto}/tecdsa/dklsv1/dkg/dkg.go | 8 +- .../crypto}/tecdsa/dklsv1/dkg/dkg_test.go | 4 +- .../crypto}/tecdsa/dklsv1/dkgserializers.go | 10 +- .../crypto}/tecdsa/dklsv1/protocol.go | 2 +- .../crypto}/tecdsa/dklsv1/protocol_test.go | 8 +- .../crypto}/tecdsa/dklsv1/refresh/refresh.go | 10 +- .../tecdsa/dklsv1/refresh/refresh_test.go | 10 +- .../tecdsa/dklsv1/refreshserializers.go | 10 +- .../crypto}/tecdsa/dklsv1/sign/multiply.go | 8 +- .../tecdsa/dklsv1/sign/multiply_test.go | 8 +- .../crypto}/tecdsa/dklsv1/sign/sign.go | 10 +- .../crypto}/tecdsa/dklsv1/sign/sign_test.go | 10 +- .../crypto}/tecdsa/dklsv1/signserializers.go | 6 +- .../dklsv1/testdata/alice-dkls-v1-dkg.bin | 0 .../dklsv1/testdata/bob-dkls-v1-dkg.bin | 0 .../crypto}/ted25519/frost/README.md | 0 .../ted25519/frost/challenge_derive.go | 2 +- .../crypto}/ted25519/frost/participant.go | 6 +- .../crypto}/ted25519/frost/round1.go | 4 +- .../crypto}/ted25519/frost/round2.go | 4 +- .../crypto}/ted25519/frost/round3.go | 4 +- .../crypto}/ted25519/frost/rounds_test.go | 6 +- .../crypto}/ted25519/ted25519/ed25519.go | 2 +- .../crypto}/ted25519/ted25519/ed25519_test.go | 2 +- .../crypto}/ted25519/ted25519/ext.go | 2 +- .../crypto}/ted25519/ted25519/ext_test.go | 4 +- .../crypto}/ted25519/ted25519/keygen.go | 4 +- .../crypto}/ted25519/ted25519/keygen_test.go | 4 +- .../crypto}/ted25519/ted25519/noncegen.go | 2 +- .../ted25519/ted25519/noncegen_test.go | 4 +- .../crypto}/ted25519/ted25519/partialsig.go | 0 .../ted25519/ted25519/partialsig_test.go | 2 +- .../crypto}/ted25519/ted25519/sigagg.go | 4 +- .../crypto}/ted25519/ted25519/sigagg_test.go | 0 .../ted25519/ted25519/twobytwo_test.go | 2 +- {crypto => internal/crypto}/ucan/README.md | 0 .../crypto}/ucan/attenuation.go | 0 .../crypto}/ucan/attns/UCAN.pkl.go | 0 .../ucan/attns/capaccount/CapAccount.pkl.go | 0 .../crypto}/ucan/attns/capaccount/caps.go | 2 +- .../attns/capinterchain/CapInterchain.pkl.go | 0 .../crypto}/ucan/attns/capinterchain/caps.go | 2 +- .../ucan/attns/capvault/CapVault.pkl.go | 0 .../crypto}/ucan/attns/capvault/caps.go | 2 +- .../crypto}/ucan/attns/exports.go | 14 +- .../crypto}/ucan/attns/init.pkl.go | 0 .../ucan/attns/resaccount/ResAccount.pkl.go | 0 .../crypto}/ucan/attns/resaccount/resource.go | 2 +- .../attns/resinterchain/ResInterchain.pkl.go | 0 .../ucan/attns/resinterchain/resource.go | 2 +- .../ucan/attns/resvault/ResVault.pkl.go | 0 .../crypto}/ucan/attns/resvault/resource.go | 2 +- {crypto => internal/crypto}/ucan/context.go | 0 {crypto => internal/crypto}/ucan/proof.go | 0 {crypto => internal/crypto}/ucan/store.go | 0 {crypto => internal/crypto}/ucan/token.go | 2 +- .../crypto}/zkp/schnorr/schnorr.go | 2 +- .../crypto}/zkp/schnorr/schnorr_test.go | 2 +- pkl/README.md | 19 -- pkl/basePklProject.pkl | 44 ---- pkl/matrix.net/AppService.pkl | 55 ----- pkl/matrix.net/Homeserver.pkl | 197 --------------- pkl/matrix.net/PklProject | 22 -- pkl/matrix.net/PklProject.deps.json | 4 - pkl/sonr.net/App.pkl | 78 ------ pkl/sonr.net/Config.pkl | 145 ----------- pkl/sonr.net/Hway.pkl | 16 -- pkl/sonr.net/Motr.pkl | 34 --- pkl/sonr.net/PklProject | 22 -- pkl/sonr.net/PklProject.deps.json | 4 - pkl/sonr.net/UCAN.pkl | 46 ---- ...ocess-compose.yaml => process-compose.yaml | 0 x/did/types/accounts.go | 2 +- x/did/types/internal/accounts/api_builder.go | 2 +- x/did/types/internal/accounts/context.go | 2 +- x/did/types/internal/accounts/encoding.go | 2 +- .../types/internal/accounts/implementation.go | 4 +- x/did/types/internal/accounts/protoaccount.go | 2 +- {internal => x/dwn/types}/embed/codec.go | 0 {internal => x/dwn/types}/embed/index.html | 0 {internal => x/dwn/types}/embed/main.js | 0 {internal => x/dwn/types}/embed/sw.js | 0 {internal => x/dwn/types}/embed/utils.go | 0 {internal => x/dwn/types}/embed/webworker.go | 0 356 files changed, 402 insertions(+), 1613 deletions(-) delete mode 100644 contrib/devtools/Makefile delete mode 100644 contrib/devtools/README.md delete mode 100644 deploy/apps/chainindex/reset.sql delete mode 100644 deploy/apps/chainindex/schema.sql delete mode 100644 deploy/apps/chainindex/seed.sql delete mode 100644 deploy/devbox.lock rename {pkg => internal}/chain/README.md (100%) rename {pkg => internal}/chain/appmodule/environment.go (77%) rename {pkg => internal}/chain/branch/branch.go (100%) rename {pkg => internal}/chain/log/logger.go (100%) rename {pkg => internal}/chain/router/service.go (90%) rename {pkg => internal}/chain/transaction/service.go (100%) rename {pkg => internal}/chain/transaction/transaction.go (100%) rename {pkg => internal}/common/chain_query.go (100%) rename {pkg => internal}/common/http_cookies.go (100%) rename {pkg => internal}/common/http_headers.go (100%) rename {pkg => internal}/common/ipfs_api.go (100%) rename {pkg => internal}/common/ipfs_file.go (100%) rename {pkg => internal}/common/ipfs_folder.go (100%) rename {pkg => internal}/common/ucan_store.go (97%) rename {crypto => internal/crypto}/accumulator/accumulator.go (98%) rename {crypto => internal/crypto}/accumulator/accumulator_test.go (99%) rename {crypto => internal/crypto}/accumulator/key.go (99%) rename {crypto => internal/crypto}/accumulator/key_test.go (97%) rename {crypto => internal/crypto}/accumulator/lib.go (98%) rename {crypto => internal/crypto}/accumulator/lib_test.go (99%) rename {crypto => internal/crypto}/accumulator/proof.go (99%) rename {crypto => internal/crypto}/accumulator/proof_test.go (99%) rename {crypto => internal/crypto}/accumulator/witness.go (99%) rename {crypto => internal/crypto}/accumulator/witness_test.go (99%) rename {crypto => internal/crypto}/bulletproof/generators.go (97%) rename {crypto => internal/crypto}/bulletproof/generators_test.go (96%) rename {crypto => internal/crypto}/bulletproof/helpers.go (99%) rename {crypto => internal/crypto}/bulletproof/helpers_test.go (97%) rename {crypto => internal/crypto}/bulletproof/ipp_prover.go (99%) rename {crypto => internal/crypto}/bulletproof/ipp_prover_test.go (98%) rename {crypto => internal/crypto}/bulletproof/ipp_verifier.go (99%) rename {crypto => internal/crypto}/bulletproof/ipp_verifier_test.go (97%) rename {crypto => internal/crypto}/bulletproof/range_batch_prover.go (99%) rename {crypto => internal/crypto}/bulletproof/range_batch_prover_test.go (98%) rename {crypto => internal/crypto}/bulletproof/range_batch_verifier.go (98%) rename {crypto => internal/crypto}/bulletproof/range_batch_verifier_test.go (98%) rename {crypto => internal/crypto}/bulletproof/range_prover.go (99%) rename {crypto => internal/crypto}/bulletproof/range_prover_test.go (97%) rename {crypto => internal/crypto}/bulletproof/range_verifier.go (99%) rename {crypto => internal/crypto}/bulletproof/range_verifier_test.go (97%) rename {crypto => internal/crypto}/core/README.md (100%) rename {crypto => internal/crypto}/core/commit.go (100%) rename {crypto => internal/crypto}/core/commit_test.go (100%) rename {crypto => internal/crypto}/core/curves/bls12377_curve.go (99%) rename {crypto => internal/crypto}/core/curves/bls12381_curve.go (99%) rename {crypto => internal/crypto}/core/curves/curve.go (99%) rename {crypto => internal/crypto}/core/curves/ec_point.go (98%) rename {crypto => internal/crypto}/core/curves/ec_point_test.go (98%) rename {crypto => internal/crypto}/core/curves/ec_scalar.go (97%) rename {crypto => internal/crypto}/core/curves/ecdsa.go (100%) rename {crypto => internal/crypto}/core/curves/ed25519_curve.go (99%) rename {crypto => internal/crypto}/core/curves/ed25519_curve_test.go (99%) rename {crypto => internal/crypto}/core/curves/field.go (100%) rename {crypto => internal/crypto}/core/curves/field_test.go (100%) rename {crypto => internal/crypto}/core/curves/k256_bench_test.go (98%) rename {crypto => internal/crypto}/core/curves/k256_curve.go (97%) rename {crypto => internal/crypto}/core/curves/k256_curve_test.go (100%) rename {crypto => internal/crypto}/core/curves/native/bls12381/bls12381.go (96%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fp.go (99%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fp12.go (100%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fp12_test.go (100%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fp2.go (100%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fp2_test.go (100%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fp6.go (100%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fp6_test.go (100%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fp_test.go (99%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fq.go (99%) rename {crypto => internal/crypto}/core/curves/native/bls12381/fq_test.go (98%) rename {crypto => internal/crypto}/core/curves/native/bls12381/g1.go (99%) rename {crypto => internal/crypto}/core/curves/native/bls12381/g1_test.go (99%) rename {crypto => internal/crypto}/core/curves/native/bls12381/g2.go (99%) rename {crypto => internal/crypto}/core/curves/native/bls12381/g2_test.go (99%) rename {crypto => internal/crypto}/core/curves/native/bls12381/gt.go (98%) rename {crypto => internal/crypto}/core/curves/native/bls12381/pairings.go (100%) rename {crypto => internal/crypto}/core/curves/native/bls12381/pairings_test.go (95%) rename {crypto => internal/crypto}/core/curves/native/field.go (99%) rename {crypto => internal/crypto}/core/curves/native/hash2field.go (100%) rename {crypto => internal/crypto}/core/curves/native/isogeny.go (100%) rename {crypto => internal/crypto}/core/curves/native/k256/fp/fp.go (98%) rename {crypto => internal/crypto}/core/curves/native/k256/fp/fp_test.go (98%) rename {crypto => internal/crypto}/core/curves/native/k256/fp/secp256k1_fp.go (100%) rename {crypto => internal/crypto}/core/curves/native/k256/fq/fq.go (99%) rename {crypto => internal/crypto}/core/curves/native/k256/fq/fq_test.go (98%) rename {crypto => internal/crypto}/core/curves/native/k256/fq/secp256k1_fq.go (100%) rename {crypto => internal/crypto}/core/curves/native/k256/point.go (98%) rename {crypto => internal/crypto}/core/curves/native/k256/point_test.go (71%) rename {crypto => internal/crypto}/core/curves/native/osswu.go (100%) rename {crypto => internal/crypto}/core/curves/native/p256/fp/fp.go (98%) rename {crypto => internal/crypto}/core/curves/native/p256/fp/fp_test.go (98%) rename {crypto => internal/crypto}/core/curves/native/p256/fp/p256_fp.go (100%) rename {crypto => internal/crypto}/core/curves/native/p256/fq/fq.go (99%) rename {crypto => internal/crypto}/core/curves/native/p256/fq/fq_test.go (98%) rename {crypto => internal/crypto}/core/curves/native/p256/fq/p256_fq.go (100%) rename {crypto => internal/crypto}/core/curves/native/p256/point.go (98%) rename {crypto => internal/crypto}/core/curves/native/p256/point_test.go (75%) rename {crypto => internal/crypto}/core/curves/native/pasta/README.md (100%) rename {crypto => internal/crypto}/core/curves/native/pasta/fp/fp.go (99%) rename {crypto => internal/crypto}/core/curves/native/pasta/fp/fp_test.go (100%) rename {crypto => internal/crypto}/core/curves/native/pasta/fp/pasta_fp.go (100%) rename {crypto => internal/crypto}/core/curves/native/pasta/fq/fq.go (99%) rename {crypto => internal/crypto}/core/curves/native/pasta/fq/fq_test.go (100%) rename {crypto => internal/crypto}/core/curves/native/pasta/fq/pasta_fq.go (100%) rename {crypto => internal/crypto}/core/curves/native/pasta/pallas.go (100%) rename {crypto => internal/crypto}/core/curves/native/point.go (100%) rename {crypto => internal/crypto}/core/curves/p256_bench_test.go (99%) rename {crypto => internal/crypto}/core/curves/p256_curve.go (97%) rename {crypto => internal/crypto}/core/curves/p256_curve_test.go (100%) rename {crypto => internal/crypto}/core/curves/pallas_curve.go (99%) rename {crypto => internal/crypto}/core/curves/pallas_curve_test.go (96%) rename {crypto => internal/crypto}/core/curves/secp256k1/secp256k1.go (100%) rename {crypto => internal/crypto}/core/curves/sp256_curve.go (100%) rename {crypto => internal/crypto}/core/hash.go (99%) rename {crypto => internal/crypto}/core/hash_test.go (100%) rename {crypto => internal/crypto}/core/mod.go (98%) rename {crypto => internal/crypto}/core/mod_test.go (99%) rename {crypto => internal/crypto}/core/primes.go (100%) rename {crypto => internal/crypto}/core/protocol/protocol.go (100%) rename {crypto => internal/crypto}/daed/aes_siv.go (100%) rename {crypto => internal/crypto}/daed/aes_siv_test.go (98%) rename {crypto => internal/crypto}/dkg/frost/README.md (100%) rename {crypto => internal/crypto}/dkg/frost/dkg_round1.go (96%) rename {crypto => internal/crypto}/dkg/frost/dkg_round2.go (96%) rename {crypto => internal/crypto}/dkg/frost/dkg_rounds_test.go (97%) rename {crypto => internal/crypto}/dkg/frost/participant.go (91%) rename {crypto => internal/crypto}/dkg/gennaro/README.md (100%) rename {crypto => internal/crypto}/dkg/gennaro/participant.go (94%) rename {crypto => internal/crypto}/dkg/gennaro/participant_test.go (92%) rename {crypto => internal/crypto}/dkg/gennaro/round1.go (93%) rename {crypto => internal/crypto}/dkg/gennaro/round2.go (95%) rename {crypto => internal/crypto}/dkg/gennaro/round3.go (95%) rename {crypto => internal/crypto}/dkg/gennaro/round4.go (89%) rename {crypto => internal/crypto}/dkg/gennaro/rounds_test.go (99%) rename {crypto => internal/crypto}/dkg/gennaro2p/README.md (100%) rename {crypto => internal/crypto}/dkg/gennaro2p/genarro2p.go (96%) rename {crypto => internal/crypto}/dkg/gennaro2p/genarro2p_test.go (97%) rename {crypto => internal/crypto}/ecies/encrypt.go (100%) rename {crypto => internal/crypto}/ecies/keys.go (95%) rename {crypto => internal/crypto}/ecies/keys_test.go (90%) rename {crypto => internal/crypto}/internal/err.go (100%) rename {crypto => internal/crypto}/internal/hash.go (100%) rename {crypto => internal/crypto}/internal/hash_test.go (100%) rename {crypto => internal/crypto}/internal/point.go (100%) rename {crypto => internal/crypto}/internal/testutils.go (100%) rename {crypto => internal/crypto}/keys/didkey.go (100%) rename {crypto => internal/crypto}/keys/methods.go (100%) rename {crypto => internal/crypto}/keys/parsers/btc_parser.go (100%) rename {crypto => internal/crypto}/keys/parsers/cosmos_parser.go (100%) rename {crypto => internal/crypto}/keys/parsers/eth_parser.go (100%) rename {crypto => internal/crypto}/keys/parsers/fil_parser.go (100%) rename {crypto => internal/crypto}/keys/parsers/key_parser.go (100%) rename {crypto => internal/crypto}/keys/parsers/sol_parser.go (100%) rename {crypto => internal/crypto}/keys/parsers/ton_parser.go (100%) rename {crypto => internal/crypto}/keys/pubkey.go (96%) rename {crypto => internal/crypto}/keys/utils.go (96%) rename {crypto => internal/crypto}/mpc/codec.go (90%) rename {crypto => internal/crypto}/mpc/codec_test.go (100%) rename {crypto => internal/crypto}/mpc/enclave.go (97%) rename {crypto => internal/crypto}/mpc/protocol.go (93%) rename {crypto => internal/crypto}/mpc/spec/jwt.go (100%) rename {crypto => internal/crypto}/mpc/spec/source.go (97%) rename {crypto => internal/crypto}/mpc/spec/ucan.go (96%) rename {crypto => internal/crypto}/mpc/utils.go (96%) rename {crypto => internal/crypto}/ot/base/simplest/ot.go (99%) rename {crypto => internal/crypto}/ot/base/simplest/ot_test.go (93%) rename {crypto => internal/crypto}/ot/base/simplest/stream.go (97%) rename {crypto => internal/crypto}/ot/base/simplest/util.go (100%) rename {crypto => internal/crypto}/ot/extension/kos/kos.go (99%) rename {crypto => internal/crypto}/ot/extension/kos/kos_test.go (96%) rename {crypto => internal/crypto}/ot/extension/kos/stream.go (95%) rename {crypto => internal/crypto}/ot/ottest/util.go (94%) rename {crypto => internal/crypto}/paillier/README.md (100%) rename {crypto => internal/crypto}/paillier/paillier.go (98%) rename {crypto => internal/crypto}/paillier/psf.go (97%) rename {crypto => internal/crypto}/paillier/psf_test.go (99%) rename {crypto => internal/crypto}/sharing/README.md (100%) rename {crypto => internal/crypto}/sharing/ed25519_feldman_test.go (98%) rename {crypto => internal/crypto}/sharing/feldman.go (97%) rename {crypto => internal/crypto}/sharing/pedersen.go (98%) rename {crypto => internal/crypto}/sharing/polynomial.go (92%) rename {crypto => internal/crypto}/sharing/polynomial_test.go (90%) rename {crypto => internal/crypto}/sharing/shamir.go (98%) rename {crypto => internal/crypto}/sharing/shamir_test.go (98%) rename {crypto => internal/crypto}/sharing/v1/bls12381g1_feldman_test.go (98%) rename {crypto => internal/crypto}/sharing/v1/bls12381g1curve.go (94%) rename {crypto => internal/crypto}/sharing/v1/bls12381g2_feldman_test.go (100%) rename {crypto => internal/crypto}/sharing/v1/bls12381g2curve.go (95%) rename {crypto => internal/crypto}/sharing/v1/common.go (78%) rename {crypto => internal/crypto}/sharing/v1/ed25519_feldman_test.go (100%) rename {crypto => internal/crypto}/sharing/v1/ed25519_pedersen_test.go (97%) rename {crypto => internal/crypto}/sharing/v1/ed25519curve.go (97%) rename {crypto => internal/crypto}/sharing/v1/ed25519curve_test.go (100%) rename {crypto => internal/crypto}/sharing/v1/feldman.go (97%) rename {crypto => internal/crypto}/sharing/v1/k256_feldman_test.go (100%) rename {crypto => internal/crypto}/sharing/v1/k256_pedersen_test.go (98%) rename {crypto => internal/crypto}/sharing/v1/p256_feldman_test.go (100%) rename {crypto => internal/crypto}/sharing/v1/pedersen.go (97%) rename {crypto => internal/crypto}/sharing/v1/polynomial.go (95%) rename {crypto => internal/crypto}/sharing/v1/polynomial_test.go (100%) rename {crypto => internal/crypto}/sharing/v1/shamir.go (99%) rename {crypto => internal/crypto}/sharing/v1/shamir_test.go (99%) rename {crypto => internal/crypto}/signatures/bbs/blind_signature.go (94%) rename {crypto => internal/crypto}/signatures/bbs/blind_signature_context.go (98%) rename {crypto => internal/crypto}/signatures/bbs/blind_signature_context_test.go (98%) rename {crypto => internal/crypto}/signatures/bbs/message_generators.go (97%) rename {crypto => internal/crypto}/signatures/bbs/pok_signature.go (97%) rename {crypto => internal/crypto}/signatures/bbs/pok_signature_proof.go (98%) rename {crypto => internal/crypto}/signatures/bbs/pok_signature_proof_test.go (98%) rename {crypto => internal/crypto}/signatures/bbs/public_key.go (96%) rename {crypto => internal/crypto}/signatures/bbs/secret_key.go (98%) rename {crypto => internal/crypto}/signatures/bbs/signature.go (96%) rename {crypto => internal/crypto}/signatures/bbs/signature_test.go (97%) rename {crypto => internal/crypto}/signatures/bls/README.md (100%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/lib.go (95%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/lib_test.go (98%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/tiny_bls.go (100%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/tiny_bls_sig.go (98%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go (99%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go (99%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go (99%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/usual_bls.go (100%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/usual_bls_sig.go (98%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/usual_bls_sig_aug_test.go (99%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/usual_bls_sig_basic_test.go (99%) rename {crypto => internal/crypto}/signatures/bls/bls_sig/usual_bls_sig_pop_test.go (99%) rename {crypto => internal/crypto}/signatures/bls/rust/Cargo.toml (100%) rename {crypto => internal/crypto}/signatures/bls/rust/README.md (100%) rename {crypto => internal/crypto}/signatures/bls/rust/src/main.rs (100%) rename {crypto => internal/crypto}/signatures/bls/tests/bls/main.go (98%) rename {crypto => internal/crypto}/signatures/bls/tmp.json (100%) rename {crypto => internal/crypto}/signatures/common/challenge.go (79%) rename {crypto => internal/crypto}/signatures/common/commitment.go (82%) rename {crypto => internal/crypto}/signatures/common/hmacdrbg.go (100%) rename {crypto => internal/crypto}/signatures/common/nonce.go (81%) rename {crypto => internal/crypto}/signatures/common/proof_committed_builder.go (97%) rename {crypto => internal/crypto}/signatures/common/proof_message.go (97%) rename {crypto => internal/crypto}/signatures/common/signature_blinding.go (81%) rename {crypto => internal/crypto}/signatures/schnorr/mina/bitvector.go (100%) rename {crypto => internal/crypto}/signatures/schnorr/mina/challenge_derive.go (93%) rename {crypto => internal/crypto}/signatures/schnorr/mina/keys.go (97%) rename {crypto => internal/crypto}/signatures/schnorr/mina/keys_test.go (98%) rename {crypto => internal/crypto}/signatures/schnorr/mina/poseidon_config.go (96%) rename {crypto => internal/crypto}/signatures/schnorr/mina/poseidon_hash.go (99%) rename {crypto => internal/crypto}/signatures/schnorr/mina/poseidon_hash_test.go (96%) rename {crypto => internal/crypto}/signatures/schnorr/mina/roinput.go (95%) rename {crypto => internal/crypto}/signatures/schnorr/mina/signature.go (85%) rename {crypto => internal/crypto}/signatures/schnorr/mina/txn.go (99%) rename {crypto => internal/crypto}/signatures/schnorr/nem/ed25519_keccak.go (99%) rename {crypto => internal/crypto}/signatures/schnorr/nem/ed25519_keccak_test.go (100%) rename {crypto => internal/crypto}/subtle/hkdf.go (100%) rename {crypto => internal/crypto}/subtle/random/random.go (100%) rename {crypto => internal/crypto}/subtle/subtle.go (100%) rename {crypto => internal/crypto}/subtle/x25519.go (100%) rename {crypto => internal/crypto}/tecdsa/dklsv1/README.md (100%) rename {crypto => internal/crypto}/tecdsa/dklsv1/boilerplate.go (97%) rename {crypto => internal/crypto}/tecdsa/dklsv1/dealer/dealer.go (93%) rename {crypto => internal/crypto}/tecdsa/dklsv1/dealer/dealer_test.go (89%) rename {crypto => internal/crypto}/tecdsa/dklsv1/dkg/dkg.go (98%) rename {crypto => internal/crypto}/tecdsa/dklsv1/dkg/dkg_test.go (96%) rename {crypto => internal/crypto}/tecdsa/dklsv1/dkgserializers.go (97%) rename {crypto => internal/crypto}/tecdsa/dklsv1/protocol.go (94%) rename {crypto => internal/crypto}/tecdsa/dklsv1/protocol_test.go (98%) rename {crypto => internal/crypto}/tecdsa/dklsv1/refresh/refresh.go (95%) rename {crypto => internal/crypto}/tecdsa/dklsv1/refresh/refresh_test.go (95%) rename {crypto => internal/crypto}/tecdsa/dklsv1/refreshserializers.go (96%) rename {crypto => internal/crypto}/tecdsa/dklsv1/sign/multiply.go (98%) rename {crypto => internal/crypto}/tecdsa/dklsv1/sign/multiply_test.go (83%) rename {crypto => internal/crypto}/tecdsa/dklsv1/sign/sign.go (98%) rename {crypto => internal/crypto}/tecdsa/dklsv1/sign/sign_test.go (90%) rename {crypto => internal/crypto}/tecdsa/dklsv1/signserializers.go (95%) rename {crypto => internal/crypto}/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin (100%) rename {crypto => internal/crypto}/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin (100%) rename {crypto => internal/crypto}/ted25519/frost/README.md (100%) rename {crypto => internal/crypto}/ted25519/frost/challenge_derive.go (91%) rename {crypto => internal/crypto}/ted25519/frost/participant.go (94%) rename {crypto => internal/crypto}/ted25519/frost/round1.go (94%) rename {crypto => internal/crypto}/ted25519/frost/round2.go (97%) rename {crypto => internal/crypto}/ted25519/frost/round3.go (97%) rename {crypto => internal/crypto}/ted25519/frost/rounds_test.go (98%) rename {crypto => internal/crypto}/ted25519/ted25519/ed25519.go (99%) rename {crypto => internal/crypto}/ted25519/ted25519/ed25519_test.go (98%) rename {crypto => internal/crypto}/ted25519/ted25519/ext.go (98%) rename {crypto => internal/crypto}/ted25519/ted25519/ext_test.go (96%) rename {crypto => internal/crypto}/ted25519/ted25519/keygen.go (98%) rename {crypto => internal/crypto}/ted25519/ted25519/keygen_test.go (96%) rename {crypto => internal/crypto}/ted25519/ted25519/noncegen.go (98%) rename {crypto => internal/crypto}/ted25519/ted25519/noncegen_test.go (96%) rename {crypto => internal/crypto}/ted25519/ted25519/partialsig.go (100%) rename {crypto => internal/crypto}/ted25519/ted25519/partialsig_test.go (96%) rename {crypto => internal/crypto}/ted25519/ted25519/sigagg.go (92%) rename {crypto => internal/crypto}/ted25519/ted25519/sigagg_test.go (100%) rename {crypto => internal/crypto}/ted25519/ted25519/twobytwo_test.go (96%) rename {crypto => internal/crypto}/ucan/README.md (100%) rename {crypto => internal/crypto}/ucan/attenuation.go (100%) rename {crypto => internal/crypto}/ucan/attns/UCAN.pkl.go (100%) rename {crypto => internal/crypto}/ucan/attns/capaccount/CapAccount.pkl.go (100%) rename {crypto => internal/crypto}/ucan/attns/capaccount/caps.go (77%) rename {crypto => internal/crypto}/ucan/attns/capinterchain/CapInterchain.pkl.go (100%) rename {crypto => internal/crypto}/ucan/attns/capinterchain/caps.go (78%) rename {crypto => internal/crypto}/ucan/attns/capvault/CapVault.pkl.go (100%) rename {crypto => internal/crypto}/ucan/attns/capvault/caps.go (77%) rename {crypto => internal/crypto}/ucan/attns/exports.go (86%) rename {crypto => internal/crypto}/ucan/attns/init.pkl.go (100%) rename {crypto => internal/crypto}/ucan/attns/resaccount/ResAccount.pkl.go (100%) rename {crypto => internal/crypto}/ucan/attns/resaccount/resource.go (92%) rename {crypto => internal/crypto}/ucan/attns/resinterchain/ResInterchain.pkl.go (100%) rename {crypto => internal/crypto}/ucan/attns/resinterchain/resource.go (92%) rename {crypto => internal/crypto}/ucan/attns/resvault/ResVault.pkl.go (100%) rename {crypto => internal/crypto}/ucan/attns/resvault/resource.go (92%) rename {crypto => internal/crypto}/ucan/context.go (100%) rename {crypto => internal/crypto}/ucan/proof.go (100%) rename {crypto => internal/crypto}/ucan/store.go (100%) rename {crypto => internal/crypto}/ucan/token.go (99%) rename {crypto => internal/crypto}/zkp/schnorr/schnorr.go (98%) rename {crypto => internal/crypto}/zkp/schnorr/schnorr_test.go (94%) delete mode 100644 pkl/README.md delete mode 100644 pkl/basePklProject.pkl delete mode 100644 pkl/matrix.net/AppService.pkl delete mode 100644 pkl/matrix.net/Homeserver.pkl delete mode 100644 pkl/matrix.net/PklProject delete mode 100644 pkl/matrix.net/PklProject.deps.json delete mode 100644 pkl/sonr.net/App.pkl delete mode 100644 pkl/sonr.net/Config.pkl delete mode 100644 pkl/sonr.net/Hway.pkl delete mode 100644 pkl/sonr.net/Motr.pkl delete mode 100644 pkl/sonr.net/PklProject delete mode 100644 pkl/sonr.net/PklProject.deps.json delete mode 100644 pkl/sonr.net/UCAN.pkl rename deploy/process-compose.yaml => process-compose.yaml (100%) rename {internal => x/dwn/types}/embed/codec.go (100%) rename {internal => x/dwn/types}/embed/index.html (100%) rename {internal => x/dwn/types}/embed/main.js (100%) rename {internal => x/dwn/types}/embed/sw.js (100%) rename {internal => x/dwn/types}/embed/utils.go (100%) rename {internal => x/dwn/types}/embed/webworker.go (100%) diff --git a/.cz.toml b/.cz.toml index 724cad368..e39e15263 100644 --- a/.cz.toml +++ b/.cz.toml @@ -3,6 +3,6 @@ name = "cz_conventional_commits" tag_format = "v$version" version_scheme = "semver" version = "0.5.27" -update_changelog_on_bump = true +update_changelog_on_bump = false major_version_zero = true -changelog_file = "./docs/docs/changelog.md" +changelog_file = "CHANGELOG.md" diff --git a/Makefile b/Makefile index ffe87aa07..fe82040cc 100644 --- a/Makefile +++ b/Makefile @@ -75,8 +75,6 @@ ldflags := $(strip $(ldflags)) BUILD_FLAGS := -tags "$(build_tags_comma_sep)" -ldflags '$(ldflags)' -trimpath # The below include contains the tools and runsim targets. -include contrib/devtools/Makefile - all: install lint test build: go.sum diff --git a/Taskfile.yml b/Taskfile.yml index 03b289ec3..c27576e5c 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -57,6 +57,7 @@ tasks: dir: .github/scripts cmds: - sh new_issue.sh + pkl-gen: desc: Generate PKL files silent: true diff --git a/app/gateway/context/middleware.go b/app/gateway/context/middleware.go index 61abf4ea3..40250cd57 100644 --- a/app/gateway/context/middleware.go +++ b/app/gateway/context/middleware.go @@ -6,10 +6,10 @@ import ( "github.com/labstack/echo/v4" "github.com/medama-io/go-useragent" - "github.com/onsonr/sonr/crypto/mpc" + "github.com/onsonr/sonr/internal/crypto/mpc" + "github.com/onsonr/sonr/internal/common" "github.com/onsonr/sonr/internal/config/hway" hwayorm "github.com/onsonr/sonr/internal/database/hwayorm" - "github.com/onsonr/sonr/pkg/common" ) type GatewayContext struct { diff --git a/app/gateway/context/resolver.go b/app/gateway/context/resolver.go index 2fb2aeb31..348136ab7 100644 --- a/app/gateway/context/resolver.go +++ b/app/gateway/context/resolver.go @@ -3,7 +3,7 @@ package context import ( "fmt" - "github.com/onsonr/sonr/pkg/common" + "github.com/onsonr/sonr/internal/common" ) // ParamsBank returns the bank params diff --git a/app/gateway/context/sessions.go b/app/gateway/context/sessions.go index f42557d9a..d1ffe5087 100644 --- a/app/gateway/context/sessions.go +++ b/app/gateway/context/sessions.go @@ -4,7 +4,7 @@ import ( gocontext "context" "github.com/labstack/echo/v4" - "github.com/onsonr/sonr/pkg/common" + "github.com/onsonr/sonr/internal/common" "github.com/segmentio/ksuid" "lukechampine.com/blake3" ) diff --git a/app/gateway/context/vaults.go b/app/gateway/context/vaults.go index 203728f69..4be0d9381 100644 --- a/app/gateway/context/vaults.go +++ b/app/gateway/context/vaults.go @@ -1,8 +1,8 @@ package context import ( - "github.com/onsonr/sonr/crypto/mpc" - "github.com/onsonr/sonr/pkg/common" + "github.com/onsonr/sonr/internal/crypto/mpc" + "github.com/onsonr/sonr/internal/common" "lukechampine.com/blake3" ) diff --git a/app/gateway/gateway.go b/app/gateway/gateway.go index c7ff95839..a14f0f0dd 100644 --- a/app/gateway/gateway.go +++ b/app/gateway/gateway.go @@ -7,9 +7,9 @@ import ( echomiddleware "github.com/labstack/echo/v4/middleware" "github.com/onsonr/sonr/app/gateway/context" "github.com/onsonr/sonr/app/gateway/handlers" + "github.com/onsonr/sonr/internal/common" config "github.com/onsonr/sonr/internal/config/hway" hwayorm "github.com/onsonr/sonr/internal/database/hwayorm" - "github.com/onsonr/sonr/pkg/common" ) type Gateway = *echo.Echo diff --git a/app/gateway/handlers/register.go b/app/gateway/handlers/register.go index 4338fdfa8..0ffc91e72 100644 --- a/app/gateway/handlers/register.go +++ b/app/gateway/handlers/register.go @@ -7,8 +7,8 @@ import ( "github.com/onsonr/sonr/app/gateway/context" "github.com/onsonr/sonr/app/gateway/islands" "github.com/onsonr/sonr/app/gateway/views" + "github.com/onsonr/sonr/internal/common" hwayorm "github.com/onsonr/sonr/internal/database/hwayorm" - "github.com/onsonr/sonr/pkg/common" ) func RegisterHandler(g *echo.Group) { diff --git a/cmd/hway/cmds.go b/cmd/hway/cmds.go index 9890dc388..8a3e65c52 100644 --- a/cmd/hway/cmds.go +++ b/cmd/hway/cmds.go @@ -7,8 +7,8 @@ import ( "os" "strings" - "github.com/onsonr/sonr/pkg/common" "github.com/onsonr/sonr/app/gateway" + "github.com/onsonr/sonr/internal/common" "github.com/spf13/cobra" ) diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile deleted file mode 100644 index 611f0c4d8..000000000 --- a/contrib/devtools/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -### -# Find OS and Go environment -# GO contains the Go binary -# FS contains the OS file separator -### -ifeq ($(OS),Windows_NT) - GO := $(shell where go.exe 2> NUL) - FS := "\\" -else - GO := $(shell command -v go 2> /dev/null) - FS := "/" -endif - -ifeq ($(GO),) - $(error could not find go. Is it in PATH? $(GO)) -endif - -############################################################################### -### Functions ### -############################################################################### - -go_get = $(if $(findstring Windows_NT,$(OS)),\ -IF NOT EXIST $(GITHUBDIR)$(FS)$(1)$(FS) ( mkdir $(GITHUBDIR)$(FS)$(1) ) else (cd .) &\ -IF NOT EXIST $(GITHUBDIR)$(FS)$(1)$(FS)$(2)$(FS) ( cd $(GITHUBDIR)$(FS)$(1) && git clone https://github.com/$(1)/$(2) ) else (cd .) &\ -,\ -mkdir -p $(GITHUBDIR)$(FS)$(1) &&\ -(test ! -d $(GITHUBDIR)$(FS)$(1)$(FS)$(2) && cd $(GITHUBDIR)$(FS)$(1) && git clone https://github.com/$(1)/$(2)) || true &&\ -)\ -cd $(GITHUBDIR)$(FS)$(1)$(FS)$(2) && git fetch origin && git checkout -q $(3) - -mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) -mkfile_dir := $(shell cd $(shell dirname $(mkfile_path)); pwd) - - -############################################################################### -### Tools ### -############################################################################### - -PREFIX ?= /usr/local -BIN ?= $(PREFIX)/bin -UNAME_S ?= $(shell uname -s) -UNAME_M ?= $(shell uname -m) - -GOPATH ?= $(shell $(GO) env GOPATH) -GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com - -BUF_VERSION ?= 0.11.0 - -TOOLS_DESTDIR ?= $(GOPATH)/bin -STATIK = $(TOOLS_DESTDIR)/statik -RUNSIM = $(TOOLS_DESTDIR)/runsim -GOLANGCI_LINT = $(TOOLS_DESTDIR)/golangci-lint - -tools: tools-stamp -tools-stamp: statik runsim golangci-lint - # Create dummy file to satisfy dependency and avoid - # rebuilding when this Makefile target is hit twice - # in a row. - touch $@ - -statik: $(STATIK) -$(STATIK): - @echo "Installing statik..." - @(cd /tmp && go install github.com/rakyll/statik@v0.1.6) - -# Install the runsim binary with a temporary workaround of entering an outside -# directory as the "go get" command ignores the -mod option and will polute the -# go.{mod, sum} files. -# -# ref: https://github.com/golang/go/issues/30515 -runsim: $(RUNSIM) -$(RUNSIM): - @echo "Installing runsim..." - @(cd /tmp && go install github.com/cosmos/tools/cmd/runsim@v1.0.0) - -golangci-lint: $(GOLANGCI_LINT) -$(GOLANGCI_LINT): - @echo "Installing golangci-lint..." - @(cd /tmp && go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.0) - -tools-clean: - rm -f $(STATIK) $(GOLANGCI_LINT) $(RUNSIM) - rm -f tools-stamp - -.PHONY: tools-clean statik runsim diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md deleted file mode 100644 index 659804a61..000000000 --- a/contrib/devtools/README.md +++ /dev/null @@ -1,6 +0,0 @@ -## Contributors - -Thanks to the entire Cosmos SDK team and the contributors who put their efforts into making simulation testing -easier to implement. 🤗 - -https://github.com/cosmos/cosmos-sdk/blob/master/contrib/devtools/Makefile \ No newline at end of file diff --git a/deploy/apps/chainindex/reset.sql b/deploy/apps/chainindex/reset.sql deleted file mode 100644 index 4b4d44d72..000000000 --- a/deploy/apps/chainindex/reset.sql +++ /dev/null @@ -1,78 +0,0 @@ --- Switch to postgres database first -\c postgres; - --- Terminate existing connections -SELECT pg_terminate_backend(pid) -FROM pg_stat_activity -WHERE datname = 'chainindex' -AND pid <> pg_backend_pid(); - --- Drop and recreate database and user -DROP DATABASE IF EXISTS chainindex; -DROP USER IF EXISTS chainindex_user; - -CREATE USER chainindex_user WITH PASSWORD 'chainindex_password123'; -CREATE DATABASE chainindex; - --- Connect to the new database -\c chainindex; - --- Create the blocks table -CREATE TABLE blocks ( - rowid BIGSERIAL PRIMARY KEY, - height BIGINT NOT NULL, - chain_id VARCHAR NOT NULL, - created_at TIMESTAMPTZ NOT NULL, - UNIQUE (height, chain_id) -); - -CREATE INDEX idx_blocks_height_chain ON blocks(height, chain_id); - -CREATE TABLE tx_results ( - rowid BIGSERIAL PRIMARY KEY, - block_id BIGINT NOT NULL REFERENCES blocks(rowid), - index INTEGER NOT NULL, - created_at TIMESTAMPTZ NOT NULL, - tx_hash VARCHAR NOT NULL, - tx_result BYTEA NOT NULL, - UNIQUE (block_id, index) -); - -CREATE TABLE events ( - rowid BIGSERIAL PRIMARY KEY, - block_id BIGINT NOT NULL REFERENCES blocks(rowid), - tx_id BIGINT NULL REFERENCES tx_results(rowid), - type VARCHAR NOT NULL -); - -CREATE TABLE attributes ( - event_id BIGINT NOT NULL REFERENCES events(rowid), - key VARCHAR NOT NULL, - composite_key VARCHAR NOT NULL, - value VARCHAR NULL, - UNIQUE (event_id, key) -); - -CREATE VIEW event_attributes AS - SELECT block_id, tx_id, type, key, composite_key, value - FROM events LEFT JOIN attributes ON (events.rowid = attributes.event_id); - -CREATE VIEW block_events AS - SELECT blocks.rowid as block_id, height, chain_id, type, key, composite_key, value - FROM blocks JOIN event_attributes ON (blocks.rowid = event_attributes.block_id) - WHERE event_attributes.tx_id IS NULL; - -CREATE VIEW tx_events AS - SELECT height, index, chain_id, type, key, composite_key, value, tx_results.created_at - FROM blocks JOIN tx_results ON (blocks.rowid = tx_results.block_id) - JOIN event_attributes ON (tx_results.rowid = event_attributes.tx_id) - WHERE event_attributes.tx_id IS NOT NULL; - --- Grant all necessary privileges -GRANT ALL PRIVILEGES ON DATABASE chainindex TO chainindex_user; -GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO chainindex_user; -GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO chainindex_user; -GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO chainindex_user; -ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO chainindex_user; -ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO chainindex_user; - diff --git a/deploy/apps/chainindex/schema.sql b/deploy/apps/chainindex/schema.sql deleted file mode 100644 index a18663b72..000000000 --- a/deploy/apps/chainindex/schema.sql +++ /dev/null @@ -1,94 +0,0 @@ -/* - This file defines the database schema for the PostgresQL ("psql") event sink - implementation in CometBFT. The operator must create a database and install - this schema before using the database to index events. - */ - --- First, ensure we're connected to the chainindex database -\c chainindex; - --- The blocks table records metadata about each block. --- The block record does not include its events or transactions (see tx_results). -CREATE TABLE blocks ( - rowid BIGSERIAL PRIMARY KEY, - - height BIGINT NOT NULL, - chain_id VARCHAR NOT NULL, - - -- When this block header was logged into the sink, in UTC. - created_at TIMESTAMPTZ NOT NULL, - - UNIQUE (height, chain_id) -); - --- Index blocks by height and chain, since we need to resolve block IDs when --- indexing transaction records and transaction events. -CREATE INDEX idx_blocks_height_chain ON blocks(height, chain_id); - --- The tx_results table records metadata about transaction results. Note that --- the events from a transaction are stored separately. -CREATE TABLE tx_results ( - rowid BIGSERIAL PRIMARY KEY, - - -- The block to which this transaction belongs. - block_id BIGINT NOT NULL REFERENCES blocks(rowid), - -- The sequential index of the transaction within the block. - index INTEGER NOT NULL, - -- When this result record was logged into the sink, in UTC. - created_at TIMESTAMPTZ NOT NULL, - -- The hex-encoded hash of the transaction. - tx_hash VARCHAR NOT NULL, - -- The protobuf wire encoding of the TxResult message. - tx_result BYTEA NOT NULL, - - UNIQUE (block_id, index) -); - --- The events table records events. All events (both block and transaction) are --- associated with a block ID; transaction events also have a transaction ID. -CREATE TABLE events ( - rowid BIGSERIAL PRIMARY KEY, - - -- The block and transaction this event belongs to. - -- If tx_id is NULL, this is a block event. - block_id BIGINT NOT NULL REFERENCES blocks(rowid), - tx_id BIGINT NULL REFERENCES tx_results(rowid), - - -- The application-defined type label for the event. - type VARCHAR NOT NULL -); - --- The attributes table records event attributes. -CREATE TABLE attributes ( - event_id BIGINT NOT NULL REFERENCES events(rowid), - key VARCHAR NOT NULL, -- bare key - composite_key VARCHAR NOT NULL, -- composed type.key - value VARCHAR NULL, - - UNIQUE (event_id, key) -); - --- A joined view of events and their attributes. Events that do not have any --- attributes are represented as a single row with empty key and value fields. -CREATE VIEW event_attributes AS - SELECT block_id, tx_id, type, key, composite_key, value - FROM events LEFT JOIN attributes ON (events.rowid = attributes.event_id); - --- A joined view of all block events (those having tx_id NULL). -CREATE VIEW block_events AS - SELECT blocks.rowid as block_id, height, chain_id, type, key, composite_key, value - FROM blocks JOIN event_attributes ON (blocks.rowid = event_attributes.block_id) - WHERE event_attributes.tx_id IS NULL; - --- A joined view of all transaction events. -CREATE VIEW tx_events AS - SELECT height, index, chain_id, type, key, composite_key, value, tx_results.created_at - FROM blocks JOIN tx_results ON (blocks.rowid = tx_results.block_id) - JOIN event_attributes ON (tx_results.rowid = event_attributes.tx_id) - WHERE event_attributes.tx_id IS NOT NULL; - --- Grant privileges for each database to their respective users -GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO chainindex_user; -GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO chainindex_user; -GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO chainindex_user; - diff --git a/deploy/apps/chainindex/seed.sql b/deploy/apps/chainindex/seed.sql deleted file mode 100644 index 8cdd6feab..000000000 --- a/deploy/apps/chainindex/seed.sql +++ /dev/null @@ -1,29 +0,0 @@ --- Connect to postgres default database -\c postgres; - --- Create databases -CREATE DATABASE chainindex; -CREATE DATABASE highway; -CREATE DATABASE matrixhs; - --- Create users with passwords -CREATE USER chainindex_user WITH PASSWORD 'chainindex_password123'; -CREATE USER highway_user WITH PASSWORD 'highway_password123'; -CREATE USER matrixhs_user WITH PASSWORD 'matrixhs_password123'; - --- Grant privileges for each database to their respective users -\c chainindex; -GRANT ALL PRIVILEGES ON DATABASE chainindex TO chainindex_user; -GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO chainindex_user; -ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO chainindex_user; - -\c highway; -GRANT ALL PRIVILEGES ON DATABASE highway TO highway_user; -GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO highway_user; -ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO highway_user; - -\c matrixhs; -GRANT ALL PRIVILEGES ON DATABASE matrixhs TO matrixhs_user; -GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO matrixhs_user; -ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO matrixhs_user; - diff --git a/deploy/devbox.lock b/deploy/devbox.lock deleted file mode 100644 index 9bc801d92..000000000 --- a/deploy/devbox.lock +++ /dev/null @@ -1,232 +0,0 @@ -{ - "lockfile_version": "1", - "packages": { - "ipfs@latest": { - "last_modified": "2023-02-24T09:01:09Z", - "resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#ipfs", - "source": "devbox-search", - "version": "0.17.0" - }, - "postgresql@latest": { - "last_modified": "2024-12-08T19:40:50Z", - "plugin_version": "0.0.2", - "resolved": "github:NixOS/nixpkgs/dd51f52372a20a93c219e8216fe528a648ffcbf4#postgresql", - "source": "devbox-search", - "version": "16.5", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/6l498xrh9z690js5zmd3p2ps0r00ri9p-postgresql-16.5", - "default": true - }, - { - "name": "man", - "path": "/nix/store/5yiw867cz810zi0z2yg5y794w2sy8kzq-postgresql-16.5-man", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/9mc2nq9m18x0l7c1gyasp064cf2894vx-postgresql-16.5-dev" - }, - { - "name": "doc", - "path": "/nix/store/lxqw2xsh0vm11rcz5wayhskb8w9wjlih-postgresql-16.5-doc" - }, - { - "name": "lib", - "path": "/nix/store/c3a1ij8vyxv5fyg7qp6la2mn54jn84sn-postgresql-16.5-lib" - } - ], - "store_path": "/nix/store/6l498xrh9z690js5zmd3p2ps0r00ri9p-postgresql-16.5" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/vjcavy1l0s1l0frjag900239cpmvj17f-postgresql-16.5", - "default": true - }, - { - "name": "man", - "path": "/nix/store/4l4a2044a6mb79sm46679ifappmj8vgc-postgresql-16.5-man", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/zlw8cxkzf9a43mmplsp88dbjy8adbjkx-postgresql-16.5-debug" - }, - { - "name": "dev", - "path": "/nix/store/8mbabq6zp86a1gm2nf109pa1dvgp8s02-postgresql-16.5-dev" - }, - { - "name": "doc", - "path": "/nix/store/1sa3z90r6hrcfsd4hy4rxbwzbw6aa4p6-postgresql-16.5-doc" - }, - { - "name": "lib", - "path": "/nix/store/gr06jpjpxzqkpyyhg1f7v9mmy1f9qzgp-postgresql-16.5-lib" - } - ], - "store_path": "/nix/store/vjcavy1l0s1l0frjag900239cpmvj17f-postgresql-16.5" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/808d9axcd5q934lsi3l5v3x8phks9wc4-postgresql-16.5", - "default": true - }, - { - "name": "man", - "path": "/nix/store/8njx7dcc3gj9j46cn5lfc8knd52hvl7k-postgresql-16.5-man", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/pn22i14qpv3yxmaacd5yfcqxpqm3grlq-postgresql-16.5-dev" - }, - { - "name": "doc", - "path": "/nix/store/kd05cfbhaiiihdx6kkrjdyrywgjzfnqj-postgresql-16.5-doc" - }, - { - "name": "lib", - "path": "/nix/store/1gnp8q95nfjna56sllv66jbf6hshi6bd-postgresql-16.5-lib" - } - ], - "store_path": "/nix/store/808d9axcd5q934lsi3l5v3x8phks9wc4-postgresql-16.5" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/0z5iwcvalafm3j2c5pfhllsfbxrbyzf4-postgresql-16.5", - "default": true - }, - { - "name": "man", - "path": "/nix/store/0q9yki1d9czy7i7mly8gy3ffjvc3hkqv-postgresql-16.5-man", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/zvysixjns32iz6qlkr8s5b70cw50l0qy-postgresql-16.5-debug" - }, - { - "name": "dev", - "path": "/nix/store/207n898zbi7mb5scjaf532v78c3rll9f-postgresql-16.5-dev" - }, - { - "name": "doc", - "path": "/nix/store/7ip3havx020h3527y7cqdl8l39p3g67b-postgresql-16.5-doc" - }, - { - "name": "lib", - "path": "/nix/store/qi2zbhdnzdci7i0a6g64mbkk8wnzznlh-postgresql-16.5-lib" - } - ], - "store_path": "/nix/store/0z5iwcvalafm3j2c5pfhllsfbxrbyzf4-postgresql-16.5" - } - } - }, - "process-compose@latest": { - "last_modified": "2024-12-04T16:45:45Z", - "resolved": "github:NixOS/nixpkgs/2f9d395f057a50f8076f633c10519035fce8d773#process-compose", - "source": "devbox-search", - "version": "1.40.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/iz6ckcr1s8vy71b3wqvs680g2mwpf9jk-process-compose-1.40.1", - "default": true - } - ], - "store_path": "/nix/store/iz6ckcr1s8vy71b3wqvs680g2mwpf9jk-process-compose-1.40.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/7jw864z6wlzcirsz8fgaj2bw0f22izch-process-compose-1.40.1", - "default": true - } - ], - "store_path": "/nix/store/7jw864z6wlzcirsz8fgaj2bw0f22izch-process-compose-1.40.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/mrdrciqg6zjrblgjaya6bxqd57knf09r-process-compose-1.40.1", - "default": true - } - ], - "store_path": "/nix/store/mrdrciqg6zjrblgjaya6bxqd57knf09r-process-compose-1.40.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/0vq97wmm879440n8plsk1yjc1g28ai85-process-compose-1.40.1", - "default": true - } - ], - "store_path": "/nix/store/0vq97wmm879440n8plsk1yjc1g28ai85-process-compose-1.40.1" - } - } - }, - "tigerbeetle@latest": { - "last_modified": "2024-12-17T11:43:56Z", - "resolved": "github:NixOS/nixpkgs/4989a246d7a390a859852baddb1013f825435cee#tigerbeetle", - "source": "devbox-search", - "version": "0.16.17", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/89c3g9b3sscjv6nk01zq4h901gm15l7v-tigerbeetle-0.16.17", - "default": true - } - ], - "store_path": "/nix/store/89c3g9b3sscjv6nk01zq4h901gm15l7v-tigerbeetle-0.16.17" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/16l13g01n0vxim291x79apxdhxfg66rh-tigerbeetle-0.16.17", - "default": true - } - ], - "store_path": "/nix/store/16l13g01n0vxim291x79apxdhxfg66rh-tigerbeetle-0.16.17" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/8di9nxpw06kcvzfyhpbwc46y16qjp9gr-tigerbeetle-0.16.17", - "default": true - } - ], - "store_path": "/nix/store/8di9nxpw06kcvzfyhpbwc46y16qjp9gr-tigerbeetle-0.16.17" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/4kldrqg1wm877p4kx4n2ddifq5klxhix-tigerbeetle-0.16.17", - "default": true - } - ], - "store_path": "/nix/store/4kldrqg1wm877p4kx4n2ddifq5klxhix-tigerbeetle-0.16.17" - } - } - } - } -} diff --git a/pkg/chain/README.md b/internal/chain/README.md similarity index 100% rename from pkg/chain/README.md rename to internal/chain/README.md diff --git a/pkg/chain/appmodule/environment.go b/internal/chain/appmodule/environment.go similarity index 77% rename from pkg/chain/appmodule/environment.go rename to internal/chain/appmodule/environment.go index fd1762897..99785f4b9 100644 --- a/pkg/chain/appmodule/environment.go +++ b/internal/chain/appmodule/environment.go @@ -6,10 +6,10 @@ import ( "cosmossdk.io/core/header" "cosmossdk.io/core/store" - "github.com/onsonr/sonr/pkg/chain/branch" - "github.com/onsonr/sonr/pkg/chain/log" - "github.com/onsonr/sonr/pkg/chain/router" - "github.com/onsonr/sonr/pkg/chain/transaction" + "github.com/onsonr/sonr/internal/chain/branch" + "github.com/onsonr/sonr/internal/chain/log" + "github.com/onsonr/sonr/internal/chain/router" + "github.com/onsonr/sonr/internal/chain/transaction" ) // Environment is used to get all services to their respective module. diff --git a/pkg/chain/branch/branch.go b/internal/chain/branch/branch.go similarity index 100% rename from pkg/chain/branch/branch.go rename to internal/chain/branch/branch.go diff --git a/pkg/chain/log/logger.go b/internal/chain/log/logger.go similarity index 100% rename from pkg/chain/log/logger.go rename to internal/chain/log/logger.go diff --git a/pkg/chain/router/service.go b/internal/chain/router/service.go similarity index 90% rename from pkg/chain/router/service.go rename to internal/chain/router/service.go index 8c2c2aad5..acaef82f5 100644 --- a/pkg/chain/router/service.go +++ b/internal/chain/router/service.go @@ -3,7 +3,7 @@ package router import ( "context" - "github.com/onsonr/sonr/pkg/chain/transaction" + "github.com/onsonr/sonr/internal/chain/transaction" ) // Service is the interface that wraps the basic methods for a router. diff --git a/pkg/chain/transaction/service.go b/internal/chain/transaction/service.go similarity index 100% rename from pkg/chain/transaction/service.go rename to internal/chain/transaction/service.go diff --git a/pkg/chain/transaction/transaction.go b/internal/chain/transaction/transaction.go similarity index 100% rename from pkg/chain/transaction/transaction.go rename to internal/chain/transaction/transaction.go diff --git a/pkg/common/chain_query.go b/internal/common/chain_query.go similarity index 100% rename from pkg/common/chain_query.go rename to internal/common/chain_query.go diff --git a/pkg/common/http_cookies.go b/internal/common/http_cookies.go similarity index 100% rename from pkg/common/http_cookies.go rename to internal/common/http_cookies.go diff --git a/pkg/common/http_headers.go b/internal/common/http_headers.go similarity index 100% rename from pkg/common/http_headers.go rename to internal/common/http_headers.go diff --git a/pkg/common/ipfs_api.go b/internal/common/ipfs_api.go similarity index 100% rename from pkg/common/ipfs_api.go rename to internal/common/ipfs_api.go diff --git a/pkg/common/ipfs_file.go b/internal/common/ipfs_file.go similarity index 100% rename from pkg/common/ipfs_file.go rename to internal/common/ipfs_file.go diff --git a/pkg/common/ipfs_folder.go b/internal/common/ipfs_folder.go similarity index 100% rename from pkg/common/ipfs_folder.go rename to internal/common/ipfs_folder.go diff --git a/pkg/common/ucan_store.go b/internal/common/ucan_store.go similarity index 97% rename from pkg/common/ucan_store.go rename to internal/common/ucan_store.go index 5a3d17122..549379226 100644 --- a/pkg/common/ucan_store.go +++ b/internal/common/ucan_store.go @@ -8,8 +8,8 @@ import ( "github.com/golang-jwt/jwt" "github.com/ipfs/go-cid" - "github.com/onsonr/sonr/crypto/keys" - "github.com/onsonr/sonr/crypto/ucan" + "github.com/onsonr/sonr/internal/crypto/keys" + "github.com/onsonr/sonr/internal/crypto/ucan" ) type IPFSTokenStore interface { diff --git a/crypto/accumulator/accumulator.go b/internal/crypto/accumulator/accumulator.go similarity index 98% rename from crypto/accumulator/accumulator.go rename to internal/crypto/accumulator/accumulator.go index c3687628d..629f00b94 100755 --- a/crypto/accumulator/accumulator.go +++ b/internal/crypto/accumulator/accumulator.go @@ -16,7 +16,7 @@ import ( "git.sr.ht/~sircmpwn/go-bare" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type structMarshal struct { diff --git a/crypto/accumulator/accumulator_test.go b/internal/crypto/accumulator/accumulator_test.go similarity index 99% rename from crypto/accumulator/accumulator_test.go rename to internal/crypto/accumulator/accumulator_test.go index 65eb580b5..fd1d467fb 100755 --- a/crypto/accumulator/accumulator_test.go +++ b/internal/crypto/accumulator/accumulator_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestNewAccumulator100(t *testing.T) { diff --git a/crypto/accumulator/key.go b/internal/crypto/accumulator/key.go similarity index 99% rename from crypto/accumulator/key.go rename to internal/crypto/accumulator/key.go index 7b73a3f54..a527d7be4 100755 --- a/crypto/accumulator/key.go +++ b/internal/crypto/accumulator/key.go @@ -12,7 +12,7 @@ import ( "git.sr.ht/~sircmpwn/go-bare" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // SecretKey is the secret alpha only held by the accumulator manager. diff --git a/crypto/accumulator/key_test.go b/internal/crypto/accumulator/key_test.go similarity index 97% rename from crypto/accumulator/key_test.go rename to internal/crypto/accumulator/key_test.go index 75c8183e7..446b28b3c 100755 --- a/crypto/accumulator/key_test.go +++ b/internal/crypto/accumulator/key_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestSecretKeyMarshal(t *testing.T) { diff --git a/crypto/accumulator/lib.go b/internal/crypto/accumulator/lib.go similarity index 98% rename from crypto/accumulator/lib.go rename to internal/crypto/accumulator/lib.go index 66c82662b..d971c8f9d 100755 --- a/crypto/accumulator/lib.go +++ b/internal/crypto/accumulator/lib.go @@ -10,7 +10,7 @@ import ( "fmt" "math" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // dad constructs two polynomials - dA(x) and dD(x) diff --git a/crypto/accumulator/lib_test.go b/internal/crypto/accumulator/lib_test.go similarity index 99% rename from crypto/accumulator/lib_test.go rename to internal/crypto/accumulator/lib_test.go index b7ec55f3c..901d40135 100755 --- a/crypto/accumulator/lib_test.go +++ b/internal/crypto/accumulator/lib_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestEvaluatePolyG1(t *testing.T) { diff --git a/crypto/accumulator/proof.go b/internal/crypto/accumulator/proof.go similarity index 99% rename from crypto/accumulator/proof.go rename to internal/crypto/accumulator/proof.go index 9af282935..accd29fde 100755 --- a/crypto/accumulator/proof.go +++ b/internal/crypto/accumulator/proof.go @@ -14,7 +14,7 @@ import ( "git.sr.ht/~sircmpwn/go-bare" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type proofParamsMarshal struct { diff --git a/crypto/accumulator/proof_test.go b/internal/crypto/accumulator/proof_test.go similarity index 99% rename from crypto/accumulator/proof_test.go rename to internal/crypto/accumulator/proof_test.go index 89d086ffc..4b0eeb832 100755 --- a/crypto/accumulator/proof_test.go +++ b/internal/crypto/accumulator/proof_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestProofParamsMarshal(t *testing.T) { diff --git a/crypto/accumulator/witness.go b/internal/crypto/accumulator/witness.go similarity index 99% rename from crypto/accumulator/witness.go rename to internal/crypto/accumulator/witness.go index 0be288136..0e87b97d4 100755 --- a/crypto/accumulator/witness.go +++ b/internal/crypto/accumulator/witness.go @@ -12,7 +12,7 @@ import ( "git.sr.ht/~sircmpwn/go-bare" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // MembershipWitness contains the witness c and the value y respect to the accumulator state. diff --git a/crypto/accumulator/witness_test.go b/internal/crypto/accumulator/witness_test.go similarity index 99% rename from crypto/accumulator/witness_test.go rename to internal/crypto/accumulator/witness_test.go index 317364a1c..4639f346f 100755 --- a/crypto/accumulator/witness_test.go +++ b/internal/crypto/accumulator/witness_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func Test_Membership_Witness_New(t *testing.T) { diff --git a/crypto/bulletproof/generators.go b/internal/crypto/bulletproof/generators.go similarity index 97% rename from crypto/bulletproof/generators.go rename to internal/crypto/bulletproof/generators.go index 31efd05f4..7bb82a53d 100755 --- a/crypto/bulletproof/generators.go +++ b/internal/crypto/bulletproof/generators.go @@ -10,7 +10,7 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // generators contains a list of points to be used as generators for bulletproofs. diff --git a/crypto/bulletproof/generators_test.go b/internal/crypto/bulletproof/generators_test.go similarity index 96% rename from crypto/bulletproof/generators_test.go rename to internal/crypto/bulletproof/generators_test.go index 35ca657ff..acb6c1e7c 100755 --- a/crypto/bulletproof/generators_test.go +++ b/internal/crypto/bulletproof/generators_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestGeneratorsHappyPath(t *testing.T) { diff --git a/crypto/bulletproof/helpers.go b/internal/crypto/bulletproof/helpers.go similarity index 99% rename from crypto/bulletproof/helpers.go rename to internal/crypto/bulletproof/helpers.go index 3be6431a8..19feef634 100755 --- a/crypto/bulletproof/helpers.go +++ b/internal/crypto/bulletproof/helpers.go @@ -9,7 +9,7 @@ package bulletproof import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // innerProduct takes two lists of scalars (a, b) and performs the dot product returning a single scalar. diff --git a/crypto/bulletproof/helpers_test.go b/internal/crypto/bulletproof/helpers_test.go similarity index 97% rename from crypto/bulletproof/helpers_test.go rename to internal/crypto/bulletproof/helpers_test.go index 10ec288b3..bdbbdf036 100755 --- a/crypto/bulletproof/helpers_test.go +++ b/internal/crypto/bulletproof/helpers_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestInnerProductHappyPath(t *testing.T) { diff --git a/crypto/bulletproof/ipp_prover.go b/internal/crypto/bulletproof/ipp_prover.go similarity index 99% rename from crypto/bulletproof/ipp_prover.go rename to internal/crypto/bulletproof/ipp_prover.go index 53eb01834..98cbc2d20 100755 --- a/crypto/bulletproof/ipp_prover.go +++ b/internal/crypto/bulletproof/ipp_prover.go @@ -11,7 +11,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // InnerProductProver is the struct used to create InnerProductProofs diff --git a/crypto/bulletproof/ipp_prover_test.go b/internal/crypto/bulletproof/ipp_prover_test.go similarity index 98% rename from crypto/bulletproof/ipp_prover_test.go rename to internal/crypto/bulletproof/ipp_prover_test.go index 1199f178c..9d4d63964 100755 --- a/crypto/bulletproof/ipp_prover_test.go +++ b/internal/crypto/bulletproof/ipp_prover_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestIPPHappyPath(t *testing.T) { diff --git a/crypto/bulletproof/ipp_verifier.go b/internal/crypto/bulletproof/ipp_verifier.go similarity index 99% rename from crypto/bulletproof/ipp_verifier.go rename to internal/crypto/bulletproof/ipp_verifier.go index 56977b51d..84fcb5f32 100755 --- a/crypto/bulletproof/ipp_verifier.go +++ b/internal/crypto/bulletproof/ipp_verifier.go @@ -4,7 +4,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // InnerProductVerifier is the struct used to verify inner product proofs diff --git a/crypto/bulletproof/ipp_verifier_test.go b/internal/crypto/bulletproof/ipp_verifier_test.go similarity index 97% rename from crypto/bulletproof/ipp_verifier_test.go rename to internal/crypto/bulletproof/ipp_verifier_test.go index 84b2e2e61..9f3483e5c 100755 --- a/crypto/bulletproof/ipp_verifier_test.go +++ b/internal/crypto/bulletproof/ipp_verifier_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestIPPVerifyHappyPath(t *testing.T) { diff --git a/crypto/bulletproof/range_batch_prover.go b/internal/crypto/bulletproof/range_batch_prover.go similarity index 99% rename from crypto/bulletproof/range_batch_prover.go rename to internal/crypto/bulletproof/range_batch_prover.go index 0284ae7b6..1b9e77f3e 100755 --- a/crypto/bulletproof/range_batch_prover.go +++ b/internal/crypto/bulletproof/range_batch_prover.go @@ -6,7 +6,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // BatchProve proves that a list of scalars v are in the range n. diff --git a/crypto/bulletproof/range_batch_prover_test.go b/internal/crypto/bulletproof/range_batch_prover_test.go similarity index 98% rename from crypto/bulletproof/range_batch_prover_test.go rename to internal/crypto/bulletproof/range_batch_prover_test.go index d781c2dbf..f5793cb00 100755 --- a/crypto/bulletproof/range_batch_prover_test.go +++ b/internal/crypto/bulletproof/range_batch_prover_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestRangeBatchProverHappyPath(t *testing.T) { diff --git a/crypto/bulletproof/range_batch_verifier.go b/internal/crypto/bulletproof/range_batch_verifier.go similarity index 98% rename from crypto/bulletproof/range_batch_verifier.go rename to internal/crypto/bulletproof/range_batch_verifier.go index e22161ccd..32f77d4ca 100755 --- a/crypto/bulletproof/range_batch_verifier.go +++ b/internal/crypto/bulletproof/range_batch_verifier.go @@ -4,7 +4,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // VerifyBatched verifies a given batched range proof. diff --git a/crypto/bulletproof/range_batch_verifier_test.go b/internal/crypto/bulletproof/range_batch_verifier_test.go similarity index 98% rename from crypto/bulletproof/range_batch_verifier_test.go rename to internal/crypto/bulletproof/range_batch_verifier_test.go index f9f6d554c..987519bc8 100755 --- a/crypto/bulletproof/range_batch_verifier_test.go +++ b/internal/crypto/bulletproof/range_batch_verifier_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestRangeBatchVerifyHappyPath(t *testing.T) { diff --git a/crypto/bulletproof/range_prover.go b/internal/crypto/bulletproof/range_prover.go similarity index 99% rename from crypto/bulletproof/range_prover.go rename to internal/crypto/bulletproof/range_prover.go index 852a4f378..0d23755e6 100755 --- a/crypto/bulletproof/range_prover.go +++ b/internal/crypto/bulletproof/range_prover.go @@ -14,7 +14,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // RangeProver is the struct used to create RangeProofs diff --git a/crypto/bulletproof/range_prover_test.go b/internal/crypto/bulletproof/range_prover_test.go similarity index 97% rename from crypto/bulletproof/range_prover_test.go rename to internal/crypto/bulletproof/range_prover_test.go index 333e02aec..e811a918f 100755 --- a/crypto/bulletproof/range_prover_test.go +++ b/internal/crypto/bulletproof/range_prover_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestRangeProverHappyPath(t *testing.T) { diff --git a/crypto/bulletproof/range_verifier.go b/internal/crypto/bulletproof/range_verifier.go similarity index 99% rename from crypto/bulletproof/range_verifier.go rename to internal/crypto/bulletproof/range_verifier.go index f17db1036..2ba16198d 100755 --- a/crypto/bulletproof/range_verifier.go +++ b/internal/crypto/bulletproof/range_verifier.go @@ -4,7 +4,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // RangeVerifier is the struct used to verify RangeProofs diff --git a/crypto/bulletproof/range_verifier_test.go b/internal/crypto/bulletproof/range_verifier_test.go similarity index 97% rename from crypto/bulletproof/range_verifier_test.go rename to internal/crypto/bulletproof/range_verifier_test.go index 2d5383c94..9c54cdb9e 100755 --- a/crypto/bulletproof/range_verifier_test.go +++ b/internal/crypto/bulletproof/range_verifier_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestRangeVerifyHappyPath(t *testing.T) { diff --git a/crypto/core/README.md b/internal/crypto/core/README.md similarity index 100% rename from crypto/core/README.md rename to internal/crypto/core/README.md diff --git a/crypto/core/commit.go b/internal/crypto/core/commit.go similarity index 100% rename from crypto/core/commit.go rename to internal/crypto/core/commit.go diff --git a/crypto/core/commit_test.go b/internal/crypto/core/commit_test.go similarity index 100% rename from crypto/core/commit_test.go rename to internal/crypto/core/commit_test.go diff --git a/crypto/core/curves/bls12377_curve.go b/internal/crypto/core/curves/bls12377_curve.go similarity index 99% rename from crypto/core/curves/bls12377_curve.go rename to internal/crypto/core/curves/bls12377_curve.go index 5fdf01552..2642d2226 100755 --- a/crypto/core/curves/bls12377_curve.go +++ b/internal/crypto/core/curves/bls12377_curve.go @@ -19,7 +19,7 @@ import ( bls12377 "github.com/consensys/gnark-crypto/ecc/bls12-377" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/internal/crypto/core" ) // See 'r' = https://eprint.iacr.org/2018/962.pdf Figure 16 diff --git a/crypto/core/curves/bls12381_curve.go b/internal/crypto/core/curves/bls12381_curve.go similarity index 99% rename from crypto/core/curves/bls12381_curve.go rename to internal/crypto/core/curves/bls12381_curve.go index 2be154f42..a4c5b7b94 100755 --- a/crypto/core/curves/bls12381_curve.go +++ b/internal/crypto/core/curves/bls12381_curve.go @@ -13,9 +13,9 @@ import ( "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/internal" ) var bls12381modulus = bhex("1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab") diff --git a/crypto/core/curves/curve.go b/internal/crypto/core/curves/curve.go similarity index 99% rename from crypto/core/curves/curve.go rename to internal/crypto/core/curves/curve.go index d06fb7f91..1e9e2bf45 100755 --- a/crypto/core/curves/curve.go +++ b/internal/crypto/core/curves/curve.go @@ -16,7 +16,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" ) var ( diff --git a/crypto/core/curves/ec_point.go b/internal/crypto/core/curves/ec_point.go similarity index 98% rename from crypto/core/curves/ec_point.go rename to internal/crypto/core/curves/ec_point.go index bfb0b0ec2..cb2d8d67e 100755 --- a/crypto/core/curves/ec_point.go +++ b/internal/crypto/core/curves/ec_point.go @@ -12,10 +12,10 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/internal/crypto/core" "github.com/dustinxie/ecc" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) var curveNameToID = map[string]byte{ diff --git a/crypto/core/curves/ec_point_test.go b/internal/crypto/core/curves/ec_point_test.go similarity index 98% rename from crypto/core/curves/ec_point_test.go rename to internal/crypto/core/curves/ec_point_test.go index 2199f11cb..4517c7418 100755 --- a/crypto/core/curves/ec_point_test.go +++ b/internal/crypto/core/curves/ec_point_test.go @@ -15,8 +15,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core" - tt "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core" + tt "github.com/onsonr/sonr/internal/crypto/internal" ) func TestIsIdentity(t *testing.T) { diff --git a/crypto/core/curves/ec_scalar.go b/internal/crypto/core/curves/ec_scalar.go similarity index 97% rename from crypto/core/curves/ec_scalar.go rename to internal/crypto/core/curves/ec_scalar.go index 3e193fb4d..a3c2f953a 100755 --- a/crypto/core/curves/ec_scalar.go +++ b/internal/crypto/core/curves/ec_scalar.go @@ -18,9 +18,9 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/bwesterb/go-ristretto" - "github.com/onsonr/sonr/crypto/core" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/internal" ) type EcScalar interface { diff --git a/crypto/core/curves/ecdsa.go b/internal/crypto/core/curves/ecdsa.go similarity index 100% rename from crypto/core/curves/ecdsa.go rename to internal/crypto/core/curves/ecdsa.go diff --git a/crypto/core/curves/ed25519_curve.go b/internal/crypto/core/curves/ed25519_curve.go similarity index 99% rename from crypto/core/curves/ed25519_curve.go rename to internal/crypto/core/curves/ed25519_curve.go index 9c31d7a5b..076063d2c 100755 --- a/crypto/core/curves/ed25519_curve.go +++ b/internal/crypto/core/curves/ed25519_curve.go @@ -19,7 +19,7 @@ import ( "github.com/bwesterb/go-ristretto" ed "github.com/bwesterb/go-ristretto/edwards25519" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) type ScalarEd25519 struct { diff --git a/crypto/core/curves/ed25519_curve_test.go b/internal/crypto/core/curves/ed25519_curve_test.go similarity index 99% rename from crypto/core/curves/ed25519_curve_test.go rename to internal/crypto/core/curves/ed25519_curve_test.go index 1c665f536..3224947d0 100755 --- a/crypto/core/curves/ed25519_curve_test.go +++ b/internal/crypto/core/curves/ed25519_curve_test.go @@ -15,7 +15,7 @@ import ( ed "filippo.io/edwards25519" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) func TestScalarEd25519Random(t *testing.T) { diff --git a/crypto/core/curves/field.go b/internal/crypto/core/curves/field.go similarity index 100% rename from crypto/core/curves/field.go rename to internal/crypto/core/curves/field.go diff --git a/crypto/core/curves/field_test.go b/internal/crypto/core/curves/field_test.go similarity index 100% rename from crypto/core/curves/field_test.go rename to internal/crypto/core/curves/field_test.go diff --git a/crypto/core/curves/k256_bench_test.go b/internal/crypto/core/curves/k256_bench_test.go similarity index 98% rename from crypto/core/curves/k256_bench_test.go rename to internal/crypto/core/curves/k256_bench_test.go index 94dd39ef6..26412db6b 100755 --- a/crypto/core/curves/k256_bench_test.go +++ b/internal/crypto/core/curves/k256_bench_test.go @@ -9,8 +9,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" - mod "github.com/onsonr/sonr/crypto/core" - "github.com/onsonr/sonr/crypto/internal" + mod "github.com/onsonr/sonr/internal/crypto/core" + "github.com/onsonr/sonr/internal/crypto/internal" ) func BenchmarkK256(b *testing.B) { diff --git a/crypto/core/curves/k256_curve.go b/internal/crypto/core/curves/k256_curve.go similarity index 97% rename from crypto/core/curves/k256_curve.go rename to internal/crypto/core/curves/k256_curve.go index 3be001d32..c04331048 100755 --- a/crypto/core/curves/k256_curve.go +++ b/internal/crypto/core/curves/k256_curve.go @@ -15,11 +15,11 @@ import ( "github.com/btcsuite/btcd/btcec/v2" - "github.com/onsonr/sonr/crypto/core/curves/native" - secp256k1 "github.com/onsonr/sonr/crypto/core/curves/native/k256" - "github.com/onsonr/sonr/crypto/core/curves/native/k256/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/k256/fq" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + secp256k1 "github.com/onsonr/sonr/internal/crypto/core/curves/native/k256" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/k256/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/k256/fq" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/core/curves/k256_curve_test.go b/internal/crypto/core/curves/k256_curve_test.go similarity index 100% rename from crypto/core/curves/k256_curve_test.go rename to internal/crypto/core/curves/k256_curve_test.go diff --git a/crypto/core/curves/native/bls12381/bls12381.go b/internal/crypto/core/curves/native/bls12381/bls12381.go similarity index 96% rename from crypto/core/curves/native/bls12381/bls12381.go rename to internal/crypto/core/curves/native/bls12381/bls12381.go index 4397bcbed..5e798f208 100755 --- a/crypto/core/curves/native/bls12381/bls12381.go +++ b/internal/crypto/core/curves/native/bls12381/bls12381.go @@ -3,7 +3,7 @@ package bls12381 import ( "math/bits" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) var fqModulusBytes = [native.FieldBytes]byte{0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x5b, 0xfe, 0xff, 0x02, 0xa4, 0xbd, 0x53, 0x05, 0xd8, 0xa1, 0x09, 0x08, 0xd8, 0x39, 0x33, 0x48, 0x7d, 0x9d, 0x29, 0x53, 0xa7, 0xed, 0x73} diff --git a/crypto/core/curves/native/bls12381/fp.go b/internal/crypto/core/curves/native/bls12381/fp.go similarity index 99% rename from crypto/core/curves/native/bls12381/fp.go rename to internal/crypto/core/curves/native/bls12381/fp.go index 5391686ee..d2c5ce67c 100755 --- a/crypto/core/curves/native/bls12381/fp.go +++ b/internal/crypto/core/curves/native/bls12381/fp.go @@ -6,8 +6,8 @@ import ( "io" "math/big" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) // fp field element mod p diff --git a/crypto/core/curves/native/bls12381/fp12.go b/internal/crypto/core/curves/native/bls12381/fp12.go similarity index 100% rename from crypto/core/curves/native/bls12381/fp12.go rename to internal/crypto/core/curves/native/bls12381/fp12.go diff --git a/crypto/core/curves/native/bls12381/fp12_test.go b/internal/crypto/core/curves/native/bls12381/fp12_test.go similarity index 100% rename from crypto/core/curves/native/bls12381/fp12_test.go rename to internal/crypto/core/curves/native/bls12381/fp12_test.go diff --git a/crypto/core/curves/native/bls12381/fp2.go b/internal/crypto/core/curves/native/bls12381/fp2.go similarity index 100% rename from crypto/core/curves/native/bls12381/fp2.go rename to internal/crypto/core/curves/native/bls12381/fp2.go diff --git a/crypto/core/curves/native/bls12381/fp2_test.go b/internal/crypto/core/curves/native/bls12381/fp2_test.go similarity index 100% rename from crypto/core/curves/native/bls12381/fp2_test.go rename to internal/crypto/core/curves/native/bls12381/fp2_test.go diff --git a/crypto/core/curves/native/bls12381/fp6.go b/internal/crypto/core/curves/native/bls12381/fp6.go similarity index 100% rename from crypto/core/curves/native/bls12381/fp6.go rename to internal/crypto/core/curves/native/bls12381/fp6.go diff --git a/crypto/core/curves/native/bls12381/fp6_test.go b/internal/crypto/core/curves/native/bls12381/fp6_test.go similarity index 100% rename from crypto/core/curves/native/bls12381/fp6_test.go rename to internal/crypto/core/curves/native/bls12381/fp6_test.go diff --git a/crypto/core/curves/native/bls12381/fp_test.go b/internal/crypto/core/curves/native/bls12381/fp_test.go similarity index 99% rename from crypto/core/curves/native/bls12381/fp_test.go rename to internal/crypto/core/curves/native/bls12381/fp_test.go index 6152ada0c..4c1f75aef 100755 --- a/crypto/core/curves/native/bls12381/fp_test.go +++ b/internal/crypto/core/curves/native/bls12381/fp_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) func TestFpSetOne(t *testing.T) { diff --git a/crypto/core/curves/native/bls12381/fq.go b/internal/crypto/core/curves/native/bls12381/fq.go similarity index 99% rename from crypto/core/curves/native/bls12381/fq.go rename to internal/crypto/core/curves/native/bls12381/fq.go index 9ecf00ef1..2fa51992e 100755 --- a/crypto/core/curves/native/bls12381/fq.go +++ b/internal/crypto/core/curves/native/bls12381/fq.go @@ -5,7 +5,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) type Fq [native.FieldLimbs]uint64 diff --git a/crypto/core/curves/native/bls12381/fq_test.go b/internal/crypto/core/curves/native/bls12381/fq_test.go similarity index 98% rename from crypto/core/curves/native/bls12381/fq_test.go rename to internal/crypto/core/curves/native/bls12381/fq_test.go index f291e63ff..2746a3861 100755 --- a/crypto/core/curves/native/bls12381/fq_test.go +++ b/internal/crypto/core/curves/native/bls12381/fq_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) func TestFqSetOne(t *testing.T) { diff --git a/crypto/core/curves/native/bls12381/g1.go b/internal/crypto/core/curves/native/bls12381/g1.go similarity index 99% rename from crypto/core/curves/native/bls12381/g1.go rename to internal/crypto/core/curves/native/bls12381/g1.go index 6f7425c0f..81d5b73d9 100755 --- a/crypto/core/curves/native/bls12381/g1.go +++ b/internal/crypto/core/curves/native/bls12381/g1.go @@ -7,8 +7,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/core/curves/native/bls12381/g1_test.go b/internal/crypto/core/curves/native/bls12381/g1_test.go similarity index 99% rename from crypto/core/curves/native/bls12381/g1_test.go rename to internal/crypto/core/curves/native/bls12381/g1_test.go index e8ab16463..fe51cea32 100755 --- a/crypto/core/curves/native/bls12381/g1_test.go +++ b/internal/crypto/core/curves/native/bls12381/g1_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) func TestG1IsOnCurve(t *testing.T) { diff --git a/crypto/core/curves/native/bls12381/g2.go b/internal/crypto/core/curves/native/bls12381/g2.go similarity index 99% rename from crypto/core/curves/native/bls12381/g2.go rename to internal/crypto/core/curves/native/bls12381/g2.go index ac45d8105..1fd28cd16 100755 --- a/crypto/core/curves/native/bls12381/g2.go +++ b/internal/crypto/core/curves/native/bls12381/g2.go @@ -7,8 +7,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/core/curves/native/bls12381/g2_test.go b/internal/crypto/core/curves/native/bls12381/g2_test.go similarity index 99% rename from crypto/core/curves/native/bls12381/g2_test.go rename to internal/crypto/core/curves/native/bls12381/g2_test.go index faee647d6..32a280368 100755 --- a/crypto/core/curves/native/bls12381/g2_test.go +++ b/internal/crypto/core/curves/native/bls12381/g2_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) func TestG2IsOnCurve(t *testing.T) { diff --git a/crypto/core/curves/native/bls12381/gt.go b/internal/crypto/core/curves/native/bls12381/gt.go similarity index 98% rename from crypto/core/curves/native/bls12381/gt.go rename to internal/crypto/core/curves/native/bls12381/gt.go index fb23ac4a8..131d4839f 100755 --- a/crypto/core/curves/native/bls12381/gt.go +++ b/internal/crypto/core/curves/native/bls12381/gt.go @@ -3,8 +3,8 @@ package bls12381 import ( "io" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) // GtFieldBytes is the number of bytes needed to represent this field diff --git a/crypto/core/curves/native/bls12381/pairings.go b/internal/crypto/core/curves/native/bls12381/pairings.go similarity index 100% rename from crypto/core/curves/native/bls12381/pairings.go rename to internal/crypto/core/curves/native/bls12381/pairings.go diff --git a/crypto/core/curves/native/bls12381/pairings_test.go b/internal/crypto/core/curves/native/bls12381/pairings_test.go similarity index 95% rename from crypto/core/curves/native/bls12381/pairings_test.go rename to internal/crypto/core/curves/native/bls12381/pairings_test.go index f253b0945..538fee17f 100755 --- a/crypto/core/curves/native/bls12381/pairings_test.go +++ b/internal/crypto/core/curves/native/bls12381/pairings_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) func TestSinglePairing(t *testing.T) { diff --git a/crypto/core/curves/native/field.go b/internal/crypto/core/curves/native/field.go similarity index 99% rename from crypto/core/curves/native/field.go rename to internal/crypto/core/curves/native/field.go index 6a6d0a883..564ddce55 100755 --- a/crypto/core/curves/native/field.go +++ b/internal/crypto/core/curves/native/field.go @@ -5,7 +5,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) // FieldLimbs is the number of limbs needed to represent this field diff --git a/crypto/core/curves/native/hash2field.go b/internal/crypto/core/curves/native/hash2field.go similarity index 100% rename from crypto/core/curves/native/hash2field.go rename to internal/crypto/core/curves/native/hash2field.go diff --git a/crypto/core/curves/native/isogeny.go b/internal/crypto/core/curves/native/isogeny.go similarity index 100% rename from crypto/core/curves/native/isogeny.go rename to internal/crypto/core/curves/native/isogeny.go diff --git a/crypto/core/curves/native/k256/fp/fp.go b/internal/crypto/core/curves/native/k256/fp/fp.go similarity index 98% rename from crypto/core/curves/native/k256/fp/fp.go rename to internal/crypto/core/curves/native/k256/fp/fp.go index 8f9cc4459..b7165a2b3 100755 --- a/crypto/core/curves/native/k256/fp/fp.go +++ b/internal/crypto/core/curves/native/k256/fp/fp.go @@ -10,7 +10,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) var ( diff --git a/crypto/core/curves/native/k256/fp/fp_test.go b/internal/crypto/core/curves/native/k256/fp/fp_test.go similarity index 98% rename from crypto/core/curves/native/k256/fp/fp_test.go rename to internal/crypto/core/curves/native/k256/fp/fp_test.go index 3016d7a13..a48bed698 100755 --- a/crypto/core/curves/native/k256/fp/fp_test.go +++ b/internal/crypto/core/curves/native/k256/fp/fp_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) func TestFpSetOne(t *testing.T) { diff --git a/crypto/core/curves/native/k256/fp/secp256k1_fp.go b/internal/crypto/core/curves/native/k256/fp/secp256k1_fp.go similarity index 100% rename from crypto/core/curves/native/k256/fp/secp256k1_fp.go rename to internal/crypto/core/curves/native/k256/fp/secp256k1_fp.go diff --git a/crypto/core/curves/native/k256/fq/fq.go b/internal/crypto/core/curves/native/k256/fq/fq.go similarity index 99% rename from crypto/core/curves/native/k256/fq/fq.go rename to internal/crypto/core/curves/native/k256/fq/fq.go index 59aebecaf..849a2341c 100755 --- a/crypto/core/curves/native/k256/fq/fq.go +++ b/internal/crypto/core/curves/native/k256/fq/fq.go @@ -10,7 +10,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) var ( diff --git a/crypto/core/curves/native/k256/fq/fq_test.go b/internal/crypto/core/curves/native/k256/fq/fq_test.go similarity index 98% rename from crypto/core/curves/native/k256/fq/fq_test.go rename to internal/crypto/core/curves/native/k256/fq/fq_test.go index 8416e8dc2..7c11dfcaf 100755 --- a/crypto/core/curves/native/k256/fq/fq_test.go +++ b/internal/crypto/core/curves/native/k256/fq/fq_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) func TestFqSetOne(t *testing.T) { diff --git a/crypto/core/curves/native/k256/fq/secp256k1_fq.go b/internal/crypto/core/curves/native/k256/fq/secp256k1_fq.go similarity index 100% rename from crypto/core/curves/native/k256/fq/secp256k1_fq.go rename to internal/crypto/core/curves/native/k256/fq/secp256k1_fq.go diff --git a/crypto/core/curves/native/k256/point.go b/internal/crypto/core/curves/native/k256/point.go similarity index 98% rename from crypto/core/curves/native/k256/point.go rename to internal/crypto/core/curves/native/k256/point.go index 8b9951839..3788f18b9 100755 --- a/crypto/core/curves/native/k256/point.go +++ b/internal/crypto/core/curves/native/k256/point.go @@ -3,9 +3,9 @@ package k256 import ( "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/k256/fp" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/k256/fp" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/core/curves/native/k256/point_test.go b/internal/crypto/core/curves/native/k256/point_test.go similarity index 71% rename from crypto/core/curves/native/k256/point_test.go rename to internal/crypto/core/curves/native/k256/point_test.go index 4bbeec1cc..3ceb24a5e 100755 --- a/crypto/core/curves/native/k256/point_test.go +++ b/internal/crypto/core/curves/native/k256/point_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/k256" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/k256" ) func TestK256PointArithmetic_Hash(t *testing.T) { diff --git a/crypto/core/curves/native/osswu.go b/internal/crypto/core/curves/native/osswu.go similarity index 100% rename from crypto/core/curves/native/osswu.go rename to internal/crypto/core/curves/native/osswu.go diff --git a/crypto/core/curves/native/p256/fp/fp.go b/internal/crypto/core/curves/native/p256/fp/fp.go similarity index 98% rename from crypto/core/curves/native/p256/fp/fp.go rename to internal/crypto/core/curves/native/p256/fp/fp.go index 6ef6d1314..0fe4c5dde 100755 --- a/crypto/core/curves/native/p256/fp/fp.go +++ b/internal/crypto/core/curves/native/p256/fp/fp.go @@ -10,7 +10,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) var ( diff --git a/crypto/core/curves/native/p256/fp/fp_test.go b/internal/crypto/core/curves/native/p256/fp/fp_test.go similarity index 98% rename from crypto/core/curves/native/p256/fp/fp_test.go rename to internal/crypto/core/curves/native/p256/fp/fp_test.go index a198ae189..c9acc1a6f 100755 --- a/crypto/core/curves/native/p256/fp/fp_test.go +++ b/internal/crypto/core/curves/native/p256/fp/fp_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) func TestFpSetOne(t *testing.T) { diff --git a/crypto/core/curves/native/p256/fp/p256_fp.go b/internal/crypto/core/curves/native/p256/fp/p256_fp.go similarity index 100% rename from crypto/core/curves/native/p256/fp/p256_fp.go rename to internal/crypto/core/curves/native/p256/fp/p256_fp.go diff --git a/crypto/core/curves/native/p256/fq/fq.go b/internal/crypto/core/curves/native/p256/fq/fq.go similarity index 99% rename from crypto/core/curves/native/p256/fq/fq.go rename to internal/crypto/core/curves/native/p256/fq/fq.go index d3f8fd993..358a7c664 100755 --- a/crypto/core/curves/native/p256/fq/fq.go +++ b/internal/crypto/core/curves/native/p256/fq/fq.go @@ -10,7 +10,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" ) var ( diff --git a/crypto/core/curves/native/p256/fq/fq_test.go b/internal/crypto/core/curves/native/p256/fq/fq_test.go similarity index 98% rename from crypto/core/curves/native/p256/fq/fq_test.go rename to internal/crypto/core/curves/native/p256/fq/fq_test.go index df0683334..552da7adb 100755 --- a/crypto/core/curves/native/p256/fq/fq_test.go +++ b/internal/crypto/core/curves/native/p256/fq/fq_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/internal" ) func TestFqSetOne(t *testing.T) { diff --git a/crypto/core/curves/native/p256/fq/p256_fq.go b/internal/crypto/core/curves/native/p256/fq/p256_fq.go similarity index 100% rename from crypto/core/curves/native/p256/fq/p256_fq.go rename to internal/crypto/core/curves/native/p256/fq/p256_fq.go diff --git a/crypto/core/curves/native/p256/point.go b/internal/crypto/core/curves/native/p256/point.go similarity index 98% rename from crypto/core/curves/native/p256/point.go rename to internal/crypto/core/curves/native/p256/point.go index 917efbb86..00a8f568e 100755 --- a/crypto/core/curves/native/p256/point.go +++ b/internal/crypto/core/curves/native/p256/point.go @@ -3,9 +3,9 @@ package p256 import ( "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/p256/fp" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/p256/fp" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/core/curves/native/p256/point_test.go b/internal/crypto/core/curves/native/p256/point_test.go similarity index 75% rename from crypto/core/curves/native/p256/point_test.go rename to internal/crypto/core/curves/native/p256/point_test.go index 8ed346f3d..042681b0a 100755 --- a/crypto/core/curves/native/p256/point_test.go +++ b/internal/crypto/core/curves/native/p256/point_test.go @@ -6,10 +6,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/p256" - "github.com/onsonr/sonr/crypto/core/curves/native/p256/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/p256" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/p256/fp" ) func TestP256PointArithmetic_Double(t *testing.T) { diff --git a/crypto/core/curves/native/pasta/README.md b/internal/crypto/core/curves/native/pasta/README.md similarity index 100% rename from crypto/core/curves/native/pasta/README.md rename to internal/crypto/core/curves/native/pasta/README.md diff --git a/crypto/core/curves/native/pasta/fp/fp.go b/internal/crypto/core/curves/native/pasta/fp/fp.go similarity index 99% rename from crypto/core/curves/native/pasta/fp/fp.go rename to internal/crypto/core/curves/native/pasta/fp/fp.go index 6154b900c..5089356f2 100755 --- a/crypto/core/curves/native/pasta/fp/fp.go +++ b/internal/crypto/core/curves/native/pasta/fp/fp.go @@ -11,7 +11,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) type Fp fiat_pasta_fp_montgomery_domain_field_element diff --git a/crypto/core/curves/native/pasta/fp/fp_test.go b/internal/crypto/core/curves/native/pasta/fp/fp_test.go similarity index 100% rename from crypto/core/curves/native/pasta/fp/fp_test.go rename to internal/crypto/core/curves/native/pasta/fp/fp_test.go diff --git a/crypto/core/curves/native/pasta/fp/pasta_fp.go b/internal/crypto/core/curves/native/pasta/fp/pasta_fp.go similarity index 100% rename from crypto/core/curves/native/pasta/fp/pasta_fp.go rename to internal/crypto/core/curves/native/pasta/fp/pasta_fp.go diff --git a/crypto/core/curves/native/pasta/fq/fq.go b/internal/crypto/core/curves/native/pasta/fq/fq.go similarity index 99% rename from crypto/core/curves/native/pasta/fq/fq.go rename to internal/crypto/core/curves/native/pasta/fq/fq.go index e0e9a74b4..6253e0db4 100755 --- a/crypto/core/curves/native/pasta/fq/fq.go +++ b/internal/crypto/core/curves/native/pasta/fq/fq.go @@ -11,7 +11,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) type Fq fiat_pasta_fq_montgomery_domain_field_element diff --git a/crypto/core/curves/native/pasta/fq/fq_test.go b/internal/crypto/core/curves/native/pasta/fq/fq_test.go similarity index 100% rename from crypto/core/curves/native/pasta/fq/fq_test.go rename to internal/crypto/core/curves/native/pasta/fq/fq_test.go diff --git a/crypto/core/curves/native/pasta/fq/pasta_fq.go b/internal/crypto/core/curves/native/pasta/fq/pasta_fq.go similarity index 100% rename from crypto/core/curves/native/pasta/fq/pasta_fq.go rename to internal/crypto/core/curves/native/pasta/fq/pasta_fq.go diff --git a/crypto/core/curves/native/pasta/pallas.go b/internal/crypto/core/curves/native/pasta/pallas.go similarity index 100% rename from crypto/core/curves/native/pasta/pallas.go rename to internal/crypto/core/curves/native/pasta/pallas.go diff --git a/crypto/core/curves/native/point.go b/internal/crypto/core/curves/native/point.go similarity index 100% rename from crypto/core/curves/native/point.go rename to internal/crypto/core/curves/native/point.go diff --git a/crypto/core/curves/p256_bench_test.go b/internal/crypto/core/curves/p256_bench_test.go similarity index 99% rename from crypto/core/curves/p256_bench_test.go rename to internal/crypto/core/curves/p256_bench_test.go index 6fe7f8bce..78a101e09 100755 --- a/crypto/core/curves/p256_bench_test.go +++ b/internal/crypto/core/curves/p256_bench_test.go @@ -16,7 +16,7 @@ import ( "math/big" "testing" - "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/internal/crypto/core" ) func BenchmarkP256(b *testing.B) { diff --git a/crypto/core/curves/p256_curve.go b/internal/crypto/core/curves/p256_curve.go similarity index 97% rename from crypto/core/curves/p256_curve.go rename to internal/crypto/core/curves/p256_curve.go index 2225bdb6b..c8290b503 100755 --- a/crypto/core/curves/p256_curve.go +++ b/internal/crypto/core/curves/p256_curve.go @@ -13,11 +13,11 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" - p256n "github.com/onsonr/sonr/crypto/core/curves/native/p256" - "github.com/onsonr/sonr/crypto/core/curves/native/p256/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/p256/fq" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + p256n "github.com/onsonr/sonr/internal/crypto/core/curves/native/p256" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/p256/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/p256/fq" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/core/curves/p256_curve_test.go b/internal/crypto/core/curves/p256_curve_test.go similarity index 100% rename from crypto/core/curves/p256_curve_test.go rename to internal/crypto/core/curves/p256_curve_test.go diff --git a/crypto/core/curves/pallas_curve.go b/internal/crypto/core/curves/pallas_curve.go similarity index 99% rename from crypto/core/curves/pallas_curve.go rename to internal/crypto/core/curves/pallas_curve.go index 29f8424e6..3685ecc56 100755 --- a/crypto/core/curves/pallas_curve.go +++ b/internal/crypto/core/curves/pallas_curve.go @@ -18,8 +18,8 @@ import ( "golang.org/x/crypto/blake2b" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fq" ) var ( diff --git a/crypto/core/curves/pallas_curve_test.go b/internal/crypto/core/curves/pallas_curve_test.go similarity index 96% rename from crypto/core/curves/pallas_curve_test.go rename to internal/crypto/core/curves/pallas_curve_test.go index f97ec028d..e699de338 100755 --- a/crypto/core/curves/pallas_curve_test.go +++ b/internal/crypto/core/curves/pallas_curve_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fq" ) func TestPointPallasAddDoubleMul(t *testing.T) { diff --git a/crypto/core/curves/secp256k1/secp256k1.go b/internal/crypto/core/curves/secp256k1/secp256k1.go similarity index 100% rename from crypto/core/curves/secp256k1/secp256k1.go rename to internal/crypto/core/curves/secp256k1/secp256k1.go diff --git a/crypto/core/curves/sp256_curve.go b/internal/crypto/core/curves/sp256_curve.go similarity index 100% rename from crypto/core/curves/sp256_curve.go rename to internal/crypto/core/curves/sp256_curve.go diff --git a/crypto/core/hash.go b/internal/crypto/core/hash.go similarity index 99% rename from crypto/core/hash.go rename to internal/crypto/core/hash.go index f48429170..6d6bf58ef 100755 --- a/crypto/core/hash.go +++ b/internal/crypto/core/hash.go @@ -18,7 +18,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "golang.org/x/crypto/hkdf" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) type HashField struct { diff --git a/crypto/core/hash_test.go b/internal/crypto/core/hash_test.go similarity index 100% rename from crypto/core/hash_test.go rename to internal/crypto/core/hash_test.go diff --git a/crypto/core/mod.go b/internal/crypto/core/mod.go similarity index 98% rename from crypto/core/mod.go rename to internal/crypto/core/mod.go index c6aae6a2e..9cfaffed0 100755 --- a/crypto/core/mod.go +++ b/internal/crypto/core/mod.go @@ -16,7 +16,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/core/mod_test.go b/internal/crypto/core/mod_test.go similarity index 99% rename from crypto/core/mod_test.go rename to internal/crypto/core/mod_test.go index 1e0483a63..d7886891f 100755 --- a/crypto/core/mod_test.go +++ b/internal/crypto/core/mod_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/core/primes.go b/internal/crypto/core/primes.go similarity index 100% rename from crypto/core/primes.go rename to internal/crypto/core/primes.go diff --git a/crypto/core/protocol/protocol.go b/internal/crypto/core/protocol/protocol.go similarity index 100% rename from crypto/core/protocol/protocol.go rename to internal/crypto/core/protocol/protocol.go diff --git a/crypto/daed/aes_siv.go b/internal/crypto/daed/aes_siv.go similarity index 100% rename from crypto/daed/aes_siv.go rename to internal/crypto/daed/aes_siv.go diff --git a/crypto/daed/aes_siv_test.go b/internal/crypto/daed/aes_siv_test.go similarity index 98% rename from crypto/daed/aes_siv_test.go rename to internal/crypto/daed/aes_siv_test.go index 335c30d71..4996c14cd 100644 --- a/crypto/daed/aes_siv_test.go +++ b/internal/crypto/daed/aes_siv_test.go @@ -8,8 +8,8 @@ import ( "path/filepath" "testing" - subtle "github.com/onsonr/sonr/crypto/daed" - "github.com/onsonr/sonr/crypto/subtle/random" + subtle "github.com/onsonr/sonr/internal/crypto/daed" + "github.com/onsonr/sonr/internal/crypto/subtle/random" ) type testData struct { diff --git a/crypto/dkg/frost/README.md b/internal/crypto/dkg/frost/README.md similarity index 100% rename from crypto/dkg/frost/README.md rename to internal/crypto/dkg/frost/README.md diff --git a/crypto/dkg/frost/dkg_round1.go b/internal/crypto/dkg/frost/dkg_round1.go similarity index 96% rename from crypto/dkg/frost/dkg_round1.go rename to internal/crypto/dkg/frost/dkg_round1.go index 277abcb2a..dbba547e7 100755 --- a/crypto/dkg/frost/dkg_round1.go +++ b/internal/crypto/dkg/frost/dkg_round1.go @@ -15,9 +15,9 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" - "github.com/onsonr/sonr/crypto/sharing" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/sharing" ) // Round1Bcast are values that are broadcast to all other participants diff --git a/crypto/dkg/frost/dkg_round2.go b/internal/crypto/dkg/frost/dkg_round2.go similarity index 96% rename from crypto/dkg/frost/dkg_round2.go rename to internal/crypto/dkg/frost/dkg_round2.go index ce680926e..3866a6881 100755 --- a/crypto/dkg/frost/dkg_round2.go +++ b/internal/crypto/dkg/frost/dkg_round2.go @@ -9,9 +9,9 @@ package frost import ( "fmt" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" - "github.com/onsonr/sonr/crypto/sharing" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/sharing" ) // Round2Bcast are values that are broadcast to all other participants diff --git a/crypto/dkg/frost/dkg_rounds_test.go b/internal/crypto/dkg/frost/dkg_rounds_test.go similarity index 97% rename from crypto/dkg/frost/dkg_rounds_test.go rename to internal/crypto/dkg/frost/dkg_rounds_test.go index 3592ec80e..baaf5c8aa 100755 --- a/crypto/dkg/frost/dkg_rounds_test.go +++ b/internal/crypto/dkg/frost/dkg_rounds_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/sharing" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/sharing" ) var ( diff --git a/crypto/dkg/frost/participant.go b/internal/crypto/dkg/frost/participant.go similarity index 91% rename from crypto/dkg/frost/participant.go rename to internal/crypto/dkg/frost/participant.go index c9ef4fc06..ce7d6b4bc 100755 --- a/crypto/dkg/frost/participant.go +++ b/internal/crypto/dkg/frost/participant.go @@ -10,9 +10,9 @@ package frost import ( "strconv" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" - "github.com/onsonr/sonr/crypto/sharing" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/sharing" ) type DkgParticipant struct { diff --git a/crypto/dkg/gennaro/README.md b/internal/crypto/dkg/gennaro/README.md similarity index 100% rename from crypto/dkg/gennaro/README.md rename to internal/crypto/dkg/gennaro/README.md diff --git a/crypto/dkg/gennaro/participant.go b/internal/crypto/dkg/gennaro/participant.go similarity index 94% rename from crypto/dkg/gennaro/participant.go rename to internal/crypto/dkg/gennaro/participant.go index 2c76e1d10..27df13336 100755 --- a/crypto/dkg/gennaro/participant.go +++ b/internal/crypto/dkg/gennaro/participant.go @@ -11,9 +11,9 @@ import ( "crypto/elliptic" "fmt" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) // Participant is a DKG player that contains information needed to perform DKG rounds diff --git a/crypto/dkg/gennaro/participant_test.go b/internal/crypto/dkg/gennaro/participant_test.go similarity index 92% rename from crypto/dkg/gennaro/participant_test.go rename to internal/crypto/dkg/gennaro/participant_test.go index 1088767c8..d2103f5d3 100755 --- a/crypto/dkg/gennaro/participant_test.go +++ b/internal/crypto/dkg/gennaro/participant_test.go @@ -13,8 +13,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) var testGenerator, _ = curves.NewScalarBaseMult(btcec.S256(), big.NewInt(3333)) diff --git a/crypto/dkg/gennaro/round1.go b/internal/crypto/dkg/gennaro/round1.go similarity index 93% rename from crypto/dkg/gennaro/round1.go rename to internal/crypto/dkg/gennaro/round1.go index e693ebfd4..fad493732 100755 --- a/crypto/dkg/gennaro/round1.go +++ b/internal/crypto/dkg/gennaro/round1.go @@ -10,9 +10,9 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/core" - "github.com/onsonr/sonr/crypto/internal" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core" + "github.com/onsonr/sonr/internal/crypto/internal" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) // Round1Bcast are the values that are broadcast to all other participants diff --git a/crypto/dkg/gennaro/round2.go b/internal/crypto/dkg/gennaro/round2.go similarity index 95% rename from crypto/dkg/gennaro/round2.go rename to internal/crypto/dkg/gennaro/round2.go index 07e453023..69fab726a 100755 --- a/crypto/dkg/gennaro/round2.go +++ b/internal/crypto/dkg/gennaro/round2.go @@ -9,8 +9,8 @@ package gennaro import ( "fmt" - "github.com/onsonr/sonr/crypto/internal" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/internal" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) type Round2Bcast = []*v1.ShareVerifier diff --git a/crypto/dkg/gennaro/round3.go b/internal/crypto/dkg/gennaro/round3.go similarity index 95% rename from crypto/dkg/gennaro/round3.go rename to internal/crypto/dkg/gennaro/round3.go index 205e6d278..f7d8956de 100755 --- a/crypto/dkg/gennaro/round3.go +++ b/internal/crypto/dkg/gennaro/round3.go @@ -9,8 +9,8 @@ package gennaro import ( "fmt" - "github.com/onsonr/sonr/crypto/internal" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/internal" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) // Round3Bcast contains values that will be broadcast to other participants. diff --git a/crypto/dkg/gennaro/round4.go b/internal/crypto/dkg/gennaro/round4.go similarity index 89% rename from crypto/dkg/gennaro/round4.go rename to internal/crypto/dkg/gennaro/round4.go index 998c5edbf..ab38e021b 100755 --- a/crypto/dkg/gennaro/round4.go +++ b/internal/crypto/dkg/gennaro/round4.go @@ -9,10 +9,10 @@ package gennaro import ( "math/big" - "github.com/onsonr/sonr/crypto/core" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) // Round4 computes the public shares used by tECDSA during signing diff --git a/crypto/dkg/gennaro/rounds_test.go b/internal/crypto/dkg/gennaro/rounds_test.go similarity index 99% rename from crypto/dkg/gennaro/rounds_test.go rename to internal/crypto/dkg/gennaro/rounds_test.go index ad9715ca8..858070471 100755 --- a/crypto/dkg/gennaro/rounds_test.go +++ b/internal/crypto/dkg/gennaro/rounds_test.go @@ -13,8 +13,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) func TestParticipantRound1Works(t *testing.T) { diff --git a/crypto/dkg/gennaro2p/README.md b/internal/crypto/dkg/gennaro2p/README.md similarity index 100% rename from crypto/dkg/gennaro2p/README.md rename to internal/crypto/dkg/gennaro2p/README.md diff --git a/crypto/dkg/gennaro2p/genarro2p.go b/internal/crypto/dkg/gennaro2p/genarro2p.go similarity index 96% rename from crypto/dkg/gennaro2p/genarro2p.go rename to internal/crypto/dkg/gennaro2p/genarro2p.go index 1b1e3930c..36d024d5c 100755 --- a/crypto/dkg/gennaro2p/genarro2p.go +++ b/internal/crypto/dkg/gennaro2p/genarro2p.go @@ -15,9 +15,9 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/dkg/gennaro" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/dkg/gennaro" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) const threshold = 2 diff --git a/crypto/dkg/gennaro2p/genarro2p_test.go b/internal/crypto/dkg/gennaro2p/genarro2p_test.go similarity index 97% rename from crypto/dkg/gennaro2p/genarro2p_test.go rename to internal/crypto/dkg/gennaro2p/genarro2p_test.go index 5fe61d933..72aa70f9b 100755 --- a/crypto/dkg/gennaro2p/genarro2p_test.go +++ b/internal/crypto/dkg/gennaro2p/genarro2p_test.go @@ -15,8 +15,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) var ( diff --git a/crypto/ecies/encrypt.go b/internal/crypto/ecies/encrypt.go similarity index 100% rename from crypto/ecies/encrypt.go rename to internal/crypto/ecies/encrypt.go diff --git a/crypto/ecies/keys.go b/internal/crypto/ecies/keys.go similarity index 95% rename from crypto/ecies/keys.go rename to internal/crypto/ecies/keys.go index 458a0803e..4c3d6100a 100644 --- a/crypto/ecies/keys.go +++ b/internal/crypto/ecies/keys.go @@ -9,7 +9,7 @@ import ( eciesgo "github.com/ecies/go/v2" "lukechampine.com/blake3" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type PrivateKey = eciesgo.PrivateKey diff --git a/crypto/ecies/keys_test.go b/internal/crypto/ecies/keys_test.go similarity index 90% rename from crypto/ecies/keys_test.go rename to internal/crypto/ecies/keys_test.go index d162e370c..b5999de96 100644 --- a/crypto/ecies/keys_test.go +++ b/internal/crypto/ecies/keys_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/onsonr/sonr/crypto/ecies" + "github.com/onsonr/sonr/internal/crypto/ecies" ) func TestGenerateKey(t *testing.T) { diff --git a/crypto/internal/err.go b/internal/crypto/internal/err.go similarity index 100% rename from crypto/internal/err.go rename to internal/crypto/internal/err.go diff --git a/crypto/internal/hash.go b/internal/crypto/internal/hash.go similarity index 100% rename from crypto/internal/hash.go rename to internal/crypto/internal/hash.go diff --git a/crypto/internal/hash_test.go b/internal/crypto/internal/hash_test.go similarity index 100% rename from crypto/internal/hash_test.go rename to internal/crypto/internal/hash_test.go diff --git a/crypto/internal/point.go b/internal/crypto/internal/point.go similarity index 100% rename from crypto/internal/point.go rename to internal/crypto/internal/point.go diff --git a/crypto/internal/testutils.go b/internal/crypto/internal/testutils.go similarity index 100% rename from crypto/internal/testutils.go rename to internal/crypto/internal/testutils.go diff --git a/crypto/keys/didkey.go b/internal/crypto/keys/didkey.go similarity index 100% rename from crypto/keys/didkey.go rename to internal/crypto/keys/didkey.go diff --git a/crypto/keys/methods.go b/internal/crypto/keys/methods.go similarity index 100% rename from crypto/keys/methods.go rename to internal/crypto/keys/methods.go diff --git a/crypto/keys/parsers/btc_parser.go b/internal/crypto/keys/parsers/btc_parser.go similarity index 100% rename from crypto/keys/parsers/btc_parser.go rename to internal/crypto/keys/parsers/btc_parser.go diff --git a/crypto/keys/parsers/cosmos_parser.go b/internal/crypto/keys/parsers/cosmos_parser.go similarity index 100% rename from crypto/keys/parsers/cosmos_parser.go rename to internal/crypto/keys/parsers/cosmos_parser.go diff --git a/crypto/keys/parsers/eth_parser.go b/internal/crypto/keys/parsers/eth_parser.go similarity index 100% rename from crypto/keys/parsers/eth_parser.go rename to internal/crypto/keys/parsers/eth_parser.go diff --git a/crypto/keys/parsers/fil_parser.go b/internal/crypto/keys/parsers/fil_parser.go similarity index 100% rename from crypto/keys/parsers/fil_parser.go rename to internal/crypto/keys/parsers/fil_parser.go diff --git a/crypto/keys/parsers/key_parser.go b/internal/crypto/keys/parsers/key_parser.go similarity index 100% rename from crypto/keys/parsers/key_parser.go rename to internal/crypto/keys/parsers/key_parser.go diff --git a/crypto/keys/parsers/sol_parser.go b/internal/crypto/keys/parsers/sol_parser.go similarity index 100% rename from crypto/keys/parsers/sol_parser.go rename to internal/crypto/keys/parsers/sol_parser.go diff --git a/crypto/keys/parsers/ton_parser.go b/internal/crypto/keys/parsers/ton_parser.go similarity index 100% rename from crypto/keys/parsers/ton_parser.go rename to internal/crypto/keys/parsers/ton_parser.go diff --git a/crypto/keys/pubkey.go b/internal/crypto/keys/pubkey.go similarity index 96% rename from crypto/keys/pubkey.go rename to internal/crypto/keys/pubkey.go index 4b64328b8..abc589fb3 100644 --- a/crypto/keys/pubkey.go +++ b/internal/crypto/keys/pubkey.go @@ -7,7 +7,7 @@ import ( p2pcrypto "github.com/libp2p/go-libp2p/core/crypto" p2ppb "github.com/libp2p/go-libp2p/core/crypto/pb" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" "golang.org/x/crypto/sha3" ) diff --git a/crypto/keys/utils.go b/internal/crypto/keys/utils.go similarity index 96% rename from crypto/keys/utils.go rename to internal/crypto/keys/utils.go index 60e817119..62970291a 100644 --- a/crypto/keys/utils.go +++ b/internal/crypto/keys/utils.go @@ -5,7 +5,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // getEcdsaPoint builds an elliptic curve point from a compressed byte slice diff --git a/crypto/mpc/codec.go b/internal/crypto/mpc/codec.go similarity index 90% rename from crypto/mpc/codec.go rename to internal/crypto/mpc/codec.go index b5f31cf81..af1414c94 100644 --- a/crypto/mpc/codec.go +++ b/internal/crypto/mpc/codec.go @@ -1,10 +1,10 @@ package mpc import ( - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/protocol" - "github.com/onsonr/sonr/crypto/keys" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/keys" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" ) // ╭───────────────────────────────────────────────────────────╮ diff --git a/crypto/mpc/codec_test.go b/internal/crypto/mpc/codec_test.go similarity index 100% rename from crypto/mpc/codec_test.go rename to internal/crypto/mpc/codec_test.go diff --git a/crypto/mpc/enclave.go b/internal/crypto/mpc/enclave.go similarity index 97% rename from crypto/mpc/enclave.go rename to internal/crypto/mpc/enclave.go index 6f1eb1e26..cf90ab5b6 100644 --- a/crypto/mpc/enclave.go +++ b/internal/crypto/mpc/enclave.go @@ -7,8 +7,8 @@ import ( "encoding/json" "fmt" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/keys" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/keys" "golang.org/x/crypto/sha3" ) diff --git a/crypto/mpc/protocol.go b/internal/crypto/mpc/protocol.go similarity index 93% rename from crypto/mpc/protocol.go rename to internal/crypto/mpc/protocol.go index 7c137588b..220771473 100644 --- a/crypto/mpc/protocol.go +++ b/internal/crypto/mpc/protocol.go @@ -1,9 +1,9 @@ package mpc import ( - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/protocol" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1" ) // GenEnclave generates a new MPC keyshare diff --git a/crypto/mpc/spec/jwt.go b/internal/crypto/mpc/spec/jwt.go similarity index 100% rename from crypto/mpc/spec/jwt.go rename to internal/crypto/mpc/spec/jwt.go diff --git a/crypto/mpc/spec/source.go b/internal/crypto/mpc/spec/source.go similarity index 97% rename from crypto/mpc/spec/source.go rename to internal/crypto/mpc/spec/source.go index 4479b6b62..c99878786 100644 --- a/crypto/mpc/spec/source.go +++ b/internal/crypto/mpc/spec/source.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/onsonr/sonr/crypto/keys" - "github.com/onsonr/sonr/crypto/ucan" + "github.com/onsonr/sonr/internal/crypto/keys" + "github.com/onsonr/sonr/internal/crypto/ucan" "lukechampine.com/blake3" ) diff --git a/crypto/mpc/spec/ucan.go b/internal/crypto/mpc/spec/ucan.go similarity index 96% rename from crypto/mpc/spec/ucan.go rename to internal/crypto/mpc/spec/ucan.go index df5c24a2d..901390f7c 100644 --- a/crypto/mpc/spec/ucan.go +++ b/internal/crypto/mpc/spec/ucan.go @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/golang-jwt/jwt" - "github.com/onsonr/sonr/crypto/keys" - "github.com/onsonr/sonr/crypto/ucan" + "github.com/onsonr/sonr/internal/crypto/keys" + "github.com/onsonr/sonr/internal/crypto/ucan" ) type ( diff --git a/crypto/mpc/utils.go b/internal/crypto/mpc/utils.go similarity index 96% rename from crypto/mpc/utils.go rename to internal/crypto/mpc/utils.go index 783b77669..f247faaa6 100644 --- a/crypto/mpc/utils.go +++ b/internal/crypto/mpc/utils.go @@ -8,9 +8,9 @@ import ( "math/big" "github.com/cosmos/cosmos-sdk/types/bech32" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/protocol" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1" "golang.org/x/crypto/sha3" ) diff --git a/crypto/ot/base/simplest/ot.go b/internal/crypto/ot/base/simplest/ot.go similarity index 99% rename from crypto/ot/base/simplest/ot.go rename to internal/crypto/ot/base/simplest/ot.go index d8d98b178..830933fd4 100755 --- a/crypto/ot/base/simplest/ot.go +++ b/internal/crypto/ot/base/simplest/ot.go @@ -27,8 +27,8 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/zkp/schnorr" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/zkp/schnorr" ) const ( diff --git a/crypto/ot/base/simplest/ot_test.go b/internal/crypto/ot/base/simplest/ot_test.go similarity index 93% rename from crypto/ot/base/simplest/ot_test.go rename to internal/crypto/ot/base/simplest/ot_test.go index b3b803b73..e155ea57a 100755 --- a/crypto/ot/base/simplest/ot_test.go +++ b/internal/crypto/ot/base/simplest/ot_test.go @@ -14,9 +14,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/ottest" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/ottest" ) func TestOtOnMultipleCurves(t *testing.T) { diff --git a/crypto/ot/base/simplest/stream.go b/internal/crypto/ot/base/simplest/stream.go similarity index 97% rename from crypto/ot/base/simplest/stream.go rename to internal/crypto/ot/base/simplest/stream.go index 7e7495ab3..4d4c77a3c 100755 --- a/crypto/ot/base/simplest/stream.go +++ b/internal/crypto/ot/base/simplest/stream.go @@ -6,8 +6,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/zkp/schnorr" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/zkp/schnorr" ) // ReceiverStreamOTRun exposes the entire seed OT process for the receiver in "stream mode" to the user. diff --git a/crypto/ot/base/simplest/util.go b/internal/crypto/ot/base/simplest/util.go similarity index 100% rename from crypto/ot/base/simplest/util.go rename to internal/crypto/ot/base/simplest/util.go diff --git a/crypto/ot/extension/kos/kos.go b/internal/crypto/ot/extension/kos/kos.go similarity index 99% rename from crypto/ot/extension/kos/kos.go rename to internal/crypto/ot/extension/kos/kos.go index e1fb9a0ad..cdc440151 100755 --- a/crypto/ot/extension/kos/kos.go +++ b/internal/crypto/ot/extension/kos/kos.go @@ -17,8 +17,8 @@ import ( "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" "github.com/pkg/errors" ) diff --git a/crypto/ot/extension/kos/kos_test.go b/internal/crypto/ot/extension/kos/kos_test.go similarity index 96% rename from crypto/ot/extension/kos/kos_test.go rename to internal/crypto/ot/extension/kos/kos_test.go index ff40adaef..010ba057e 100755 --- a/crypto/ot/extension/kos/kos_test.go +++ b/internal/crypto/ot/extension/kos/kos_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/ottest" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/ottest" ) func TestBinaryMult(t *testing.T) { diff --git a/crypto/ot/extension/kos/stream.go b/internal/crypto/ot/extension/kos/stream.go similarity index 95% rename from crypto/ot/extension/kos/stream.go rename to internal/crypto/ot/extension/kos/stream.go index 739299fee..cfe5f51ed 100755 --- a/crypto/ot/extension/kos/stream.go +++ b/internal/crypto/ot/extension/kos/stream.go @@ -6,8 +6,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" ) // ReceiverStreamCOtRun exposes an end-to-end "streaming" version of the cOT process for the receiver. diff --git a/crypto/ot/ottest/util.go b/internal/crypto/ot/ottest/util.go similarity index 94% rename from crypto/ot/ottest/util.go rename to internal/crypto/ot/ottest/util.go index f000da8ed..64d46767b 100755 --- a/crypto/ot/ottest/util.go +++ b/internal/crypto/ot/ottest/util.go @@ -5,8 +5,8 @@ package ottest import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" ) // RunSimplestOT is a utility function used _only_ during various tests. diff --git a/crypto/paillier/README.md b/internal/crypto/paillier/README.md similarity index 100% rename from crypto/paillier/README.md rename to internal/crypto/paillier/README.md diff --git a/crypto/paillier/paillier.go b/internal/crypto/paillier/paillier.go similarity index 98% rename from crypto/paillier/paillier.go rename to internal/crypto/paillier/paillier.go index c094f4fb9..ec86f5501 100755 --- a/crypto/paillier/paillier.go +++ b/internal/crypto/paillier/paillier.go @@ -27,8 +27,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core" + "github.com/onsonr/sonr/internal/crypto/internal" ) // PaillierPrimeBits is the number of bits used to generate Paillier Safe Primes. diff --git a/crypto/paillier/psf.go b/internal/crypto/paillier/psf.go similarity index 97% rename from crypto/paillier/psf.go rename to internal/crypto/paillier/psf.go index b2d2b3583..075dda229 100755 --- a/crypto/paillier/psf.go +++ b/internal/crypto/paillier/psf.go @@ -12,9 +12,9 @@ import ( "fmt" "math/big" - crypto "github.com/onsonr/sonr/crypto/core" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + crypto "github.com/onsonr/sonr/internal/crypto/core" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) // [spec] 10.2 and ProvePSF, VerifyPSF fig.15 diff --git a/crypto/paillier/psf_test.go b/internal/crypto/paillier/psf_test.go similarity index 99% rename from crypto/paillier/psf_test.go rename to internal/crypto/paillier/psf_test.go index b27f25bb3..8e5237cbc 100755 --- a/crypto/paillier/psf_test.go +++ b/internal/crypto/paillier/psf_test.go @@ -15,9 +15,9 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - crypto "github.com/onsonr/sonr/crypto/core" - curves2 "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + crypto "github.com/onsonr/sonr/internal/crypto/core" + curves2 "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) var testPrimes = []*big.Int{ diff --git a/crypto/sharing/README.md b/internal/crypto/sharing/README.md similarity index 100% rename from crypto/sharing/README.md rename to internal/crypto/sharing/README.md diff --git a/crypto/sharing/ed25519_feldman_test.go b/internal/crypto/sharing/ed25519_feldman_test.go similarity index 98% rename from crypto/sharing/ed25519_feldman_test.go rename to internal/crypto/sharing/ed25519_feldman_test.go index 2337392ee..dfa6b631b 100755 --- a/crypto/sharing/ed25519_feldman_test.go +++ b/internal/crypto/sharing/ed25519_feldman_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) var testCurve = curves.ED25519() diff --git a/crypto/sharing/feldman.go b/internal/crypto/sharing/feldman.go similarity index 97% rename from crypto/sharing/feldman.go rename to internal/crypto/sharing/feldman.go index ff2d42889..9d24bea6f 100755 --- a/crypto/sharing/feldman.go +++ b/internal/crypto/sharing/feldman.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type FeldmanVerifier struct { diff --git a/crypto/sharing/pedersen.go b/internal/crypto/sharing/pedersen.go similarity index 98% rename from crypto/sharing/pedersen.go rename to internal/crypto/sharing/pedersen.go index 36230775f..a13704386 100755 --- a/crypto/sharing/pedersen.go +++ b/internal/crypto/sharing/pedersen.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // Pedersen Verifiable Secret Sharing Scheme diff --git a/crypto/sharing/polynomial.go b/internal/crypto/sharing/polynomial.go similarity index 92% rename from crypto/sharing/polynomial.go rename to internal/crypto/sharing/polynomial.go index e146958ad..366ecb58c 100755 --- a/crypto/sharing/polynomial.go +++ b/internal/crypto/sharing/polynomial.go @@ -9,7 +9,7 @@ package sharing import ( "io" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type Polynomial struct { diff --git a/crypto/sharing/polynomial_test.go b/internal/crypto/sharing/polynomial_test.go similarity index 90% rename from crypto/sharing/polynomial_test.go rename to internal/crypto/sharing/polynomial_test.go index 1d828f8b2..253d89f34 100755 --- a/crypto/sharing/polynomial_test.go +++ b/internal/crypto/sharing/polynomial_test.go @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestNewPoly(t *testing.T) { diff --git a/crypto/sharing/shamir.go b/internal/crypto/sharing/shamir.go similarity index 98% rename from crypto/sharing/shamir.go rename to internal/crypto/sharing/shamir.go index 0bc0f383b..e3a6feaab 100755 --- a/crypto/sharing/shamir.go +++ b/internal/crypto/sharing/shamir.go @@ -16,7 +16,7 @@ import ( "fmt" "io" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type ShamirShare struct { diff --git a/crypto/sharing/shamir_test.go b/internal/crypto/sharing/shamir_test.go similarity index 98% rename from crypto/sharing/shamir_test.go rename to internal/crypto/sharing/shamir_test.go index b9281a71d..99e3ecc11 100755 --- a/crypto/sharing/shamir_test.go +++ b/internal/crypto/sharing/shamir_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestShamirSplitInvalidArgs(t *testing.T) { diff --git a/crypto/sharing/v1/bls12381g1_feldman_test.go b/internal/crypto/sharing/v1/bls12381g1_feldman_test.go similarity index 98% rename from crypto/sharing/v1/bls12381g1_feldman_test.go rename to internal/crypto/sharing/v1/bls12381g1_feldman_test.go index 0a4e1dddf..ab7be3a15 100755 --- a/crypto/sharing/v1/bls12381g1_feldman_test.go +++ b/internal/crypto/sharing/v1/bls12381g1_feldman_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) var ( diff --git a/crypto/sharing/v1/bls12381g1curve.go b/internal/crypto/sharing/v1/bls12381g1curve.go similarity index 94% rename from crypto/sharing/v1/bls12381g1curve.go rename to internal/crypto/sharing/v1/bls12381g1curve.go index 319dfa498..4877f396f 100755 --- a/crypto/sharing/v1/bls12381g1curve.go +++ b/internal/crypto/sharing/v1/bls12381g1curve.go @@ -11,9 +11,9 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/sharing/v1/bls12381g2_feldman_test.go b/internal/crypto/sharing/v1/bls12381g2_feldman_test.go similarity index 100% rename from crypto/sharing/v1/bls12381g2_feldman_test.go rename to internal/crypto/sharing/v1/bls12381g2_feldman_test.go diff --git a/crypto/sharing/v1/bls12381g2curve.go b/internal/crypto/sharing/v1/bls12381g2curve.go similarity index 95% rename from crypto/sharing/v1/bls12381g2curve.go rename to internal/crypto/sharing/v1/bls12381g2curve.go index 58470270b..b9ce74d98 100755 --- a/crypto/sharing/v1/bls12381g2curve.go +++ b/internal/crypto/sharing/v1/bls12381g2curve.go @@ -11,8 +11,8 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" ) var ( diff --git a/crypto/sharing/v1/common.go b/internal/crypto/sharing/v1/common.go similarity index 78% rename from crypto/sharing/v1/common.go rename to internal/crypto/sharing/v1/common.go index 285b5218c..71b286b9a 100755 --- a/crypto/sharing/v1/common.go +++ b/internal/crypto/sharing/v1/common.go @@ -7,7 +7,7 @@ package v1 import ( - kryptology "github.com/onsonr/sonr/crypto/core/curves" + kryptology "github.com/onsonr/sonr/internal/crypto/core/curves" ) // ShareVerifier is used to verify secret shares from Feldman or Pedersen VSS diff --git a/crypto/sharing/v1/ed25519_feldman_test.go b/internal/crypto/sharing/v1/ed25519_feldman_test.go similarity index 100% rename from crypto/sharing/v1/ed25519_feldman_test.go rename to internal/crypto/sharing/v1/ed25519_feldman_test.go diff --git a/crypto/sharing/v1/ed25519_pedersen_test.go b/internal/crypto/sharing/v1/ed25519_pedersen_test.go similarity index 97% rename from crypto/sharing/v1/ed25519_pedersen_test.go rename to internal/crypto/sharing/v1/ed25519_pedersen_test.go index 351f0ad23..56ccd4adf 100755 --- a/crypto/sharing/v1/ed25519_pedersen_test.go +++ b/internal/crypto/sharing/v1/ed25519_pedersen_test.go @@ -14,8 +14,8 @@ import ( "filippo.io/edwards25519" "github.com/stretchr/testify/require" - core "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + core "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/sharing/v1/ed25519curve.go b/internal/crypto/sharing/v1/ed25519curve.go similarity index 97% rename from crypto/sharing/v1/ed25519curve.go rename to internal/crypto/sharing/v1/ed25519curve.go index cd0185e46..0864416a2 100755 --- a/crypto/sharing/v1/ed25519curve.go +++ b/internal/crypto/sharing/v1/ed25519curve.go @@ -13,8 +13,8 @@ import ( ed "filippo.io/edwards25519" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) var ( diff --git a/crypto/sharing/v1/ed25519curve_test.go b/internal/crypto/sharing/v1/ed25519curve_test.go similarity index 100% rename from crypto/sharing/v1/ed25519curve_test.go rename to internal/crypto/sharing/v1/ed25519curve_test.go diff --git a/crypto/sharing/v1/feldman.go b/internal/crypto/sharing/v1/feldman.go similarity index 97% rename from crypto/sharing/v1/feldman.go rename to internal/crypto/sharing/v1/feldman.go index 2fbcde479..e3555db9f 100755 --- a/crypto/sharing/v1/feldman.go +++ b/internal/crypto/sharing/v1/feldman.go @@ -11,7 +11,7 @@ import ( "encoding/binary" "fmt" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // Feldman Verifiable Secret Sharing Scheme diff --git a/crypto/sharing/v1/k256_feldman_test.go b/internal/crypto/sharing/v1/k256_feldman_test.go similarity index 100% rename from crypto/sharing/v1/k256_feldman_test.go rename to internal/crypto/sharing/v1/k256_feldman_test.go diff --git a/crypto/sharing/v1/k256_pedersen_test.go b/internal/crypto/sharing/v1/k256_pedersen_test.go similarity index 98% rename from crypto/sharing/v1/k256_pedersen_test.go rename to internal/crypto/sharing/v1/k256_pedersen_test.go index 81f936901..37dab8382 100755 --- a/crypto/sharing/v1/k256_pedersen_test.go +++ b/internal/crypto/sharing/v1/k256_pedersen_test.go @@ -13,7 +13,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - core "github.com/onsonr/sonr/crypto/core/curves" + core "github.com/onsonr/sonr/internal/crypto/core/curves" ) var ( diff --git a/crypto/sharing/v1/p256_feldman_test.go b/internal/crypto/sharing/v1/p256_feldman_test.go similarity index 100% rename from crypto/sharing/v1/p256_feldman_test.go rename to internal/crypto/sharing/v1/p256_feldman_test.go diff --git a/crypto/sharing/v1/pedersen.go b/internal/crypto/sharing/v1/pedersen.go similarity index 97% rename from crypto/sharing/v1/pedersen.go rename to internal/crypto/sharing/v1/pedersen.go index 3cbd4ac8a..50e569069 100755 --- a/crypto/sharing/v1/pedersen.go +++ b/internal/crypto/sharing/v1/pedersen.go @@ -12,8 +12,8 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) // Pedersen Verifiable Secret Sharing Scheme diff --git a/crypto/sharing/v1/polynomial.go b/internal/crypto/sharing/v1/polynomial.go similarity index 95% rename from crypto/sharing/v1/polynomial.go rename to internal/crypto/sharing/v1/polynomial.go index e631a9a5d..3c3fccefd 100755 --- a/crypto/sharing/v1/polynomial.go +++ b/internal/crypto/sharing/v1/polynomial.go @@ -7,7 +7,7 @@ package v1 import ( - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type polynomial struct { diff --git a/crypto/sharing/v1/polynomial_test.go b/internal/crypto/sharing/v1/polynomial_test.go similarity index 100% rename from crypto/sharing/v1/polynomial_test.go rename to internal/crypto/sharing/v1/polynomial_test.go diff --git a/crypto/sharing/v1/shamir.go b/internal/crypto/sharing/v1/shamir.go similarity index 99% rename from crypto/sharing/v1/shamir.go rename to internal/crypto/sharing/v1/shamir.go index df1282d37..653580647 100755 --- a/crypto/sharing/v1/shamir.go +++ b/internal/crypto/sharing/v1/shamir.go @@ -11,7 +11,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // ShamirShare is the data from splitting a secret diff --git a/crypto/sharing/v1/shamir_test.go b/internal/crypto/sharing/v1/shamir_test.go similarity index 99% rename from crypto/sharing/v1/shamir_test.go rename to internal/crypto/sharing/v1/shamir_test.go index 0fa383235..eb855dc22 100755 --- a/crypto/sharing/v1/shamir_test.go +++ b/internal/crypto/sharing/v1/shamir_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestShamirSplitInvalidArgs(t *testing.T) { diff --git a/crypto/signatures/bbs/blind_signature.go b/internal/crypto/signatures/bbs/blind_signature.go similarity index 94% rename from crypto/signatures/bbs/blind_signature.go rename to internal/crypto/signatures/bbs/blind_signature.go index 0fa16ed29..6f27d01bd 100755 --- a/crypto/signatures/bbs/blind_signature.go +++ b/internal/crypto/signatures/bbs/blind_signature.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/signatures/common" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/signatures/common" ) // BlindSignature is a BBS+ blind signature diff --git a/crypto/signatures/bbs/blind_signature_context.go b/internal/crypto/signatures/bbs/blind_signature_context.go similarity index 98% rename from crypto/signatures/bbs/blind_signature_context.go rename to internal/crypto/signatures/bbs/blind_signature_context.go index a05edd1e9..55bbd000c 100755 --- a/crypto/signatures/bbs/blind_signature_context.go +++ b/internal/crypto/signatures/bbs/blind_signature_context.go @@ -14,9 +14,9 @@ import ( "github.com/gtank/merlin" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" - "github.com/onsonr/sonr/crypto/signatures/common" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/signatures/common" ) // BlindSignatureContext contains the data used for computing diff --git a/crypto/signatures/bbs/blind_signature_context_test.go b/internal/crypto/signatures/bbs/blind_signature_context_test.go similarity index 98% rename from crypto/signatures/bbs/blind_signature_context_test.go rename to internal/crypto/signatures/bbs/blind_signature_context_test.go index 6853818f9..66ba85710 100755 --- a/crypto/signatures/bbs/blind_signature_context_test.go +++ b/internal/crypto/signatures/bbs/blind_signature_context_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestBlindSignatureContext(t *testing.T) { diff --git a/crypto/signatures/bbs/message_generators.go b/internal/crypto/signatures/bbs/message_generators.go similarity index 97% rename from crypto/signatures/bbs/message_generators.go rename to internal/crypto/signatures/bbs/message_generators.go index 641093671..fcf84637b 100755 --- a/crypto/signatures/bbs/message_generators.go +++ b/internal/crypto/signatures/bbs/message_generators.go @@ -9,7 +9,7 @@ package bbs import ( "errors" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // MessageGenerators are used to sign a vector of commitments for diff --git a/crypto/signatures/bbs/pok_signature.go b/internal/crypto/signatures/bbs/pok_signature.go similarity index 97% rename from crypto/signatures/bbs/pok_signature.go rename to internal/crypto/signatures/bbs/pok_signature.go index b16736e34..1ac14136e 100755 --- a/crypto/signatures/bbs/pok_signature.go +++ b/internal/crypto/signatures/bbs/pok_signature.go @@ -12,8 +12,8 @@ import ( "github.com/gtank/merlin" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/signatures/common" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/signatures/common" ) // PokSignature a.k.a. Proof of Knowledge of a Signature diff --git a/crypto/signatures/bbs/pok_signature_proof.go b/internal/crypto/signatures/bbs/pok_signature_proof.go similarity index 98% rename from crypto/signatures/bbs/pok_signature_proof.go rename to internal/crypto/signatures/bbs/pok_signature_proof.go index 6ba4e4ace..36717c868 100755 --- a/crypto/signatures/bbs/pok_signature_proof.go +++ b/internal/crypto/signatures/bbs/pok_signature_proof.go @@ -12,8 +12,8 @@ import ( "github.com/gtank/merlin" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/signatures/common" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/signatures/common" ) // PokSignatureProof is the actual proof sent from a prover diff --git a/crypto/signatures/bbs/pok_signature_proof_test.go b/internal/crypto/signatures/bbs/pok_signature_proof_test.go similarity index 98% rename from crypto/signatures/bbs/pok_signature_proof_test.go rename to internal/crypto/signatures/bbs/pok_signature_proof_test.go index 6a1c571b1..927c223fc 100755 --- a/crypto/signatures/bbs/pok_signature_proof_test.go +++ b/internal/crypto/signatures/bbs/pok_signature_proof_test.go @@ -13,8 +13,8 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/signatures/common" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/signatures/common" ) func TestPokSignatureProofSomeMessagesRevealed(t *testing.T) { diff --git a/crypto/signatures/bbs/public_key.go b/internal/crypto/signatures/bbs/public_key.go similarity index 96% rename from crypto/signatures/bbs/public_key.go rename to internal/crypto/signatures/bbs/public_key.go index 57d80a611..8d686200c 100755 --- a/crypto/signatures/bbs/public_key.go +++ b/internal/crypto/signatures/bbs/public_key.go @@ -10,7 +10,7 @@ import ( "errors" "fmt" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // PublicKey is a BBS+ verification key diff --git a/crypto/signatures/bbs/secret_key.go b/internal/crypto/signatures/bbs/secret_key.go similarity index 98% rename from crypto/signatures/bbs/secret_key.go rename to internal/crypto/signatures/bbs/secret_key.go index a1d24df7a..fadd9ff50 100755 --- a/crypto/signatures/bbs/secret_key.go +++ b/internal/crypto/signatures/bbs/secret_key.go @@ -16,7 +16,7 @@ import ( "golang.org/x/crypto/hkdf" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // SecretKey is a BBS+ signing key diff --git a/crypto/signatures/bbs/signature.go b/internal/crypto/signatures/bbs/signature.go similarity index 96% rename from crypto/signatures/bbs/signature.go rename to internal/crypto/signatures/bbs/signature.go index 5964e58d6..9be6f41e3 100755 --- a/crypto/signatures/bbs/signature.go +++ b/internal/crypto/signatures/bbs/signature.go @@ -11,7 +11,7 @@ import ( "errors" "fmt" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // Signature is a BBS+ signature diff --git a/crypto/signatures/bbs/signature_test.go b/internal/crypto/signatures/bbs/signature_test.go similarity index 97% rename from crypto/signatures/bbs/signature_test.go rename to internal/crypto/signatures/bbs/signature_test.go index 6ff1159d7..ed4a492d0 100755 --- a/crypto/signatures/bbs/signature_test.go +++ b/internal/crypto/signatures/bbs/signature_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestSignatureWorks(t *testing.T) { diff --git a/crypto/signatures/bls/README.md b/internal/crypto/signatures/bls/README.md similarity index 100% rename from crypto/signatures/bls/README.md rename to internal/crypto/signatures/bls/README.md diff --git a/crypto/signatures/bls/bls_sig/lib.go b/internal/crypto/signatures/bls/bls_sig/lib.go similarity index 95% rename from crypto/signatures/bls/bls_sig/lib.go rename to internal/crypto/signatures/bls/bls_sig/lib.go index 23802563e..0323234e2 100755 --- a/crypto/signatures/bls/bls_sig/lib.go +++ b/internal/crypto/signatures/bls/bls_sig/lib.go @@ -15,11 +15,11 @@ import ( "golang.org/x/crypto/hkdf" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/crypto/internal" - "github.com/onsonr/sonr/crypto/sharing" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/sharing" ) // Secret key in Fr diff --git a/crypto/signatures/bls/bls_sig/lib_test.go b/internal/crypto/signatures/bls/bls_sig/lib_test.go similarity index 98% rename from crypto/signatures/bls/bls_sig/lib_test.go rename to internal/crypto/signatures/bls/bls_sig/lib_test.go index 57f41c082..4e872f116 100755 --- a/crypto/signatures/bls/bls_sig/lib_test.go +++ b/internal/crypto/signatures/bls/bls_sig/lib_test.go @@ -13,8 +13,8 @@ import ( "math/big" "testing" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/internal" ) func genSecretKey(t *testing.T) *SecretKey { diff --git a/crypto/signatures/bls/bls_sig/tiny_bls.go b/internal/crypto/signatures/bls/bls_sig/tiny_bls.go similarity index 100% rename from crypto/signatures/bls/bls_sig/tiny_bls.go rename to internal/crypto/signatures/bls/bls_sig/tiny_bls.go diff --git a/crypto/signatures/bls/bls_sig/tiny_bls_sig.go b/internal/crypto/signatures/bls/bls_sig/tiny_bls_sig.go similarity index 98% rename from crypto/signatures/bls/bls_sig/tiny_bls_sig.go rename to internal/crypto/signatures/bls/bls_sig/tiny_bls_sig.go index ed1a6721f..4bddd1eff 100755 --- a/crypto/signatures/bls/bls_sig/tiny_bls_sig.go +++ b/internal/crypto/signatures/bls/bls_sig/tiny_bls_sig.go @@ -9,9 +9,9 @@ package bls_sig import ( "fmt" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/internal" ) // Implement BLS signatures on the BLS12-381 curve diff --git a/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go b/internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go similarity index 99% rename from crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go rename to internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go index 6421022c2..5b2873540 100755 --- a/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go +++ b/internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go @@ -9,7 +9,7 @@ package bls_sig import ( "testing" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" ) func generateAugSignatureG1(sk *SecretKey, msg []byte, t *testing.T) *SignatureVt { diff --git a/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go b/internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go similarity index 99% rename from crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go rename to internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go index d7f48d4b8..e05dd3b80 100755 --- a/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go +++ b/internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go @@ -9,7 +9,7 @@ package bls_sig import ( "testing" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" ) func generateBasicSignatureG1(sk *SecretKey, msg []byte, t *testing.T) *SignatureVt { diff --git a/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go b/internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go similarity index 99% rename from crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go rename to internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go index 82d737012..22ab0b541 100755 --- a/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go +++ b/internal/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go @@ -12,7 +12,7 @@ import ( "math/rand" "testing" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" ) const numAggregateG1 = 10 diff --git a/crypto/signatures/bls/bls_sig/usual_bls.go b/internal/crypto/signatures/bls/bls_sig/usual_bls.go similarity index 100% rename from crypto/signatures/bls/bls_sig/usual_bls.go rename to internal/crypto/signatures/bls/bls_sig/usual_bls.go diff --git a/crypto/signatures/bls/bls_sig/usual_bls_sig.go b/internal/crypto/signatures/bls/bls_sig/usual_bls_sig.go similarity index 98% rename from crypto/signatures/bls/bls_sig/usual_bls_sig.go rename to internal/crypto/signatures/bls/bls_sig/usual_bls_sig.go index 284393eda..ad45bf130 100755 --- a/crypto/signatures/bls/bls_sig/usual_bls_sig.go +++ b/internal/crypto/signatures/bls/bls_sig/usual_bls_sig.go @@ -9,9 +9,9 @@ package bls_sig import ( "fmt" - "github.com/onsonr/sonr/crypto/core/curves/native" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves/native" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/internal" ) // Implement BLS signatures on the BLS12-381 curve diff --git a/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go b/internal/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go similarity index 99% rename from crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go rename to internal/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go index b70f8a316..35fb0a6a5 100755 --- a/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go +++ b/internal/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go @@ -9,7 +9,7 @@ package bls_sig import ( "testing" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" ) func generateAugSignatureG2(sk *SecretKey, msg []byte, t *testing.T) *Signature { diff --git a/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go b/internal/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go similarity index 99% rename from crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go rename to internal/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go index 0b9682973..3194abca1 100755 --- a/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go +++ b/internal/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go @@ -9,7 +9,7 @@ package bls_sig import ( "testing" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" ) func generateBasicSignatureG2(sk *SecretKey, msg []byte, t *testing.T) *Signature { diff --git a/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go b/internal/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go similarity index 99% rename from crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go rename to internal/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go index 4a6157d83..0e7d26fac 100755 --- a/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go +++ b/internal/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go @@ -12,7 +12,7 @@ import ( "math/rand" "testing" - "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/bls12381" ) const numAggregateG2 = 10 diff --git a/crypto/signatures/bls/rust/Cargo.toml b/internal/crypto/signatures/bls/rust/Cargo.toml similarity index 100% rename from crypto/signatures/bls/rust/Cargo.toml rename to internal/crypto/signatures/bls/rust/Cargo.toml diff --git a/crypto/signatures/bls/rust/README.md b/internal/crypto/signatures/bls/rust/README.md similarity index 100% rename from crypto/signatures/bls/rust/README.md rename to internal/crypto/signatures/bls/rust/README.md diff --git a/crypto/signatures/bls/rust/src/main.rs b/internal/crypto/signatures/bls/rust/src/main.rs similarity index 100% rename from crypto/signatures/bls/rust/src/main.rs rename to internal/crypto/signatures/bls/rust/src/main.rs diff --git a/crypto/signatures/bls/tests/bls/main.go b/internal/crypto/signatures/bls/tests/bls/main.go similarity index 98% rename from crypto/signatures/bls/tests/bls/main.go rename to internal/crypto/signatures/bls/tests/bls/main.go index 14c6cc4f9..40cefe5f9 100755 --- a/crypto/signatures/bls/tests/bls/main.go +++ b/internal/crypto/signatures/bls/tests/bls/main.go @@ -15,7 +15,7 @@ import ( "io/ioutil" "os" - bls "github.com/onsonr/sonr/crypto/signatures/bls/bls_sig" + bls "github.com/onsonr/sonr/internal/crypto/signatures/bls/bls_sig" ) type signOp struct { diff --git a/crypto/signatures/bls/tmp.json b/internal/crypto/signatures/bls/tmp.json similarity index 100% rename from crypto/signatures/bls/tmp.json rename to internal/crypto/signatures/bls/tmp.json diff --git a/crypto/signatures/common/challenge.go b/internal/crypto/signatures/common/challenge.go similarity index 79% rename from crypto/signatures/common/challenge.go rename to internal/crypto/signatures/common/challenge.go index 1a8db7f6e..7fc67e2e1 100755 --- a/crypto/signatures/common/challenge.go +++ b/internal/crypto/signatures/common/challenge.go @@ -7,7 +7,7 @@ package common import ( - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // Challenge generated by fiat-shamir heuristic diff --git a/crypto/signatures/common/commitment.go b/internal/crypto/signatures/common/commitment.go similarity index 82% rename from crypto/signatures/common/commitment.go rename to internal/crypto/signatures/common/commitment.go index 62a190054..67f854759 100755 --- a/crypto/signatures/common/commitment.go +++ b/internal/crypto/signatures/common/commitment.go @@ -7,7 +7,7 @@ package common import ( - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // Commitment represents a point Pedersen commitment of one or more diff --git a/crypto/signatures/common/hmacdrbg.go b/internal/crypto/signatures/common/hmacdrbg.go similarity index 100% rename from crypto/signatures/common/hmacdrbg.go rename to internal/crypto/signatures/common/hmacdrbg.go diff --git a/crypto/signatures/common/nonce.go b/internal/crypto/signatures/common/nonce.go similarity index 81% rename from crypto/signatures/common/nonce.go rename to internal/crypto/signatures/common/nonce.go index 4b117258c..5fbd93707 100755 --- a/crypto/signatures/common/nonce.go +++ b/internal/crypto/signatures/common/nonce.go @@ -7,7 +7,7 @@ package common import ( - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // Nonce is used for zero-knowledge proofs to prevent replay attacks diff --git a/crypto/signatures/common/proof_committed_builder.go b/internal/crypto/signatures/common/proof_committed_builder.go similarity index 97% rename from crypto/signatures/common/proof_committed_builder.go rename to internal/crypto/signatures/common/proof_committed_builder.go index 8e19f8b36..2447c37b7 100755 --- a/crypto/signatures/common/proof_committed_builder.go +++ b/internal/crypto/signatures/common/proof_committed_builder.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) const limit = 65535 diff --git a/crypto/signatures/common/proof_message.go b/internal/crypto/signatures/common/proof_message.go similarity index 97% rename from crypto/signatures/common/proof_message.go rename to internal/crypto/signatures/common/proof_message.go index 4c60b9bd0..1025a480f 100755 --- a/crypto/signatures/common/proof_message.go +++ b/internal/crypto/signatures/common/proof_message.go @@ -9,7 +9,7 @@ package common import ( "io" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // ProofMessage classifies how a message is presented in a proof diff --git a/crypto/signatures/common/signature_blinding.go b/internal/crypto/signatures/common/signature_blinding.go similarity index 81% rename from crypto/signatures/common/signature_blinding.go rename to internal/crypto/signatures/common/signature_blinding.go index 741ec9ee6..e6f385472 100755 --- a/crypto/signatures/common/signature_blinding.go +++ b/internal/crypto/signatures/common/signature_blinding.go @@ -7,7 +7,7 @@ package common import ( - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // SignatureBlinding is a value used for computing blind signatures diff --git a/crypto/signatures/schnorr/mina/bitvector.go b/internal/crypto/signatures/schnorr/mina/bitvector.go similarity index 100% rename from crypto/signatures/schnorr/mina/bitvector.go rename to internal/crypto/signatures/schnorr/mina/bitvector.go diff --git a/crypto/signatures/schnorr/mina/challenge_derive.go b/internal/crypto/signatures/schnorr/mina/challenge_derive.go similarity index 93% rename from crypto/signatures/schnorr/mina/challenge_derive.go rename to internal/crypto/signatures/schnorr/mina/challenge_derive.go index 5e3111d76..08a118183 100755 --- a/crypto/signatures/schnorr/mina/challenge_derive.go +++ b/internal/crypto/signatures/schnorr/mina/challenge_derive.go @@ -9,7 +9,7 @@ package mina import ( "fmt" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type MinaTSchnorrHandler struct{} diff --git a/crypto/signatures/schnorr/mina/keys.go b/internal/crypto/signatures/schnorr/mina/keys.go similarity index 97% rename from crypto/signatures/schnorr/mina/keys.go rename to internal/crypto/signatures/schnorr/mina/keys.go index afc7177df..ce4d20752 100755 --- a/crypto/signatures/schnorr/mina/keys.go +++ b/internal/crypto/signatures/schnorr/mina/keys.go @@ -17,9 +17,9 @@ import ( "github.com/mr-tron/base58" "golang.org/x/crypto/blake2b" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fq" ) const ( diff --git a/crypto/signatures/schnorr/mina/keys_test.go b/internal/crypto/signatures/schnorr/mina/keys_test.go similarity index 98% rename from crypto/signatures/schnorr/mina/keys_test.go rename to internal/crypto/signatures/schnorr/mina/keys_test.go index 8b9764965..a531791ee 100755 --- a/crypto/signatures/schnorr/mina/keys_test.go +++ b/internal/crypto/signatures/schnorr/mina/keys_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fq" ) func TestNewKeys(t *testing.T) { diff --git a/crypto/signatures/schnorr/mina/poseidon_config.go b/internal/crypto/signatures/schnorr/mina/poseidon_config.go similarity index 96% rename from crypto/signatures/schnorr/mina/poseidon_config.go rename to internal/crypto/signatures/schnorr/mina/poseidon_config.go index 5eb9da8c3..aa722c7d6 100755 --- a/crypto/signatures/schnorr/mina/poseidon_config.go +++ b/internal/crypto/signatures/schnorr/mina/poseidon_config.go @@ -7,7 +7,7 @@ package mina import ( - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fp" ) // SBox is the type of exponentiation to perform diff --git a/crypto/signatures/schnorr/mina/poseidon_hash.go b/internal/crypto/signatures/schnorr/mina/poseidon_hash.go similarity index 99% rename from crypto/signatures/schnorr/mina/poseidon_hash.go rename to internal/crypto/signatures/schnorr/mina/poseidon_hash.go index 17573d86a..2a40e2596 100755 --- a/crypto/signatures/schnorr/mina/poseidon_hash.go +++ b/internal/crypto/signatures/schnorr/mina/poseidon_hash.go @@ -7,8 +7,8 @@ package mina import ( - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fq" ) type Context struct { diff --git a/crypto/signatures/schnorr/mina/poseidon_hash_test.go b/internal/crypto/signatures/schnorr/mina/poseidon_hash_test.go similarity index 96% rename from crypto/signatures/schnorr/mina/poseidon_hash_test.go rename to internal/crypto/signatures/schnorr/mina/poseidon_hash_test.go index 739c03182..1376a4daa 100755 --- a/crypto/signatures/schnorr/mina/poseidon_hash_test.go +++ b/internal/crypto/signatures/schnorr/mina/poseidon_hash_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fq" ) func TestPoseidonHash(t *testing.T) { diff --git a/crypto/signatures/schnorr/mina/roinput.go b/internal/crypto/signatures/schnorr/mina/roinput.go similarity index 95% rename from crypto/signatures/schnorr/mina/roinput.go rename to internal/crypto/signatures/schnorr/mina/roinput.go index df172ddc1..90a4ebf71 100755 --- a/crypto/signatures/schnorr/mina/roinput.go +++ b/internal/crypto/signatures/schnorr/mina/roinput.go @@ -7,8 +7,8 @@ package mina import ( - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fq" ) // Handles the packing of bits and fields according to Mina spec diff --git a/crypto/signatures/schnorr/mina/signature.go b/internal/crypto/signatures/schnorr/mina/signature.go similarity index 85% rename from crypto/signatures/schnorr/mina/signature.go rename to internal/crypto/signatures/schnorr/mina/signature.go index 63c008b45..87069c354 100755 --- a/crypto/signatures/schnorr/mina/signature.go +++ b/internal/crypto/signatures/schnorr/mina/signature.go @@ -9,8 +9,8 @@ package mina import ( "fmt" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/internal/crypto/core/curves/native/pasta/fq" ) // Signature is a Mina compatible signature either for payment or delegation diff --git a/crypto/signatures/schnorr/mina/txn.go b/internal/crypto/signatures/schnorr/mina/txn.go similarity index 99% rename from crypto/signatures/schnorr/mina/txn.go rename to internal/crypto/signatures/schnorr/mina/txn.go index 246aa7e53..298a3d7cf 100755 --- a/crypto/signatures/schnorr/mina/txn.go +++ b/internal/crypto/signatures/schnorr/mina/txn.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/btcutil/base58" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // Transaction is a Mina transaction for payments or delegations diff --git a/crypto/signatures/schnorr/nem/ed25519_keccak.go b/internal/crypto/signatures/schnorr/nem/ed25519_keccak.go similarity index 99% rename from crypto/signatures/schnorr/nem/ed25519_keccak.go rename to internal/crypto/signatures/schnorr/nem/ed25519_keccak.go index 541601afd..816a90137 100755 --- a/crypto/signatures/schnorr/nem/ed25519_keccak.go +++ b/internal/crypto/signatures/schnorr/nem/ed25519_keccak.go @@ -28,7 +28,7 @@ import ( "filippo.io/edwards25519" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/internal" ) const ( diff --git a/crypto/signatures/schnorr/nem/ed25519_keccak_test.go b/internal/crypto/signatures/schnorr/nem/ed25519_keccak_test.go similarity index 100% rename from crypto/signatures/schnorr/nem/ed25519_keccak_test.go rename to internal/crypto/signatures/schnorr/nem/ed25519_keccak_test.go diff --git a/crypto/subtle/hkdf.go b/internal/crypto/subtle/hkdf.go similarity index 100% rename from crypto/subtle/hkdf.go rename to internal/crypto/subtle/hkdf.go diff --git a/crypto/subtle/random/random.go b/internal/crypto/subtle/random/random.go similarity index 100% rename from crypto/subtle/random/random.go rename to internal/crypto/subtle/random/random.go diff --git a/crypto/subtle/subtle.go b/internal/crypto/subtle/subtle.go similarity index 100% rename from crypto/subtle/subtle.go rename to internal/crypto/subtle/subtle.go diff --git a/crypto/subtle/x25519.go b/internal/crypto/subtle/x25519.go similarity index 100% rename from crypto/subtle/x25519.go rename to internal/crypto/subtle/x25519.go diff --git a/crypto/tecdsa/dklsv1/README.md b/internal/crypto/tecdsa/dklsv1/README.md similarity index 100% rename from crypto/tecdsa/dklsv1/README.md rename to internal/crypto/tecdsa/dklsv1/README.md diff --git a/crypto/tecdsa/dklsv1/boilerplate.go b/internal/crypto/tecdsa/dklsv1/boilerplate.go similarity index 97% rename from crypto/tecdsa/dklsv1/boilerplate.go rename to internal/crypto/tecdsa/dklsv1/boilerplate.go index 4f8def1bc..a6adf223b 100755 --- a/crypto/tecdsa/dklsv1/boilerplate.go +++ b/internal/crypto/tecdsa/dklsv1/boilerplate.go @@ -5,11 +5,11 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/protocol" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/refresh" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/sign" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/refresh" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/sign" ) // AliceDkg DKLS DKG implementation that satisfies the protocol iterator interface. diff --git a/crypto/tecdsa/dklsv1/dealer/dealer.go b/internal/crypto/tecdsa/dklsv1/dealer/dealer.go similarity index 93% rename from crypto/tecdsa/dklsv1/dealer/dealer.go rename to internal/crypto/tecdsa/dklsv1/dealer/dealer.go index 3f257a387..f69201912 100755 --- a/crypto/tecdsa/dklsv1/dealer/dealer.go +++ b/internal/crypto/tecdsa/dklsv1/dealer/dealer.go @@ -15,10 +15,10 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/extension/kos" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" ) // GenerateAndDeal produces private key material for alice and bob which they can later use in signing. diff --git a/crypto/tecdsa/dklsv1/dealer/dealer_test.go b/internal/crypto/tecdsa/dklsv1/dealer/dealer_test.go similarity index 89% rename from crypto/tecdsa/dklsv1/dealer/dealer_test.go rename to internal/crypto/tecdsa/dklsv1/dealer/dealer_test.go index 3c836775a..906a6549e 100755 --- a/crypto/tecdsa/dklsv1/dealer/dealer_test.go +++ b/internal/crypto/tecdsa/dklsv1/dealer/dealer_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dealer" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/sign" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dealer" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/sign" ) func Test_DealerCanGenerateKeysThatSign(t *testing.T) { diff --git a/crypto/tecdsa/dklsv1/dkg/dkg.go b/internal/crypto/tecdsa/dklsv1/dkg/dkg.go similarity index 98% rename from crypto/tecdsa/dklsv1/dkg/dkg.go rename to internal/crypto/tecdsa/dklsv1/dkg/dkg.go index 667fb2797..f3d6b9f20 100755 --- a/crypto/tecdsa/dklsv1/dkg/dkg.go +++ b/internal/crypto/tecdsa/dklsv1/dkg/dkg.go @@ -15,10 +15,10 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/extension/kos" - "github.com/onsonr/sonr/crypto/zkp/schnorr" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/zkp/schnorr" ) // AliceOutput is the result of running DKG for Alice. It contains both the public and secret values that are needed diff --git a/crypto/tecdsa/dklsv1/dkg/dkg_test.go b/internal/crypto/tecdsa/dklsv1/dkg/dkg_test.go similarity index 96% rename from crypto/tecdsa/dklsv1/dkg/dkg_test.go rename to internal/crypto/tecdsa/dklsv1/dkg/dkg_test.go index 24d6501bb..2ba6103a1 100755 --- a/crypto/tecdsa/dklsv1/dkg/dkg_test.go +++ b/internal/crypto/tecdsa/dklsv1/dkg/dkg_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" ) func TestDkg(t *testing.T) { diff --git a/crypto/tecdsa/dklsv1/dkgserializers.go b/internal/crypto/tecdsa/dklsv1/dkgserializers.go similarity index 97% rename from crypto/tecdsa/dklsv1/dkgserializers.go rename to internal/crypto/tecdsa/dklsv1/dkgserializers.go index b408bfe43..fa85b8212 100755 --- a/crypto/tecdsa/dklsv1/dkgserializers.go +++ b/internal/crypto/tecdsa/dklsv1/dkgserializers.go @@ -6,11 +6,11 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/protocol" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/crypto/zkp/schnorr" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/zkp/schnorr" ) const payloadKey = "direct" diff --git a/crypto/tecdsa/dklsv1/protocol.go b/internal/crypto/tecdsa/dklsv1/protocol.go similarity index 94% rename from crypto/tecdsa/dklsv1/protocol.go rename to internal/crypto/tecdsa/dklsv1/protocol.go index 50e73a184..c0b167fc0 100755 --- a/crypto/tecdsa/dklsv1/protocol.go +++ b/internal/crypto/tecdsa/dklsv1/protocol.go @@ -3,7 +3,7 @@ package dklsv1 import ( - "github.com/onsonr/sonr/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/core/protocol" ) // Basic protocol interface implementation that calls the next step func in a pre-defined list diff --git a/crypto/tecdsa/dklsv1/protocol_test.go b/internal/crypto/tecdsa/dklsv1/protocol_test.go similarity index 98% rename from crypto/tecdsa/dklsv1/protocol_test.go rename to internal/crypto/tecdsa/dklsv1/protocol_test.go index 214edb6b8..f4e70a881 100755 --- a/crypto/tecdsa/dklsv1/protocol_test.go +++ b/internal/crypto/tecdsa/dklsv1/protocol_test.go @@ -13,10 +13,10 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/protocol" - "github.com/onsonr/sonr/crypto/ot/extension/kos" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" ) // For DKG bob starts first. For refresh and sign, Alice starts first. diff --git a/crypto/tecdsa/dklsv1/refresh/refresh.go b/internal/crypto/tecdsa/dklsv1/refresh/refresh.go similarity index 95% rename from crypto/tecdsa/dklsv1/refresh/refresh.go rename to internal/crypto/tecdsa/dklsv1/refresh/refresh.go index f2488293d..35c81e6a3 100755 --- a/crypto/tecdsa/dklsv1/refresh/refresh.go +++ b/internal/crypto/tecdsa/dklsv1/refresh/refresh.go @@ -19,11 +19,11 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/extension/kos" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/crypto/zkp/schnorr" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/zkp/schnorr" ) // Alice struct encoding Alice's state during one execution of the overall signing algorithm. diff --git a/crypto/tecdsa/dklsv1/refresh/refresh_test.go b/internal/crypto/tecdsa/dklsv1/refresh/refresh_test.go similarity index 95% rename from crypto/tecdsa/dklsv1/refresh/refresh_test.go rename to internal/crypto/tecdsa/dklsv1/refresh/refresh_test.go index 89eafede4..5f14c16b3 100755 --- a/crypto/tecdsa/dklsv1/refresh/refresh_test.go +++ b/internal/crypto/tecdsa/dklsv1/refresh/refresh_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/extension/kos" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/refresh" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/sign" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/refresh" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/sign" ) func performDKG(t *testing.T, curve *curves.Curve) (*dkg.Alice, *dkg.Bob) { diff --git a/crypto/tecdsa/dklsv1/refreshserializers.go b/internal/crypto/tecdsa/dklsv1/refreshserializers.go similarity index 96% rename from crypto/tecdsa/dklsv1/refreshserializers.go rename to internal/crypto/tecdsa/dklsv1/refreshserializers.go index 53f065364..4aaec6279 100755 --- a/crypto/tecdsa/dklsv1/refreshserializers.go +++ b/internal/crypto/tecdsa/dklsv1/refreshserializers.go @@ -6,11 +6,11 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/protocol" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/refresh" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/refresh" ) func newRefreshProtocolMessage(payload []byte, round string, version uint) *protocol.Message { diff --git a/crypto/tecdsa/dklsv1/sign/multiply.go b/internal/crypto/tecdsa/dklsv1/sign/multiply.go similarity index 98% rename from crypto/tecdsa/dklsv1/sign/multiply.go rename to internal/crypto/tecdsa/dklsv1/sign/multiply.go index 353faef65..9c3b79062 100755 --- a/crypto/tecdsa/dklsv1/sign/multiply.go +++ b/internal/crypto/tecdsa/dklsv1/sign/multiply.go @@ -16,10 +16,10 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" ) // This implements the Multiplication protocol of DKLs, protocol 5. https://eprint.iacr.org/2018/499.pdf diff --git a/crypto/tecdsa/dklsv1/sign/multiply_test.go b/internal/crypto/tecdsa/dklsv1/sign/multiply_test.go similarity index 83% rename from crypto/tecdsa/dklsv1/sign/multiply_test.go rename to internal/crypto/tecdsa/dklsv1/sign/multiply_test.go index 1bfede1bd..45c0a89ec 100755 --- a/crypto/tecdsa/dklsv1/sign/multiply_test.go +++ b/internal/crypto/tecdsa/dklsv1/sign/multiply_test.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/extension/kos" - "github.com/onsonr/sonr/crypto/ot/ottest" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/ot/ottest" ) func TestMultiply(t *testing.T) { diff --git a/crypto/tecdsa/dklsv1/sign/sign.go b/internal/crypto/tecdsa/dklsv1/sign/sign.go similarity index 98% rename from crypto/tecdsa/dklsv1/sign/sign.go rename to internal/crypto/tecdsa/dklsv1/sign/sign.go index 6d81add20..3f2258f34 100755 --- a/crypto/tecdsa/dklsv1/sign/sign.go +++ b/internal/crypto/tecdsa/dklsv1/sign/sign.go @@ -20,11 +20,11 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/extension/kos" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/crypto/zkp/schnorr" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/zkp/schnorr" ) const multiplicationCount = 2 diff --git a/crypto/tecdsa/dklsv1/sign/sign_test.go b/internal/crypto/tecdsa/dklsv1/sign/sign_test.go similarity index 90% rename from crypto/tecdsa/dklsv1/sign/sign_test.go rename to internal/crypto/tecdsa/dklsv1/sign/sign_test.go index 71427b084..0f44908df 100755 --- a/crypto/tecdsa/dklsv1/sign/sign_test.go +++ b/internal/crypto/tecdsa/dklsv1/sign/sign_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/ot/base/simplest" - "github.com/onsonr/sonr/crypto/ot/extension/kos" - "github.com/onsonr/sonr/crypto/ot/ottest" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/ot/base/simplest" + "github.com/onsonr/sonr/internal/crypto/ot/extension/kos" + "github.com/onsonr/sonr/internal/crypto/ot/ottest" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/dkg" ) func TestSign(t *testing.T) { diff --git a/crypto/tecdsa/dklsv1/signserializers.go b/internal/crypto/tecdsa/dklsv1/signserializers.go similarity index 95% rename from crypto/tecdsa/dklsv1/signserializers.go rename to internal/crypto/tecdsa/dklsv1/signserializers.go index 14b5a26bf..7a647b8d3 100755 --- a/crypto/tecdsa/dklsv1/signserializers.go +++ b/internal/crypto/tecdsa/dklsv1/signserializers.go @@ -6,9 +6,9 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/core/protocol" - "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/sign" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/protocol" + "github.com/onsonr/sonr/internal/crypto/tecdsa/dklsv1/sign" ) func newSignProtocolMessage(payload []byte, round string, version uint) *protocol.Message { diff --git a/crypto/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin b/internal/crypto/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin similarity index 100% rename from crypto/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin rename to internal/crypto/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin diff --git a/crypto/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin b/internal/crypto/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin similarity index 100% rename from crypto/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin rename to internal/crypto/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin diff --git a/crypto/ted25519/frost/README.md b/internal/crypto/ted25519/frost/README.md similarity index 100% rename from crypto/ted25519/frost/README.md rename to internal/crypto/ted25519/frost/README.md diff --git a/crypto/ted25519/frost/challenge_derive.go b/internal/crypto/ted25519/frost/challenge_derive.go similarity index 91% rename from crypto/ted25519/frost/challenge_derive.go rename to internal/crypto/ted25519/frost/challenge_derive.go index cbd138703..a00793a4e 100755 --- a/crypto/ted25519/frost/challenge_derive.go +++ b/internal/crypto/ted25519/frost/challenge_derive.go @@ -9,7 +9,7 @@ package frost import ( "crypto/sha512" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type ChallengeDerive interface { diff --git a/crypto/ted25519/frost/participant.go b/internal/crypto/ted25519/frost/participant.go similarity index 94% rename from crypto/ted25519/frost/participant.go rename to internal/crypto/ted25519/frost/participant.go index 1ede7f2d4..cb626d05f 100755 --- a/crypto/ted25519/frost/participant.go +++ b/internal/crypto/ted25519/frost/participant.go @@ -10,9 +10,9 @@ package frost import ( "fmt" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/dkg/frost" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/dkg/frost" + "github.com/onsonr/sonr/internal/crypto/internal" ) // Signer is a tSchnorr player performing the signing operation. diff --git a/crypto/ted25519/frost/round1.go b/internal/crypto/ted25519/frost/round1.go similarity index 94% rename from crypto/ted25519/frost/round1.go rename to internal/crypto/ted25519/frost/round1.go index 71736e7ea..9487faee9 100755 --- a/crypto/ted25519/frost/round1.go +++ b/internal/crypto/ted25519/frost/round1.go @@ -13,8 +13,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) // Round1Bcast contains values to be broadcast to all players after the completion of signing round 1. diff --git a/crypto/ted25519/frost/round2.go b/internal/crypto/ted25519/frost/round2.go similarity index 97% rename from crypto/ted25519/frost/round2.go rename to internal/crypto/ted25519/frost/round2.go index bdf2adaa6..19aad421a 100755 --- a/crypto/ted25519/frost/round2.go +++ b/internal/crypto/ted25519/frost/round2.go @@ -13,8 +13,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) // Round2Bcast contains values that will be broadcast to other signers after completion of round 2. diff --git a/crypto/ted25519/frost/round3.go b/internal/crypto/ted25519/frost/round3.go similarity index 97% rename from crypto/ted25519/frost/round3.go rename to internal/crypto/ted25519/frost/round3.go index 62cfa0d78..76cd50ab7 100755 --- a/crypto/ted25519/frost/round3.go +++ b/internal/crypto/ted25519/frost/round3.go @@ -9,8 +9,8 @@ package frost import ( "fmt" - "github.com/onsonr/sonr/crypto/core/curves" - "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/internal/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/internal" ) // Round3Bcast contains the output of FROST signature, i.e., it contains FROST signature (z,c) and the diff --git a/crypto/ted25519/frost/rounds_test.go b/internal/crypto/ted25519/frost/rounds_test.go similarity index 98% rename from crypto/ted25519/frost/rounds_test.go rename to internal/crypto/ted25519/frost/rounds_test.go index de4443109..71fc4cde0 100755 --- a/crypto/ted25519/frost/rounds_test.go +++ b/internal/crypto/ted25519/frost/rounds_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - dkg "github.com/onsonr/sonr/crypto/dkg/frost" - "github.com/onsonr/sonr/crypto/sharing" + "github.com/onsonr/sonr/internal/crypto/core/curves" + dkg "github.com/onsonr/sonr/internal/crypto/dkg/frost" + "github.com/onsonr/sonr/internal/crypto/sharing" ) var ( diff --git a/crypto/ted25519/ted25519/ed25519.go b/internal/crypto/ted25519/ted25519/ed25519.go similarity index 99% rename from crypto/ted25519/ted25519/ed25519.go rename to internal/crypto/ted25519/ted25519/ed25519.go index fb4943e8c..ef92b983b 100755 --- a/crypto/ted25519/ted25519/ed25519.go +++ b/internal/crypto/ted25519/ted25519/ed25519.go @@ -22,7 +22,7 @@ import ( "io" "strconv" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) const ( diff --git a/crypto/ted25519/ted25519/ed25519_test.go b/internal/crypto/ted25519/ted25519/ed25519_test.go similarity index 98% rename from crypto/ted25519/ted25519/ed25519_test.go rename to internal/crypto/ted25519/ted25519/ed25519_test.go index f1dbda4da..be84c93a5 100755 --- a/crypto/ted25519/ted25519/ed25519_test.go +++ b/internal/crypto/ted25519/ted25519/ed25519_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // sign.input.gz is a selection of test cases from diff --git a/crypto/ted25519/ted25519/ext.go b/internal/crypto/ted25519/ted25519/ext.go similarity index 98% rename from crypto/ted25519/ted25519/ext.go rename to internal/crypto/ted25519/ted25519/ext.go index 27c0edda9..8051d72a8 100755 --- a/crypto/ted25519/ted25519/ext.go +++ b/internal/crypto/ted25519/ted25519/ext.go @@ -10,7 +10,7 @@ import ( "crypto/sha512" "strconv" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // GeAdd returns the sum of two public keys, a and b. diff --git a/crypto/ted25519/ted25519/ext_test.go b/internal/crypto/ted25519/ted25519/ext_test.go similarity index 96% rename from crypto/ted25519/ted25519/ext_test.go rename to internal/crypto/ted25519/ted25519/ext_test.go index e1bb83296..173f5797d 100755 --- a/crypto/ted25519/ted25519/ext_test.go +++ b/internal/crypto/ted25519/ted25519/ext_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) const ( diff --git a/crypto/ted25519/ted25519/keygen.go b/internal/crypto/ted25519/ted25519/keygen.go similarity index 98% rename from crypto/ted25519/ted25519/keygen.go rename to internal/crypto/ted25519/ted25519/keygen.go index 58d21fe1e..727add214 100755 --- a/crypto/ted25519/ted25519/keygen.go +++ b/internal/crypto/ted25519/ted25519/keygen.go @@ -10,8 +10,8 @@ import ( "encoding/binary" "fmt" - "github.com/onsonr/sonr/crypto/core/curves" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) // PublicKeyFromBytes converts byte array into PublicKey byte array diff --git a/crypto/ted25519/ted25519/keygen_test.go b/internal/crypto/ted25519/ted25519/keygen_test.go similarity index 96% rename from crypto/ted25519/ted25519/keygen_test.go rename to internal/crypto/ted25519/ted25519/keygen_test.go index ead13126f..16bbdde0f 100755 --- a/crypto/ted25519/ted25519/keygen_test.go +++ b/internal/crypto/ted25519/ted25519/keygen_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) func TestGenerateEd25519Key(t *testing.T) { diff --git a/crypto/ted25519/ted25519/noncegen.go b/internal/crypto/ted25519/ted25519/noncegen.go similarity index 98% rename from crypto/ted25519/ted25519/noncegen.go rename to internal/crypto/ted25519/ted25519/noncegen.go index ed5d56096..17b262099 100755 --- a/crypto/ted25519/ted25519/noncegen.go +++ b/internal/crypto/ted25519/ted25519/noncegen.go @@ -13,7 +13,7 @@ import ( "golang.org/x/crypto/hkdf" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) // NonceShare represents a share of a generated nonce. diff --git a/crypto/ted25519/ted25519/noncegen_test.go b/internal/crypto/ted25519/ted25519/noncegen_test.go similarity index 96% rename from crypto/ted25519/ted25519/noncegen_test.go rename to internal/crypto/ted25519/ted25519/noncegen_test.go index cd9c7ce65..f78856c26 100755 --- a/crypto/ted25519/ted25519/noncegen_test.go +++ b/internal/crypto/ted25519/ted25519/noncegen_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) func TestNonceShareFromBytes(t *testing.T) { diff --git a/crypto/ted25519/ted25519/partialsig.go b/internal/crypto/ted25519/ted25519/partialsig.go similarity index 100% rename from crypto/ted25519/ted25519/partialsig.go rename to internal/crypto/ted25519/ted25519/partialsig.go diff --git a/crypto/ted25519/ted25519/partialsig_test.go b/internal/crypto/ted25519/ted25519/partialsig_test.go similarity index 96% rename from crypto/ted25519/ted25519/partialsig_test.go rename to internal/crypto/ted25519/ted25519/partialsig_test.go index c19530cdc..5baf64c54 100755 --- a/crypto/ted25519/ted25519/partialsig_test.go +++ b/internal/crypto/ted25519/ted25519/partialsig_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestPartialSignNormalSignature(t *testing.T) { diff --git a/crypto/ted25519/ted25519/sigagg.go b/internal/crypto/ted25519/ted25519/sigagg.go similarity index 92% rename from crypto/ted25519/ted25519/sigagg.go rename to internal/crypto/ted25519/ted25519/sigagg.go index 78c48a4d4..2645015e4 100755 --- a/crypto/ted25519/ted25519/sigagg.go +++ b/internal/crypto/ted25519/ted25519/sigagg.go @@ -10,8 +10,8 @@ import ( "bytes" "fmt" - "github.com/onsonr/sonr/crypto/core/curves" - v1 "github.com/onsonr/sonr/crypto/sharing/v1" + "github.com/onsonr/sonr/internal/crypto/core/curves" + v1 "github.com/onsonr/sonr/internal/crypto/sharing/v1" ) type Signature = []byte diff --git a/crypto/ted25519/ted25519/sigagg_test.go b/internal/crypto/ted25519/ted25519/sigagg_test.go similarity index 100% rename from crypto/ted25519/ted25519/sigagg_test.go rename to internal/crypto/ted25519/ted25519/sigagg_test.go diff --git a/crypto/ted25519/ted25519/twobytwo_test.go b/internal/crypto/ted25519/ted25519/twobytwo_test.go similarity index 96% rename from crypto/ted25519/ted25519/twobytwo_test.go rename to internal/crypto/ted25519/ted25519/twobytwo_test.go index 85a58c1ad..a15ed7912 100755 --- a/crypto/ted25519/ted25519/twobytwo_test.go +++ b/internal/crypto/ted25519/ted25519/twobytwo_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func AggregateSignatures(sig1, sig2 *PartialSignature) []byte { diff --git a/crypto/ucan/README.md b/internal/crypto/ucan/README.md similarity index 100% rename from crypto/ucan/README.md rename to internal/crypto/ucan/README.md diff --git a/crypto/ucan/attenuation.go b/internal/crypto/ucan/attenuation.go similarity index 100% rename from crypto/ucan/attenuation.go rename to internal/crypto/ucan/attenuation.go diff --git a/crypto/ucan/attns/UCAN.pkl.go b/internal/crypto/ucan/attns/UCAN.pkl.go similarity index 100% rename from crypto/ucan/attns/UCAN.pkl.go rename to internal/crypto/ucan/attns/UCAN.pkl.go diff --git a/crypto/ucan/attns/capaccount/CapAccount.pkl.go b/internal/crypto/ucan/attns/capaccount/CapAccount.pkl.go similarity index 100% rename from crypto/ucan/attns/capaccount/CapAccount.pkl.go rename to internal/crypto/ucan/attns/capaccount/CapAccount.pkl.go diff --git a/crypto/ucan/attns/capaccount/caps.go b/internal/crypto/ucan/attns/capaccount/caps.go similarity index 77% rename from crypto/ucan/attns/capaccount/caps.go rename to internal/crypto/ucan/attns/capaccount/caps.go index 53839351f..18fd50cb4 100644 --- a/crypto/ucan/attns/capaccount/caps.go +++ b/internal/crypto/ucan/attns/capaccount/caps.go @@ -1,6 +1,6 @@ package capaccount -import "github.com/onsonr/sonr/crypto/ucan" +import "github.com/onsonr/sonr/internal/crypto/ucan" func NewCap(ty CapAccount) ucan.Capability { return ucan.Capability(ty) diff --git a/crypto/ucan/attns/capinterchain/CapInterchain.pkl.go b/internal/crypto/ucan/attns/capinterchain/CapInterchain.pkl.go similarity index 100% rename from crypto/ucan/attns/capinterchain/CapInterchain.pkl.go rename to internal/crypto/ucan/attns/capinterchain/CapInterchain.pkl.go diff --git a/crypto/ucan/attns/capinterchain/caps.go b/internal/crypto/ucan/attns/capinterchain/caps.go similarity index 78% rename from crypto/ucan/attns/capinterchain/caps.go rename to internal/crypto/ucan/attns/capinterchain/caps.go index 5f0a4aa1c..adc4f63a4 100644 --- a/crypto/ucan/attns/capinterchain/caps.go +++ b/internal/crypto/ucan/attns/capinterchain/caps.go @@ -1,6 +1,6 @@ package capinterchain -import "github.com/onsonr/sonr/crypto/ucan" +import "github.com/onsonr/sonr/internal/crypto/ucan" func NewCap(ty CapInterchain) ucan.Capability { return ucan.Capability(ty) diff --git a/crypto/ucan/attns/capvault/CapVault.pkl.go b/internal/crypto/ucan/attns/capvault/CapVault.pkl.go similarity index 100% rename from crypto/ucan/attns/capvault/CapVault.pkl.go rename to internal/crypto/ucan/attns/capvault/CapVault.pkl.go diff --git a/crypto/ucan/attns/capvault/caps.go b/internal/crypto/ucan/attns/capvault/caps.go similarity index 77% rename from crypto/ucan/attns/capvault/caps.go rename to internal/crypto/ucan/attns/capvault/caps.go index 927b449d2..efd873be7 100644 --- a/crypto/ucan/attns/capvault/caps.go +++ b/internal/crypto/ucan/attns/capvault/caps.go @@ -1,6 +1,6 @@ package capvault -import "github.com/onsonr/sonr/crypto/ucan" +import "github.com/onsonr/sonr/internal/crypto/ucan" func NewCap(ty CapVault) ucan.Capability { return ucan.Capability(ty) diff --git a/crypto/ucan/attns/exports.go b/internal/crypto/ucan/attns/exports.go similarity index 86% rename from crypto/ucan/attns/exports.go rename to internal/crypto/ucan/attns/exports.go index d474dd805..5beb2ca17 100644 --- a/crypto/ucan/attns/exports.go +++ b/internal/crypto/ucan/attns/exports.go @@ -2,13 +2,13 @@ package attns import ( - "github.com/onsonr/sonr/crypto/ucan" - "github.com/onsonr/sonr/crypto/ucan/attns/capaccount" - "github.com/onsonr/sonr/crypto/ucan/attns/capinterchain" - "github.com/onsonr/sonr/crypto/ucan/attns/capvault" - "github.com/onsonr/sonr/crypto/ucan/attns/resaccount" - "github.com/onsonr/sonr/crypto/ucan/attns/resinterchain" - "github.com/onsonr/sonr/crypto/ucan/attns/resvault" + "github.com/onsonr/sonr/internal/crypto/ucan" + "github.com/onsonr/sonr/internal/crypto/ucan/attns/capaccount" + "github.com/onsonr/sonr/internal/crypto/ucan/attns/capinterchain" + "github.com/onsonr/sonr/internal/crypto/ucan/attns/capvault" + "github.com/onsonr/sonr/internal/crypto/ucan/attns/resaccount" + "github.com/onsonr/sonr/internal/crypto/ucan/attns/resinterchain" + "github.com/onsonr/sonr/internal/crypto/ucan/attns/resvault" ) // Capability hierarchy for sonr network diff --git a/crypto/ucan/attns/init.pkl.go b/internal/crypto/ucan/attns/init.pkl.go similarity index 100% rename from crypto/ucan/attns/init.pkl.go rename to internal/crypto/ucan/attns/init.pkl.go diff --git a/crypto/ucan/attns/resaccount/ResAccount.pkl.go b/internal/crypto/ucan/attns/resaccount/ResAccount.pkl.go similarity index 100% rename from crypto/ucan/attns/resaccount/ResAccount.pkl.go rename to internal/crypto/ucan/attns/resaccount/ResAccount.pkl.go diff --git a/crypto/ucan/attns/resaccount/resource.go b/internal/crypto/ucan/attns/resaccount/resource.go similarity index 92% rename from crypto/ucan/attns/resaccount/resource.go rename to internal/crypto/ucan/attns/resaccount/resource.go index e088cc378..b05c99b28 100644 --- a/crypto/ucan/attns/resaccount/resource.go +++ b/internal/crypto/ucan/attns/resaccount/resource.go @@ -1,6 +1,6 @@ package resaccount -import "github.com/onsonr/sonr/crypto/ucan" +import "github.com/onsonr/sonr/internal/crypto/ucan" func Build(ty ResAccount, value string) ucan.Resource { return newStringLengthResource(ty.String(), value) diff --git a/crypto/ucan/attns/resinterchain/ResInterchain.pkl.go b/internal/crypto/ucan/attns/resinterchain/ResInterchain.pkl.go similarity index 100% rename from crypto/ucan/attns/resinterchain/ResInterchain.pkl.go rename to internal/crypto/ucan/attns/resinterchain/ResInterchain.pkl.go diff --git a/crypto/ucan/attns/resinterchain/resource.go b/internal/crypto/ucan/attns/resinterchain/resource.go similarity index 92% rename from crypto/ucan/attns/resinterchain/resource.go rename to internal/crypto/ucan/attns/resinterchain/resource.go index 87bcdb277..3d35223d8 100644 --- a/crypto/ucan/attns/resinterchain/resource.go +++ b/internal/crypto/ucan/attns/resinterchain/resource.go @@ -1,6 +1,6 @@ package resinterchain -import "github.com/onsonr/sonr/crypto/ucan" +import "github.com/onsonr/sonr/internal/crypto/ucan" func Build(ty ResInterchain, value string) ucan.Resource { return newStringLengthResource(ty.String(), value) diff --git a/crypto/ucan/attns/resvault/ResVault.pkl.go b/internal/crypto/ucan/attns/resvault/ResVault.pkl.go similarity index 100% rename from crypto/ucan/attns/resvault/ResVault.pkl.go rename to internal/crypto/ucan/attns/resvault/ResVault.pkl.go diff --git a/crypto/ucan/attns/resvault/resource.go b/internal/crypto/ucan/attns/resvault/resource.go similarity index 92% rename from crypto/ucan/attns/resvault/resource.go rename to internal/crypto/ucan/attns/resvault/resource.go index 799a88b4f..134f7d314 100644 --- a/crypto/ucan/attns/resvault/resource.go +++ b/internal/crypto/ucan/attns/resvault/resource.go @@ -1,6 +1,6 @@ package resvault -import "github.com/onsonr/sonr/crypto/ucan" +import "github.com/onsonr/sonr/internal/crypto/ucan" func Build(ty ResVault, value string) ucan.Resource { return newStringLengthResource(ty.String(), value) diff --git a/crypto/ucan/context.go b/internal/crypto/ucan/context.go similarity index 100% rename from crypto/ucan/context.go rename to internal/crypto/ucan/context.go diff --git a/crypto/ucan/proof.go b/internal/crypto/ucan/proof.go similarity index 100% rename from crypto/ucan/proof.go rename to internal/crypto/ucan/proof.go diff --git a/crypto/ucan/store.go b/internal/crypto/ucan/store.go similarity index 100% rename from crypto/ucan/store.go rename to internal/crypto/ucan/store.go diff --git a/crypto/ucan/token.go b/internal/crypto/ucan/token.go similarity index 99% rename from crypto/ucan/token.go rename to internal/crypto/ucan/token.go index fc24f3063..ca27aa3be 100644 --- a/crypto/ucan/token.go +++ b/internal/crypto/ucan/token.go @@ -21,7 +21,7 @@ import ( "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p/core/crypto" mh "github.com/multiformats/go-multihash" - "github.com/onsonr/sonr/crypto/keys" + "github.com/onsonr/sonr/internal/crypto/keys" ) // ErrInvalidToken indicates an access token is invalid diff --git a/crypto/zkp/schnorr/schnorr.go b/internal/crypto/zkp/schnorr/schnorr.go similarity index 98% rename from crypto/zkp/schnorr/schnorr.go rename to internal/crypto/zkp/schnorr/schnorr.go index 756133c1d..c8f1ec3dd 100755 --- a/crypto/zkp/schnorr/schnorr.go +++ b/internal/crypto/zkp/schnorr/schnorr.go @@ -16,7 +16,7 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) type Commitment = []byte diff --git a/crypto/zkp/schnorr/schnorr_test.go b/internal/crypto/zkp/schnorr/schnorr_test.go similarity index 94% rename from crypto/zkp/schnorr/schnorr_test.go rename to internal/crypto/zkp/schnorr/schnorr_test.go index defa7a76b..7ab317153 100755 --- a/crypto/zkp/schnorr/schnorr_test.go +++ b/internal/crypto/zkp/schnorr/schnorr_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/internal/crypto/core/curves" ) func TestZKPOverMultipleCurves(t *testing.T) { diff --git a/pkl/README.md b/pkl/README.md deleted file mode 100644 index fa7b43aa1..000000000 --- a/pkl/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Sonr Pkl Definitions - -## Overview - -This directory contains the protobuf definitions for the Sonr blockchain. - -## Directory Structure - -### `did` - -The `did` directory contains the protobuf definitions for the DID module. - -### `dwn` - -The `dwn` directory contains the protobuf definitions for the Vault module. - -### `svc` - -The `service` directory contains the protobuf definitions for the Service module. diff --git a/pkl/basePklProject.pkl b/pkl/basePklProject.pkl deleted file mode 100644 index 74d8dac18..000000000 --- a/pkl/basePklProject.pkl +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//===----------------------------------------------------------------------===// -module basePklProject - -amends "pkl:Project" - -import "pkl:reflect" - -local myModule = reflect.Module(module) - -local packageName: String = - findRootModule(reflect.Module(module)) - .relativePathTo(module) - .last - -local function findRootModule(mod: reflect.Module): Module = - let (supermodule = mod.supermodule) - if (supermodule == null || !supermodule.isAmend) mod.reflectee - else findRootModule(supermodule) - -package { - baseUri = "package://pkl.sh/\(name)" - packageZipUrl = "https://pkl.sh/\(name)@\(version).zip" - license = "Apache-2.0" - authors { - "Prad N " - } - description = myModule.docComment - issueTracker = "https://github.com/onsonr/sonr/issues" - sourceCode = "https://github.com/onsonr/sonr/tree/pkl/\(name)" -} diff --git a/pkl/matrix.net/AppService.pkl b/pkl/matrix.net/AppService.pkl deleted file mode 100644 index 8b63dc65a..000000000 --- a/pkl/matrix.net/AppService.pkl +++ /dev/null @@ -1,55 +0,0 @@ -module matrix.net.AppService - -class Config { - /// Unique identifier for the homeserver - id: String - - /// Application service token - as_token: String - - /// Homeserver token - hs_token: String - - /// Namespace configuration for rooms, users, and aliases - namespaces: Namespaces - - /// Local part of the sender - sender_localpart: String - - /// Bridge URL endpoint - url: String - - /// Whether rate limiting is enabled - rate_limited: Boolean - - /// MSC2409 push ephemeral setting - deSorunomeMsc2409Push_ephemeral: Boolean - - /// Push ephemeral setting - push_ephemeral: Boolean - - /// MSC3202 setting - orgMatrixMsc3202: Boolean -} - - -/// Configuration for Matrix namespaces -class Namespaces { - /// Room namespace configurations - rooms: List = List() - - /// User namespace configurations - users: List - - /// Alias namespace configurations - aliases: List -} - -/// Regex rule configuration for namespaces -class RegexRule { - /// Regular expression pattern - regex: String - - /// Whether this rule is exclusive - exclusive: Boolean = false -} diff --git a/pkl/matrix.net/Homeserver.pkl b/pkl/matrix.net/Homeserver.pkl deleted file mode 100644 index af82a8c98..000000000 --- a/pkl/matrix.net/Homeserver.pkl +++ /dev/null @@ -1,197 +0,0 @@ -open module matrix.net.Homeserver - -version = 2 - -global = new { -server_name = read("env:MATRIX_SERVER_NAME") ?? "mx.sonr.id" -private_key = "matrix_key.pem" -old_private_keys = new Listing {} -key_validity_period = "168h0m0s" -} - -database = new { -connection_string = read("env:MATRIX_PSQL_CONN") ?? "" -max_open_conns = 90 -max_idle_conns = 5 -conn_max_lifetime = -1 -} - -cache = new { -max_size_estimated = "1gb" -max_age = "1h" -} - -well_known_server_name = "sonr.id" -well_known_client_name = read("env:MATRIX_CLIENT_NAME") ?? "sonr.id" -well_known_sliding_sync_proxy = read("env:MATRIX_SLIDING_SYNC_PROXY") ?? "" -trusted_third_party_id_servers = new Listing { -"matrix.org" -"vector.im" -} - -disable_federation = false - -presence = new { -enable_inbound = false -enable_outbound = false -} - -report_stats = new { -enabled = false -endpoint = "https://panopticon.matrix.org/push" -} - -server_notices = new { -enabled = false -local_part = "_server" -display_name = "Server Alerts" -avatar_url = "" -room_name = "Server Alerts" -} - -jetstream = new { -addresses = new Listing {} -disable_tls_validation = false -storage_path = "./" -topic_prefix = "_matrix" -} - -metrics = new { -enabled = false -basic_auth = new { - username = "metrics" - password = "metrics" -} -} - -dns_cache = new { -enabled = false -cache_size = 256 -cache_lifetime = "5m" -} - -app_service_api = new { -disable_tls_validation = false -legacy_auth = false -legacy_paths = false -config_files = new Listing { - "/etc/dendrite/chat-service.yaml" -} -} - -client_api = new { -registration_disabled = true -guests_disabled = true -registration_shared_secret = read("env:MATRIX_REGISTRATION_SHARED_SECRET") ?? "" -enable_registration_captcha = (read("env:MATRIX_ENABLE_RECATCHA") ?? "false").toBoolean() -recaptcha_public_key = read("env:MATRIX_RECATCHA_PUBLIC_KEY") ?? "" -recaptcha_private_key = read("env:MATRIX_RECATCHA_PRIVATE_KEY") ?? "" -recaptcha_bypass_secret = read("env:MATRIX_RECATCHA_BYPASS_SECRET") ?? "" -} - -turn = new { -turn_user_lifetime = "5m" -turn_uris = new Listing {} -turn_shared_secret = "" -} - -rate_limiting = new { -enabled = true -threshold = 20 -cooloff_ms = 500 -exempt_user_ids = new Listing {} -} - -federation_api = new { -send_max_retries = 16 -disable_tls_validation = false -disable_http_keepalives = false -key_perspectives = new Listing { - new { - server_name = "matrix.org" - keys = new Listing { - new { - key_id = "ed25519:auto" - public_key = "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw" - } - new { - key_id = "ed25519:a_RXGa" - public_key = "l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ" - } - } - } -} -prefer_direct_fetch = false -} - -media_api = new { -base_path = "./media_store" -max_file_size_bytes = 10485760 -dynamic_thumbnails = false -max_thumbnail_generators = 10 -thumbnail_sizes = new Listing { - new { - width = 32 - height = 32 - method = "crop" - } - new { - width = 96 - height = 96 - method = "crop" - } - new { - width = 640 - height = 480 - method = "scale" - } -} -} - -mscs = new { -mscs = new Listing {} -} - -sync_api = new Listing {} - -search = new { -enabled = false -index_path = "./searchindex" -language = "en" -} - -user_api = new { -bcrypt_cost = 10 -auto_join_rooms = new Listing { - // - "#main:matrix.org" -} -} - -tracing = new { -enabled = false -jaeger = new { - serviceName = "" - disabled = false - rpc_metrics = false - tags = new Listing {} - sampler = null - reporter = null - headers = null - baggage_restrictions = null - throttler = null -} -} - -logging = new Listing { -new { - type = "std" - level = "info" -} -new { - type = "file" - level = "info" - params = new { - path = "./logs" - } -} -} diff --git a/pkl/matrix.net/PklProject b/pkl/matrix.net/PklProject deleted file mode 100644 index 878b1f3e5..000000000 --- a/pkl/matrix.net/PklProject +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//===----------------------------------------------------------------------===// -/// Configuration files for integrating the Matrix service -amends "../basePklProject.pkl" - -package { - name = "matrix.net" - version = "0.0.2" -} diff --git a/pkl/matrix.net/PklProject.deps.json b/pkl/matrix.net/PklProject.deps.json deleted file mode 100644 index 836079aad..000000000 --- a/pkl/matrix.net/PklProject.deps.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "schemaVersion": 1, - "resolvedDependencies": {} -} \ No newline at end of file diff --git a/pkl/sonr.net/App.pkl b/pkl/sonr.net/App.pkl deleted file mode 100644 index 0352e7103..000000000 --- a/pkl/sonr.net/App.pkl +++ /dev/null @@ -1,78 +0,0 @@ -module sonr.net.App - -import "package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0#/toml.pkl" - -`minimum-gas-prices` = "0usnr" -`query-gas-limit` = "0" -pruning = "default" -`pruning-keep-recent` = "0" -`pruning-interval` = "0" -`halt-height` = 0 -`halt-time` = 0 -`min-retain-blocks` = 0 -`inter-block-cache` = true -`index-events` = new Listing {} -`iavl-cache-size` = 781250 -`iavl-disable-fastnode` = false -`app-db-backend` = "" - -telemetry = new { -`service-name` = "" -enabled = true -`enable-hostname` = true -`enable-hostname-label` = false -`enable-service-label` = false -`prometheus-retention-time` = 60 -`global-labels` = new Listing { - new Listing { - "chain_id" - "sonr-testnet-1" - } -} -`metrics-sink` = "" -`statsd-addr` = "" -`datadog-hostname` = "" -} - -api = new { -enable = true -swagger = false -address = "tcp://0.0.0.0:1317" -`max-open-connections` = 1000 -`rpc-read-timeout` = 10 -`rpc-write-timeout` = 0 -`rpc-max-body-bytes` = 1000000 -`enabled-unsafe-cors` = false -} - -grpc = new { -enable = true -address = "0.0.0.0:9090" -`max-recv-msg-size` = "10485760" -`max-send-msg-size` = "2147483647" -} - -`grpc-web` = new { -enable = true -} - -`state-sync` = new { -`snapshot-interval` = 0 -`snapshot-keep-recent` = 2 -} - -streaming = new { -abci = new { - keys = new Listing {} - plugin = "" - `stop-node-on-err` = true -} -} - -mempool = new { -`max-txs` = 5000 -} - -output { - renderer = new toml.Renderer {} -} diff --git a/pkl/sonr.net/Config.pkl b/pkl/sonr.net/Config.pkl deleted file mode 100644 index ef4eb9a7a..000000000 --- a/pkl/sonr.net/Config.pkl +++ /dev/null @@ -1,145 +0,0 @@ -module sonr.net.Config - -import "package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0#/toml.pkl" - -version = "0.38.12" - -proxy_app = "tcp://127.0.0.1:26658" -moniker = read("env:MONIKER") ?? "florence" -db_backend = "goleveldb" -db_dir = "data" -log_level = "info" -log_format = "plain" - -genesis_file = "config/genesis.json" -priv_validator_key_file = "config/priv_validator_key.json" -priv_validator_state_file = "data/priv_validator_state.json" -priv_validator_laddr = "" -node_key_file = "config/node_key.json" -abci = "socket" -filter_peers = false - -rpc = new { -laddr = "tcp://0.0.0.0:26657" -cors_allowed_origins = new Listing {} -cors_allowed_methods = new Listing { - "HEAD" - "GET" - "POST" -} -cors_allowed_headers = new Listing { - "Origin" - "Accept" - "Content-Type" - "X-Requested-With" - "X-Server-Time" -} -grpc_laddr = "" -grpc_max_open_connections = 900 -unsafe = false -max_open_connections = 900 -max_subscription_clients = 100 -max_subscriptions_per_client = 5 -experimental_subscription_buffer_size = 200 -experimental_websocket_write_buffer_size = 200 -experimental_close_on_slow_client = false -timeout_broadcast_tx_commit = "10s" -max_request_batch_size = 10 -max_body_bytes = 1000000 -max_header_bytes = 1048576 -tls_cert_file = "" -tls_key_file = "" -pprof_laddr = "localhost:6060" -} - -p2p = new { -laddr = "tcp://0.0.0.0:26656" -external_address = "" -seeds = "" -persistent_peers = "" -addr_book_file = "config/addrbook.json" -addr_book_strict = true -max_num_inbound_peers = 40 -max_num_outbound_peers = 10 -unconditional_peer_ids = "" -persistent_peers_max_dial_period = "0s" -flush_throttle_timeout = "100ms" -max_packet_msg_payload_size = 1024 -send_rate = 5120000 -recv_rate = 5120000 -pex = true -seed_mode = false -private_peer_ids = "" -allow_duplicate_ip = false -handshake_timeout = "20s" -dial_timeout = "3s" -} - -mempool = new { -type = "flood" -recheck = true -recheck_timeout = "1s" -broadcast = true -wal_dir = "" -size = 5000 -max_txs_bytes = 1073741824 -cache_size = 10000 -`keep-invalid-txs-in-cache` = false -max_tx_bytes = 1048576 -max_batch_bytes = 0 -experimental_max_gossip_connections_to_persistent_peers = 0 -experimental_max_gossip_connections_to_non_persistent_peers = 0 -} - -statesync = new { -enable = false -rpc_servers = "" -trust_height = 0 -trust_hash = "" -trust_period = "168h0m0s" -discovery_time = "15s" -temp_dir = "" -chunk_request_timeout = "10s" -chunk_fetchers = "4" -} - -blocksync = new { -version = "v0" -} - -consensus = new { -wal_file = "data/cs.wal/wal" -timeout_propose = "3s" -timeout_propose_delta = "500ms" -timeout_prevote = "1s" -timeout_prevote_delta = "500ms" -timeout_precommit = "1s" -timeout_precommit_delta = "500ms" -timeout_commit = "5000ms" -double_sign_check_height = 0 -skip_timeout_commit = false -create_empty_blocks = true -create_empty_blocks_interval = "0s" -peer_gossip_sleep_duration = "100ms" -peer_query_maj23_sleep_duration = "2s" -} - -storage = new { -discard_abci_responses = false -} - -tx_index = new { -indexer = read("env:TX_INDEX_INDEXER") ?? "kv" -`psql-conn` = read("env:TX_INDEX_PSQL_CONN") ?? "" -} - -instrumentation = new { -prometheus = false -prometheus_listen_addr = ":26660" -max_open_connections = 3 -namespace = "cometbft" -} - -output { - renderer = new toml.Renderer {} -} diff --git a/pkl/sonr.net/Hway.pkl b/pkl/sonr.net/Hway.pkl deleted file mode 100644 index 20778417f..000000000 --- a/pkl/sonr.net/Hway.pkl +++ /dev/null @@ -1,16 +0,0 @@ -@go.Package { name = "github.com/onsonr/sonr/internal/config/hway" } - -open module sonr.net.Hway - -import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" - -servePort: Int = 3000 - -sqliteFile: String = "hway.db" -chainId: String = "sonr-testnet-1" -ipfsGatewayUrl: String = "http://localhost:8080" -sonrApiUrl: String = "http://localhost:1317" -sonrGrpcUrl: String = "http://localhost:9090" -sonrRpcUrl: String = "http://localhost:26657" -psqlDSN: String -turnstileSiteKey: String = read("env:TURNSTILE_SITE_KEY") ?? "" diff --git a/pkl/sonr.net/Motr.pkl b/pkl/sonr.net/Motr.pkl deleted file mode 100644 index 285d45741..000000000 --- a/pkl/sonr.net/Motr.pkl +++ /dev/null @@ -1,34 +0,0 @@ -@go.Package { name = "github.com/onsonr/sonr/internal/config/motr" } - -module sonr.net.Motr - -import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" - -typealias JSON = String - -class JsonField extends go.Field { - structTags { - ["json"] = "%{name},omitempty" - } -} - -class Config { - @JsonField - ipfsGatewayUrl: String - - @JsonField - motrToken: String - - @JsonField - motrAddress: String - - @JsonField - sonrApiUrl: String - - @JsonField - sonrRpcUrl: String - - @JsonField - sonrChainId: String -} - diff --git a/pkl/sonr.net/PklProject b/pkl/sonr.net/PklProject deleted file mode 100644 index eba443065..000000000 --- a/pkl/sonr.net/PklProject +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//===----------------------------------------------------------------------===// -/// Common types for operations across the sonr ecosystem -amends "../basePklProject.pkl" - -package { - name = "sonr.net" - version = "0.0.2" -} diff --git a/pkl/sonr.net/PklProject.deps.json b/pkl/sonr.net/PklProject.deps.json deleted file mode 100644 index 836079aad..000000000 --- a/pkl/sonr.net/PklProject.deps.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "schemaVersion": 1, - "resolvedDependencies": {} -} \ No newline at end of file diff --git a/pkl/sonr.net/UCAN.pkl b/pkl/sonr.net/UCAN.pkl deleted file mode 100644 index 507d3a3b6..000000000 --- a/pkl/sonr.net/UCAN.pkl +++ /dev/null @@ -1,46 +0,0 @@ -@go.Package { name = "github.com/onsonr/sonr/crypto/ucan/attns" } - -module sonr.net.UCAN - -import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" - -// Capability hierarchy for smart account operations -// ---------------------------------------------- -// VAULT -// └─ CRUD/ASSET -// └─ CRUD/AUTHZGRANT -// └─ CRUD/PROFILE -// └─ CRUD/RECORD -// └─ USE/RECOVERY -// └─ USE/SYNC -// └─ USE/SIGNER -// ACCOUNT -// └─ EXEC/BROADCAST -// └─ EXEC/QUERY -// └─ EXEC/SIMULATE -// └─ EXEC/VOTE -// └─ EXEC/DELEGATE -// └─ EXEC/INVOKE -// └─ EXEC/SEND -// INTERCHAIN -// └─ TRANSFER/SWAP -// └─ TRANSFER/SEND -// └─ TRANSFER/ATOMIC -// └─ TRANSFER/BATCH -// └─ TRANSFER/P2P -// └─ TRANSFER/SEND - - -// TODO: Move to x/dwn -typealias CapVault = "crud/asset" | "crud/authzgrant" | "crud/profile" | "crud/record" | "use/recovery" | "use/sync" | "use/signer" -// TODO: Move to x/did -typealias CapAccount = "exec/broadcast" | "exec/query" | "exec/simulate" | "exec/vote" | "exec/delegate" | "exec/invoke" | "exec/send" -// TODO: Move to x/svc -typealias CapInterchain = "transfer/swap" | "transfer/send" | "transfer/atomic" | "transfer/batch" | "transfer/p2p" | "transfer/send" - -// TODO: Move to x/dwn -typealias ResVault = "ks/enclave" | "loc/cid" | "loc/entity" | "loc/ipns" | "addr/sonr" | "chain/code" -// TODO: Move to x/did -typealias ResAccount = "acc/sequence" | "acc/number" | "chain/id" | "asset/code" | "authz/grant" -// TODO: Move to x/svc -typealias ResInterchain = "channnel/port" | "chain/id" | "chain/name" | "acc/host" | "acc/controller" diff --git a/deploy/process-compose.yaml b/process-compose.yaml similarity index 100% rename from deploy/process-compose.yaml rename to process-compose.yaml diff --git a/x/did/types/accounts.go b/x/did/types/accounts.go index 8453164fa..b4ab46bb3 100644 --- a/x/did/types/accounts.go +++ b/x/did/types/accounts.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" - "github.com/onsonr/sonr/pkg/chain/transaction" + "github.com/onsonr/sonr/internal/chain/transaction" "github.com/onsonr/sonr/x/did/types/internal/accounts" ) diff --git a/x/did/types/internal/accounts/api_builder.go b/x/did/types/internal/accounts/api_builder.go index 67c3af059..b648f7d45 100644 --- a/x/did/types/internal/accounts/api_builder.go +++ b/x/did/types/internal/accounts/api_builder.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/onsonr/sonr/pkg/chain/transaction" + "github.com/onsonr/sonr/internal/chain/transaction" ) var ( diff --git a/x/did/types/internal/accounts/context.go b/x/did/types/internal/accounts/context.go index e4de18ae7..3a815791d 100644 --- a/x/did/types/internal/accounts/context.go +++ b/x/did/types/internal/accounts/context.go @@ -8,7 +8,7 @@ import ( "cosmossdk.io/core/store" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/onsonr/sonr/pkg/chain/transaction" + "github.com/onsonr/sonr/internal/chain/transaction" "github.com/onsonr/sonr/x/did/types/internal/prefixstore" ) diff --git a/x/did/types/internal/accounts/encoding.go b/x/did/types/internal/accounts/encoding.go index 3d5a942ff..58cedd0f2 100644 --- a/x/did/types/internal/accounts/encoding.go +++ b/x/did/types/internal/accounts/encoding.go @@ -8,7 +8,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/gogoproto/proto" - "github.com/onsonr/sonr/pkg/chain/transaction" + "github.com/onsonr/sonr/internal/chain/transaction" ) // ProtoMsgG is a generic interface for protobuf messages. diff --git a/x/did/types/internal/accounts/implementation.go b/x/did/types/internal/accounts/implementation.go index f548b13b1..eb4bf7260 100644 --- a/x/did/types/internal/accounts/implementation.go +++ b/x/did/types/internal/accounts/implementation.go @@ -9,8 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" gogoproto "github.com/cosmos/gogoproto/proto" - "github.com/onsonr/sonr/pkg/chain/appmodule" - "github.com/onsonr/sonr/pkg/chain/transaction" + "github.com/onsonr/sonr/internal/chain/appmodule" + "github.com/onsonr/sonr/internal/chain/transaction" ) // Dependencies are passed to the constructor of a smart account. diff --git a/x/did/types/internal/accounts/protoaccount.go b/x/did/types/internal/accounts/protoaccount.go index ab4595481..5361d2c3b 100644 --- a/x/did/types/internal/accounts/protoaccount.go +++ b/x/did/types/internal/accounts/protoaccount.go @@ -6,7 +6,7 @@ import ( "google.golang.org/protobuf/proto" - "github.com/onsonr/sonr/pkg/chain/transaction" + "github.com/onsonr/sonr/internal/chain/transaction" ) // RegisterInitHandler registers an initialisation handler for a smart account that uses protobuf. diff --git a/internal/embed/codec.go b/x/dwn/types/embed/codec.go similarity index 100% rename from internal/embed/codec.go rename to x/dwn/types/embed/codec.go diff --git a/internal/embed/index.html b/x/dwn/types/embed/index.html similarity index 100% rename from internal/embed/index.html rename to x/dwn/types/embed/index.html diff --git a/internal/embed/main.js b/x/dwn/types/embed/main.js similarity index 100% rename from internal/embed/main.js rename to x/dwn/types/embed/main.js diff --git a/internal/embed/sw.js b/x/dwn/types/embed/sw.js similarity index 100% rename from internal/embed/sw.js rename to x/dwn/types/embed/sw.js diff --git a/internal/embed/utils.go b/x/dwn/types/embed/utils.go similarity index 100% rename from internal/embed/utils.go rename to x/dwn/types/embed/utils.go diff --git a/internal/embed/webworker.go b/x/dwn/types/embed/webworker.go similarity index 100% rename from internal/embed/webworker.go rename to x/dwn/types/embed/webworker.go