diff --git a/.github/file-filter.yml b/.github/file-filter.yml index 78fcfb2972..23f2e2e841 100644 --- a/.github/file-filter.yml +++ b/.github/file-filter.yml @@ -2,53 +2,51 @@ # Put all defined set of files here, similar to https://github.com/getsentry/sentry/blob/master/.github/workflows/getsentry-dispatch.yml parachain_src: ¶chain_src - - 'node/**' - - 'pallets/**' + - 'parachain/node/**' + - 'parachain/pallets/**' - 'primitives/**' - - 'runtime/**' - - 'mock-tee-primitives/**' - - 'docker/Dockerfile' - - 'Cargo.lock' - - 'Cargo.toml' - - 'rust-toolchain.toml' - - 'scripts/build-docker.sh' + - 'parachain/runtime/**' + - 'parachain/docker/Dockerfile' + - 'parachain/Cargo.*' + - 'parachain/rust-toolchain.toml' + - 'parachain/scripts/build-docker.sh' parachain_test: ¶chain_test - - 'ts-tests/**' - - 'docker/**' - - 'scripts/build-bridge.sh' - - 'scripts/launch-network.sh' - - 'scripts/launch-bridge.sh' + - 'parachain/ts-tests/**' + - 'parachain/docker/**' + - 'parachain/scripts/build-bridge.sh' + - 'parachain/scripts/launch-network.sh' + - 'parachain/scripts/launch-bridge.sh' coverage_src: &coverage_src - *parachain_src - '.github/workflows/coverage.yml' -tee_src: &tee_src - - 'tee-worker/**/*.rs' - - 'tee-worker/**/Cargo.toml' - - 'tee-worker/**/Cargo.lock' - - 'tee-worker/**/rust-toolchain.toml' - - 'tee-worker/build.Dockerfile' - - 'tee-worker/enclave-runtime/**' +identity_src: &identity_src + - 'tee-worker/identity/**/*.rs' + - 'tee-worker/identity/**/Cargo.toml' + - 'tee-worker/identity/**/Cargo.lock' + - 'tee-worker/identity/**/rust-toolchain.toml' + - 'tee-worker/identity/build.Dockerfile' + - 'tee-worker/identity/enclave-runtime/**' -tee_test: &tee_test - - 'tee-worker/ts-tests/**' - - 'tee-worker/cli/*.sh' - - 'docker/**' - - 'tee-worker/docker/*.yml' - - 'tee-worker/litentry/core/assertion-build/src/dynamic/contracts/**' +identity_test: &identity_test + - 'tee-worker/identity/ts-tests/**' + - 'tee-worker/identity/cli/*.sh' + - 'parachain/docker/**' + - 'tee-worker/identity/docker/*.yml' + - 'tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/**' bitacross_src: &bitacross_src - - 'bitacross-worker/**/*.rs' - - 'bitacross-worker/**/Cargo.toml' - - 'bitacross-worker/**/Cargo.lock' - - 'bitacross-worker/**/rust-toolchain.toml' - - 'bitacross-worker/build.Dockerfile' - - 'bitacross-worker/enclave-runtime/**' + - 'tee-worker/bitacross/**/*.rs' + - 'tee-worker/bitacross/**/Cargo.toml' + - 'tee-worker/bitacross/**/Cargo.lock' + - 'tee-worker/bitacross/**/rust-toolchain.toml' + - 'tee-worker/bitacross/build.Dockerfile' + - 'tee-worker/bitacross/enclave-runtime/**' bitacross_test: &bitacross_test - - 'bitacross-worker/ts-tests/**' - - 'bitacross-worker/cli/*.sh' - - 'docker/**' - - 'bitacross-worker/docker/*.yml' + - 'tee-worker/bitacross/ts-tests/**' + - 'tee-worker/bitacross/cli/*.sh' + - 'parachain/docker/**' + - 'tee-worker/bitacross/docker/*.yml' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6973675f1b..5925b045b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,19 +45,19 @@ on: - ready_for_review workflow_dispatch: inputs: - rebuild-parachain-docker: + rebuild-parachain: type: boolean - description: rebuild-parachain-docker + description: rebuild-parachain required: true default: true - rebuild-tee-docker: + rebuild-identity: type: boolean - description: rebuild-tee-docker + description: rebuild-identity required: true default: true - rebuild-bitacross-docker: + rebuild-bitacross: type: boolean - description: rebuild-bitacross-docker + description: rebuild-bitacross required: true default: true run-multi-worker-test: @@ -93,11 +93,11 @@ jobs: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} outputs: rebuild_parachain: ${{ steps.env.outputs.rebuild_parachain }} - rebuild_tee: ${{ steps.env.outputs.rebuild_tee }} + rebuild_identity: ${{ steps.env.outputs.rebuild_identity }} rebuild_bitacross: ${{ steps.env.outputs.rebuild_bitacross }} push_docker: ${{ steps.env.outputs.push_docker }} run_parachain_test: ${{ steps.env.outputs.run_parachain_test }} - run_tee_test: ${{ steps.env.outputs.run_tee_test }} + run_identity_test: ${{ steps.env.outputs.run_identity_test }} run_bitacross_test: ${{ steps.env.outputs.run_bitacross_test }} steps: - uses: actions/checkout@v4 @@ -116,18 +116,18 @@ jobs: id: env run: | rebuild_parachain=false - rebuild_tee=false + rebuild_identity=false rebuild_bitacross=false push_docker=false run_parachain_test=false - run_tee_test=false - if [ "${{ github.event.inputs.rebuild-parachain-docker }}" = "true" ] || [ "${{ steps.filter.outputs.parachain_src }}" = "true" ]; then + run_identity_test=false + if [ "${{ github.event.inputs.rebuild-parachain }}" = "true" ] || [ "${{ steps.filter.outputs.parachain_src }}" = "true" ]; then rebuild_parachain=true fi - if [ "${{ github.event.inputs.rebuild-tee-docker }}" = "true" ] || [ "${{ steps.filter.outputs.tee_src }}" = "true" ]; then - rebuild_tee=true + if [ "${{ github.event.inputs.rebuild-identity }}" = "true" ] || [ "${{ steps.filter.outputs.identity_src }}" = "true" ]; then + rebuild_identity=true fi - if [ "${{ github.event.inputs.rebuild-bitacross-docker }}" = "true" ] || [ "${{ steps.filter.outputs.bitacross_src }}" = "true" ]; then + if [ "${{ github.event.inputs.rebuild-bitacross }}" = "true" ] || [ "${{ steps.filter.outputs.bitacross_src }}" = "true" ]; then rebuild_bitacross=true fi if [ "${{ github.event.inputs.push-docker }}" = "true" ]; then @@ -138,18 +138,18 @@ jobs: if [ "${{ steps.filter.outputs.parachain_test }}" = "true" ] || [ "$rebuild_parachain" = "true" ]; then run_parachain_test=true fi - if [ "${{ steps.filter.outputs.tee_test }}" = "true" ] || [ "$rebuild_parachain" = "true" ] || [ "$rebuild_tee" = "true" ]; then - run_tee_test=true + if [ "${{ steps.filter.outputs.identity_test }}" = "true" ] || [ "$rebuild_parachain" = "true" ] || [ "$rebuild_identity" = "true" ]; then + run_identity_test=true fi if [ "${{ steps.filter.outputs.bitacross_test }}" = "true" ] || [ "$rebuild_parachain" = "true" ] || [ "$rebuild_bitacross" = "true" ]; then run_bitacross_test=true fi echo "rebuild_parachain=$rebuild_parachain" | tee -a $GITHUB_OUTPUT - echo "rebuild_tee=$rebuild_tee" | tee -a $GITHUB_OUTPUT + echo "rebuild_identity=$rebuild_identity" | tee -a $GITHUB_OUTPUT echo "rebuild_bitacross=$rebuild_bitacross" | tee -a $GITHUB_OUTPUT echo "push_docker=$push_docker" | tee -a $GITHUB_OUTPUT echo "run_parachain_test=$run_parachain_test" | tee -a $GITHUB_OUTPUT - echo "run_tee_test=$run_tee_test" | tee -a $GITHUB_OUTPUT + echo "run_identity_test=$run_identity_test" | tee -a $GITHUB_OUTPUT echo "run_bitacross_test=$run_bitacross_test" | tee -a $GITHUB_OUTPUT fmt: @@ -170,50 +170,51 @@ jobs: echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Parachain fmt check + working-directory: ./parachain run: | cargo fmt --all -- --check taplo fmt --check - - name: Tee-worker fmt check - working-directory: ./tee-worker + - name: identity-worker fmt check + working-directory: ./tee-worker/identity run: | cargo fmt --all -- --check taplo fmt --check - - name: Tee-worker enclave-runtime fmt check - working-directory: ./tee-worker/enclave-runtime + - name: identity-worker enclave-runtime fmt check + working-directory: ./tee-worker/identity/enclave-runtime run: | cargo fmt --all -- --check - name: bitacross-worker fmt check - working-directory: ./bitacross-worker + working-directory: ./tee-worker/bitacross run: | cargo fmt --all -- --check taplo fmt --check - name: bitacross-worker enclave-runtime fmt check - working-directory: ./bitacross-worker/enclave-runtime + working-directory: ./tee-worker/bitacross/enclave-runtime run: | cargo fmt --all -- --check - name: Enable corepack and pnpm run: corepack enable && corepack enable pnpm - - name: Tee-worker ts-tests install npm deps - working-directory: ./tee-worker/ts-tests + - name: identity-worker ts-tests install npm deps + working-directory: ./tee-worker/identity/ts-tests # We can't update the lockfile here because the client-api hasn't been generated yet. run: pnpm install --frozen-lockfile - - name: Tee-worker check ts code format - working-directory: ./tee-worker/ts-tests + - name: identity-worker check ts code format + working-directory: ./tee-worker/identity/ts-tests run: pnpm run check-format - name: Dynamic-contract install npm deps - working-directory: ./tee-worker/litentry/core/assertion-build/src/dynamic + working-directory: ./tee-worker/identity/litentry/core/assertion-build/src/dynamic run: pnpm install - name: Dynamic-contract check code format - working-directory: ./tee-worker/litentry/core/assertion-build/src/dynamic + working-directory: ./tee-worker/identity/litentry/core/assertion-build/src/dynamic run: pnpm run check-format - name: Fail early @@ -268,7 +269,7 @@ jobs: strategy: matrix: type: - - tee # TODO: switch to identity + - identity - bitacross name: ${{ matrix.type }} steps: @@ -280,12 +281,12 @@ jobs: sudo apt-get install -yq openssl clang libclang-dev cmake protobuf-compiler - name: Cargo test - working-directory: ./${{ matrix.type }}-worker + working-directory: ./tee-worker/${{ matrix.type }} run: | cargo test --release - name: Worker common clippy - working-directory: ./${{ matrix.type }}-worker + working-directory: ./tee-worker/${{ matrix.type }} shell: bash run: | for d in . enclave-runtime; do @@ -305,8 +306,8 @@ jobs: done - name: Identity-worker specific clippy - if: matrix.type == 'tee' - working-directory: ./tee-worker + if: matrix.type == 'identity' + working-directory: ./tee-worker/identity shell: bash run: | for d in . enclave-runtime; do @@ -344,6 +345,7 @@ jobs: uses: ./.github/actions/disk-cleanup - name: Build docker image + working-directory: ./parachain if: needs.set-condition.outputs.rebuild_parachain == 'true' run: | echo "::group::build docker image" @@ -396,18 +398,18 @@ jobs: driver: docker - name: Cache worker-cache - if: needs.set-condition.outputs.rebuild_tee == 'true' + if: needs.set-condition.outputs.rebuild_identity == 'true' uses: actions/cache@v4 with: path: | worker-cache - key: worker-cache-${{ env.REF_VERSION }}-${{ hashFiles('tee-worker/**/Cargo.lock', 'tee-worker/**/Cargo.toml') }} + key: worker-cache-${{ env.REF_VERSION }}-${{ hashFiles('tee-worker/identity/**/Cargo.lock', 'tee-worker/identity/**/Cargo.toml') }} restore-keys: | worker-cache-${{ env.REF_VERSION }}- worker-cache- - name: Create cache folder if not exist - if: needs.set-condition.outputs.rebuild_tee == 'true' + if: needs.set-condition.outputs.rebuild_identity == 'true' run: | for i in 'git/db' 'registry/cache' 'registry/index' 'sccache'; do [ ! -d "worker-cache/$i" ] && mkdir -p "worker-cache/$i" || true @@ -419,6 +421,7 @@ jobs: echo "::group::Show disk usage" df -h . echo "::endgroup::" + # cache mount in buildkit won't be exported as image layers, so it doesn't work well with GHA cache, see # https://github.com/moby/buildkit/issues/1512 # https://www.reddit.com/r/rust/comments/126xeyx/exploring_the_problem_of_faster_cargo_docker/ @@ -433,11 +436,11 @@ jobs: # moreoever, we are not so eager to have layer caches, as the most critical operation(cargo build) # is "atomic" and can't be broken into layers. - name: Build local builder - if: needs.set-condition.outputs.rebuild_tee == 'true' + if: needs.set-condition.outputs.rebuild_identity == 'true' uses: docker/build-push-action@v6 with: context: . - file: tee-worker/build.Dockerfile + file: tee-worker/identity/build.Dockerfile tags: local-builder:latest target: builder build-args: | @@ -447,7 +450,7 @@ jobs: ADDITIONAL_FEATURES_ARG= - name: Copy caches from the built image - if: needs.set-condition.outputs.rebuild_tee == 'true' + if: needs.set-condition.outputs.rebuild_identity == 'true' run: | echo "::group::Show disk usage" df -h . @@ -470,25 +473,25 @@ jobs: echo "::endgroup::" - name: Build worker - if: needs.set-condition.outputs.rebuild_tee == 'true' + if: needs.set-condition.outputs.rebuild_identity == 'true' uses: docker/build-push-action@v6 with: context: . - file: tee-worker/build.Dockerfile + file: tee-worker/identity/build.Dockerfile tags: litentry/identity-worker:latest target: deployed-worker - name: Build cli - if: needs.set-condition.outputs.rebuild_tee == 'true' + if: needs.set-condition.outputs.rebuild_identity == 'true' uses: docker/build-push-action@v6 with: context: . - file: tee-worker/build.Dockerfile + file: tee-worker/identity/build.Dockerfile tags: litentry/identity-cli:latest target: deployed-client - name: Pull and tag worker and cli image optionally - if: needs.set-condition.outputs.rebuild_tee == 'false' + if: needs.set-condition.outputs.rebuild_identity == 'false' run: | docker pull litentry/identity-worker:latest docker pull litentry/identity-cli:latest @@ -496,7 +499,7 @@ jobs: - run: docker images --all - name: Test enclave - if: needs.set-condition.outputs.rebuild_tee == 'true' + if: needs.set-condition.outputs.rebuild_identity == 'true' # cargo test is not supported in the enclave # see https://github.com/apache/incubator-teaclave-sgx-sdk/issues/232 run: docker run litentry/identity-worker:latest test --all @@ -540,7 +543,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: bitacross-worker/build.Dockerfile + file: tee-worker/bitacross/build.Dockerfile tags: local-builder:latest target: builder build-args: | @@ -552,7 +555,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: bitacross-worker/build.Dockerfile + file: tee-worker/bitacross/build.Dockerfile tags: litentry/bitacross-worker:latest target: deployed-worker @@ -561,7 +564,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: bitacross-worker/build.Dockerfile + file: tee-worker/bitacross/build.Dockerfile tags: litentry/bitacross-cli:latest target: deployed-client @@ -663,11 +666,11 @@ jobs: run: corepack enable && corepack enable pnpm - name: Install npm deps - working-directory: ./tee-worker/litentry/core/assertion-build/src/dynamic + working-directory: ./tee-worker/identity/litentry/core/assertion-build/src/dynamic run: pnpm install - name: Run all unittests - working-directory: ./tee-worker/litentry/core/assertion-build/src/dynamic + working-directory: ./tee-worker/identity/litentry/core/assertion-build/src/dynamic run: pnpm run test - name: Fail early @@ -686,6 +689,7 @@ jobs: - uses: actions/checkout@v4 - name: Run all unittests + working-directory: ./parachain run: | echo "::group::core-primitives unittest" cargo test --locked -p core-primitives --lib @@ -716,6 +720,7 @@ jobs: uses: ./.github/actions/disk-cleanup - name: Install toolchain + working-directory: ./parachain run: rustup show - name: Install dependencies @@ -726,6 +731,7 @@ jobs: # We could have used matrix but the runtime tests are executed sequentially for a cleaner GHA visualisation graph. # It won't take much longer as we run them back to back. - name: Run runtime tests + working-directory: ./parachain run: | echo "::group::rococo runtime test" cargo test --locked -p rococo-parachain-runtime --lib @@ -784,16 +790,16 @@ jobs: make launch-network-litentry - name: Integration single worker test ${{ matrix.test_name }} - if: needs.set-condition.outputs.run_tee_test == 'true' + working-directory: ./tee-worker/identity/docker + if: needs.set-condition.outputs.run_identity_test == 'true' timeout-minutes: 40 run: | - cd tee-worker/docker docker compose -f docker-compose.yml -f ${{ matrix.test_name }}.yml up --no-build --exit-code-from ${{ matrix.test_name }} ${{ matrix.test_name }} - name: Stop integration single worker docker containers - if: needs.set-condition.outputs.run_tee_test == 'true' + working-directory: ./tee-worker/identity/docker + if: needs.set-condition.outputs.run_identity_test == 'true' run: | - cd tee-worker/docker docker compose -f docker-compose.yml -f ${{ matrix.test_name }}.yml stop - name: Collect docker logs if test fails @@ -857,16 +863,16 @@ jobs: make launch-network-litentry - name: Integration multi worker test ${{ matrix.test_name }} - if: needs.set-condition.outputs.run_tee_test == 'true' + working-directory: ./tee-worker/identity/docker + if: needs.set-condition.outputs.run_identity_test == 'true' timeout-minutes: 40 run: | - cd tee-worker/docker docker compose -f multiworker-docker-compose.yml -f ${{ matrix.test_name }}.yml up --no-build --exit-code-from ${{ matrix.test_name }} ${{ matrix.test_name }} - name: Stop integration multi worker docker containers - if: needs.set-condition.outputs.run_tee_test == 'true' + working-directory: ./tee-worker/identity/docker + if: needs.set-condition.outputs.run_identity_test == 'true' run: | - cd tee-worker/docker docker compose -f multiworker-docker-compose.yml -f ${{ matrix.test_name }}.yml stop - name: Collect docker logs if test fails @@ -923,16 +929,16 @@ jobs: make launch-network-litentry - name: Integration bitacross worker test ${{ matrix.test_name }} + working-directory: ./tee-worker/bitacross/docker if: needs.set-condition.outputs.run_bitacross_test == 'true' timeout-minutes: 40 run: | - cd bitacross-worker/docker docker compose -f multiworker-docker-compose.yml -f ${{ matrix.test_name }}.yml up --no-build --exit-code-from ${{ matrix.test_name }} ${{ matrix.test_name }} - name: Stop integration multi worker docker containers + working-directory: ./tee-worker/bitacross/docker if: needs.set-condition.outputs.run_bitacross_test == 'true' run: | - cd bitacross-worker/docker docker compose -f multiworker-docker-compose.yml -f ${{ matrix.test_name }}.yml stop - name: Collect docker logs if test fails @@ -1006,7 +1012,7 @@ jobs: docker push litentry/litentry-chain-aio - name: Push tee-worker image - if: needs.set-condition.outputs.rebuild_tee == 'true' + if: needs.set-condition.outputs.rebuild_identity == 'true' run: | docker push litentry/identity-worker docker push litentry/identity-cli diff --git a/Makefile b/Makefile index 09953b06a2..4bdd50975a 100644 --- a/Makefile +++ b/Makefile @@ -26,91 +26,87 @@ help: # build release -.PHONY: build-all ## Build release all -build-all: - cargo build --locked --release - .PHONY: build-node ## Build release node build-node: - cargo build --locked -p $(call pkgid, $(NODE_BIN)) --release + cd parachain && cargo build --locked -p litentry-collator --release .PHONY: build-runtime-litentry ## Build litentry release runtime build-runtime-litentry: - cargo build --locked -p $(call pkgid, litentry-parachain-runtime) --release + cd parachain && cargo build --locked -p litentry-parachain-runtime --release .PHONY: build-runtime-rococo ## Build rococo release runtime build-runtime-rococo: - cargo build --locked -p $(call pkgid, rococo-parachain-runtime) --release + cd parachain && cargo build --locked -p rococo-parachain-runtime --release .PHONY: build-runtime-paseo ## Build paseo release runtime build-runtime-paseo: - cargo build --locked -p $(call pkgid, paseo-parachain-runtime) --release + cd parachain && cargo build --locked -p paseo-parachain-runtime --release .PHONY: build-docker-release ## Build docker image using cargo profile `release` build-docker-release: - @./scripts/build-docker.sh release latest + @cd parachain && ./scripts/build-docker.sh release latest .PHONY: build-docker-production ## Build docker image using cargo profile `production` build-docker-production: - @./scripts/build-docker.sh production + @cd parachain && ./scripts/build-docker.sh production .PHONY: build-node-benchmarks ## Build release node with `runtime-benchmarks` feature build-node-benchmarks: - cargo build --locked --features runtime-benchmarks --release + cd parachain && cargo build --locked --features runtime-benchmarks --release .PHONY: build-node-tryruntime ## Build release node with `try-runtime` feature build-node-tryruntime: - cargo build --locked --features try-runtime --release + cd parachain && cargo build --locked --features try-runtime --release # launch a local network .PHONY: launch-standalone ## Launch a local standalone node without relaychain network launch-standalone: - @./scripts/launch-standalone.sh + @cd parachain && ./scripts/launch-standalone.sh .PHONY: launch-network-rococo ## Launch a local rococo network with relaychain network launch-network-rococo: - @./scripts/launch-network.sh rococo + @cd parachain && ./scripts/launch-network.sh rococo .PHONY: launch-network-litentry ## Launch a local litentry network with relaychain network launch-network-litentry: - @./scripts/launch-network.sh litentry + @cd parachain && ./scripts/launch-network.sh litentry .PHONY: launch-network-paseo ## Launch a local litentry network with relaychain network launch-network-paseo: - @./scripts/launch-network.sh paseo + @cd parachain && ./scripts/launch-network.sh paseo # run tests .PHONY: test-cargo-all ## cargo test --all test-cargo-all: - @cargo test --release --all + @cd parachain && cargo test --release --all .PHONY: test-cargo-all-benchmarks ## cargo test --all --features runtime-benchmarks test-cargo-all-benchmarks: - @cargo test --release --all --features runtime-benchmarks + @cd parachain && cargo test --release --all --features runtime-benchmarks .PHONY: test-ts-litentry ## Run litentry ts tests without clean-up test-ts-litentry: launch-network-litentry - @./scripts/run-ts-test.sh litentry bridge evm + @cd parachain && ./scripts/run-ts-test.sh litentry bridge evm .PHONY: test-ts-rococo ## Run rococo ts tests without clean-up test-ts-rococo: launch-network-rococo - @./scripts/run-ts-test.sh rococo bridge evm + @cd parachain && ./scripts/run-ts-test.sh rococo bridge evm .PHONY: test-ts-paseo ## Run paseo ts tests without clean-up test-ts-paseo: launch-network-paseo - @./scripts/run-ts-test.sh paseo bridge evm + @cd parachain && ./scripts/run-ts-test.sh paseo bridge evm # clean up .PHONY: clean-network ## Clean up the network launched by 'launch-network' clean-network: - @./scripts/clean-network.sh + @cd parachain && ./scripts/clean-network.sh # update dependencies .PHONY: update-ts-dep ## update ts-tests dependencies update-ts-dep: - @cd ts-tests && pnpm dlx npm-check-updates -u && pnpm install + @cd parachain/ts-tests && pnpm dlx npm-check-updates -u && pnpm install # format .PHONY: fmt ## (cargo, taplo, ts, solidity) fmt @@ -118,26 +114,26 @@ fmt: fmt-cargo fmt-taplo fmt-ts fmt-contract .PHONY: fmt-cargo ## cargo fmt fmt-cargo: - @cargo fmt --all - @cd tee-worker && cargo fmt --all - @cd tee-worker/enclave-runtime && cargo fmt --all - @cd bitacross-worker && cargo fmt --all - @cd bitacross-worker/enclave-runtime && cargo fmt --all + @cd parachain && cargo fmt --all + @cd tee-worker/identity && cargo fmt --all + @cd tee-worker/identity/enclave-runtime && cargo fmt --all + @cd tee-worker/bitacross && cargo fmt --all + @cd tee-worker/bitacross/enclave-runtime && cargo fmt --all .PHONY: fmt-taplo ## taplo fmt fmt-taplo: - @RUST_LOG=error taplo fmt - @cd tee-worker && RUST_LOG=error taplo fmt - @cd tee-worker/enclave-runtime && RUST_LOG=error taplo fmt + @cd parachain && RUST_LOG=error taplo fmt + @cd tee-worker/identity && RUST_LOG=error taplo fmt + @cd tee-worker/identity/enclave-runtime && RUST_LOG=error taplo fmt .PHONY: fmt-ts ## ts fmt fmt-ts: - @cd ts-tests && pnpm install && pnpm run format - @cd tee-worker/ts-tests && pnpm install && pnpm run format + @cd parachain/ts-tests && pnpm install && pnpm run format + @cd tee-worker/identity/ts-tests && pnpm install && pnpm run format .PHONY: fmt-contract ## contract fmt fmt-contract: - @cd tee-worker/litentry/core/assertion-build/src/dynamic && pnpm install && pnpm run format + @cd tee-worker/identity/litentry/core/assertion-build/src/dynamic && pnpm install && pnpm run format .PHONY: githooks ## install the githooks githooks: @@ -146,35 +142,12 @@ githooks: # clippy .PHONY: clippy ## cargo clippy clippy: - SKIP_WASM_BUILD=1 cargo clippy --workspace --all-targets --all-features -- -D warnings + cd parachain && SKIP_WASM_BUILD=1 cargo clippy --workspace --all-targets --all-features -- -D warnings .PHONY: clippyfix ## cargo clippy --fix clippyfix: - SKIP_WASM_BUILD=1 cargo clippy --allow-dirty --allow-staged --fix --workspace --all-targets --all-features -- -D warnings + cd parachain && SKIP_WASM_BUILD=1 cargo clippy --allow-dirty --allow-staged --fix --workspace --all-targets --all-features -- -D warnings .PHONY: cargofix ## cargo fix cargofix: - cargo fix --allow-dirty --allow-staged --workspace --all-targets --all-features - -# cargo update - -.PHONY: update ## cargo update -update: - cargo update - cd tee-worker && cargo update - cd tee-worker/enclave-runtime && cargo update - -# shellcheck - -.PHONY: shellcheck ## check the shell scripts with WARNING level -shellcheck: - @set -e - @echo "checking parachain scripts..." - @find scripts -name "*.sh" | xargs shellcheck -S warning - @echo "checking tee-worker scripts..." - @find tee-worker/scripts/litentry/ -name "*.sh" | xargs shellcheck -S warning - @echo "Ok" - -define pkgid -$(shell cargo pkgid $1) -endef + cd parachain && cargo fix --allow-dirty --allow-staged --workspace --all-targets --all-features diff --git a/common/primitives/core/Cargo.toml b/common/primitives/core/Cargo.toml new file mode 100644 index 0000000000..385072795f --- /dev/null +++ b/common/primitives/core/Cargo.toml @@ -0,0 +1,39 @@ +[package] +authors = ["Trust Computing GmbH "] +edition = '2021' +name = 'core-primitives' +version = '0.1.0' + +[dependencies] +base58 = { version = "0.2", default-features = false } +parity-scale-codec = { version = "3.6", default-features = false, features = ["derive", "max-encoded-len"] } +strum = { version = "0.26", default-features = false } +strum_macros = { version = "0.26", default-features = false } + +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false } +scale-info = { version = "2.11", default-features = false, features = ["derive"] } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } + +litentry-hex-utils = { path = "../../utils/hex", default-features = false } +litentry-macros = { path = "macros" } +litentry-proc-macros = { path = "proc-macros" } + +[features] +default = ["std"] +std = [ + "strum/std", + "parity-scale-codec/std", + "scale-info/std", + "frame-support/std", + "sp-core/std", + "sp-runtime/std", + "sp-io/std", + "pallet-evm/std", + "litentry-hex-utils/std", +] +development = [ + "litentry-macros/development", +] diff --git a/primitives/core/macros/Cargo.toml b/common/primitives/core/macros/Cargo.toml similarity index 100% rename from primitives/core/macros/Cargo.toml rename to common/primitives/core/macros/Cargo.toml diff --git a/primitives/core/macros/src/lib.rs b/common/primitives/core/macros/src/lib.rs similarity index 70% rename from primitives/core/macros/src/lib.rs rename to common/primitives/core/macros/src/lib.rs index 898e78f9d3..161893ed74 100644 --- a/primitives/core/macros/src/lib.rs +++ b/common/primitives/core/macros/src/lib.rs @@ -17,24 +17,24 @@ #[macro_export] macro_rules! if_development_or { - ($dev_variant:expr, $non_dev_variant:expr) => {{ - #[cfg(not(feature = "development"))] - { - $non_dev_variant - } - #[cfg(feature = "development")] - { - $dev_variant - } - }}; + ($dev_variant:expr, $non_dev_variant:expr) => {{ + #[cfg(not(feature = "development"))] + { + $non_dev_variant + } + #[cfg(feature = "development")] + { + $dev_variant + } + }}; } #[macro_export] macro_rules! if_development { - ($expression:expr) => { - #[cfg(feature = "development")] - { - $expression - } - }; + ($expression:expr) => { + #[cfg(feature = "development")] + { + $expression + } + }; } diff --git a/primitives/core/proc-macros/Cargo.toml b/common/primitives/core/proc-macros/Cargo.toml similarity index 66% rename from primitives/core/proc-macros/Cargo.toml rename to common/primitives/core/proc-macros/Cargo.toml index e8ae121f9b..a6d4cc067d 100644 --- a/primitives/core/proc-macros/Cargo.toml +++ b/common/primitives/core/proc-macros/Cargo.toml @@ -10,6 +10,6 @@ proc-macro = true [dependencies] cargo_toml = "0.19" -proc-macro2 = { workspace = true } -quote = { workspace = true } -syn = { workspace = true, features = ["full", "visit-mut"] } +proc-macro2 = "1" +quote = "1" +syn = { version = "2", features = ["full", "visit-mut"] } diff --git a/common/primitives/core/proc-macros/src/lib.rs b/common/primitives/core/proc-macros/src/lib.rs new file mode 100644 index 0000000000..45c4e4a58f --- /dev/null +++ b/common/primitives/core/proc-macros/src/lib.rs @@ -0,0 +1,135 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Litentry is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Litentry. If not, see . + +#![allow(clippy::tabs_in_doc_comments)] + +use cargo_toml::{Dependency, Manifest}; +use proc_macro::TokenStream; +use quote::quote; +use reuse::handle_reuse; +use std::fs; +use syn::{parse_macro_input, Error}; +mod reuse; + +/** +This macro is used to reuse implementations when the rust's trait system cannot gracefully express the abstraction. + +This works similar with `#[cfg(..)]` that sets the target only appear on the specified cases. + +# Usage: + +``` +use litentry_proc_macros::reuse; + +#[reuse(x, y)] // Define the cases that the following implementation expands for each one +mod __ { // Leave mod name with double discards, which is to be replaced by the cases + #[x] // This item would only appear on case `x` + fn u() { + __ + } + + #[y] // This item would only appear on case `y` + fn v(a: String) { + println!("hello world!") + } + + #[x] // Specifying multiple cases indicates that the item would appear on all of them + #[y] .// This behaviour is designed to be different from `#[cfg(..)]` + fn a() -> i32 { + #[x] // This statement would only appear on case `x` + let p = 1; + #[y] // This statement would only appear on case `y` + let p = 2; + p + 1 + } + + + fn g<#[x] 'a, #[y] T>(#[x] a: i32, #[y] a: u32) {} +} + +``` +Expands to: +``` +mod x { + fn a() -> i32 { + let p = 1; + p + 1 + } + fn u() { + println!("hello world!"); + } + fn g<'a>(a: i32) {} +} + +mod y { + fn a() -> i32 { + let p = 2; + p + 1 + } + fn v(a: String) { + println!("hello world!"); + } + fn g(a: u32) {} +} + +``` +*/ +#[proc_macro_attribute] +pub fn reuse(args: TokenStream, input: TokenStream) -> TokenStream { + handle_reuse(parse_macro_input!(args), parse_macro_input!(input)) + .unwrap_or_else(Error::into_compile_error) + .into() +} + +#[proc_macro] +pub fn local_modules(_item: TokenStream) -> TokenStream { + let mut deps: Vec = vec![]; + read_module_names("", ".", &mut deps); + let output = quote! { + { + let deps: Vec<&str> = vec![ + #(#deps),* + ]; + deps + } + }; + output.into() +} + +fn read_module_names(path: &str, relative_to: &str, module_names: &mut Vec) { + let current_path = relative_to.to_string() + "/" + path; + let cargo_file = current_path.to_string() + "/Cargo.toml"; + let contents = fs::read_to_string(&cargo_file) + .unwrap_or_else(|_| panic!("Should have been able to read the file: {}", cargo_file)); + let manifest = Manifest::from_str(&contents) + .unwrap_or_else(|_| panic!("Could not parse manifest file locate at {}", cargo_file)); + if let Some(package) = manifest.package { + let module_name = package.name.replace('-', "_"); + // skip package if it is unnamed or it was already visited + if !package.name.is_empty() && !module_names.contains(&module_name) { + module_names.push(module_name); + // go through all dependencies and visit the ones that has `path`, which means they are + // local + manifest.dependencies.values().for_each(|dep| { + if let Dependency::Detailed(details) = dep { + if let Some(path) = &details.path { + read_module_names(path, ¤t_path, module_names) + } + } + }); + } + } +} diff --git a/common/primitives/core/proc-macros/src/reuse.rs b/common/primitives/core/proc-macros/src/reuse.rs new file mode 100644 index 0000000000..4cba399f16 --- /dev/null +++ b/common/primitives/core/proc-macros/src/reuse.rs @@ -0,0 +1,435 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Litentry is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Litentry. If not, see . + +use proc_macro2::{Ident, TokenStream}; +use quote::ToTokens; +use syn::{ + parse::Parse, punctuated::Punctuated, visit_mut::VisitMut, Arm, Attribute, Block, ConstParam, + Error, Expr, ExprArray, ExprAssign, ExprAsync, ExprAwait, ExprBinary, ExprBlock, ExprBreak, + ExprCall, ExprCast, ExprClosure, ExprConst, ExprContinue, ExprField, ExprForLoop, ExprGroup, + ExprIf, ExprIndex, ExprInfer, ExprLet, ExprLit, ExprLoop, ExprMacro, ExprMatch, ExprMethodCall, + ExprParen, ExprPath, ExprRange, ExprReference, ExprRepeat, ExprReturn, ExprStruct, ExprTry, + ExprTryBlock, ExprTuple, ExprUnary, ExprUnsafe, ExprWhile, ExprYield, Field, FieldPat, + FieldValue, FnArg, GenericParam, Item, ItemConst, ItemEnum, ItemExternCrate, ItemFn, + ItemForeignMod, ItemImpl, ItemMacro, ItemMod, ItemStatic, ItemStruct, ItemTrait, + ItemTraitAlias, ItemType, ItemUnion, ItemUse, LifetimeParam, Local, Meta, Pat, PatConst, + PatIdent, PatLit, PatMacro, PatOr, PatParen, PatPath, PatRange, PatReference, PatRest, + PatSlice, PatStruct, PatTuple, PatTupleStruct, PatType, PatWild, Receiver, Result, Stmt, + StmtMacro, Token, TypeParam, Variant, +}; + +pub struct Args { + cases: Punctuated, +} + +impl Parse for Args { + fn parse(input: syn::parse::ParseStream) -> Result { + Ok(Self { + cases: Punctuated::parse_terminated(input)?, + }) + } +} + +pub fn handle_reuse(args: Args, m: ItemMod) -> Result { + let mut result = TokenStream::new(); + let cases = args + .cases + .iter() + .map(ToString::to_string) + .collect::>(); + for current in 0..args.cases.len() { + let mut visitor = Visitor { + cases: &cases, + current, + error: None, + }; + let mut m = m.clone(); + m.ident = args.cases[current].clone(); + visitor.visit_item_mod_mut(&mut m); + if let Some(e) = visitor.error.take() { + return Err(e); + } + m.to_tokens(&mut result); + } + Ok(result) +} + +struct Visitor<'a> { + cases: &'a [String], + current: usize, + error: Option, +} + +impl<'a> VisitMut for Visitor<'a> { + fn visit_item_mod_mut(&mut self, m: &mut ItemMod) { + if let Some((_, items)) = &mut m.content { + let mut i = 0; + while i < items.len() { + if let Some(attrs) = items[i].get_attrs_mut() { + match self.case(attrs) { + Case::Other => { + items.remove(i); + continue; + } + Case::Current => { + if let [Item::Fn(this), Item::Fn(next), ..] = &mut items[i..] { + if let [Stmt::Expr( + Expr::Path(ExprPath { + attrs, + qself: None, + path, + }), + None, + )] = this.block.stmts.as_slice() + { + if attrs.is_empty() && path.is_ident("__") { + this.block.clone_from(&next.block); + } + } + } + } + _ => (), + } + } + i += 1; + } + } + syn::visit_mut::visit_item_mod_mut(self, m) + } + + fn visit_block_mut(&mut self, block: &mut Block) { + self.filter_vec(&mut block.stmts); + syn::visit_mut::visit_block_mut(self, block) + } + + fn visit_signature_mut(&mut self, item: &mut syn::Signature) { + self.filter_punct(&mut item.inputs); + syn::visit_mut::visit_signature_mut(self, item) + } + + fn visit_generics_mut(&mut self, item: &mut syn::Generics) { + self.filter_punct(&mut item.params); + syn::visit_mut::visit_generics_mut(self, item) + } + + fn visit_expr_tuple_mut(&mut self, item: &mut ExprTuple) { + self.filter_punct(&mut item.elems); + syn::visit_mut::visit_expr_tuple_mut(self, item) + } + + fn visit_pat_tuple_mut(&mut self, item: &mut syn::PatTuple) { + self.filter_punct(&mut item.elems); + syn::visit_mut::visit_pat_tuple_mut(self, item) + } + + fn visit_pat_tuple_struct_mut(&mut self, item: &mut PatTupleStruct) { + self.filter_punct(&mut item.elems); + syn::visit_mut::visit_pat_tuple_struct_mut(self, item) + } + + fn visit_pat_struct_mut(&mut self, item: &mut PatStruct) { + self.filter_punct(&mut item.fields); + syn::visit_mut::visit_pat_struct_mut(self, item) + } + + fn visit_expr_struct_mut(&mut self, item: &mut ExprStruct) { + self.filter_punct(&mut item.fields); + syn::visit_mut::visit_expr_struct_mut(self, item) + } + + fn visit_fields_named_mut(&mut self, item: &mut syn::FieldsNamed) { + self.filter_punct(&mut item.named); + syn::visit_mut::visit_fields_named_mut(self, item) + } + + fn visit_fields_unnamed_mut(&mut self, item: &mut syn::FieldsUnnamed) { + self.filter_punct(&mut item.unnamed); + syn::visit_mut::visit_fields_unnamed_mut(self, item) + } + + fn visit_item_enum_mut(&mut self, item: &mut ItemEnum) { + self.filter_punct(&mut item.variants); + syn::visit_mut::visit_item_enum_mut(self, item) + } + + fn visit_item_union_mut(&mut self, item: &mut ItemUnion) { + self.filter_punct(&mut item.fields.named); + syn::visit_mut::visit_item_union_mut(self, item) + } + + fn visit_expr_match_mut(&mut self, item: &mut ExprMatch) { + self.filter_vec(&mut item.arms); + syn::visit_mut::visit_expr_match_mut(self, item) + } + + fn visit_pat_or_mut(&mut self, item: &mut PatOr) { + self.filter_punct(&mut item.cases); + syn::visit_mut::visit_pat_or_mut(self, item) + } + + fn visit_expr_closure_mut(&mut self, item: &mut ExprClosure) { + self.filter_punct(&mut item.inputs); + syn::visit_mut::visit_expr_closure_mut(self, item) + } +} + +enum Case { + Current, + Other, + All, +} + +impl<'a> Visitor<'a> { + #[inline] + fn filter_vec(&self, target: &mut Vec) + where + T: GetAttrsMut, + { + let mut i = 0; + while i < target.len() { + if let Some(attrs) = target[i].get_attrs_mut() { + if let Case::Other = self.case(attrs) { + target.remove(i); + continue; + } + } + i += 1; + } + } + + #[inline] + fn filter_punct(&self, target: &mut Punctuated) + where + T: GetAttrsMut + Clone, + P: Default, + { + let mut copy = None; + for i in 0..target.len() { + if let Some(attrs) = target[i].get_attrs_mut() { + if let Case::Other = self.case(attrs) { + copy.get_or_insert_with(|| { + Punctuated::from_iter(target.iter().take(i).cloned()) + }); + } else if let Some(copy) = &mut copy { + copy.push(target[i].clone()); + } + } + } + if let Some(copy) = copy { + *target = copy; + } + } + + #[inline] + fn case(&self, attrs: &mut Vec) -> Case { + let mut is_casing = false; + let mut has_current = false; + let mut i = 0; + while i < attrs.len() { + if let Meta::Path(path) = &attrs[i].meta { + if let Some(ident) = path.get_ident() { + if ident == self.cases[self.current].as_str() { + has_current = true; + is_casing = true; + attrs.remove(i); + continue; + } + if self.cases.iter().any(|x| ident == x.as_str()) { + is_casing = true; + attrs.remove(i); + continue; + } + } + } + i += 1; + } + if has_current { + Case::Current + } else if is_casing { + Case::Other + } else { + Case::All + } + } +} + +trait GetAttrsMut { + fn get_attrs_mut(&mut self) -> Option<&mut Vec>; +} + +impl GetAttrsMut for Item { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + match self { + Item::Const(ItemConst { attrs, .. }) + | Item::Enum(ItemEnum { attrs, .. }) + | Item::ExternCrate(ItemExternCrate { attrs, .. }) + | Item::Fn(ItemFn { attrs, .. }) + | Item::ForeignMod(ItemForeignMod { attrs, .. }) + | Item::Impl(ItemImpl { attrs, .. }) + | Item::Macro(ItemMacro { attrs, .. }) + | Item::Mod(ItemMod { attrs, .. }) + | Item::Static(ItemStatic { attrs, .. }) + | Item::Struct(ItemStruct { attrs, .. }) + | Item::Trait(ItemTrait { attrs, .. }) + | Item::TraitAlias(ItemTraitAlias { attrs, .. }) + | Item::Type(ItemType { attrs, .. }) + | Item::Union(ItemUnion { attrs, .. }) + | Item::Use(ItemUse { attrs, .. }) => Some(attrs), + _ => None, + } + } +} + +impl GetAttrsMut for Expr { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + match self { + Expr::Array(ExprArray { attrs, .. }) + | Expr::Assign(ExprAssign { attrs, .. }) + | Expr::Async(ExprAsync { attrs, .. }) + | Expr::Await(ExprAwait { attrs, .. }) + | Expr::Binary(ExprBinary { attrs, .. }) + | Expr::Block(ExprBlock { attrs, .. }) + | Expr::Break(ExprBreak { attrs, .. }) + | Expr::Call(ExprCall { attrs, .. }) + | Expr::Cast(ExprCast { attrs, .. }) + | Expr::Closure(ExprClosure { attrs, .. }) + | Expr::Const(ExprConst { attrs, .. }) + | Expr::Continue(ExprContinue { attrs, .. }) + | Expr::Field(ExprField { attrs, .. }) + | Expr::ForLoop(ExprForLoop { attrs, .. }) + | Expr::Group(ExprGroup { attrs, .. }) + | Expr::If(ExprIf { attrs, .. }) + | Expr::Index(ExprIndex { attrs, .. }) + | Expr::Infer(ExprInfer { attrs, .. }) + | Expr::Let(ExprLet { attrs, .. }) + | Expr::Lit(ExprLit { attrs, .. }) + | Expr::Loop(ExprLoop { attrs, .. }) + | Expr::Macro(ExprMacro { attrs, .. }) + | Expr::Match(ExprMatch { attrs, .. }) + | Expr::MethodCall(ExprMethodCall { attrs, .. }) + | Expr::Paren(ExprParen { attrs, .. }) + | Expr::Path(ExprPath { attrs, .. }) + | Expr::Range(ExprRange { attrs, .. }) + | Expr::Reference(ExprReference { attrs, .. }) + | Expr::Repeat(ExprRepeat { attrs, .. }) + | Expr::Return(ExprReturn { attrs, .. }) + | Expr::Struct(ExprStruct { attrs, .. }) + | Expr::Try(ExprTry { attrs, .. }) + | Expr::TryBlock(ExprTryBlock { attrs, .. }) + | Expr::Tuple(ExprTuple { attrs, .. }) + | Expr::Unary(ExprUnary { attrs, .. }) + | Expr::Unsafe(ExprUnsafe { attrs, .. }) + | Expr::While(ExprWhile { attrs, .. }) + | Expr::Yield(ExprYield { attrs, .. }) => Some(attrs), + _ => None, + } + } +} + +impl GetAttrsMut for Stmt { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + match self { + Stmt::Local(Local { attrs, .. }) | Stmt::Macro(StmtMacro { attrs, .. }) => Some(attrs), + Stmt::Expr(expr, ..) => expr.get_attrs_mut(), + Stmt::Item(item) => item.get_attrs_mut(), + } + } +} + +impl GetAttrsMut for FnArg { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + match self { + FnArg::Receiver(Receiver { attrs, .. }) | FnArg::Typed(PatType { attrs, .. }) => { + Some(attrs) + } + } + } +} + +impl GetAttrsMut for GenericParam { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + match self { + GenericParam::Lifetime(LifetimeParam { attrs, .. }) + | GenericParam::Type(TypeParam { attrs, .. }) + | GenericParam::Const(ConstParam { attrs, .. }) => Some(attrs), + } + } +} + +impl GetAttrsMut for Pat { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + match self { + Pat::Const(PatConst { attrs, .. }) + | Pat::Ident(PatIdent { attrs, .. }) + | Pat::Lit(PatLit { attrs, .. }) + | Pat::Macro(PatMacro { attrs, .. }) + | Pat::Or(PatOr { attrs, .. }) + | Pat::Paren(PatParen { attrs, .. }) + | Pat::Path(PatPath { attrs, .. }) + | Pat::Range(PatRange { attrs, .. }) + | Pat::Reference(PatReference { attrs, .. }) + | Pat::Rest(PatRest { attrs, .. }) + | Pat::Slice(PatSlice { attrs, .. }) + | Pat::Struct(PatStruct { attrs, .. }) + | Pat::Tuple(PatTuple { attrs, .. }) + | Pat::TupleStruct(PatTupleStruct { attrs, .. }) + | Pat::Type(PatType { attrs, .. }) + | Pat::Wild(PatWild { attrs, .. }) => Some(attrs), + _ => None, + } + } +} + +impl GetAttrsMut for FieldPat { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + Some(&mut self.attrs) + } +} + +impl GetAttrsMut for FieldValue { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + Some(&mut self.attrs) + } +} + +impl GetAttrsMut for Field { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + Some(&mut self.attrs) + } +} + +impl GetAttrsMut for Variant { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + Some(&mut self.attrs) + } +} + +impl GetAttrsMut for Arm { + #[inline] + fn get_attrs_mut(&mut self) -> Option<&mut Vec> { + Some(&mut self.attrs) + } +} diff --git a/primitives/core/src/assertion/achainable.rs b/common/primitives/core/src/assertion/achainable.rs similarity index 52% rename from primitives/core/src/assertion/achainable.rs rename to common/primitives/core/src/assertion/achainable.rs index 52de9ce7fd..f72fa00f69 100644 --- a/primitives/core/src/assertion/achainable.rs +++ b/common/primitives/core/src/assertion/achainable.rs @@ -18,22 +18,22 @@ // when requesting VCs. use crate::{ - assertion::network::{BoundedWeb3Network, Web3Network}, - ParameterString, Vec, + assertion::network::{BoundedWeb3Network, Web3Network}, + ParameterString, Vec, }; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum AmountHoldingTimeType { - #[codec(index = 0)] - LIT, - #[codec(index = 1)] - DOT, - #[codec(index = 2)] - WBTC, - #[codec(index = 3)] - ETH, + #[codec(index = 0)] + LIT, + #[codec(index = 1)] + DOT, + #[codec(index = 2)] + WBTC, + #[codec(index = 3)] + ETH, } macro_rules! AchainableRequestParams { @@ -48,55 +48,55 @@ macro_rules! AchainableRequestParams { } AchainableRequestParams!(AchainableAmountHolding, { - amount: ParameterString, - date: ParameterString, - token: Option, + amount: ParameterString, + date: ParameterString, + token: Option, }); AchainableRequestParams!(AchainableAmountToken, { - amount: ParameterString, - token: Option, + amount: ParameterString, + token: Option, }); AchainableRequestParams!(AchainableAmount, { - amount: ParameterString, + amount: ParameterString, }); AchainableRequestParams!(AchainableAmounts, { - amount1: ParameterString, - amount2: ParameterString, + amount1: ParameterString, + amount2: ParameterString, }); AchainableRequestParams!(AchainableBasic, {}); AchainableRequestParams!(AchainableBetweenPercents, { - greater_than_or_equal_to: ParameterString, - less_than_or_equal_to: ParameterString, + greater_than_or_equal_to: ParameterString, + less_than_or_equal_to: ParameterString, }); AchainableRequestParams!(AchainableClassOfYear, {}); AchainableRequestParams!(AchainableDateInterval, { - start_date: ParameterString, - end_date: ParameterString, + start_date: ParameterString, + end_date: ParameterString, }); AchainableRequestParams!(AchainableDatePercent, { - token: ParameterString, - date: ParameterString, - percent: ParameterString, + token: ParameterString, + date: ParameterString, + percent: ParameterString, }); AchainableRequestParams!(AchainableDate, { - date: ParameterString, + date: ParameterString, }); AchainableRequestParams!(AchainableToken, { - token: ParameterString, + token: ParameterString, }); AchainableRequestParams!(AchainableMirror, { - post_quantity: Option, + post_quantity: Option, }); #[rustfmt::skip] @@ -129,37 +129,37 @@ pub enum AchainableParams { } impl AchainableParams { - pub fn name(&self) -> ParameterString { - match self { - AchainableParams::AmountHolding(p) => p.name.clone(), - AchainableParams::AmountToken(p) => p.name.clone(), - AchainableParams::Amount(p) => p.name.clone(), - AchainableParams::Amounts(p) => p.name.clone(), - AchainableParams::Basic(p) => p.name.clone(), - AchainableParams::BetweenPercents(p) => p.name.clone(), - AchainableParams::ClassOfYear(p) => p.name.clone(), - AchainableParams::DateInterval(p) => p.name.clone(), - AchainableParams::DatePercent(p) => p.name.clone(), - AchainableParams::Date(p) => p.name.clone(), - AchainableParams::Token(p) => p.name.clone(), - AchainableParams::Mirror(p) => p.name.clone(), - } - } - - pub fn chains(&self) -> Vec { - match self { - AchainableParams::AmountHolding(arg) => arg.chain.to_vec(), - AchainableParams::AmountToken(arg) => arg.chain.to_vec(), - AchainableParams::Amount(arg) => arg.chain.to_vec(), - AchainableParams::Amounts(arg) => arg.chain.to_vec(), - AchainableParams::Basic(arg) => arg.chain.to_vec(), - AchainableParams::BetweenPercents(arg) => arg.chain.to_vec(), - AchainableParams::ClassOfYear(arg) => arg.chain.to_vec(), - AchainableParams::DateInterval(arg) => arg.chain.to_vec(), - AchainableParams::DatePercent(arg) => arg.chain.to_vec(), - AchainableParams::Date(arg) => arg.chain.to_vec(), - AchainableParams::Token(arg) => arg.chain.to_vec(), - AchainableParams::Mirror(arg) => arg.chain.to_vec(), - } - } + pub fn name(&self) -> ParameterString { + match self { + AchainableParams::AmountHolding(p) => p.name.clone(), + AchainableParams::AmountToken(p) => p.name.clone(), + AchainableParams::Amount(p) => p.name.clone(), + AchainableParams::Amounts(p) => p.name.clone(), + AchainableParams::Basic(p) => p.name.clone(), + AchainableParams::BetweenPercents(p) => p.name.clone(), + AchainableParams::ClassOfYear(p) => p.name.clone(), + AchainableParams::DateInterval(p) => p.name.clone(), + AchainableParams::DatePercent(p) => p.name.clone(), + AchainableParams::Date(p) => p.name.clone(), + AchainableParams::Token(p) => p.name.clone(), + AchainableParams::Mirror(p) => p.name.clone(), + } + } + + pub fn chains(&self) -> Vec { + match self { + AchainableParams::AmountHolding(arg) => arg.chain.to_vec(), + AchainableParams::AmountToken(arg) => arg.chain.to_vec(), + AchainableParams::Amount(arg) => arg.chain.to_vec(), + AchainableParams::Amounts(arg) => arg.chain.to_vec(), + AchainableParams::Basic(arg) => arg.chain.to_vec(), + AchainableParams::BetweenPercents(arg) => arg.chain.to_vec(), + AchainableParams::ClassOfYear(arg) => arg.chain.to_vec(), + AchainableParams::DateInterval(arg) => arg.chain.to_vec(), + AchainableParams::DatePercent(arg) => arg.chain.to_vec(), + AchainableParams::Date(arg) => arg.chain.to_vec(), + AchainableParams::Token(arg) => arg.chain.to_vec(), + AchainableParams::Mirror(arg) => arg.chain.to_vec(), + } + } } diff --git a/primitives/core/src/assertion/bnb_domain.rs b/common/primitives/core/src/assertion/bnb_domain.rs similarity index 51% rename from primitives/core/src/assertion/bnb_domain.rs rename to common/primitives/core/src/assertion/bnb_domain.rs index f6708241d4..e3cce4c6d8 100644 --- a/primitives/core/src/assertion/bnb_domain.rs +++ b/common/primitives/core/src/assertion/bnb_domain.rs @@ -23,52 +23,52 @@ const BNB_9999_CLUB_MEMBER_LENGTH: usize = 4; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum BnbDigitDomainType { - Bnb999ClubMember, // 000-999.bnb - Bnb10kClubMember, // 0000-9999.bnb + Bnb999ClubMember, // 000-999.bnb + Bnb10kClubMember, // 0000-9999.bnb } #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub struct DigitDomainTypeError; impl BnbDigitDomainType { - pub fn is_bnb_999_club_member(domain_name: &str) -> bool { - if domain_name.len() == BNB_999_CLUB_MEMBER_LENGTH && domain_name.parse::().is_ok() { - return true; - } + pub fn is_bnb_999_club_member(domain_name: &str) -> bool { + if domain_name.len() == BNB_999_CLUB_MEMBER_LENGTH && domain_name.parse::().is_ok() { + return true; + } - false - } + false + } - pub fn is_bnb_9999_club_member(domain_name: &str) -> bool { - if domain_name.len() == BNB_9999_CLUB_MEMBER_LENGTH && domain_name.parse::().is_ok() - { - return true; - } + pub fn is_bnb_9999_club_member(domain_name: &str) -> bool { + if domain_name.len() == BNB_9999_CLUB_MEMBER_LENGTH && domain_name.parse::().is_ok() + { + return true; + } - false - } + false + } - pub fn is_member(&self, domain_name: &str) -> bool { - if let Ok(member) = BnbDigitDomainType::from_str(domain_name) { - return *self == member; - } + pub fn is_member(&self, domain_name: &str) -> bool { + if let Ok(member) = BnbDigitDomainType::from_str(domain_name) { + return *self == member; + } - false - } + false + } } impl FromStr for BnbDigitDomainType { - type Err = DigitDomainTypeError; + type Err = DigitDomainTypeError; - fn from_str(domain_name: &str) -> Result { - if BnbDigitDomainType::is_bnb_999_club_member(domain_name) { - return Ok(BnbDigitDomainType::Bnb999ClubMember); - } + fn from_str(domain_name: &str) -> Result { + if BnbDigitDomainType::is_bnb_999_club_member(domain_name) { + return Ok(BnbDigitDomainType::Bnb999ClubMember); + } - if BnbDigitDomainType::is_bnb_9999_club_member(domain_name) { - return Ok(BnbDigitDomainType::Bnb10kClubMember); - } + if BnbDigitDomainType::is_bnb_9999_club_member(domain_name) { + return Ok(BnbDigitDomainType::Bnb10kClubMember); + } - Err(DigitDomainTypeError) - } + Err(DigitDomainTypeError) + } } diff --git a/primitives/core/src/assertion/contest.rs b/common/primitives/core/src/assertion/contest.rs similarity index 88% rename from primitives/core/src/assertion/contest.rs rename to common/primitives/core/src/assertion/contest.rs index 1117bdf206..538017d39e 100644 --- a/primitives/core/src/assertion/contest.rs +++ b/common/primitives/core/src/assertion/contest.rs @@ -19,10 +19,10 @@ use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum ContestType { - #[codec(index = 0)] - Legend, - #[codec(index = 1)] - Popularity, - #[codec(index = 2)] - Participant, + #[codec(index = 0)] + Legend, + #[codec(index = 1)] + Popularity, + #[codec(index = 2)] + Participant, } diff --git a/primitives/core/src/assertion/dynamic.rs b/common/primitives/core/src/assertion/dynamic.rs similarity index 81% rename from primitives/core/src/assertion/dynamic.rs rename to common/primitives/core/src/assertion/dynamic.rs index 7a7a1054ef..c810c3c945 100644 --- a/primitives/core/src/assertion/dynamic.rs +++ b/common/primitives/core/src/assertion/dynamic.rs @@ -23,10 +23,10 @@ pub type DynamicContractParams = BoundedVec>; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub struct DynamicParams { - // smart contract code identifier - pub smart_contract_id: H160, - // abi encoded smart contract params - pub smart_contract_params: Option, - // true to return contract log - pub return_log: bool, + // smart contract code identifier + pub smart_contract_id: H160, + // abi encoded smart contract params + pub smart_contract_params: Option, + // true to return contract log + pub return_log: bool, } diff --git a/primitives/core/src/assertion/evm_amount_holding.rs b/common/primitives/core/src/assertion/evm_amount_holding.rs similarity index 57% rename from primitives/core/src/assertion/evm_amount_holding.rs rename to common/primitives/core/src/assertion/evm_amount_holding.rs index 20d28581e7..3fc44571d7 100644 --- a/primitives/core/src/assertion/evm_amount_holding.rs +++ b/common/primitives/core/src/assertion/evm_amount_holding.rs @@ -19,24 +19,24 @@ use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum EVMTokenType { - #[codec(index = 0)] - Ton, - #[codec(index = 1)] - Trx, + #[codec(index = 0)] + Ton, + #[codec(index = 1)] + Trx, } impl EVMTokenType { - pub fn token_decimals(&self) -> f64 { - match self { - // TON on BSCÐ decimals are both 9 - // https://bscscan.com/token/0x76a797a59ba2c17726896976b7b3747bfd1d220f - // https://etherscan.io/token/0x582d872a1b094fc48f5de31d3b73f2d9be47def1 - EVMTokenType::Ton => 1_000_000_000.0, + pub fn token_decimals(&self) -> f64 { + match self { + // TON on BSCÐ decimals are both 9 + // https://bscscan.com/token/0x76a797a59ba2c17726896976b7b3747bfd1d220f + // https://etherscan.io/token/0x582d872a1b094fc48f5de31d3b73f2d9be47def1 + EVMTokenType::Ton => 1_000_000_000.0, - // TRX on BSCÐ decimals are both 6 - // https://bscscan.com/token/0xce7de646e7208a4ef112cb6ed5038fa6cc6b12e3 - // https://etherscan.io/token/0x50327c6c5a14dcade707abad2e27eb517df87ab5 - EVMTokenType::Trx => 1_000_000.0, - } - } + // TRX on BSCÐ decimals are both 6 + // https://bscscan.com/token/0xce7de646e7208a4ef112cb6ed5038fa6cc6b12e3 + // https://etherscan.io/token/0x50327c6c5a14dcade707abad2e27eb517df87ab5 + EVMTokenType::Trx => 1_000_000.0, + } + } } diff --git a/primitives/core/src/assertion/generic_discord_role.rs b/common/primitives/core/src/assertion/generic_discord_role.rs similarity index 90% rename from primitives/core/src/assertion/generic_discord_role.rs rename to common/primitives/core/src/assertion/generic_discord_role.rs index 8c5aed11fa..fec4f20f24 100644 --- a/primitives/core/src/assertion/generic_discord_role.rs +++ b/common/primitives/core/src/assertion/generic_discord_role.rs @@ -20,8 +20,8 @@ use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum GenericDiscordRoleType { - #[codec(index = 0)] - Contest(ContestType), - #[codec(index = 1)] - SoraQuiz(SoraQuizType), + #[codec(index = 0)] + Contest(ContestType), + #[codec(index = 1)] + SoraQuiz(SoraQuizType), } diff --git a/primitives/core/src/assertion/mod.rs b/common/primitives/core/src/assertion/mod.rs similarity index 55% rename from primitives/core/src/assertion/mod.rs rename to common/primitives/core/src/assertion/mod.rs index 001f8484f5..0a20209179 100644 --- a/primitives/core/src/assertion/mod.rs +++ b/common/primitives/core/src/assertion/mod.rs @@ -146,78 +146,78 @@ pub enum Assertion { } const A8_SUPPORTED_NETWORKS: [Web3Network; 5] = [ - Web3Network::Polkadot, - Web3Network::Kusama, - Web3Network::Litentry, - Web3Network::Khala, - Web3Network::Ethereum, + Web3Network::Polkadot, + Web3Network::Kusama, + Web3Network::Litentry, + Web3Network::Khala, + Web3Network::Ethereum, ]; impl Assertion { - // Given an assertion enum type, retrieve the supported web3 networks. - // So we limit the network types on the assertion definition level. - // - // The final networks used for assertion building are the common set of: - // - "assertion supported networks" which are defined here, and - // - "identity networks" which are defined by the user and stored in `IdentityContext` - // - // returns a vector of `Web3Network` guarantees it's a subnet of - // the broader `Web3Network` (see network.rs) - pub fn get_supported_web3networks(&self) -> Vec { - match self { - // LIT holder, not including `LitentryRococo` as it's not supported by any data provider - Self::A4(..) => vec![Web3Network::Litentry, Web3Network::Ethereum], - Self::A7(..) | Self::A14 => vec![Web3Network::Polkadot], - // WBTC/ETH holder - Self::A10(..) - | Self::A11(..) - | Self::VIP3MembershipCard(..) - | Self::WeirdoGhostGangHolder => vec![Web3Network::Ethereum], - // total tx over `networks` - Self::A8(networks) => networks - .into_iter() - .filter(|network| A8_SUPPORTED_NETWORKS.contains(*network)) - .cloned() - .collect::>(), - // Achainable Assertions - Self::Achainable(arg) => arg.chains(), - // OneBlock Assertion - Self::OneBlock(..) => vec![Web3Network::Polkadot, Web3Network::Kusama], - // SPACEID Assertions - Self::BnbDomainHolding | Self::BnbDigitDomainClub(..) => vec![Web3Network::Bsc], - // LITStaking - Self::LITStaking => vec![Web3Network::Litentry], - // EVM Amount Holding - Self::EVMAmountHolding(_) | Self::CryptoSummary => { - vec![Web3Network::Ethereum, Web3Network::Bsc] - }, - // BRC20 Holder - Self::BRC20AmountHolder => vec![Web3Network::BitcoinP2tr], - // - // general rules - // - // any web3 network is allowed - Self::A1 | Self::A13(..) | Self::A20 => all_web3networks(), - // no web3 network is allowed - Self::A2(..) - | Self::A3(..) - | Self::A6 - | Self::GenericDiscordRole(..) - | Self::LinkedIdentities => vec![], - Self::TokenHoldingAmount(t_type) => t_type.get_supported_networks(), - Self::PlatformUser(p_type) => p_type.get_supported_networks(), - Self::NftHolder(t_type) => t_type.get_supported_networks(), - Self::Dynamic(..) => all_web3networks(), - } - } - - // Used in `get_eligible_identities` to decide if we should pass identities through - // and let assertion logic handle them - #[allow(clippy::match_like_matches_macro)] - pub fn skip_identity_filtering(&self) -> bool { - match self { - Self::A1 | Self::Dynamic(..) | Self::LinkedIdentities => true, - _ => false, - } - } + // Given an assertion enum type, retrieve the supported web3 networks. + // So we limit the network types on the assertion definition level. + // + // The final networks used for assertion building are the common set of: + // - "assertion supported networks" which are defined here, and + // - "identity networks" which are defined by the user and stored in `IdentityContext` + // + // returns a vector of `Web3Network` guarantees it's a subnet of + // the broader `Web3Network` (see network.rs) + pub fn get_supported_web3networks(&self) -> Vec { + match self { + // LIT holder, not including `LitentryRococo` as it's not supported by any data provider + Self::A4(..) => vec![Web3Network::Litentry, Web3Network::Ethereum], + Self::A7(..) | Self::A14 => vec![Web3Network::Polkadot], + // WBTC/ETH holder + Self::A10(..) + | Self::A11(..) + | Self::VIP3MembershipCard(..) + | Self::WeirdoGhostGangHolder => vec![Web3Network::Ethereum], + // total tx over `networks` + Self::A8(networks) => networks + .into_iter() + .filter(|network| A8_SUPPORTED_NETWORKS.contains(*network)) + .cloned() + .collect::>(), + // Achainable Assertions + Self::Achainable(arg) => arg.chains(), + // OneBlock Assertion + Self::OneBlock(..) => vec![Web3Network::Polkadot, Web3Network::Kusama], + // SPACEID Assertions + Self::BnbDomainHolding | Self::BnbDigitDomainClub(..) => vec![Web3Network::Bsc], + // LITStaking + Self::LITStaking => vec![Web3Network::Litentry], + // EVM Amount Holding + Self::EVMAmountHolding(_) | Self::CryptoSummary => { + vec![Web3Network::Ethereum, Web3Network::Bsc] + } + // BRC20 Holder + Self::BRC20AmountHolder => vec![Web3Network::BitcoinP2tr], + // + // general rules + // + // any web3 network is allowed + Self::A1 | Self::A13(..) | Self::A20 => all_web3networks(), + // no web3 network is allowed + Self::A2(..) + | Self::A3(..) + | Self::A6 + | Self::GenericDiscordRole(..) + | Self::LinkedIdentities => vec![], + Self::TokenHoldingAmount(t_type) => t_type.get_supported_networks(), + Self::PlatformUser(p_type) => p_type.get_supported_networks(), + Self::NftHolder(t_type) => t_type.get_supported_networks(), + Self::Dynamic(..) => all_web3networks(), + } + } + + // Used in `get_eligible_identities` to decide if we should pass identities through + // and let assertion logic handle them + #[allow(clippy::match_like_matches_macro)] + pub fn skip_identity_filtering(&self) -> bool { + match self { + Self::A1 | Self::Dynamic(..) | Self::LinkedIdentities => true, + _ => false, + } + } } diff --git a/common/primitives/core/src/assertion/network.rs b/common/primitives/core/src/assertion/network.rs new file mode 100644 index 0000000000..8c3d98d9b3 --- /dev/null +++ b/common/primitives/core/src/assertion/network.rs @@ -0,0 +1,381 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Litentry is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Litentry. If not, see . + +use crate::{CoreHash as Hash, String, Vec}; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; +use sp_runtime::{traits::ConstU32, BoundedVec}; +use strum::IntoEnumIterator; +use strum_macros::{EnumIter, IntoStaticStr}; + +pub const MAX_WEB3NETWORK_LEN: u32 = 128; +pub type BoundedWeb3Network = BoundedVec>; + +/// supported web3 networks +/// use a flattened style to avoid overly nested structure like: +/// { +/// Substrate(SubstrateNetwork), +/// Evm(EvmNetwork), +/// } +/// +/// TODO: theoretically this should the union of the supported networks of all data providers +/// +/// Since the incorporation of Bitcoin network, the name `Web3Network` might not be the best word, +/// as different kinds of bitcoin types (BitcoinP2tr, BitcoinP2pkh, ...) still belong to the same +/// network (bitcoin mainnet) despite of having 5 entries in this enum. +/// +/// More precisely, it should reflect "the way" how the same identity handle (e.g. pubkey) is +/// differently used: either in different networks (e.g. eth vs bsc), or as different addresses in +/// the same network or not (e.g. bitcoin/substrate) +#[derive( + Encode, + Decode, + Copy, + Clone, + Debug, + PartialEq, + Eq, + PartialOrd, + Ord, + Hash, + TypeInfo, + MaxEncodedLen, + EnumIter, + IntoStaticStr, +)] +pub enum Web3Network { + // substrate + #[codec(index = 0)] + Polkadot, + #[codec(index = 1)] + Kusama, + #[codec(index = 2)] + Litentry, + #[codec(index = 3)] + // TODO: we sunset Litmus already, this entry is kept temporarily to not break anything. + // However, it should not be used in any of the vc building logic + Litmus, + #[codec(index = 4)] + LitentryRococo, + #[codec(index = 5)] + Khala, + #[codec(index = 6)] + SubstrateTestnet, + + // evm + #[codec(index = 7)] + Ethereum, + #[codec(index = 8)] + Bsc, + + // btc, see https://github.com/rust-bitcoin/rust-bitcoin/blob/9ea3e29d61569479b7b4618c8ae1992612f3d01a/bitcoin/src/address/mod.rs#L64-L75 + #[codec(index = 9)] + BitcoinP2tr, + #[codec(index = 10)] + BitcoinP2pkh, + #[codec(index = 11)] + BitcoinP2sh, + #[codec(index = 12)] + BitcoinP2wpkh, + #[codec(index = 13)] + BitcoinP2wsh, + + // evm + #[codec(index = 14)] + Polygon, + #[codec(index = 15)] + Arbitrum, + // solana + #[codec(index = 16)] + Solana, + // combo L2 of BSC + #[codec(index = 17)] + Combo, +} + +// mainly used in CLI +impl TryFrom<&str> for Web3Network { + type Error = (); + fn try_from(value: &str) -> Result { + Web3Network::iter() + .find(|n| >::into(*n).to_lowercase() == value.to_lowercase()) + .ok_or(()) + } +} + +impl Web3Network { + pub fn is_substrate(&self) -> bool { + matches!( + self, + Self::Polkadot + | Self::Kusama + | Self::Litentry + | Self::Litmus + | Self::LitentryRococo + | Self::Khala + | Self::SubstrateTestnet + ) + } + + pub fn is_evm(&self) -> bool { + matches!( + self, + Self::Ethereum | Self::Bsc | Self::Polygon | Self::Arbitrum | Self::Combo + ) + } + + pub fn is_bitcoin(&self) -> bool { + matches!( + self, + Self::BitcoinP2tr + | Self::BitcoinP2pkh + | Self::BitcoinP2sh + | Self::BitcoinP2wpkh + | Self::BitcoinP2wsh + ) + } + + pub fn is_solana(&self) -> bool { + matches!(self, Self::Solana) + } + + pub fn get_code(&self) -> u8 { + match self { + Web3Network::Polkadot => 0, + Web3Network::Kusama => 1, + Web3Network::Litentry => 2, + Web3Network::Litmus => 3, + Web3Network::LitentryRococo => 4, + Web3Network::Khala => 5, + Web3Network::SubstrateTestnet => 6, + Web3Network::Ethereum => 7, + Web3Network::Bsc => 8, + Web3Network::BitcoinP2tr => 9, + Web3Network::BitcoinP2pkh => 10, + Web3Network::BitcoinP2sh => 11, + Web3Network::BitcoinP2wpkh => 12, + Web3Network::BitcoinP2wsh => 13, + Web3Network::Polygon => 14, + Web3Network::Arbitrum => 15, + Web3Network::Solana => 16, + Web3Network::Combo => 17, + } + } + + pub fn from_code(code: u8) -> Option { + match code { + 0 => Some(Web3Network::Polkadot), + 1 => Some(Web3Network::Kusama), + 2 => Some(Web3Network::Litentry), + 3 => Some(Web3Network::Litmus), + 4 => Some(Web3Network::LitentryRococo), + 5 => Some(Web3Network::Khala), + 6 => Some(Web3Network::SubstrateTestnet), + 7 => Some(Web3Network::Ethereum), + 8 => Some(Web3Network::Bsc), + 9 => Some(Web3Network::BitcoinP2tr), + 10 => Some(Web3Network::BitcoinP2pkh), + 11 => Some(Web3Network::BitcoinP2sh), + 12 => Some(Web3Network::BitcoinP2wpkh), + 13 => Some(Web3Network::BitcoinP2wsh), + 14 => Some(Web3Network::Polygon), + 15 => Some(Web3Network::Arbitrum), + 16 => Some(Web3Network::Solana), + 17 => Some(Web3Network::Combo), + _ => None, + } + } + + pub fn get_name(&self) -> String { + match self { + Web3Network::Polkadot => "polkadot".into(), + Web3Network::Kusama => "kusama".into(), + Web3Network::Litentry => "litentry".into(), + Web3Network::Litmus => "litmus".into(), + Web3Network::LitentryRococo => "litentry_rococo".into(), + Web3Network::Khala => "khala".into(), + Web3Network::SubstrateTestnet => "substrate_testnet".into(), + Web3Network::Ethereum => "ethereum".into(), + Web3Network::Bsc => "bsc".into(), + Web3Network::BitcoinP2tr => "bitcoin_p2tr".into(), + Web3Network::BitcoinP2pkh => "bitcoin_p2pkh".into(), + Web3Network::BitcoinP2sh => "bitcoin_p2sh".into(), + Web3Network::BitcoinP2wpkh => "bitcoin_p2wpkh".into(), + Web3Network::BitcoinP2wsh => "bitcoin_p2wsh".into(), + Web3Network::Polygon => "polygon".into(), + Web3Network::Arbitrum => "arbitrum".into(), + Web3Network::Solana => "solana".into(), + Web3Network::Combo => "combo".into(), + } + } +} + +pub fn all_web3networks() -> Vec { + Web3Network::iter().collect() +} + +pub fn all_substrate_web3networks() -> Vec { + Web3Network::iter().filter(|n| n.is_substrate()).collect() +} + +pub fn all_evm_web3networks() -> Vec { + Web3Network::iter().filter(|n| n.is_evm()).collect() +} + +pub fn all_bitcoin_web3networks() -> Vec { + Web3Network::iter().filter(|n| n.is_bitcoin()).collect() +} + +pub fn all_solana_web3networks() -> Vec { + Web3Network::iter().filter(|n| n.is_solana()).collect() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn web3network_length_ok() { + let networks: Vec = Web3Network::iter().collect(); + assert!(networks.len() < MAX_WEB3NETWORK_LEN.try_into().unwrap()); + } + + #[test] + fn is_evm_works() { + Web3Network::iter().for_each(|network| { + assert_eq!( + network.is_evm(), + match network { + Web3Network::Polkadot => false, + Web3Network::Kusama => false, + Web3Network::Litentry => false, + Web3Network::Litmus => false, + Web3Network::LitentryRococo => false, + Web3Network::Khala => false, + Web3Network::SubstrateTestnet => false, + Web3Network::Ethereum => true, + Web3Network::Bsc => true, + Web3Network::BitcoinP2tr => false, + Web3Network::BitcoinP2pkh => false, + Web3Network::BitcoinP2sh => false, + Web3Network::BitcoinP2wpkh => false, + Web3Network::BitcoinP2wsh => false, + Web3Network::Polygon => true, + Web3Network::Arbitrum => true, + Web3Network::Solana => false, + Web3Network::Combo => true, + } + ) + }) + } + + #[test] + fn is_substrate_works() { + Web3Network::iter().for_each(|network| { + assert_eq!( + network.is_substrate(), + match network { + Web3Network::Polkadot => true, + Web3Network::Kusama => true, + Web3Network::Litentry => true, + Web3Network::Litmus => true, + Web3Network::LitentryRococo => true, + Web3Network::Khala => true, + Web3Network::SubstrateTestnet => true, + Web3Network::Ethereum => false, + Web3Network::Bsc => false, + Web3Network::BitcoinP2tr => false, + Web3Network::BitcoinP2pkh => false, + Web3Network::BitcoinP2sh => false, + Web3Network::BitcoinP2wpkh => false, + Web3Network::BitcoinP2wsh => false, + Web3Network::Polygon => false, + Web3Network::Arbitrum => false, + Web3Network::Solana => false, + Web3Network::Combo => false, + } + ) + }) + } + + #[test] + fn is_bitcoin_works() { + Web3Network::iter().for_each(|network| { + assert_eq!( + network.is_bitcoin(), + match network { + Web3Network::Polkadot => false, + Web3Network::Kusama => false, + Web3Network::Litentry => false, + Web3Network::Litmus => false, + Web3Network::LitentryRococo => false, + Web3Network::Khala => false, + Web3Network::SubstrateTestnet => false, + Web3Network::Ethereum => false, + Web3Network::Bsc => false, + Web3Network::BitcoinP2tr => true, + Web3Network::BitcoinP2pkh => true, + Web3Network::BitcoinP2sh => true, + Web3Network::BitcoinP2wpkh => true, + Web3Network::BitcoinP2wsh => true, + Web3Network::Polygon => false, + Web3Network::Arbitrum => false, + Web3Network::Solana => false, + Web3Network::Combo => false, + } + ) + }) + } + + #[test] + fn is_solana_works() { + Web3Network::iter().for_each(|network| { + assert_eq!( + network.is_solana(), + match network { + Web3Network::Polkadot => false, + Web3Network::Kusama => false, + Web3Network::Litentry => false, + Web3Network::Litmus => false, + Web3Network::LitentryRococo => false, + Web3Network::Khala => false, + Web3Network::SubstrateTestnet => false, + Web3Network::Ethereum => false, + Web3Network::Bsc => false, + Web3Network::BitcoinP2tr => false, + Web3Network::BitcoinP2pkh => false, + Web3Network::BitcoinP2sh => false, + Web3Network::BitcoinP2wpkh => false, + Web3Network::BitcoinP2wsh => false, + Web3Network::Polygon => false, + Web3Network::Arbitrum => false, + Web3Network::Solana => true, + Web3Network::Combo => false, + } + ) + }) + } + + #[test] + fn try_from_str_works() { + let mut n: Result = "polkadot".try_into(); + assert_eq!(n.unwrap(), Web3Network::Polkadot); + n = "poLkAdOt".try_into(); + assert_eq!(n.unwrap(), Web3Network::Polkadot); + n = "NonExist".try_into(); + assert_eq!(n, Err(())) + } +} diff --git a/primitives/core/src/assertion/oneblock.rs b/common/primitives/core/src/assertion/oneblock.rs similarity index 73% rename from primitives/core/src/assertion/oneblock.rs rename to common/primitives/core/src/assertion/oneblock.rs index 981ce3ef11..da5ce63494 100644 --- a/primitives/core/src/assertion/oneblock.rs +++ b/common/primitives/core/src/assertion/oneblock.rs @@ -19,15 +19,15 @@ use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum OneBlockCourseType { - // Substrate Blockchain Development Course Completion - #[codec(index = 0)] - CourseCompletion, + // Substrate Blockchain Development Course Completion + #[codec(index = 0)] + CourseCompletion, - // Substrate Blockchain Development Course Outstanding Student - #[codec(index = 1)] - CourseOutstanding, + // Substrate Blockchain Development Course Outstanding Student + #[codec(index = 1)] + CourseOutstanding, - // Substrate Blockchain Development Course Participation - #[codec(index = 2)] - CourseParticipation, + // Substrate Blockchain Development Course Participation + #[codec(index = 2)] + CourseParticipation, } diff --git a/primitives/core/src/assertion/platform_user.rs b/common/primitives/core/src/assertion/platform_user.rs similarity index 77% rename from primitives/core/src/assertion/platform_user.rs rename to common/primitives/core/src/assertion/platform_user.rs index f409eedf0c..cfdc83a61c 100644 --- a/primitives/core/src/assertion/platform_user.rs +++ b/common/primitives/core/src/assertion/platform_user.rs @@ -21,18 +21,18 @@ use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum PlatformUserType { - #[codec(index = 0)] - KaratDao, - #[codec(index = 1)] - MagicCraftStaking, - #[codec(index = 2)] - DarenMarket, + #[codec(index = 0)] + KaratDao, + #[codec(index = 1)] + MagicCraftStaking, + #[codec(index = 2)] + DarenMarket, } impl PlatformUserType { - pub fn get_supported_networks(&self) -> Vec { - match self { - Self::KaratDao | Self::MagicCraftStaking | Self::DarenMarket => all_evm_web3networks(), - } - } + pub fn get_supported_networks(&self) -> Vec { + match self { + Self::KaratDao | Self::MagicCraftStaking | Self::DarenMarket => all_evm_web3networks(), + } + } } diff --git a/primitives/core/src/assertion/soraquiz.rs b/common/primitives/core/src/assertion/soraquiz.rs similarity index 92% rename from primitives/core/src/assertion/soraquiz.rs rename to common/primitives/core/src/assertion/soraquiz.rs index bdb7840bf4..1a4273ecdc 100644 --- a/primitives/core/src/assertion/soraquiz.rs +++ b/common/primitives/core/src/assertion/soraquiz.rs @@ -19,8 +19,8 @@ use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum SoraQuizType { - #[codec(index = 0)] - Attendee, - #[codec(index = 1)] - Master, + #[codec(index = 0)] + Attendee, + #[codec(index = 1)] + Master, } diff --git a/primitives/core/src/assertion/vip3.rs b/common/primitives/core/src/assertion/vip3.rs similarity index 79% rename from primitives/core/src/assertion/vip3.rs rename to common/primitives/core/src/assertion/vip3.rs index fd99b2d56c..241d8d389a 100644 --- a/primitives/core/src/assertion/vip3.rs +++ b/common/primitives/core/src/assertion/vip3.rs @@ -19,17 +19,17 @@ use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum VIP3MembershipCardLevel { - #[codec(index = 0)] - Gold, - #[codec(index = 1)] - Silver, + #[codec(index = 0)] + Gold, + #[codec(index = 1)] + Silver, } impl VIP3MembershipCardLevel { - pub fn to_level(&self) -> usize { - match self { - VIP3MembershipCardLevel::Gold => 2, - VIP3MembershipCardLevel::Silver => 1, - } - } + pub fn to_level(&self) -> usize { + match self { + VIP3MembershipCardLevel::Gold => 2, + VIP3MembershipCardLevel::Silver => 1, + } + } } diff --git a/primitives/core/src/assertion/web3_nft.rs b/common/primitives/core/src/assertion/web3_nft.rs similarity index 64% rename from primitives/core/src/assertion/web3_nft.rs rename to common/primitives/core/src/assertion/web3_nft.rs index 4582246eed..e41a968c49 100644 --- a/primitives/core/src/assertion/web3_nft.rs +++ b/common/primitives/core/src/assertion/web3_nft.rs @@ -21,22 +21,26 @@ use scale_info::TypeInfo; #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] pub enum Web3NftType { - #[codec(index = 0)] - WeirdoGhostGang, - #[codec(index = 1)] - Club3Sbt, - #[codec(index = 2)] - MFan, - #[codec(index = 3)] - Mvp, + #[codec(index = 0)] + WeirdoGhostGang, + #[codec(index = 1)] + Club3Sbt, + #[codec(index = 2)] + MFan, + #[codec(index = 3)] + Mvp, } impl Web3NftType { - pub fn get_supported_networks(&self) -> Vec { - match self { - Self::WeirdoGhostGang | Self::Mvp => vec![Web3Network::Ethereum], - Self::Club3Sbt => vec![Web3Network::Bsc, Web3Network::Polygon, Web3Network::Arbitrum], - Self::MFan => vec![Web3Network::Polygon], - } - } + pub fn get_supported_networks(&self) -> Vec { + match self { + Self::WeirdoGhostGang | Self::Mvp => vec![Web3Network::Ethereum], + Self::Club3Sbt => vec![ + Web3Network::Bsc, + Web3Network::Polygon, + Web3Network::Arbitrum, + ], + Self::MFan => vec![Web3Network::Polygon], + } + } } diff --git a/common/primitives/core/src/assertion/web3_token.rs b/common/primitives/core/src/assertion/web3_token.rs new file mode 100644 index 0000000000..8cd6aee2d1 --- /dev/null +++ b/common/primitives/core/src/assertion/web3_token.rs @@ -0,0 +1,153 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Litentry is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Litentry. If not, see . + +use crate::assertion::network::Web3Network; +use crate::{vec, Vec}; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; + +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] +pub enum Web3TokenType { + #[codec(index = 0)] + Bnb, + #[codec(index = 1)] + Eth, + #[codec(index = 2)] + SpaceId, + #[codec(index = 3)] + Lit, + #[codec(index = 4)] + Wbtc, + #[codec(index = 5)] + Usdc, + #[codec(index = 6)] + Usdt, + #[codec(index = 7)] + Crv, + #[codec(index = 8)] + Matic, + #[codec(index = 9)] + Dydx, + #[codec(index = 10)] + Amp, + #[codec(index = 11)] + Cvx, + #[codec(index = 12)] + Tusd, + #[codec(index = 13)] + Usdd, + #[codec(index = 14)] + Gusd, + #[codec(index = 15)] + Link, + #[codec(index = 16)] + Grt, + #[codec(index = 17)] + Comp, + #[codec(index = 18)] + People, + #[codec(index = 19)] + Gtc, + #[codec(index = 20)] + Ton, + #[codec(index = 21)] + Trx, + #[codec(index = 22)] + Nfp, + #[codec(index = 23)] + Sol, + #[codec(index = 24)] + Mcrt, + #[codec(index = 25)] + Btc, + #[codec(index = 26)] + Ada, + #[codec(index = 27)] + Doge, + #[codec(index = 28)] + Shib, + #[codec(index = 29)] + Uni, + #[codec(index = 30)] + Bch, + #[codec(index = 31)] + Etc, + #[codec(index = 32)] + Atom, + #[codec(index = 33)] + Dai, + #[codec(index = 34)] + Leo, + #[codec(index = 35)] + Fil, + #[codec(index = 36)] + Imx, + #[codec(index = 37)] + Cro, + #[codec(index = 38)] + Inj, + #[codec(index = 39)] + Bean, + #[codec(index = 40)] + An, + #[codec(index = 41)] + Tuna, +} + +impl Web3TokenType { + pub fn get_supported_networks(&self) -> Vec { + match self { + Self::Bnb | Self::Eth | Self::SpaceId | Self::Ton | Self::Trx | Self::Inj => { + vec![Web3Network::Bsc, Web3Network::Ethereum] + } + Self::Lit => vec![ + Web3Network::Bsc, + Web3Network::Ethereum, + Web3Network::Litentry, + ], + Self::Nfp | Self::Ada | Self::Doge | Self::Bch | Self::Etc | Self::Fil => { + vec![Web3Network::Bsc] + } + Self::Sol | Self::Mcrt => { + vec![Web3Network::Bsc, Web3Network::Ethereum, Web3Network::Solana] + } + Self::Btc => vec![ + Web3Network::BitcoinP2tr, + Web3Network::BitcoinP2pkh, + Web3Network::BitcoinP2sh, + Web3Network::BitcoinP2wpkh, + Web3Network::BitcoinP2wsh, + ], + Self::Usdc | Self::Uni | Self::Dai => vec![ + Web3Network::Ethereum, + Web3Network::Bsc, + Web3Network::Solana, + Web3Network::Arbitrum, + Web3Network::Polygon, + ], + Self::Shib | Self::Leo | Self::Imx => vec![Web3Network::Ethereum], + Self::Atom => vec![ + Web3Network::Ethereum, + Web3Network::Bsc, + Web3Network::Polygon, + ], + Self::Cro => vec![Web3Network::Ethereum, Web3Network::Solana], + Self::Bean => vec![Web3Network::Bsc, Web3Network::Combo], + Self::An => vec![Web3Network::Bsc], + _ => vec![Web3Network::Ethereum], + } + } +} diff --git a/common/primitives/core/src/error.rs b/common/primitives/core/src/error.rs new file mode 100644 index 0000000000..c2ff7a47b5 --- /dev/null +++ b/common/primitives/core/src/error.rs @@ -0,0 +1,153 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Litentry is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Litentry. If not, see . + +use crate::{ + alloc::{fmt, string::String}, + assertion::Assertion, +}; + +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; +use sp_runtime::{ + traits::{ConstU32, Printable}, + BoundedVec, DispatchError, DispatchErrorWithPostInfo, +}; + +pub type ErrorString = BoundedVec>; + +// enum to reflect the error detail from TEE-worker processing +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub enum ErrorDetail { + // error when importing the parentchain blocks and executing indirect calls + #[codec(index = 0)] + ImportError, + // the direct or indirect request comes from an unauthorized signer + #[codec(index = 1)] + UnauthorizedSigner, + // generic error when executing STF, the `ErrorString` should indicate the actual reason + #[codec(index = 2)] + StfError(ErrorString), + // error when sending stf request to the receiver fails + #[codec(index = 3)] + SendStfRequestFailed, + // generic parse error, can be caused by UTF8/JSON serde.. + #[codec(index = 4)] + ParseError, + // errors when communicating with data provider, e.g. HTTP error + #[codec(index = 5)] + DataProviderError(ErrorString), + // error when tee-worker detects that verification data is associated with web2 identity but + // web3 identity linking is requested and opposite + #[codec(index = 6)] + InvalidIdentity, + // error when tee-worker detects that identity verification data is related to other web2 + // account than expected, for example wrong tweet id was provided + #[codec(index = 7)] + WrongWeb2Handle, + // error when during web3 identity verification process tee-worker detects that signed message + // is different from expected + #[codec(index = 8)] + UnexpectedMessage, + // error when during web3 identity verification process tee-worker fails to verify signature + // of verification data + #[codec(index = 10)] + VerifyWeb3SignatureFailed, + // error when trying to build vc but no eligible identity is found + #[codec(index = 11)] + NoEligibleIdentity, +} + +impl fmt::Debug for ErrorDetail { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + ErrorDetail::ImportError => write!(f, "ImportError"), + ErrorDetail::UnauthorizedSigner => write!(f, "UnauthorizedSigner"), + ErrorDetail::StfError(error_string) => { + let text = String::from_utf8(error_string.to_vec()).map_err(|_| fmt::Error)?; + write!(f, "StfError({})", text) + } + ErrorDetail::SendStfRequestFailed => write!(f, "SendStfRequestFailed"), + ErrorDetail::ParseError => write!(f, "ParseError"), + ErrorDetail::DataProviderError(error_string) => { + let text = String::from_utf8(error_string.to_vec()).map_err(|_| fmt::Error)?; + write!(f, "DataProviderError({})", text) + } + ErrorDetail::InvalidIdentity => write!(f, "InvalidIdentity"), + ErrorDetail::WrongWeb2Handle => write!(f, "WrongWeb2Handle"), + ErrorDetail::UnexpectedMessage => write!(f, "UnexpectedMessage"), + ErrorDetail::VerifyWeb3SignatureFailed => write!(f, "VerifyWeb3SignatureFailed"), + ErrorDetail::NoEligibleIdentity => write!(f, "NoEligibleIdentity"), + } + } +} + +// We could have used Into, but we want it to be more explicit, similar to `into_iter` +pub trait IntoErrorDetail { + fn into_error_detail(self) -> ErrorDetail; +} + +// `From` is implemented for `DispatchError` and `DispatchErrorWithPostInfo` on the top level, +// because we know it can only happen during stf execution in enclave +impl From for ErrorDetail { + fn from(e: DispatchError) -> Self { + ErrorDetail::StfError(ErrorString::truncate_from( + >::into(e).into(), + )) + } +} + +impl From> for ErrorDetail +where + T: Eq + PartialEq + Clone + Copy + Encode + Decode + Printable, +{ + fn from(e: DispatchErrorWithPostInfo) -> Self { + ErrorDetail::StfError(ErrorString::truncate_from( + as Into<&'static str>>::into(e).into(), + )) + } +} + +// Identity Management Pallet Error +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub enum IMPError { + // errors when executing individual error + #[codec(index = 0)] + LinkIdentityFailed(ErrorDetail), + #[codec(index = 1)] + DeactivateIdentityFailed(ErrorDetail), + #[codec(index = 2)] + ActivateIdentityFailed(ErrorDetail), + // should be unreached, but just to be on the safe side + // we should classify the error if we ever get this + #[codec(index = 3)] + UnclassifiedError(ErrorDetail), +} + +impl frame_support::traits::PalletError for IMPError { + // max_encoded_len + const MAX_ENCODED_SIZE: usize = 1; +} + +// Verified Credential(VC) Management Pallet Error +#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] +pub enum VCMPError { + #[codec(index = 0)] + RequestVCFailed(Assertion, ErrorDetail), + // should be unreached, but just to be on the safe side + // we should classify the error if we ever get this + #[codec(index = 1)] + UnclassifiedError(ErrorDetail), +} diff --git a/common/primitives/core/src/identity.rs b/common/primitives/core/src/identity.rs new file mode 100644 index 0000000000..f692928690 --- /dev/null +++ b/common/primitives/core/src/identity.rs @@ -0,0 +1,743 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Litentry is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Litentry. If not, see . + +use crate::{ + assertion::network::{ + all_bitcoin_web3networks, all_evm_web3networks, all_solana_web3networks, + all_substrate_web3networks, Web3Network, + }, + format, str, AccountId, String, Vec, +}; +use base58::{FromBase58, ToBase58}; +use core::fmt::{Debug, Formatter}; +use litentry_hex_utils::{decode_hex, hex_encode}; +use litentry_macros::if_development_or; +use pallet_evm::{AddressMapping, HashedAddressMapping as GenericHashedAddressMapping}; +use parity_scale_codec::{Decode, Encode, Error, Input, MaxEncodedLen}; +use scale_info::{meta_type, Type, TypeDefSequence, TypeInfo}; +use sp_core::{ + crypto::{AccountId32, ByteArray}, + ecdsa, ed25519, sr25519, H160, +}; +use sp_io::hashing::blake2_256; +use sp_runtime::{ + traits::{BlakeTwo256, ConstU32}, + BoundedVec, +}; +use strum_macros::EnumIter; + +pub type IdentityInnerString = BoundedVec>; + +pub type HashedAddressMapping = GenericHashedAddressMapping; + +impl Decode for IdentityString { + fn decode(input: &mut I) -> Result { + let inner: IdentityInnerString = Decode::decode(input)?; + Ok(IdentityString { inner }) + } +} + +impl Encode for IdentityString { + fn encode(&self) -> Vec { + let mut res = Vec::new(); + self.inner.encode_to(&mut res); + res + } +} + +#[derive(Eq, PartialEq, Clone, MaxEncodedLen, Default, Ord, PartialOrd)] +pub struct IdentityString { + pub inner: IdentityInnerString, +} + +impl TypeInfo for IdentityString { + type Identity = IdentityInnerString; + + fn type_info() -> Type { + TypeDefSequence::new(meta_type::()).into() + } +} + +impl IdentityString { + pub fn new(inner: Vec) -> Self { + IdentityString { + inner: BoundedVec::truncate_from(inner), + } + } + + pub fn inner_ref(&self) -> &[u8] { + self.inner.as_ref() + } +} + +impl Debug for IdentityString { + fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { + if_development_or!( + f.debug_struct("IdentityString") + .field("inner", &self.inner) + .finish(), + f.debug_struct("IdentityString").finish() + ) + } +} + +#[derive( + Encode, Decode, Copy, Clone, Default, PartialEq, Eq, TypeInfo, MaxEncodedLen, Ord, PartialOrd, +)] +pub struct Address20([u8; 20]); + +impl AsRef<[u8; 20]> for Address20 { + fn as_ref(&self) -> &[u8; 20] { + &self.0 + } +} + +impl From<[u8; 20]> for Address20 { + fn from(value: [u8; 20]) -> Self { + Self(value) + } +} + +impl<'a> TryFrom<&'a [u8]> for Address20 { + type Error = (); + fn try_from(x: &'a [u8]) -> Result { + if x.len() == 20 { + let mut data = [0; 20]; + data.copy_from_slice(x); + Ok(Address20(data)) + } else { + Err(()) + } + } +} + +impl Debug for Address20 { + fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { + if_development_or!( + f.debug_tuple("Address20").field(&self.0).finish(), + f.debug_tuple("Address20").finish() + ) + } +} + +#[derive( + Encode, Decode, Copy, Clone, Default, PartialEq, Eq, TypeInfo, MaxEncodedLen, Ord, PartialOrd, +)] +pub struct Address32([u8; 32]); +impl AsRef<[u8; 32]> for Address32 { + fn as_ref(&self) -> &[u8; 32] { + &self.0 + } +} + +impl From<[u8; 32]> for Address32 { + fn from(value: [u8; 32]) -> Self { + Self(value) + } +} + +impl From for Address32 { + fn from(value: AccountId32) -> Self { + let raw: [u8; 32] = value.as_slice().try_into().unwrap(); + Address32::from(raw) + } +} + +impl<'a> TryFrom<&'a [u8]> for Address32 { + type Error = (); + fn try_from(x: &'a [u8]) -> Result { + if x.len() == 32 { + let mut data = [0; 32]; + data.copy_from_slice(x); + Ok(Address32(data)) + } else { + Err(()) + } + } +} + +impl From for AccountId32 { + fn from(value: Address32) -> Self { + let raw: [u8; 32] = *value.as_ref(); + AccountId32::from(raw) + } +} + +impl From<&Address32> for AccountId32 { + fn from(value: &Address32) -> Self { + (*value).into() + } +} + +impl From for Address32 { + fn from(k: sr25519::Public) -> Self { + k.0.into() + } +} + +impl From for Address32 { + fn from(k: ed25519::Public) -> Self { + k.0.into() + } +} + +impl Debug for Address32 { + fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { + if_development_or!( + f.debug_tuple("Address32").field(&self.0).finish(), + f.debug_tuple("Address32").finish() + ) + } +} + +// TODO: maybe use macros to reduce verbosity +#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, TypeInfo, MaxEncodedLen, PartialOrd, Ord)] +pub struct Address33([u8; 33]); +impl AsRef<[u8; 33]> for Address33 { + fn as_ref(&self) -> &[u8; 33] { + &self.0 + } +} + +impl Default for Address33 { + fn default() -> Self { + Address33([0u8; 33]) + } +} + +impl From<[u8; 33]> for Address33 { + fn from(value: [u8; 33]) -> Self { + Self(value) + } +} + +impl<'a> TryFrom<&'a [u8]> for Address33 { + type Error = (); + fn try_from(x: &'a [u8]) -> Result { + if x.len() == 33 { + let mut data = [0; 33]; + data.copy_from_slice(x); + Ok(Address33(data)) + } else { + Err(()) + } + } +} + +impl From for ecdsa::Public { + fn from(value: Address33) -> Self { + let raw: [u8; 33] = *value.as_ref(); + ecdsa::Public::from_raw(raw) + } +} + +impl From<&Address33> for ecdsa::Public { + fn from(value: &Address33) -> Self { + (*value).into() + } +} + +impl From for Address33 { + fn from(k: ecdsa::Public) -> Self { + k.0.into() + } +} + +impl Debug for Address33 { + fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { + if_development_or!( + f.debug_tuple("Address33").field(&self.0).finish(), + f.debug_tuple("Address33").finish() + ) + } +} + +/// Web2 and Web3 Identity based on handle/public key +/// We only include the network categories (substrate/evm) without concrete types +/// see https://github.com/litentry/litentry-parachain/issues/1841 +#[derive( + Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen, EnumIter, Ord, PartialOrd, +)] +pub enum Identity { + // web2 + #[codec(index = 0)] + Twitter(IdentityString), + #[codec(index = 1)] + Discord(IdentityString), + #[codec(index = 2)] + Github(IdentityString), + + // web3 + #[codec(index = 3)] + Substrate(Address32), + #[codec(index = 4)] + Evm(Address20), + // bitcoin addresses are derived (one-way hash) from the pubkey + // by using `Address33` as the Identity handle, it requires that pubkey + // is retrievable by the wallet API when verifying the bitcoin account. + // e.g. unisat-wallet: https://docs.unisat.io/dev/unisat-developer-service/unisat-wallet#getpublickey + #[codec(index = 5)] + Bitcoin(Address33), + + #[codec(index = 6)] + Solana(Address32), +} + +impl Identity { + pub fn is_web2(&self) -> bool { + matches!( + self, + Self::Twitter(..) | Self::Discord(..) | Self::Github(..) + ) + } + + pub fn is_web3(&self) -> bool { + matches!( + self, + Self::Substrate(..) | Self::Evm(..) | Self::Bitcoin(..) | Self::Solana(..) + ) + } + + pub fn is_substrate(&self) -> bool { + matches!(self, Self::Substrate(..)) + } + + pub fn is_evm(&self) -> bool { + matches!(self, Self::Evm(..)) + } + + pub fn is_bitcoin(&self) -> bool { + matches!(self, Self::Bitcoin(..)) + } + + pub fn is_solana(&self) -> bool { + matches!(self, Self::Solana(..)) + } + + pub fn default_web3networks(&self) -> Vec { + match self { + Identity::Substrate(_) => all_substrate_web3networks(), + Identity::Evm(_) => all_evm_web3networks(), + Identity::Bitcoin(_) => all_bitcoin_web3networks(), + Identity::Solana(_) => all_solana_web3networks(), + Identity::Twitter(_) | Identity::Discord(_) | Identity::Github(_) => Vec::new(), + } + } + + // check if the given web3networks match the identity + pub fn matches_web3networks(&self, networks: &[Web3Network]) -> bool { + match self { + Identity::Substrate(_) => { + !networks.is_empty() && networks.iter().all(|n| n.is_substrate()) + } + Identity::Evm(_) => !networks.is_empty() && networks.iter().all(|n| n.is_evm()), + Identity::Bitcoin(_) => !networks.is_empty() && networks.iter().all(|n| n.is_bitcoin()), + Identity::Solana(_) => !networks.is_empty() && networks.iter().all(|n| n.is_solana()), + Identity::Twitter(_) | Identity::Discord(_) | Identity::Github(_) => { + networks.is_empty() + } + } + } + + /// Currently we only support mapping from Address32/Address20 to AccountId, not opposite. + pub fn to_account_id(&self) -> Option { + match self { + Identity::Substrate(address) | Identity::Solana(address) => Some(address.into()), + Identity::Evm(address) => Some(HashedAddressMapping::into_account_id( + H160::from_slice(address.as_ref()), + )), + Identity::Bitcoin(address) => Some(blake2_256(address.as_ref()).into()), + Identity::Twitter(_) | Identity::Discord(_) | Identity::Github(_) => None, + } + } + + pub fn from_did(s: &str) -> Result { + let did_prefix = String::from("did:litentry:"); + if s.starts_with(&did_prefix) { + let did_suffix = &s[did_prefix.len()..]; + let v: Vec<&str> = did_suffix.split(':').collect(); + if v.len() == 2 { + if v[0] == "substrate" { + let handle = decode_hex(v[1]) + .unwrap() + .as_slice() + .try_into() + .map_err(|_| "Address32 conversion error")?; + return Ok(Identity::Substrate(handle)); + } else if v[0] == "evm" { + let handle = decode_hex(v[1]) + .unwrap() + .as_slice() + .try_into() + .map_err(|_| "Address20 conversion error")?; + return Ok(Identity::Evm(handle)); + } else if v[0] == "bitcoin" { + let handle = decode_hex(v[1]) + .unwrap() + .as_slice() + .try_into() + .map_err(|_| "Address33 conversion error")?; + return Ok(Identity::Bitcoin(handle)); + } else if v[0] == "solana" { + let handle = v[1] + .from_base58() + .unwrap() + .as_slice() + .try_into() + .map_err(|_| "Address32 conversion error")?; + return Ok(Identity::Solana(handle)); + } else if v[0] == "github" { + return Ok(Identity::Github(IdentityString::new( + v[1].as_bytes().to_vec(), + ))); + } else if v[0] == "discord" { + return Ok(Identity::Discord(IdentityString::new( + v[1].as_bytes().to_vec(), + ))); + } else if v[0] == "twitter" { + return Ok(Identity::Twitter(IdentityString::new( + v[1].as_bytes().to_vec(), + ))); + } else { + return Err("Unknown did type"); + } + } else { + return Err("Wrong did suffix"); + } + } + + Err("Wrong did prefix") + } + + pub fn to_did(&self) -> Result { + Ok(format!( + "did:litentry:{}", + match self { + Identity::Evm(address) => format!("evm:{}", &hex_encode(address.as_ref())), + Identity::Substrate(address) => + format!("substrate:{}", &hex_encode(address.as_ref())), + Identity::Bitcoin(address) => format!("bitcoin:{}", &hex_encode(address.as_ref())), + Identity::Solana(address) => format!("solana:{}", address.as_ref().to_base58()), + Identity::Twitter(handle) => format!( + "twitter:{}", + str::from_utf8(handle.inner_ref()) + .map_err(|_| "twitter handle conversion error")? + ), + Identity::Discord(handle) => format!( + "discord:{}", + str::from_utf8(handle.inner_ref()) + .map_err(|_| "discord handle conversion error")? + ), + Identity::Github(handle) => format!( + "github:{}", + str::from_utf8(handle.inner_ref()) + .map_err(|_| "github handle conversion error")? + ), + } + )) + } +} + +impl From for Identity { + fn from(value: ed25519::Public) -> Self { + Identity::Substrate(value.into()) + } +} + +impl From for Identity { + fn from(value: sr25519::Public) -> Self { + Identity::Substrate(value.into()) + } +} + +impl From for Identity { + fn from(value: AccountId32) -> Self { + Identity::Substrate(value.into()) + } +} + +impl From for Identity { + fn from(value: Address32) -> Self { + Identity::Substrate(value) + } +} + +impl From for Identity { + fn from(value: Address20) -> Self { + Identity::Evm(value) + } +} + +impl From for Identity { + fn from(value: Address33) -> Self { + Identity::Bitcoin(value) + } +} + +impl From<[u8; 32]> for Identity { + fn from(value: [u8; 32]) -> Self { + Identity::Substrate(value.into()) + } +} + +impl From<[u8; 20]> for Identity { + fn from(value: [u8; 20]) -> Self { + Identity::Evm(value.into()) + } +} + +impl From<[u8; 33]> for Identity { + fn from(value: [u8; 33]) -> Self { + Identity::Bitcoin(value.into()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use parity_scale_codec::DecodeAll; + use strum::IntoEnumIterator; + + #[test] + fn is_web2_works() { + Identity::iter().for_each(|identity| { + assert_eq!( + identity.is_web2(), + match identity { + Identity::Twitter(..) => true, + Identity::Discord(..) => true, + Identity::Github(..) => true, + Identity::Substrate(..) => false, + Identity::Evm(..) => false, + Identity::Bitcoin(..) => false, + Identity::Solana(..) => false, + } + ) + }) + } + + #[test] + fn is_web3_works() { + Identity::iter().for_each(|identity| { + assert_eq!( + identity.is_web3(), + match identity { + Identity::Twitter(..) => false, + Identity::Discord(..) => false, + Identity::Github(..) => false, + Identity::Substrate(..) => true, + Identity::Evm(..) => true, + Identity::Bitcoin(..) => true, + Identity::Solana(..) => true, + } + ) + }) + } + + #[test] + fn is_substrate_works() { + Identity::iter().for_each(|identity| { + assert_eq!( + identity.is_substrate(), + match identity { + Identity::Twitter(..) => false, + Identity::Discord(..) => false, + Identity::Github(..) => false, + Identity::Substrate(..) => true, + Identity::Evm(..) => false, + Identity::Bitcoin(..) => false, + Identity::Solana(..) => false, + } + ) + }) + } + + #[test] + fn is_evm_works() { + Identity::iter().for_each(|identity| { + assert_eq!( + identity.is_evm(), + match identity { + Identity::Twitter(..) => false, + Identity::Discord(..) => false, + Identity::Github(..) => false, + Identity::Substrate(..) => false, + Identity::Evm(..) => true, + Identity::Bitcoin(..) => false, + Identity::Solana(..) => false, + } + ) + }) + } + + #[test] + fn is_bitcoin_works() { + Identity::iter().for_each(|identity| { + assert_eq!( + identity.is_bitcoin(), + match identity { + Identity::Twitter(..) => false, + Identity::Discord(..) => false, + Identity::Github(..) => false, + Identity::Substrate(..) => false, + Identity::Evm(..) => false, + Identity::Bitcoin(..) => true, + Identity::Solana(..) => false, + } + ) + }) + } + + #[test] + fn is_solana_works() { + Identity::iter().for_each(|identity| { + assert_eq!( + identity.is_solana(), + match identity { + Identity::Twitter(..) => false, + Identity::Discord(..) => false, + Identity::Github(..) => false, + Identity::Substrate(..) => false, + Identity::Evm(..) => false, + Identity::Bitcoin(..) => false, + Identity::Solana(..) => true, + } + ) + }) + } + + #[test] + fn matches_web3networks_works() { + // web2 identity + let mut id = Identity::Twitter(IdentityString::new("alice".as_bytes().to_vec())); + let mut networks: Vec = vec![]; + assert!(id.matches_web3networks(&networks)); + networks = vec![Web3Network::Litentry]; + assert!(!id.matches_web3networks(&networks)); + + // substrate identity + id = Identity::Substrate(Default::default()); + networks = vec![]; + assert!(!id.matches_web3networks(&networks)); + networks = vec![Web3Network::Bsc, Web3Network::Litentry]; + assert!(!id.matches_web3networks(&networks)); + networks = vec![Web3Network::Litentry, Web3Network::Kusama]; + assert!(id.matches_web3networks(&networks)); + + // evm identity + id = Identity::Evm(Default::default()); + networks = vec![]; + assert!(!id.matches_web3networks(&networks)); + networks = vec![Web3Network::Bsc, Web3Network::Litentry]; + assert!(!id.matches_web3networks(&networks)); + networks = vec![Web3Network::Bsc, Web3Network::Ethereum]; + assert!(id.matches_web3networks(&networks)); + + // solana identity + id = Identity::Solana(Default::default()); + networks = vec![]; + assert!(!id.matches_web3networks(&networks)); + networks = vec![Web3Network::Bsc, Web3Network::Litentry]; + assert!(!id.matches_web3networks(&networks)); + networks = vec![Web3Network::Bsc, Web3Network::Ethereum]; + assert!(!id.matches_web3networks(&networks)); + networks = vec![Web3Network::Solana]; + assert!(id.matches_web3networks(&networks)); + } + + #[test] + fn test_encode_identity_string() { + //it should be encoded to inner representation + let identity_string = IdentityString::new("mock_user".as_bytes().to_vec()); + let inner: IdentityInnerString = BoundedVec::truncate_from("mock_user".as_bytes().to_vec()); + assert_eq!(inner.encode(), identity_string.encode()) + } + + #[test] + fn test_decode_identity_string() { + let decoded: Vec = vec![36, 109, 111, 99, 107, 95, 117, 115, 101, 114]; + let identity_string: IdentityString = + IdentityString::decode_all(&mut decoded.as_slice()).unwrap(); + assert_eq!( + identity_string, + IdentityString::new("mock_user".as_bytes().to_vec()) + ); + } + + #[test] + fn test_substrate_did() { + let identity = Identity::Substrate([0; 32].into()); + let did_str = "did:litentry:substrate:0x0000000000000000000000000000000000000000000000000000000000000000"; + assert_eq!(identity.to_did().unwrap(), did_str); + assert_eq!(Identity::from_did(did_str).unwrap(), identity); + } + + #[test] + fn test_evm_did() { + let identity = Identity::Evm([0; 20].into()); + let did_str = "did:litentry:evm:0x0000000000000000000000000000000000000000"; + assert_eq!(identity.to_did().unwrap(), did_str); + assert_eq!(Identity::from_did(did_str).unwrap(), identity); + } + + #[test] + fn test_bitcoin_did() { + let identity = Identity::Bitcoin([0; 33].into()); + let did_str = "did:litentry:bitcoin:0x000000000000000000000000000000000000000000000000000000000000000000"; + assert_eq!(identity.to_did().unwrap(), did_str); + assert_eq!(Identity::from_did(did_str).unwrap(), identity); + } + + #[test] + fn test_discord_did() { + let identity = Identity::Discord(IdentityString::new("discord_handle".as_bytes().to_vec())); + let did_str = "did:litentry:discord:discord_handle"; + assert_eq!(identity.to_did().unwrap(), did_str); + assert_eq!(Identity::from_did(did_str).unwrap(), identity); + } + + #[test] + fn test_twitter_did() { + let identity = Identity::Twitter(IdentityString::new("twitter_handle".as_bytes().to_vec())); + let did_str = "did:litentry:twitter:twitter_handle"; + assert_eq!(identity.to_did().unwrap(), did_str); + assert_eq!(Identity::from_did(did_str).unwrap(), identity); + } + + #[test] + fn test_github_did() { + let identity = Identity::Github(IdentityString::new("github_handle".as_bytes().to_vec())); + let did_str = "did:litentry:github:github_handle"; + assert_eq!(identity.to_did().unwrap(), did_str); + assert_eq!(Identity::from_did(did_str).unwrap(), identity); + } + + #[test] + fn test_solana_did() { + let address = "4fuUiYxTQ6QCrdSq9ouBYcTM7bqSwYTSyLueGZLTy4T4"; + let identity = Identity::Solana( + address + .from_base58() + .unwrap() + .as_slice() + .try_into() + .unwrap(), + ); + let did = format!("did:litentry:solana:{}", address); + assert_eq!(identity.to_did().unwrap(), did.as_str()); + assert_eq!(Identity::from_did(did.as_str()).unwrap(), identity); + } +} diff --git a/common/primitives/core/src/lib.rs b/common/primitives/core/src/lib.rs new file mode 100644 index 0000000000..acea7e721f --- /dev/null +++ b/common/primitives/core/src/lib.rs @@ -0,0 +1,123 @@ +// Copyright 2020-2024 Trust Computing GmbH. +// This file is part of Litentry. +// +// Litentry is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Litentry is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Litentry. If not, see . + +#![cfg_attr(not(feature = "std"), no_std)] +#![allow(clippy::identity_op)] + +mod error; +pub use error::*; + +mod vc; +pub use vc::*; + +pub mod assertion; +pub use assertion::Assertion; + +pub mod identity; +pub use identity::*; + +extern crate alloc; +extern crate core; +use alloc::{format, str, str::FromStr, string::String, vec, vec::Vec}; +use core::hash::Hash as CoreHash; +use sp_runtime::{traits::ConstU32, BoundedVec}; + +pub use constants::*; +pub use litentry_proc_macros::*; +pub use opaque::*; +pub use types::*; + +pub type ParameterString = BoundedVec>; + +/// Common types of parachains. +mod types { + use sp_runtime::{ + traits::{IdentifyAccount, Verify}, + MultiSignature, + }; + /// Alias to 512-bit hash when used in the context of a transaction signature on the chain. + pub type Signature = MultiSignature; + + /// Some way of identifying an account on the chain. We intentionally make it equivalent + /// to the public key of our transaction signing scheme. + pub type AccountId = <::Signer as IdentifyAccount>::AccountId; + + /// Signed version of Balance + pub type Amount = i128; + + /// AssetId type + pub type AssetId = u128; + + /// Balance of an account. + pub type Balance = u128; + + /// Index of a transaction in the chain. + pub type Nonce = u32; + + /// A hash of some data used by the chain. + pub type Hash = sp_core::H256; + + /// An index to a block. + pub type BlockNumber = u32; + + // Weight Type for XCM + pub type Weight = frame_support::weights::Weight; +} + +/// Common constants of parachains. +mod constants { + use super::types::BlockNumber; + + pub const LITENTRY_PARA_ID: u32 = 2013; + pub const ROCOCO_PARA_ID: u32 = 2106; // will be replaced by paseo + pub const PASEO_PARA_ID: u32 = 2106; // will be replaced by paseo + + /// This determines the average expected block time that we are targeting. + /// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. + /// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked + /// up by `pallet_aura` to implement `fn slot_duration()`. + /// + /// Change this to adjust the block time. + pub const MILLISECS_PER_BLOCK: u64 = 12000; + + // NOTE: Currently it is not possible to change the slot duration after the chain has started. + // Attempting to do so will brick block production. + pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; + + // Time is measured by number of blocks. + pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); + pub const HOURS: BlockNumber = MINUTES * 60; + pub const DAYS: BlockNumber = HOURS * 24; + // 365.25 DAYS = 8766 HOURS + pub const YEARS: BlockNumber = HOURS * 8766; +} + +/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know +/// the specifics of the runtime. They can then be made to be agnostic over specific formats +/// of data like extrinsics, allowing for them to continue syncing the network through upgrades +/// to even the core data structures. +pub mod opaque { + use super::*; + use sp_runtime::{generic, traits::BlakeTwo256}; + + pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; + /// Opaque block header type. + pub type Header = generic::Header; + /// Opaque block type. + pub type Block = generic::Block; + /// Opaque block identifier type. + pub type BlockId = generic::BlockId; +} diff --git a/primitives/core/src/vc.rs b/common/primitives/core/src/vc.rs similarity index 100% rename from primitives/core/src/vc.rs rename to common/primitives/core/src/vc.rs diff --git a/primitives/hex/Cargo.toml b/common/utils/hex/Cargo.toml similarity index 71% rename from primitives/hex/Cargo.toml rename to common/utils/hex/Cargo.toml index 7dba976451..2f0e37b469 100644 --- a/primitives/hex/Cargo.toml +++ b/common/utils/hex/Cargo.toml @@ -6,10 +6,10 @@ version = "0.1.0" edition = "2021" [dependencies] -hex = { workspace = true, features = ["alloc"] } +hex = { version = "0.4", default-features = false, features = ["alloc"] } [dev-dependencies] -parity-scale-codec = { workspace = true } +parity-scale-codec = { version = "3.6" } [features] default = ["std"] diff --git a/primitives/hex/src/lib.rs b/common/utils/hex/src/lib.rs similarity index 52% rename from primitives/hex/src/lib.rs rename to common/utils/hex/src/lib.rs index be04c9ce14..62ffee9da8 100644 --- a/primitives/hex/src/lib.rs +++ b/common/utils/hex/src/lib.rs @@ -22,48 +22,48 @@ use hex::FromHexError; /// Hex encodes given data and preappends a "0x". pub fn hex_encode(data: &[u8]) -> String { - let mut hex_str = hex::encode(data); - hex_str.insert_str(0, "0x"); - hex_str + let mut hex_str = hex::encode(data); + hex_str.insert_str(0, "0x"); + hex_str } /// Helper method for decoding hex. pub fn decode_hex>(message: T) -> Result, FromHexError> { - let message = message.as_ref(); - let message = match message { - [b'0', b'x', hex_value @ ..] => hex_value, - _ => message, - }; + let message = message.as_ref(); + let message = match message { + [b'0', b'x', hex_value @ ..] => hex_value, + _ => message, + }; - let decoded_message = hex::decode(message)?; - Ok(decoded_message) + let decoded_message = hex::decode(message)?; + Ok(decoded_message) } #[cfg(test)] mod tests { - use super::*; - use alloc::string::ToString; - use parity_scale_codec::{Decode, Encode}; + use super::*; + use alloc::string::ToString; + use parity_scale_codec::{Decode, Encode}; - #[test] - fn hex_encode_decode_works() { - let data = "Hello World!".to_string(); + #[test] + fn hex_encode_decode_works() { + let data = "Hello World!".to_string(); - let hex_encoded_data = hex_encode(&data.encode()); - let decoded_data = - String::decode(&mut decode_hex(hex_encoded_data).unwrap().as_slice()).unwrap(); + let hex_encoded_data = hex_encode(&data.encode()); + let decoded_data = + String::decode(&mut decode_hex(hex_encoded_data).unwrap().as_slice()).unwrap(); - assert_eq!(data, decoded_data); - } + assert_eq!(data, decoded_data); + } - #[test] - fn hex_encode_decode_works_empty_input() { - let data = String::new(); + #[test] + fn hex_encode_decode_works_empty_input() { + let data = String::new(); - let hex_encoded_data = hex_encode(&data.encode()); - let decoded_data = - String::decode(&mut decode_hex(hex_encoded_data).unwrap().as_slice()).unwrap(); + let hex_encoded_data = hex_encode(&data.encode()); + let decoded_data = + String::decode(&mut decode_hex(hex_encoded_data).unwrap().as_slice()).unwrap(); - assert_eq!(data, decoded_data); - } + assert_eq!(data, decoded_data); + } } diff --git a/local-setup/launch.py b/local-setup/launch.py index 99e01d22b0..686655d1f6 100755 --- a/local-setup/launch.py +++ b/local-setup/launch.py @@ -113,7 +113,7 @@ def generate_config_local_json(parachain_dir): "relaychain_ws": "ws://localhost:" + os.environ.get("AliceWSPort", "9946"), "bridge_path": "/tmp/parachain_dev/chainbridge", } - config_file = "./ts-tests/config.local.json" + config_file = "./parachain/ts-tests/config.local.json" with open(config_file, "w") as f: json.dump(data, f, indent=4) @@ -222,10 +222,10 @@ def add_collator_ports(): def main(processes, worker, workers_number, parachain_type, log_config_path, offset, parachain_dir): # Litentry if worker == "identity": - worker_dir = "tee-worker" + worker_dir = "tee-worker/identity" worker_bin = "litentry-worker" elif worker == "bitacross": - worker_dir = "bitacross-worker" + worker_dir = "tee-worker/bitacross" worker_bin = "bitacross-worker" else: sys.exit("Unsupported worker") @@ -235,12 +235,12 @@ def main(processes, worker, workers_number, parachain_type, log_config_path, off add_collator_ports() os.environ['LITENTRY_PARACHAIN_DIR'] = parachain_dir setup_environment(offset, parachain_dir, worker_dir) - run(["./scripts/launch-standalone.sh"], check=True) + run(["./parachain/scripts/launch-standalone.sh"], check=True) elif parachain_type == "network": add_collator_ports() os.environ['LITENTRY_PARACHAIN_DIR'] = parachain_dir setup_environment(offset, parachain_dir, worker_dir) - run(["./scripts/launch-network.sh", "litentry"], check=True) + run(["./parachain/scripts/launch-network.sh", "litentry"], check=True) elif parachain_type == "remote": setup_environment(offset, "", worker_dir) print("Litentry parachain should be started remotely") diff --git a/local-setup/py/helpers.py b/local-setup/py/helpers.py index c7b4fea11f..4518e409da 100644 --- a/local-setup/py/helpers.py +++ b/local-setup/py/helpers.py @@ -95,6 +95,6 @@ def exit_gracefully(self, signum=signal.SIGTERM, frame=None): shutil.copytree(f"log", new_folder_name) print(f"Backup log into " + new_folder_name) print("Cleaning up litentry-parachain...") - subprocess.run(["./scripts/clean-network.sh", "||", "true"]) + subprocess.run(["./parachain/scripts/clean-network.sh", "||", "true"]) sys.exit(0) diff --git a/local-setup/start_parachain.sh b/local-setup/start_parachain.sh index 2963fee5b2..e17601a988 100755 --- a/local-setup/start_parachain.sh +++ b/local-setup/start_parachain.sh @@ -18,5 +18,5 @@ for p in ${CollatorWSPort:-9944} ${CollatorPort:-30333} ${UntrustedHttpPort:-454 done ROOTDIR=$(git rev-parse --show-toplevel) -cd "$ROOTDIR" +cd "$ROOTDIR/parachain" make launch-docker-rococo diff --git a/Cargo.lock b/parachain/Cargo.lock similarity index 99% rename from Cargo.lock rename to parachain/Cargo.lock index 2140ce3ff0..2a79d8546f 100644 --- a/Cargo.lock +++ b/parachain/Cargo.lock @@ -5587,7 +5587,6 @@ name = "litentry-hex-utils" version = "0.1.0" dependencies = [ "hex", - "parity-scale-codec", ] [[package]] diff --git a/Cargo.toml b/parachain/Cargo.toml similarity index 98% rename from Cargo.toml rename to parachain/Cargo.toml index 234aec69a9..46d2adfc75 100644 --- a/Cargo.toml +++ b/parachain/Cargo.toml @@ -19,10 +19,6 @@ members = [ 'pallets/vc-management', 'pallets/xcm-asset-manager', 'precompiles/*', - 'primitives/core', - 'primitives/core/proc-macros', - 'primitives/core/macros', - 'primitives/hex', 'runtime/litentry', 'runtime/rococo', 'runtime/paseo', @@ -245,10 +241,10 @@ cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/pol substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } # local -core-primitives = { path = "primitives/core", default-features = false } -litentry-macros = { path = "primitives/core/macros" } -litentry-proc-macros = { path = "primitives/core/proc-macros" } -litentry-hex-utils = { path = "primitives/hex", default-features = false } +core-primitives = { path = "../common/primitives/core", default-features = false } +litentry-macros = { path = "../common/primitives/core/macros" } +litentry-proc-macros = { path = "../common/primitives/core/proc-macros" } +litentry-hex-utils = { path = "../common/utils/hex", default-features = false } runtime-common = { path = "runtime/common", default-features = false } litentry-parachain-runtime = { path = "runtime/litentry", default-features = false } rococo-parachain-runtime = { path = "runtime/rococo", default-features = false } diff --git a/LICENSE_HEADER b/parachain/LICENSE_HEADER similarity index 100% rename from LICENSE_HEADER rename to parachain/LICENSE_HEADER diff --git a/docker/Dockerfile b/parachain/docker/Dockerfile similarity index 84% rename from docker/Dockerfile rename to parachain/docker/Dockerfile index 20f3dccbd4..a6fc72bc82 100644 --- a/docker/Dockerfile +++ b/parachain/docker/Dockerfile @@ -8,8 +8,8 @@ ARG PROFILE # ========================== FROM rust:bullseye as builder -WORKDIR /litentry -COPY . /litentry +WORKDIR /litentry/parachain +COPY . /litentry/ RUN apt-get update && apt-get install -yq clang libclang-dev cmake protobuf-compiler @@ -19,14 +19,14 @@ ARG PROFILE RUN cargo build --locked --profile $PROFILE $BUILD_ARGS # ========================== -# stage 2: packaging +# stage 2.1: packaging parachain image # ========================== FROM ubuntu:22.04 AS parachain LABEL maintainer="Trust Computing GmbH " ARG PROFILE -COPY --from=builder /litentry/target/$PROFILE/litentry-collator /usr/local/bin +COPY --from=builder /litentry/parachain/target/$PROFILE/litentry-collator /usr/local/bin/ # install netcat for healthcheck RUN apt-get update && \ @@ -50,6 +50,10 @@ VOLUME ["/data"] ENTRYPOINT ["/usr/local/bin/litentry-collator"] CMD ["--help"] +# ========================== +# stage 2.2: packaging aio image +# ========================== + FROM ubuntu:22.04 AS chain-aio LABEL maintainer="Trust Computing GmbH " @@ -89,21 +93,18 @@ RUN echo "downloading zombienet-linux-x64 ..." && \ zombienet version RUN useradd -m -u 1000 -U -s /bin/sh -d /litentry litentry && \ - mkdir -p /opt/litentry/parachain /code/litentry-parachain && \ + mkdir -p /opt/litentry/parachain /code && \ chown -R litentry:litentry /opt/litentry -COPY --from=builder /litentry/target/$PROFILE/litentry-collator /usr/local/bin +COPY --from=builder /litentry/parachain/target/$PROFILE/litentry-collator /usr/local/bin/ RUN chmod +x /usr/local/bin/litentry-collator && \ # check if executable works in this container /usr/local/bin/litentry-collator --version -COPY ./node/src/chain_specs /code/litentry-parachain/node/src/chain_specs -COPY ./ts-tests /code/litentry-parachain/ts-tests -COPY ./primitives/core/src/lib.rs /code/litentry-parachain/primitives/core/src/lib.rs -COPY ./zombienet/config.toml /code/litentry-parachain/zombienet/config.toml +COPY ./parachain /code/parachain +COPY ./parachain/docker/entrypoint.sh /usr/local/bin/ +COPY ./common /code/common RUN chown -R litentry:litentry /code - -COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh USER litentry diff --git a/docker/bridge.dockerfile b/parachain/docker/bridge.dockerfile similarity index 100% rename from docker/bridge.dockerfile rename to parachain/docker/bridge.dockerfile diff --git a/docker/entrypoint.sh b/parachain/docker/entrypoint.sh similarity index 88% rename from docker/entrypoint.sh rename to parachain/docker/entrypoint.sh index 533198f00d..4f14da0a06 100755 --- a/docker/entrypoint.sh +++ b/parachain/docker/entrypoint.sh @@ -2,7 +2,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PARACHAIN_BASEDIR="/opt/litentry/parachain" -REPO_DIR="/code/litentry-parachain" +REPO_DIR="/code" # Currently, only chain type rococo is supported. CHAIN='rococo' ZOMBIENET_DIR=$(LC_ALL=C tr -dc A-Za-z0-9 .env else diff --git a/docker/example.yml b/parachain/docker/example.yml similarity index 100% rename from docker/example.yml rename to parachain/docker/example.yml diff --git a/docker/package.json b/parachain/docker/package.json similarity index 100% rename from docker/package.json rename to parachain/docker/package.json diff --git a/docker/pnpm-lock.yaml b/parachain/docker/pnpm-lock.yaml similarity index 100% rename from docker/pnpm-lock.yaml rename to parachain/docker/pnpm-lock.yaml diff --git a/node/Cargo.toml b/parachain/node/Cargo.toml similarity index 100% rename from node/Cargo.toml rename to parachain/node/Cargo.toml diff --git a/node/build.rs b/parachain/node/build.rs similarity index 100% rename from node/build.rs rename to parachain/node/build.rs diff --git a/node/res/README.md b/parachain/node/res/README.md similarity index 100% rename from node/res/README.md rename to parachain/node/res/README.md diff --git a/node/res/chain_specs/litentry-plain.json b/parachain/node/res/chain_specs/litentry-plain.json similarity index 100% rename from node/res/chain_specs/litentry-plain.json rename to parachain/node/res/chain_specs/litentry-plain.json diff --git a/node/res/chain_specs/litentry.json b/parachain/node/res/chain_specs/litentry.json similarity index 100% rename from node/res/chain_specs/litentry.json rename to parachain/node/res/chain_specs/litentry.json diff --git a/node/res/chain_specs/paseo-plain.json b/parachain/node/res/chain_specs/paseo-plain.json similarity index 100% rename from node/res/chain_specs/paseo-plain.json rename to parachain/node/res/chain_specs/paseo-plain.json diff --git a/node/res/chain_specs/paseo.json b/parachain/node/res/chain_specs/paseo.json similarity index 100% rename from node/res/chain_specs/paseo.json rename to parachain/node/res/chain_specs/paseo.json diff --git a/node/res/chain_specs/rococo-plain.json b/parachain/node/res/chain_specs/rococo-plain.json similarity index 100% rename from node/res/chain_specs/rococo-plain.json rename to parachain/node/res/chain_specs/rococo-plain.json diff --git a/node/res/chain_specs/rococo.json b/parachain/node/res/chain_specs/rococo.json similarity index 100% rename from node/res/chain_specs/rococo.json rename to parachain/node/res/chain_specs/rococo.json diff --git a/node/res/genesis_info/litentry.json b/parachain/node/res/genesis_info/litentry.json similarity index 100% rename from node/res/genesis_info/litentry.json rename to parachain/node/res/genesis_info/litentry.json diff --git a/node/res/genesis_info/paseo.json b/parachain/node/res/genesis_info/paseo.json similarity index 100% rename from node/res/genesis_info/paseo.json rename to parachain/node/res/genesis_info/paseo.json diff --git a/node/res/genesis_info/rococo.json b/parachain/node/res/genesis_info/rococo.json similarity index 100% rename from node/res/genesis_info/rococo.json rename to parachain/node/res/genesis_info/rococo.json diff --git a/node/res/genesis_info/staging.json b/parachain/node/res/genesis_info/staging.json similarity index 100% rename from node/res/genesis_info/staging.json rename to parachain/node/res/genesis_info/staging.json diff --git a/node/src/chain_specs/litentry.rs b/parachain/node/src/chain_specs/litentry.rs similarity index 100% rename from node/src/chain_specs/litentry.rs rename to parachain/node/src/chain_specs/litentry.rs diff --git a/node/src/chain_specs/mod.rs b/parachain/node/src/chain_specs/mod.rs similarity index 100% rename from node/src/chain_specs/mod.rs rename to parachain/node/src/chain_specs/mod.rs diff --git a/node/src/chain_specs/paseo.rs b/parachain/node/src/chain_specs/paseo.rs similarity index 100% rename from node/src/chain_specs/paseo.rs rename to parachain/node/src/chain_specs/paseo.rs diff --git a/node/src/chain_specs/rococo.rs b/parachain/node/src/chain_specs/rococo.rs similarity index 100% rename from node/src/chain_specs/rococo.rs rename to parachain/node/src/chain_specs/rococo.rs diff --git a/node/src/cli.rs b/parachain/node/src/cli.rs similarity index 100% rename from node/src/cli.rs rename to parachain/node/src/cli.rs diff --git a/node/src/command.rs b/parachain/node/src/command.rs similarity index 100% rename from node/src/command.rs rename to parachain/node/src/command.rs diff --git a/node/src/evm_tracing_types.rs b/parachain/node/src/evm_tracing_types.rs similarity index 100% rename from node/src/evm_tracing_types.rs rename to parachain/node/src/evm_tracing_types.rs diff --git a/node/src/main.rs b/parachain/node/src/main.rs similarity index 100% rename from node/src/main.rs rename to parachain/node/src/main.rs diff --git a/node/src/rpc.rs b/parachain/node/src/rpc.rs similarity index 100% rename from node/src/rpc.rs rename to parachain/node/src/rpc.rs diff --git a/node/src/service.rs b/parachain/node/src/service.rs similarity index 100% rename from node/src/service.rs rename to parachain/node/src/service.rs diff --git a/node/src/standalone_block_import.rs b/parachain/node/src/standalone_block_import.rs similarity index 100% rename from node/src/standalone_block_import.rs rename to parachain/node/src/standalone_block_import.rs diff --git a/node/src/tracing.rs b/parachain/node/src/tracing.rs similarity index 100% rename from node/src/tracing.rs rename to parachain/node/src/tracing.rs diff --git a/pallets/account-fix/Cargo.toml b/parachain/pallets/account-fix/Cargo.toml similarity index 100% rename from pallets/account-fix/Cargo.toml rename to parachain/pallets/account-fix/Cargo.toml diff --git a/pallets/account-fix/src/lib.rs b/parachain/pallets/account-fix/src/lib.rs similarity index 100% rename from pallets/account-fix/src/lib.rs rename to parachain/pallets/account-fix/src/lib.rs diff --git a/pallets/bitacross/Cargo.toml b/parachain/pallets/bitacross/Cargo.toml similarity index 100% rename from pallets/bitacross/Cargo.toml rename to parachain/pallets/bitacross/Cargo.toml diff --git a/pallets/bitacross/src/custodial_wallet.rs b/parachain/pallets/bitacross/src/custodial_wallet.rs similarity index 100% rename from pallets/bitacross/src/custodial_wallet.rs rename to parachain/pallets/bitacross/src/custodial_wallet.rs diff --git a/pallets/bitacross/src/lib.rs b/parachain/pallets/bitacross/src/lib.rs similarity index 100% rename from pallets/bitacross/src/lib.rs rename to parachain/pallets/bitacross/src/lib.rs diff --git a/pallets/bridge/assets-handler/Cargo.toml b/parachain/pallets/bridge/assets-handler/Cargo.toml similarity index 100% rename from pallets/bridge/assets-handler/Cargo.toml rename to parachain/pallets/bridge/assets-handler/Cargo.toml diff --git a/pallets/bridge/assets-handler/src/lib.rs b/parachain/pallets/bridge/assets-handler/src/lib.rs similarity index 100% rename from pallets/bridge/assets-handler/src/lib.rs rename to parachain/pallets/bridge/assets-handler/src/lib.rs diff --git a/pallets/bridge/assets-handler/src/mock.rs b/parachain/pallets/bridge/assets-handler/src/mock.rs similarity index 100% rename from pallets/bridge/assets-handler/src/mock.rs rename to parachain/pallets/bridge/assets-handler/src/mock.rs diff --git a/pallets/bridge/assets-handler/src/tests.rs b/parachain/pallets/bridge/assets-handler/src/tests.rs similarity index 100% rename from pallets/bridge/assets-handler/src/tests.rs rename to parachain/pallets/bridge/assets-handler/src/tests.rs diff --git a/pallets/bridge/bridge-transfer/Cargo.toml b/parachain/pallets/bridge/bridge-transfer/Cargo.toml similarity index 100% rename from pallets/bridge/bridge-transfer/Cargo.toml rename to parachain/pallets/bridge/bridge-transfer/Cargo.toml diff --git a/pallets/bridge/bridge-transfer/src/benchmarking.rs b/parachain/pallets/bridge/bridge-transfer/src/benchmarking.rs similarity index 100% rename from pallets/bridge/bridge-transfer/src/benchmarking.rs rename to parachain/pallets/bridge/bridge-transfer/src/benchmarking.rs diff --git a/pallets/bridge/bridge-transfer/src/lib.rs b/parachain/pallets/bridge/bridge-transfer/src/lib.rs similarity index 100% rename from pallets/bridge/bridge-transfer/src/lib.rs rename to parachain/pallets/bridge/bridge-transfer/src/lib.rs diff --git a/pallets/bridge/bridge-transfer/src/mock.rs b/parachain/pallets/bridge/bridge-transfer/src/mock.rs similarity index 100% rename from pallets/bridge/bridge-transfer/src/mock.rs rename to parachain/pallets/bridge/bridge-transfer/src/mock.rs diff --git a/pallets/bridge/bridge-transfer/src/tests.rs b/parachain/pallets/bridge/bridge-transfer/src/tests.rs similarity index 100% rename from pallets/bridge/bridge-transfer/src/tests.rs rename to parachain/pallets/bridge/bridge-transfer/src/tests.rs diff --git a/pallets/bridge/bridge-transfer/src/weights.rs b/parachain/pallets/bridge/bridge-transfer/src/weights.rs similarity index 100% rename from pallets/bridge/bridge-transfer/src/weights.rs rename to parachain/pallets/bridge/bridge-transfer/src/weights.rs diff --git a/pallets/bridge/chain-bridge/Cargo.toml b/parachain/pallets/bridge/chain-bridge/Cargo.toml similarity index 100% rename from pallets/bridge/chain-bridge/Cargo.toml rename to parachain/pallets/bridge/chain-bridge/Cargo.toml diff --git a/pallets/bridge/chain-bridge/src/benchmarking.rs b/parachain/pallets/bridge/chain-bridge/src/benchmarking.rs similarity index 100% rename from pallets/bridge/chain-bridge/src/benchmarking.rs rename to parachain/pallets/bridge/chain-bridge/src/benchmarking.rs diff --git a/pallets/bridge/chain-bridge/src/hashing.rs b/parachain/pallets/bridge/chain-bridge/src/hashing.rs similarity index 100% rename from pallets/bridge/chain-bridge/src/hashing.rs rename to parachain/pallets/bridge/chain-bridge/src/hashing.rs diff --git a/pallets/bridge/chain-bridge/src/lib.rs b/parachain/pallets/bridge/chain-bridge/src/lib.rs similarity index 100% rename from pallets/bridge/chain-bridge/src/lib.rs rename to parachain/pallets/bridge/chain-bridge/src/lib.rs diff --git a/pallets/bridge/chain-bridge/src/mock.rs b/parachain/pallets/bridge/chain-bridge/src/mock.rs similarity index 100% rename from pallets/bridge/chain-bridge/src/mock.rs rename to parachain/pallets/bridge/chain-bridge/src/mock.rs diff --git a/pallets/bridge/chain-bridge/src/tests.rs b/parachain/pallets/bridge/chain-bridge/src/tests.rs similarity index 100% rename from pallets/bridge/chain-bridge/src/tests.rs rename to parachain/pallets/bridge/chain-bridge/src/tests.rs diff --git a/pallets/bridge/chain-bridge/src/weights.rs b/parachain/pallets/bridge/chain-bridge/src/weights.rs similarity index 100% rename from pallets/bridge/chain-bridge/src/weights.rs rename to parachain/pallets/bridge/chain-bridge/src/weights.rs diff --git a/pallets/bridge/common/Cargo.toml b/parachain/pallets/bridge/common/Cargo.toml similarity index 100% rename from pallets/bridge/common/Cargo.toml rename to parachain/pallets/bridge/common/Cargo.toml diff --git a/pallets/bridge/common/src/lib.rs b/parachain/pallets/bridge/common/src/lib.rs similarity index 100% rename from pallets/bridge/common/src/lib.rs rename to parachain/pallets/bridge/common/src/lib.rs diff --git a/pallets/evm-address/Cargo.toml b/parachain/pallets/evm-address/Cargo.toml similarity index 100% rename from pallets/evm-address/Cargo.toml rename to parachain/pallets/evm-address/Cargo.toml diff --git a/pallets/evm-address/src/lib.rs b/parachain/pallets/evm-address/src/lib.rs similarity index 100% rename from pallets/evm-address/src/lib.rs rename to parachain/pallets/evm-address/src/lib.rs diff --git a/pallets/evm-address/src/mock.rs b/parachain/pallets/evm-address/src/mock.rs similarity index 100% rename from pallets/evm-address/src/mock.rs rename to parachain/pallets/evm-address/src/mock.rs diff --git a/pallets/evm-address/src/tests.rs b/parachain/pallets/evm-address/src/tests.rs similarity index 100% rename from pallets/evm-address/src/tests.rs rename to parachain/pallets/evm-address/src/tests.rs diff --git a/pallets/evm-assertions/Cargo.toml b/parachain/pallets/evm-assertions/Cargo.toml similarity index 100% rename from pallets/evm-assertions/Cargo.toml rename to parachain/pallets/evm-assertions/Cargo.toml diff --git a/pallets/evm-assertions/src/lib.rs b/parachain/pallets/evm-assertions/src/lib.rs similarity index 100% rename from pallets/evm-assertions/src/lib.rs rename to parachain/pallets/evm-assertions/src/lib.rs diff --git a/pallets/evm-assertions/src/mock.rs b/parachain/pallets/evm-assertions/src/mock.rs similarity index 100% rename from pallets/evm-assertions/src/mock.rs rename to parachain/pallets/evm-assertions/src/mock.rs diff --git a/pallets/evm-assertions/src/tests.rs b/parachain/pallets/evm-assertions/src/tests.rs similarity index 100% rename from pallets/evm-assertions/src/tests.rs rename to parachain/pallets/evm-assertions/src/tests.rs diff --git a/pallets/extrinsic-filter/Cargo.toml b/parachain/pallets/extrinsic-filter/Cargo.toml similarity index 100% rename from pallets/extrinsic-filter/Cargo.toml rename to parachain/pallets/extrinsic-filter/Cargo.toml diff --git a/pallets/extrinsic-filter/src/benchmarking.rs b/parachain/pallets/extrinsic-filter/src/benchmarking.rs similarity index 100% rename from pallets/extrinsic-filter/src/benchmarking.rs rename to parachain/pallets/extrinsic-filter/src/benchmarking.rs diff --git a/pallets/extrinsic-filter/src/lib.rs b/parachain/pallets/extrinsic-filter/src/lib.rs similarity index 100% rename from pallets/extrinsic-filter/src/lib.rs rename to parachain/pallets/extrinsic-filter/src/lib.rs diff --git a/pallets/extrinsic-filter/src/mock.rs b/parachain/pallets/extrinsic-filter/src/mock.rs similarity index 100% rename from pallets/extrinsic-filter/src/mock.rs rename to parachain/pallets/extrinsic-filter/src/mock.rs diff --git a/pallets/extrinsic-filter/src/tests.rs b/parachain/pallets/extrinsic-filter/src/tests.rs similarity index 100% rename from pallets/extrinsic-filter/src/tests.rs rename to parachain/pallets/extrinsic-filter/src/tests.rs diff --git a/pallets/extrinsic-filter/src/weights.rs b/parachain/pallets/extrinsic-filter/src/weights.rs similarity index 100% rename from pallets/extrinsic-filter/src/weights.rs rename to parachain/pallets/extrinsic-filter/src/weights.rs diff --git a/pallets/group/Cargo.toml b/parachain/pallets/group/Cargo.toml similarity index 100% rename from pallets/group/Cargo.toml rename to parachain/pallets/group/Cargo.toml diff --git a/pallets/group/src/lib.rs b/parachain/pallets/group/src/lib.rs similarity index 100% rename from pallets/group/src/lib.rs rename to parachain/pallets/group/src/lib.rs diff --git a/pallets/group/src/mock.rs b/parachain/pallets/group/src/mock.rs similarity index 100% rename from pallets/group/src/mock.rs rename to parachain/pallets/group/src/mock.rs diff --git a/pallets/group/src/tests.rs b/parachain/pallets/group/src/tests.rs similarity index 100% rename from pallets/group/src/tests.rs rename to parachain/pallets/group/src/tests.rs diff --git a/pallets/identity-management/Cargo.toml b/parachain/pallets/identity-management/Cargo.toml similarity index 100% rename from pallets/identity-management/Cargo.toml rename to parachain/pallets/identity-management/Cargo.toml diff --git a/pallets/identity-management/src/benchmarking.rs b/parachain/pallets/identity-management/src/benchmarking.rs similarity index 100% rename from pallets/identity-management/src/benchmarking.rs rename to parachain/pallets/identity-management/src/benchmarking.rs diff --git a/pallets/identity-management/src/lib.rs b/parachain/pallets/identity-management/src/lib.rs similarity index 100% rename from pallets/identity-management/src/lib.rs rename to parachain/pallets/identity-management/src/lib.rs diff --git a/pallets/identity-management/src/mock.rs b/parachain/pallets/identity-management/src/mock.rs similarity index 100% rename from pallets/identity-management/src/mock.rs rename to parachain/pallets/identity-management/src/mock.rs diff --git a/pallets/identity-management/src/tests.rs b/parachain/pallets/identity-management/src/tests.rs similarity index 100% rename from pallets/identity-management/src/tests.rs rename to parachain/pallets/identity-management/src/tests.rs diff --git a/pallets/identity-management/src/weights.rs b/parachain/pallets/identity-management/src/weights.rs similarity index 100% rename from pallets/identity-management/src/weights.rs rename to parachain/pallets/identity-management/src/weights.rs diff --git a/pallets/parachain-staking/Cargo.toml b/parachain/pallets/parachain-staking/Cargo.toml similarity index 100% rename from pallets/parachain-staking/Cargo.toml rename to parachain/pallets/parachain-staking/Cargo.toml diff --git a/pallets/parachain-staking/src/auto_compound.rs b/parachain/pallets/parachain-staking/src/auto_compound.rs similarity index 100% rename from pallets/parachain-staking/src/auto_compound.rs rename to parachain/pallets/parachain-staking/src/auto_compound.rs diff --git a/pallets/parachain-staking/src/benchmarking.rs b/parachain/pallets/parachain-staking/src/benchmarking.rs similarity index 100% rename from pallets/parachain-staking/src/benchmarking.rs rename to parachain/pallets/parachain-staking/src/benchmarking.rs diff --git a/pallets/parachain-staking/src/delegation_requests.rs b/parachain/pallets/parachain-staking/src/delegation_requests.rs similarity index 100% rename from pallets/parachain-staking/src/delegation_requests.rs rename to parachain/pallets/parachain-staking/src/delegation_requests.rs diff --git a/pallets/parachain-staking/src/inflation.rs b/parachain/pallets/parachain-staking/src/inflation.rs similarity index 100% rename from pallets/parachain-staking/src/inflation.rs rename to parachain/pallets/parachain-staking/src/inflation.rs diff --git a/pallets/parachain-staking/src/lib.rs b/parachain/pallets/parachain-staking/src/lib.rs similarity index 100% rename from pallets/parachain-staking/src/lib.rs rename to parachain/pallets/parachain-staking/src/lib.rs diff --git a/pallets/parachain-staking/src/mock.rs b/parachain/pallets/parachain-staking/src/mock.rs similarity index 100% rename from pallets/parachain-staking/src/mock.rs rename to parachain/pallets/parachain-staking/src/mock.rs diff --git a/pallets/parachain-staking/src/set.rs b/parachain/pallets/parachain-staking/src/set.rs similarity index 100% rename from pallets/parachain-staking/src/set.rs rename to parachain/pallets/parachain-staking/src/set.rs diff --git a/pallets/parachain-staking/src/tests.rs b/parachain/pallets/parachain-staking/src/tests.rs similarity index 100% rename from pallets/parachain-staking/src/tests.rs rename to parachain/pallets/parachain-staking/src/tests.rs diff --git a/pallets/parachain-staking/src/traits.rs b/parachain/pallets/parachain-staking/src/traits.rs similarity index 100% rename from pallets/parachain-staking/src/traits.rs rename to parachain/pallets/parachain-staking/src/traits.rs diff --git a/pallets/parachain-staking/src/types.rs b/parachain/pallets/parachain-staking/src/types.rs similarity index 100% rename from pallets/parachain-staking/src/types.rs rename to parachain/pallets/parachain-staking/src/types.rs diff --git a/pallets/parachain-staking/src/weights.rs b/parachain/pallets/parachain-staking/src/weights.rs similarity index 100% rename from pallets/parachain-staking/src/weights.rs rename to parachain/pallets/parachain-staking/src/weights.rs diff --git a/pallets/score-staking/Cargo.toml b/parachain/pallets/score-staking/Cargo.toml similarity index 100% rename from pallets/score-staking/Cargo.toml rename to parachain/pallets/score-staking/Cargo.toml diff --git a/pallets/score-staking/src/lib.rs b/parachain/pallets/score-staking/src/lib.rs similarity index 100% rename from pallets/score-staking/src/lib.rs rename to parachain/pallets/score-staking/src/lib.rs diff --git a/pallets/score-staking/src/mock.rs b/parachain/pallets/score-staking/src/mock.rs similarity index 100% rename from pallets/score-staking/src/mock.rs rename to parachain/pallets/score-staking/src/mock.rs diff --git a/pallets/score-staking/src/tests.rs b/parachain/pallets/score-staking/src/tests.rs similarity index 100% rename from pallets/score-staking/src/tests.rs rename to parachain/pallets/score-staking/src/tests.rs diff --git a/pallets/score-staking/src/types.rs b/parachain/pallets/score-staking/src/types.rs similarity index 100% rename from pallets/score-staking/src/types.rs rename to parachain/pallets/score-staking/src/types.rs diff --git a/pallets/teebag/Cargo.toml b/parachain/pallets/teebag/Cargo.toml similarity index 100% rename from pallets/teebag/Cargo.toml rename to parachain/pallets/teebag/Cargo.toml diff --git a/pallets/teebag/README.md b/parachain/pallets/teebag/README.md similarity index 100% rename from pallets/teebag/README.md rename to parachain/pallets/teebag/README.md diff --git a/pallets/teebag/src/benchmarking.rs b/parachain/pallets/teebag/src/benchmarking.rs similarity index 100% rename from pallets/teebag/src/benchmarking.rs rename to parachain/pallets/teebag/src/benchmarking.rs diff --git a/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST4.bin b/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST4.bin similarity index 100% rename from pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST4.bin rename to parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST4.bin diff --git a/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST5.bin b/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST5.bin similarity index 100% rename from pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST5.bin rename to parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST5.bin diff --git a/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST6.bin b/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST6.bin similarity index 100% rename from pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST6.bin rename to parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST6.bin diff --git a/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST7.bin b/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST7.bin similarity index 100% rename from pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST7.bin rename to parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST7.bin diff --git a/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST8-PRODUCTION.bin b/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST8-PRODUCTION.bin similarity index 100% rename from pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST8-PRODUCTION.bin rename to parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST8-PRODUCTION.bin diff --git a/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST9.bin b/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST9.bin similarity index 100% rename from pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST9.bin rename to parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST9.bin diff --git a/pallets/teebag/src/ias-data/ra_dcap_dump_quote.ra b/parachain/pallets/teebag/src/ias-data/ra_dcap_dump_quote.ra similarity index 100% rename from pallets/teebag/src/ias-data/ra_dcap_dump_quote.ra rename to parachain/pallets/teebag/src/ias-data/ra_dcap_dump_quote.ra diff --git a/bitacross-worker/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der b/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST4.der similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der rename to parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST4.der diff --git a/pallets/teebag/src/ias-data/ra_dump_cert_TEST5.der b/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST5.der similarity index 100% rename from pallets/teebag/src/ias-data/ra_dump_cert_TEST5.der rename to parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST5.der diff --git a/pallets/teebag/src/ias-data/ra_dump_cert_TEST6.der b/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST6.der similarity index 100% rename from pallets/teebag/src/ias-data/ra_dump_cert_TEST6.der rename to parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST6.der diff --git a/pallets/teebag/src/ias-data/ra_dump_cert_TEST7.der b/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST7.der similarity index 100% rename from pallets/teebag/src/ias-data/ra_dump_cert_TEST7.der rename to parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST7.der diff --git a/pallets/teebag/src/ias-data/ra_dump_cert_TEST8_PRODUCTION.der b/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST8_PRODUCTION.der similarity index 100% rename from pallets/teebag/src/ias-data/ra_dump_cert_TEST8_PRODUCTION.der rename to parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST8_PRODUCTION.der diff --git a/pallets/teebag/src/ias-data/ra_dump_cert_TEST9_enclave_add.der b/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST9_enclave_add.der similarity index 100% rename from pallets/teebag/src/ias-data/ra_dump_cert_TEST9_enclave_add.der rename to parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST9_enclave_add.der diff --git a/pallets/teebag/src/lib.rs b/parachain/pallets/teebag/src/lib.rs similarity index 100% rename from pallets/teebag/src/lib.rs rename to parachain/pallets/teebag/src/lib.rs diff --git a/pallets/teebag/src/mock.rs b/parachain/pallets/teebag/src/mock.rs similarity index 100% rename from pallets/teebag/src/mock.rs rename to parachain/pallets/teebag/src/mock.rs diff --git a/pallets/teebag/src/quoting_enclave.rs b/parachain/pallets/teebag/src/quoting_enclave.rs similarity index 100% rename from pallets/teebag/src/quoting_enclave.rs rename to parachain/pallets/teebag/src/quoting_enclave.rs diff --git a/bitacross-worker/core-primitives/attestation-handler/AttestationReportSigningCACert.pem b/parachain/pallets/teebag/src/sgx_verify/AttestationReportSigningCACert.pem similarity index 100% rename from bitacross-worker/core-primitives/attestation-handler/AttestationReportSigningCACert.pem rename to parachain/pallets/teebag/src/sgx_verify/AttestationReportSigningCACert.pem diff --git a/pallets/teebag/src/sgx_verify/collateral.rs b/parachain/pallets/teebag/src/sgx_verify/collateral.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/collateral.rs rename to parachain/pallets/teebag/src/sgx_verify/collateral.rs diff --git a/pallets/teebag/src/sgx_verify/ephemeral_key.rs b/parachain/pallets/teebag/src/sgx_verify/ephemeral_key.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/ephemeral_key.rs rename to parachain/pallets/teebag/src/sgx_verify/ephemeral_key.rs diff --git a/pallets/teebag/src/sgx_verify/fuzz/Cargo.lock b/parachain/pallets/teebag/src/sgx_verify/fuzz/Cargo.lock similarity index 100% rename from pallets/teebag/src/sgx_verify/fuzz/Cargo.lock rename to parachain/pallets/teebag/src/sgx_verify/fuzz/Cargo.lock diff --git a/pallets/teebag/src/sgx_verify/fuzz/Cargo.toml b/parachain/pallets/teebag/src/sgx_verify/fuzz/Cargo.toml similarity index 100% rename from pallets/teebag/src/sgx_verify/fuzz/Cargo.toml rename to parachain/pallets/teebag/src/sgx_verify/fuzz/Cargo.toml diff --git a/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/decode_quote.rs b/parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/decode_quote.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/decode_quote.rs rename to parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/decode_quote.rs diff --git a/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/deserialize_json.rs b/parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/deserialize_json.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/deserialize_json.rs rename to parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/deserialize_json.rs diff --git a/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/extract_tcb_info.rs b/parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/extract_tcb_info.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/extract_tcb_info.rs rename to parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/extract_tcb_info.rs diff --git a/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/signature_check.rs b/parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/signature_check.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/signature_check.rs rename to parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/signature_check.rs diff --git a/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/verify_ias_report.rs b/parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/verify_ias_report.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/verify_ias_report.rs rename to parachain/pallets/teebag/src/sgx_verify/fuzz/fuzz_targets/verify_ias_report.rs diff --git a/pallets/teebag/src/sgx_verify/mod.rs b/parachain/pallets/teebag/src/sgx_verify/mod.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/mod.rs rename to parachain/pallets/teebag/src/sgx_verify/mod.rs diff --git a/pallets/teebag/src/sgx_verify/netscape_comment.rs b/parachain/pallets/teebag/src/sgx_verify/netscape_comment.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/netscape_comment.rs rename to parachain/pallets/teebag/src/sgx_verify/netscape_comment.rs diff --git a/pallets/teebag/src/sgx_verify/test/dcap/dcap_quote_cert.der b/parachain/pallets/teebag/src/sgx_verify/test/dcap/dcap_quote_cert.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/dcap_quote_cert.der rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/dcap_quote_cert.der diff --git a/pallets/teebag/src/sgx_verify/test/dcap/pck_crl.der b/parachain/pallets/teebag/src/sgx_verify/test/dcap/pck_crl.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/pck_crl.der rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/pck_crl.der diff --git a/pallets/teebag/src/sgx_verify/test/dcap/pck_crl_issuer_chain.pem b/parachain/pallets/teebag/src/sgx_verify/test/dcap/pck_crl_issuer_chain.pem similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/pck_crl_issuer_chain.pem rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/pck_crl_issuer_chain.pem diff --git a/pallets/teebag/src/sgx_verify/test/dcap/qe_identity.json b/parachain/pallets/teebag/src/sgx_verify/test/dcap/qe_identity.json similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/qe_identity.json rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/qe_identity.json diff --git a/pallets/teebag/src/sgx_verify/test/dcap/qe_identity_cert.pem b/parachain/pallets/teebag/src/sgx_verify/test/dcap/qe_identity_cert.pem similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/qe_identity_cert.pem rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/qe_identity_cert.pem diff --git a/pallets/teebag/src/sgx_verify/test/dcap/qe_identity_issuer_chain.pem b/parachain/pallets/teebag/src/sgx_verify/test/dcap/qe_identity_issuer_chain.pem similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/qe_identity_issuer_chain.pem rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/qe_identity_issuer_chain.pem diff --git a/pallets/teebag/src/sgx_verify/test/dcap/root_ca_crl.der b/parachain/pallets/teebag/src/sgx_verify/test/dcap/root_ca_crl.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/root_ca_crl.der rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/root_ca_crl.der diff --git a/pallets/teebag/src/sgx_verify/test/dcap/tcb_info.json b/parachain/pallets/teebag/src/sgx_verify/test/dcap/tcb_info.json similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/tcb_info.json rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/tcb_info.json diff --git a/pallets/teebag/src/sgx_verify/test/dcap/tcb_info_issuer_chain.pem b/parachain/pallets/teebag/src/sgx_verify/test/dcap/tcb_info_issuer_chain.pem similarity index 100% rename from pallets/teebag/src/sgx_verify/test/dcap/tcb_info_issuer_chain.pem rename to parachain/pallets/teebag/src/sgx_verify/test/dcap/tcb_info_issuer_chain.pem diff --git a/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST4.bin b/parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST4.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST4.bin rename to parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST4.bin diff --git a/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST5.bin b/parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST5.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST5.bin rename to parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST5.bin diff --git a/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST6.bin b/parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST6.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST6.bin rename to parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST6.bin diff --git a/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST7.bin b/parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST7.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST7.bin rename to parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST7.bin diff --git a/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST8-PRODUCTION.bin b/parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST8-PRODUCTION.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST8-PRODUCTION.bin rename to parachain/pallets/teebag/src/sgx_verify/test/enclave-signing-pubkey-TEST8-PRODUCTION.bin diff --git a/pallets/teebag/src/ias-data/ra_dump_cert_TEST4.der b/parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST4.der similarity index 100% rename from pallets/teebag/src/ias-data/ra_dump_cert_TEST4.der rename to parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST4.der diff --git a/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST5.der b/parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST5.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST5.der rename to parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST5.der diff --git a/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST6.der b/parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST6.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST6.der rename to parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST6.der diff --git a/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST7.der b/parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST7.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST7.der rename to parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST7.der diff --git a/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST8_PRODUCTION.der b/parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST8_PRODUCTION.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST8_PRODUCTION.der rename to parachain/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST8_PRODUCTION.der diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER1_MRENCLAVE1.der b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER1_MRENCLAVE1.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER1_MRENCLAVE1.der rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER1_MRENCLAVE1.der diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER2_MRENCLAVE2.der b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER2_MRENCLAVE2.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER2_MRENCLAVE2.der rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER2_MRENCLAVE2.der diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER3_MRENCLAVE2.der b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER3_MRENCLAVE2.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER3_MRENCLAVE2.der rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_cert_MRSIGNER3_MRENCLAVE2.der diff --git a/bitacross-worker/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER2_MRENCLAVE2.bin b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER2_MRENCLAVE2.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER2_MRENCLAVE2.bin rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER2_MRENCLAVE2.bin diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER3_MRENCLAVE2.bin b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER3_MRENCLAVE2.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER3_MRENCLAVE2.bin rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER3_MRENCLAVE2.bin diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER1_MRENCLAVE1.bin b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER1_MRENCLAVE1.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER1_MRENCLAVE1.bin rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER1_MRENCLAVE1.bin diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER2_MRENCLAVE2.bin b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER2_MRENCLAVE2.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER2_MRENCLAVE2.bin rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER2_MRENCLAVE2.bin diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER3_MRENCLAVE2.bin b/parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER3_MRENCLAVE2.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER3_MRENCLAVE2.bin rename to parachain/pallets/teebag/src/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER3_MRENCLAVE2.bin diff --git a/pallets/teebag/src/sgx_verify/tests.rs b/parachain/pallets/teebag/src/sgx_verify/tests.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/tests.rs rename to parachain/pallets/teebag/src/sgx_verify/tests.rs diff --git a/pallets/teebag/src/sgx_verify/utils.rs b/parachain/pallets/teebag/src/sgx_verify/utils.rs similarity index 100% rename from pallets/teebag/src/sgx_verify/utils.rs rename to parachain/pallets/teebag/src/sgx_verify/utils.rs diff --git a/pallets/teebag/src/tcb.rs b/parachain/pallets/teebag/src/tcb.rs similarity index 100% rename from pallets/teebag/src/tcb.rs rename to parachain/pallets/teebag/src/tcb.rs diff --git a/pallets/teebag/src/test_util.rs b/parachain/pallets/teebag/src/test_util.rs similarity index 100% rename from pallets/teebag/src/test_util.rs rename to parachain/pallets/teebag/src/test_util.rs diff --git a/pallets/teebag/src/tests.rs b/parachain/pallets/teebag/src/tests.rs similarity index 100% rename from pallets/teebag/src/tests.rs rename to parachain/pallets/teebag/src/tests.rs diff --git a/pallets/teebag/src/types.rs b/parachain/pallets/teebag/src/types.rs similarity index 100% rename from pallets/teebag/src/types.rs rename to parachain/pallets/teebag/src/types.rs diff --git a/pallets/teebag/src/weights.rs b/parachain/pallets/teebag/src/weights.rs similarity index 100% rename from pallets/teebag/src/weights.rs rename to parachain/pallets/teebag/src/weights.rs diff --git a/pallets/upstream_commit b/parachain/pallets/upstream_commit similarity index 100% rename from pallets/upstream_commit rename to parachain/pallets/upstream_commit diff --git a/pallets/vc-management/Cargo.toml b/parachain/pallets/vc-management/Cargo.toml similarity index 100% rename from pallets/vc-management/Cargo.toml rename to parachain/pallets/vc-management/Cargo.toml diff --git a/pallets/vc-management/src/benchmarking.rs b/parachain/pallets/vc-management/src/benchmarking.rs similarity index 100% rename from pallets/vc-management/src/benchmarking.rs rename to parachain/pallets/vc-management/src/benchmarking.rs diff --git a/pallets/vc-management/src/lib.rs b/parachain/pallets/vc-management/src/lib.rs similarity index 100% rename from pallets/vc-management/src/lib.rs rename to parachain/pallets/vc-management/src/lib.rs diff --git a/pallets/vc-management/src/mock.rs b/parachain/pallets/vc-management/src/mock.rs similarity index 100% rename from pallets/vc-management/src/mock.rs rename to parachain/pallets/vc-management/src/mock.rs diff --git a/pallets/vc-management/src/schema.rs b/parachain/pallets/vc-management/src/schema.rs similarity index 100% rename from pallets/vc-management/src/schema.rs rename to parachain/pallets/vc-management/src/schema.rs diff --git a/pallets/vc-management/src/tests.rs b/parachain/pallets/vc-management/src/tests.rs similarity index 100% rename from pallets/vc-management/src/tests.rs rename to parachain/pallets/vc-management/src/tests.rs diff --git a/pallets/vc-management/src/weights.rs b/parachain/pallets/vc-management/src/weights.rs similarity index 100% rename from pallets/vc-management/src/weights.rs rename to parachain/pallets/vc-management/src/weights.rs diff --git a/pallets/xcm-asset-manager/Cargo.toml b/parachain/pallets/xcm-asset-manager/Cargo.toml similarity index 100% rename from pallets/xcm-asset-manager/Cargo.toml rename to parachain/pallets/xcm-asset-manager/Cargo.toml diff --git a/pallets/xcm-asset-manager/src/benchmarking.rs b/parachain/pallets/xcm-asset-manager/src/benchmarking.rs similarity index 100% rename from pallets/xcm-asset-manager/src/benchmarking.rs rename to parachain/pallets/xcm-asset-manager/src/benchmarking.rs diff --git a/pallets/xcm-asset-manager/src/lib.rs b/parachain/pallets/xcm-asset-manager/src/lib.rs similarity index 100% rename from pallets/xcm-asset-manager/src/lib.rs rename to parachain/pallets/xcm-asset-manager/src/lib.rs diff --git a/pallets/xcm-asset-manager/src/mock.rs b/parachain/pallets/xcm-asset-manager/src/mock.rs similarity index 100% rename from pallets/xcm-asset-manager/src/mock.rs rename to parachain/pallets/xcm-asset-manager/src/mock.rs diff --git a/pallets/xcm-asset-manager/src/tests.rs b/parachain/pallets/xcm-asset-manager/src/tests.rs similarity index 100% rename from pallets/xcm-asset-manager/src/tests.rs rename to parachain/pallets/xcm-asset-manager/src/tests.rs diff --git a/pallets/xcm-asset-manager/src/weights.rs b/parachain/pallets/xcm-asset-manager/src/weights.rs similarity index 100% rename from pallets/xcm-asset-manager/src/weights.rs rename to parachain/pallets/xcm-asset-manager/src/weights.rs diff --git a/precompiles/assets-erc20/Cargo.toml b/parachain/precompiles/assets-erc20/Cargo.toml similarity index 100% rename from precompiles/assets-erc20/Cargo.toml rename to parachain/precompiles/assets-erc20/Cargo.toml diff --git a/precompiles/assets-erc20/ERC20.sol b/parachain/precompiles/assets-erc20/ERC20.sol similarity index 100% rename from precompiles/assets-erc20/ERC20.sol rename to parachain/precompiles/assets-erc20/ERC20.sol diff --git a/precompiles/assets-erc20/src/lib.rs b/parachain/precompiles/assets-erc20/src/lib.rs similarity index 100% rename from precompiles/assets-erc20/src/lib.rs rename to parachain/precompiles/assets-erc20/src/lib.rs diff --git a/precompiles/assets-erc20/src/mock.rs b/parachain/precompiles/assets-erc20/src/mock.rs similarity index 100% rename from precompiles/assets-erc20/src/mock.rs rename to parachain/precompiles/assets-erc20/src/mock.rs diff --git a/precompiles/assets-erc20/src/tests.rs b/parachain/precompiles/assets-erc20/src/tests.rs similarity index 100% rename from precompiles/assets-erc20/src/tests.rs rename to parachain/precompiles/assets-erc20/src/tests.rs diff --git a/precompiles/bridge-transfer/BridgeInterface.sol b/parachain/precompiles/bridge-transfer/BridgeInterface.sol similarity index 100% rename from precompiles/bridge-transfer/BridgeInterface.sol rename to parachain/precompiles/bridge-transfer/BridgeInterface.sol diff --git a/precompiles/bridge-transfer/Cargo.toml b/parachain/precompiles/bridge-transfer/Cargo.toml similarity index 100% rename from precompiles/bridge-transfer/Cargo.toml rename to parachain/precompiles/bridge-transfer/Cargo.toml diff --git a/precompiles/bridge-transfer/src/lib.rs b/parachain/precompiles/bridge-transfer/src/lib.rs similarity index 100% rename from precompiles/bridge-transfer/src/lib.rs rename to parachain/precompiles/bridge-transfer/src/lib.rs diff --git a/precompiles/parachain-staking/Cargo.toml b/parachain/precompiles/parachain-staking/Cargo.toml similarity index 100% rename from precompiles/parachain-staking/Cargo.toml rename to parachain/precompiles/parachain-staking/Cargo.toml diff --git a/precompiles/parachain-staking/StakingInterface.sol b/parachain/precompiles/parachain-staking/StakingInterface.sol similarity index 100% rename from precompiles/parachain-staking/StakingInterface.sol rename to parachain/precompiles/parachain-staking/StakingInterface.sol diff --git a/precompiles/parachain-staking/src/lib.rs b/parachain/precompiles/parachain-staking/src/lib.rs similarity index 100% rename from precompiles/parachain-staking/src/lib.rs rename to parachain/precompiles/parachain-staking/src/lib.rs diff --git a/precompiles/parachain-staking/src/mock.rs b/parachain/precompiles/parachain-staking/src/mock.rs similarity index 100% rename from precompiles/parachain-staking/src/mock.rs rename to parachain/precompiles/parachain-staking/src/mock.rs diff --git a/precompiles/parachain-staking/src/tests.rs b/parachain/precompiles/parachain-staking/src/tests.rs similarity index 100% rename from precompiles/parachain-staking/src/tests.rs rename to parachain/precompiles/parachain-staking/src/tests.rs diff --git a/precompiles/score-staking/Cargo.toml b/parachain/precompiles/score-staking/Cargo.toml similarity index 100% rename from precompiles/score-staking/Cargo.toml rename to parachain/precompiles/score-staking/Cargo.toml diff --git a/precompiles/score-staking/ScoreStakingInterface.sol b/parachain/precompiles/score-staking/ScoreStakingInterface.sol similarity index 100% rename from precompiles/score-staking/ScoreStakingInterface.sol rename to parachain/precompiles/score-staking/ScoreStakingInterface.sol diff --git a/precompiles/score-staking/src/lib.rs b/parachain/precompiles/score-staking/src/lib.rs similarity index 100% rename from precompiles/score-staking/src/lib.rs rename to parachain/precompiles/score-staking/src/lib.rs diff --git a/precompiles/score-staking/src/mock.rs b/parachain/precompiles/score-staking/src/mock.rs similarity index 100% rename from precompiles/score-staking/src/mock.rs rename to parachain/precompiles/score-staking/src/mock.rs diff --git a/precompiles/score-staking/src/tests.rs b/parachain/precompiles/score-staking/src/tests.rs similarity index 100% rename from precompiles/score-staking/src/tests.rs rename to parachain/precompiles/score-staking/src/tests.rs diff --git a/runtime/common/Cargo.toml b/parachain/runtime/common/Cargo.toml similarity index 100% rename from runtime/common/Cargo.toml rename to parachain/runtime/common/Cargo.toml diff --git a/runtime/common/src/lib.rs b/parachain/runtime/common/src/lib.rs similarity index 100% rename from runtime/common/src/lib.rs rename to parachain/runtime/common/src/lib.rs diff --git a/runtime/common/src/tests/base_call_filter.rs b/parachain/runtime/common/src/tests/base_call_filter.rs similarity index 100% rename from runtime/common/src/tests/base_call_filter.rs rename to parachain/runtime/common/src/tests/base_call_filter.rs diff --git a/runtime/common/src/tests/mod.rs b/parachain/runtime/common/src/tests/mod.rs similarity index 100% rename from runtime/common/src/tests/mod.rs rename to parachain/runtime/common/src/tests/mod.rs diff --git a/runtime/common/src/tests/setup/mod.rs b/parachain/runtime/common/src/tests/setup/mod.rs similarity index 100% rename from runtime/common/src/tests/setup/mod.rs rename to parachain/runtime/common/src/tests/setup/mod.rs diff --git a/runtime/common/src/tests/setup/relay.rs b/parachain/runtime/common/src/tests/setup/relay.rs similarity index 100% rename from runtime/common/src/tests/setup/relay.rs rename to parachain/runtime/common/src/tests/setup/relay.rs diff --git a/runtime/common/src/tests/transaction_payment.rs b/parachain/runtime/common/src/tests/transaction_payment.rs similarity index 100% rename from runtime/common/src/tests/transaction_payment.rs rename to parachain/runtime/common/src/tests/transaction_payment.rs diff --git a/runtime/common/src/tests/xcm_parachain/mod.rs b/parachain/runtime/common/src/tests/xcm_parachain/mod.rs similarity index 100% rename from runtime/common/src/tests/xcm_parachain/mod.rs rename to parachain/runtime/common/src/tests/xcm_parachain/mod.rs diff --git a/runtime/common/src/xcm_impl.rs b/parachain/runtime/common/src/xcm_impl.rs similarity index 100% rename from runtime/common/src/xcm_impl.rs rename to parachain/runtime/common/src/xcm_impl.rs diff --git a/runtime/litentry/Cargo.toml b/parachain/runtime/litentry/Cargo.toml similarity index 100% rename from runtime/litentry/Cargo.toml rename to parachain/runtime/litentry/Cargo.toml diff --git a/runtime/litentry/build.rs b/parachain/runtime/litentry/build.rs similarity index 100% rename from runtime/litentry/build.rs rename to parachain/runtime/litentry/build.rs diff --git a/runtime/litentry/src/asset_config.rs b/parachain/runtime/litentry/src/asset_config.rs similarity index 100% rename from runtime/litentry/src/asset_config.rs rename to parachain/runtime/litentry/src/asset_config.rs diff --git a/runtime/litentry/src/constants.rs b/parachain/runtime/litentry/src/constants.rs similarity index 100% rename from runtime/litentry/src/constants.rs rename to parachain/runtime/litentry/src/constants.rs diff --git a/runtime/litentry/src/lib.rs b/parachain/runtime/litentry/src/lib.rs similarity index 100% rename from runtime/litentry/src/lib.rs rename to parachain/runtime/litentry/src/lib.rs diff --git a/runtime/litentry/src/migration/P9100.rs b/parachain/runtime/litentry/src/migration/P9100.rs similarity index 100% rename from runtime/litentry/src/migration/P9100.rs rename to parachain/runtime/litentry/src/migration/P9100.rs diff --git a/runtime/litentry/src/migration/P9135.rs b/parachain/runtime/litentry/src/migration/P9135.rs similarity index 100% rename from runtime/litentry/src/migration/P9135.rs rename to parachain/runtime/litentry/src/migration/P9135.rs diff --git a/runtime/litentry/src/migration/P9175.rs b/parachain/runtime/litentry/src/migration/P9175.rs similarity index 100% rename from runtime/litentry/src/migration/P9175.rs rename to parachain/runtime/litentry/src/migration/P9175.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_balances_transaction_payment.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_balances_transaction_payment.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_balances_transaction_payment.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_balances_transaction_payment.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_bounty.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_bounty.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_bounty.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_bounty.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_bridge_related.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_bridge_related.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_bridge_related.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_bridge_related.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_democracy.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_democracy.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_democracy.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_democracy.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_identity.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_identity.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_identity.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_identity.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_multisig.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_multisig.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_multisig.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_multisig.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_parachain_staking.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_parachain_staking.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_parachain_staking.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_parachain_staking.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_preimage.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_preimage.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_preimage.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_preimage.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_proxy.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_proxy.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_proxy.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_proxy.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_treasury.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_treasury.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_treasury.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_treasury.rs diff --git a/runtime/litentry/src/migration/P9191/migrate_vesting.rs b/parachain/runtime/litentry/src/migration/P9191/migrate_vesting.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/migrate_vesting.rs rename to parachain/runtime/litentry/src/migration/P9191/migrate_vesting.rs diff --git a/runtime/litentry/src/migration/P9191/mod.rs b/parachain/runtime/litentry/src/migration/P9191/mod.rs similarity index 100% rename from runtime/litentry/src/migration/P9191/mod.rs rename to parachain/runtime/litentry/src/migration/P9191/mod.rs diff --git a/runtime/litentry/src/migration/P9192.rs b/parachain/runtime/litentry/src/migration/P9192.rs similarity index 100% rename from runtime/litentry/src/migration/P9192.rs rename to parachain/runtime/litentry/src/migration/P9192.rs diff --git a/runtime/litentry/src/migration/migration.md b/parachain/runtime/litentry/src/migration/migration.md similarity index 100% rename from runtime/litentry/src/migration/migration.md rename to parachain/runtime/litentry/src/migration/migration.md diff --git a/runtime/litentry/src/migration/mod.rs b/parachain/runtime/litentry/src/migration/mod.rs similarity index 100% rename from runtime/litentry/src/migration/mod.rs rename to parachain/runtime/litentry/src/migration/mod.rs diff --git a/runtime/litentry/src/precompiles.rs b/parachain/runtime/litentry/src/precompiles.rs similarity index 100% rename from runtime/litentry/src/precompiles.rs rename to parachain/runtime/litentry/src/precompiles.rs diff --git a/runtime/litentry/src/tests/base_call_filter.rs b/parachain/runtime/litentry/src/tests/base_call_filter.rs similarity index 100% rename from runtime/litentry/src/tests/base_call_filter.rs rename to parachain/runtime/litentry/src/tests/base_call_filter.rs diff --git a/runtime/litentry/src/tests/mod.rs b/parachain/runtime/litentry/src/tests/mod.rs similarity index 100% rename from runtime/litentry/src/tests/mod.rs rename to parachain/runtime/litentry/src/tests/mod.rs diff --git a/runtime/litentry/src/tests/transaction_payment.rs b/parachain/runtime/litentry/src/tests/transaction_payment.rs similarity index 100% rename from runtime/litentry/src/tests/transaction_payment.rs rename to parachain/runtime/litentry/src/tests/transaction_payment.rs diff --git a/runtime/litentry/src/weights/cumulus_pallet_xcmp_queue.rs b/parachain/runtime/litentry/src/weights/cumulus_pallet_xcmp_queue.rs similarity index 100% rename from runtime/litentry/src/weights/cumulus_pallet_xcmp_queue.rs rename to parachain/runtime/litentry/src/weights/cumulus_pallet_xcmp_queue.rs diff --git a/runtime/litentry/src/weights/frame_system.rs b/parachain/runtime/litentry/src/weights/frame_system.rs similarity index 100% rename from runtime/litentry/src/weights/frame_system.rs rename to parachain/runtime/litentry/src/weights/frame_system.rs diff --git a/runtime/litentry/src/weights/mod.rs b/parachain/runtime/litentry/src/weights/mod.rs similarity index 100% rename from runtime/litentry/src/weights/mod.rs rename to parachain/runtime/litentry/src/weights/mod.rs diff --git a/runtime/litentry/src/weights/pallet_asset_manager.rs b/parachain/runtime/litentry/src/weights/pallet_asset_manager.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_asset_manager.rs rename to parachain/runtime/litentry/src/weights/pallet_asset_manager.rs diff --git a/runtime/litentry/src/weights/pallet_balances.rs b/parachain/runtime/litentry/src/weights/pallet_balances.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_balances.rs rename to parachain/runtime/litentry/src/weights/pallet_balances.rs diff --git a/runtime/litentry/src/weights/pallet_bridge_transfer.rs b/parachain/runtime/litentry/src/weights/pallet_bridge_transfer.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_bridge_transfer.rs rename to parachain/runtime/litentry/src/weights/pallet_bridge_transfer.rs diff --git a/runtime/litentry/src/weights/pallet_chain_bridge.rs b/parachain/runtime/litentry/src/weights/pallet_chain_bridge.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_chain_bridge.rs rename to parachain/runtime/litentry/src/weights/pallet_chain_bridge.rs diff --git a/runtime/litentry/src/weights/pallet_collective.rs b/parachain/runtime/litentry/src/weights/pallet_collective.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_collective.rs rename to parachain/runtime/litentry/src/weights/pallet_collective.rs diff --git a/runtime/litentry/src/weights/pallet_democracy.rs b/parachain/runtime/litentry/src/weights/pallet_democracy.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_democracy.rs rename to parachain/runtime/litentry/src/weights/pallet_democracy.rs diff --git a/runtime/litentry/src/weights/pallet_evm.rs b/parachain/runtime/litentry/src/weights/pallet_evm.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_evm.rs rename to parachain/runtime/litentry/src/weights/pallet_evm.rs diff --git a/runtime/litentry/src/weights/pallet_extrinsic_filter.rs b/parachain/runtime/litentry/src/weights/pallet_extrinsic_filter.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_extrinsic_filter.rs rename to parachain/runtime/litentry/src/weights/pallet_extrinsic_filter.rs diff --git a/runtime/litentry/src/weights/pallet_identity.rs b/parachain/runtime/litentry/src/weights/pallet_identity.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_identity.rs rename to parachain/runtime/litentry/src/weights/pallet_identity.rs diff --git a/runtime/litentry/src/weights/pallet_identity_management.rs b/parachain/runtime/litentry/src/weights/pallet_identity_management.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_identity_management.rs rename to parachain/runtime/litentry/src/weights/pallet_identity_management.rs diff --git a/runtime/litentry/src/weights/pallet_membership.rs b/parachain/runtime/litentry/src/weights/pallet_membership.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_membership.rs rename to parachain/runtime/litentry/src/weights/pallet_membership.rs diff --git a/runtime/litentry/src/weights/pallet_multisig.rs b/parachain/runtime/litentry/src/weights/pallet_multisig.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_multisig.rs rename to parachain/runtime/litentry/src/weights/pallet_multisig.rs diff --git a/runtime/litentry/src/weights/pallet_parachain_staking.rs b/parachain/runtime/litentry/src/weights/pallet_parachain_staking.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_parachain_staking.rs rename to parachain/runtime/litentry/src/weights/pallet_parachain_staking.rs diff --git a/runtime/litentry/src/weights/pallet_preimage.rs b/parachain/runtime/litentry/src/weights/pallet_preimage.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_preimage.rs rename to parachain/runtime/litentry/src/weights/pallet_preimage.rs diff --git a/runtime/litentry/src/weights/pallet_proxy.rs b/parachain/runtime/litentry/src/weights/pallet_proxy.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_proxy.rs rename to parachain/runtime/litentry/src/weights/pallet_proxy.rs diff --git a/runtime/litentry/src/weights/pallet_scheduler.rs b/parachain/runtime/litentry/src/weights/pallet_scheduler.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_scheduler.rs rename to parachain/runtime/litentry/src/weights/pallet_scheduler.rs diff --git a/runtime/litentry/src/weights/pallet_session.rs b/parachain/runtime/litentry/src/weights/pallet_session.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_session.rs rename to parachain/runtime/litentry/src/weights/pallet_session.rs diff --git a/runtime/litentry/src/weights/pallet_teebag.rs b/parachain/runtime/litentry/src/weights/pallet_teebag.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_teebag.rs rename to parachain/runtime/litentry/src/weights/pallet_teebag.rs diff --git a/runtime/litentry/src/weights/pallet_timestamp.rs b/parachain/runtime/litentry/src/weights/pallet_timestamp.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_timestamp.rs rename to parachain/runtime/litentry/src/weights/pallet_timestamp.rs diff --git a/runtime/litentry/src/weights/pallet_treasury.rs b/parachain/runtime/litentry/src/weights/pallet_treasury.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_treasury.rs rename to parachain/runtime/litentry/src/weights/pallet_treasury.rs diff --git a/runtime/litentry/src/weights/pallet_utility.rs b/parachain/runtime/litentry/src/weights/pallet_utility.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_utility.rs rename to parachain/runtime/litentry/src/weights/pallet_utility.rs diff --git a/runtime/litentry/src/weights/pallet_vc_management.rs b/parachain/runtime/litentry/src/weights/pallet_vc_management.rs similarity index 100% rename from runtime/litentry/src/weights/pallet_vc_management.rs rename to parachain/runtime/litentry/src/weights/pallet_vc_management.rs diff --git a/runtime/litentry/src/xcm_config.rs b/parachain/runtime/litentry/src/xcm_config.rs similarity index 100% rename from runtime/litentry/src/xcm_config.rs rename to parachain/runtime/litentry/src/xcm_config.rs diff --git a/runtime/paseo/Cargo.toml b/parachain/runtime/paseo/Cargo.toml similarity index 100% rename from runtime/paseo/Cargo.toml rename to parachain/runtime/paseo/Cargo.toml diff --git a/runtime/paseo/build.rs b/parachain/runtime/paseo/build.rs similarity index 100% rename from runtime/paseo/build.rs rename to parachain/runtime/paseo/build.rs diff --git a/runtime/paseo/src/asset_config.rs b/parachain/runtime/paseo/src/asset_config.rs similarity index 100% rename from runtime/paseo/src/asset_config.rs rename to parachain/runtime/paseo/src/asset_config.rs diff --git a/runtime/paseo/src/constants.rs b/parachain/runtime/paseo/src/constants.rs similarity index 100% rename from runtime/paseo/src/constants.rs rename to parachain/runtime/paseo/src/constants.rs diff --git a/runtime/paseo/src/lib.rs b/parachain/runtime/paseo/src/lib.rs similarity index 100% rename from runtime/paseo/src/lib.rs rename to parachain/runtime/paseo/src/lib.rs diff --git a/runtime/paseo/src/precompiles.rs b/parachain/runtime/paseo/src/precompiles.rs similarity index 100% rename from runtime/paseo/src/precompiles.rs rename to parachain/runtime/paseo/src/precompiles.rs diff --git a/runtime/paseo/src/tests/base_call_filter.rs b/parachain/runtime/paseo/src/tests/base_call_filter.rs similarity index 100% rename from runtime/paseo/src/tests/base_call_filter.rs rename to parachain/runtime/paseo/src/tests/base_call_filter.rs diff --git a/runtime/paseo/src/tests/mod.rs b/parachain/runtime/paseo/src/tests/mod.rs similarity index 100% rename from runtime/paseo/src/tests/mod.rs rename to parachain/runtime/paseo/src/tests/mod.rs diff --git a/runtime/paseo/src/weights/cumulus_pallet_xcmp_queue.rs b/parachain/runtime/paseo/src/weights/cumulus_pallet_xcmp_queue.rs similarity index 100% rename from runtime/paseo/src/weights/cumulus_pallet_xcmp_queue.rs rename to parachain/runtime/paseo/src/weights/cumulus_pallet_xcmp_queue.rs diff --git a/runtime/paseo/src/weights/frame_system.rs b/parachain/runtime/paseo/src/weights/frame_system.rs similarity index 100% rename from runtime/paseo/src/weights/frame_system.rs rename to parachain/runtime/paseo/src/weights/frame_system.rs diff --git a/runtime/paseo/src/weights/mod.rs b/parachain/runtime/paseo/src/weights/mod.rs similarity index 100% rename from runtime/paseo/src/weights/mod.rs rename to parachain/runtime/paseo/src/weights/mod.rs diff --git a/runtime/paseo/src/weights/pallet_asset_manager.rs b/parachain/runtime/paseo/src/weights/pallet_asset_manager.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_asset_manager.rs rename to parachain/runtime/paseo/src/weights/pallet_asset_manager.rs diff --git a/runtime/paseo/src/weights/pallet_balances.rs b/parachain/runtime/paseo/src/weights/pallet_balances.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_balances.rs rename to parachain/runtime/paseo/src/weights/pallet_balances.rs diff --git a/runtime/paseo/src/weights/pallet_bridge_transfer.rs b/parachain/runtime/paseo/src/weights/pallet_bridge_transfer.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_bridge_transfer.rs rename to parachain/runtime/paseo/src/weights/pallet_bridge_transfer.rs diff --git a/runtime/paseo/src/weights/pallet_chain_bridge.rs b/parachain/runtime/paseo/src/weights/pallet_chain_bridge.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_chain_bridge.rs rename to parachain/runtime/paseo/src/weights/pallet_chain_bridge.rs diff --git a/runtime/paseo/src/weights/pallet_collective.rs b/parachain/runtime/paseo/src/weights/pallet_collective.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_collective.rs rename to parachain/runtime/paseo/src/weights/pallet_collective.rs diff --git a/runtime/paseo/src/weights/pallet_democracy.rs b/parachain/runtime/paseo/src/weights/pallet_democracy.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_democracy.rs rename to parachain/runtime/paseo/src/weights/pallet_democracy.rs diff --git a/runtime/paseo/src/weights/pallet_evm.rs b/parachain/runtime/paseo/src/weights/pallet_evm.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_evm.rs rename to parachain/runtime/paseo/src/weights/pallet_evm.rs diff --git a/runtime/paseo/src/weights/pallet_extrinsic_filter.rs b/parachain/runtime/paseo/src/weights/pallet_extrinsic_filter.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_extrinsic_filter.rs rename to parachain/runtime/paseo/src/weights/pallet_extrinsic_filter.rs diff --git a/runtime/paseo/src/weights/pallet_identity.rs b/parachain/runtime/paseo/src/weights/pallet_identity.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_identity.rs rename to parachain/runtime/paseo/src/weights/pallet_identity.rs diff --git a/runtime/paseo/src/weights/pallet_identity_management.rs b/parachain/runtime/paseo/src/weights/pallet_identity_management.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_identity_management.rs rename to parachain/runtime/paseo/src/weights/pallet_identity_management.rs diff --git a/runtime/paseo/src/weights/pallet_membership.rs b/parachain/runtime/paseo/src/weights/pallet_membership.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_membership.rs rename to parachain/runtime/paseo/src/weights/pallet_membership.rs diff --git a/runtime/paseo/src/weights/pallet_multisig.rs b/parachain/runtime/paseo/src/weights/pallet_multisig.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_multisig.rs rename to parachain/runtime/paseo/src/weights/pallet_multisig.rs diff --git a/runtime/paseo/src/weights/pallet_parachain_staking.rs b/parachain/runtime/paseo/src/weights/pallet_parachain_staking.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_parachain_staking.rs rename to parachain/runtime/paseo/src/weights/pallet_parachain_staking.rs diff --git a/runtime/paseo/src/weights/pallet_preimage.rs b/parachain/runtime/paseo/src/weights/pallet_preimage.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_preimage.rs rename to parachain/runtime/paseo/src/weights/pallet_preimage.rs diff --git a/runtime/paseo/src/weights/pallet_proxy.rs b/parachain/runtime/paseo/src/weights/pallet_proxy.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_proxy.rs rename to parachain/runtime/paseo/src/weights/pallet_proxy.rs diff --git a/runtime/paseo/src/weights/pallet_scheduler.rs b/parachain/runtime/paseo/src/weights/pallet_scheduler.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_scheduler.rs rename to parachain/runtime/paseo/src/weights/pallet_scheduler.rs diff --git a/runtime/paseo/src/weights/pallet_session.rs b/parachain/runtime/paseo/src/weights/pallet_session.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_session.rs rename to parachain/runtime/paseo/src/weights/pallet_session.rs diff --git a/runtime/paseo/src/weights/pallet_teebag.rs b/parachain/runtime/paseo/src/weights/pallet_teebag.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_teebag.rs rename to parachain/runtime/paseo/src/weights/pallet_teebag.rs diff --git a/runtime/paseo/src/weights/pallet_timestamp.rs b/parachain/runtime/paseo/src/weights/pallet_timestamp.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_timestamp.rs rename to parachain/runtime/paseo/src/weights/pallet_timestamp.rs diff --git a/runtime/paseo/src/weights/pallet_treasury.rs b/parachain/runtime/paseo/src/weights/pallet_treasury.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_treasury.rs rename to parachain/runtime/paseo/src/weights/pallet_treasury.rs diff --git a/runtime/paseo/src/weights/pallet_utility.rs b/parachain/runtime/paseo/src/weights/pallet_utility.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_utility.rs rename to parachain/runtime/paseo/src/weights/pallet_utility.rs diff --git a/runtime/paseo/src/weights/pallet_vc_management.rs b/parachain/runtime/paseo/src/weights/pallet_vc_management.rs similarity index 100% rename from runtime/paseo/src/weights/pallet_vc_management.rs rename to parachain/runtime/paseo/src/weights/pallet_vc_management.rs diff --git a/runtime/paseo/src/xcm_config.rs b/parachain/runtime/paseo/src/xcm_config.rs similarity index 100% rename from runtime/paseo/src/xcm_config.rs rename to parachain/runtime/paseo/src/xcm_config.rs diff --git a/runtime/rococo/Cargo.toml b/parachain/runtime/rococo/Cargo.toml similarity index 100% rename from runtime/rococo/Cargo.toml rename to parachain/runtime/rococo/Cargo.toml diff --git a/runtime/rococo/build.rs b/parachain/runtime/rococo/build.rs similarity index 100% rename from runtime/rococo/build.rs rename to parachain/runtime/rococo/build.rs diff --git a/runtime/rococo/src/asset_config.rs b/parachain/runtime/rococo/src/asset_config.rs similarity index 100% rename from runtime/rococo/src/asset_config.rs rename to parachain/runtime/rococo/src/asset_config.rs diff --git a/runtime/rococo/src/constants.rs b/parachain/runtime/rococo/src/constants.rs similarity index 100% rename from runtime/rococo/src/constants.rs rename to parachain/runtime/rococo/src/constants.rs diff --git a/runtime/rococo/src/lib.rs b/parachain/runtime/rococo/src/lib.rs similarity index 100% rename from runtime/rococo/src/lib.rs rename to parachain/runtime/rococo/src/lib.rs diff --git a/runtime/rococo/src/migration/P9100.rs b/parachain/runtime/rococo/src/migration/P9100.rs similarity index 100% rename from runtime/rococo/src/migration/P9100.rs rename to parachain/runtime/rococo/src/migration/P9100.rs diff --git a/runtime/rococo/src/migration/P9130.rs b/parachain/runtime/rococo/src/migration/P9130.rs similarity index 100% rename from runtime/rococo/src/migration/P9130.rs rename to parachain/runtime/rococo/src/migration/P9130.rs diff --git a/runtime/rococo/src/migration/P9190/balances_transaction_payment.rs b/parachain/runtime/rococo/src/migration/P9190/balances_transaction_payment.rs similarity index 100% rename from runtime/rococo/src/migration/P9190/balances_transaction_payment.rs rename to parachain/runtime/rococo/src/migration/P9190/balances_transaction_payment.rs diff --git a/runtime/rococo/src/migration/P9190/bridge_related.rs b/parachain/runtime/rococo/src/migration/P9190/bridge_related.rs similarity index 100% rename from runtime/rococo/src/migration/P9190/bridge_related.rs rename to parachain/runtime/rococo/src/migration/P9190/bridge_related.rs diff --git a/runtime/rococo/src/migration/P9190/mod.rs b/parachain/runtime/rococo/src/migration/P9190/mod.rs similarity index 100% rename from runtime/rococo/src/migration/P9190/mod.rs rename to parachain/runtime/rococo/src/migration/P9190/mod.rs diff --git a/runtime/rococo/src/migration/P9190/parachain_staking.rs b/parachain/runtime/rococo/src/migration/P9190/parachain_staking.rs similarity index 100% rename from runtime/rococo/src/migration/P9190/parachain_staking.rs rename to parachain/runtime/rococo/src/migration/P9190/parachain_staking.rs diff --git a/runtime/rococo/src/migration/P9191/fix_balances.rs b/parachain/runtime/rococo/src/migration/P9191/fix_balances.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/fix_balances.rs rename to parachain/runtime/rococo/src/migration/P9191/fix_balances.rs diff --git a/runtime/rococo/src/migration/P9191/migrate_bounty.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_bounty.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/migrate_bounty.rs rename to parachain/runtime/rococo/src/migration/P9191/migrate_bounty.rs diff --git a/runtime/rococo/src/migration/P9191/migrate_democracy.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_democracy.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/migrate_democracy.rs rename to parachain/runtime/rococo/src/migration/P9191/migrate_democracy.rs diff --git a/runtime/rococo/src/migration/P9191/migrate_identity.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_identity.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/migrate_identity.rs rename to parachain/runtime/rococo/src/migration/P9191/migrate_identity.rs diff --git a/runtime/rococo/src/migration/P9191/migrate_multisig.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_multisig.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/migrate_multisig.rs rename to parachain/runtime/rococo/src/migration/P9191/migrate_multisig.rs diff --git a/runtime/rococo/src/migration/P9191/migrate_preimage.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_preimage.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/migrate_preimage.rs rename to parachain/runtime/rococo/src/migration/P9191/migrate_preimage.rs diff --git a/runtime/rococo/src/migration/P9191/migrate_proxy.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_proxy.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/migrate_proxy.rs rename to parachain/runtime/rococo/src/migration/P9191/migrate_proxy.rs diff --git a/runtime/rococo/src/migration/P9191/migrate_treasury.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_treasury.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/migrate_treasury.rs rename to parachain/runtime/rococo/src/migration/P9191/migrate_treasury.rs diff --git a/runtime/rococo/src/migration/P9191/migrate_vesting.rs b/parachain/runtime/rococo/src/migration/P9191/migrate_vesting.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/migrate_vesting.rs rename to parachain/runtime/rococo/src/migration/P9191/migrate_vesting.rs diff --git a/runtime/rococo/src/migration/P9191/mod.rs b/parachain/runtime/rococo/src/migration/P9191/mod.rs similarity index 100% rename from runtime/rococo/src/migration/P9191/mod.rs rename to parachain/runtime/rococo/src/migration/P9191/mod.rs diff --git a/runtime/rococo/src/migration/P9192.rs b/parachain/runtime/rococo/src/migration/P9192.rs similarity index 100% rename from runtime/rococo/src/migration/P9192.rs rename to parachain/runtime/rococo/src/migration/P9192.rs diff --git a/runtime/rococo/src/migration/migration.md b/parachain/runtime/rococo/src/migration/migration.md similarity index 100% rename from runtime/rococo/src/migration/migration.md rename to parachain/runtime/rococo/src/migration/migration.md diff --git a/runtime/rococo/src/migration/mod.rs b/parachain/runtime/rococo/src/migration/mod.rs similarity index 100% rename from runtime/rococo/src/migration/mod.rs rename to parachain/runtime/rococo/src/migration/mod.rs diff --git a/runtime/rococo/src/precompiles.rs b/parachain/runtime/rococo/src/precompiles.rs similarity index 100% rename from runtime/rococo/src/precompiles.rs rename to parachain/runtime/rococo/src/precompiles.rs diff --git a/runtime/rococo/src/tests/base_call_filter.rs b/parachain/runtime/rococo/src/tests/base_call_filter.rs similarity index 100% rename from runtime/rococo/src/tests/base_call_filter.rs rename to parachain/runtime/rococo/src/tests/base_call_filter.rs diff --git a/runtime/rococo/src/tests/mod.rs b/parachain/runtime/rococo/src/tests/mod.rs similarity index 100% rename from runtime/rococo/src/tests/mod.rs rename to parachain/runtime/rococo/src/tests/mod.rs diff --git a/runtime/rococo/src/weights/cumulus_pallet_xcmp_queue.rs b/parachain/runtime/rococo/src/weights/cumulus_pallet_xcmp_queue.rs similarity index 100% rename from runtime/rococo/src/weights/cumulus_pallet_xcmp_queue.rs rename to parachain/runtime/rococo/src/weights/cumulus_pallet_xcmp_queue.rs diff --git a/runtime/rococo/src/weights/frame_system.rs b/parachain/runtime/rococo/src/weights/frame_system.rs similarity index 100% rename from runtime/rococo/src/weights/frame_system.rs rename to parachain/runtime/rococo/src/weights/frame_system.rs diff --git a/runtime/rococo/src/weights/mod.rs b/parachain/runtime/rococo/src/weights/mod.rs similarity index 100% rename from runtime/rococo/src/weights/mod.rs rename to parachain/runtime/rococo/src/weights/mod.rs diff --git a/runtime/rococo/src/weights/pallet_asset_manager.rs b/parachain/runtime/rococo/src/weights/pallet_asset_manager.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_asset_manager.rs rename to parachain/runtime/rococo/src/weights/pallet_asset_manager.rs diff --git a/runtime/rococo/src/weights/pallet_balances.rs b/parachain/runtime/rococo/src/weights/pallet_balances.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_balances.rs rename to parachain/runtime/rococo/src/weights/pallet_balances.rs diff --git a/runtime/rococo/src/weights/pallet_bridge_transfer.rs b/parachain/runtime/rococo/src/weights/pallet_bridge_transfer.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_bridge_transfer.rs rename to parachain/runtime/rococo/src/weights/pallet_bridge_transfer.rs diff --git a/runtime/rococo/src/weights/pallet_chain_bridge.rs b/parachain/runtime/rococo/src/weights/pallet_chain_bridge.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_chain_bridge.rs rename to parachain/runtime/rococo/src/weights/pallet_chain_bridge.rs diff --git a/runtime/rococo/src/weights/pallet_collective.rs b/parachain/runtime/rococo/src/weights/pallet_collective.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_collective.rs rename to parachain/runtime/rococo/src/weights/pallet_collective.rs diff --git a/runtime/rococo/src/weights/pallet_democracy.rs b/parachain/runtime/rococo/src/weights/pallet_democracy.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_democracy.rs rename to parachain/runtime/rococo/src/weights/pallet_democracy.rs diff --git a/runtime/rococo/src/weights/pallet_evm.rs b/parachain/runtime/rococo/src/weights/pallet_evm.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_evm.rs rename to parachain/runtime/rococo/src/weights/pallet_evm.rs diff --git a/runtime/rococo/src/weights/pallet_extrinsic_filter.rs b/parachain/runtime/rococo/src/weights/pallet_extrinsic_filter.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_extrinsic_filter.rs rename to parachain/runtime/rococo/src/weights/pallet_extrinsic_filter.rs diff --git a/runtime/rococo/src/weights/pallet_identity.rs b/parachain/runtime/rococo/src/weights/pallet_identity.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_identity.rs rename to parachain/runtime/rococo/src/weights/pallet_identity.rs diff --git a/runtime/rococo/src/weights/pallet_identity_management.rs b/parachain/runtime/rococo/src/weights/pallet_identity_management.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_identity_management.rs rename to parachain/runtime/rococo/src/weights/pallet_identity_management.rs diff --git a/runtime/rococo/src/weights/pallet_membership.rs b/parachain/runtime/rococo/src/weights/pallet_membership.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_membership.rs rename to parachain/runtime/rococo/src/weights/pallet_membership.rs diff --git a/runtime/rococo/src/weights/pallet_multisig.rs b/parachain/runtime/rococo/src/weights/pallet_multisig.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_multisig.rs rename to parachain/runtime/rococo/src/weights/pallet_multisig.rs diff --git a/runtime/rococo/src/weights/pallet_parachain_staking.rs b/parachain/runtime/rococo/src/weights/pallet_parachain_staking.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_parachain_staking.rs rename to parachain/runtime/rococo/src/weights/pallet_parachain_staking.rs diff --git a/runtime/rococo/src/weights/pallet_preimage.rs b/parachain/runtime/rococo/src/weights/pallet_preimage.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_preimage.rs rename to parachain/runtime/rococo/src/weights/pallet_preimage.rs diff --git a/runtime/rococo/src/weights/pallet_proxy.rs b/parachain/runtime/rococo/src/weights/pallet_proxy.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_proxy.rs rename to parachain/runtime/rococo/src/weights/pallet_proxy.rs diff --git a/runtime/rococo/src/weights/pallet_scheduler.rs b/parachain/runtime/rococo/src/weights/pallet_scheduler.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_scheduler.rs rename to parachain/runtime/rococo/src/weights/pallet_scheduler.rs diff --git a/runtime/rococo/src/weights/pallet_session.rs b/parachain/runtime/rococo/src/weights/pallet_session.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_session.rs rename to parachain/runtime/rococo/src/weights/pallet_session.rs diff --git a/runtime/rococo/src/weights/pallet_teebag.rs b/parachain/runtime/rococo/src/weights/pallet_teebag.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_teebag.rs rename to parachain/runtime/rococo/src/weights/pallet_teebag.rs diff --git a/runtime/rococo/src/weights/pallet_timestamp.rs b/parachain/runtime/rococo/src/weights/pallet_timestamp.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_timestamp.rs rename to parachain/runtime/rococo/src/weights/pallet_timestamp.rs diff --git a/runtime/rococo/src/weights/pallet_treasury.rs b/parachain/runtime/rococo/src/weights/pallet_treasury.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_treasury.rs rename to parachain/runtime/rococo/src/weights/pallet_treasury.rs diff --git a/runtime/rococo/src/weights/pallet_utility.rs b/parachain/runtime/rococo/src/weights/pallet_utility.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_utility.rs rename to parachain/runtime/rococo/src/weights/pallet_utility.rs diff --git a/runtime/rococo/src/weights/pallet_vc_management.rs b/parachain/runtime/rococo/src/weights/pallet_vc_management.rs similarity index 100% rename from runtime/rococo/src/weights/pallet_vc_management.rs rename to parachain/runtime/rococo/src/weights/pallet_vc_management.rs diff --git a/runtime/rococo/src/xcm_config.rs b/parachain/runtime/rococo/src/xcm_config.rs similarity index 100% rename from runtime/rococo/src/xcm_config.rs rename to parachain/runtime/rococo/src/xcm_config.rs diff --git a/rust-toolchain.toml b/parachain/rust-toolchain.toml similarity index 100% rename from rust-toolchain.toml rename to parachain/rust-toolchain.toml diff --git a/rustfmt.toml b/parachain/rustfmt.toml similarity index 100% rename from rustfmt.toml rename to parachain/rustfmt.toml diff --git a/scripts/benchmark-weight-local.sh b/parachain/scripts/benchmark-weight-local.sh similarity index 98% rename from scripts/benchmark-weight-local.sh rename to parachain/scripts/benchmark-weight-local.sh index 8e9c3ffba8..b0ac6e4915 100755 --- a/scripts/benchmark-weight-local.sh +++ b/parachain/scripts/benchmark-weight-local.sh @@ -16,7 +16,7 @@ function usage() { [ $# -ne 3 ] && (usage; exit 1) ROOTDIR=$(git rev-parse --show-toplevel) -cd "$ROOTDIR" +cd "$ROOTDIR/parachain" PALLET=${2//-/_} diff --git a/scripts/benchmark-weight-remote.sh b/parachain/scripts/benchmark-weight-remote.sh similarity index 100% rename from scripts/benchmark-weight-remote.sh rename to parachain/scripts/benchmark-weight-remote.sh diff --git a/scripts/build-bridge.sh b/parachain/scripts/build-bridge.sh similarity index 60% rename from scripts/build-bridge.sh rename to parachain/scripts/build-bridge.sh index c359e91764..268a5a8934 100755 --- a/scripts/build-bridge.sh +++ b/parachain/scripts/build-bridge.sh @@ -5,4 +5,4 @@ ROOTDIR=$(git rev-parse --show-toplevel) # Build the image echo "Building litentry/chainbridge:latest docker image ..." -docker build --no-cache -f ${ROOTDIR}/docker/bridge.dockerfile -t litentry/chainbridge:latest . \ No newline at end of file +docker build --no-cache -f ${ROOTDIR}/parachain/docker/bridge.dockerfile -t litentry/chainbridge:latest . \ No newline at end of file diff --git a/scripts/build-docker.sh b/parachain/scripts/build-docker.sh similarity index 94% rename from scripts/build-docker.sh rename to parachain/scripts/build-docker.sh index 30bc0f6bf4..50c0c48ec6 100755 --- a/scripts/build-docker.sh +++ b/parachain/scripts/build-docker.sh @@ -49,7 +49,7 @@ PROXY="${HTTP_PROXY//localhost/host.docker.internal}" # Build the image echo "------------------------------------------------------------" echo "Building ${GITUSER}/${GITREPO}:${TAG} docker image ..." -docker build ${NOCACHE_FLAG} --pull -f ./docker/Dockerfile \ +docker build ${NOCACHE_FLAG} --pull -f ./parachain/docker/Dockerfile \ --build-arg PROFILE="$PROFILE" \ --build-arg BUILD_ARGS="$ARGS" \ --build-arg HTTP_PROXY="$PROXY" \ @@ -76,7 +76,7 @@ PROXY="${HTTP_PROXY//localhost/host.docker.internal}" # Build the image echo "------------------------------------------------------------" echo "Building ${GITUSER}/${GITREPO}:${TAG} docker image ..." -docker build ${NOCACHE_FLAG} --pull -f ./docker/Dockerfile \ +docker build ${NOCACHE_FLAG} --pull -f ./parachain/docker/Dockerfile \ --build-arg PROFILE="$PROFILE" \ --build-arg BUILD_ARGS="$ARGS" \ --build-arg HTTP_PROXY="$PROXY" \ diff --git a/scripts/clean-network.sh b/parachain/scripts/clean-network.sh similarity index 100% rename from scripts/clean-network.sh rename to parachain/scripts/clean-network.sh diff --git a/scripts/fork-parachain-and-launch.sh b/parachain/scripts/fork-parachain-and-launch.sh similarity index 96% rename from scripts/fork-parachain-and-launch.sh rename to parachain/scripts/fork-parachain-and-launch.sh index 367a117a54..a8c9f7c5cb 100755 --- a/scripts/fork-parachain-and-launch.sh +++ b/parachain/scripts/fork-parachain-and-launch.sh @@ -93,9 +93,9 @@ if [ ! -f data/fork.json ]; then exit 2 fi -cp -f data/fork.json "$ROOTDIR/docker/" +cp -f data/fork.json "$ROOTDIR/parachain/docker/" -cd "$ROOTDIR" +cd "$ROOTDIR/parachain" sed -i.bak "s;$FORK_CHAIN;fork.json;" "docker/$ORIG_CHAIN-parachain-launch-config.yml" # start the network diff --git a/scripts/generate-prod-chain-spec.sh b/parachain/scripts/generate-prod-chain-spec.sh similarity index 95% rename from scripts/generate-prod-chain-spec.sh rename to parachain/scripts/generate-prod-chain-spec.sh index f2fcacb853..424349c25d 100755 --- a/scripts/generate-prod-chain-spec.sh +++ b/parachain/scripts/generate-prod-chain-spec.sh @@ -8,7 +8,7 @@ function usage() { [ $# -lt 1 ] && (usage; exit 1) ROOTDIR=$(git rev-parse --show-toplevel) -cd "$ROOTDIR" +cd "$ROOTDIR/parachain" CHAIN=$1 TAG=${2:-latest} diff --git a/scripts/generate-release-notes.sh b/parachain/scripts/generate-release-notes.sh similarity index 89% rename from scripts/generate-release-notes.sh rename to parachain/scripts/generate-release-notes.sh index 2d79573f75..284201416b 100755 --- a/scripts/generate-release-notes.sh +++ b/parachain/scripts/generate-release-notes.sh @@ -41,6 +41,8 @@ is_bitacross_worker_release() { [ "${type:3:1}" = "1" ] } +cd "$ROOTDIR/parachain" + if is_client_release; then # base image used to build the node binary NODE_BUILD_BASE_IMAGE=$(grep FROM docker/Dockerfile | head -n1 | sed 's/^FROM //;s/ as.*//') @@ -174,12 +176,14 @@ sha1sum of genesis wasm : $GENESIS_WASM_HASH EOF fi +cd "$ROOTDIR" + if is_identity_worker_release; then - WORKER_VERSION=$(grep version tee-worker/service/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//") - WORKER_BIN=$(grep name tee-worker/service/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//") - WORKER_RUSTC_VERSION=$(cd tee-worker && rustc --version) - UPSTREAM_COMMIT=$(cat tee-worker/upstream_commit) - RUNTIME_VERSION=$(grep spec_version tee-worker/app-libs/sgx-runtime/src/lib.rs | sed 's/.*version: //;s/,//') + WORKER_VERSION=$(grep version tee-worker/identity/service/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//") + WORKER_BIN=$(grep name tee-worker/identity/service/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//") + WORKER_RUSTC_VERSION=$(cd tee-worker/identity && rustc --version) + UPSTREAM_COMMIT=$(cat tee-worker/identity/upstream_commit) + RUNTIME_VERSION=$(grep spec_version tee-worker/identity/app-libs/sgx-runtime/src/lib.rs | sed 's/.*version: //;s/,//') ENCLAVE_SHASUM=$(docker run --entrypoint sha1sum litentry/identity-worker:$IDENTITY_WORKER_DOCKER_TAG /origin/enclave.signed.so | awk '{print $1}') MRENCLAVE=$(docker run --entrypoint cat litentry/identity-worker:$IDENTITY_WORKER_DOCKER_TAG /origin/mrenclave.txt) cat << EOF >> "$1" @@ -201,11 +205,11 @@ EOF fi if is_bitacross_worker_release; then - WORKER_VERSION=$(grep version bitacross-worker/service/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//") - WORKER_BIN=$(grep name bitacross-worker/service/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//") - WORKER_RUSTC_VERSION=$(cd bitacross-worker && rustc --version) - UPSTREAM_COMMIT=$(cat bitacross-worker/upstream_commit) - RUNTIME_VERSION=$(grep spec_version bitacross-worker/app-libs/sgx-runtime/src/lib.rs | sed 's/.*version: //;s/,//') + WORKER_VERSION=$(grep version tee-worker/bitacross/service/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//") + WORKER_BIN=$(grep name tee-worker/bitacross/service/Cargo.toml | head -n1 | sed "s/'$//;s/.*'//") + WORKER_RUSTC_VERSION=$(cd tee-worker/bitacross && rustc --version) + UPSTREAM_COMMIT=$(cat tee-worker/bitacross/upstream_commit) + RUNTIME_VERSION=$(grep spec_version tee-worker/bitacross/app-libs/sgx-runtime/src/lib.rs | sed 's/.*version: //;s/,//') ENCLAVE_SHASUM=$(docker run --entrypoint sha1sum litentry/bitacross-worker:$BITACROSS_WORKER_DOCKER_TAG /origin/enclave.signed.so | awk '{print $1}') MRENCLAVE=$(docker run --entrypoint cat litentry/bitacross-worker:$BITACROSS_WORKER_DOCKER_TAG /origin/mrenclave.txt) cat << EOF >> "$1" diff --git a/scripts/generate-upstream-patch.sh b/parachain/scripts/generate-upstream-patch.sh similarity index 100% rename from scripts/generate-upstream-patch.sh rename to parachain/scripts/generate-upstream-patch.sh diff --git a/scripts/geth/genesis.json b/parachain/scripts/geth/genesis.json similarity index 100% rename from scripts/geth/genesis.json rename to parachain/scripts/geth/genesis.json diff --git a/scripts/geth/keystore/alice.json b/parachain/scripts/geth/keystore/alice.json similarity index 100% rename from scripts/geth/keystore/alice.json rename to parachain/scripts/geth/keystore/alice.json diff --git a/scripts/geth/keystore/bob.json b/parachain/scripts/geth/keystore/bob.json similarity index 100% rename from scripts/geth/keystore/bob.json rename to parachain/scripts/geth/keystore/bob.json diff --git a/scripts/geth/keystore/charlie.json b/parachain/scripts/geth/keystore/charlie.json similarity index 100% rename from scripts/geth/keystore/charlie.json rename to parachain/scripts/geth/keystore/charlie.json diff --git a/scripts/geth/keystore/dave.json b/parachain/scripts/geth/keystore/dave.json similarity index 100% rename from scripts/geth/keystore/dave.json rename to parachain/scripts/geth/keystore/dave.json diff --git a/scripts/geth/keystore/eve.json b/parachain/scripts/geth/keystore/eve.json similarity index 100% rename from scripts/geth/keystore/eve.json rename to parachain/scripts/geth/keystore/eve.json diff --git a/scripts/geth/password.txt b/parachain/scripts/geth/password.txt similarity index 100% rename from scripts/geth/password.txt rename to parachain/scripts/geth/password.txt diff --git a/scripts/geth/run_geth.sh b/parachain/scripts/geth/run_geth.sh similarity index 100% rename from scripts/geth/run_geth.sh rename to parachain/scripts/geth/run_geth.sh diff --git a/scripts/launch-bridge.sh b/parachain/scripts/launch-bridge.sh similarity index 89% rename from scripts/launch-bridge.sh rename to parachain/scripts/launch-bridge.sh index 6fc076d013..99f3e8bded 100755 --- a/scripts/launch-bridge.sh +++ b/parachain/scripts/launch-bridge.sh @@ -7,7 +7,7 @@ ROOTDIR=$(git rev-parse --show-toplevel) if [[ "$(docker image inspect litentry/chainbridge:latest 2>/dev/null)" == "[]" ]]; then echo "litentry/chainbridge:latest image not found..." - ${ROOTDIR}/scripts/build-bridge.sh + ${ROOTDIR}/parachain/scripts/build-bridge.sh fi echo "------------------------------------------------------------" @@ -28,6 +28,6 @@ docker rm -f geth &>/dev/null # # TODO - make it work with latest image docker run -d --rm --entrypoint 'sh' --name 'geth' \ - -u "$(id -u)":"$(id -g)" -v ${ROOTDIR}/scripts/geth:/data/ -p 8546:8546 -p 8545:8545 \ + -u "$(id -u)":"$(id -g)" -v ${ROOTDIR}/parachain/scripts/geth:/data/ -p 8546:8546 -p 8545:8545 \ ethereum/client-go:v1.13.14 /data/run_geth.sh docker /data echo "runing geth...(container name: geth)" diff --git a/scripts/launch-network.sh b/parachain/scripts/launch-network.sh similarity index 90% rename from scripts/launch-network.sh rename to parachain/scripts/launch-network.sh index e9a3163e1c..c36a46ea8d 100755 --- a/scripts/launch-network.sh +++ b/parachain/scripts/launch-network.sh @@ -24,10 +24,10 @@ LITENTRY_PARACHAIN_DIR=${LITENTRY_PARACHAIN_DIR:-"/tmp/parachain_dev"} [ -d "$LITENTRY_PARACHAIN_DIR" ] || mkdir -p "$LITENTRY_PARACHAIN_DIR" ROOTDIR=$(git rev-parse --show-toplevel) -PARACHAIN_BIN="$ROOTDIR/target/release/litentry-collator" - +PARACHAIN_BIN="$ROOTDIR/parachain/target/release/litentry-collator" cd "$ROOTDIR" -export PARA_ID=$(grep -i "${CHAIN}_para_id" primitives/core/src/lib.rs | sed 's/.* = //;s/\;.*//') + +export PARA_ID=$(grep -i "${CHAIN}_para_id" common/primitives/core/src/lib.rs | sed 's/.* = //;s/\;.*//') export PARA_CHAIN_SPEC=${CHAIN}-dev export COLLATOR_WS_PORT=${CollatorWSPort:-9944} @@ -47,7 +47,7 @@ ZOMBIENET_BIN=zombienet-${os}-${arch} cd "$LITENTRY_PARACHAIN_DIR" export PATH="$LITENTRY_PARACHAIN_DIR:$PATH" -cp "$ROOTDIR/zombienet/config.toml" . +cp "$ROOTDIR/parachain/zombienet/config.toml" . if ! $ZOMBIENET_BIN version &> /dev/null; then echo "downloading $ZOMBIENET_BIN ..." @@ -82,7 +82,7 @@ print_divider echo "launching zombienet network (in background), dir = $ZOMBIENET_DIR ..." $ZOMBIENET_BIN -d $ZOMBIENET_DIR -l silent spawn config.toml & -cd "$ROOTDIR/ts-tests" +cd "$ROOTDIR/parachain/ts-tests" if [ -z "$NODE_ENV" ]; then echo "NODE_ENV=ci" > .env diff --git a/scripts/launch-standalone.sh b/parachain/scripts/launch-standalone.sh similarity index 92% rename from scripts/launch-standalone.sh rename to parachain/scripts/launch-standalone.sh index b17b1709f4..2aea293a7b 100755 --- a/scripts/launch-standalone.sh +++ b/parachain/scripts/launch-standalone.sh @@ -8,7 +8,7 @@ LITENTRY_PARACHAIN_DIR=${LITENTRY_PARACHAIN_DIR:-"/tmp/parachain_dev"} [ -d "$LITENTRY_PARACHAIN_DIR" ] || mkdir -p "$LITENTRY_PARACHAIN_DIR" ROOTDIR=$(git rev-parse --show-toplevel) -PARACHAIN_BIN="$ROOTDIR/target/release/litentry-collator" +PARACHAIN_BIN="$ROOTDIR/parachain/target/release/litentry-collator" cd "$ROOTDIR" @@ -37,7 +37,7 @@ print_divider # Check parachain status echo "wait for parachain to produce block #1..." -cd "$ROOTDIR/ts-tests" +cd "$ROOTDIR/parachain/ts-tests" if [[ -z "${NODE_ENV}" ]]; then echo "NODE_ENV=ci" > .env diff --git a/scripts/pre-commit.sh b/parachain/scripts/pre-commit.sh similarity index 68% rename from scripts/pre-commit.sh rename to parachain/scripts/pre-commit.sh index e822feacff..b606e535d4 100755 --- a/scripts/pre-commit.sh +++ b/parachain/scripts/pre-commit.sh @@ -29,15 +29,15 @@ function parachain_check() { } function clean_up() { - cd "$root_dir" + cd "$root_dir/parachain" cargo clean - cd "$root_dir/tee-worker" + cd "$root_dir/tee-worker/identity" cargo clean - cd "$root_dir/tee-worker/enclave-runtime" + cd "$root_dir/tee-worker/identity/enclave-runtime" cargo clean - cd "$root_dir/bitacross-worker" + cd "$root_dir/tee-worker/bitacross" cargo clean - cd "$root_dir/bitacross-worker/enclave-runtime" + cd "$root_dir/tee-worker/bitacross/enclave-runtime" cargo clean } @@ -51,40 +51,40 @@ cd "$root_dir" make fmt echo "[Step 1], Parachain clippy" -cd "$root_dir" && parachain_check +cd "$root_dir/parachain" && parachain_check -echo "[Step 2], tee-worker clippy" -cd "$root_dir/tee-worker" && worker_clippy +echo "[Step 2], identity-worker clippy" +cd "$root_dir/tee-worker/identity" && worker_clippy -echo "[Step 3], tee-worker enclave clippy" -cd "$root_dir/tee-worker/enclave-runtime" && worker_clippy +echo "[Step 3], identity-worker enclave clippy" +cd "$root_dir/tee-worker/identity/enclave-runtime" && worker_clippy -echo "[Step 4], tee-worker cargo test" -cd "$root_dir/tee-worker" +echo "[Step 4], identity-worker cargo test" +cd "$root_dir/tee-worker/identity" RUST_LOG=info SKIP_WASM_BUILD=1 cargo test --release --features development -- --show-output -echo "[Step 5], tee-worker service test" +echo "[Step 5], identity-worker service test" clean_up -cd "$root_dir/tee-worker" +cd "$root_dir/tee-worker/identity" SGX_MODE=SW SKIP_WASM_BUILD=1 make -cd "$root_dir/tee-worker/bin" +cd "$root_dir/tee-worker/identity/bin" ./litentry-worker test --all echo "[Step 6], bitacross-worker clippy" -cd "$root_dir/bitacross-worker" && bitacross_clippy +cd "$root_dir/tee-worker/bitacross" && bitacross_clippy echo "[Step 7], bitacross-worker enclave clippy" -cd "$root_dir/bitacross-worker/enclave-runtime" && bitacross_clippy +cd "$root_dir/tee-worker/bitacross/enclave-runtime" && bitacross_clippy echo "[Step 8], bitacross-worker cargo test" -cd "$root_dir/bitacross-worker" +cd "$root_dir/tee-worker/bitacross" RUST_LOG=info SKIP_WASM_BUILD=1 cargo test --release -- --show-output echo "[Step 9], bitacross-worker service test" clean_up -cd "$root_dir/bitacross-worker" +cd "$root_dir/tee-worker/bitacross" SGX_MODE=SW SKIP_WASM_BUILD=1 make -cd "$root_dir/bitacross-worker/bin" +cd "$root_dir/tee-worker/bitacross/bin" ./bitacross-worker test --all end=$(date +%s) diff --git a/scripts/run-ts-test.sh b/parachain/scripts/run-ts-test.sh similarity index 92% rename from scripts/run-ts-test.sh rename to parachain/scripts/run-ts-test.sh index 1daaaffc3d..7efc5d872c 100755 --- a/scripts/run-ts-test.sh +++ b/parachain/scripts/run-ts-test.sh @@ -19,7 +19,7 @@ if [ "$3" = "evm" ]; then fi ROOTDIR=$(git rev-parse --show-toplevel) -cd "$ROOTDIR/ts-tests" +cd "$ROOTDIR/parachain/ts-tests" LITENTRY_PARACHAIN_DIR=${LITENTRY_PARACHAIN_DIR:-"/tmp/parachain_dev"} [ -d "$LITENTRY_PARACHAIN_DIR" ] || mkdir -p "$LITENTRY_PARACHAIN_DIR" @@ -29,7 +29,7 @@ pnpm install pnpm run test-filter 2>&1 | tee -a "$LITENTRY_PARACHAIN_DIR/parachain_ci_test.log" if $bridge; then - $ROOTDIR/scripts/launch-bridge.sh + $ROOTDIR/parachain/scripts/launch-bridge.sh pnpm run test-bridge 2>&1 | tee -a "$LITENTRY_PARACHAIN_DIR/parachain_ci_test.log" fi diff --git a/scripts/runtime-upgrade.sh b/parachain/scripts/runtime-upgrade.sh similarity index 98% rename from scripts/runtime-upgrade.sh rename to parachain/scripts/runtime-upgrade.sh index 5811d4c97e..b2481005fe 100755 --- a/scripts/runtime-upgrade.sh +++ b/parachain/scripts/runtime-upgrade.sh @@ -68,7 +68,7 @@ print_divider # 3. do runtime upgrade and verify echo "Do runtime upgrade and verify ..." -cd "$ROOTDIR/ts-tests" +cd "$ROOTDIR/parachain/ts-tests" echo "NODE_ENV=ci" > .env pnpm install && pnpm run test-runtime-upgrade 2>&1 diff --git a/scripts/ts-utils/.gitignore b/parachain/scripts/ts-utils/.gitignore similarity index 100% rename from scripts/ts-utils/.gitignore rename to parachain/scripts/ts-utils/.gitignore diff --git a/scripts/ts-utils/.prettierrc b/parachain/scripts/ts-utils/.prettierrc similarity index 100% rename from scripts/ts-utils/.prettierrc rename to parachain/scripts/ts-utils/.prettierrc diff --git a/scripts/ts-utils/batch-transfer.ts b/parachain/scripts/ts-utils/batch-transfer.ts similarity index 100% rename from scripts/ts-utils/batch-transfer.ts rename to parachain/scripts/ts-utils/batch-transfer.ts diff --git a/scripts/ts-utils/initApis.ts b/parachain/scripts/ts-utils/initApis.ts similarity index 100% rename from scripts/ts-utils/initApis.ts rename to parachain/scripts/ts-utils/initApis.ts diff --git a/scripts/ts-utils/move-vcregistry-snapshot.ts b/parachain/scripts/ts-utils/move-vcregistry-snapshot.ts similarity index 100% rename from scripts/ts-utils/move-vcregistry-snapshot.ts rename to parachain/scripts/ts-utils/move-vcregistry-snapshot.ts diff --git a/scripts/ts-utils/pnpm-lock.yaml b/parachain/scripts/ts-utils/pnpm-lock.yaml similarity index 100% rename from scripts/ts-utils/pnpm-lock.yaml rename to parachain/scripts/ts-utils/pnpm-lock.yaml diff --git a/scripts/ts-utils/setup-enclave.ts b/parachain/scripts/ts-utils/setup-enclave.ts similarity index 100% rename from scripts/ts-utils/setup-enclave.ts rename to parachain/scripts/ts-utils/setup-enclave.ts diff --git a/scripts/ts-utils/transfer-to-whitelist.ts b/parachain/scripts/ts-utils/transfer-to-whitelist.ts similarity index 100% rename from scripts/ts-utils/transfer-to-whitelist.ts rename to parachain/scripts/ts-utils/transfer-to-whitelist.ts diff --git a/scripts/ts-utils/transfer.ts b/parachain/scripts/ts-utils/transfer.ts similarity index 100% rename from scripts/ts-utils/transfer.ts rename to parachain/scripts/ts-utils/transfer.ts diff --git a/scripts/ts-utils/tsconfig.json b/parachain/scripts/ts-utils/tsconfig.json similarity index 100% rename from scripts/ts-utils/tsconfig.json rename to parachain/scripts/ts-utils/tsconfig.json diff --git a/templates/benchmark/README.md b/parachain/templates/benchmark/README.md similarity index 100% rename from templates/benchmark/README.md rename to parachain/templates/benchmark/README.md diff --git a/templates/benchmark/pallet-weight-template.hbs b/parachain/templates/benchmark/pallet-weight-template.hbs similarity index 100% rename from templates/benchmark/pallet-weight-template.hbs rename to parachain/templates/benchmark/pallet-weight-template.hbs diff --git a/ts-tests/.env.example b/parachain/ts-tests/.env.example similarity index 100% rename from ts-tests/.env.example rename to parachain/ts-tests/.env.example diff --git a/ts-tests/.gitignore b/parachain/ts-tests/.gitignore similarity index 100% rename from ts-tests/.gitignore rename to parachain/ts-tests/.gitignore diff --git a/ts-tests/.prettierrc b/parachain/ts-tests/.prettierrc similarity index 100% rename from ts-tests/.prettierrc rename to parachain/ts-tests/.prettierrc diff --git a/ts-tests/README.md b/parachain/ts-tests/README.md similarity index 100% rename from ts-tests/README.md rename to parachain/ts-tests/README.md diff --git a/ts-tests/common/abi/bridge/Bridge.json b/parachain/ts-tests/common/abi/bridge/Bridge.json similarity index 100% rename from ts-tests/common/abi/bridge/Bridge.json rename to parachain/ts-tests/common/abi/bridge/Bridge.json diff --git a/ts-tests/common/abi/bridge/ERC20Handler.json b/parachain/ts-tests/common/abi/bridge/ERC20Handler.json similarity index 100% rename from ts-tests/common/abi/bridge/ERC20Handler.json rename to parachain/ts-tests/common/abi/bridge/ERC20Handler.json diff --git a/ts-tests/common/abi/bridge/ERC721Handler.json b/parachain/ts-tests/common/abi/bridge/ERC721Handler.json similarity index 100% rename from ts-tests/common/abi/bridge/ERC721Handler.json rename to parachain/ts-tests/common/abi/bridge/ERC721Handler.json diff --git a/ts-tests/common/abi/bridge/GenericHandler.json b/parachain/ts-tests/common/abi/bridge/GenericHandler.json similarity index 100% rename from ts-tests/common/abi/bridge/GenericHandler.json rename to parachain/ts-tests/common/abi/bridge/GenericHandler.json diff --git a/ts-tests/common/abi/bridge/MintableERC20.json b/parachain/ts-tests/common/abi/bridge/MintableERC20.json similarity index 100% rename from ts-tests/common/abi/bridge/MintableERC20.json rename to parachain/ts-tests/common/abi/bridge/MintableERC20.json diff --git a/ts-tests/common/abi/bridge/README.md b/parachain/ts-tests/common/abi/bridge/README.md similarity index 100% rename from ts-tests/common/abi/bridge/README.md rename to parachain/ts-tests/common/abi/bridge/README.md diff --git a/ts-tests/common/abi/precompile/Bridge.json b/parachain/ts-tests/common/abi/precompile/Bridge.json similarity index 100% rename from ts-tests/common/abi/precompile/Bridge.json rename to parachain/ts-tests/common/abi/precompile/Bridge.json diff --git a/ts-tests/common/abi/precompile/README.md b/parachain/ts-tests/common/abi/precompile/README.md similarity index 100% rename from ts-tests/common/abi/precompile/README.md rename to parachain/ts-tests/common/abi/precompile/README.md diff --git a/ts-tests/common/abi/precompile/Staking.json b/parachain/ts-tests/common/abi/precompile/Staking.json similarity index 100% rename from ts-tests/common/abi/precompile/Staking.json rename to parachain/ts-tests/common/abi/precompile/Staking.json diff --git a/ts-tests/common/keys/0x148FfB2074A9e59eD58142822b3eB3fcBffb0cd7.key b/parachain/ts-tests/common/keys/0x148FfB2074A9e59eD58142822b3eB3fcBffb0cd7.key similarity index 100% rename from ts-tests/common/keys/0x148FfB2074A9e59eD58142822b3eB3fcBffb0cd7.key rename to parachain/ts-tests/common/keys/0x148FfB2074A9e59eD58142822b3eB3fcBffb0cd7.key diff --git a/ts-tests/common/keys/0x24962717f8fA5BA3b931bACaF9ac03924EB475a0.key b/parachain/ts-tests/common/keys/0x24962717f8fA5BA3b931bACaF9ac03924EB475a0.key similarity index 100% rename from ts-tests/common/keys/0x24962717f8fA5BA3b931bACaF9ac03924EB475a0.key rename to parachain/ts-tests/common/keys/0x24962717f8fA5BA3b931bACaF9ac03924EB475a0.key diff --git a/ts-tests/common/keys/0x4CEEf6139f00F9F4535Ad19640Ff7A0137708485.key b/parachain/ts-tests/common/keys/0x4CEEf6139f00F9F4535Ad19640Ff7A0137708485.key similarity index 100% rename from ts-tests/common/keys/0x4CEEf6139f00F9F4535Ad19640Ff7A0137708485.key rename to parachain/ts-tests/common/keys/0x4CEEf6139f00F9F4535Ad19640Ff7A0137708485.key diff --git a/ts-tests/common/keys/0x8e0a907331554AF72563Bd8D43051C2E64Be5d35.key b/parachain/ts-tests/common/keys/0x8e0a907331554AF72563Bd8D43051C2E64Be5d35.key similarity index 100% rename from ts-tests/common/keys/0x8e0a907331554AF72563Bd8D43051C2E64Be5d35.key rename to parachain/ts-tests/common/keys/0x8e0a907331554AF72563Bd8D43051C2E64Be5d35.key diff --git a/ts-tests/common/keys/0xff93B45308FD417dF303D6515aB04D9e89a750Ca.key b/parachain/ts-tests/common/keys/0xff93B45308FD417dF303D6515aB04D9e89a750Ca.key similarity index 100% rename from ts-tests/common/keys/0xff93B45308FD417dF303D6515aB04D9e89a750Ca.key rename to parachain/ts-tests/common/keys/0xff93B45308FD417dF303D6515aB04D9e89a750Ca.key diff --git a/ts-tests/common/keys/5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy.key b/parachain/ts-tests/common/keys/5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy.key similarity index 100% rename from ts-tests/common/keys/5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy.key rename to parachain/ts-tests/common/keys/5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy.key diff --git a/ts-tests/common/keys/5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty.key b/parachain/ts-tests/common/keys/5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty.key similarity index 100% rename from ts-tests/common/keys/5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty.key rename to parachain/ts-tests/common/keys/5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty.key diff --git a/ts-tests/common/keys/5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y.key b/parachain/ts-tests/common/keys/5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y.key similarity index 100% rename from ts-tests/common/keys/5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y.key rename to parachain/ts-tests/common/keys/5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y.key diff --git a/ts-tests/common/keys/5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY.key b/parachain/ts-tests/common/keys/5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY.key similarity index 100% rename from ts-tests/common/keys/5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY.key rename to parachain/ts-tests/common/keys/5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY.key diff --git a/ts-tests/common/keys/5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw.key b/parachain/ts-tests/common/keys/5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw.key similarity index 100% rename from ts-tests/common/keys/5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw.key rename to parachain/ts-tests/common/keys/5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw.key diff --git a/ts-tests/common/setup/register-parathread.ts b/parachain/ts-tests/common/setup/register-parathread.ts similarity index 100% rename from ts-tests/common/setup/register-parathread.ts rename to parachain/ts-tests/common/setup/register-parathread.ts diff --git a/ts-tests/common/setup/setup-bridge.ts b/parachain/ts-tests/common/setup/setup-bridge.ts similarity index 100% rename from ts-tests/common/setup/setup-bridge.ts rename to parachain/ts-tests/common/setup/setup-bridge.ts diff --git a/ts-tests/common/setup/setup-enclave.ts b/parachain/ts-tests/common/setup/setup-enclave.ts similarity index 100% rename from ts-tests/common/setup/setup-enclave.ts rename to parachain/ts-tests/common/setup/setup-enclave.ts diff --git a/ts-tests/common/setup/teebag-set-dev-mode.ts b/parachain/ts-tests/common/setup/teebag-set-dev-mode.ts similarity index 100% rename from ts-tests/common/setup/teebag-set-dev-mode.ts rename to parachain/ts-tests/common/setup/teebag-set-dev-mode.ts diff --git a/ts-tests/common/setup/upgrade-parathread.ts b/parachain/ts-tests/common/setup/upgrade-parathread.ts similarity index 100% rename from ts-tests/common/setup/upgrade-parathread.ts rename to parachain/ts-tests/common/setup/upgrade-parathread.ts diff --git a/ts-tests/common/setup/wait-finalized-block.ts b/parachain/ts-tests/common/setup/wait-finalized-block.ts similarity index 100% rename from ts-tests/common/setup/wait-finalized-block.ts rename to parachain/ts-tests/common/setup/wait-finalized-block.ts diff --git a/ts-tests/common/utils/compile.ts b/parachain/ts-tests/common/utils/compile.ts similarity index 100% rename from ts-tests/common/utils/compile.ts rename to parachain/ts-tests/common/utils/compile.ts diff --git a/ts-tests/common/utils/config.ts b/parachain/ts-tests/common/utils/config.ts similarity index 100% rename from ts-tests/common/utils/config.ts rename to parachain/ts-tests/common/utils/config.ts diff --git a/ts-tests/common/utils/consts.ts b/parachain/ts-tests/common/utils/consts.ts similarity index 100% rename from ts-tests/common/utils/consts.ts rename to parachain/ts-tests/common/utils/consts.ts diff --git a/ts-tests/common/utils/function.ts b/parachain/ts-tests/common/utils/function.ts similarity index 100% rename from ts-tests/common/utils/function.ts rename to parachain/ts-tests/common/utils/function.ts diff --git a/ts-tests/common/utils/index.ts b/parachain/ts-tests/common/utils/index.ts similarity index 100% rename from ts-tests/common/utils/index.ts rename to parachain/ts-tests/common/utils/index.ts diff --git a/ts-tests/common/utils/integration-setup.ts b/parachain/ts-tests/common/utils/integration-setup.ts similarity index 100% rename from ts-tests/common/utils/integration-setup.ts rename to parachain/ts-tests/common/utils/integration-setup.ts diff --git a/ts-tests/config.ci.json b/parachain/ts-tests/config.ci.json similarity index 100% rename from ts-tests/config.ci.json rename to parachain/ts-tests/config.ci.json diff --git a/ts-tests/config.example.json b/parachain/ts-tests/config.example.json similarity index 100% rename from ts-tests/config.example.json rename to parachain/ts-tests/config.example.json diff --git a/ts-tests/global.d.ts b/parachain/ts-tests/global.d.ts similarity index 100% rename from ts-tests/global.d.ts rename to parachain/ts-tests/global.d.ts diff --git a/ts-tests/integration-tests/base-filter.test.ts b/parachain/ts-tests/integration-tests/base-filter.test.ts similarity index 100% rename from ts-tests/integration-tests/base-filter.test.ts rename to parachain/ts-tests/integration-tests/base-filter.test.ts diff --git a/ts-tests/integration-tests/bridge.test.ts b/parachain/ts-tests/integration-tests/bridge.test.ts similarity index 100% rename from ts-tests/integration-tests/bridge.test.ts rename to parachain/ts-tests/integration-tests/bridge.test.ts diff --git a/ts-tests/integration-tests/evm-contract.test.ts b/parachain/ts-tests/integration-tests/evm-contract.test.ts similarity index 100% rename from ts-tests/integration-tests/evm-contract.test.ts rename to parachain/ts-tests/integration-tests/evm-contract.test.ts diff --git a/ts-tests/integration-tests/evm-transfer.test.ts b/parachain/ts-tests/integration-tests/evm-transfer.test.ts similarity index 100% rename from ts-tests/integration-tests/evm-transfer.test.ts rename to parachain/ts-tests/integration-tests/evm-transfer.test.ts diff --git a/ts-tests/integration-tests/precompile-contract.test.ts b/parachain/ts-tests/integration-tests/precompile-contract.test.ts similarity index 100% rename from ts-tests/integration-tests/precompile-contract.test.ts rename to parachain/ts-tests/integration-tests/precompile-contract.test.ts diff --git a/ts-tests/integration-tests/runtime-upgrade.test.ts b/parachain/ts-tests/integration-tests/runtime-upgrade.test.ts similarity index 100% rename from ts-tests/integration-tests/runtime-upgrade.test.ts rename to parachain/ts-tests/integration-tests/runtime-upgrade.test.ts diff --git a/ts-tests/integration-tests/transaction-fee.test.ts b/parachain/ts-tests/integration-tests/transaction-fee.test.ts similarity index 100% rename from ts-tests/integration-tests/transaction-fee.test.ts rename to parachain/ts-tests/integration-tests/transaction-fee.test.ts diff --git a/ts-tests/integration-tests/transfer.test.ts b/parachain/ts-tests/integration-tests/transfer.test.ts similarity index 100% rename from ts-tests/integration-tests/transfer.test.ts rename to parachain/ts-tests/integration-tests/transfer.test.ts diff --git a/ts-tests/package.json b/parachain/ts-tests/package.json similarity index 100% rename from ts-tests/package.json rename to parachain/ts-tests/package.json diff --git a/ts-tests/pnpm-lock.yaml b/parachain/ts-tests/pnpm-lock.yaml similarity index 100% rename from ts-tests/pnpm-lock.yaml rename to parachain/ts-tests/pnpm-lock.yaml diff --git a/ts-tests/tsconfig.json b/parachain/ts-tests/tsconfig.json similarity index 100% rename from ts-tests/tsconfig.json rename to parachain/ts-tests/tsconfig.json diff --git a/worker-pallets/parentchain/Cargo.toml b/parachain/worker-pallets/parentchain/Cargo.toml similarity index 100% rename from worker-pallets/parentchain/Cargo.toml rename to parachain/worker-pallets/parentchain/Cargo.toml diff --git a/worker-pallets/parentchain/src/lib.rs b/parachain/worker-pallets/parentchain/src/lib.rs similarity index 100% rename from worker-pallets/parentchain/src/lib.rs rename to parachain/worker-pallets/parentchain/src/lib.rs diff --git a/worker-pallets/parentchain/src/mock.rs b/parachain/worker-pallets/parentchain/src/mock.rs similarity index 100% rename from worker-pallets/parentchain/src/mock.rs rename to parachain/worker-pallets/parentchain/src/mock.rs diff --git a/worker-pallets/parentchain/src/tests.rs b/parachain/worker-pallets/parentchain/src/tests.rs similarity index 100% rename from worker-pallets/parentchain/src/tests.rs rename to parachain/worker-pallets/parentchain/src/tests.rs diff --git a/worker-pallets/parentchain/src/weights.rs b/parachain/worker-pallets/parentchain/src/weights.rs similarity index 100% rename from worker-pallets/parentchain/src/weights.rs rename to parachain/worker-pallets/parentchain/src/weights.rs diff --git a/zombienet/config.toml b/parachain/zombienet/config.toml similarity index 100% rename from zombienet/config.toml rename to parachain/zombienet/config.toml diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml deleted file mode 100644 index fef7bae525..0000000000 --- a/primitives/core/Cargo.toml +++ /dev/null @@ -1,39 +0,0 @@ -[package] -authors = ["Trust Computing GmbH "] -edition = '2021' -name = 'core-primitives' -version = '0.1.0' - -[dependencies] -base58 = { workspace = true } -parity-scale-codec = { workspace = true } -strum = { workspace = true } -strum_macros = { workspace = true } - -frame-support = { workspace = true } -pallet-evm = { workspace = true } -scale-info = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -litentry-hex-utils = { workspace = true } -litentry-macros = { workspace = true } -litentry-proc-macros = { workspace = true } - -[features] -default = ["std"] -std = [ - "strum/std", - "parity-scale-codec/std", - "scale-info/std", - "frame-support/std", - "sp-core/std", - "sp-runtime/std", - "sp-io/std", - "pallet-evm/std", - "litentry-hex-utils/std", -] -development = [ - "litentry-macros/development", -] diff --git a/primitives/core/proc-macros/src/lib.rs b/primitives/core/proc-macros/src/lib.rs deleted file mode 100644 index 894b7bfcf2..0000000000 --- a/primitives/core/proc-macros/src/lib.rs +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![allow(clippy::tabs_in_doc_comments)] - -use cargo_toml::{Dependency, Manifest}; -use proc_macro::TokenStream; -use quote::quote; -use reuse::handle_reuse; -use std::fs; -use syn::{parse_macro_input, Error}; -mod reuse; - -/** -This macro is used to reuse implementations when the rust's trait system cannot gracefully express the abstraction. - -This works similar with `#[cfg(..)]` that sets the target only appear on the specified cases. - -# Usage: - -``` -use litentry_proc_macros::reuse; - -#[reuse(x, y)] // Define the cases that the following implementation expands for each one -mod __ { // Leave mod name with double discards, which is to be replaced by the cases - #[x] // This item would only appear on case `x` - fn u() { - __ - } - - #[y] // This item would only appear on case `y` - fn v(a: String) { - println!("hello world!") - } - - #[x] // Specifying multiple cases indicates that the item would appear on all of them - #[y] .// This behaviour is designed to be different from `#[cfg(..)]` - fn a() -> i32 { - #[x] // This statement would only appear on case `x` - let p = 1; - #[y] // This statement would only appear on case `y` - let p = 2; - p + 1 - } - - - fn g<#[x] 'a, #[y] T>(#[x] a: i32, #[y] a: u32) {} -} - -``` -Expands to: -``` -mod x { - fn a() -> i32 { - let p = 1; - p + 1 - } - fn u() { - println!("hello world!"); - } - fn g<'a>(a: i32) {} -} - -mod y { - fn a() -> i32 { - let p = 2; - p + 1 - } - fn v(a: String) { - println!("hello world!"); - } - fn g(a: u32) {} -} - -``` -*/ -#[proc_macro_attribute] -pub fn reuse(args: TokenStream, input: TokenStream) -> TokenStream { - handle_reuse(parse_macro_input!(args), parse_macro_input!(input)) - .unwrap_or_else(Error::into_compile_error) - .into() -} - -#[proc_macro] -pub fn local_modules(_item: TokenStream) -> TokenStream { - let mut deps: Vec = vec![]; - read_module_names("", ".", &mut deps); - let output = quote! { - { - let deps: Vec<&str> = vec![ - #(#deps),* - ]; - deps - } - }; - output.into() -} - -fn read_module_names(path: &str, relative_to: &str, module_names: &mut Vec) { - let current_path = relative_to.to_string() + "/" + path; - let cargo_file = current_path.to_string() + "/Cargo.toml"; - let contents = fs::read_to_string(&cargo_file) - .unwrap_or_else(|_| panic!("Should have been able to read the file: {}", cargo_file)); - let manifest = Manifest::from_str(&contents) - .unwrap_or_else(|_| panic!("Could not parse manifest file locate at {}", cargo_file)); - if let Some(package) = manifest.package { - let module_name = package.name.replace('-', "_"); - // skip package if it is unnamed or it was already visited - if !package.name.is_empty() && !module_names.contains(&module_name) { - module_names.push(module_name); - // go through all dependencies and visit the ones that has `path`, which means they are - // local - manifest.dependencies.values().for_each(|dep| { - if let Dependency::Detailed(details) = dep { - if let Some(path) = &details.path { - read_module_names(path, ¤t_path, module_names) - } - } - }); - } - } -} diff --git a/primitives/core/proc-macros/src/reuse.rs b/primitives/core/proc-macros/src/reuse.rs deleted file mode 100644 index 238a9d8ca8..0000000000 --- a/primitives/core/proc-macros/src/reuse.rs +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use proc_macro2::{Ident, TokenStream}; -use quote::ToTokens; -use syn::{ - parse::Parse, punctuated::Punctuated, visit_mut::VisitMut, Arm, Attribute, Block, ConstParam, - Error, Expr, ExprArray, ExprAssign, ExprAsync, ExprAwait, ExprBinary, ExprBlock, ExprBreak, - ExprCall, ExprCast, ExprClosure, ExprConst, ExprContinue, ExprField, ExprForLoop, ExprGroup, - ExprIf, ExprIndex, ExprInfer, ExprLet, ExprLit, ExprLoop, ExprMacro, ExprMatch, ExprMethodCall, - ExprParen, ExprPath, ExprRange, ExprReference, ExprRepeat, ExprReturn, ExprStruct, ExprTry, - ExprTryBlock, ExprTuple, ExprUnary, ExprUnsafe, ExprWhile, ExprYield, Field, FieldPat, - FieldValue, FnArg, GenericParam, Item, ItemConst, ItemEnum, ItemExternCrate, ItemFn, - ItemForeignMod, ItemImpl, ItemMacro, ItemMod, ItemStatic, ItemStruct, ItemTrait, - ItemTraitAlias, ItemType, ItemUnion, ItemUse, LifetimeParam, Local, Meta, Pat, PatConst, - PatIdent, PatLit, PatMacro, PatOr, PatParen, PatPath, PatRange, PatReference, PatRest, - PatSlice, PatStruct, PatTuple, PatTupleStruct, PatType, PatWild, Receiver, Result, Stmt, - StmtMacro, Token, TypeParam, Variant, -}; - -pub struct Args { - cases: Punctuated, -} - -impl Parse for Args { - fn parse(input: syn::parse::ParseStream) -> Result { - Ok(Self { cases: Punctuated::parse_terminated(input)? }) - } -} - -pub fn handle_reuse(args: Args, m: ItemMod) -> Result { - let mut result = TokenStream::new(); - let cases = args.cases.iter().map(ToString::to_string).collect::>(); - for current in 0..args.cases.len() { - let mut visitor = Visitor { cases: &cases, current, error: None }; - let mut m = m.clone(); - m.ident = args.cases[current].clone(); - visitor.visit_item_mod_mut(&mut m); - if let Some(e) = visitor.error.take() { - return Err(e); - } - m.to_tokens(&mut result); - } - Ok(result) -} - -struct Visitor<'a> { - cases: &'a [String], - current: usize, - error: Option, -} - -impl<'a> VisitMut for Visitor<'a> { - fn visit_item_mod_mut(&mut self, m: &mut ItemMod) { - if let Some((_, items)) = &mut m.content { - let mut i = 0; - while i < items.len() { - if let Some(attrs) = items[i].get_attrs_mut() { - match self.case(attrs) { - Case::Other => { - items.remove(i); - continue; - }, - Case::Current => { - if let [Item::Fn(this), Item::Fn(next), ..] = &mut items[i..] { - if let [Stmt::Expr( - Expr::Path(ExprPath { attrs, qself: None, path }), - None, - )] = this.block.stmts.as_slice() - { - if attrs.is_empty() && path.is_ident("__") { - this.block.clone_from(&next.block); - } - } - } - }, - _ => (), - } - } - i += 1; - } - } - syn::visit_mut::visit_item_mod_mut(self, m) - } - - fn visit_block_mut(&mut self, block: &mut Block) { - self.filter_vec(&mut block.stmts); - syn::visit_mut::visit_block_mut(self, block) - } - - fn visit_signature_mut(&mut self, item: &mut syn::Signature) { - self.filter_punct(&mut item.inputs); - syn::visit_mut::visit_signature_mut(self, item) - } - - fn visit_generics_mut(&mut self, item: &mut syn::Generics) { - self.filter_punct(&mut item.params); - syn::visit_mut::visit_generics_mut(self, item) - } - - fn visit_expr_tuple_mut(&mut self, item: &mut ExprTuple) { - self.filter_punct(&mut item.elems); - syn::visit_mut::visit_expr_tuple_mut(self, item) - } - - fn visit_pat_tuple_mut(&mut self, item: &mut syn::PatTuple) { - self.filter_punct(&mut item.elems); - syn::visit_mut::visit_pat_tuple_mut(self, item) - } - - fn visit_pat_tuple_struct_mut(&mut self, item: &mut PatTupleStruct) { - self.filter_punct(&mut item.elems); - syn::visit_mut::visit_pat_tuple_struct_mut(self, item) - } - - fn visit_pat_struct_mut(&mut self, item: &mut PatStruct) { - self.filter_punct(&mut item.fields); - syn::visit_mut::visit_pat_struct_mut(self, item) - } - - fn visit_expr_struct_mut(&mut self, item: &mut ExprStruct) { - self.filter_punct(&mut item.fields); - syn::visit_mut::visit_expr_struct_mut(self, item) - } - - fn visit_fields_named_mut(&mut self, item: &mut syn::FieldsNamed) { - self.filter_punct(&mut item.named); - syn::visit_mut::visit_fields_named_mut(self, item) - } - - fn visit_fields_unnamed_mut(&mut self, item: &mut syn::FieldsUnnamed) { - self.filter_punct(&mut item.unnamed); - syn::visit_mut::visit_fields_unnamed_mut(self, item) - } - - fn visit_item_enum_mut(&mut self, item: &mut ItemEnum) { - self.filter_punct(&mut item.variants); - syn::visit_mut::visit_item_enum_mut(self, item) - } - - fn visit_item_union_mut(&mut self, item: &mut ItemUnion) { - self.filter_punct(&mut item.fields.named); - syn::visit_mut::visit_item_union_mut(self, item) - } - - fn visit_expr_match_mut(&mut self, item: &mut ExprMatch) { - self.filter_vec(&mut item.arms); - syn::visit_mut::visit_expr_match_mut(self, item) - } - - fn visit_pat_or_mut(&mut self, item: &mut PatOr) { - self.filter_punct(&mut item.cases); - syn::visit_mut::visit_pat_or_mut(self, item) - } - - fn visit_expr_closure_mut(&mut self, item: &mut ExprClosure) { - self.filter_punct(&mut item.inputs); - syn::visit_mut::visit_expr_closure_mut(self, item) - } -} - -enum Case { - Current, - Other, - All, -} - -impl<'a> Visitor<'a> { - #[inline] - fn filter_vec(&self, target: &mut Vec) - where - T: GetAttrsMut, - { - let mut i = 0; - while i < target.len() { - if let Some(attrs) = target[i].get_attrs_mut() { - if let Case::Other = self.case(attrs) { - target.remove(i); - continue; - } - } - i += 1; - } - } - - #[inline] - fn filter_punct(&self, target: &mut Punctuated) - where - T: GetAttrsMut + Clone, - P: Default, - { - let mut copy = None; - for i in 0..target.len() { - if let Some(attrs) = target[i].get_attrs_mut() { - if let Case::Other = self.case(attrs) { - copy.get_or_insert_with(|| { - Punctuated::from_iter(target.iter().take(i).cloned()) - }); - } else if let Some(copy) = &mut copy { - copy.push(target[i].clone()); - } - } - } - if let Some(copy) = copy { - *target = copy; - } - } - - #[inline] - fn case(&self, attrs: &mut Vec) -> Case { - let mut is_casing = false; - let mut has_current = false; - let mut i = 0; - while i < attrs.len() { - if let Meta::Path(path) = &attrs[i].meta { - if let Some(ident) = path.get_ident() { - if ident == self.cases[self.current].as_str() { - has_current = true; - is_casing = true; - attrs.remove(i); - continue; - } - if self.cases.iter().any(|x| ident == x.as_str()) { - is_casing = true; - attrs.remove(i); - continue; - } - } - } - i += 1; - } - if has_current { - Case::Current - } else if is_casing { - Case::Other - } else { - Case::All - } - } -} - -trait GetAttrsMut { - fn get_attrs_mut(&mut self) -> Option<&mut Vec>; -} - -impl GetAttrsMut for Item { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - match self { - Item::Const(ItemConst { attrs, .. }) - | Item::Enum(ItemEnum { attrs, .. }) - | Item::ExternCrate(ItemExternCrate { attrs, .. }) - | Item::Fn(ItemFn { attrs, .. }) - | Item::ForeignMod(ItemForeignMod { attrs, .. }) - | Item::Impl(ItemImpl { attrs, .. }) - | Item::Macro(ItemMacro { attrs, .. }) - | Item::Mod(ItemMod { attrs, .. }) - | Item::Static(ItemStatic { attrs, .. }) - | Item::Struct(ItemStruct { attrs, .. }) - | Item::Trait(ItemTrait { attrs, .. }) - | Item::TraitAlias(ItemTraitAlias { attrs, .. }) - | Item::Type(ItemType { attrs, .. }) - | Item::Union(ItemUnion { attrs, .. }) - | Item::Use(ItemUse { attrs, .. }) => Some(attrs), - _ => None, - } - } -} - -impl GetAttrsMut for Expr { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - match self { - Expr::Array(ExprArray { attrs, .. }) - | Expr::Assign(ExprAssign { attrs, .. }) - | Expr::Async(ExprAsync { attrs, .. }) - | Expr::Await(ExprAwait { attrs, .. }) - | Expr::Binary(ExprBinary { attrs, .. }) - | Expr::Block(ExprBlock { attrs, .. }) - | Expr::Break(ExprBreak { attrs, .. }) - | Expr::Call(ExprCall { attrs, .. }) - | Expr::Cast(ExprCast { attrs, .. }) - | Expr::Closure(ExprClosure { attrs, .. }) - | Expr::Const(ExprConst { attrs, .. }) - | Expr::Continue(ExprContinue { attrs, .. }) - | Expr::Field(ExprField { attrs, .. }) - | Expr::ForLoop(ExprForLoop { attrs, .. }) - | Expr::Group(ExprGroup { attrs, .. }) - | Expr::If(ExprIf { attrs, .. }) - | Expr::Index(ExprIndex { attrs, .. }) - | Expr::Infer(ExprInfer { attrs, .. }) - | Expr::Let(ExprLet { attrs, .. }) - | Expr::Lit(ExprLit { attrs, .. }) - | Expr::Loop(ExprLoop { attrs, .. }) - | Expr::Macro(ExprMacro { attrs, .. }) - | Expr::Match(ExprMatch { attrs, .. }) - | Expr::MethodCall(ExprMethodCall { attrs, .. }) - | Expr::Paren(ExprParen { attrs, .. }) - | Expr::Path(ExprPath { attrs, .. }) - | Expr::Range(ExprRange { attrs, .. }) - | Expr::Reference(ExprReference { attrs, .. }) - | Expr::Repeat(ExprRepeat { attrs, .. }) - | Expr::Return(ExprReturn { attrs, .. }) - | Expr::Struct(ExprStruct { attrs, .. }) - | Expr::Try(ExprTry { attrs, .. }) - | Expr::TryBlock(ExprTryBlock { attrs, .. }) - | Expr::Tuple(ExprTuple { attrs, .. }) - | Expr::Unary(ExprUnary { attrs, .. }) - | Expr::Unsafe(ExprUnsafe { attrs, .. }) - | Expr::While(ExprWhile { attrs, .. }) - | Expr::Yield(ExprYield { attrs, .. }) => Some(attrs), - _ => None, - } - } -} - -impl GetAttrsMut for Stmt { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - match self { - Stmt::Local(Local { attrs, .. }) | Stmt::Macro(StmtMacro { attrs, .. }) => Some(attrs), - Stmt::Expr(expr, ..) => expr.get_attrs_mut(), - Stmt::Item(item) => item.get_attrs_mut(), - } - } -} - -impl GetAttrsMut for FnArg { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - match self { - FnArg::Receiver(Receiver { attrs, .. }) | FnArg::Typed(PatType { attrs, .. }) => { - Some(attrs) - }, - } - } -} - -impl GetAttrsMut for GenericParam { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - match self { - GenericParam::Lifetime(LifetimeParam { attrs, .. }) - | GenericParam::Type(TypeParam { attrs, .. }) - | GenericParam::Const(ConstParam { attrs, .. }) => Some(attrs), - } - } -} - -impl GetAttrsMut for Pat { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - match self { - Pat::Const(PatConst { attrs, .. }) - | Pat::Ident(PatIdent { attrs, .. }) - | Pat::Lit(PatLit { attrs, .. }) - | Pat::Macro(PatMacro { attrs, .. }) - | Pat::Or(PatOr { attrs, .. }) - | Pat::Paren(PatParen { attrs, .. }) - | Pat::Path(PatPath { attrs, .. }) - | Pat::Range(PatRange { attrs, .. }) - | Pat::Reference(PatReference { attrs, .. }) - | Pat::Rest(PatRest { attrs, .. }) - | Pat::Slice(PatSlice { attrs, .. }) - | Pat::Struct(PatStruct { attrs, .. }) - | Pat::Tuple(PatTuple { attrs, .. }) - | Pat::TupleStruct(PatTupleStruct { attrs, .. }) - | Pat::Type(PatType { attrs, .. }) - | Pat::Wild(PatWild { attrs, .. }) => Some(attrs), - _ => None, - } - } -} - -impl GetAttrsMut for FieldPat { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - Some(&mut self.attrs) - } -} - -impl GetAttrsMut for FieldValue { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - Some(&mut self.attrs) - } -} - -impl GetAttrsMut for Field { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - Some(&mut self.attrs) - } -} - -impl GetAttrsMut for Variant { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - Some(&mut self.attrs) - } -} - -impl GetAttrsMut for Arm { - #[inline] - fn get_attrs_mut(&mut self) -> Option<&mut Vec> { - Some(&mut self.attrs) - } -} diff --git a/primitives/core/src/assertion/network.rs b/primitives/core/src/assertion/network.rs deleted file mode 100644 index 2e68d6eebb..0000000000 --- a/primitives/core/src/assertion/network.rs +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::{CoreHash as Hash, String, Vec}; -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; -use sp_runtime::{traits::ConstU32, BoundedVec}; -use strum::IntoEnumIterator; -use strum_macros::{EnumIter, IntoStaticStr}; - -pub const MAX_WEB3NETWORK_LEN: u32 = 128; -pub type BoundedWeb3Network = BoundedVec>; - -/// supported web3 networks -/// use a flattened style to avoid overly nested structure like: -/// { -/// Substrate(SubstrateNetwork), -/// Evm(EvmNetwork), -/// } -/// -/// TODO: theoretically this should the union of the supported networks of all data providers -/// -/// Since the incorporation of Bitcoin network, the name `Web3Network` might not be the best word, -/// as different kinds of bitcoin types (BitcoinP2tr, BitcoinP2pkh, ...) still belong to the same -/// network (bitcoin mainnet) despite of having 5 entries in this enum. -/// -/// More precisely, it should reflect "the way" how the same identity handle (e.g. pubkey) is -/// differently used: either in different networks (e.g. eth vs bsc), or as different addresses in -/// the same network or not (e.g. bitcoin/substrate) -#[derive( - Encode, - Decode, - Copy, - Clone, - Debug, - PartialEq, - Eq, - PartialOrd, - Ord, - Hash, - TypeInfo, - MaxEncodedLen, - EnumIter, - IntoStaticStr, -)] -pub enum Web3Network { - // substrate - #[codec(index = 0)] - Polkadot, - #[codec(index = 1)] - Kusama, - #[codec(index = 2)] - Litentry, - #[codec(index = 3)] - // TODO: we sunset Litmus already, this entry is kept temporarily to not break anything. - // However, it should not be used in any of the vc building logic - Litmus, - #[codec(index = 4)] - LitentryRococo, - #[codec(index = 5)] - Khala, - #[codec(index = 6)] - SubstrateTestnet, - - // evm - #[codec(index = 7)] - Ethereum, - #[codec(index = 8)] - Bsc, - - // btc, see https://github.com/rust-bitcoin/rust-bitcoin/blob/9ea3e29d61569479b7b4618c8ae1992612f3d01a/bitcoin/src/address/mod.rs#L64-L75 - #[codec(index = 9)] - BitcoinP2tr, - #[codec(index = 10)] - BitcoinP2pkh, - #[codec(index = 11)] - BitcoinP2sh, - #[codec(index = 12)] - BitcoinP2wpkh, - #[codec(index = 13)] - BitcoinP2wsh, - - // evm - #[codec(index = 14)] - Polygon, - #[codec(index = 15)] - Arbitrum, - // solana - #[codec(index = 16)] - Solana, - // combo L2 of BSC - #[codec(index = 17)] - Combo, -} - -// mainly used in CLI -impl TryFrom<&str> for Web3Network { - type Error = (); - fn try_from(value: &str) -> Result { - Web3Network::iter() - .find(|n| >::into(*n).to_lowercase() == value.to_lowercase()) - .ok_or(()) - } -} - -impl Web3Network { - pub fn is_substrate(&self) -> bool { - matches!( - self, - Self::Polkadot - | Self::Kusama | Self::Litentry - | Self::Litmus | Self::LitentryRococo - | Self::Khala | Self::SubstrateTestnet - ) - } - - pub fn is_evm(&self) -> bool { - matches!(self, Self::Ethereum | Self::Bsc | Self::Polygon | Self::Arbitrum | Self::Combo) - } - - pub fn is_bitcoin(&self) -> bool { - matches!( - self, - Self::BitcoinP2tr - | Self::BitcoinP2pkh - | Self::BitcoinP2sh - | Self::BitcoinP2wpkh - | Self::BitcoinP2wsh - ) - } - - pub fn is_solana(&self) -> bool { - matches!(self, Self::Solana) - } - - pub fn get_code(&self) -> u8 { - match self { - Web3Network::Polkadot => 0, - Web3Network::Kusama => 1, - Web3Network::Litentry => 2, - Web3Network::Litmus => 3, - Web3Network::LitentryRococo => 4, - Web3Network::Khala => 5, - Web3Network::SubstrateTestnet => 6, - Web3Network::Ethereum => 7, - Web3Network::Bsc => 8, - Web3Network::BitcoinP2tr => 9, - Web3Network::BitcoinP2pkh => 10, - Web3Network::BitcoinP2sh => 11, - Web3Network::BitcoinP2wpkh => 12, - Web3Network::BitcoinP2wsh => 13, - Web3Network::Polygon => 14, - Web3Network::Arbitrum => 15, - Web3Network::Solana => 16, - Web3Network::Combo => 17, - } - } - - pub fn from_code(code: u8) -> Option { - match code { - 0 => Some(Web3Network::Polkadot), - 1 => Some(Web3Network::Kusama), - 2 => Some(Web3Network::Litentry), - 3 => Some(Web3Network::Litmus), - 4 => Some(Web3Network::LitentryRococo), - 5 => Some(Web3Network::Khala), - 6 => Some(Web3Network::SubstrateTestnet), - 7 => Some(Web3Network::Ethereum), - 8 => Some(Web3Network::Bsc), - 9 => Some(Web3Network::BitcoinP2tr), - 10 => Some(Web3Network::BitcoinP2pkh), - 11 => Some(Web3Network::BitcoinP2sh), - 12 => Some(Web3Network::BitcoinP2wpkh), - 13 => Some(Web3Network::BitcoinP2wsh), - 14 => Some(Web3Network::Polygon), - 15 => Some(Web3Network::Arbitrum), - 16 => Some(Web3Network::Solana), - 17 => Some(Web3Network::Combo), - _ => None, - } - } - - pub fn get_name(&self) -> String { - match self { - Web3Network::Polkadot => "polkadot".into(), - Web3Network::Kusama => "kusama".into(), - Web3Network::Litentry => "litentry".into(), - Web3Network::Litmus => "litmus".into(), - Web3Network::LitentryRococo => "litentry_rococo".into(), - Web3Network::Khala => "khala".into(), - Web3Network::SubstrateTestnet => "substrate_testnet".into(), - Web3Network::Ethereum => "ethereum".into(), - Web3Network::Bsc => "bsc".into(), - Web3Network::BitcoinP2tr => "bitcoin_p2tr".into(), - Web3Network::BitcoinP2pkh => "bitcoin_p2pkh".into(), - Web3Network::BitcoinP2sh => "bitcoin_p2sh".into(), - Web3Network::BitcoinP2wpkh => "bitcoin_p2wpkh".into(), - Web3Network::BitcoinP2wsh => "bitcoin_p2wsh".into(), - Web3Network::Polygon => "polygon".into(), - Web3Network::Arbitrum => "arbitrum".into(), - Web3Network::Solana => "solana".into(), - Web3Network::Combo => "combo".into(), - } - } -} - -pub fn all_web3networks() -> Vec { - Web3Network::iter().collect() -} - -pub fn all_substrate_web3networks() -> Vec { - Web3Network::iter().filter(|n| n.is_substrate()).collect() -} - -pub fn all_evm_web3networks() -> Vec { - Web3Network::iter().filter(|n| n.is_evm()).collect() -} - -pub fn all_bitcoin_web3networks() -> Vec { - Web3Network::iter().filter(|n| n.is_bitcoin()).collect() -} - -pub fn all_solana_web3networks() -> Vec { - Web3Network::iter().filter(|n| n.is_solana()).collect() -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn web3network_length_ok() { - let networks: Vec = Web3Network::iter().collect(); - assert!(networks.len() < MAX_WEB3NETWORK_LEN.try_into().unwrap()); - } - - #[test] - fn is_evm_works() { - Web3Network::iter().for_each(|network| { - assert_eq!( - network.is_evm(), - match network { - Web3Network::Polkadot => false, - Web3Network::Kusama => false, - Web3Network::Litentry => false, - Web3Network::Litmus => false, - Web3Network::LitentryRococo => false, - Web3Network::Khala => false, - Web3Network::SubstrateTestnet => false, - Web3Network::Ethereum => true, - Web3Network::Bsc => true, - Web3Network::BitcoinP2tr => false, - Web3Network::BitcoinP2pkh => false, - Web3Network::BitcoinP2sh => false, - Web3Network::BitcoinP2wpkh => false, - Web3Network::BitcoinP2wsh => false, - Web3Network::Polygon => true, - Web3Network::Arbitrum => true, - Web3Network::Solana => false, - Web3Network::Combo => true, - } - ) - }) - } - - #[test] - fn is_substrate_works() { - Web3Network::iter().for_each(|network| { - assert_eq!( - network.is_substrate(), - match network { - Web3Network::Polkadot => true, - Web3Network::Kusama => true, - Web3Network::Litentry => true, - Web3Network::Litmus => true, - Web3Network::LitentryRococo => true, - Web3Network::Khala => true, - Web3Network::SubstrateTestnet => true, - Web3Network::Ethereum => false, - Web3Network::Bsc => false, - Web3Network::BitcoinP2tr => false, - Web3Network::BitcoinP2pkh => false, - Web3Network::BitcoinP2sh => false, - Web3Network::BitcoinP2wpkh => false, - Web3Network::BitcoinP2wsh => false, - Web3Network::Polygon => false, - Web3Network::Arbitrum => false, - Web3Network::Solana => false, - Web3Network::Combo => false, - } - ) - }) - } - - #[test] - fn is_bitcoin_works() { - Web3Network::iter().for_each(|network| { - assert_eq!( - network.is_bitcoin(), - match network { - Web3Network::Polkadot => false, - Web3Network::Kusama => false, - Web3Network::Litentry => false, - Web3Network::Litmus => false, - Web3Network::LitentryRococo => false, - Web3Network::Khala => false, - Web3Network::SubstrateTestnet => false, - Web3Network::Ethereum => false, - Web3Network::Bsc => false, - Web3Network::BitcoinP2tr => true, - Web3Network::BitcoinP2pkh => true, - Web3Network::BitcoinP2sh => true, - Web3Network::BitcoinP2wpkh => true, - Web3Network::BitcoinP2wsh => true, - Web3Network::Polygon => false, - Web3Network::Arbitrum => false, - Web3Network::Solana => false, - Web3Network::Combo => false, - } - ) - }) - } - - #[test] - fn is_solana_works() { - Web3Network::iter().for_each(|network| { - assert_eq!( - network.is_solana(), - match network { - Web3Network::Polkadot => false, - Web3Network::Kusama => false, - Web3Network::Litentry => false, - Web3Network::Litmus => false, - Web3Network::LitentryRococo => false, - Web3Network::Khala => false, - Web3Network::SubstrateTestnet => false, - Web3Network::Ethereum => false, - Web3Network::Bsc => false, - Web3Network::BitcoinP2tr => false, - Web3Network::BitcoinP2pkh => false, - Web3Network::BitcoinP2sh => false, - Web3Network::BitcoinP2wpkh => false, - Web3Network::BitcoinP2wsh => false, - Web3Network::Polygon => false, - Web3Network::Arbitrum => false, - Web3Network::Solana => true, - Web3Network::Combo => false, - } - ) - }) - } - - #[test] - fn try_from_str_works() { - let mut n: Result = "polkadot".try_into(); - assert_eq!(n.unwrap(), Web3Network::Polkadot); - n = "poLkAdOt".try_into(); - assert_eq!(n.unwrap(), Web3Network::Polkadot); - n = "NonExist".try_into(); - assert_eq!(n, Err(())) - } -} diff --git a/primitives/core/src/assertion/web3_token.rs b/primitives/core/src/assertion/web3_token.rs deleted file mode 100644 index 78840218ed..0000000000 --- a/primitives/core/src/assertion/web3_token.rs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::assertion::network::Web3Network; -use crate::{vec, Vec}; -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; - -#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, MaxEncodedLen, TypeInfo)] -pub enum Web3TokenType { - #[codec(index = 0)] - Bnb, - #[codec(index = 1)] - Eth, - #[codec(index = 2)] - SpaceId, - #[codec(index = 3)] - Lit, - #[codec(index = 4)] - Wbtc, - #[codec(index = 5)] - Usdc, - #[codec(index = 6)] - Usdt, - #[codec(index = 7)] - Crv, - #[codec(index = 8)] - Matic, - #[codec(index = 9)] - Dydx, - #[codec(index = 10)] - Amp, - #[codec(index = 11)] - Cvx, - #[codec(index = 12)] - Tusd, - #[codec(index = 13)] - Usdd, - #[codec(index = 14)] - Gusd, - #[codec(index = 15)] - Link, - #[codec(index = 16)] - Grt, - #[codec(index = 17)] - Comp, - #[codec(index = 18)] - People, - #[codec(index = 19)] - Gtc, - #[codec(index = 20)] - Ton, - #[codec(index = 21)] - Trx, - #[codec(index = 22)] - Nfp, - #[codec(index = 23)] - Sol, - #[codec(index = 24)] - Mcrt, - #[codec(index = 25)] - Btc, - #[codec(index = 26)] - Ada, - #[codec(index = 27)] - Doge, - #[codec(index = 28)] - Shib, - #[codec(index = 29)] - Uni, - #[codec(index = 30)] - Bch, - #[codec(index = 31)] - Etc, - #[codec(index = 32)] - Atom, - #[codec(index = 33)] - Dai, - #[codec(index = 34)] - Leo, - #[codec(index = 35)] - Fil, - #[codec(index = 36)] - Imx, - #[codec(index = 37)] - Cro, - #[codec(index = 38)] - Inj, - #[codec(index = 39)] - Bean, - #[codec(index = 40)] - An, - #[codec(index = 41)] - Tuna, -} - -impl Web3TokenType { - pub fn get_supported_networks(&self) -> Vec { - match self { - Self::Bnb | Self::Eth | Self::SpaceId | Self::Ton | Self::Trx | Self::Inj => { - vec![Web3Network::Bsc, Web3Network::Ethereum] - }, - Self::Lit => vec![Web3Network::Bsc, Web3Network::Ethereum, Web3Network::Litentry], - Self::Nfp | Self::Ada | Self::Doge | Self::Bch | Self::Etc | Self::Fil => { - vec![Web3Network::Bsc] - }, - Self::Sol | Self::Mcrt => { - vec![Web3Network::Bsc, Web3Network::Ethereum, Web3Network::Solana] - }, - Self::Btc => vec![ - Web3Network::BitcoinP2tr, - Web3Network::BitcoinP2pkh, - Web3Network::BitcoinP2sh, - Web3Network::BitcoinP2wpkh, - Web3Network::BitcoinP2wsh, - ], - Self::Usdc | Self::Uni | Self::Dai => vec![ - Web3Network::Ethereum, - Web3Network::Bsc, - Web3Network::Solana, - Web3Network::Arbitrum, - Web3Network::Polygon, - ], - Self::Shib | Self::Leo | Self::Imx => vec![Web3Network::Ethereum], - Self::Atom => vec![Web3Network::Ethereum, Web3Network::Bsc, Web3Network::Polygon], - Self::Cro => vec![Web3Network::Ethereum, Web3Network::Solana], - Self::Bean => vec![Web3Network::Bsc, Web3Network::Combo], - Self::An => vec![Web3Network::Bsc], - _ => vec![Web3Network::Ethereum], - } - } -} diff --git a/primitives/core/src/error.rs b/primitives/core/src/error.rs deleted file mode 100644 index 290b1ee947..0000000000 --- a/primitives/core/src/error.rs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::{ - alloc::{fmt, string::String}, - assertion::Assertion, -}; - -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; -use sp_runtime::{ - traits::{ConstU32, Printable}, - BoundedVec, DispatchError, DispatchErrorWithPostInfo, -}; - -pub type ErrorString = BoundedVec>; - -// enum to reflect the error detail from TEE-worker processing -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub enum ErrorDetail { - // error when importing the parentchain blocks and executing indirect calls - #[codec(index = 0)] - ImportError, - // the direct or indirect request comes from an unauthorized signer - #[codec(index = 1)] - UnauthorizedSigner, - // generic error when executing STF, the `ErrorString` should indicate the actual reason - #[codec(index = 2)] - StfError(ErrorString), - // error when sending stf request to the receiver fails - #[codec(index = 3)] - SendStfRequestFailed, - // generic parse error, can be caused by UTF8/JSON serde.. - #[codec(index = 4)] - ParseError, - // errors when communicating with data provider, e.g. HTTP error - #[codec(index = 5)] - DataProviderError(ErrorString), - // error when tee-worker detects that verification data is associated with web2 identity but - // web3 identity linking is requested and opposite - #[codec(index = 6)] - InvalidIdentity, - // error when tee-worker detects that identity verification data is related to other web2 - // account than expected, for example wrong tweet id was provided - #[codec(index = 7)] - WrongWeb2Handle, - // error when during web3 identity verification process tee-worker detects that signed message - // is different from expected - #[codec(index = 8)] - UnexpectedMessage, - // error when during web3 identity verification process tee-worker fails to verify signature - // of verification data - #[codec(index = 10)] - VerifyWeb3SignatureFailed, - // error when trying to build vc but no eligible identity is found - #[codec(index = 11)] - NoEligibleIdentity, -} - -impl fmt::Debug for ErrorDetail { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - ErrorDetail::ImportError => write!(f, "ImportError"), - ErrorDetail::UnauthorizedSigner => write!(f, "UnauthorizedSigner"), - ErrorDetail::StfError(error_string) => { - let text = String::from_utf8(error_string.to_vec()).map_err(|_| fmt::Error)?; - write!(f, "StfError({})", text) - }, - ErrorDetail::SendStfRequestFailed => write!(f, "SendStfRequestFailed"), - ErrorDetail::ParseError => write!(f, "ParseError"), - ErrorDetail::DataProviderError(error_string) => { - let text = String::from_utf8(error_string.to_vec()).map_err(|_| fmt::Error)?; - write!(f, "DataProviderError({})", text) - }, - ErrorDetail::InvalidIdentity => write!(f, "InvalidIdentity"), - ErrorDetail::WrongWeb2Handle => write!(f, "WrongWeb2Handle"), - ErrorDetail::UnexpectedMessage => write!(f, "UnexpectedMessage"), - ErrorDetail::VerifyWeb3SignatureFailed => write!(f, "VerifyWeb3SignatureFailed"), - ErrorDetail::NoEligibleIdentity => write!(f, "NoEligibleIdentity"), - } - } -} - -// We could have used Into, but we want it to be more explicit, similar to `into_iter` -pub trait IntoErrorDetail { - fn into_error_detail(self) -> ErrorDetail; -} - -// `From` is implemented for `DispatchError` and `DispatchErrorWithPostInfo` on the top level, -// because we know it can only happen during stf execution in enclave -impl From for ErrorDetail { - fn from(e: DispatchError) -> Self { - ErrorDetail::StfError(ErrorString::truncate_from( - >::into(e).into(), - )) - } -} - -impl From> for ErrorDetail -where - T: Eq + PartialEq + Clone + Copy + Encode + Decode + Printable, -{ - fn from(e: DispatchErrorWithPostInfo) -> Self { - ErrorDetail::StfError(ErrorString::truncate_from( - as Into<&'static str>>::into(e).into(), - )) - } -} - -// Identity Management Pallet Error -#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub enum IMPError { - // errors when executing individual error - #[codec(index = 0)] - LinkIdentityFailed(ErrorDetail), - #[codec(index = 1)] - DeactivateIdentityFailed(ErrorDetail), - #[codec(index = 2)] - ActivateIdentityFailed(ErrorDetail), - // should be unreached, but just to be on the safe side - // we should classify the error if we ever get this - #[codec(index = 3)] - UnclassifiedError(ErrorDetail), -} - -impl frame_support::traits::PalletError for IMPError { - // max_encoded_len - const MAX_ENCODED_SIZE: usize = 1; -} - -// Verified Credential(VC) Management Pallet Error -#[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen)] -pub enum VCMPError { - #[codec(index = 0)] - RequestVCFailed(Assertion, ErrorDetail), - // should be unreached, but just to be on the safe side - // we should classify the error if we ever get this - #[codec(index = 1)] - UnclassifiedError(ErrorDetail), -} diff --git a/primitives/core/src/identity.rs b/primitives/core/src/identity.rs deleted file mode 100644 index 57ce8e9302..0000000000 --- a/primitives/core/src/identity.rs +++ /dev/null @@ -1,718 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -use crate::{ - assertion::network::{ - all_bitcoin_web3networks, all_evm_web3networks, all_solana_web3networks, - all_substrate_web3networks, Web3Network, - }, - format, str, AccountId, String, Vec, -}; -use base58::{FromBase58, ToBase58}; -use core::fmt::{Debug, Formatter}; -use litentry_hex_utils::{decode_hex, hex_encode}; -use litentry_macros::if_development_or; -use pallet_evm::{AddressMapping, HashedAddressMapping as GenericHashedAddressMapping}; -use parity_scale_codec::{Decode, Encode, Error, Input, MaxEncodedLen}; -use scale_info::{meta_type, Type, TypeDefSequence, TypeInfo}; -use sp_core::{ - crypto::{AccountId32, ByteArray}, - ecdsa, ed25519, sr25519, H160, -}; -use sp_io::hashing::blake2_256; -use sp_runtime::{ - traits::{BlakeTwo256, ConstU32}, - BoundedVec, -}; -use strum_macros::EnumIter; - -pub type IdentityInnerString = BoundedVec>; - -pub type HashedAddressMapping = GenericHashedAddressMapping; - -impl Decode for IdentityString { - fn decode(input: &mut I) -> Result { - let inner: IdentityInnerString = Decode::decode(input)?; - Ok(IdentityString { inner }) - } -} - -impl Encode for IdentityString { - fn encode(&self) -> Vec { - let mut res = Vec::new(); - self.inner.encode_to(&mut res); - res - } -} - -#[derive(Eq, PartialEq, Clone, MaxEncodedLen, Default, Ord, PartialOrd)] -pub struct IdentityString { - pub inner: IdentityInnerString, -} - -impl TypeInfo for IdentityString { - type Identity = IdentityInnerString; - - fn type_info() -> Type { - TypeDefSequence::new(meta_type::()).into() - } -} - -impl IdentityString { - pub fn new(inner: Vec) -> Self { - IdentityString { inner: BoundedVec::truncate_from(inner) } - } - - pub fn inner_ref(&self) -> &[u8] { - self.inner.as_ref() - } -} - -impl Debug for IdentityString { - fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { - if_development_or!( - f.debug_struct("IdentityString").field("inner", &self.inner).finish(), - f.debug_struct("IdentityString").finish() - ) - } -} - -#[derive( - Encode, Decode, Copy, Clone, Default, PartialEq, Eq, TypeInfo, MaxEncodedLen, Ord, PartialOrd, -)] -pub struct Address20([u8; 20]); - -impl AsRef<[u8; 20]> for Address20 { - fn as_ref(&self) -> &[u8; 20] { - &self.0 - } -} - -impl From<[u8; 20]> for Address20 { - fn from(value: [u8; 20]) -> Self { - Self(value) - } -} - -impl<'a> TryFrom<&'a [u8]> for Address20 { - type Error = (); - fn try_from(x: &'a [u8]) -> Result { - if x.len() == 20 { - let mut data = [0; 20]; - data.copy_from_slice(x); - Ok(Address20(data)) - } else { - Err(()) - } - } -} - -impl Debug for Address20 { - fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { - if_development_or!( - f.debug_tuple("Address20").field(&self.0).finish(), - f.debug_tuple("Address20").finish() - ) - } -} - -#[derive( - Encode, Decode, Copy, Clone, Default, PartialEq, Eq, TypeInfo, MaxEncodedLen, Ord, PartialOrd, -)] -pub struct Address32([u8; 32]); -impl AsRef<[u8; 32]> for Address32 { - fn as_ref(&self) -> &[u8; 32] { - &self.0 - } -} - -impl From<[u8; 32]> for Address32 { - fn from(value: [u8; 32]) -> Self { - Self(value) - } -} - -impl From for Address32 { - fn from(value: AccountId32) -> Self { - let raw: [u8; 32] = value.as_slice().try_into().unwrap(); - Address32::from(raw) - } -} - -impl<'a> TryFrom<&'a [u8]> for Address32 { - type Error = (); - fn try_from(x: &'a [u8]) -> Result { - if x.len() == 32 { - let mut data = [0; 32]; - data.copy_from_slice(x); - Ok(Address32(data)) - } else { - Err(()) - } - } -} - -impl From for AccountId32 { - fn from(value: Address32) -> Self { - let raw: [u8; 32] = *value.as_ref(); - AccountId32::from(raw) - } -} - -impl From<&Address32> for AccountId32 { - fn from(value: &Address32) -> Self { - (*value).into() - } -} - -impl From for Address32 { - fn from(k: sr25519::Public) -> Self { - k.0.into() - } -} - -impl From for Address32 { - fn from(k: ed25519::Public) -> Self { - k.0.into() - } -} - -impl Debug for Address32 { - fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { - if_development_or!( - f.debug_tuple("Address32").field(&self.0).finish(), - f.debug_tuple("Address32").finish() - ) - } -} - -// TODO: maybe use macros to reduce verbosity -#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, TypeInfo, MaxEncodedLen, PartialOrd, Ord)] -pub struct Address33([u8; 33]); -impl AsRef<[u8; 33]> for Address33 { - fn as_ref(&self) -> &[u8; 33] { - &self.0 - } -} - -impl Default for Address33 { - fn default() -> Self { - Address33([0u8; 33]) - } -} - -impl From<[u8; 33]> for Address33 { - fn from(value: [u8; 33]) -> Self { - Self(value) - } -} - -impl<'a> TryFrom<&'a [u8]> for Address33 { - type Error = (); - fn try_from(x: &'a [u8]) -> Result { - if x.len() == 33 { - let mut data = [0; 33]; - data.copy_from_slice(x); - Ok(Address33(data)) - } else { - Err(()) - } - } -} - -impl From for ecdsa::Public { - fn from(value: Address33) -> Self { - let raw: [u8; 33] = *value.as_ref(); - ecdsa::Public::from_raw(raw) - } -} - -impl From<&Address33> for ecdsa::Public { - fn from(value: &Address33) -> Self { - (*value).into() - } -} - -impl From for Address33 { - fn from(k: ecdsa::Public) -> Self { - k.0.into() - } -} - -impl Debug for Address33 { - fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { - if_development_or!( - f.debug_tuple("Address33").field(&self.0).finish(), - f.debug_tuple("Address33").finish() - ) - } -} - -/// Web2 and Web3 Identity based on handle/public key -/// We only include the network categories (substrate/evm) without concrete types -/// see https://github.com/litentry/litentry-parachain/issues/1841 -#[derive( - Encode, Decode, Clone, Debug, PartialEq, Eq, TypeInfo, MaxEncodedLen, EnumIter, Ord, PartialOrd, -)] -pub enum Identity { - // web2 - #[codec(index = 0)] - Twitter(IdentityString), - #[codec(index = 1)] - Discord(IdentityString), - #[codec(index = 2)] - Github(IdentityString), - - // web3 - #[codec(index = 3)] - Substrate(Address32), - #[codec(index = 4)] - Evm(Address20), - // bitcoin addresses are derived (one-way hash) from the pubkey - // by using `Address33` as the Identity handle, it requires that pubkey - // is retrievable by the wallet API when verifying the bitcoin account. - // e.g. unisat-wallet: https://docs.unisat.io/dev/unisat-developer-service/unisat-wallet#getpublickey - #[codec(index = 5)] - Bitcoin(Address33), - - #[codec(index = 6)] - Solana(Address32), -} - -impl Identity { - pub fn is_web2(&self) -> bool { - matches!(self, Self::Twitter(..) | Self::Discord(..) | Self::Github(..)) - } - - pub fn is_web3(&self) -> bool { - matches!(self, Self::Substrate(..) | Self::Evm(..) | Self::Bitcoin(..) | Self::Solana(..)) - } - - pub fn is_substrate(&self) -> bool { - matches!(self, Self::Substrate(..)) - } - - pub fn is_evm(&self) -> bool { - matches!(self, Self::Evm(..)) - } - - pub fn is_bitcoin(&self) -> bool { - matches!(self, Self::Bitcoin(..)) - } - - pub fn is_solana(&self) -> bool { - matches!(self, Self::Solana(..)) - } - - pub fn default_web3networks(&self) -> Vec { - match self { - Identity::Substrate(_) => all_substrate_web3networks(), - Identity::Evm(_) => all_evm_web3networks(), - Identity::Bitcoin(_) => all_bitcoin_web3networks(), - Identity::Solana(_) => all_solana_web3networks(), - Identity::Twitter(_) | Identity::Discord(_) | Identity::Github(_) => Vec::new(), - } - } - - // check if the given web3networks match the identity - pub fn matches_web3networks(&self, networks: &[Web3Network]) -> bool { - match self { - Identity::Substrate(_) => { - !networks.is_empty() && networks.iter().all(|n| n.is_substrate()) - }, - Identity::Evm(_) => !networks.is_empty() && networks.iter().all(|n| n.is_evm()), - Identity::Bitcoin(_) => !networks.is_empty() && networks.iter().all(|n| n.is_bitcoin()), - Identity::Solana(_) => !networks.is_empty() && networks.iter().all(|n| n.is_solana()), - Identity::Twitter(_) | Identity::Discord(_) | Identity::Github(_) => { - networks.is_empty() - }, - } - } - - /// Currently we only support mapping from Address32/Address20 to AccountId, not opposite. - pub fn to_account_id(&self) -> Option { - match self { - Identity::Substrate(address) | Identity::Solana(address) => Some(address.into()), - Identity::Evm(address) => { - Some(HashedAddressMapping::into_account_id(H160::from_slice(address.as_ref()))) - }, - Identity::Bitcoin(address) => Some(blake2_256(address.as_ref()).into()), - Identity::Twitter(_) | Identity::Discord(_) | Identity::Github(_) => None, - } - } - - pub fn from_did(s: &str) -> Result { - let did_prefix = String::from("did:litentry:"); - if s.starts_with(&did_prefix) { - let did_suffix = &s[did_prefix.len()..]; - let v: Vec<&str> = did_suffix.split(':').collect(); - if v.len() == 2 { - if v[0] == "substrate" { - let handle = decode_hex(v[1]) - .unwrap() - .as_slice() - .try_into() - .map_err(|_| "Address32 conversion error")?; - return Ok(Identity::Substrate(handle)); - } else if v[0] == "evm" { - let handle = decode_hex(v[1]) - .unwrap() - .as_slice() - .try_into() - .map_err(|_| "Address20 conversion error")?; - return Ok(Identity::Evm(handle)); - } else if v[0] == "bitcoin" { - let handle = decode_hex(v[1]) - .unwrap() - .as_slice() - .try_into() - .map_err(|_| "Address33 conversion error")?; - return Ok(Identity::Bitcoin(handle)); - } else if v[0] == "solana" { - let handle = v[1] - .from_base58() - .unwrap() - .as_slice() - .try_into() - .map_err(|_| "Address32 conversion error")?; - return Ok(Identity::Solana(handle)); - } else if v[0] == "github" { - return Ok(Identity::Github(IdentityString::new(v[1].as_bytes().to_vec()))); - } else if v[0] == "discord" { - return Ok(Identity::Discord(IdentityString::new(v[1].as_bytes().to_vec()))); - } else if v[0] == "twitter" { - return Ok(Identity::Twitter(IdentityString::new(v[1].as_bytes().to_vec()))); - } else { - return Err("Unknown did type"); - } - } else { - return Err("Wrong did suffix"); - } - } - - Err("Wrong did prefix") - } - - pub fn to_did(&self) -> Result { - Ok(format!( - "did:litentry:{}", - match self { - Identity::Evm(address) => format!("evm:{}", &hex_encode(address.as_ref())), - Identity::Substrate(address) => - format!("substrate:{}", &hex_encode(address.as_ref())), - Identity::Bitcoin(address) => format!("bitcoin:{}", &hex_encode(address.as_ref())), - Identity::Solana(address) => format!("solana:{}", address.as_ref().to_base58()), - Identity::Twitter(handle) => format!( - "twitter:{}", - str::from_utf8(handle.inner_ref()) - .map_err(|_| "twitter handle conversion error")? - ), - Identity::Discord(handle) => format!( - "discord:{}", - str::from_utf8(handle.inner_ref()) - .map_err(|_| "discord handle conversion error")? - ), - Identity::Github(handle) => format!( - "github:{}", - str::from_utf8(handle.inner_ref()) - .map_err(|_| "github handle conversion error")? - ), - } - )) - } -} - -impl From for Identity { - fn from(value: ed25519::Public) -> Self { - Identity::Substrate(value.into()) - } -} - -impl From for Identity { - fn from(value: sr25519::Public) -> Self { - Identity::Substrate(value.into()) - } -} - -impl From for Identity { - fn from(value: AccountId32) -> Self { - Identity::Substrate(value.into()) - } -} - -impl From for Identity { - fn from(value: Address32) -> Self { - Identity::Substrate(value) - } -} - -impl From for Identity { - fn from(value: Address20) -> Self { - Identity::Evm(value) - } -} - -impl From for Identity { - fn from(value: Address33) -> Self { - Identity::Bitcoin(value) - } -} - -impl From<[u8; 32]> for Identity { - fn from(value: [u8; 32]) -> Self { - Identity::Substrate(value.into()) - } -} - -impl From<[u8; 20]> for Identity { - fn from(value: [u8; 20]) -> Self { - Identity::Evm(value.into()) - } -} - -impl From<[u8; 33]> for Identity { - fn from(value: [u8; 33]) -> Self { - Identity::Bitcoin(value.into()) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use parity_scale_codec::DecodeAll; - use strum::IntoEnumIterator; - - #[test] - fn is_web2_works() { - Identity::iter().for_each(|identity| { - assert_eq!( - identity.is_web2(), - match identity { - Identity::Twitter(..) => true, - Identity::Discord(..) => true, - Identity::Github(..) => true, - Identity::Substrate(..) => false, - Identity::Evm(..) => false, - Identity::Bitcoin(..) => false, - Identity::Solana(..) => false, - } - ) - }) - } - - #[test] - fn is_web3_works() { - Identity::iter().for_each(|identity| { - assert_eq!( - identity.is_web3(), - match identity { - Identity::Twitter(..) => false, - Identity::Discord(..) => false, - Identity::Github(..) => false, - Identity::Substrate(..) => true, - Identity::Evm(..) => true, - Identity::Bitcoin(..) => true, - Identity::Solana(..) => true, - } - ) - }) - } - - #[test] - fn is_substrate_works() { - Identity::iter().for_each(|identity| { - assert_eq!( - identity.is_substrate(), - match identity { - Identity::Twitter(..) => false, - Identity::Discord(..) => false, - Identity::Github(..) => false, - Identity::Substrate(..) => true, - Identity::Evm(..) => false, - Identity::Bitcoin(..) => false, - Identity::Solana(..) => false, - } - ) - }) - } - - #[test] - fn is_evm_works() { - Identity::iter().for_each(|identity| { - assert_eq!( - identity.is_evm(), - match identity { - Identity::Twitter(..) => false, - Identity::Discord(..) => false, - Identity::Github(..) => false, - Identity::Substrate(..) => false, - Identity::Evm(..) => true, - Identity::Bitcoin(..) => false, - Identity::Solana(..) => false, - } - ) - }) - } - - #[test] - fn is_bitcoin_works() { - Identity::iter().for_each(|identity| { - assert_eq!( - identity.is_bitcoin(), - match identity { - Identity::Twitter(..) => false, - Identity::Discord(..) => false, - Identity::Github(..) => false, - Identity::Substrate(..) => false, - Identity::Evm(..) => false, - Identity::Bitcoin(..) => true, - Identity::Solana(..) => false, - } - ) - }) - } - - #[test] - fn is_solana_works() { - Identity::iter().for_each(|identity| { - assert_eq!( - identity.is_solana(), - match identity { - Identity::Twitter(..) => false, - Identity::Discord(..) => false, - Identity::Github(..) => false, - Identity::Substrate(..) => false, - Identity::Evm(..) => false, - Identity::Bitcoin(..) => false, - Identity::Solana(..) => true, - } - ) - }) - } - - #[test] - fn matches_web3networks_works() { - // web2 identity - let mut id = Identity::Twitter(IdentityString::new("alice".as_bytes().to_vec())); - let mut networks: Vec = vec![]; - assert!(id.matches_web3networks(&networks)); - networks = vec![Web3Network::Litentry]; - assert!(!id.matches_web3networks(&networks)); - - // substrate identity - id = Identity::Substrate(Default::default()); - networks = vec![]; - assert!(!id.matches_web3networks(&networks)); - networks = vec![Web3Network::Bsc, Web3Network::Litentry]; - assert!(!id.matches_web3networks(&networks)); - networks = vec![Web3Network::Litentry, Web3Network::Kusama]; - assert!(id.matches_web3networks(&networks)); - - // evm identity - id = Identity::Evm(Default::default()); - networks = vec![]; - assert!(!id.matches_web3networks(&networks)); - networks = vec![Web3Network::Bsc, Web3Network::Litentry]; - assert!(!id.matches_web3networks(&networks)); - networks = vec![Web3Network::Bsc, Web3Network::Ethereum]; - assert!(id.matches_web3networks(&networks)); - - // solana identity - id = Identity::Solana(Default::default()); - networks = vec![]; - assert!(!id.matches_web3networks(&networks)); - networks = vec![Web3Network::Bsc, Web3Network::Litentry]; - assert!(!id.matches_web3networks(&networks)); - networks = vec![Web3Network::Bsc, Web3Network::Ethereum]; - assert!(!id.matches_web3networks(&networks)); - networks = vec![Web3Network::Solana]; - assert!(id.matches_web3networks(&networks)); - } - - #[test] - fn test_encode_identity_string() { - //it should be encoded to inner representation - let identity_string = IdentityString::new("mock_user".as_bytes().to_vec()); - let inner: IdentityInnerString = BoundedVec::truncate_from("mock_user".as_bytes().to_vec()); - assert_eq!(inner.encode(), identity_string.encode()) - } - - #[test] - fn test_decode_identity_string() { - let decoded: Vec = vec![36, 109, 111, 99, 107, 95, 117, 115, 101, 114]; - let identity_string: IdentityString = - IdentityString::decode_all(&mut decoded.as_slice()).unwrap(); - assert_eq!(identity_string, IdentityString::new("mock_user".as_bytes().to_vec())); - } - - #[test] - fn test_substrate_did() { - let identity = Identity::Substrate([0; 32].into()); - let did_str = "did:litentry:substrate:0x0000000000000000000000000000000000000000000000000000000000000000"; - assert_eq!(identity.to_did().unwrap(), did_str); - assert_eq!(Identity::from_did(did_str).unwrap(), identity); - } - - #[test] - fn test_evm_did() { - let identity = Identity::Evm([0; 20].into()); - let did_str = "did:litentry:evm:0x0000000000000000000000000000000000000000"; - assert_eq!(identity.to_did().unwrap(), did_str); - assert_eq!(Identity::from_did(did_str).unwrap(), identity); - } - - #[test] - fn test_bitcoin_did() { - let identity = Identity::Bitcoin([0; 33].into()); - let did_str = "did:litentry:bitcoin:0x000000000000000000000000000000000000000000000000000000000000000000"; - assert_eq!(identity.to_did().unwrap(), did_str); - assert_eq!(Identity::from_did(did_str).unwrap(), identity); - } - - #[test] - fn test_discord_did() { - let identity = Identity::Discord(IdentityString::new("discord_handle".as_bytes().to_vec())); - let did_str = "did:litentry:discord:discord_handle"; - assert_eq!(identity.to_did().unwrap(), did_str); - assert_eq!(Identity::from_did(did_str).unwrap(), identity); - } - - #[test] - fn test_twitter_did() { - let identity = Identity::Twitter(IdentityString::new("twitter_handle".as_bytes().to_vec())); - let did_str = "did:litentry:twitter:twitter_handle"; - assert_eq!(identity.to_did().unwrap(), did_str); - assert_eq!(Identity::from_did(did_str).unwrap(), identity); - } - - #[test] - fn test_github_did() { - let identity = Identity::Github(IdentityString::new("github_handle".as_bytes().to_vec())); - let did_str = "did:litentry:github:github_handle"; - assert_eq!(identity.to_did().unwrap(), did_str); - assert_eq!(Identity::from_did(did_str).unwrap(), identity); - } - - #[test] - fn test_solana_did() { - let address = "4fuUiYxTQ6QCrdSq9ouBYcTM7bqSwYTSyLueGZLTy4T4"; - let identity = - Identity::Solana(address.from_base58().unwrap().as_slice().try_into().unwrap()); - let did = format!("did:litentry:solana:{}", address); - assert_eq!(identity.to_did().unwrap(), did.as_str()); - assert_eq!(Identity::from_did(did.as_str()).unwrap(), identity); - } -} diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs deleted file mode 100644 index 2eaf3729fa..0000000000 --- a/primitives/core/src/lib.rs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2020-2024 Trust Computing GmbH. -// This file is part of Litentry. -// -// Litentry is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Litentry is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Litentry. If not, see . - -#![cfg_attr(not(feature = "std"), no_std)] -#![allow(clippy::identity_op)] - -mod error; -pub use error::*; - -mod vc; -pub use vc::*; - -pub mod assertion; -pub use assertion::Assertion; - -pub mod identity; -pub use identity::*; - -extern crate alloc; -extern crate core; -use alloc::{format, str, str::FromStr, string::String, vec, vec::Vec}; -use core::hash::Hash as CoreHash; -use sp_runtime::{traits::ConstU32, BoundedVec}; - -pub use constants::*; -pub use litentry_proc_macros::*; -pub use opaque::*; -pub use types::*; - -pub type ParameterString = BoundedVec>; - -/// Common types of parachains. -mod types { - use sp_runtime::{ - traits::{IdentifyAccount, Verify}, - MultiSignature, - }; - /// Alias to 512-bit hash when used in the context of a transaction signature on the chain. - pub type Signature = MultiSignature; - - /// Some way of identifying an account on the chain. We intentionally make it equivalent - /// to the public key of our transaction signing scheme. - pub type AccountId = <::Signer as IdentifyAccount>::AccountId; - - /// Signed version of Balance - pub type Amount = i128; - - /// AssetId type - pub type AssetId = u128; - - /// Balance of an account. - pub type Balance = u128; - - /// Index of a transaction in the chain. - pub type Nonce = u32; - - /// A hash of some data used by the chain. - pub type Hash = sp_core::H256; - - /// An index to a block. - pub type BlockNumber = u32; - - // Weight Type for XCM - pub type Weight = frame_support::weights::Weight; -} - -/// Common constants of parachains. -mod constants { - use super::types::BlockNumber; - - pub const LITENTRY_PARA_ID: u32 = 2013; - pub const ROCOCO_PARA_ID: u32 = 2106; // will be replaced by paseo - pub const PASEO_PARA_ID: u32 = 2106; // will be replaced by paseo - - /// This determines the average expected block time that we are targeting. - /// Blocks will be produced at a minimum duration defined by `SLOT_DURATION`. - /// `SLOT_DURATION` is picked up by `pallet_timestamp` which is in turn picked - /// up by `pallet_aura` to implement `fn slot_duration()`. - /// - /// Change this to adjust the block time. - pub const MILLISECS_PER_BLOCK: u64 = 12000; - - // NOTE: Currently it is not possible to change the slot duration after the chain has started. - // Attempting to do so will brick block production. - pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK; - - // Time is measured by number of blocks. - pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber); - pub const HOURS: BlockNumber = MINUTES * 60; - pub const DAYS: BlockNumber = HOURS * 24; - // 365.25 DAYS = 8766 HOURS - pub const YEARS: BlockNumber = HOURS * 8766; -} - -/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know -/// the specifics of the runtime. They can then be made to be agnostic over specific formats -/// of data like extrinsics, allowing for them to continue syncing the network through upgrades -/// to even the core data structures. -pub mod opaque { - use super::*; - use sp_runtime::{generic, traits::BlakeTwo256}; - - pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic; - /// Opaque block header type. - pub type Header = generic::Header; - /// Opaque block type. - pub type Block = generic::Block; - /// Opaque block identifier type. - pub type BlockId = generic::BlockId; -} diff --git a/scripts/extrinsic-ordering-filter.sh b/scripts/extrinsic-ordering-filter.sh deleted file mode 100755 index 4fd3337f64..0000000000 --- a/scripts/extrinsic-ordering-filter.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# This script is used in a Github Workflow. It helps filtering out what is interesting -# when comparing metadata and spot what would require a tx version bump. - -# shellcheck disable=SC2002,SC2086 - -FILE=$1 - -# Higlight indexes that were deleted -function find_deletions() { - echo "\n## Deletions\n" - RES=$(cat "$FILE" | grep -n '\[\-\]' | tr -s " ") - if [ "$RES" ]; then - echo "$RES" | awk '{ printf "%s\\n", $0 }' - else - echo "n/a" - fi -} - -# Highlight indexes that have been deleted -function find_index_changes() { - echo "\n## Index changes\n" - RES=$(cat "$FILE" | grep -E -n -i 'idx:\s*([0-9]+)\s*(->)\s*([0-9]+)' | tr -s " ") - if [ "$RES" ]; then - echo "$RES" | awk '{ printf "%s\\n", $0 }' - else - echo "n/a" - fi -} - -# Highlight values that decreased -function find_decreases() { - echo "\n## Decreases\n" - OUT=$(cat "$FILE" | grep -E -i -o '([0-9]+)\s*(->)\s*([0-9]+)' | awk '$1 > $3 { printf "%s;", $0 }') - IFS=$';' LIST=("$OUT") - unset RES - for line in "${LIST[@]}"; do - RES="$RES\n$(cat "$FILE" | grep -E -i -n \"$line\" | tr -s " ")" - done - - if [ "$RES" ]; then - echo "$RES" | awk '{ printf "%s\\n", $0 }' | sort -u -g | uniq - else - echo "n/a" - fi -} - -echo "\n------------------------------ SUMMARY -------------------------------" -echo "\n⚠️ This filter is here to help spotting changes that should be reviewed carefully." -echo "\n⚠️ It catches only index changes, deletions and value decreases". - -find_deletions "$FILE" -find_index_changes "$FILE" -find_decreases "$FILE" -echo "\n----------------------------------------------------------------------\n" diff --git a/scripts/ts-utils/package.json b/scripts/ts-utils/package.json deleted file mode 100644 index 81295adfe9..0000000000 --- a/scripts/ts-utils/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "ts-utils", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "format": "pnpm exec prettier --write '**.ts'" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "@polkadot/api": "^10.3.1", - "@polkadot/util-crypto": "^13.0.2", - "colors": "^1.4.0", - "ethers": "^6.13.2", - "exceljs": "^4.3.0", - "prettier": "^2.8.7", - "ts-node": "^10.9.1", - "typescript": "^5.0.4" - }, - "devDependencies": { - "@types/node": "^18.15.11" - }, - "packageManager": "pnpm@8.7.6" -} diff --git a/bitacross-worker/.dockerignore b/tee-worker/bitacross/.dockerignore similarity index 100% rename from bitacross-worker/.dockerignore rename to tee-worker/bitacross/.dockerignore diff --git a/bitacross-worker/.editorconfig b/tee-worker/bitacross/.editorconfig similarity index 100% rename from bitacross-worker/.editorconfig rename to tee-worker/bitacross/.editorconfig diff --git a/bitacross-worker/.env.dev b/tee-worker/bitacross/.env.dev similarity index 100% rename from bitacross-worker/.env.dev rename to tee-worker/bitacross/.env.dev diff --git a/bitacross-worker/.gitattributes.orig b/tee-worker/bitacross/.gitattributes.orig similarity index 100% rename from bitacross-worker/.gitattributes.orig rename to tee-worker/bitacross/.gitattributes.orig diff --git a/bitacross-worker/.githooks/pre-commit b/tee-worker/bitacross/.githooks/pre-commit similarity index 100% rename from bitacross-worker/.githooks/pre-commit rename to tee-worker/bitacross/.githooks/pre-commit diff --git a/bitacross-worker/.gitignore b/tee-worker/bitacross/.gitignore similarity index 100% rename from bitacross-worker/.gitignore rename to tee-worker/bitacross/.gitignore diff --git a/bitacross-worker/.taplo.toml b/tee-worker/bitacross/.taplo.toml similarity index 100% rename from bitacross-worker/.taplo.toml rename to tee-worker/bitacross/.taplo.toml diff --git a/bitacross-worker/Cargo.lock b/tee-worker/bitacross/Cargo.lock similarity index 100% rename from bitacross-worker/Cargo.lock rename to tee-worker/bitacross/Cargo.lock diff --git a/bitacross-worker/Cargo.toml b/tee-worker/bitacross/Cargo.toml similarity index 100% rename from bitacross-worker/Cargo.toml rename to tee-worker/bitacross/Cargo.toml diff --git a/bitacross-worker/DESIGN.md b/tee-worker/bitacross/DESIGN.md similarity index 100% rename from bitacross-worker/DESIGN.md rename to tee-worker/bitacross/DESIGN.md diff --git a/bitacross-worker/Dockerfile b/tee-worker/bitacross/Dockerfile similarity index 100% rename from bitacross-worker/Dockerfile rename to tee-worker/bitacross/Dockerfile diff --git a/bitacross-worker/Jenkinsfile b/tee-worker/bitacross/Jenkinsfile similarity index 100% rename from bitacross-worker/Jenkinsfile rename to tee-worker/bitacross/Jenkinsfile diff --git a/bitacross-worker/LICENSE b/tee-worker/bitacross/LICENSE similarity index 100% rename from bitacross-worker/LICENSE rename to tee-worker/bitacross/LICENSE diff --git a/bitacross-worker/Makefile b/tee-worker/bitacross/Makefile similarity index 100% rename from bitacross-worker/Makefile rename to tee-worker/bitacross/Makefile diff --git a/bitacross-worker/README.md b/tee-worker/bitacross/README.md similarity index 100% rename from bitacross-worker/README.md rename to tee-worker/bitacross/README.md diff --git a/bitacross-worker/UpdateRustSGXSDK.mk b/tee-worker/bitacross/UpdateRustSGXSDK.mk similarity index 100% rename from bitacross-worker/UpdateRustSGXSDK.mk rename to tee-worker/bitacross/UpdateRustSGXSDK.mk diff --git a/bitacross-worker/app-libs/parentchain-interface/Cargo.toml b/tee-worker/bitacross/app-libs/parentchain-interface/Cargo.toml similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/Cargo.toml rename to tee-worker/bitacross/app-libs/parentchain-interface/Cargo.toml diff --git a/bitacross-worker/app-libs/parentchain-interface/src/event_subscriber.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/event_subscriber.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/event_subscriber.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/event_subscriber.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/integritee/event_filter.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/integritee/event_filter.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/integritee/event_filter.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/integritee/event_filter.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/integritee/event_handler.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/integritee/event_handler.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/integritee/event_handler.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/integritee/event_handler.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/integritee/mod.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/integritee/mod.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/integritee/mod.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/integritee/mod.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/lib.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/lib.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/lib.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/lib.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/target_a/event_filter.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/target_a/event_filter.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/target_a/event_filter.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/target_a/event_filter.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/target_a/event_handler.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/target_a/event_handler.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/target_a/event_handler.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/target_a/event_handler.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/target_a/mod.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/target_a/mod.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/target_a/mod.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/target_a/mod.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/target_b/event_filter.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/target_b/event_filter.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/target_b/event_filter.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/target_b/event_filter.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/target_b/event_handler.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/target_b/event_handler.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/target_b/event_handler.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/target_b/event_handler.rs diff --git a/bitacross-worker/app-libs/parentchain-interface/src/target_b/mod.rs b/tee-worker/bitacross/app-libs/parentchain-interface/src/target_b/mod.rs similarity index 100% rename from bitacross-worker/app-libs/parentchain-interface/src/target_b/mod.rs rename to tee-worker/bitacross/app-libs/parentchain-interface/src/target_b/mod.rs diff --git a/bitacross-worker/app-libs/sgx-runtime/Cargo.toml b/tee-worker/bitacross/app-libs/sgx-runtime/Cargo.toml similarity index 96% rename from bitacross-worker/app-libs/sgx-runtime/Cargo.toml rename to tee-worker/bitacross/app-libs/sgx-runtime/Cargo.toml index fbc22b5acd..444efe9a53 100644 --- a/bitacross-worker/app-libs/sgx-runtime/Cargo.toml +++ b/tee-worker/bitacross/app-libs/sgx-runtime/Cargo.toml @@ -29,7 +29,7 @@ sp-std = { default-features = false, git = "https://github.com/paritytech/substr sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } -pallet-parentchain = { path = "../../../worker-pallets/parentchain", default-features = false } +pallet-parentchain = { path = "../../../../parachain/worker-pallets/parentchain", default-features = false } [features] default = ["std"] diff --git a/bitacross-worker/app-libs/sgx-runtime/src/lib.rs b/tee-worker/bitacross/app-libs/sgx-runtime/src/lib.rs similarity index 100% rename from bitacross-worker/app-libs/sgx-runtime/src/lib.rs rename to tee-worker/bitacross/app-libs/sgx-runtime/src/lib.rs diff --git a/bitacross-worker/app-libs/stf/Cargo.toml b/tee-worker/bitacross/app-libs/stf/Cargo.toml similarity index 94% rename from bitacross-worker/app-libs/stf/Cargo.toml rename to tee-worker/bitacross/app-libs/stf/Cargo.toml index 8e79545e47..df7df883aa 100644 --- a/bitacross-worker/app-libs/stf/Cargo.toml +++ b/tee-worker/bitacross/app-libs/stf/Cargo.toml @@ -36,9 +36,9 @@ sp-runtime = { default-features = false, git = "https://github.com/paritytech/su sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } # litentry -litentry-macros = { path = "../../../primitives/core/macros", default-features = false } +litentry-macros = { path = "../../../../common/primitives/core/macros", default-features = false } litentry-primitives = { path = "../../litentry/primitives", default-features = false } -pallet-parentchain = { path = "../../../worker-pallets/parentchain", default-features = false } +pallet-parentchain = { path = "../../../../parachain/worker-pallets/parentchain", default-features = false } [dev-dependencies] sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } diff --git a/bitacross-worker/app-libs/stf/src/getter.rs b/tee-worker/bitacross/app-libs/stf/src/getter.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/getter.rs rename to tee-worker/bitacross/app-libs/stf/src/getter.rs diff --git a/bitacross-worker/app-libs/stf/src/hash.rs b/tee-worker/bitacross/app-libs/stf/src/hash.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/hash.rs rename to tee-worker/bitacross/app-libs/stf/src/hash.rs diff --git a/bitacross-worker/app-libs/stf/src/helpers.rs b/tee-worker/bitacross/app-libs/stf/src/helpers.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/helpers.rs rename to tee-worker/bitacross/app-libs/stf/src/helpers.rs diff --git a/bitacross-worker/app-libs/stf/src/lib.rs b/tee-worker/bitacross/app-libs/stf/src/lib.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/lib.rs rename to tee-worker/bitacross/app-libs/stf/src/lib.rs diff --git a/bitacross-worker/app-libs/stf/src/stf_sgx.rs b/tee-worker/bitacross/app-libs/stf/src/stf_sgx.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/stf_sgx.rs rename to tee-worker/bitacross/app-libs/stf/src/stf_sgx.rs diff --git a/bitacross-worker/app-libs/stf/src/stf_sgx_primitives.rs b/tee-worker/bitacross/app-libs/stf/src/stf_sgx_primitives.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/stf_sgx_primitives.rs rename to tee-worker/bitacross/app-libs/stf/src/stf_sgx_primitives.rs diff --git a/bitacross-worker/app-libs/stf/src/stf_sgx_tests.rs b/tee-worker/bitacross/app-libs/stf/src/stf_sgx_tests.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/stf_sgx_tests.rs rename to tee-worker/bitacross/app-libs/stf/src/stf_sgx_tests.rs diff --git a/bitacross-worker/app-libs/stf/src/test_genesis.rs b/tee-worker/bitacross/app-libs/stf/src/test_genesis.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/test_genesis.rs rename to tee-worker/bitacross/app-libs/stf/src/test_genesis.rs diff --git a/bitacross-worker/app-libs/stf/src/trusted_call.rs b/tee-worker/bitacross/app-libs/stf/src/trusted_call.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/trusted_call.rs rename to tee-worker/bitacross/app-libs/stf/src/trusted_call.rs diff --git a/bitacross-worker/app-libs/stf/src/trusted_call_result.rs b/tee-worker/bitacross/app-libs/stf/src/trusted_call_result.rs similarity index 100% rename from bitacross-worker/app-libs/stf/src/trusted_call_result.rs rename to tee-worker/bitacross/app-libs/stf/src/trusted_call_result.rs diff --git a/bitacross-worker/assets/teebag_registry.gif b/tee-worker/bitacross/assets/teebag_registry.gif similarity index 100% rename from bitacross-worker/assets/teebag_registry.gif rename to tee-worker/bitacross/assets/teebag_registry.gif diff --git a/bitacross-worker/bin/README.md b/tee-worker/bitacross/bin/README.md similarity index 100% rename from bitacross-worker/bin/README.md rename to tee-worker/bitacross/bin/README.md diff --git a/bitacross-worker/bitacross/core/bc-enclave-registry/Cargo.toml b/tee-worker/bitacross/bitacross/core/bc-enclave-registry/Cargo.toml similarity index 100% rename from bitacross-worker/bitacross/core/bc-enclave-registry/Cargo.toml rename to tee-worker/bitacross/bitacross/core/bc-enclave-registry/Cargo.toml diff --git a/bitacross-worker/bitacross/core/bc-enclave-registry/src/lib.rs b/tee-worker/bitacross/bitacross/core/bc-enclave-registry/src/lib.rs similarity index 100% rename from bitacross-worker/bitacross/core/bc-enclave-registry/src/lib.rs rename to tee-worker/bitacross/bitacross/core/bc-enclave-registry/src/lib.rs diff --git a/bitacross-worker/bitacross/core/bc-musig2-ceremony/Cargo.toml b/tee-worker/bitacross/bitacross/core/bc-musig2-ceremony/Cargo.toml similarity index 100% rename from bitacross-worker/bitacross/core/bc-musig2-ceremony/Cargo.toml rename to tee-worker/bitacross/bitacross/core/bc-musig2-ceremony/Cargo.toml diff --git a/bitacross-worker/bitacross/core/bc-musig2-ceremony/src/lib.rs b/tee-worker/bitacross/bitacross/core/bc-musig2-ceremony/src/lib.rs similarity index 100% rename from bitacross-worker/bitacross/core/bc-musig2-ceremony/src/lib.rs rename to tee-worker/bitacross/bitacross/core/bc-musig2-ceremony/src/lib.rs diff --git a/bitacross-worker/bitacross/core/bc-musig2-event/Cargo.toml b/tee-worker/bitacross/bitacross/core/bc-musig2-event/Cargo.toml similarity index 100% rename from bitacross-worker/bitacross/core/bc-musig2-event/Cargo.toml rename to tee-worker/bitacross/bitacross/core/bc-musig2-event/Cargo.toml diff --git a/bitacross-worker/bitacross/core/bc-musig2-event/src/lib.rs b/tee-worker/bitacross/bitacross/core/bc-musig2-event/src/lib.rs similarity index 100% rename from bitacross-worker/bitacross/core/bc-musig2-event/src/lib.rs rename to tee-worker/bitacross/bitacross/core/bc-musig2-event/src/lib.rs diff --git a/bitacross-worker/bitacross/core/bc-relayer-registry/Cargo.toml b/tee-worker/bitacross/bitacross/core/bc-relayer-registry/Cargo.toml similarity index 100% rename from bitacross-worker/bitacross/core/bc-relayer-registry/Cargo.toml rename to tee-worker/bitacross/bitacross/core/bc-relayer-registry/Cargo.toml diff --git a/bitacross-worker/bitacross/core/bc-relayer-registry/src/lib.rs b/tee-worker/bitacross/bitacross/core/bc-relayer-registry/src/lib.rs similarity index 100% rename from bitacross-worker/bitacross/core/bc-relayer-registry/src/lib.rs rename to tee-worker/bitacross/bitacross/core/bc-relayer-registry/src/lib.rs diff --git a/bitacross-worker/bitacross/core/bc-signer-registry/Cargo.toml b/tee-worker/bitacross/bitacross/core/bc-signer-registry/Cargo.toml similarity index 100% rename from bitacross-worker/bitacross/core/bc-signer-registry/Cargo.toml rename to tee-worker/bitacross/bitacross/core/bc-signer-registry/Cargo.toml diff --git a/bitacross-worker/bitacross/core/bc-signer-registry/src/lib.rs b/tee-worker/bitacross/bitacross/core/bc-signer-registry/src/lib.rs similarity index 100% rename from bitacross-worker/bitacross/core/bc-signer-registry/src/lib.rs rename to tee-worker/bitacross/bitacross/core/bc-signer-registry/src/lib.rs diff --git a/bitacross-worker/bitacross/core/bc-task-processor/Cargo.toml b/tee-worker/bitacross/bitacross/core/bc-task-processor/Cargo.toml similarity index 100% rename from bitacross-worker/bitacross/core/bc-task-processor/Cargo.toml rename to tee-worker/bitacross/bitacross/core/bc-task-processor/Cargo.toml diff --git a/bitacross-worker/bitacross/core/bc-task-processor/src/lib.rs b/tee-worker/bitacross/bitacross/core/bc-task-processor/src/lib.rs similarity index 100% rename from bitacross-worker/bitacross/core/bc-task-processor/src/lib.rs rename to tee-worker/bitacross/bitacross/core/bc-task-processor/src/lib.rs diff --git a/bitacross-worker/bitacross/core/bc-task-sender/Cargo.toml b/tee-worker/bitacross/bitacross/core/bc-task-sender/Cargo.toml similarity index 100% rename from bitacross-worker/bitacross/core/bc-task-sender/Cargo.toml rename to tee-worker/bitacross/bitacross/core/bc-task-sender/Cargo.toml diff --git a/bitacross-worker/bitacross/core/bc-task-sender/src/lib.rs b/tee-worker/bitacross/bitacross/core/bc-task-sender/src/lib.rs similarity index 100% rename from bitacross-worker/bitacross/core/bc-task-sender/src/lib.rs rename to tee-worker/bitacross/bitacross/core/bc-task-sender/src/lib.rs diff --git a/bitacross-worker/build.Dockerfile b/tee-worker/bitacross/build.Dockerfile similarity index 88% rename from bitacross-worker/build.Dockerfile rename to tee-worker/bitacross/build.Dockerfile index 66318a63aa..a9c342461e 100644 --- a/bitacross-worker/build.Dockerfile +++ b/tee-worker/bitacross/build.Dockerfile @@ -56,7 +56,7 @@ ARG FINGERPRINT=none ARG SGX_COMMERCIAL_KEY ENV SGX_COMMERCIAL_KEY=$SGX_COMMERCIAL_KEY -WORKDIR $HOME/bitacross-worker +WORKDIR $HOME/tee-worker/bitacross COPY . $HOME RUN unset RUSTC_WRAPPER; @@ -84,8 +84,8 @@ ARG LOG_DIR=/usr/local/log ENV SCRIPT_DIR ${SCRIPT_DIR} ENV LOG_DIR ${LOG_DIR} -COPY --from=local-builder:latest /home/ubuntu/bitacross-worker/bin/bitacross-cli /usr/local/bin -COPY --from=local-builder:latest /home/ubuntu/bitacross-worker/cli/*.sh /usr/local/worker-cli/ +COPY --from=local-builder:latest /home/ubuntu/tee-worker/bitacross/bin/bitacross-cli /usr/local/bin +COPY --from=local-builder:latest /home/ubuntu/tee-worker/bitacross/cli/*.sh /usr/local/worker-cli/ RUN chmod +x /usr/local/bin/bitacross-cli ${SCRIPT_DIR}/*.sh RUN mkdir ${LOG_DIR} @@ -103,8 +103,8 @@ LABEL maintainer="Trust Computing GmbH " WORKDIR /usr/local/bin COPY --from=local-builder:latest /opt/sgxsdk /opt/sgxsdk -COPY --from=local-builder:latest /home/ubuntu/bitacross-worker/bin/* /usr/local/bin -COPY --from=local-builder:latest /home/ubuntu/bitacross-worker/cli/*.sh /usr/local/worker-cli/ +COPY --from=local-builder:latest /home/ubuntu/tee-worker/bitacross/bin/* /usr/local/bin +COPY --from=local-builder:latest /home/ubuntu/tee-worker/bitacross/cli/*.sh /usr/local/worker-cli/ COPY --from=local-builder:latest /lib/x86_64-linux-gnu/libsgx* /lib/x86_64-linux-gnu/ COPY --from=local-builder:latest /lib/x86_64-linux-gnu/libdcap* /lib/x86_64-linux-gnu/ COPY --from=local-builder:latest /lib/x86_64-linux-gnu/libprotobuf* /lib/x86_64-linux-gnu/ @@ -157,9 +157,9 @@ ENV LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${SGX_SDK}/sdk_libs" RUN mkdir -p /origin /data -COPY --from=local-builder:latest /home/ubuntu/bitacross-worker/bin/* /origin -COPY --from=local-builder:latest /home/ubuntu/bitacross-worker/mrenclave.txt /origin -COPY --from=local-builder:latest /home/ubuntu/bitacross-worker/entrypoint.sh /usr/local/bin/entrypoint.sh +COPY --from=local-builder:latest /home/ubuntu/tee-worker/bitacross/bin/* /origin +COPY --from=local-builder:latest /home/ubuntu/tee-worker/bitacross/mrenclave.txt /origin +COPY --from=local-builder:latest /home/ubuntu/tee-worker/bitacross/entrypoint.sh /usr/local/bin/entrypoint.sh WORKDIR /origin diff --git a/bitacross-worker/cli/Cargo.toml b/tee-worker/bitacross/cli/Cargo.toml similarity index 100% rename from bitacross-worker/cli/Cargo.toml rename to tee-worker/bitacross/cli/Cargo.toml diff --git a/bitacross-worker/cli/README.md b/tee-worker/bitacross/cli/README.md similarity index 100% rename from bitacross-worker/cli/README.md rename to tee-worker/bitacross/cli/README.md diff --git a/bitacross-worker/cli/benchmark.sh b/tee-worker/bitacross/cli/benchmark.sh similarity index 100% rename from bitacross-worker/cli/benchmark.sh rename to tee-worker/bitacross/cli/benchmark.sh diff --git a/bitacross-worker/cli/lit_parentchain_nonce.sh b/tee-worker/bitacross/cli/lit_parentchain_nonce.sh similarity index 100% rename from bitacross-worker/cli/lit_parentchain_nonce.sh rename to tee-worker/bitacross/cli/lit_parentchain_nonce.sh diff --git a/bitacross-worker/cli/lit_ts_integration_test.sh b/tee-worker/bitacross/cli/lit_ts_integration_test.sh similarity index 100% rename from bitacross-worker/cli/lit_ts_integration_test.sh rename to tee-worker/bitacross/cli/lit_ts_integration_test.sh diff --git a/bitacross-worker/cli/src/attesteer/commands/mod.rs b/tee-worker/bitacross/cli/src/attesteer/commands/mod.rs similarity index 100% rename from bitacross-worker/cli/src/attesteer/commands/mod.rs rename to tee-worker/bitacross/cli/src/attesteer/commands/mod.rs diff --git a/bitacross-worker/cli/src/attesteer/commands/send_dcap_quote.rs b/tee-worker/bitacross/cli/src/attesteer/commands/send_dcap_quote.rs similarity index 100% rename from bitacross-worker/cli/src/attesteer/commands/send_dcap_quote.rs rename to tee-worker/bitacross/cli/src/attesteer/commands/send_dcap_quote.rs diff --git a/bitacross-worker/cli/src/attesteer/commands/send_ias_attestation.rs b/tee-worker/bitacross/cli/src/attesteer/commands/send_ias_attestation.rs similarity index 100% rename from bitacross-worker/cli/src/attesteer/commands/send_ias_attestation.rs rename to tee-worker/bitacross/cli/src/attesteer/commands/send_ias_attestation.rs diff --git a/bitacross-worker/cli/src/attesteer/mod.rs b/tee-worker/bitacross/cli/src/attesteer/mod.rs similarity index 100% rename from bitacross-worker/cli/src/attesteer/mod.rs rename to tee-worker/bitacross/cli/src/attesteer/mod.rs diff --git a/bitacross-worker/cli/src/base_cli/commands/balance.rs b/tee-worker/bitacross/cli/src/base_cli/commands/balance.rs similarity index 100% rename from bitacross-worker/cli/src/base_cli/commands/balance.rs rename to tee-worker/bitacross/cli/src/base_cli/commands/balance.rs diff --git a/bitacross-worker/cli/src/base_cli/commands/faucet.rs b/tee-worker/bitacross/cli/src/base_cli/commands/faucet.rs similarity index 100% rename from bitacross-worker/cli/src/base_cli/commands/faucet.rs rename to tee-worker/bitacross/cli/src/base_cli/commands/faucet.rs diff --git a/bitacross-worker/cli/src/base_cli/commands/listen.rs b/tee-worker/bitacross/cli/src/base_cli/commands/listen.rs similarity index 100% rename from bitacross-worker/cli/src/base_cli/commands/listen.rs rename to tee-worker/bitacross/cli/src/base_cli/commands/listen.rs diff --git a/bitacross-worker/cli/src/base_cli/commands/litentry/mod.rs b/tee-worker/bitacross/cli/src/base_cli/commands/litentry/mod.rs similarity index 100% rename from bitacross-worker/cli/src/base_cli/commands/litentry/mod.rs rename to tee-worker/bitacross/cli/src/base_cli/commands/litentry/mod.rs diff --git a/bitacross-worker/cli/src/base_cli/commands/mod.rs b/tee-worker/bitacross/cli/src/base_cli/commands/mod.rs similarity index 100% rename from bitacross-worker/cli/src/base_cli/commands/mod.rs rename to tee-worker/bitacross/cli/src/base_cli/commands/mod.rs diff --git a/bitacross-worker/cli/src/base_cli/commands/register_tcb_info.rs b/tee-worker/bitacross/cli/src/base_cli/commands/register_tcb_info.rs similarity index 100% rename from bitacross-worker/cli/src/base_cli/commands/register_tcb_info.rs rename to tee-worker/bitacross/cli/src/base_cli/commands/register_tcb_info.rs diff --git a/bitacross-worker/cli/src/base_cli/commands/transfer.rs b/tee-worker/bitacross/cli/src/base_cli/commands/transfer.rs similarity index 100% rename from bitacross-worker/cli/src/base_cli/commands/transfer.rs rename to tee-worker/bitacross/cli/src/base_cli/commands/transfer.rs diff --git a/bitacross-worker/cli/src/base_cli/mod.rs b/tee-worker/bitacross/cli/src/base_cli/mod.rs similarity index 100% rename from bitacross-worker/cli/src/base_cli/mod.rs rename to tee-worker/bitacross/cli/src/base_cli/mod.rs diff --git a/bitacross-worker/cli/src/benchmark/mod.rs b/tee-worker/bitacross/cli/src/benchmark/mod.rs similarity index 100% rename from bitacross-worker/cli/src/benchmark/mod.rs rename to tee-worker/bitacross/cli/src/benchmark/mod.rs diff --git a/bitacross-worker/cli/src/command_utils.rs b/tee-worker/bitacross/cli/src/command_utils.rs similarity index 100% rename from bitacross-worker/cli/src/command_utils.rs rename to tee-worker/bitacross/cli/src/command_utils.rs diff --git a/bitacross-worker/cli/src/commands.rs b/tee-worker/bitacross/cli/src/commands.rs similarity index 100% rename from bitacross-worker/cli/src/commands.rs rename to tee-worker/bitacross/cli/src/commands.rs diff --git a/bitacross-worker/cli/src/lib.rs b/tee-worker/bitacross/cli/src/lib.rs similarity index 100% rename from bitacross-worker/cli/src/lib.rs rename to tee-worker/bitacross/cli/src/lib.rs diff --git a/bitacross-worker/cli/src/main.rs b/tee-worker/bitacross/cli/src/main.rs similarity index 100% rename from bitacross-worker/cli/src/main.rs rename to tee-worker/bitacross/cli/src/main.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/balance.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/balance.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/balance.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/balance.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/bitacross/direct_call_sign_bitcoin.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/bitacross/direct_call_sign_bitcoin.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/bitacross/direct_call_sign_bitcoin.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/bitacross/direct_call_sign_bitcoin.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/bitacross/direct_call_sign_ethereum.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/bitacross/direct_call_sign_ethereum.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/bitacross/direct_call_sign_ethereum.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/bitacross/direct_call_sign_ethereum.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/bitacross/mod.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/bitacross/mod.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/bitacross/mod.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/bitacross/mod.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/bitacross/utils.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/bitacross/utils.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/bitacross/utils.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/bitacross/utils.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/get_shard.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/get_shard.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/get_shard.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/get_shard.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/mod.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/mod.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/mod.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/mod.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/nonce.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/nonce.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/nonce.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/nonce.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/set_balance.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/set_balance.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/set_balance.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/set_balance.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/transfer.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/transfer.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/transfer.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/transfer.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/commands/unshield_funds.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/commands/unshield_funds.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/commands/unshield_funds.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/commands/unshield_funds.rs diff --git a/bitacross-worker/cli/src/trusted_base_cli/mod.rs b/tee-worker/bitacross/cli/src/trusted_base_cli/mod.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_base_cli/mod.rs rename to tee-worker/bitacross/cli/src/trusted_base_cli/mod.rs diff --git a/bitacross-worker/cli/src/trusted_cli.rs b/tee-worker/bitacross/cli/src/trusted_cli.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_cli.rs rename to tee-worker/bitacross/cli/src/trusted_cli.rs diff --git a/bitacross-worker/cli/src/trusted_command_utils.rs b/tee-worker/bitacross/cli/src/trusted_command_utils.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_command_utils.rs rename to tee-worker/bitacross/cli/src/trusted_command_utils.rs diff --git a/bitacross-worker/cli/src/trusted_operation.rs b/tee-worker/bitacross/cli/src/trusted_operation.rs similarity index 100% rename from bitacross-worker/cli/src/trusted_operation.rs rename to tee-worker/bitacross/cli/src/trusted_operation.rs diff --git a/bitacross-worker/cli/test_auto_shielding_with_transfer_bob.sh b/tee-worker/bitacross/cli/test_auto_shielding_with_transfer_bob.sh similarity index 100% rename from bitacross-worker/cli/test_auto_shielding_with_transfer_bob.sh rename to tee-worker/bitacross/cli/test_auto_shielding_with_transfer_bob.sh diff --git a/bitacross-worker/cli/test_shield_on_target_nodes_with_transfer_to_alice.sh b/tee-worker/bitacross/cli/test_shield_on_target_nodes_with_transfer_to_alice.sh similarity index 100% rename from bitacross-worker/cli/test_shield_on_target_nodes_with_transfer_to_alice.sh rename to tee-worker/bitacross/cli/test_shield_on_target_nodes_with_transfer_to_alice.sh diff --git a/bitacross-worker/cli/tests/basic_tests.rs b/tee-worker/bitacross/cli/tests/basic_tests.rs similarity index 100% rename from bitacross-worker/cli/tests/basic_tests.rs rename to tee-worker/bitacross/cli/tests/basic_tests.rs diff --git a/pallets/teebag/src/sgx_verify/AttestationReportSigningCACert.pem b/tee-worker/bitacross/core-primitives/attestation-handler/AttestationReportSigningCACert.pem similarity index 100% rename from pallets/teebag/src/sgx_verify/AttestationReportSigningCACert.pem rename to tee-worker/bitacross/core-primitives/attestation-handler/AttestationReportSigningCACert.pem diff --git a/bitacross-worker/core-primitives/attestation-handler/Cargo.toml b/tee-worker/bitacross/core-primitives/attestation-handler/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/attestation-handler/Cargo.toml rename to tee-worker/bitacross/core-primitives/attestation-handler/Cargo.toml diff --git a/bitacross-worker/core-primitives/attestation-handler/src/attestation_handler.rs b/tee-worker/bitacross/core-primitives/attestation-handler/src/attestation_handler.rs similarity index 100% rename from bitacross-worker/core-primitives/attestation-handler/src/attestation_handler.rs rename to tee-worker/bitacross/core-primitives/attestation-handler/src/attestation_handler.rs diff --git a/bitacross-worker/core-primitives/attestation-handler/src/cert.rs b/tee-worker/bitacross/core-primitives/attestation-handler/src/cert.rs similarity index 100% rename from bitacross-worker/core-primitives/attestation-handler/src/cert.rs rename to tee-worker/bitacross/core-primitives/attestation-handler/src/cert.rs diff --git a/bitacross-worker/core-primitives/attestation-handler/src/collateral.rs b/tee-worker/bitacross/core-primitives/attestation-handler/src/collateral.rs similarity index 100% rename from bitacross-worker/core-primitives/attestation-handler/src/collateral.rs rename to tee-worker/bitacross/core-primitives/attestation-handler/src/collateral.rs diff --git a/bitacross-worker/core-primitives/attestation-handler/src/error.rs b/tee-worker/bitacross/core-primitives/attestation-handler/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/attestation-handler/src/error.rs rename to tee-worker/bitacross/core-primitives/attestation-handler/src/error.rs diff --git a/bitacross-worker/core-primitives/attestation-handler/src/lib.rs b/tee-worker/bitacross/core-primitives/attestation-handler/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/attestation-handler/src/lib.rs rename to tee-worker/bitacross/core-primitives/attestation-handler/src/lib.rs diff --git a/bitacross-worker/core-primitives/binary-merkle-tree/Cargo.toml b/tee-worker/bitacross/core-primitives/binary-merkle-tree/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/binary-merkle-tree/Cargo.toml rename to tee-worker/bitacross/core-primitives/binary-merkle-tree/Cargo.toml diff --git a/bitacross-worker/core-primitives/binary-merkle-tree/src/lib.rs b/tee-worker/bitacross/core-primitives/binary-merkle-tree/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/binary-merkle-tree/src/lib.rs rename to tee-worker/bitacross/core-primitives/binary-merkle-tree/src/lib.rs diff --git a/bitacross-worker/core-primitives/component-container/Cargo.toml b/tee-worker/bitacross/core-primitives/component-container/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/component-container/Cargo.toml rename to tee-worker/bitacross/core-primitives/component-container/Cargo.toml diff --git a/bitacross-worker/core-primitives/component-container/src/atomic_container.rs b/tee-worker/bitacross/core-primitives/component-container/src/atomic_container.rs similarity index 100% rename from bitacross-worker/core-primitives/component-container/src/atomic_container.rs rename to tee-worker/bitacross/core-primitives/component-container/src/atomic_container.rs diff --git a/bitacross-worker/core-primitives/component-container/src/component_container.rs b/tee-worker/bitacross/core-primitives/component-container/src/component_container.rs similarity index 100% rename from bitacross-worker/core-primitives/component-container/src/component_container.rs rename to tee-worker/bitacross/core-primitives/component-container/src/component_container.rs diff --git a/bitacross-worker/core-primitives/component-container/src/error.rs b/tee-worker/bitacross/core-primitives/component-container/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/component-container/src/error.rs rename to tee-worker/bitacross/core-primitives/component-container/src/error.rs diff --git a/bitacross-worker/core-primitives/component-container/src/lib.rs b/tee-worker/bitacross/core-primitives/component-container/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/component-container/src/lib.rs rename to tee-worker/bitacross/core-primitives/component-container/src/lib.rs diff --git a/bitacross-worker/core-primitives/enclave-api/Cargo.toml b/tee-worker/bitacross/core-primitives/enclave-api/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/Cargo.toml rename to tee-worker/bitacross/core-primitives/enclave-api/Cargo.toml diff --git a/bitacross-worker/core-primitives/enclave-api/build.rs b/tee-worker/bitacross/core-primitives/enclave-api/build.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/build.rs rename to tee-worker/bitacross/core-primitives/enclave-api/build.rs diff --git a/bitacross-worker/core-primitives/enclave-api/ffi/Cargo.toml b/tee-worker/bitacross/core-primitives/enclave-api/ffi/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/ffi/Cargo.toml rename to tee-worker/bitacross/core-primitives/enclave-api/ffi/Cargo.toml diff --git a/bitacross-worker/core-primitives/enclave-api/ffi/build.rs b/tee-worker/bitacross/core-primitives/enclave-api/ffi/build.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/ffi/build.rs rename to tee-worker/bitacross/core-primitives/enclave-api/ffi/build.rs diff --git a/bitacross-worker/core-primitives/enclave-api/ffi/src/lib.rs b/tee-worker/bitacross/core-primitives/enclave-api/ffi/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/ffi/src/lib.rs rename to tee-worker/bitacross/core-primitives/enclave-api/ffi/src/lib.rs diff --git a/bitacross-worker/core-primitives/enclave-api/src/enclave_base.rs b/tee-worker/bitacross/core-primitives/enclave-api/src/enclave_base.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/src/enclave_base.rs rename to tee-worker/bitacross/core-primitives/enclave-api/src/enclave_base.rs diff --git a/bitacross-worker/core-primitives/enclave-api/src/enclave_test.rs b/tee-worker/bitacross/core-primitives/enclave-api/src/enclave_test.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/src/enclave_test.rs rename to tee-worker/bitacross/core-primitives/enclave-api/src/enclave_test.rs diff --git a/bitacross-worker/core-primitives/enclave-api/src/error.rs b/tee-worker/bitacross/core-primitives/enclave-api/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/src/error.rs rename to tee-worker/bitacross/core-primitives/enclave-api/src/error.rs diff --git a/bitacross-worker/core-primitives/enclave-api/src/lib.rs b/tee-worker/bitacross/core-primitives/enclave-api/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/src/lib.rs rename to tee-worker/bitacross/core-primitives/enclave-api/src/lib.rs diff --git a/bitacross-worker/core-primitives/enclave-api/src/remote_attestation.rs b/tee-worker/bitacross/core-primitives/enclave-api/src/remote_attestation.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/src/remote_attestation.rs rename to tee-worker/bitacross/core-primitives/enclave-api/src/remote_attestation.rs diff --git a/bitacross-worker/core-primitives/enclave-api/src/sidechain.rs b/tee-worker/bitacross/core-primitives/enclave-api/src/sidechain.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/src/sidechain.rs rename to tee-worker/bitacross/core-primitives/enclave-api/src/sidechain.rs diff --git a/bitacross-worker/core-primitives/enclave-api/src/utils.rs b/tee-worker/bitacross/core-primitives/enclave-api/src/utils.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-api/src/utils.rs rename to tee-worker/bitacross/core-primitives/enclave-api/src/utils.rs diff --git a/bitacross-worker/core-primitives/enclave-metrics/Cargo.toml b/tee-worker/bitacross/core-primitives/enclave-metrics/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/enclave-metrics/Cargo.toml rename to tee-worker/bitacross/core-primitives/enclave-metrics/Cargo.toml diff --git a/bitacross-worker/core-primitives/enclave-metrics/src/lib.rs b/tee-worker/bitacross/core-primitives/enclave-metrics/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/enclave-metrics/src/lib.rs rename to tee-worker/bitacross/core-primitives/enclave-metrics/src/lib.rs diff --git a/bitacross-worker/core-primitives/extrinsics-factory/Cargo.toml b/tee-worker/bitacross/core-primitives/extrinsics-factory/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/extrinsics-factory/Cargo.toml rename to tee-worker/bitacross/core-primitives/extrinsics-factory/Cargo.toml diff --git a/bitacross-worker/core-primitives/extrinsics-factory/src/error.rs b/tee-worker/bitacross/core-primitives/extrinsics-factory/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/extrinsics-factory/src/error.rs rename to tee-worker/bitacross/core-primitives/extrinsics-factory/src/error.rs diff --git a/bitacross-worker/core-primitives/extrinsics-factory/src/lib.rs b/tee-worker/bitacross/core-primitives/extrinsics-factory/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/extrinsics-factory/src/lib.rs rename to tee-worker/bitacross/core-primitives/extrinsics-factory/src/lib.rs diff --git a/bitacross-worker/core-primitives/extrinsics-factory/src/mock.rs b/tee-worker/bitacross/core-primitives/extrinsics-factory/src/mock.rs similarity index 100% rename from bitacross-worker/core-primitives/extrinsics-factory/src/mock.rs rename to tee-worker/bitacross/core-primitives/extrinsics-factory/src/mock.rs diff --git a/bitacross-worker/core-primitives/hashing/Cargo.toml b/tee-worker/bitacross/core-primitives/hashing/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/hashing/Cargo.toml rename to tee-worker/bitacross/core-primitives/hashing/Cargo.toml diff --git a/bitacross-worker/core-primitives/hashing/src/lib.rs b/tee-worker/bitacross/core-primitives/hashing/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/hashing/src/lib.rs rename to tee-worker/bitacross/core-primitives/hashing/src/lib.rs diff --git a/bitacross-worker/core-primitives/hashing/src/std_hash.rs b/tee-worker/bitacross/core-primitives/hashing/src/std_hash.rs similarity index 100% rename from bitacross-worker/core-primitives/hashing/src/std_hash.rs rename to tee-worker/bitacross/core-primitives/hashing/src/std_hash.rs diff --git a/bitacross-worker/core-primitives/import-queue/Cargo.toml b/tee-worker/bitacross/core-primitives/import-queue/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/import-queue/Cargo.toml rename to tee-worker/bitacross/core-primitives/import-queue/Cargo.toml diff --git a/bitacross-worker/core-primitives/import-queue/src/error.rs b/tee-worker/bitacross/core-primitives/import-queue/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/import-queue/src/error.rs rename to tee-worker/bitacross/core-primitives/import-queue/src/error.rs diff --git a/bitacross-worker/core-primitives/import-queue/src/import_queue.rs b/tee-worker/bitacross/core-primitives/import-queue/src/import_queue.rs similarity index 100% rename from bitacross-worker/core-primitives/import-queue/src/import_queue.rs rename to tee-worker/bitacross/core-primitives/import-queue/src/import_queue.rs diff --git a/bitacross-worker/core-primitives/import-queue/src/lib.rs b/tee-worker/bitacross/core-primitives/import-queue/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/import-queue/src/lib.rs rename to tee-worker/bitacross/core-primitives/import-queue/src/lib.rs diff --git a/bitacross-worker/core-primitives/networking-utils/Cargo.toml b/tee-worker/bitacross/core-primitives/networking-utils/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/networking-utils/Cargo.toml rename to tee-worker/bitacross/core-primitives/networking-utils/Cargo.toml diff --git a/bitacross-worker/core-primitives/networking-utils/src/lib.rs b/tee-worker/bitacross/core-primitives/networking-utils/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/networking-utils/src/lib.rs rename to tee-worker/bitacross/core-primitives/networking-utils/src/lib.rs diff --git a/bitacross-worker/core-primitives/networking-utils/src/ports.rs b/tee-worker/bitacross/core-primitives/networking-utils/src/ports.rs similarity index 100% rename from bitacross-worker/core-primitives/networking-utils/src/ports.rs rename to tee-worker/bitacross/core-primitives/networking-utils/src/ports.rs diff --git a/bitacross-worker/core-primitives/node-api/Cargo.toml b/tee-worker/bitacross/core-primitives/node-api/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/node-api/Cargo.toml rename to tee-worker/bitacross/core-primitives/node-api/Cargo.toml diff --git a/bitacross-worker/core-primitives/node-api/api-client-extensions/Cargo.toml b/tee-worker/bitacross/core-primitives/node-api/api-client-extensions/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/node-api/api-client-extensions/Cargo.toml rename to tee-worker/bitacross/core-primitives/node-api/api-client-extensions/Cargo.toml diff --git a/bitacross-worker/core-primitives/node-api/api-client-extensions/src/account.rs b/tee-worker/bitacross/core-primitives/node-api/api-client-extensions/src/account.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/api-client-extensions/src/account.rs rename to tee-worker/bitacross/core-primitives/node-api/api-client-extensions/src/account.rs diff --git a/bitacross-worker/core-primitives/node-api/api-client-extensions/src/chain.rs b/tee-worker/bitacross/core-primitives/node-api/api-client-extensions/src/chain.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/api-client-extensions/src/chain.rs rename to tee-worker/bitacross/core-primitives/node-api/api-client-extensions/src/chain.rs diff --git a/bitacross-worker/core-primitives/node-api/api-client-extensions/src/lib.rs b/tee-worker/bitacross/core-primitives/node-api/api-client-extensions/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/api-client-extensions/src/lib.rs rename to tee-worker/bitacross/core-primitives/node-api/api-client-extensions/src/lib.rs diff --git a/bitacross-worker/core-primitives/node-api/api-client-extensions/src/pallet_teebag.rs b/tee-worker/bitacross/core-primitives/node-api/api-client-extensions/src/pallet_teebag.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/api-client-extensions/src/pallet_teebag.rs rename to tee-worker/bitacross/core-primitives/node-api/api-client-extensions/src/pallet_teebag.rs diff --git a/bitacross-worker/core-primitives/node-api/api-client-types/Cargo.toml b/tee-worker/bitacross/core-primitives/node-api/api-client-types/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/node-api/api-client-types/Cargo.toml rename to tee-worker/bitacross/core-primitives/node-api/api-client-types/Cargo.toml diff --git a/bitacross-worker/core-primitives/node-api/api-client-types/src/lib.rs b/tee-worker/bitacross/core-primitives/node-api/api-client-types/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/api-client-types/src/lib.rs rename to tee-worker/bitacross/core-primitives/node-api/api-client-types/src/lib.rs diff --git a/bitacross-worker/core-primitives/node-api/factory/Cargo.toml b/tee-worker/bitacross/core-primitives/node-api/factory/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/node-api/factory/Cargo.toml rename to tee-worker/bitacross/core-primitives/node-api/factory/Cargo.toml diff --git a/bitacross-worker/core-primitives/node-api/factory/src/lib.rs b/tee-worker/bitacross/core-primitives/node-api/factory/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/factory/src/lib.rs rename to tee-worker/bitacross/core-primitives/node-api/factory/src/lib.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata-provider/Cargo.toml b/tee-worker/bitacross/core-primitives/node-api/metadata-provider/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata-provider/Cargo.toml rename to tee-worker/bitacross/core-primitives/node-api/metadata-provider/Cargo.toml diff --git a/bitacross-worker/core-primitives/node-api/metadata-provider/src/error.rs b/tee-worker/bitacross/core-primitives/node-api/metadata-provider/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata-provider/src/error.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata-provider/src/error.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata-provider/src/lib.rs b/tee-worker/bitacross/core-primitives/node-api/metadata-provider/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata-provider/src/lib.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata-provider/src/lib.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/Cargo.toml b/tee-worker/bitacross/core-primitives/node-api/metadata/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/Cargo.toml rename to tee-worker/bitacross/core-primitives/node-api/metadata/Cargo.toml diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/error.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/error.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/error.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/lib.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/lib.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/lib.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/metadata_mocks.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/metadata_mocks.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/metadata_mocks.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/metadata_mocks.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/pallet_balances.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_balances.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/pallet_balances.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_balances.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/pallet_bitacross.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_bitacross.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/pallet_bitacross.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_bitacross.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/pallet_proxy.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_proxy.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/pallet_proxy.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_proxy.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/pallet_sidechain.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_sidechain.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/pallet_sidechain.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_sidechain.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/pallet_system.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_system.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/pallet_system.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_system.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/pallet_teebag.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_teebag.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/pallet_teebag.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_teebag.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/pallet_timestamp.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_timestamp.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/pallet_timestamp.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_timestamp.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/pallet_utility.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_utility.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/pallet_utility.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/pallet_utility.rs diff --git a/bitacross-worker/core-primitives/node-api/metadata/src/runtime_call.rs b/tee-worker/bitacross/core-primitives/node-api/metadata/src/runtime_call.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/metadata/src/runtime_call.rs rename to tee-worker/bitacross/core-primitives/node-api/metadata/src/runtime_call.rs diff --git a/bitacross-worker/core-primitives/node-api/src/lib.rs b/tee-worker/bitacross/core-primitives/node-api/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/node-api/src/lib.rs rename to tee-worker/bitacross/core-primitives/node-api/src/lib.rs diff --git a/bitacross-worker/core-primitives/nonce-cache/Cargo.toml b/tee-worker/bitacross/core-primitives/nonce-cache/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/nonce-cache/Cargo.toml rename to tee-worker/bitacross/core-primitives/nonce-cache/Cargo.toml diff --git a/bitacross-worker/core-primitives/nonce-cache/src/error.rs b/tee-worker/bitacross/core-primitives/nonce-cache/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/nonce-cache/src/error.rs rename to tee-worker/bitacross/core-primitives/nonce-cache/src/error.rs diff --git a/bitacross-worker/core-primitives/nonce-cache/src/lib.rs b/tee-worker/bitacross/core-primitives/nonce-cache/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/nonce-cache/src/lib.rs rename to tee-worker/bitacross/core-primitives/nonce-cache/src/lib.rs diff --git a/bitacross-worker/core-primitives/nonce-cache/src/nonce_cache.rs b/tee-worker/bitacross/core-primitives/nonce-cache/src/nonce_cache.rs similarity index 100% rename from bitacross-worker/core-primitives/nonce-cache/src/nonce_cache.rs rename to tee-worker/bitacross/core-primitives/nonce-cache/src/nonce_cache.rs diff --git a/bitacross-worker/core-primitives/ocall-api/Cargo.toml b/tee-worker/bitacross/core-primitives/ocall-api/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/ocall-api/Cargo.toml rename to tee-worker/bitacross/core-primitives/ocall-api/Cargo.toml diff --git a/bitacross-worker/core-primitives/ocall-api/src/lib.rs b/tee-worker/bitacross/core-primitives/ocall-api/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/ocall-api/src/lib.rs rename to tee-worker/bitacross/core-primitives/ocall-api/src/lib.rs diff --git a/bitacross-worker/core-primitives/primitives-cache/Cargo.toml b/tee-worker/bitacross/core-primitives/primitives-cache/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/primitives-cache/Cargo.toml rename to tee-worker/bitacross/core-primitives/primitives-cache/Cargo.toml diff --git a/bitacross-worker/core-primitives/primitives-cache/src/error.rs b/tee-worker/bitacross/core-primitives/primitives-cache/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/primitives-cache/src/error.rs rename to tee-worker/bitacross/core-primitives/primitives-cache/src/error.rs diff --git a/bitacross-worker/core-primitives/primitives-cache/src/lib.rs b/tee-worker/bitacross/core-primitives/primitives-cache/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/primitives-cache/src/lib.rs rename to tee-worker/bitacross/core-primitives/primitives-cache/src/lib.rs diff --git a/bitacross-worker/core-primitives/primitives-cache/src/primitives_cache.rs b/tee-worker/bitacross/core-primitives/primitives-cache/src/primitives_cache.rs similarity index 100% rename from bitacross-worker/core-primitives/primitives-cache/src/primitives_cache.rs rename to tee-worker/bitacross/core-primitives/primitives-cache/src/primitives_cache.rs diff --git a/bitacross-worker/core-primitives/rpc/Cargo.toml b/tee-worker/bitacross/core-primitives/rpc/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/rpc/Cargo.toml rename to tee-worker/bitacross/core-primitives/rpc/Cargo.toml diff --git a/bitacross-worker/core-primitives/rpc/src/lib.rs b/tee-worker/bitacross/core-primitives/rpc/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/rpc/src/lib.rs rename to tee-worker/bitacross/core-primitives/rpc/src/lib.rs diff --git a/bitacross-worker/core-primitives/settings/Cargo.toml b/tee-worker/bitacross/core-primitives/settings/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/settings/Cargo.toml rename to tee-worker/bitacross/core-primitives/settings/Cargo.toml diff --git a/bitacross-worker/core-primitives/settings/src/lib.rs b/tee-worker/bitacross/core-primitives/settings/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/settings/src/lib.rs rename to tee-worker/bitacross/core-primitives/settings/src/lib.rs diff --git a/bitacross-worker/core-primitives/sgx-runtime-primitives/Cargo.toml b/tee-worker/bitacross/core-primitives/sgx-runtime-primitives/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/sgx-runtime-primitives/Cargo.toml rename to tee-worker/bitacross/core-primitives/sgx-runtime-primitives/Cargo.toml diff --git a/bitacross-worker/core-primitives/sgx-runtime-primitives/src/constants.rs b/tee-worker/bitacross/core-primitives/sgx-runtime-primitives/src/constants.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx-runtime-primitives/src/constants.rs rename to tee-worker/bitacross/core-primitives/sgx-runtime-primitives/src/constants.rs diff --git a/bitacross-worker/core-primitives/sgx-runtime-primitives/src/lib.rs b/tee-worker/bitacross/core-primitives/sgx-runtime-primitives/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx-runtime-primitives/src/lib.rs rename to tee-worker/bitacross/core-primitives/sgx-runtime-primitives/src/lib.rs diff --git a/bitacross-worker/core-primitives/sgx-runtime-primitives/src/types.rs b/tee-worker/bitacross/core-primitives/sgx-runtime-primitives/src/types.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx-runtime-primitives/src/types.rs rename to tee-worker/bitacross/core-primitives/sgx-runtime-primitives/src/types.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/Cargo.toml b/tee-worker/bitacross/core-primitives/sgx/crypto/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/Cargo.toml rename to tee-worker/bitacross/core-primitives/sgx/crypto/Cargo.toml diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/aes.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/aes.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/aes.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/aes.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/ecdsa.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/ecdsa.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/ecdsa.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/ecdsa.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/ed25519.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/ed25519.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/ed25519.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/ed25519.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/ed25519_derivation.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/ed25519_derivation.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/ed25519_derivation.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/ed25519_derivation.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/error.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/error.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/error.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/key_repository.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/key_repository.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/key_repository.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/key_repository.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/lib.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/lib.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/lib.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/mocks.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/mocks.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/mocks.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/mocks.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/rsa3072.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/rsa3072.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/rsa3072.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/rsa3072.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/schnorr.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/schnorr.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/schnorr.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/schnorr.rs diff --git a/bitacross-worker/core-primitives/sgx/crypto/src/traits.rs b/tee-worker/bitacross/core-primitives/sgx/crypto/src/traits.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/crypto/src/traits.rs rename to tee-worker/bitacross/core-primitives/sgx/crypto/src/traits.rs diff --git a/bitacross-worker/core-primitives/sgx/io/Cargo.toml b/tee-worker/bitacross/core-primitives/sgx/io/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/sgx/io/Cargo.toml rename to tee-worker/bitacross/core-primitives/sgx/io/Cargo.toml diff --git a/bitacross-worker/core-primitives/sgx/io/src/lib.rs b/tee-worker/bitacross/core-primitives/sgx/io/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/io/src/lib.rs rename to tee-worker/bitacross/core-primitives/sgx/io/src/lib.rs diff --git a/bitacross-worker/core-primitives/sgx/temp-dir/Cargo.toml b/tee-worker/bitacross/core-primitives/sgx/temp-dir/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/sgx/temp-dir/Cargo.toml rename to tee-worker/bitacross/core-primitives/sgx/temp-dir/Cargo.toml diff --git a/bitacross-worker/core-primitives/sgx/temp-dir/src/lib.rs b/tee-worker/bitacross/core-primitives/sgx/temp-dir/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/temp-dir/src/lib.rs rename to tee-worker/bitacross/core-primitives/sgx/temp-dir/src/lib.rs diff --git a/bitacross-worker/core-primitives/sgx/temp-dir/src/test.rs b/tee-worker/bitacross/core-primitives/sgx/temp-dir/src/test.rs similarity index 100% rename from bitacross-worker/core-primitives/sgx/temp-dir/src/test.rs rename to tee-worker/bitacross/core-primitives/sgx/temp-dir/src/test.rs diff --git a/bitacross-worker/core-primitives/stf-executor/Cargo.toml b/tee-worker/bitacross/core-primitives/stf-executor/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/Cargo.toml rename to tee-worker/bitacross/core-primitives/stf-executor/Cargo.toml diff --git a/bitacross-worker/core-primitives/stf-executor/src/enclave_signer.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/enclave_signer.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/enclave_signer.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/enclave_signer.rs diff --git a/bitacross-worker/core-primitives/stf-executor/src/error.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/error.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/error.rs diff --git a/bitacross-worker/core-primitives/stf-executor/src/executor.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/executor.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/executor.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/executor.rs diff --git a/bitacross-worker/core-primitives/stf-executor/src/executor_tests.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/executor_tests.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/executor_tests.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/executor_tests.rs diff --git a/bitacross-worker/core-primitives/stf-executor/src/getter_executor.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/getter_executor.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/getter_executor.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/getter_executor.rs diff --git a/bitacross-worker/core-primitives/stf-executor/src/lib.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/lib.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/lib.rs diff --git a/bitacross-worker/core-primitives/stf-executor/src/mocks.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/mocks.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/mocks.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/mocks.rs diff --git a/bitacross-worker/core-primitives/stf-executor/src/state_getter.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/state_getter.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/state_getter.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/state_getter.rs diff --git a/bitacross-worker/core-primitives/stf-executor/src/traits.rs b/tee-worker/bitacross/core-primitives/stf-executor/src/traits.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-executor/src/traits.rs rename to tee-worker/bitacross/core-primitives/stf-executor/src/traits.rs diff --git a/bitacross-worker/core-primitives/stf-interface/Cargo.toml b/tee-worker/bitacross/core-primitives/stf-interface/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/stf-interface/Cargo.toml rename to tee-worker/bitacross/core-primitives/stf-interface/Cargo.toml diff --git a/bitacross-worker/core-primitives/stf-interface/src/lib.rs b/tee-worker/bitacross/core-primitives/stf-interface/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-interface/src/lib.rs rename to tee-worker/bitacross/core-primitives/stf-interface/src/lib.rs diff --git a/bitacross-worker/core-primitives/stf-interface/src/mocks.rs b/tee-worker/bitacross/core-primitives/stf-interface/src/mocks.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-interface/src/mocks.rs rename to tee-worker/bitacross/core-primitives/stf-interface/src/mocks.rs diff --git a/bitacross-worker/core-primitives/stf-interface/src/parentchain_pallet.rs b/tee-worker/bitacross/core-primitives/stf-interface/src/parentchain_pallet.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-interface/src/parentchain_pallet.rs rename to tee-worker/bitacross/core-primitives/stf-interface/src/parentchain_pallet.rs diff --git a/bitacross-worker/core-primitives/stf-interface/src/runtime_upgrade.rs b/tee-worker/bitacross/core-primitives/stf-interface/src/runtime_upgrade.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-interface/src/runtime_upgrade.rs rename to tee-worker/bitacross/core-primitives/stf-interface/src/runtime_upgrade.rs diff --git a/bitacross-worker/core-primitives/stf-interface/src/sudo_pallet.rs b/tee-worker/bitacross/core-primitives/stf-interface/src/sudo_pallet.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-interface/src/sudo_pallet.rs rename to tee-worker/bitacross/core-primitives/stf-interface/src/sudo_pallet.rs diff --git a/bitacross-worker/core-primitives/stf-interface/src/system_pallet.rs b/tee-worker/bitacross/core-primitives/stf-interface/src/system_pallet.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-interface/src/system_pallet.rs rename to tee-worker/bitacross/core-primitives/stf-interface/src/system_pallet.rs diff --git a/bitacross-worker/core-primitives/stf-primitives/Cargo.toml b/tee-worker/bitacross/core-primitives/stf-primitives/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/stf-primitives/Cargo.toml rename to tee-worker/bitacross/core-primitives/stf-primitives/Cargo.toml diff --git a/bitacross-worker/core-primitives/stf-primitives/src/error.rs b/tee-worker/bitacross/core-primitives/stf-primitives/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-primitives/src/error.rs rename to tee-worker/bitacross/core-primitives/stf-primitives/src/error.rs diff --git a/bitacross-worker/core-primitives/stf-primitives/src/lib.rs b/tee-worker/bitacross/core-primitives/stf-primitives/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-primitives/src/lib.rs rename to tee-worker/bitacross/core-primitives/stf-primitives/src/lib.rs diff --git a/bitacross-worker/core-primitives/stf-primitives/src/traits.rs b/tee-worker/bitacross/core-primitives/stf-primitives/src/traits.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-primitives/src/traits.rs rename to tee-worker/bitacross/core-primitives/stf-primitives/src/traits.rs diff --git a/bitacross-worker/core-primitives/stf-primitives/src/types.rs b/tee-worker/bitacross/core-primitives/stf-primitives/src/types.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-primitives/src/types.rs rename to tee-worker/bitacross/core-primitives/stf-primitives/src/types.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/Cargo.toml b/tee-worker/bitacross/core-primitives/stf-state-handler/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/Cargo.toml rename to tee-worker/bitacross/core-primitives/stf-state-handler/Cargo.toml diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/error.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/error.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/error.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/file_io.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/file_io.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/file_io.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/file_io.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/handle_state.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/handle_state.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/handle_state.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/handle_state.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/in_memory_state_file_io.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/in_memory_state_file_io.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/in_memory_state_file_io.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/in_memory_state_file_io.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/lib.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/lib.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/lib.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/query_shard_state.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/query_shard_state.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/query_shard_state.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/query_shard_state.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/state_handler.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/state_handler.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/state_handler.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/state_handler.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/state_initializer.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/state_initializer.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/state_initializer.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/state_initializer.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/state_snapshot_primitives.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/state_snapshot_primitives.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/state_snapshot_primitives.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/state_snapshot_primitives.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/state_snapshot_repository.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/state_snapshot_repository.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/state_snapshot_repository.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/state_snapshot_repository.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/state_snapshot_repository_loader.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/state_snapshot_repository_loader.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/state_snapshot_repository_loader.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/state_snapshot_repository_loader.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/test/mocks/initialize_state_mock.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mocks/initialize_state_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/test/mocks/initialize_state_mock.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mocks/initialize_state_mock.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/test/mocks/mod.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mocks/mod.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/test/mocks/mod.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mocks/mod.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/test/mocks/state_key_repository_mock.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mocks/state_key_repository_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/test/mocks/state_key_repository_mock.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mocks/state_key_repository_mock.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/test/mocks/versioned_state_access_mock.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mocks/versioned_state_access_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/test/mocks/versioned_state_access_mock.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mocks/versioned_state_access_mock.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/test/mod.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mod.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/test/mod.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/test/mod.rs diff --git a/bitacross-worker/core-primitives/stf-state-handler/src/test/sgx_tests.rs b/tee-worker/bitacross/core-primitives/stf-state-handler/src/test/sgx_tests.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-handler/src/test/sgx_tests.rs rename to tee-worker/bitacross/core-primitives/stf-state-handler/src/test/sgx_tests.rs diff --git a/bitacross-worker/core-primitives/stf-state-observer/Cargo.toml b/tee-worker/bitacross/core-primitives/stf-state-observer/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/stf-state-observer/Cargo.toml rename to tee-worker/bitacross/core-primitives/stf-state-observer/Cargo.toml diff --git a/bitacross-worker/core-primitives/stf-state-observer/src/error.rs b/tee-worker/bitacross/core-primitives/stf-state-observer/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-observer/src/error.rs rename to tee-worker/bitacross/core-primitives/stf-state-observer/src/error.rs diff --git a/bitacross-worker/core-primitives/stf-state-observer/src/lib.rs b/tee-worker/bitacross/core-primitives/stf-state-observer/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-observer/src/lib.rs rename to tee-worker/bitacross/core-primitives/stf-state-observer/src/lib.rs diff --git a/bitacross-worker/core-primitives/stf-state-observer/src/mock.rs b/tee-worker/bitacross/core-primitives/stf-state-observer/src/mock.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-observer/src/mock.rs rename to tee-worker/bitacross/core-primitives/stf-state-observer/src/mock.rs diff --git a/bitacross-worker/core-primitives/stf-state-observer/src/state_observer.rs b/tee-worker/bitacross/core-primitives/stf-state-observer/src/state_observer.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-observer/src/state_observer.rs rename to tee-worker/bitacross/core-primitives/stf-state-observer/src/state_observer.rs diff --git a/bitacross-worker/core-primitives/stf-state-observer/src/traits.rs b/tee-worker/bitacross/core-primitives/stf-state-observer/src/traits.rs similarity index 100% rename from bitacross-worker/core-primitives/stf-state-observer/src/traits.rs rename to tee-worker/bitacross/core-primitives/stf-state-observer/src/traits.rs diff --git a/bitacross-worker/core-primitives/storage/Cargo.toml b/tee-worker/bitacross/core-primitives/storage/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/storage/Cargo.toml rename to tee-worker/bitacross/core-primitives/storage/Cargo.toml diff --git a/bitacross-worker/core-primitives/storage/src/error.rs b/tee-worker/bitacross/core-primitives/storage/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/storage/src/error.rs rename to tee-worker/bitacross/core-primitives/storage/src/error.rs diff --git a/bitacross-worker/core-primitives/storage/src/keys.rs b/tee-worker/bitacross/core-primitives/storage/src/keys.rs similarity index 100% rename from bitacross-worker/core-primitives/storage/src/keys.rs rename to tee-worker/bitacross/core-primitives/storage/src/keys.rs diff --git a/bitacross-worker/core-primitives/storage/src/lib.rs b/tee-worker/bitacross/core-primitives/storage/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/storage/src/lib.rs rename to tee-worker/bitacross/core-primitives/storage/src/lib.rs diff --git a/bitacross-worker/core-primitives/storage/src/proof.rs b/tee-worker/bitacross/core-primitives/storage/src/proof.rs similarity index 100% rename from bitacross-worker/core-primitives/storage/src/proof.rs rename to tee-worker/bitacross/core-primitives/storage/src/proof.rs diff --git a/bitacross-worker/core-primitives/storage/src/verify_storage_proof.rs b/tee-worker/bitacross/core-primitives/storage/src/verify_storage_proof.rs similarity index 100% rename from bitacross-worker/core-primitives/storage/src/verify_storage_proof.rs rename to tee-worker/bitacross/core-primitives/storage/src/verify_storage_proof.rs diff --git a/bitacross-worker/core-primitives/substrate-sgx/environmental/Cargo.toml b/tee-worker/bitacross/core-primitives/substrate-sgx/environmental/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/environmental/Cargo.toml rename to tee-worker/bitacross/core-primitives/substrate-sgx/environmental/Cargo.toml diff --git a/bitacross-worker/core-primitives/substrate-sgx/environmental/src/lib.rs b/tee-worker/bitacross/core-primitives/substrate-sgx/environmental/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/environmental/src/lib.rs rename to tee-worker/bitacross/core-primitives/substrate-sgx/environmental/src/lib.rs diff --git a/bitacross-worker/core-primitives/substrate-sgx/externalities/Cargo.toml b/tee-worker/bitacross/core-primitives/substrate-sgx/externalities/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/externalities/Cargo.toml rename to tee-worker/bitacross/core-primitives/substrate-sgx/externalities/Cargo.toml diff --git a/bitacross-worker/core-primitives/substrate-sgx/externalities/src/bypass.rs b/tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/bypass.rs similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/externalities/src/bypass.rs rename to tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/bypass.rs diff --git a/bitacross-worker/core-primitives/substrate-sgx/externalities/src/codec_impl.rs b/tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/codec_impl.rs similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/externalities/src/codec_impl.rs rename to tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/codec_impl.rs diff --git a/bitacross-worker/core-primitives/substrate-sgx/externalities/src/lib.rs b/tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/externalities/src/lib.rs rename to tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/lib.rs diff --git a/bitacross-worker/core-primitives/substrate-sgx/externalities/src/scope_limited.rs b/tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/scope_limited.rs similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/externalities/src/scope_limited.rs rename to tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/scope_limited.rs diff --git a/bitacross-worker/core-primitives/substrate-sgx/externalities/src/vectorize.rs b/tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/vectorize.rs similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/externalities/src/vectorize.rs rename to tee-worker/bitacross/core-primitives/substrate-sgx/externalities/src/vectorize.rs diff --git a/bitacross-worker/core-primitives/substrate-sgx/sp-io/Cargo.toml b/tee-worker/bitacross/core-primitives/substrate-sgx/sp-io/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/sp-io/Cargo.toml rename to tee-worker/bitacross/core-primitives/substrate-sgx/sp-io/Cargo.toml diff --git a/bitacross-worker/core-primitives/substrate-sgx/sp-io/src/lib.rs b/tee-worker/bitacross/core-primitives/substrate-sgx/sp-io/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/substrate-sgx/sp-io/src/lib.rs rename to tee-worker/bitacross/core-primitives/substrate-sgx/sp-io/src/lib.rs diff --git a/bitacross-worker/core-primitives/test/Cargo.toml b/tee-worker/bitacross/core-primitives/test/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/test/Cargo.toml rename to tee-worker/bitacross/core-primitives/test/Cargo.toml diff --git a/bitacross-worker/core-primitives/test/src/lib.rs b/tee-worker/bitacross/core-primitives/test/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/test/src/lib.rs rename to tee-worker/bitacross/core-primitives/test/src/lib.rs diff --git a/bitacross-worker/core-primitives/test/src/mock/handle_state_mock.rs b/tee-worker/bitacross/core-primitives/test/src/mock/handle_state_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/test/src/mock/handle_state_mock.rs rename to tee-worker/bitacross/core-primitives/test/src/mock/handle_state_mock.rs diff --git a/bitacross-worker/core-primitives/test/src/mock/metrics_ocall_mock.rs b/tee-worker/bitacross/core-primitives/test/src/mock/metrics_ocall_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/test/src/mock/metrics_ocall_mock.rs rename to tee-worker/bitacross/core-primitives/test/src/mock/metrics_ocall_mock.rs diff --git a/bitacross-worker/core-primitives/test/src/mock/mod.rs b/tee-worker/bitacross/core-primitives/test/src/mock/mod.rs similarity index 100% rename from bitacross-worker/core-primitives/test/src/mock/mod.rs rename to tee-worker/bitacross/core-primitives/test/src/mock/mod.rs diff --git a/bitacross-worker/core-primitives/test/src/mock/onchain_mock.rs b/tee-worker/bitacross/core-primitives/test/src/mock/onchain_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/test/src/mock/onchain_mock.rs rename to tee-worker/bitacross/core-primitives/test/src/mock/onchain_mock.rs diff --git a/bitacross-worker/core-primitives/test/src/mock/shielding_crypto_mock.rs b/tee-worker/bitacross/core-primitives/test/src/mock/shielding_crypto_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/test/src/mock/shielding_crypto_mock.rs rename to tee-worker/bitacross/core-primitives/test/src/mock/shielding_crypto_mock.rs diff --git a/bitacross-worker/core-primitives/test/src/mock/sidechain_ocall_api_mock.rs b/tee-worker/bitacross/core-primitives/test/src/mock/sidechain_ocall_api_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/test/src/mock/sidechain_ocall_api_mock.rs rename to tee-worker/bitacross/core-primitives/test/src/mock/sidechain_ocall_api_mock.rs diff --git a/bitacross-worker/core-primitives/test/src/mock/stf_mock.rs b/tee-worker/bitacross/core-primitives/test/src/mock/stf_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/test/src/mock/stf_mock.rs rename to tee-worker/bitacross/core-primitives/test/src/mock/stf_mock.rs diff --git a/bitacross-worker/core-primitives/time-utils/Cargo.toml b/tee-worker/bitacross/core-primitives/time-utils/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/time-utils/Cargo.toml rename to tee-worker/bitacross/core-primitives/time-utils/Cargo.toml diff --git a/bitacross-worker/core-primitives/time-utils/src/lib.rs b/tee-worker/bitacross/core-primitives/time-utils/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/time-utils/src/lib.rs rename to tee-worker/bitacross/core-primitives/time-utils/src/lib.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/Cargo.toml b/tee-worker/bitacross/core-primitives/top-pool-author/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/Cargo.toml rename to tee-worker/bitacross/core-primitives/top-pool-author/Cargo.toml diff --git a/bitacross-worker/core-primitives/top-pool-author/src/api.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/api.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/api.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/api.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/author.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/author.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/author.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/author.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/author_tests.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/author_tests.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/author_tests.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/author_tests.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/client_error.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/client_error.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/client_error.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/client_error.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/error.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/error.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/error.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/lib.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/lib.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/lib.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/mocks.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/mocks.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/mocks.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/mocks.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/test_fixtures.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/test_fixtures.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/test_fixtures.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/test_fixtures.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/test_utils.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/test_utils.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/test_utils.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/test_utils.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/top_filter.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/top_filter.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/top_filter.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/top_filter.rs diff --git a/bitacross-worker/core-primitives/top-pool-author/src/traits.rs b/tee-worker/bitacross/core-primitives/top-pool-author/src/traits.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool-author/src/traits.rs rename to tee-worker/bitacross/core-primitives/top-pool-author/src/traits.rs diff --git a/bitacross-worker/core-primitives/top-pool/Cargo.toml b/tee-worker/bitacross/core-primitives/top-pool/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/top-pool/Cargo.toml rename to tee-worker/bitacross/core-primitives/top-pool/Cargo.toml diff --git a/bitacross-worker/core-primitives/top-pool/src/base_pool.rs b/tee-worker/bitacross/core-primitives/top-pool/src/base_pool.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/base_pool.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/base_pool.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/basic_pool.rs b/tee-worker/bitacross/core-primitives/top-pool/src/basic_pool.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/basic_pool.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/basic_pool.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/error.rs b/tee-worker/bitacross/core-primitives/top-pool/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/error.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/error.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/future.rs b/tee-worker/bitacross/core-primitives/top-pool/src/future.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/future.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/future.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/lib.rs b/tee-worker/bitacross/core-primitives/top-pool/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/lib.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/lib.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/listener.rs b/tee-worker/bitacross/core-primitives/top-pool/src/listener.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/listener.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/listener.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/mocks/mod.rs b/tee-worker/bitacross/core-primitives/top-pool/src/mocks/mod.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/mocks/mod.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/mocks/mod.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/mocks/rpc_responder_mock.rs b/tee-worker/bitacross/core-primitives/top-pool/src/mocks/rpc_responder_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/mocks/rpc_responder_mock.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/mocks/rpc_responder_mock.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/mocks/trusted_operation_pool_mock.rs b/tee-worker/bitacross/core-primitives/top-pool/src/mocks/trusted_operation_pool_mock.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/mocks/trusted_operation_pool_mock.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/mocks/trusted_operation_pool_mock.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/pool.rs b/tee-worker/bitacross/core-primitives/top-pool/src/pool.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/pool.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/pool.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/primitives.rs b/tee-worker/bitacross/core-primitives/top-pool/src/primitives.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/primitives.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/primitives.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/ready.rs b/tee-worker/bitacross/core-primitives/top-pool/src/ready.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/ready.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/ready.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/rotator.rs b/tee-worker/bitacross/core-primitives/top-pool/src/rotator.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/rotator.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/rotator.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/tracked_map.rs b/tee-worker/bitacross/core-primitives/top-pool/src/tracked_map.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/tracked_map.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/tracked_map.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/validated_pool.rs b/tee-worker/bitacross/core-primitives/top-pool/src/validated_pool.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/validated_pool.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/validated_pool.rs diff --git a/bitacross-worker/core-primitives/top-pool/src/watcher.rs b/tee-worker/bitacross/core-primitives/top-pool/src/watcher.rs similarity index 100% rename from bitacross-worker/core-primitives/top-pool/src/watcher.rs rename to tee-worker/bitacross/core-primitives/top-pool/src/watcher.rs diff --git a/bitacross-worker/core-primitives/types/Cargo.toml b/tee-worker/bitacross/core-primitives/types/Cargo.toml similarity index 100% rename from bitacross-worker/core-primitives/types/Cargo.toml rename to tee-worker/bitacross/core-primitives/types/Cargo.toml diff --git a/bitacross-worker/core-primitives/types/src/lib.rs b/tee-worker/bitacross/core-primitives/types/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/types/src/lib.rs rename to tee-worker/bitacross/core-primitives/types/src/lib.rs diff --git a/bitacross-worker/core-primitives/types/src/parentchain/events.rs b/tee-worker/bitacross/core-primitives/types/src/parentchain/events.rs similarity index 100% rename from bitacross-worker/core-primitives/types/src/parentchain/events.rs rename to tee-worker/bitacross/core-primitives/types/src/parentchain/events.rs diff --git a/bitacross-worker/core-primitives/types/src/parentchain/mod.rs b/tee-worker/bitacross/core-primitives/types/src/parentchain/mod.rs similarity index 100% rename from bitacross-worker/core-primitives/types/src/parentchain/mod.rs rename to tee-worker/bitacross/core-primitives/types/src/parentchain/mod.rs diff --git a/bitacross-worker/core-primitives/types/src/storage.rs b/tee-worker/bitacross/core-primitives/types/src/storage.rs similarity index 100% rename from bitacross-worker/core-primitives/types/src/storage.rs rename to tee-worker/bitacross/core-primitives/types/src/storage.rs diff --git a/tee-worker/core-primitives/utils/Cargo.toml b/tee-worker/bitacross/core-primitives/utils/Cargo.toml similarity index 86% rename from tee-worker/core-primitives/utils/Cargo.toml rename to tee-worker/bitacross/core-primitives/utils/Cargo.toml index 5815055393..5fb370797f 100644 --- a/tee-worker/core-primitives/utils/Cargo.toml +++ b/tee-worker/bitacross/core-primitives/utils/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } -litentry-hex-utils = { path = "../../../primitives/hex", default-features = false } +litentry-hex-utils = { path = "../../../../common/utils/hex", default-features = false } [features] default = ["std"] diff --git a/bitacross-worker/core-primitives/utils/src/buffer.rs b/tee-worker/bitacross/core-primitives/utils/src/buffer.rs similarity index 100% rename from bitacross-worker/core-primitives/utils/src/buffer.rs rename to tee-worker/bitacross/core-primitives/utils/src/buffer.rs diff --git a/bitacross-worker/core-primitives/utils/src/error.rs b/tee-worker/bitacross/core-primitives/utils/src/error.rs similarity index 100% rename from bitacross-worker/core-primitives/utils/src/error.rs rename to tee-worker/bitacross/core-primitives/utils/src/error.rs diff --git a/bitacross-worker/core-primitives/utils/src/hex.rs b/tee-worker/bitacross/core-primitives/utils/src/hex.rs similarity index 100% rename from bitacross-worker/core-primitives/utils/src/hex.rs rename to tee-worker/bitacross/core-primitives/utils/src/hex.rs diff --git a/bitacross-worker/core-primitives/utils/src/hex_display.rs b/tee-worker/bitacross/core-primitives/utils/src/hex_display.rs similarity index 100% rename from bitacross-worker/core-primitives/utils/src/hex_display.rs rename to tee-worker/bitacross/core-primitives/utils/src/hex_display.rs diff --git a/bitacross-worker/core-primitives/utils/src/lib.rs b/tee-worker/bitacross/core-primitives/utils/src/lib.rs similarity index 100% rename from bitacross-worker/core-primitives/utils/src/lib.rs rename to tee-worker/bitacross/core-primitives/utils/src/lib.rs diff --git a/bitacross-worker/core-primitives/utils/src/stringify.rs b/tee-worker/bitacross/core-primitives/utils/src/stringify.rs similarity index 100% rename from bitacross-worker/core-primitives/utils/src/stringify.rs rename to tee-worker/bitacross/core-primitives/utils/src/stringify.rs diff --git a/bitacross-worker/core/direct-rpc-client/Cargo.toml b/tee-worker/bitacross/core/direct-rpc-client/Cargo.toml similarity index 100% rename from bitacross-worker/core/direct-rpc-client/Cargo.toml rename to tee-worker/bitacross/core/direct-rpc-client/Cargo.toml diff --git a/bitacross-worker/core/direct-rpc-client/src/lib.rs b/tee-worker/bitacross/core/direct-rpc-client/src/lib.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-client/src/lib.rs rename to tee-worker/bitacross/core/direct-rpc-client/src/lib.rs diff --git a/bitacross-worker/core/direct-rpc-server/Cargo.toml b/tee-worker/bitacross/core/direct-rpc-server/Cargo.toml similarity index 100% rename from bitacross-worker/core/direct-rpc-server/Cargo.toml rename to tee-worker/bitacross/core/direct-rpc-server/Cargo.toml diff --git a/bitacross-worker/core/direct-rpc-server/src/builders/mod.rs b/tee-worker/bitacross/core/direct-rpc-server/src/builders/mod.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/builders/mod.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/builders/mod.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/builders/rpc_response_builder.rs b/tee-worker/bitacross/core/direct-rpc-server/src/builders/rpc_response_builder.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/builders/rpc_response_builder.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/builders/rpc_response_builder.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/builders/rpc_return_value_builder.rs b/tee-worker/bitacross/core/direct-rpc-server/src/builders/rpc_return_value_builder.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/builders/rpc_return_value_builder.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/builders/rpc_return_value_builder.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/lib.rs b/tee-worker/bitacross/core/direct-rpc-server/src/lib.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/lib.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/lib.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/mocks/determine_watch_mock.rs b/tee-worker/bitacross/core/direct-rpc-server/src/mocks/determine_watch_mock.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/mocks/determine_watch_mock.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/mocks/determine_watch_mock.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/mocks/mod.rs b/tee-worker/bitacross/core/direct-rpc-server/src/mocks/mod.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/mocks/mod.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/mocks/mod.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/mocks/response_channel_mock.rs b/tee-worker/bitacross/core/direct-rpc-server/src/mocks/response_channel_mock.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/mocks/response_channel_mock.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/mocks/response_channel_mock.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/mocks/send_rpc_response_mock.rs b/tee-worker/bitacross/core/direct-rpc-server/src/mocks/send_rpc_response_mock.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/mocks/send_rpc_response_mock.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/mocks/send_rpc_response_mock.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/response_channel.rs b/tee-worker/bitacross/core/direct-rpc-server/src/response_channel.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/response_channel.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/response_channel.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/rpc_connection_registry.rs b/tee-worker/bitacross/core/direct-rpc-server/src/rpc_connection_registry.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/rpc_connection_registry.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/rpc_connection_registry.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/rpc_responder.rs b/tee-worker/bitacross/core/direct-rpc-server/src/rpc_responder.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/rpc_responder.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/rpc_responder.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/rpc_watch_extractor.rs b/tee-worker/bitacross/core/direct-rpc-server/src/rpc_watch_extractor.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/rpc_watch_extractor.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/rpc_watch_extractor.rs diff --git a/bitacross-worker/core/direct-rpc-server/src/rpc_ws_handler.rs b/tee-worker/bitacross/core/direct-rpc-server/src/rpc_ws_handler.rs similarity index 100% rename from bitacross-worker/core/direct-rpc-server/src/rpc_ws_handler.rs rename to tee-worker/bitacross/core/direct-rpc-server/src/rpc_ws_handler.rs diff --git a/bitacross-worker/core/offchain-worker-executor/Cargo.toml b/tee-worker/bitacross/core/offchain-worker-executor/Cargo.toml similarity index 100% rename from bitacross-worker/core/offchain-worker-executor/Cargo.toml rename to tee-worker/bitacross/core/offchain-worker-executor/Cargo.toml diff --git a/bitacross-worker/core/offchain-worker-executor/src/error.rs b/tee-worker/bitacross/core/offchain-worker-executor/src/error.rs similarity index 100% rename from bitacross-worker/core/offchain-worker-executor/src/error.rs rename to tee-worker/bitacross/core/offchain-worker-executor/src/error.rs diff --git a/bitacross-worker/core/offchain-worker-executor/src/executor.rs b/tee-worker/bitacross/core/offchain-worker-executor/src/executor.rs similarity index 100% rename from bitacross-worker/core/offchain-worker-executor/src/executor.rs rename to tee-worker/bitacross/core/offchain-worker-executor/src/executor.rs diff --git a/bitacross-worker/core/offchain-worker-executor/src/lib.rs b/tee-worker/bitacross/core/offchain-worker-executor/src/lib.rs similarity index 100% rename from bitacross-worker/core/offchain-worker-executor/src/lib.rs rename to tee-worker/bitacross/core/offchain-worker-executor/src/lib.rs diff --git a/bitacross-worker/core/parentchain/block-import-dispatcher/Cargo.toml b/tee-worker/bitacross/core/parentchain/block-import-dispatcher/Cargo.toml similarity index 100% rename from bitacross-worker/core/parentchain/block-import-dispatcher/Cargo.toml rename to tee-worker/bitacross/core/parentchain/block-import-dispatcher/Cargo.toml diff --git a/bitacross-worker/core/parentchain/block-import-dispatcher/src/error.rs b/tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/error.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-import-dispatcher/src/error.rs rename to tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/error.rs diff --git a/bitacross-worker/core/parentchain/block-import-dispatcher/src/immediate_dispatcher.rs b/tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/immediate_dispatcher.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-import-dispatcher/src/immediate_dispatcher.rs rename to tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/immediate_dispatcher.rs diff --git a/bitacross-worker/core/parentchain/block-import-dispatcher/src/lib.rs b/tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/lib.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-import-dispatcher/src/lib.rs rename to tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/lib.rs diff --git a/bitacross-worker/core/parentchain/block-import-dispatcher/src/trigger_parentchain_block_import_mock.rs b/tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/trigger_parentchain_block_import_mock.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-import-dispatcher/src/trigger_parentchain_block_import_mock.rs rename to tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/trigger_parentchain_block_import_mock.rs diff --git a/bitacross-worker/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs b/tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs rename to tee-worker/bitacross/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs diff --git a/bitacross-worker/core/parentchain/block-importer/Cargo.toml b/tee-worker/bitacross/core/parentchain/block-importer/Cargo.toml similarity index 100% rename from bitacross-worker/core/parentchain/block-importer/Cargo.toml rename to tee-worker/bitacross/core/parentchain/block-importer/Cargo.toml diff --git a/bitacross-worker/core/parentchain/block-importer/src/block_importer.rs b/tee-worker/bitacross/core/parentchain/block-importer/src/block_importer.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-importer/src/block_importer.rs rename to tee-worker/bitacross/core/parentchain/block-importer/src/block_importer.rs diff --git a/bitacross-worker/core/parentchain/block-importer/src/block_importer_mock.rs b/tee-worker/bitacross/core/parentchain/block-importer/src/block_importer_mock.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-importer/src/block_importer_mock.rs rename to tee-worker/bitacross/core/parentchain/block-importer/src/block_importer_mock.rs diff --git a/bitacross-worker/core/parentchain/block-importer/src/error.rs b/tee-worker/bitacross/core/parentchain/block-importer/src/error.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-importer/src/error.rs rename to tee-worker/bitacross/core/parentchain/block-importer/src/error.rs diff --git a/bitacross-worker/core/parentchain/block-importer/src/lib.rs b/tee-worker/bitacross/core/parentchain/block-importer/src/lib.rs similarity index 100% rename from bitacross-worker/core/parentchain/block-importer/src/lib.rs rename to tee-worker/bitacross/core/parentchain/block-importer/src/lib.rs diff --git a/bitacross-worker/core/parentchain/indirect-calls-executor/Cargo.toml b/tee-worker/bitacross/core/parentchain/indirect-calls-executor/Cargo.toml similarity index 100% rename from bitacross-worker/core/parentchain/indirect-calls-executor/Cargo.toml rename to tee-worker/bitacross/core/parentchain/indirect-calls-executor/Cargo.toml diff --git a/bitacross-worker/core/parentchain/indirect-calls-executor/src/error.rs b/tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/error.rs similarity index 100% rename from bitacross-worker/core/parentchain/indirect-calls-executor/src/error.rs rename to tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/error.rs diff --git a/bitacross-worker/core/parentchain/indirect-calls-executor/src/event_filter.rs b/tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/event_filter.rs similarity index 100% rename from bitacross-worker/core/parentchain/indirect-calls-executor/src/event_filter.rs rename to tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/event_filter.rs diff --git a/bitacross-worker/core/parentchain/indirect-calls-executor/src/executor.rs b/tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/executor.rs similarity index 100% rename from bitacross-worker/core/parentchain/indirect-calls-executor/src/executor.rs rename to tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/executor.rs diff --git a/bitacross-worker/core/parentchain/indirect-calls-executor/src/filter_metadata.rs b/tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/filter_metadata.rs similarity index 100% rename from bitacross-worker/core/parentchain/indirect-calls-executor/src/filter_metadata.rs rename to tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/filter_metadata.rs diff --git a/bitacross-worker/core/parentchain/indirect-calls-executor/src/lib.rs b/tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/lib.rs similarity index 100% rename from bitacross-worker/core/parentchain/indirect-calls-executor/src/lib.rs rename to tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/lib.rs diff --git a/bitacross-worker/core/parentchain/indirect-calls-executor/src/mock.rs b/tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/mock.rs similarity index 100% rename from bitacross-worker/core/parentchain/indirect-calls-executor/src/mock.rs rename to tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/mock.rs diff --git a/bitacross-worker/core/parentchain/indirect-calls-executor/src/traits.rs b/tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/traits.rs similarity index 100% rename from bitacross-worker/core/parentchain/indirect-calls-executor/src/traits.rs rename to tee-worker/bitacross/core/parentchain/indirect-calls-executor/src/traits.rs diff --git a/bitacross-worker/core/parentchain/light-client/Cargo.toml b/tee-worker/bitacross/core/parentchain/light-client/Cargo.toml similarity index 100% rename from bitacross-worker/core/parentchain/light-client/Cargo.toml rename to tee-worker/bitacross/core/parentchain/light-client/Cargo.toml diff --git a/bitacross-worker/core/parentchain/light-client/src/concurrent_access.rs b/tee-worker/bitacross/core/parentchain/light-client/src/concurrent_access.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/concurrent_access.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/concurrent_access.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/error.rs b/tee-worker/bitacross/core/parentchain/light-client/src/error.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/error.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/error.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/finality.rs b/tee-worker/bitacross/core/parentchain/light-client/src/finality.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/finality.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/finality.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/io.rs b/tee-worker/bitacross/core/parentchain/light-client/src/io.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/io.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/io.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/justification.rs b/tee-worker/bitacross/core/parentchain/light-client/src/justification.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/justification.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/justification.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/lib.rs b/tee-worker/bitacross/core/parentchain/light-client/src/lib.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/lib.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/lib.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/light_client_init_params.rs b/tee-worker/bitacross/core/parentchain/light-client/src/light_client_init_params.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/light_client_init_params.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/light_client_init_params.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/light_validation.rs b/tee-worker/bitacross/core/parentchain/light-client/src/light_validation.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/light_validation.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/light_validation.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/light_validation_state.rs b/tee-worker/bitacross/core/parentchain/light-client/src/light_validation_state.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/light_validation_state.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/light_validation_state.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/mocks/mod.rs b/tee-worker/bitacross/core/parentchain/light-client/src/mocks/mod.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/mocks/mod.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/mocks/mod.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/mocks/validator_access_mock.rs b/tee-worker/bitacross/core/parentchain/light-client/src/mocks/validator_access_mock.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/mocks/validator_access_mock.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/mocks/validator_access_mock.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/mocks/validator_mock.rs b/tee-worker/bitacross/core/parentchain/light-client/src/mocks/validator_mock.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/mocks/validator_mock.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/mocks/validator_mock.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/mocks/validator_mock_seal.rs b/tee-worker/bitacross/core/parentchain/light-client/src/mocks/validator_mock_seal.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/mocks/validator_mock_seal.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/mocks/validator_mock_seal.rs diff --git a/bitacross-worker/core/parentchain/light-client/src/state.rs b/tee-worker/bitacross/core/parentchain/light-client/src/state.rs similarity index 100% rename from bitacross-worker/core/parentchain/light-client/src/state.rs rename to tee-worker/bitacross/core/parentchain/light-client/src/state.rs diff --git a/bitacross-worker/core/parentchain/parentchain-crate/Cargo.toml b/tee-worker/bitacross/core/parentchain/parentchain-crate/Cargo.toml similarity index 100% rename from bitacross-worker/core/parentchain/parentchain-crate/Cargo.toml rename to tee-worker/bitacross/core/parentchain/parentchain-crate/Cargo.toml diff --git a/bitacross-worker/core/parentchain/parentchain-crate/src/lib.rs b/tee-worker/bitacross/core/parentchain/parentchain-crate/src/lib.rs similarity index 100% rename from bitacross-worker/core/parentchain/parentchain-crate/src/lib.rs rename to tee-worker/bitacross/core/parentchain/parentchain-crate/src/lib.rs diff --git a/bitacross-worker/core/parentchain/parentchain-crate/src/primitives.rs b/tee-worker/bitacross/core/parentchain/parentchain-crate/src/primitives.rs similarity index 100% rename from bitacross-worker/core/parentchain/parentchain-crate/src/primitives.rs rename to tee-worker/bitacross/core/parentchain/parentchain-crate/src/primitives.rs diff --git a/bitacross-worker/core/parentchain/test/Cargo.toml b/tee-worker/bitacross/core/parentchain/test/Cargo.toml similarity index 100% rename from bitacross-worker/core/parentchain/test/Cargo.toml rename to tee-worker/bitacross/core/parentchain/test/Cargo.toml diff --git a/bitacross-worker/core/parentchain/test/src/lib.rs b/tee-worker/bitacross/core/parentchain/test/src/lib.rs similarity index 100% rename from bitacross-worker/core/parentchain/test/src/lib.rs rename to tee-worker/bitacross/core/parentchain/test/src/lib.rs diff --git a/bitacross-worker/core/parentchain/test/src/parentchain_block_builder.rs b/tee-worker/bitacross/core/parentchain/test/src/parentchain_block_builder.rs similarity index 100% rename from bitacross-worker/core/parentchain/test/src/parentchain_block_builder.rs rename to tee-worker/bitacross/core/parentchain/test/src/parentchain_block_builder.rs diff --git a/bitacross-worker/core/parentchain/test/src/parentchain_header_builder.rs b/tee-worker/bitacross/core/parentchain/test/src/parentchain_header_builder.rs similarity index 100% rename from bitacross-worker/core/parentchain/test/src/parentchain_header_builder.rs rename to tee-worker/bitacross/core/parentchain/test/src/parentchain_header_builder.rs diff --git a/bitacross-worker/core/rest-client/Cargo.toml b/tee-worker/bitacross/core/rest-client/Cargo.toml similarity index 100% rename from bitacross-worker/core/rest-client/Cargo.toml rename to tee-worker/bitacross/core/rest-client/Cargo.toml diff --git a/bitacross-worker/core/rest-client/src/error.rs b/tee-worker/bitacross/core/rest-client/src/error.rs similarity index 100% rename from bitacross-worker/core/rest-client/src/error.rs rename to tee-worker/bitacross/core/rest-client/src/error.rs diff --git a/bitacross-worker/core/rest-client/src/fixtures/amazon_root_ca_1_v3.pem b/tee-worker/bitacross/core/rest-client/src/fixtures/amazon_root_ca_1_v3.pem similarity index 100% rename from bitacross-worker/core/rest-client/src/fixtures/amazon_root_ca_1_v3.pem rename to tee-worker/bitacross/core/rest-client/src/fixtures/amazon_root_ca_1_v3.pem diff --git a/bitacross-worker/core/rest-client/src/fixtures/baltimore_cyber_trust_root_v3.pem b/tee-worker/bitacross/core/rest-client/src/fixtures/baltimore_cyber_trust_root_v3.pem similarity index 100% rename from bitacross-worker/core/rest-client/src/fixtures/baltimore_cyber_trust_root_v3.pem rename to tee-worker/bitacross/core/rest-client/src/fixtures/baltimore_cyber_trust_root_v3.pem diff --git a/bitacross-worker/core/rest-client/src/fixtures/lets_encrypt_root_cert.pem b/tee-worker/bitacross/core/rest-client/src/fixtures/lets_encrypt_root_cert.pem similarity index 100% rename from bitacross-worker/core/rest-client/src/fixtures/lets_encrypt_root_cert.pem rename to tee-worker/bitacross/core/rest-client/src/fixtures/lets_encrypt_root_cert.pem diff --git a/bitacross-worker/core/rest-client/src/http_client.rs b/tee-worker/bitacross/core/rest-client/src/http_client.rs similarity index 100% rename from bitacross-worker/core/rest-client/src/http_client.rs rename to tee-worker/bitacross/core/rest-client/src/http_client.rs diff --git a/bitacross-worker/core/rest-client/src/lib.rs b/tee-worker/bitacross/core/rest-client/src/lib.rs similarity index 100% rename from bitacross-worker/core/rest-client/src/lib.rs rename to tee-worker/bitacross/core/rest-client/src/lib.rs diff --git a/bitacross-worker/core/rest-client/src/mocks/http_client_mock.rs b/tee-worker/bitacross/core/rest-client/src/mocks/http_client_mock.rs similarity index 100% rename from bitacross-worker/core/rest-client/src/mocks/http_client_mock.rs rename to tee-worker/bitacross/core/rest-client/src/mocks/http_client_mock.rs diff --git a/bitacross-worker/core/rest-client/src/mocks/mod.rs b/tee-worker/bitacross/core/rest-client/src/mocks/mod.rs similarity index 100% rename from bitacross-worker/core/rest-client/src/mocks/mod.rs rename to tee-worker/bitacross/core/rest-client/src/mocks/mod.rs diff --git a/bitacross-worker/core/rest-client/src/rest_client.rs b/tee-worker/bitacross/core/rest-client/src/rest_client.rs similarity index 100% rename from bitacross-worker/core/rest-client/src/rest_client.rs rename to tee-worker/bitacross/core/rest-client/src/rest_client.rs diff --git a/bitacross-worker/core/rpc-client/Cargo.toml b/tee-worker/bitacross/core/rpc-client/Cargo.toml similarity index 100% rename from bitacross-worker/core/rpc-client/Cargo.toml rename to tee-worker/bitacross/core/rpc-client/Cargo.toml diff --git a/bitacross-worker/core/rpc-client/src/direct_client.rs b/tee-worker/bitacross/core/rpc-client/src/direct_client.rs similarity index 100% rename from bitacross-worker/core/rpc-client/src/direct_client.rs rename to tee-worker/bitacross/core/rpc-client/src/direct_client.rs diff --git a/bitacross-worker/core/rpc-client/src/error.rs b/tee-worker/bitacross/core/rpc-client/src/error.rs similarity index 100% rename from bitacross-worker/core/rpc-client/src/error.rs rename to tee-worker/bitacross/core/rpc-client/src/error.rs diff --git a/bitacross-worker/core/rpc-client/src/lib.rs b/tee-worker/bitacross/core/rpc-client/src/lib.rs similarity index 100% rename from bitacross-worker/core/rpc-client/src/lib.rs rename to tee-worker/bitacross/core/rpc-client/src/lib.rs diff --git a/bitacross-worker/core/rpc-client/src/mock.rs b/tee-worker/bitacross/core/rpc-client/src/mock.rs similarity index 100% rename from bitacross-worker/core/rpc-client/src/mock.rs rename to tee-worker/bitacross/core/rpc-client/src/mock.rs diff --git a/bitacross-worker/core/rpc-client/src/ws_client.rs b/tee-worker/bitacross/core/rpc-client/src/ws_client.rs similarity index 100% rename from bitacross-worker/core/rpc-client/src/ws_client.rs rename to tee-worker/bitacross/core/rpc-client/src/ws_client.rs diff --git a/bitacross-worker/core/tls-websocket-server/Cargo.toml b/tee-worker/bitacross/core/tls-websocket-server/Cargo.toml similarity index 100% rename from bitacross-worker/core/tls-websocket-server/Cargo.toml rename to tee-worker/bitacross/core/tls-websocket-server/Cargo.toml diff --git a/bitacross-worker/core/tls-websocket-server/src/certificate_generation.rs b/tee-worker/bitacross/core/tls-websocket-server/src/certificate_generation.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/certificate_generation.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/certificate_generation.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/config_provider.rs b/tee-worker/bitacross/core/tls-websocket-server/src/config_provider.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/config_provider.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/config_provider.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/connection.rs b/tee-worker/bitacross/core/tls-websocket-server/src/connection.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/connection.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/connection.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/connection_id_generator.rs b/tee-worker/bitacross/core/tls-websocket-server/src/connection_id_generator.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/connection_id_generator.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/connection_id_generator.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/error.rs b/tee-worker/bitacross/core/tls-websocket-server/src/error.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/error.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/error.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/lib.rs b/tee-worker/bitacross/core/tls-websocket-server/src/lib.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/lib.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/lib.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/stream_state.rs b/tee-worker/bitacross/core/tls-websocket-server/src/stream_state.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/stream_state.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/stream_state.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/fixtures/mod.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/mod.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/fixtures/mod.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/mod.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/fixtures/no_cert_verifier.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/no_cert_verifier.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/fixtures/no_cert_verifier.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/no_cert_verifier.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/fixtures/test_cert.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/test_cert.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/fixtures/test_cert.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/test_cert.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/fixtures/test_private_key.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/test_private_key.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/fixtures/test_private_key.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/test_private_key.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/fixtures/test_server.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/test_server.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/fixtures/test_server.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/test_server.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/fixtures/test_server_config_provider.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/test_server_config_provider.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/fixtures/test_server_config_provider.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/fixtures/test_server_config_provider.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/mocks/mod.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/mocks/mod.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/mocks/mod.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/mocks/mod.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/mocks/web_socket_connection_mock.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/mocks/web_socket_connection_mock.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/mocks/web_socket_connection_mock.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/mocks/web_socket_connection_mock.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/mocks/web_socket_handler_mock.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/mocks/web_socket_handler_mock.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/mocks/web_socket_handler_mock.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/mocks/web_socket_handler_mock.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/test/mod.rs b/tee-worker/bitacross/core/tls-websocket-server/src/test/mod.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/test/mod.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/test/mod.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/tls_common.rs b/tee-worker/bitacross/core/tls-websocket-server/src/tls_common.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/tls_common.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/tls_common.rs diff --git a/bitacross-worker/core/tls-websocket-server/src/ws_server.rs b/tee-worker/bitacross/core/tls-websocket-server/src/ws_server.rs similarity index 100% rename from bitacross-worker/core/tls-websocket-server/src/ws_server.rs rename to tee-worker/bitacross/core/tls-websocket-server/src/ws_server.rs diff --git a/bitacross-worker/docker/README.md b/tee-worker/bitacross/docker/README.md similarity index 100% rename from bitacross-worker/docker/README.md rename to tee-worker/bitacross/docker/README.md diff --git a/bitacross-worker/docker/docker-compose.yml b/tee-worker/bitacross/docker/docker-compose.yml similarity index 100% rename from bitacross-worker/docker/docker-compose.yml rename to tee-worker/bitacross/docker/docker-compose.yml diff --git a/bitacross-worker/docker/entrypoint.sh b/tee-worker/bitacross/docker/entrypoint.sh similarity index 100% rename from bitacross-worker/docker/entrypoint.sh rename to tee-worker/bitacross/docker/entrypoint.sh diff --git a/bitacross-worker/docker/fork.Dockerfile b/tee-worker/bitacross/docker/fork.Dockerfile similarity index 100% rename from bitacross-worker/docker/fork.Dockerfile rename to tee-worker/bitacross/docker/fork.Dockerfile diff --git a/bitacross-worker/docker/lit-parentchain-nonce.yml b/tee-worker/bitacross/docker/lit-parentchain-nonce.yml similarity index 100% rename from bitacross-worker/docker/lit-parentchain-nonce.yml rename to tee-worker/bitacross/docker/lit-parentchain-nonce.yml diff --git a/bitacross-worker/docker/lit-sign-bitcoin.yml b/tee-worker/bitacross/docker/lit-sign-bitcoin.yml similarity index 100% rename from bitacross-worker/docker/lit-sign-bitcoin.yml rename to tee-worker/bitacross/docker/lit-sign-bitcoin.yml diff --git a/bitacross-worker/docker/multiworker-docker-compose.yml b/tee-worker/bitacross/docker/multiworker-docker-compose.yml similarity index 100% rename from bitacross-worker/docker/multiworker-docker-compose.yml rename to tee-worker/bitacross/docker/multiworker-docker-compose.yml diff --git a/bitacross-worker/docker/ping.Dockerfile b/tee-worker/bitacross/docker/ping.Dockerfile similarity index 100% rename from bitacross-worker/docker/ping.Dockerfile rename to tee-worker/bitacross/docker/ping.Dockerfile diff --git a/bitacross-worker/docker/sidechain-benchmark.yml b/tee-worker/bitacross/docker/sidechain-benchmark.yml similarity index 100% rename from bitacross-worker/docker/sidechain-benchmark.yml rename to tee-worker/bitacross/docker/sidechain-benchmark.yml diff --git a/bitacross-worker/docs/README.md b/tee-worker/bitacross/docs/README.md similarity index 100% rename from bitacross-worker/docs/README.md rename to tee-worker/bitacross/docs/README.md diff --git a/bitacross-worker/docs/diagramms/block_import_sequence.svg b/tee-worker/bitacross/docs/diagramms/block_import_sequence.svg similarity index 100% rename from bitacross-worker/docs/diagramms/block_import_sequence.svg rename to tee-worker/bitacross/docs/diagramms/block_import_sequence.svg diff --git a/bitacross-worker/enclave-runtime/Cargo.lock b/tee-worker/bitacross/enclave-runtime/Cargo.lock similarity index 100% rename from bitacross-worker/enclave-runtime/Cargo.lock rename to tee-worker/bitacross/enclave-runtime/Cargo.lock diff --git a/bitacross-worker/enclave-runtime/Cargo.toml b/tee-worker/bitacross/enclave-runtime/Cargo.toml similarity index 98% rename from bitacross-worker/enclave-runtime/Cargo.toml rename to tee-worker/bitacross/enclave-runtime/Cargo.toml index dc08376e2f..1237624816 100644 --- a/bitacross-worker/enclave-runtime/Cargo.toml +++ b/tee-worker/bitacross/enclave-runtime/Cargo.toml @@ -130,10 +130,10 @@ bc-relayer-registry = { path = "../bitacross/core/bc-relayer-registry", default- bc-signer-registry = { path = "../bitacross/core/bc-signer-registry", default-features = false, features = ["sgx"] } bc-task-sender = { path = "../bitacross/core/bc-task-sender", default-features = false, features = ["sgx"] } lc-direct-call = { path = "../litentry/core/direct-call", default-features = false } -litentry-hex-utils = { path = "../../primitives/hex", default-features = false } -litentry-macros = { path = "../../primitives/core/macros", default-features = false } +litentry-hex-utils = { path = "../../../common/utils/hex", default-features = false } +litentry-macros = { path = "../../../common/primitives/core/macros", default-features = false } litentry-primitives = { path = "../litentry/primitives", default-features = false, features = ["sgx"] } -litentry-proc-macros = { path = "../../primitives/core/proc-macros", default-features = false } +litentry-proc-macros = { path = "../../../common/primitives/core/proc-macros", default-features = false } # bitacross bc-task-processor = { path = "../bitacross/core/bc-task-processor", default-features = false, features = ["sgx"] } diff --git a/bitacross-worker/enclave-runtime/Enclave.config.production.xml b/tee-worker/bitacross/enclave-runtime/Enclave.config.production.xml similarity index 100% rename from bitacross-worker/enclave-runtime/Enclave.config.production.xml rename to tee-worker/bitacross/enclave-runtime/Enclave.config.production.xml diff --git a/bitacross-worker/enclave-runtime/Enclave.config.xml b/tee-worker/bitacross/enclave-runtime/Enclave.config.xml similarity index 100% rename from bitacross-worker/enclave-runtime/Enclave.config.xml rename to tee-worker/bitacross/enclave-runtime/Enclave.config.xml diff --git a/bitacross-worker/enclave-runtime/Enclave.edl b/tee-worker/bitacross/enclave-runtime/Enclave.edl similarity index 100% rename from bitacross-worker/enclave-runtime/Enclave.edl rename to tee-worker/bitacross/enclave-runtime/Enclave.edl diff --git a/bitacross-worker/enclave-runtime/Enclave.lds b/tee-worker/bitacross/enclave-runtime/Enclave.lds similarity index 100% rename from bitacross-worker/enclave-runtime/Enclave.lds rename to tee-worker/bitacross/enclave-runtime/Enclave.lds diff --git a/bitacross-worker/enclave-runtime/Enclave_private.pem b/tee-worker/bitacross/enclave-runtime/Enclave_private.pem similarity index 100% rename from bitacross-worker/enclave-runtime/Enclave_private.pem rename to tee-worker/bitacross/enclave-runtime/Enclave_private.pem diff --git a/bitacross-worker/enclave-runtime/Makefile b/tee-worker/bitacross/enclave-runtime/Makefile similarity index 100% rename from bitacross-worker/enclave-runtime/Makefile rename to tee-worker/bitacross/enclave-runtime/Makefile diff --git a/bitacross-worker/enclave-runtime/README.md b/tee-worker/bitacross/enclave-runtime/README.md similarity index 100% rename from bitacross-worker/enclave-runtime/README.md rename to tee-worker/bitacross/enclave-runtime/README.md diff --git a/bitacross-worker/enclave-runtime/rust-toolchain.toml b/tee-worker/bitacross/enclave-runtime/rust-toolchain.toml similarity index 100% rename from bitacross-worker/enclave-runtime/rust-toolchain.toml rename to tee-worker/bitacross/enclave-runtime/rust-toolchain.toml diff --git a/bitacross-worker/enclave-runtime/rustfmt.toml b/tee-worker/bitacross/enclave-runtime/rustfmt.toml similarity index 100% rename from bitacross-worker/enclave-runtime/rustfmt.toml rename to tee-worker/bitacross/enclave-runtime/rustfmt.toml diff --git a/bitacross-worker/enclave-runtime/src/attestation.rs b/tee-worker/bitacross/enclave-runtime/src/attestation.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/attestation.rs rename to tee-worker/bitacross/enclave-runtime/src/attestation.rs diff --git a/bitacross-worker/enclave-runtime/src/empty_impls.rs b/tee-worker/bitacross/enclave-runtime/src/empty_impls.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/empty_impls.rs rename to tee-worker/bitacross/enclave-runtime/src/empty_impls.rs diff --git a/bitacross-worker/enclave-runtime/src/error.rs b/tee-worker/bitacross/enclave-runtime/src/error.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/error.rs rename to tee-worker/bitacross/enclave-runtime/src/error.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/global_components.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/global_components.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/global_components.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/global_components.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/mod.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/mod.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/mod.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/mod.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/parentchain/common.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/common.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/parentchain/common.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/common.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/parentchain/integritee_parachain.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/integritee_parachain.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/parentchain/integritee_parachain.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/integritee_parachain.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/parentchain/integritee_solochain.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/integritee_solochain.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/parentchain/integritee_solochain.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/integritee_solochain.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/parentchain/mod.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/mod.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/parentchain/mod.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/mod.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/parentchain/target_a_parachain.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/target_a_parachain.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/parentchain/target_a_parachain.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/target_a_parachain.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/parentchain/target_a_solochain.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/target_a_solochain.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/parentchain/target_a_solochain.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/target_a_solochain.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/parentchain/target_b_parachain.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/target_b_parachain.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/parentchain/target_b_parachain.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/target_b_parachain.rs diff --git a/bitacross-worker/enclave-runtime/src/initialization/parentchain/target_b_solochain.rs b/tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/target_b_solochain.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/initialization/parentchain/target_b_solochain.rs rename to tee-worker/bitacross/enclave-runtime/src/initialization/parentchain/target_b_solochain.rs diff --git a/bitacross-worker/enclave-runtime/src/ipfs.rs b/tee-worker/bitacross/enclave-runtime/src/ipfs.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/ipfs.rs rename to tee-worker/bitacross/enclave-runtime/src/ipfs.rs diff --git a/bitacross-worker/enclave-runtime/src/lib.rs b/tee-worker/bitacross/enclave-runtime/src/lib.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/lib.rs rename to tee-worker/bitacross/enclave-runtime/src/lib.rs diff --git a/bitacross-worker/enclave-runtime/src/ocall/attestation_ocall.rs b/tee-worker/bitacross/enclave-runtime/src/ocall/attestation_ocall.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/ocall/attestation_ocall.rs rename to tee-worker/bitacross/enclave-runtime/src/ocall/attestation_ocall.rs diff --git a/bitacross-worker/enclave-runtime/src/ocall/ffi.rs b/tee-worker/bitacross/enclave-runtime/src/ocall/ffi.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/ocall/ffi.rs rename to tee-worker/bitacross/enclave-runtime/src/ocall/ffi.rs diff --git a/bitacross-worker/enclave-runtime/src/ocall/ipfs_ocall.rs b/tee-worker/bitacross/enclave-runtime/src/ocall/ipfs_ocall.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/ocall/ipfs_ocall.rs rename to tee-worker/bitacross/enclave-runtime/src/ocall/ipfs_ocall.rs diff --git a/bitacross-worker/enclave-runtime/src/ocall/metrics_ocall.rs b/tee-worker/bitacross/enclave-runtime/src/ocall/metrics_ocall.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/ocall/metrics_ocall.rs rename to tee-worker/bitacross/enclave-runtime/src/ocall/metrics_ocall.rs diff --git a/bitacross-worker/enclave-runtime/src/ocall/mod.rs b/tee-worker/bitacross/enclave-runtime/src/ocall/mod.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/ocall/mod.rs rename to tee-worker/bitacross/enclave-runtime/src/ocall/mod.rs diff --git a/bitacross-worker/enclave-runtime/src/ocall/on_chain_ocall.rs b/tee-worker/bitacross/enclave-runtime/src/ocall/on_chain_ocall.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/ocall/on_chain_ocall.rs rename to tee-worker/bitacross/enclave-runtime/src/ocall/on_chain_ocall.rs diff --git a/bitacross-worker/enclave-runtime/src/rpc/mod.rs b/tee-worker/bitacross/enclave-runtime/src/rpc/mod.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/rpc/mod.rs rename to tee-worker/bitacross/enclave-runtime/src/rpc/mod.rs diff --git a/bitacross-worker/enclave-runtime/src/rpc/rpc_response_channel.rs b/tee-worker/bitacross/enclave-runtime/src/rpc/rpc_response_channel.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/rpc/rpc_response_channel.rs rename to tee-worker/bitacross/enclave-runtime/src/rpc/rpc_response_channel.rs diff --git a/bitacross-worker/enclave-runtime/src/rpc/worker_api_direct.rs b/tee-worker/bitacross/enclave-runtime/src/rpc/worker_api_direct.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/rpc/worker_api_direct.rs rename to tee-worker/bitacross/enclave-runtime/src/rpc/worker_api_direct.rs diff --git a/bitacross-worker/enclave-runtime/src/shard_config.rs b/tee-worker/bitacross/enclave-runtime/src/shard_config.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/shard_config.rs rename to tee-worker/bitacross/enclave-runtime/src/shard_config.rs diff --git a/bitacross-worker/enclave-runtime/src/shard_creation_info.rs b/tee-worker/bitacross/enclave-runtime/src/shard_creation_info.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/shard_creation_info.rs rename to tee-worker/bitacross/enclave-runtime/src/shard_creation_info.rs diff --git a/bitacross-worker/enclave-runtime/src/stf_task_handler.rs b/tee-worker/bitacross/enclave-runtime/src/stf_task_handler.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/stf_task_handler.rs rename to tee-worker/bitacross/enclave-runtime/src/stf_task_handler.rs diff --git a/bitacross-worker/enclave-runtime/src/sync.rs b/tee-worker/bitacross/enclave-runtime/src/sync.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/sync.rs rename to tee-worker/bitacross/enclave-runtime/src/sync.rs diff --git a/bitacross-worker/enclave-runtime/src/test/Counter.sol b/tee-worker/bitacross/enclave-runtime/src/test/Counter.sol similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/Counter.sol rename to tee-worker/bitacross/enclave-runtime/src/test/Counter.sol diff --git a/bitacross-worker/enclave-runtime/src/test/cert_tests.rs b/tee-worker/bitacross/enclave-runtime/src/test/cert_tests.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/cert_tests.rs rename to tee-worker/bitacross/enclave-runtime/src/test/cert_tests.rs diff --git a/bitacross-worker/enclave-runtime/src/test/direct_rpc_tests.rs b/tee-worker/bitacross/enclave-runtime/src/test/direct_rpc_tests.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/direct_rpc_tests.rs rename to tee-worker/bitacross/enclave-runtime/src/test/direct_rpc_tests.rs diff --git a/bitacross-worker/enclave-runtime/src/test/enclave_signer_tests.rs b/tee-worker/bitacross/enclave-runtime/src/test/enclave_signer_tests.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/enclave_signer_tests.rs rename to tee-worker/bitacross/enclave-runtime/src/test/enclave_signer_tests.rs diff --git a/bitacross-worker/enclave-runtime/src/test/fixtures/components.rs b/tee-worker/bitacross/enclave-runtime/src/test/fixtures/components.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/fixtures/components.rs rename to tee-worker/bitacross/enclave-runtime/src/test/fixtures/components.rs diff --git a/bitacross-worker/enclave-runtime/src/test/fixtures/initialize_test_state.rs b/tee-worker/bitacross/enclave-runtime/src/test/fixtures/initialize_test_state.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/fixtures/initialize_test_state.rs rename to tee-worker/bitacross/enclave-runtime/src/test/fixtures/initialize_test_state.rs diff --git a/bitacross-worker/enclave-runtime/src/test/fixtures/mod.rs b/tee-worker/bitacross/enclave-runtime/src/test/fixtures/mod.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/fixtures/mod.rs rename to tee-worker/bitacross/enclave-runtime/src/test/fixtures/mod.rs diff --git a/pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST4.der b/tee-worker/bitacross/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der similarity index 100% rename from pallets/teebag/src/sgx_verify/test/ra_dump_cert_TEST4.der rename to tee-worker/bitacross/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der diff --git a/pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin b/tee-worker/bitacross/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin similarity index 100% rename from pallets/teebag/src/sgx_verify/test/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin rename to tee-worker/bitacross/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin diff --git a/bitacross-worker/enclave-runtime/src/test/fixtures/test_setup.rs b/tee-worker/bitacross/enclave-runtime/src/test/fixtures/test_setup.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/fixtures/test_setup.rs rename to tee-worker/bitacross/enclave-runtime/src/test/fixtures/test_setup.rs diff --git a/bitacross-worker/enclave-runtime/src/test/ipfs_tests.rs b/tee-worker/bitacross/enclave-runtime/src/test/ipfs_tests.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/ipfs_tests.rs rename to tee-worker/bitacross/enclave-runtime/src/test/ipfs_tests.rs diff --git a/bitacross-worker/enclave-runtime/src/test/mocks/attestation_ocall_mock.rs b/tee-worker/bitacross/enclave-runtime/src/test/mocks/attestation_ocall_mock.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/mocks/attestation_ocall_mock.rs rename to tee-worker/bitacross/enclave-runtime/src/test/mocks/attestation_ocall_mock.rs diff --git a/bitacross-worker/enclave-runtime/src/test/mocks/mod.rs b/tee-worker/bitacross/enclave-runtime/src/test/mocks/mod.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/mocks/mod.rs rename to tee-worker/bitacross/enclave-runtime/src/test/mocks/mod.rs diff --git a/bitacross-worker/enclave-runtime/src/test/mocks/rpc_responder_mock.rs b/tee-worker/bitacross/enclave-runtime/src/test/mocks/rpc_responder_mock.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/mocks/rpc_responder_mock.rs rename to tee-worker/bitacross/enclave-runtime/src/test/mocks/rpc_responder_mock.rs diff --git a/bitacross-worker/enclave-runtime/src/test/mocks/types.rs b/tee-worker/bitacross/enclave-runtime/src/test/mocks/types.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/mocks/types.rs rename to tee-worker/bitacross/enclave-runtime/src/test/mocks/types.rs diff --git a/bitacross-worker/enclave-runtime/src/test/mod.rs b/tee-worker/bitacross/enclave-runtime/src/test/mod.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/mod.rs rename to tee-worker/bitacross/enclave-runtime/src/test/mod.rs diff --git a/bitacross-worker/enclave-runtime/src/test/state_getter_tests.rs b/tee-worker/bitacross/enclave-runtime/src/test/state_getter_tests.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/state_getter_tests.rs rename to tee-worker/bitacross/enclave-runtime/src/test/state_getter_tests.rs diff --git a/bitacross-worker/enclave-runtime/src/test/tests_main.rs b/tee-worker/bitacross/enclave-runtime/src/test/tests_main.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/tests_main.rs rename to tee-worker/bitacross/enclave-runtime/src/test/tests_main.rs diff --git a/bitacross-worker/enclave-runtime/src/test/top_pool_tests.rs b/tee-worker/bitacross/enclave-runtime/src/test/top_pool_tests.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/test/top_pool_tests.rs rename to tee-worker/bitacross/enclave-runtime/src/test/top_pool_tests.rs diff --git a/bitacross-worker/enclave-runtime/src/tls_ra/README.md b/tee-worker/bitacross/enclave-runtime/src/tls_ra/README.md similarity index 100% rename from bitacross-worker/enclave-runtime/src/tls_ra/README.md rename to tee-worker/bitacross/enclave-runtime/src/tls_ra/README.md diff --git a/bitacross-worker/enclave-runtime/src/tls_ra/authentication.rs b/tee-worker/bitacross/enclave-runtime/src/tls_ra/authentication.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/tls_ra/authentication.rs rename to tee-worker/bitacross/enclave-runtime/src/tls_ra/authentication.rs diff --git a/bitacross-worker/enclave-runtime/src/tls_ra/mocks.rs b/tee-worker/bitacross/enclave-runtime/src/tls_ra/mocks.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/tls_ra/mocks.rs rename to tee-worker/bitacross/enclave-runtime/src/tls_ra/mocks.rs diff --git a/bitacross-worker/enclave-runtime/src/tls_ra/mod.rs b/tee-worker/bitacross/enclave-runtime/src/tls_ra/mod.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/tls_ra/mod.rs rename to tee-worker/bitacross/enclave-runtime/src/tls_ra/mod.rs diff --git a/bitacross-worker/enclave-runtime/src/tls_ra/seal_handler.rs b/tee-worker/bitacross/enclave-runtime/src/tls_ra/seal_handler.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/tls_ra/seal_handler.rs rename to tee-worker/bitacross/enclave-runtime/src/tls_ra/seal_handler.rs diff --git a/bitacross-worker/enclave-runtime/src/tls_ra/tests.rs b/tee-worker/bitacross/enclave-runtime/src/tls_ra/tests.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/tls_ra/tests.rs rename to tee-worker/bitacross/enclave-runtime/src/tls_ra/tests.rs diff --git a/bitacross-worker/enclave-runtime/src/tls_ra/tls_ra_client.rs b/tee-worker/bitacross/enclave-runtime/src/tls_ra/tls_ra_client.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/tls_ra/tls_ra_client.rs rename to tee-worker/bitacross/enclave-runtime/src/tls_ra/tls_ra_client.rs diff --git a/bitacross-worker/enclave-runtime/src/tls_ra/tls_ra_server.rs b/tee-worker/bitacross/enclave-runtime/src/tls_ra/tls_ra_server.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/tls_ra/tls_ra_server.rs rename to tee-worker/bitacross/enclave-runtime/src/tls_ra/tls_ra_server.rs diff --git a/bitacross-worker/enclave-runtime/src/utils.rs b/tee-worker/bitacross/enclave-runtime/src/utils.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/utils.rs rename to tee-worker/bitacross/enclave-runtime/src/utils.rs diff --git a/bitacross-worker/enclave-runtime/src/vc_issuance_task.rs b/tee-worker/bitacross/enclave-runtime/src/vc_issuance_task.rs similarity index 100% rename from bitacross-worker/enclave-runtime/src/vc_issuance_task.rs rename to tee-worker/bitacross/enclave-runtime/src/vc_issuance_task.rs diff --git a/bitacross-worker/enclave-runtime/x86_64-unknown-linux-sgx.json b/tee-worker/bitacross/enclave-runtime/x86_64-unknown-linux-sgx.json similarity index 100% rename from bitacross-worker/enclave-runtime/x86_64-unknown-linux-sgx.json rename to tee-worker/bitacross/enclave-runtime/x86_64-unknown-linux-sgx.json diff --git a/bitacross-worker/entrypoint.sh b/tee-worker/bitacross/entrypoint.sh similarity index 100% rename from bitacross-worker/entrypoint.sh rename to tee-worker/bitacross/entrypoint.sh diff --git a/bitacross-worker/example/README.md b/tee-worker/bitacross/example/README.md similarity index 100% rename from bitacross-worker/example/README.md rename to tee-worker/bitacross/example/README.md diff --git a/bitacross-worker/example/client/definitions.json b/tee-worker/bitacross/example/client/definitions.json similarity index 100% rename from bitacross-worker/example/client/definitions.json rename to tee-worker/bitacross/example/client/definitions.json diff --git a/bitacross-worker/example/client/example.go b/tee-worker/bitacross/example/client/example.go similarity index 100% rename from bitacross-worker/example/client/example.go rename to tee-worker/bitacross/example/client/example.go diff --git a/bitacross-worker/example/client/go.mod b/tee-worker/bitacross/example/client/go.mod similarity index 100% rename from bitacross-worker/example/client/go.mod rename to tee-worker/bitacross/example/client/go.mod diff --git a/bitacross-worker/example/client/go.sum b/tee-worker/bitacross/example/client/go.sum similarity index 100% rename from bitacross-worker/example/client/go.sum rename to tee-worker/bitacross/example/client/go.sum diff --git a/bitacross-worker/extract_identity b/tee-worker/bitacross/extract_identity similarity index 100% rename from bitacross-worker/extract_identity rename to tee-worker/bitacross/extract_identity diff --git a/bitacross-worker/lib/readme.txt b/tee-worker/bitacross/lib/readme.txt similarity index 100% rename from bitacross-worker/lib/readme.txt rename to tee-worker/bitacross/lib/readme.txt diff --git a/bitacross-worker/license_header_scs.txt b/tee-worker/bitacross/license_header_scs.txt similarity index 100% rename from bitacross-worker/license_header_scs.txt rename to tee-worker/bitacross/license_header_scs.txt diff --git a/bitacross-worker/litentry/core/direct-call/Cargo.toml b/tee-worker/bitacross/litentry/core/direct-call/Cargo.toml similarity index 100% rename from bitacross-worker/litentry/core/direct-call/Cargo.toml rename to tee-worker/bitacross/litentry/core/direct-call/Cargo.toml diff --git a/bitacross-worker/litentry/core/direct-call/src/handler/kill_ceremony.rs b/tee-worker/bitacross/litentry/core/direct-call/src/handler/kill_ceremony.rs similarity index 100% rename from bitacross-worker/litentry/core/direct-call/src/handler/kill_ceremony.rs rename to tee-worker/bitacross/litentry/core/direct-call/src/handler/kill_ceremony.rs diff --git a/bitacross-worker/litentry/core/direct-call/src/handler/mod.rs b/tee-worker/bitacross/litentry/core/direct-call/src/handler/mod.rs similarity index 100% rename from bitacross-worker/litentry/core/direct-call/src/handler/mod.rs rename to tee-worker/bitacross/litentry/core/direct-call/src/handler/mod.rs diff --git a/bitacross-worker/litentry/core/direct-call/src/handler/nonce_share.rs b/tee-worker/bitacross/litentry/core/direct-call/src/handler/nonce_share.rs similarity index 100% rename from bitacross-worker/litentry/core/direct-call/src/handler/nonce_share.rs rename to tee-worker/bitacross/litentry/core/direct-call/src/handler/nonce_share.rs diff --git a/bitacross-worker/litentry/core/direct-call/src/handler/partial_signature_share.rs b/tee-worker/bitacross/litentry/core/direct-call/src/handler/partial_signature_share.rs similarity index 100% rename from bitacross-worker/litentry/core/direct-call/src/handler/partial_signature_share.rs rename to tee-worker/bitacross/litentry/core/direct-call/src/handler/partial_signature_share.rs diff --git a/bitacross-worker/litentry/core/direct-call/src/handler/sign_bitcoin.rs b/tee-worker/bitacross/litentry/core/direct-call/src/handler/sign_bitcoin.rs similarity index 100% rename from bitacross-worker/litentry/core/direct-call/src/handler/sign_bitcoin.rs rename to tee-worker/bitacross/litentry/core/direct-call/src/handler/sign_bitcoin.rs diff --git a/bitacross-worker/litentry/core/direct-call/src/handler/sign_ethereum.rs b/tee-worker/bitacross/litentry/core/direct-call/src/handler/sign_ethereum.rs similarity index 100% rename from bitacross-worker/litentry/core/direct-call/src/handler/sign_ethereum.rs rename to tee-worker/bitacross/litentry/core/direct-call/src/handler/sign_ethereum.rs diff --git a/bitacross-worker/litentry/core/direct-call/src/handler/sign_ton.rs b/tee-worker/bitacross/litentry/core/direct-call/src/handler/sign_ton.rs similarity index 100% rename from bitacross-worker/litentry/core/direct-call/src/handler/sign_ton.rs rename to tee-worker/bitacross/litentry/core/direct-call/src/handler/sign_ton.rs diff --git a/bitacross-worker/litentry/core/direct-call/src/lib.rs b/tee-worker/bitacross/litentry/core/direct-call/src/lib.rs similarity index 100% rename from bitacross-worker/litentry/core/direct-call/src/lib.rs rename to tee-worker/bitacross/litentry/core/direct-call/src/lib.rs diff --git a/bitacross-worker/litentry/core/teebag-storage/Cargo.toml b/tee-worker/bitacross/litentry/core/teebag-storage/Cargo.toml similarity index 100% rename from bitacross-worker/litentry/core/teebag-storage/Cargo.toml rename to tee-worker/bitacross/litentry/core/teebag-storage/Cargo.toml diff --git a/bitacross-worker/litentry/core/teebag-storage/src/lib.rs b/tee-worker/bitacross/litentry/core/teebag-storage/src/lib.rs similarity index 100% rename from bitacross-worker/litentry/core/teebag-storage/src/lib.rs rename to tee-worker/bitacross/litentry/core/teebag-storage/src/lib.rs diff --git a/bitacross-worker/litentry/macros/Cargo.toml b/tee-worker/bitacross/litentry/macros/Cargo.toml similarity index 100% rename from bitacross-worker/litentry/macros/Cargo.toml rename to tee-worker/bitacross/litentry/macros/Cargo.toml diff --git a/bitacross-worker/litentry/macros/src/lib.rs b/tee-worker/bitacross/litentry/macros/src/lib.rs similarity index 100% rename from bitacross-worker/litentry/macros/src/lib.rs rename to tee-worker/bitacross/litentry/macros/src/lib.rs diff --git a/bitacross-worker/litentry/primitives/Cargo.toml b/tee-worker/bitacross/litentry/primitives/Cargo.toml similarity index 96% rename from bitacross-worker/litentry/primitives/Cargo.toml rename to tee-worker/bitacross/litentry/primitives/Cargo.toml index 1731b3f54c..b28bc15c63 100644 --- a/bitacross-worker/litentry/primitives/Cargo.toml +++ b/tee-worker/bitacross/litentry/primitives/Cargo.toml @@ -25,7 +25,7 @@ sgx_tstd = { git = "https://github.com/apache/teaclave-sgx-sdk.git", branch = "m # internal dependencies itp-sgx-crypto = { path = "../../core-primitives/sgx/crypto", default-features = false } -litentry-hex-utils = { path = "../../../primitives/hex", default-features = false } +litentry-hex-utils = { path = "../../../../common/utils/hex", default-features = false } pallet-teebag = { git = "https://github.com/litentry/litentry-parachain", branch = "release-v0.9.19", default-features = false } parentchain-primitives = { package = "core-primitives", git = "https://github.com/litentry/litentry-parachain", branch = "release-v0.9.19", default-features = false } diff --git a/bitacross-worker/litentry/primitives/src/aes.rs b/tee-worker/bitacross/litentry/primitives/src/aes.rs similarity index 100% rename from bitacross-worker/litentry/primitives/src/aes.rs rename to tee-worker/bitacross/litentry/primitives/src/aes.rs diff --git a/bitacross-worker/litentry/primitives/src/bitcoin_address.rs b/tee-worker/bitacross/litentry/primitives/src/bitcoin_address.rs similarity index 100% rename from bitacross-worker/litentry/primitives/src/bitcoin_address.rs rename to tee-worker/bitacross/litentry/primitives/src/bitcoin_address.rs diff --git a/bitacross-worker/litentry/primitives/src/bitcoin_signature.rs b/tee-worker/bitacross/litentry/primitives/src/bitcoin_signature.rs similarity index 100% rename from bitacross-worker/litentry/primitives/src/bitcoin_signature.rs rename to tee-worker/bitacross/litentry/primitives/src/bitcoin_signature.rs diff --git a/bitacross-worker/litentry/primitives/src/ethereum_signature.rs b/tee-worker/bitacross/litentry/primitives/src/ethereum_signature.rs similarity index 100% rename from bitacross-worker/litentry/primitives/src/ethereum_signature.rs rename to tee-worker/bitacross/litentry/primitives/src/ethereum_signature.rs diff --git a/bitacross-worker/litentry/primitives/src/lib.rs b/tee-worker/bitacross/litentry/primitives/src/lib.rs similarity index 100% rename from bitacross-worker/litentry/primitives/src/lib.rs rename to tee-worker/bitacross/litentry/primitives/src/lib.rs diff --git a/bitacross-worker/litentry/primitives/src/plain_request.rs b/tee-worker/bitacross/litentry/primitives/src/plain_request.rs similarity index 100% rename from bitacross-worker/litentry/primitives/src/plain_request.rs rename to tee-worker/bitacross/litentry/primitives/src/plain_request.rs diff --git a/bitacross-worker/litentry/primitives/src/validation_data.rs b/tee-worker/bitacross/litentry/primitives/src/validation_data.rs similarity index 100% rename from bitacross-worker/litentry/primitives/src/validation_data.rs rename to tee-worker/bitacross/litentry/primitives/src/validation_data.rs diff --git a/bitacross-worker/rust-sgx-sdk/Readme.md b/tee-worker/bitacross/rust-sgx-sdk/Readme.md similarity index 100% rename from bitacross-worker/rust-sgx-sdk/Readme.md rename to tee-worker/bitacross/rust-sgx-sdk/Readme.md diff --git a/bitacross-worker/rust-sgx-sdk/buildenv.mk b/tee-worker/bitacross/rust-sgx-sdk/buildenv.mk similarity index 100% rename from bitacross-worker/rust-sgx-sdk/buildenv.mk rename to tee-worker/bitacross/rust-sgx-sdk/buildenv.mk diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/assert.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/assert.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/assert.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/assert.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/complex.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/complex.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/complex.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/complex.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/ctype.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/ctype.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/ctype.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/ctype.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/dirent.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/dirent.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/dirent.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/dirent.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/endian.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/endian.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/endian.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/endian.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/errno.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/errno.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/errno.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/errno.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/fenv.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/fenv.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/fenv.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/fenv.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/float.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/float.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/float.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/float.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/inttypes.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/inttypes.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/inttypes.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/inttypes.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/iso646.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/iso646.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/iso646.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/iso646.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/limits.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/limits.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/limits.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/limits.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/math.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/math.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/math.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/math.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/mbusafecrt.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/mbusafecrt.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/mbusafecrt.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/mbusafecrt.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/netdb.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/netdb.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/netdb.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/netdb.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/poll.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/poll.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/poll.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/poll.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/pthread.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/pthread.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/pthread.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/pthread.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/pwd.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/pwd.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/pwd.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/pwd.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sched.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sched.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sched.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sched.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/setjmp.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/setjmp.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/setjmp.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/setjmp.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/signal.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/signal.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/signal.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/signal.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/stdalign.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/stdalign.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/stdalign.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/stdalign.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/stdarg.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/stdarg.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/stdarg.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/stdarg.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/stdbool.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/stdbool.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/stdbool.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/stdbool.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/stddef.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/stddef.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/stddef.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/stddef.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/stdint.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/stdint.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/stdint.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/stdint.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/stdio.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/stdio.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/stdio.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/stdio.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/stdlib.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/stdlib.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/stdlib.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/stdlib.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/string.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/string.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/string.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/string.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/_types.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/_types.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/_types.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/_types.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/cdefs.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/cdefs.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/cdefs.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/cdefs.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/endian.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/endian.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/endian.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/endian.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/epoll.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/epoll.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/epoll.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/epoll.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/fpu.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/fpu.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/fpu.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/fpu.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/ieee.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/ieee.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/ieee.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/ieee.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/limits.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/limits.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/limits.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/limits.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/sockaddr.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/sockaddr.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/sockaddr.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/sockaddr.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/socket.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/socket.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/socket.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/socket.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/stat.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/stat.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/stat.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/stat.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/stdint.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/stdint.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/stdint.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/stdint.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/struct_timespec.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/struct_timespec.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/struct_timespec.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/struct_timespec.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/types.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/types.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/types.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/types.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/sys/uio.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/uio.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/sys/uio.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/sys/uio.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/time.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/time.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/time.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/time.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/unistd.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/unistd.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/unistd.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/unistd.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/wchar.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/wchar.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/wchar.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/wchar.h diff --git a/bitacross-worker/rust-sgx-sdk/common/inc/wctype.h b/tee-worker/bitacross/rust-sgx-sdk/common/inc/wctype.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/common/inc/wctype.h rename to tee-worker/bitacross/rust-sgx-sdk/common/inc/wctype.h diff --git a/bitacross-worker/rust-sgx-sdk/edl/inc/dirent.h b/tee-worker/bitacross/rust-sgx-sdk/edl/inc/dirent.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/inc/dirent.h rename to tee-worker/bitacross/rust-sgx-sdk/edl/inc/dirent.h diff --git a/bitacross-worker/rust-sgx-sdk/edl/inc/stat.h b/tee-worker/bitacross/rust-sgx-sdk/edl/inc/stat.h similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/inc/stat.h rename to tee-worker/bitacross/rust-sgx-sdk/edl/inc/stat.h diff --git a/bitacross-worker/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/intel/sgx_pthread.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_pthread.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/intel/sgx_pthread.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_pthread.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/intel/sgx_tstdc.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_tstdc.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/intel/sgx_tstdc.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_tstdc.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/intel/sgx_ttls.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_ttls.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/intel/sgx_ttls.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/intel/sgx_ttls.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_asyncio.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_asyncio.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_asyncio.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_asyncio.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_backtrace.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_backtrace.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_backtrace.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_backtrace.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_env.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_env.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_env.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_env.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_fd.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_fd.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_fd.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_fd.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_file.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_file.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_file.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_file.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_fs.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_fs.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_fs.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_fs.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_mem.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_mem.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_mem.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_mem.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_net.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_net.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_net.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_net.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_net_switchless.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_net_switchless.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_net_switchless.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_net_switchless.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_pipe.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_pipe.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_pipe.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_pipe.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_process.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_process.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_process.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_process.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_signal.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_signal.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_signal.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_signal.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_socket.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_socket.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_socket.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_socket.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_stdio.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_stdio.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_stdio.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_stdio.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_sys.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_sys.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_sys.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_sys.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_thread.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_thread.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_thread.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_thread.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_time.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_time.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_time.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_time.edl diff --git a/bitacross-worker/rust-sgx-sdk/edl/sgx_tstd.edl b/tee-worker/bitacross/rust-sgx-sdk/edl/sgx_tstd.edl similarity index 100% rename from bitacross-worker/rust-sgx-sdk/edl/sgx_tstd.edl rename to tee-worker/bitacross/rust-sgx-sdk/edl/sgx_tstd.edl diff --git a/bitacross-worker/rust-sgx-sdk/version b/tee-worker/bitacross/rust-sgx-sdk/version similarity index 100% rename from bitacross-worker/rust-sgx-sdk/version rename to tee-worker/bitacross/rust-sgx-sdk/version diff --git a/bitacross-worker/rust-toolchain.toml b/tee-worker/bitacross/rust-toolchain.toml similarity index 100% rename from bitacross-worker/rust-toolchain.toml rename to tee-worker/bitacross/rust-toolchain.toml diff --git a/bitacross-worker/rustfmt.toml b/tee-worker/bitacross/rustfmt.toml similarity index 100% rename from bitacross-worker/rustfmt.toml rename to tee-worker/bitacross/rustfmt.toml diff --git a/bitacross-worker/scripts/benchmark_local-setup.sh b/tee-worker/bitacross/scripts/benchmark_local-setup.sh similarity index 100% rename from bitacross-worker/scripts/benchmark_local-setup.sh rename to tee-worker/bitacross/scripts/benchmark_local-setup.sh diff --git a/bitacross-worker/scripts/changelog/.gitignore b/tee-worker/bitacross/scripts/changelog/.gitignore similarity index 100% rename from bitacross-worker/scripts/changelog/.gitignore rename to tee-worker/bitacross/scripts/changelog/.gitignore diff --git a/bitacross-worker/scripts/changelog/Gemfile b/tee-worker/bitacross/scripts/changelog/Gemfile similarity index 100% rename from bitacross-worker/scripts/changelog/Gemfile rename to tee-worker/bitacross/scripts/changelog/Gemfile diff --git a/bitacross-worker/scripts/changelog/Gemfile.lock b/tee-worker/bitacross/scripts/changelog/Gemfile.lock similarity index 100% rename from bitacross-worker/scripts/changelog/Gemfile.lock rename to tee-worker/bitacross/scripts/changelog/Gemfile.lock diff --git a/bitacross-worker/scripts/changelog/README.md b/tee-worker/bitacross/scripts/changelog/README.md similarity index 100% rename from bitacross-worker/scripts/changelog/README.md rename to tee-worker/bitacross/scripts/changelog/README.md diff --git a/bitacross-worker/scripts/changelog/bin/changelog b/tee-worker/bitacross/scripts/changelog/bin/changelog similarity index 100% rename from bitacross-worker/scripts/changelog/bin/changelog rename to tee-worker/bitacross/scripts/changelog/bin/changelog diff --git a/bitacross-worker/scripts/changelog/digests/.gitignore b/tee-worker/bitacross/scripts/changelog/digests/.gitignore similarity index 100% rename from bitacross-worker/scripts/changelog/digests/.gitignore rename to tee-worker/bitacross/scripts/changelog/digests/.gitignore diff --git a/bitacross-worker/scripts/changelog/digests/.gitkeep b/tee-worker/bitacross/scripts/changelog/digests/.gitkeep similarity index 100% rename from bitacross-worker/scripts/changelog/digests/.gitkeep rename to tee-worker/bitacross/scripts/changelog/digests/.gitkeep diff --git a/bitacross-worker/scripts/changelog/lib/changelog.rb b/tee-worker/bitacross/scripts/changelog/lib/changelog.rb similarity index 100% rename from bitacross-worker/scripts/changelog/lib/changelog.rb rename to tee-worker/bitacross/scripts/changelog/lib/changelog.rb diff --git a/bitacross-worker/scripts/changelog/templates/_free_notes.md.tera b/tee-worker/bitacross/scripts/changelog/templates/_free_notes.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/_free_notes.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/_free_notes.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/challenge_level.md.tera b/tee-worker/bitacross/scripts/changelog/templates/challenge_level.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/challenge_level.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/challenge_level.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/change.md.tera b/tee-worker/bitacross/scripts/changelog/templates/change.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/change.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/change.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/changes.md.tera b/tee-worker/bitacross/scripts/changelog/templates/changes.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/changes.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/changes.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/changes_applibs.md.tera b/tee-worker/bitacross/scripts/changelog/templates/changes_applibs.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/changes_applibs.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/changes_applibs.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/changes_client.md.tera b/tee-worker/bitacross/scripts/changelog/templates/changes_client.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/changes_client.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/changes_client.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/changes_core.md.tera b/tee-worker/bitacross/scripts/changelog/templates/changes_core.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/changes_core.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/changes_core.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/changes_evm.md.tera b/tee-worker/bitacross/scripts/changelog/templates/changes_evm.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/changes_evm.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/changes_evm.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/changes_misc.md.tera b/tee-worker/bitacross/scripts/changelog/templates/changes_misc.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/changes_misc.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/changes_misc.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/changes_offchain.md.tera b/tee-worker/bitacross/scripts/changelog/templates/changes_offchain.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/changes_offchain.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/changes_offchain.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/changes_sidechain.md.tera b/tee-worker/bitacross/scripts/changelog/templates/changes_sidechain.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/changes_sidechain.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/changes_sidechain.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/debug.md.tera b/tee-worker/bitacross/scripts/changelog/templates/debug.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/debug.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/debug.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/global_challenge_level.md.tera b/tee-worker/bitacross/scripts/changelog/templates/global_challenge_level.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/global_challenge_level.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/global_challenge_level.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/global_priority.md.tera b/tee-worker/bitacross/scripts/changelog/templates/global_priority.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/global_priority.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/global_priority.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/high_priority.md.tera b/tee-worker/bitacross/scripts/changelog/templates/high_priority.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/high_priority.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/high_priority.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/pre_release.md.tera b/tee-worker/bitacross/scripts/changelog/templates/pre_release.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/pre_release.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/pre_release.md.tera diff --git a/bitacross-worker/scripts/changelog/templates/template.md.tera b/tee-worker/bitacross/scripts/changelog/templates/template.md.tera similarity index 100% rename from bitacross-worker/scripts/changelog/templates/template.md.tera rename to tee-worker/bitacross/scripts/changelog/templates/template.md.tera diff --git a/bitacross-worker/scripts/init_env.sh b/tee-worker/bitacross/scripts/init_env.sh similarity index 100% rename from bitacross-worker/scripts/init_env.sh rename to tee-worker/bitacross/scripts/init_env.sh diff --git a/bitacross-worker/scripts/launch.sh b/tee-worker/bitacross/scripts/launch.sh similarity index 100% rename from bitacross-worker/scripts/launch.sh rename to tee-worker/bitacross/scripts/launch.sh diff --git a/bitacross-worker/scripts/launch_local_worker.sh b/tee-worker/bitacross/scripts/launch_local_worker.sh similarity index 100% rename from bitacross-worker/scripts/launch_local_worker.sh rename to tee-worker/bitacross/scripts/launch_local_worker.sh diff --git a/bitacross-worker/scripts/litentry/release/ReadMe.md b/tee-worker/bitacross/scripts/litentry/release/ReadMe.md similarity index 100% rename from bitacross-worker/scripts/litentry/release/ReadMe.md rename to tee-worker/bitacross/scripts/litentry/release/ReadMe.md diff --git a/bitacross-worker/scripts/litentry/release/build.sh b/tee-worker/bitacross/scripts/litentry/release/build.sh similarity index 100% rename from bitacross-worker/scripts/litentry/release/build.sh rename to tee-worker/bitacross/scripts/litentry/release/build.sh diff --git a/bitacross-worker/scripts/litentry/release/deploy.sh b/tee-worker/bitacross/scripts/litentry/release/deploy.sh similarity index 100% rename from bitacross-worker/scripts/litentry/release/deploy.sh rename to tee-worker/bitacross/scripts/litentry/release/deploy.sh diff --git a/bitacross-worker/scripts/litentry/release/prepare.sh b/tee-worker/bitacross/scripts/litentry/release/prepare.sh similarity index 100% rename from bitacross-worker/scripts/litentry/release/prepare.sh rename to tee-worker/bitacross/scripts/litentry/release/prepare.sh diff --git a/bitacross-worker/scripts/litentry/release/template/para-alice.service b/tee-worker/bitacross/scripts/litentry/release/template/para-alice.service similarity index 100% rename from bitacross-worker/scripts/litentry/release/template/para-alice.service rename to tee-worker/bitacross/scripts/litentry/release/template/para-alice.service diff --git a/bitacross-worker/scripts/litentry/release/template/relay-alice.service b/tee-worker/bitacross/scripts/litentry/release/template/relay-alice.service similarity index 100% rename from bitacross-worker/scripts/litentry/release/template/relay-alice.service rename to tee-worker/bitacross/scripts/litentry/release/template/relay-alice.service diff --git a/bitacross-worker/scripts/litentry/release/template/relay-bob.service b/tee-worker/bitacross/scripts/litentry/release/template/relay-bob.service similarity index 100% rename from bitacross-worker/scripts/litentry/release/template/relay-bob.service rename to tee-worker/bitacross/scripts/litentry/release/template/relay-bob.service diff --git a/bitacross-worker/scripts/litentry/release/template/worker.service b/tee-worker/bitacross/scripts/litentry/release/template/worker.service similarity index 100% rename from bitacross-worker/scripts/litentry/release/template/worker.service rename to tee-worker/bitacross/scripts/litentry/release/template/worker.service diff --git a/bitacross-worker/scripts/litentry/ubuntu_setup.sh b/tee-worker/bitacross/scripts/litentry/ubuntu_setup.sh similarity index 100% rename from bitacross-worker/scripts/litentry/ubuntu_setup.sh rename to tee-worker/bitacross/scripts/litentry/ubuntu_setup.sh diff --git a/bitacross-worker/scripts/m6.sh b/tee-worker/bitacross/scripts/m6.sh similarity index 100% rename from bitacross-worker/scripts/m6.sh rename to tee-worker/bitacross/scripts/m6.sh diff --git a/bitacross-worker/scripts/m8.sh b/tee-worker/bitacross/scripts/m8.sh similarity index 100% rename from bitacross-worker/scripts/m8.sh rename to tee-worker/bitacross/scripts/m8.sh diff --git a/bitacross-worker/scripts/polkadot_update.sh b/tee-worker/bitacross/scripts/polkadot_update.sh similarity index 100% rename from bitacross-worker/scripts/polkadot_update.sh rename to tee-worker/bitacross/scripts/polkadot_update.sh diff --git a/bitacross-worker/scripts/sidechain.sh b/tee-worker/bitacross/scripts/sidechain.sh similarity index 100% rename from bitacross-worker/scripts/sidechain.sh rename to tee-worker/bitacross/scripts/sidechain.sh diff --git a/bitacross-worker/scripts/test_transfer/README.md b/tee-worker/bitacross/scripts/test_transfer/README.md similarity index 100% rename from bitacross-worker/scripts/test_transfer/README.md rename to tee-worker/bitacross/scripts/test_transfer/README.md diff --git a/bitacross-worker/scripts/test_transfer/package-lock.json b/tee-worker/bitacross/scripts/test_transfer/package-lock.json similarity index 100% rename from bitacross-worker/scripts/test_transfer/package-lock.json rename to tee-worker/bitacross/scripts/test_transfer/package-lock.json diff --git a/bitacross-worker/scripts/test_transfer/package.json b/tee-worker/bitacross/scripts/test_transfer/package.json similarity index 100% rename from bitacross-worker/scripts/test_transfer/package.json rename to tee-worker/bitacross/scripts/test_transfer/package.json diff --git a/bitacross-worker/scripts/test_transfer/transfer.js b/tee-worker/bitacross/scripts/test_transfer/transfer.js similarity index 100% rename from bitacross-worker/scripts/test_transfer/transfer.js rename to tee-worker/bitacross/scripts/test_transfer/transfer.js diff --git a/bitacross-worker/service/Cargo.toml b/tee-worker/bitacross/service/Cargo.toml similarity index 100% rename from bitacross-worker/service/Cargo.toml rename to tee-worker/bitacross/service/Cargo.toml diff --git a/bitacross-worker/service/build.rs b/tee-worker/bitacross/service/build.rs similarity index 100% rename from bitacross-worker/service/build.rs rename to tee-worker/bitacross/service/build.rs diff --git a/bitacross-worker/service/src/account_funding.rs b/tee-worker/bitacross/service/src/account_funding.rs similarity index 100% rename from bitacross-worker/service/src/account_funding.rs rename to tee-worker/bitacross/service/src/account_funding.rs diff --git a/bitacross-worker/service/src/cli.yml b/tee-worker/bitacross/service/src/cli.yml similarity index 100% rename from bitacross-worker/service/src/cli.yml rename to tee-worker/bitacross/service/src/cli.yml diff --git a/bitacross-worker/service/src/config.rs b/tee-worker/bitacross/service/src/config.rs similarity index 100% rename from bitacross-worker/service/src/config.rs rename to tee-worker/bitacross/service/src/config.rs diff --git a/bitacross-worker/service/src/enclave/api.rs b/tee-worker/bitacross/service/src/enclave/api.rs similarity index 100% rename from bitacross-worker/service/src/enclave/api.rs rename to tee-worker/bitacross/service/src/enclave/api.rs diff --git a/bitacross-worker/service/src/enclave/mod.rs b/tee-worker/bitacross/service/src/enclave/mod.rs similarity index 100% rename from bitacross-worker/service/src/enclave/mod.rs rename to tee-worker/bitacross/service/src/enclave/mod.rs diff --git a/bitacross-worker/service/src/enclave/tls_ra.rs b/tee-worker/bitacross/service/src/enclave/tls_ra.rs similarity index 100% rename from bitacross-worker/service/src/enclave/tls_ra.rs rename to tee-worker/bitacross/service/src/enclave/tls_ra.rs diff --git a/bitacross-worker/service/src/error.rs b/tee-worker/bitacross/service/src/error.rs similarity index 100% rename from bitacross-worker/service/src/error.rs rename to tee-worker/bitacross/service/src/error.rs diff --git a/bitacross-worker/service/src/globals/mod.rs b/tee-worker/bitacross/service/src/globals/mod.rs similarity index 100% rename from bitacross-worker/service/src/globals/mod.rs rename to tee-worker/bitacross/service/src/globals/mod.rs diff --git a/bitacross-worker/service/src/globals/tokio_handle.rs b/tee-worker/bitacross/service/src/globals/tokio_handle.rs similarity index 100% rename from bitacross-worker/service/src/globals/tokio_handle.rs rename to tee-worker/bitacross/service/src/globals/tokio_handle.rs diff --git a/bitacross-worker/service/src/initialized_service.rs b/tee-worker/bitacross/service/src/initialized_service.rs similarity index 100% rename from bitacross-worker/service/src/initialized_service.rs rename to tee-worker/bitacross/service/src/initialized_service.rs diff --git a/bitacross-worker/service/src/main.rs b/tee-worker/bitacross/service/src/main.rs similarity index 100% rename from bitacross-worker/service/src/main.rs rename to tee-worker/bitacross/service/src/main.rs diff --git a/bitacross-worker/service/src/main_impl.rs b/tee-worker/bitacross/service/src/main_impl.rs similarity index 100% rename from bitacross-worker/service/src/main_impl.rs rename to tee-worker/bitacross/service/src/main_impl.rs diff --git a/bitacross-worker/service/src/ocall_bridge/bridge_api.rs b/tee-worker/bitacross/service/src/ocall_bridge/bridge_api.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/bridge_api.rs rename to tee-worker/bitacross/service/src/ocall_bridge/bridge_api.rs diff --git a/bitacross-worker/service/src/ocall_bridge/component_factory.rs b/tee-worker/bitacross/service/src/ocall_bridge/component_factory.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/component_factory.rs rename to tee-worker/bitacross/service/src/ocall_bridge/component_factory.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/get_ias_socket.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/get_ias_socket.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/get_ias_socket.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/get_ias_socket.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/get_quote.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/get_quote.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/get_quote.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/get_quote.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/get_qve_report_on_quote.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/get_qve_report_on_quote.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/get_qve_report_on_quote.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/get_qve_report_on_quote.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/get_update_info.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/get_update_info.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/get_update_info.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/get_update_info.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/init_quote.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/init_quote.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/init_quote.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/init_quote.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/ipfs.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/ipfs.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/ipfs.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/ipfs.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/mod.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/mod.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/mod.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/mod.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/send_to_parentchain.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/send_to_parentchain.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/send_to_parentchain.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/send_to_parentchain.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/update_metric.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/update_metric.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/update_metric.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/update_metric.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ffi/worker_request.rs b/tee-worker/bitacross/service/src/ocall_bridge/ffi/worker_request.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ffi/worker_request.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ffi/worker_request.rs diff --git a/bitacross-worker/service/src/ocall_bridge/ipfs_ocall.rs b/tee-worker/bitacross/service/src/ocall_bridge/ipfs_ocall.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/ipfs_ocall.rs rename to tee-worker/bitacross/service/src/ocall_bridge/ipfs_ocall.rs diff --git a/bitacross-worker/service/src/ocall_bridge/metrics_ocall.rs b/tee-worker/bitacross/service/src/ocall_bridge/metrics_ocall.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/metrics_ocall.rs rename to tee-worker/bitacross/service/src/ocall_bridge/metrics_ocall.rs diff --git a/bitacross-worker/service/src/ocall_bridge/mod.rs b/tee-worker/bitacross/service/src/ocall_bridge/mod.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/mod.rs rename to tee-worker/bitacross/service/src/ocall_bridge/mod.rs diff --git a/bitacross-worker/service/src/ocall_bridge/remote_attestation_ocall.rs b/tee-worker/bitacross/service/src/ocall_bridge/remote_attestation_ocall.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/remote_attestation_ocall.rs rename to tee-worker/bitacross/service/src/ocall_bridge/remote_attestation_ocall.rs diff --git a/bitacross-worker/service/src/ocall_bridge/worker_on_chain_ocall.rs b/tee-worker/bitacross/service/src/ocall_bridge/worker_on_chain_ocall.rs similarity index 100% rename from bitacross-worker/service/src/ocall_bridge/worker_on_chain_ocall.rs rename to tee-worker/bitacross/service/src/ocall_bridge/worker_on_chain_ocall.rs diff --git a/bitacross-worker/service/src/parentchain_handler.rs b/tee-worker/bitacross/service/src/parentchain_handler.rs similarity index 100% rename from bitacross-worker/service/src/parentchain_handler.rs rename to tee-worker/bitacross/service/src/parentchain_handler.rs diff --git a/bitacross-worker/service/src/prometheus_metrics.rs b/tee-worker/bitacross/service/src/prometheus_metrics.rs similarity index 100% rename from bitacross-worker/service/src/prometheus_metrics.rs rename to tee-worker/bitacross/service/src/prometheus_metrics.rs diff --git a/bitacross-worker/service/src/setup.rs b/tee-worker/bitacross/service/src/setup.rs similarity index 100% rename from bitacross-worker/service/src/setup.rs rename to tee-worker/bitacross/service/src/setup.rs diff --git a/bitacross-worker/service/src/sync_state.rs b/tee-worker/bitacross/service/src/sync_state.rs similarity index 100% rename from bitacross-worker/service/src/sync_state.rs rename to tee-worker/bitacross/service/src/sync_state.rs diff --git a/bitacross-worker/service/src/tests/commons.rs b/tee-worker/bitacross/service/src/tests/commons.rs similarity index 100% rename from bitacross-worker/service/src/tests/commons.rs rename to tee-worker/bitacross/service/src/tests/commons.rs diff --git a/bitacross-worker/service/src/tests/mock.rs b/tee-worker/bitacross/service/src/tests/mock.rs similarity index 100% rename from bitacross-worker/service/src/tests/mock.rs rename to tee-worker/bitacross/service/src/tests/mock.rs diff --git a/bitacross-worker/service/src/tests/mocks/enclave_api_mock.rs b/tee-worker/bitacross/service/src/tests/mocks/enclave_api_mock.rs similarity index 100% rename from bitacross-worker/service/src/tests/mocks/enclave_api_mock.rs rename to tee-worker/bitacross/service/src/tests/mocks/enclave_api_mock.rs diff --git a/bitacross-worker/service/src/tests/mocks/initialization_handler_mock.rs b/tee-worker/bitacross/service/src/tests/mocks/initialization_handler_mock.rs similarity index 100% rename from bitacross-worker/service/src/tests/mocks/initialization_handler_mock.rs rename to tee-worker/bitacross/service/src/tests/mocks/initialization_handler_mock.rs diff --git a/bitacross-worker/service/src/tests/mocks/mod.rs b/tee-worker/bitacross/service/src/tests/mocks/mod.rs similarity index 100% rename from bitacross-worker/service/src/tests/mocks/mod.rs rename to tee-worker/bitacross/service/src/tests/mocks/mod.rs diff --git a/bitacross-worker/service/src/tests/mocks/parentchain_api_mock.rs b/tee-worker/bitacross/service/src/tests/mocks/parentchain_api_mock.rs similarity index 100% rename from bitacross-worker/service/src/tests/mocks/parentchain_api_mock.rs rename to tee-worker/bitacross/service/src/tests/mocks/parentchain_api_mock.rs diff --git a/bitacross-worker/service/src/tests/mocks/update_worker_peers_mock.rs b/tee-worker/bitacross/service/src/tests/mocks/update_worker_peers_mock.rs similarity index 100% rename from bitacross-worker/service/src/tests/mocks/update_worker_peers_mock.rs rename to tee-worker/bitacross/service/src/tests/mocks/update_worker_peers_mock.rs diff --git a/bitacross-worker/service/src/tests/mod.rs b/tee-worker/bitacross/service/src/tests/mod.rs similarity index 100% rename from bitacross-worker/service/src/tests/mod.rs rename to tee-worker/bitacross/service/src/tests/mod.rs diff --git a/bitacross-worker/service/src/tests/parentchain_handler_test.rs b/tee-worker/bitacross/service/src/tests/parentchain_handler_test.rs similarity index 100% rename from bitacross-worker/service/src/tests/parentchain_handler_test.rs rename to tee-worker/bitacross/service/src/tests/parentchain_handler_test.rs diff --git a/bitacross-worker/service/src/utils.rs b/tee-worker/bitacross/service/src/utils.rs similarity index 100% rename from bitacross-worker/service/src/utils.rs rename to tee-worker/bitacross/service/src/utils.rs diff --git a/bitacross-worker/service/src/wasm.rs b/tee-worker/bitacross/service/src/wasm.rs similarity index 100% rename from bitacross-worker/service/src/wasm.rs rename to tee-worker/bitacross/service/src/wasm.rs diff --git a/bitacross-worker/service/src/worker.rs b/tee-worker/bitacross/service/src/worker.rs similarity index 100% rename from bitacross-worker/service/src/worker.rs rename to tee-worker/bitacross/service/src/worker.rs diff --git a/bitacross-worker/service/src/worker_peers_updater.rs b/tee-worker/bitacross/service/src/worker_peers_updater.rs similarity index 100% rename from bitacross-worker/service/src/worker_peers_updater.rs rename to tee-worker/bitacross/service/src/worker_peers_updater.rs diff --git a/bitacross-worker/ts-tests/.editorconfig b/tee-worker/bitacross/ts-tests/.editorconfig similarity index 100% rename from bitacross-worker/ts-tests/.editorconfig rename to tee-worker/bitacross/ts-tests/.editorconfig diff --git a/bitacross-worker/ts-tests/.gitignore b/tee-worker/bitacross/ts-tests/.gitignore similarity index 100% rename from bitacross-worker/ts-tests/.gitignore rename to tee-worker/bitacross/ts-tests/.gitignore diff --git a/bitacross-worker/ts-tests/.prettierrc b/tee-worker/bitacross/ts-tests/.prettierrc similarity index 100% rename from bitacross-worker/ts-tests/.prettierrc rename to tee-worker/bitacross/ts-tests/.prettierrc diff --git a/bitacross-worker/ts-tests/README.md b/tee-worker/bitacross/ts-tests/README.md similarity index 100% rename from bitacross-worker/ts-tests/README.md rename to tee-worker/bitacross/ts-tests/README.md diff --git a/bitacross-worker/ts-tests/integration-tests/.env.local.example b/tee-worker/bitacross/ts-tests/integration-tests/.env.local.example similarity index 100% rename from bitacross-worker/ts-tests/integration-tests/.env.local.example rename to tee-worker/bitacross/ts-tests/integration-tests/.env.local.example diff --git a/bitacross-worker/ts-tests/integration-tests/.env.staging b/tee-worker/bitacross/ts-tests/integration-tests/.env.staging similarity index 100% rename from bitacross-worker/ts-tests/integration-tests/.env.staging rename to tee-worker/bitacross/ts-tests/integration-tests/.env.staging diff --git a/bitacross-worker/ts-tests/integration-tests/.eslintrc.json b/tee-worker/bitacross/ts-tests/integration-tests/.eslintrc.json similarity index 100% rename from bitacross-worker/ts-tests/integration-tests/.eslintrc.json rename to tee-worker/bitacross/ts-tests/integration-tests/.eslintrc.json diff --git a/bitacross-worker/ts-tests/integration-tests/package.json b/tee-worker/bitacross/ts-tests/integration-tests/package.json similarity index 100% rename from bitacross-worker/ts-tests/integration-tests/package.json rename to tee-worker/bitacross/ts-tests/integration-tests/package.json diff --git a/bitacross-worker/ts-tests/integration-tests/sign_bitcoin.test.ts b/tee-worker/bitacross/ts-tests/integration-tests/sign_bitcoin.test.ts similarity index 100% rename from bitacross-worker/ts-tests/integration-tests/sign_bitcoin.test.ts rename to tee-worker/bitacross/ts-tests/integration-tests/sign_bitcoin.test.ts diff --git a/bitacross-worker/ts-tests/integration-tests/tsconfig.json b/tee-worker/bitacross/ts-tests/integration-tests/tsconfig.json similarity index 100% rename from bitacross-worker/ts-tests/integration-tests/tsconfig.json rename to tee-worker/bitacross/ts-tests/integration-tests/tsconfig.json diff --git a/bitacross-worker/ts-tests/package.json b/tee-worker/bitacross/ts-tests/package.json similarity index 100% rename from bitacross-worker/ts-tests/package.json rename to tee-worker/bitacross/ts-tests/package.json diff --git a/bitacross-worker/ts-tests/pnpm-lock.yaml b/tee-worker/bitacross/ts-tests/pnpm-lock.yaml similarity index 100% rename from bitacross-worker/ts-tests/pnpm-lock.yaml rename to tee-worker/bitacross/ts-tests/pnpm-lock.yaml diff --git a/bitacross-worker/ts-tests/pnpm-workspace.yaml b/tee-worker/bitacross/ts-tests/pnpm-workspace.yaml similarity index 100% rename from bitacross-worker/ts-tests/pnpm-workspace.yaml rename to tee-worker/bitacross/ts-tests/pnpm-workspace.yaml diff --git a/bitacross-worker/upstream_commit b/tee-worker/bitacross/upstream_commit similarity index 100% rename from bitacross-worker/upstream_commit rename to tee-worker/bitacross/upstream_commit diff --git a/tee-worker/.dockerignore b/tee-worker/identity/.dockerignore similarity index 100% rename from tee-worker/.dockerignore rename to tee-worker/identity/.dockerignore diff --git a/tee-worker/.editorconfig b/tee-worker/identity/.editorconfig similarity index 100% rename from tee-worker/.editorconfig rename to tee-worker/identity/.editorconfig diff --git a/tee-worker/.gitattributes.orig b/tee-worker/identity/.gitattributes.orig similarity index 100% rename from tee-worker/.gitattributes.orig rename to tee-worker/identity/.gitattributes.orig diff --git a/tee-worker/.githooks/pre-commit b/tee-worker/identity/.githooks/pre-commit similarity index 100% rename from tee-worker/.githooks/pre-commit rename to tee-worker/identity/.githooks/pre-commit diff --git a/tee-worker/.github/workflows/build_and_test.yml b/tee-worker/identity/.github/workflows/build_and_test.yml similarity index 100% rename from tee-worker/.github/workflows/build_and_test.yml rename to tee-worker/identity/.github/workflows/build_and_test.yml diff --git a/tee-worker/.github/workflows/publish-docker-sidechain.yml b/tee-worker/identity/.github/workflows/publish-docker-sidechain.yml similarity index 100% rename from tee-worker/.github/workflows/publish-docker-sidechain.yml rename to tee-worker/identity/.github/workflows/publish-docker-sidechain.yml diff --git a/tee-worker/.github/workflows/publish-docker-teeracle.yml b/tee-worker/identity/.github/workflows/publish-docker-teeracle.yml similarity index 100% rename from tee-worker/.github/workflows/publish-docker-teeracle.yml rename to tee-worker/identity/.github/workflows/publish-docker-teeracle.yml diff --git a/tee-worker/.gitignore b/tee-worker/identity/.gitignore similarity index 100% rename from tee-worker/.gitignore rename to tee-worker/identity/.gitignore diff --git a/tee-worker/.taplo.toml b/tee-worker/identity/.taplo.toml similarity index 100% rename from tee-worker/.taplo.toml rename to tee-worker/identity/.taplo.toml diff --git a/tee-worker/Cargo.lock b/tee-worker/identity/Cargo.lock similarity index 100% rename from tee-worker/Cargo.lock rename to tee-worker/identity/Cargo.lock diff --git a/tee-worker/Cargo.toml b/tee-worker/identity/Cargo.toml similarity index 100% rename from tee-worker/Cargo.toml rename to tee-worker/identity/Cargo.toml diff --git a/tee-worker/DESIGN.md b/tee-worker/identity/DESIGN.md similarity index 100% rename from tee-worker/DESIGN.md rename to tee-worker/identity/DESIGN.md diff --git a/tee-worker/Dockerfile b/tee-worker/identity/Dockerfile similarity index 100% rename from tee-worker/Dockerfile rename to tee-worker/identity/Dockerfile diff --git a/tee-worker/Jenkinsfile b/tee-worker/identity/Jenkinsfile similarity index 100% rename from tee-worker/Jenkinsfile rename to tee-worker/identity/Jenkinsfile diff --git a/tee-worker/LICENSE b/tee-worker/identity/LICENSE similarity index 100% rename from tee-worker/LICENSE rename to tee-worker/identity/LICENSE diff --git a/tee-worker/Makefile b/tee-worker/identity/Makefile similarity index 100% rename from tee-worker/Makefile rename to tee-worker/identity/Makefile diff --git a/tee-worker/README.md b/tee-worker/identity/README.md similarity index 100% rename from tee-worker/README.md rename to tee-worker/identity/README.md diff --git a/tee-worker/UpdateRustSGXSDK.mk b/tee-worker/identity/UpdateRustSGXSDK.mk similarity index 100% rename from tee-worker/UpdateRustSGXSDK.mk rename to tee-worker/identity/UpdateRustSGXSDK.mk diff --git a/tee-worker/app-libs/parentchain-interface/Cargo.toml b/tee-worker/identity/app-libs/parentchain-interface/Cargo.toml similarity index 100% rename from tee-worker/app-libs/parentchain-interface/Cargo.toml rename to tee-worker/identity/app-libs/parentchain-interface/Cargo.toml diff --git a/tee-worker/app-libs/parentchain-interface/src/event_subscriber.rs b/tee-worker/identity/app-libs/parentchain-interface/src/event_subscriber.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/event_subscriber.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/event_subscriber.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/integritee/event_filter.rs b/tee-worker/identity/app-libs/parentchain-interface/src/integritee/event_filter.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/integritee/event_filter.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/integritee/event_filter.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/integritee/event_handler.rs b/tee-worker/identity/app-libs/parentchain-interface/src/integritee/event_handler.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/integritee/event_handler.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/integritee/event_handler.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/integritee/mod.rs b/tee-worker/identity/app-libs/parentchain-interface/src/integritee/mod.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/integritee/mod.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/integritee/mod.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/lib.rs b/tee-worker/identity/app-libs/parentchain-interface/src/lib.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/lib.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/lib.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/target_a/event_filter.rs b/tee-worker/identity/app-libs/parentchain-interface/src/target_a/event_filter.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/target_a/event_filter.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/target_a/event_filter.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/target_a/event_handler.rs b/tee-worker/identity/app-libs/parentchain-interface/src/target_a/event_handler.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/target_a/event_handler.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/target_a/event_handler.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/target_a/mod.rs b/tee-worker/identity/app-libs/parentchain-interface/src/target_a/mod.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/target_a/mod.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/target_a/mod.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/target_b/event_filter.rs b/tee-worker/identity/app-libs/parentchain-interface/src/target_b/event_filter.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/target_b/event_filter.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/target_b/event_filter.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/target_b/event_handler.rs b/tee-worker/identity/app-libs/parentchain-interface/src/target_b/event_handler.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/target_b/event_handler.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/target_b/event_handler.rs diff --git a/tee-worker/app-libs/parentchain-interface/src/target_b/mod.rs b/tee-worker/identity/app-libs/parentchain-interface/src/target_b/mod.rs similarity index 100% rename from tee-worker/app-libs/parentchain-interface/src/target_b/mod.rs rename to tee-worker/identity/app-libs/parentchain-interface/src/target_b/mod.rs diff --git a/tee-worker/app-libs/sgx-runtime/Cargo.toml b/tee-worker/identity/app-libs/sgx-runtime/Cargo.toml similarity index 97% rename from tee-worker/app-libs/sgx-runtime/Cargo.toml rename to tee-worker/identity/app-libs/sgx-runtime/Cargo.toml index 31905fb2bd..da74d62206 100644 --- a/tee-worker/app-libs/sgx-runtime/Cargo.toml +++ b/tee-worker/identity/app-libs/sgx-runtime/Cargo.toml @@ -33,7 +33,7 @@ pallet-evm = { default-features = false, optional = true, git = "https://github. # Litentry pallet-imt = { package = "pallet-identity-management-tee", path = "../../litentry/pallets/identity-management", default-features = false } -pallet-parentchain = { package = "pallet-parentchain", path = "../../../worker-pallets/parentchain", default-features = false } +pallet-parentchain = { package = "pallet-parentchain", path = "../../../../parachain/worker-pallets/parentchain", default-features = false } [features] default = ["std"] diff --git a/tee-worker/app-libs/sgx-runtime/src/evm.rs b/tee-worker/identity/app-libs/sgx-runtime/src/evm.rs similarity index 100% rename from tee-worker/app-libs/sgx-runtime/src/evm.rs rename to tee-worker/identity/app-libs/sgx-runtime/src/evm.rs diff --git a/tee-worker/app-libs/sgx-runtime/src/lib.rs b/tee-worker/identity/app-libs/sgx-runtime/src/lib.rs similarity index 100% rename from tee-worker/app-libs/sgx-runtime/src/lib.rs rename to tee-worker/identity/app-libs/sgx-runtime/src/lib.rs diff --git a/tee-worker/app-libs/sgx-runtime/src/migration.rs b/tee-worker/identity/app-libs/sgx-runtime/src/migration.rs similarity index 100% rename from tee-worker/app-libs/sgx-runtime/src/migration.rs rename to tee-worker/identity/app-libs/sgx-runtime/src/migration.rs diff --git a/tee-worker/app-libs/stf/Cargo.toml b/tee-worker/identity/app-libs/stf/Cargo.toml similarity index 93% rename from tee-worker/app-libs/stf/Cargo.toml rename to tee-worker/identity/app-libs/stf/Cargo.toml index 05763d518c..f72735e0ff 100644 --- a/tee-worker/app-libs/stf/Cargo.toml +++ b/tee-worker/identity/app-libs/stf/Cargo.toml @@ -41,10 +41,10 @@ sp-std = { default-features = false, git = "https://github.com/paritytech/substr # litentry itp-node-api-metadata-provider = { path = "../../core-primitives/node-api/metadata-provider", default-features = false } lc-stf-task-sender = { path = "../../litentry/core/stf-task/sender", default-features = false } -litentry-hex-utils = { path = "../../../primitives/hex", default-features = false } -litentry-macros = { path = "../../../primitives/core/macros", default-features = false } +litentry-hex-utils = { path = "../../../../common/utils/hex", default-features = false } +litentry-macros = { path = "../../../../common/primitives/core/macros", default-features = false } litentry-primitives = { path = "../../litentry/primitives", default-features = false } -pallet-parentchain = { path = "../../../worker-pallets/parentchain", default-features = false } +pallet-parentchain = { path = "../../../../parachain/worker-pallets/parentchain", default-features = false } [dev-dependencies] sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } diff --git a/tee-worker/app-libs/stf/src/evm_helpers.rs b/tee-worker/identity/app-libs/stf/src/evm_helpers.rs similarity index 100% rename from tee-worker/app-libs/stf/src/evm_helpers.rs rename to tee-worker/identity/app-libs/stf/src/evm_helpers.rs diff --git a/tee-worker/app-libs/stf/src/getter.rs b/tee-worker/identity/app-libs/stf/src/getter.rs similarity index 100% rename from tee-worker/app-libs/stf/src/getter.rs rename to tee-worker/identity/app-libs/stf/src/getter.rs diff --git a/tee-worker/app-libs/stf/src/hash.rs b/tee-worker/identity/app-libs/stf/src/hash.rs similarity index 100% rename from tee-worker/app-libs/stf/src/hash.rs rename to tee-worker/identity/app-libs/stf/src/hash.rs diff --git a/tee-worker/app-libs/stf/src/helpers.rs b/tee-worker/identity/app-libs/stf/src/helpers.rs similarity index 100% rename from tee-worker/app-libs/stf/src/helpers.rs rename to tee-worker/identity/app-libs/stf/src/helpers.rs diff --git a/tee-worker/app-libs/stf/src/lib.rs b/tee-worker/identity/app-libs/stf/src/lib.rs similarity index 100% rename from tee-worker/app-libs/stf/src/lib.rs rename to tee-worker/identity/app-libs/stf/src/lib.rs diff --git a/tee-worker/app-libs/stf/src/stf_sgx.rs b/tee-worker/identity/app-libs/stf/src/stf_sgx.rs similarity index 100% rename from tee-worker/app-libs/stf/src/stf_sgx.rs rename to tee-worker/identity/app-libs/stf/src/stf_sgx.rs diff --git a/tee-worker/app-libs/stf/src/stf_sgx_primitives.rs b/tee-worker/identity/app-libs/stf/src/stf_sgx_primitives.rs similarity index 100% rename from tee-worker/app-libs/stf/src/stf_sgx_primitives.rs rename to tee-worker/identity/app-libs/stf/src/stf_sgx_primitives.rs diff --git a/tee-worker/app-libs/stf/src/stf_sgx_tests.rs b/tee-worker/identity/app-libs/stf/src/stf_sgx_tests.rs similarity index 100% rename from tee-worker/app-libs/stf/src/stf_sgx_tests.rs rename to tee-worker/identity/app-libs/stf/src/stf_sgx_tests.rs diff --git a/tee-worker/app-libs/stf/src/test_genesis.rs b/tee-worker/identity/app-libs/stf/src/test_genesis.rs similarity index 100% rename from tee-worker/app-libs/stf/src/test_genesis.rs rename to tee-worker/identity/app-libs/stf/src/test_genesis.rs diff --git a/tee-worker/app-libs/stf/src/trusted_call.rs b/tee-worker/identity/app-libs/stf/src/trusted_call.rs similarity index 100% rename from tee-worker/app-libs/stf/src/trusted_call.rs rename to tee-worker/identity/app-libs/stf/src/trusted_call.rs diff --git a/tee-worker/app-libs/stf/src/trusted_call_litentry.rs b/tee-worker/identity/app-libs/stf/src/trusted_call_litentry.rs similarity index 100% rename from tee-worker/app-libs/stf/src/trusted_call_litentry.rs rename to tee-worker/identity/app-libs/stf/src/trusted_call_litentry.rs diff --git a/tee-worker/app-libs/stf/src/trusted_call_result.rs b/tee-worker/identity/app-libs/stf/src/trusted_call_result.rs similarity index 100% rename from tee-worker/app-libs/stf/src/trusted_call_result.rs rename to tee-worker/identity/app-libs/stf/src/trusted_call_result.rs diff --git a/tee-worker/bin/README.md b/tee-worker/identity/bin/README.md similarity index 100% rename from tee-worker/bin/README.md rename to tee-worker/identity/bin/README.md diff --git a/tee-worker/build.Dockerfile b/tee-worker/identity/build.Dockerfile similarity index 89% rename from tee-worker/build.Dockerfile rename to tee-worker/identity/build.Dockerfile index 2031be9cdd..be93051620 100644 --- a/tee-worker/build.Dockerfile +++ b/tee-worker/identity/build.Dockerfile @@ -61,7 +61,7 @@ ARG FINGERPRINT=none ARG SGX_COMMERCIAL_KEY ENV SGX_COMMERCIAL_KEY=$SGX_COMMERCIAL_KEY -WORKDIR $HOME/tee-worker +WORKDIR $HOME/tee-worker/identity COPY . $HOME RUN \ @@ -100,8 +100,8 @@ ARG LOG_DIR=/usr/local/log ENV SCRIPT_DIR ${SCRIPT_DIR} ENV LOG_DIR ${LOG_DIR} -COPY --from=local-builder:latest /home/ubuntu/tee-worker/bin/litentry-cli /usr/local/bin -COPY --from=local-builder:latest /home/ubuntu/tee-worker/cli/*.sh /usr/local/worker-cli/ +COPY --from=local-builder:latest /home/ubuntu/tee-worker/identity/bin/litentry-cli /usr/local/bin +COPY --from=local-builder:latest /home/ubuntu/tee-worker/identity/cli/*.sh /usr/local/worker-cli/ RUN chmod +x /usr/local/bin/litentry-cli ${SCRIPT_DIR}/*.sh RUN mkdir ${LOG_DIR} @@ -119,8 +119,8 @@ LABEL maintainer="Trust Computing GmbH " WORKDIR /usr/local/bin COPY --from=local-builder:latest /opt/sgxsdk /opt/sgxsdk -COPY --from=local-builder:latest /home/ubuntu/tee-worker/bin/* /usr/local/bin -COPY --from=local-builder:latest /home/ubuntu/tee-worker/cli/*.sh /usr/local/worker-cli/ +COPY --from=local-builder:latest /home/ubuntu/tee-worker/identity/bin/* /usr/local/bin +COPY --from=local-builder:latest /home/ubuntu/tee-worker/identity/cli/*.sh /usr/local/worker-cli/ COPY --from=local-builder:latest /lib/x86_64-linux-gnu/libsgx* /lib/x86_64-linux-gnu/ COPY --from=local-builder:latest /lib/x86_64-linux-gnu/libdcap* /lib/x86_64-linux-gnu/ COPY --from=local-builder:latest /lib/x86_64-linux-gnu/libprotobuf* /lib/x86_64-linux-gnu/ @@ -173,9 +173,9 @@ ENV LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:${SGX_SDK}/sdk_libs" RUN mkdir -p /origin /data -COPY --from=local-builder:latest /home/ubuntu/tee-worker/bin/* /origin -COPY --from=local-builder:latest /home/ubuntu/tee-worker/mrenclave.txt /origin -COPY --from=local-builder:latest /home/ubuntu/tee-worker/entrypoint.sh /usr/local/bin/entrypoint.sh +COPY --from=local-builder:latest /home/ubuntu/tee-worker/identity/bin/* /origin +COPY --from=local-builder:latest /home/ubuntu/tee-worker/identity/mrenclave.txt /origin +COPY --from=local-builder:latest /home/ubuntu/tee-worker/identity/entrypoint.sh /usr/local/bin/entrypoint.sh WORKDIR /origin diff --git a/tee-worker/cli/Cargo.toml b/tee-worker/identity/cli/Cargo.toml similarity index 96% rename from tee-worker/cli/Cargo.toml rename to tee-worker/identity/cli/Cargo.toml index ef1172a50a..ed78efc647 100644 --- a/tee-worker/cli/Cargo.toml +++ b/tee-worker/identity/cli/Cargo.toml @@ -51,7 +51,7 @@ itp-utils = { path = "../core-primitives/utils" } # litentry frame-metadata = "15.0.0" ita-sgx-runtime = { path = "../app-libs/sgx-runtime" } -litentry-hex-utils = { path = "../../primitives/hex", default-features = false } +litentry-hex-utils = { path = "../../../common/utils/hex", default-features = false } litentry-primitives = { path = "../litentry/primitives" } scale-value = "0.6.0" sp-core-hashing = "6.0.0" diff --git a/tee-worker/cli/README.md b/tee-worker/identity/cli/README.md similarity index 100% rename from tee-worker/cli/README.md rename to tee-worker/identity/cli/README.md diff --git a/tee-worker/cli/benchmark.sh b/tee-worker/identity/cli/benchmark.sh similarity index 100% rename from tee-worker/cli/benchmark.sh rename to tee-worker/identity/cli/benchmark.sh diff --git a/tee-worker/cli/lit_parentchain_nonce.sh b/tee-worker/identity/cli/lit_parentchain_nonce.sh similarity index 100% rename from tee-worker/cli/lit_parentchain_nonce.sh rename to tee-worker/identity/cli/lit_parentchain_nonce.sh diff --git a/tee-worker/cli/lit_test_dr_vc.sh b/tee-worker/identity/cli/lit_test_dr_vc.sh similarity index 100% rename from tee-worker/cli/lit_test_dr_vc.sh rename to tee-worker/identity/cli/lit_test_dr_vc.sh diff --git a/tee-worker/cli/lit_test_failed_parentchain_extrinsic.sh b/tee-worker/identity/cli/lit_test_failed_parentchain_extrinsic.sh similarity index 100% rename from tee-worker/cli/lit_test_failed_parentchain_extrinsic.sh rename to tee-worker/identity/cli/lit_test_failed_parentchain_extrinsic.sh diff --git a/tee-worker/cli/lit_ts_api_package_build.sh b/tee-worker/identity/cli/lit_ts_api_package_build.sh similarity index 100% rename from tee-worker/cli/lit_ts_api_package_build.sh rename to tee-worker/identity/cli/lit_ts_api_package_build.sh diff --git a/tee-worker/cli/lit_ts_integration_test.sh b/tee-worker/identity/cli/lit_ts_integration_test.sh similarity index 100% rename from tee-worker/cli/lit_ts_integration_test.sh rename to tee-worker/identity/cli/lit_ts_integration_test.sh diff --git a/tee-worker/cli/lit_ts_worker_test.sh b/tee-worker/identity/cli/lit_ts_worker_test.sh similarity index 100% rename from tee-worker/cli/lit_ts_worker_test.sh rename to tee-worker/identity/cli/lit_ts_worker_test.sh diff --git a/tee-worker/cli/src/attesteer/commands/mod.rs b/tee-worker/identity/cli/src/attesteer/commands/mod.rs similarity index 100% rename from tee-worker/cli/src/attesteer/commands/mod.rs rename to tee-worker/identity/cli/src/attesteer/commands/mod.rs diff --git a/tee-worker/cli/src/attesteer/commands/send_dcap_quote.rs b/tee-worker/identity/cli/src/attesteer/commands/send_dcap_quote.rs similarity index 100% rename from tee-worker/cli/src/attesteer/commands/send_dcap_quote.rs rename to tee-worker/identity/cli/src/attesteer/commands/send_dcap_quote.rs diff --git a/tee-worker/cli/src/attesteer/commands/send_ias_attestation.rs b/tee-worker/identity/cli/src/attesteer/commands/send_ias_attestation.rs similarity index 100% rename from tee-worker/cli/src/attesteer/commands/send_ias_attestation.rs rename to tee-worker/identity/cli/src/attesteer/commands/send_ias_attestation.rs diff --git a/tee-worker/cli/src/attesteer/mod.rs b/tee-worker/identity/cli/src/attesteer/mod.rs similarity index 100% rename from tee-worker/cli/src/attesteer/mod.rs rename to tee-worker/identity/cli/src/attesteer/mod.rs diff --git a/tee-worker/cli/src/base_cli/commands/balance.rs b/tee-worker/identity/cli/src/base_cli/commands/balance.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/balance.rs rename to tee-worker/identity/cli/src/base_cli/commands/balance.rs diff --git a/tee-worker/cli/src/base_cli/commands/faucet.rs b/tee-worker/identity/cli/src/base_cli/commands/faucet.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/faucet.rs rename to tee-worker/identity/cli/src/base_cli/commands/faucet.rs diff --git a/tee-worker/cli/src/base_cli/commands/listen.rs b/tee-worker/identity/cli/src/base_cli/commands/listen.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/listen.rs rename to tee-worker/identity/cli/src/base_cli/commands/listen.rs diff --git a/tee-worker/cli/src/base_cli/commands/litentry/activate_identity.rs b/tee-worker/identity/cli/src/base_cli/commands/litentry/activate_identity.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/litentry/activate_identity.rs rename to tee-worker/identity/cli/src/base_cli/commands/litentry/activate_identity.rs diff --git a/tee-worker/cli/src/base_cli/commands/litentry/deactivate_identity.rs b/tee-worker/identity/cli/src/base_cli/commands/litentry/deactivate_identity.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/litentry/deactivate_identity.rs rename to tee-worker/identity/cli/src/base_cli/commands/litentry/deactivate_identity.rs diff --git a/tee-worker/cli/src/base_cli/commands/litentry/id_graph_hash.rs b/tee-worker/identity/cli/src/base_cli/commands/litentry/id_graph_hash.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/litentry/id_graph_hash.rs rename to tee-worker/identity/cli/src/base_cli/commands/litentry/id_graph_hash.rs diff --git a/tee-worker/cli/src/base_cli/commands/litentry/link_identity.rs b/tee-worker/identity/cli/src/base_cli/commands/litentry/link_identity.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/litentry/link_identity.rs rename to tee-worker/identity/cli/src/base_cli/commands/litentry/link_identity.rs diff --git a/tee-worker/cli/src/base_cli/commands/litentry/mod.rs b/tee-worker/identity/cli/src/base_cli/commands/litentry/mod.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/litentry/mod.rs rename to tee-worker/identity/cli/src/base_cli/commands/litentry/mod.rs diff --git a/tee-worker/cli/src/base_cli/commands/litentry/shield_text.rs b/tee-worker/identity/cli/src/base_cli/commands/litentry/shield_text.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/litentry/shield_text.rs rename to tee-worker/identity/cli/src/base_cli/commands/litentry/shield_text.rs diff --git a/tee-worker/cli/src/base_cli/commands/mod.rs b/tee-worker/identity/cli/src/base_cli/commands/mod.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/mod.rs rename to tee-worker/identity/cli/src/base_cli/commands/mod.rs diff --git a/tee-worker/cli/src/base_cli/commands/register_tcb_info.rs b/tee-worker/identity/cli/src/base_cli/commands/register_tcb_info.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/register_tcb_info.rs rename to tee-worker/identity/cli/src/base_cli/commands/register_tcb_info.rs diff --git a/tee-worker/cli/src/base_cli/commands/transfer.rs b/tee-worker/identity/cli/src/base_cli/commands/transfer.rs similarity index 100% rename from tee-worker/cli/src/base_cli/commands/transfer.rs rename to tee-worker/identity/cli/src/base_cli/commands/transfer.rs diff --git a/tee-worker/cli/src/base_cli/mod.rs b/tee-worker/identity/cli/src/base_cli/mod.rs similarity index 100% rename from tee-worker/cli/src/base_cli/mod.rs rename to tee-worker/identity/cli/src/base_cli/mod.rs diff --git a/tee-worker/cli/src/benchmark/mod.rs b/tee-worker/identity/cli/src/benchmark/mod.rs similarity index 100% rename from tee-worker/cli/src/benchmark/mod.rs rename to tee-worker/identity/cli/src/benchmark/mod.rs diff --git a/tee-worker/cli/src/benchmark/request_vc.rs b/tee-worker/identity/cli/src/benchmark/request_vc.rs similarity index 100% rename from tee-worker/cli/src/benchmark/request_vc.rs rename to tee-worker/identity/cli/src/benchmark/request_vc.rs diff --git a/tee-worker/cli/src/benchmark/stf.rs b/tee-worker/identity/cli/src/benchmark/stf.rs similarity index 100% rename from tee-worker/cli/src/benchmark/stf.rs rename to tee-worker/identity/cli/src/benchmark/stf.rs diff --git a/tee-worker/cli/src/command_utils.rs b/tee-worker/identity/cli/src/command_utils.rs similarity index 100% rename from tee-worker/cli/src/command_utils.rs rename to tee-worker/identity/cli/src/command_utils.rs diff --git a/tee-worker/cli/src/commands.rs b/tee-worker/identity/cli/src/commands.rs similarity index 100% rename from tee-worker/cli/src/commands.rs rename to tee-worker/identity/cli/src/commands.rs diff --git a/tee-worker/cli/src/evm/commands/evm_call.rs b/tee-worker/identity/cli/src/evm/commands/evm_call.rs similarity index 100% rename from tee-worker/cli/src/evm/commands/evm_call.rs rename to tee-worker/identity/cli/src/evm/commands/evm_call.rs diff --git a/tee-worker/cli/src/evm/commands/evm_command_utils.rs b/tee-worker/identity/cli/src/evm/commands/evm_command_utils.rs similarity index 100% rename from tee-worker/cli/src/evm/commands/evm_command_utils.rs rename to tee-worker/identity/cli/src/evm/commands/evm_command_utils.rs diff --git a/tee-worker/cli/src/evm/commands/evm_create.rs b/tee-worker/identity/cli/src/evm/commands/evm_create.rs similarity index 100% rename from tee-worker/cli/src/evm/commands/evm_create.rs rename to tee-worker/identity/cli/src/evm/commands/evm_create.rs diff --git a/tee-worker/cli/src/evm/commands/evm_read.rs b/tee-worker/identity/cli/src/evm/commands/evm_read.rs similarity index 100% rename from tee-worker/cli/src/evm/commands/evm_read.rs rename to tee-worker/identity/cli/src/evm/commands/evm_read.rs diff --git a/tee-worker/cli/src/evm/commands/mod.rs b/tee-worker/identity/cli/src/evm/commands/mod.rs similarity index 100% rename from tee-worker/cli/src/evm/commands/mod.rs rename to tee-worker/identity/cli/src/evm/commands/mod.rs diff --git a/tee-worker/cli/src/evm/mod.rs b/tee-worker/identity/cli/src/evm/mod.rs similarity index 100% rename from tee-worker/cli/src/evm/mod.rs rename to tee-worker/identity/cli/src/evm/mod.rs diff --git a/tee-worker/cli/src/lib.rs b/tee-worker/identity/cli/src/lib.rs similarity index 100% rename from tee-worker/cli/src/lib.rs rename to tee-worker/identity/cli/src/lib.rs diff --git a/tee-worker/cli/src/main.rs b/tee-worker/identity/cli/src/main.rs similarity index 100% rename from tee-worker/cli/src/main.rs rename to tee-worker/identity/cli/src/main.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/balance.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/balance.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/balance.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/balance.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/get_shard.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/get_shard.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/get_shard.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/get_shard.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/get_storage.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/get_storage.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/litentry/get_storage.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/get_storage.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/id_graph.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/id_graph.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/litentry/id_graph.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/id_graph.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/link_identity.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/link_identity.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/litentry/link_identity.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/link_identity.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/mod.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/mod.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/litentry/mod.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/mod.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/remove_identity.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/remove_identity.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/litentry/remove_identity.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/remove_identity.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/request_vc.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/request_vc.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/litentry/request_vc.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/request_vc.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/request_vc_subcommands.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/request_vc_subcommands.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/litentry/request_vc_subcommands.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/request_vc_subcommands.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/litentry/send_erroneous_parentchain_call.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/send_erroneous_parentchain_call.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/litentry/send_erroneous_parentchain_call.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/litentry/send_erroneous_parentchain_call.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/mod.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/mod.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/mod.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/mod.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/nonce.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/nonce.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/nonce.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/nonce.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/set_balance.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/set_balance.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/set_balance.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/set_balance.rs diff --git a/tee-worker/cli/src/trusted_base_cli/commands/transfer.rs b/tee-worker/identity/cli/src/trusted_base_cli/commands/transfer.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/commands/transfer.rs rename to tee-worker/identity/cli/src/trusted_base_cli/commands/transfer.rs diff --git a/tee-worker/cli/src/trusted_base_cli/mod.rs b/tee-worker/identity/cli/src/trusted_base_cli/mod.rs similarity index 100% rename from tee-worker/cli/src/trusted_base_cli/mod.rs rename to tee-worker/identity/cli/src/trusted_base_cli/mod.rs diff --git a/tee-worker/cli/src/trusted_cli.rs b/tee-worker/identity/cli/src/trusted_cli.rs similarity index 100% rename from tee-worker/cli/src/trusted_cli.rs rename to tee-worker/identity/cli/src/trusted_cli.rs diff --git a/tee-worker/cli/src/trusted_command_utils.rs b/tee-worker/identity/cli/src/trusted_command_utils.rs similarity index 100% rename from tee-worker/cli/src/trusted_command_utils.rs rename to tee-worker/identity/cli/src/trusted_command_utils.rs diff --git a/tee-worker/cli/src/trusted_operation.rs b/tee-worker/identity/cli/src/trusted_operation.rs similarity index 100% rename from tee-worker/cli/src/trusted_operation.rs rename to tee-worker/identity/cli/src/trusted_operation.rs diff --git a/tee-worker/cli/test_auto_shielding_with_transfer_bob.sh b/tee-worker/identity/cli/test_auto_shielding_with_transfer_bob.sh similarity index 100% rename from tee-worker/cli/test_auto_shielding_with_transfer_bob.sh rename to tee-worker/identity/cli/test_auto_shielding_with_transfer_bob.sh diff --git a/tee-worker/cli/test_shield_on_target_nodes_with_transfer_to_alice.sh b/tee-worker/identity/cli/test_shield_on_target_nodes_with_transfer_to_alice.sh similarity index 100% rename from tee-worker/cli/test_shield_on_target_nodes_with_transfer_to_alice.sh rename to tee-worker/identity/cli/test_shield_on_target_nodes_with_transfer_to_alice.sh diff --git a/tee-worker/cli/tests/basic_tests.rs b/tee-worker/identity/cli/tests/basic_tests.rs similarity index 100% rename from tee-worker/cli/tests/basic_tests.rs rename to tee-worker/identity/cli/tests/basic_tests.rs diff --git a/tee-worker/client-api/.editorconfig b/tee-worker/identity/client-api/.editorconfig similarity index 100% rename from tee-worker/client-api/.editorconfig rename to tee-worker/identity/client-api/.editorconfig diff --git a/tee-worker/client-api/.gitignore b/tee-worker/identity/client-api/.gitignore similarity index 100% rename from tee-worker/client-api/.gitignore rename to tee-worker/identity/client-api/.gitignore diff --git a/tee-worker/client-api/.prettierrc b/tee-worker/identity/client-api/.prettierrc similarity index 100% rename from tee-worker/client-api/.prettierrc rename to tee-worker/identity/client-api/.prettierrc diff --git a/tee-worker/client-api/README.md b/tee-worker/identity/client-api/README.md similarity index 100% rename from tee-worker/client-api/README.md rename to tee-worker/identity/client-api/README.md diff --git a/tee-worker/client-api/package.json b/tee-worker/identity/client-api/package.json similarity index 100% rename from tee-worker/client-api/package.json rename to tee-worker/identity/client-api/package.json diff --git a/tee-worker/client-api/parachain-api/.gitignore b/tee-worker/identity/client-api/parachain-api/.gitignore similarity index 100% rename from tee-worker/client-api/parachain-api/.gitignore rename to tee-worker/identity/client-api/parachain-api/.gitignore diff --git a/tee-worker/client-api/parachain-api/CHANGELOG.md b/tee-worker/identity/client-api/parachain-api/CHANGELOG.md similarity index 100% rename from tee-worker/client-api/parachain-api/CHANGELOG.md rename to tee-worker/identity/client-api/parachain-api/CHANGELOG.md diff --git a/tee-worker/client-api/parachain-api/README.md b/tee-worker/identity/client-api/parachain-api/README.md similarity index 100% rename from tee-worker/client-api/parachain-api/README.md rename to tee-worker/identity/client-api/parachain-api/README.md diff --git a/tee-worker/client-api/parachain-api/package.json b/tee-worker/identity/client-api/parachain-api/package.json similarity index 100% rename from tee-worker/client-api/parachain-api/package.json rename to tee-worker/identity/client-api/parachain-api/package.json diff --git a/tee-worker/client-api/parachain-api/prepare-build/interfaces/definitions.ts b/tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/definitions.ts similarity index 100% rename from tee-worker/client-api/parachain-api/prepare-build/interfaces/definitions.ts rename to tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/definitions.ts diff --git a/tee-worker/client-api/parachain-api/prepare-build/interfaces/identity/definitions.ts b/tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/identity/definitions.ts similarity index 100% rename from tee-worker/client-api/parachain-api/prepare-build/interfaces/identity/definitions.ts rename to tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/identity/definitions.ts diff --git a/tee-worker/client-api/parachain-api/prepare-build/interfaces/sidechain/definitions.ts b/tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/sidechain/definitions.ts similarity index 100% rename from tee-worker/client-api/parachain-api/prepare-build/interfaces/sidechain/definitions.ts rename to tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/sidechain/definitions.ts diff --git a/tee-worker/client-api/parachain-api/prepare-build/interfaces/trusted_operations/definitions.ts b/tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/trusted_operations/definitions.ts similarity index 100% rename from tee-worker/client-api/parachain-api/prepare-build/interfaces/trusted_operations/definitions.ts rename to tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/trusted_operations/definitions.ts diff --git a/tee-worker/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts b/tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts similarity index 100% rename from tee-worker/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts rename to tee-worker/identity/client-api/parachain-api/prepare-build/interfaces/vc/definitions.ts diff --git a/tee-worker/client-api/parachain-api/src/index.ts b/tee-worker/identity/client-api/parachain-api/src/index.ts similarity index 100% rename from tee-worker/client-api/parachain-api/src/index.ts rename to tee-worker/identity/client-api/parachain-api/src/index.ts diff --git a/tee-worker/client-api/parachain-api/tsconfig.json b/tee-worker/identity/client-api/parachain-api/tsconfig.json similarity index 100% rename from tee-worker/client-api/parachain-api/tsconfig.json rename to tee-worker/identity/client-api/parachain-api/tsconfig.json diff --git a/tee-worker/client-api/pnpm-lock.yaml b/tee-worker/identity/client-api/pnpm-lock.yaml similarity index 100% rename from tee-worker/client-api/pnpm-lock.yaml rename to tee-worker/identity/client-api/pnpm-lock.yaml diff --git a/tee-worker/client-api/pnpm-workspace.yaml b/tee-worker/identity/client-api/pnpm-workspace.yaml similarity index 100% rename from tee-worker/client-api/pnpm-workspace.yaml rename to tee-worker/identity/client-api/pnpm-workspace.yaml diff --git a/tee-worker/client-api/sidechain-api/.gitignore b/tee-worker/identity/client-api/sidechain-api/.gitignore similarity index 100% rename from tee-worker/client-api/sidechain-api/.gitignore rename to tee-worker/identity/client-api/sidechain-api/.gitignore diff --git a/tee-worker/client-api/sidechain-api/CHANGELOG.md b/tee-worker/identity/client-api/sidechain-api/CHANGELOG.md similarity index 100% rename from tee-worker/client-api/sidechain-api/CHANGELOG.md rename to tee-worker/identity/client-api/sidechain-api/CHANGELOG.md diff --git a/tee-worker/client-api/sidechain-api/README.md b/tee-worker/identity/client-api/sidechain-api/README.md similarity index 100% rename from tee-worker/client-api/sidechain-api/README.md rename to tee-worker/identity/client-api/sidechain-api/README.md diff --git a/tee-worker/client-api/sidechain-api/package.json b/tee-worker/identity/client-api/sidechain-api/package.json similarity index 100% rename from tee-worker/client-api/sidechain-api/package.json rename to tee-worker/identity/client-api/sidechain-api/package.json diff --git a/tee-worker/client-api/sidechain-api/prepare-build/interfaces/definitions.ts b/tee-worker/identity/client-api/sidechain-api/prepare-build/interfaces/definitions.ts similarity index 100% rename from tee-worker/client-api/sidechain-api/prepare-build/interfaces/definitions.ts rename to tee-worker/identity/client-api/sidechain-api/prepare-build/interfaces/definitions.ts diff --git a/tee-worker/client-api/sidechain-api/prepare-build/interfaces/dummynocustom/definitions.ts b/tee-worker/identity/client-api/sidechain-api/prepare-build/interfaces/dummynocustom/definitions.ts similarity index 100% rename from tee-worker/client-api/sidechain-api/prepare-build/interfaces/dummynocustom/definitions.ts rename to tee-worker/identity/client-api/sidechain-api/prepare-build/interfaces/dummynocustom/definitions.ts diff --git a/tee-worker/client-api/sidechain-api/src/index.ts b/tee-worker/identity/client-api/sidechain-api/src/index.ts similarity index 100% rename from tee-worker/client-api/sidechain-api/src/index.ts rename to tee-worker/identity/client-api/sidechain-api/src/index.ts diff --git a/tee-worker/client-api/sidechain-api/tsconfig.json b/tee-worker/identity/client-api/sidechain-api/tsconfig.json similarity index 100% rename from tee-worker/client-api/sidechain-api/tsconfig.json rename to tee-worker/identity/client-api/sidechain-api/tsconfig.json diff --git a/tee-worker/client-sdk/.eslintignore b/tee-worker/identity/client-sdk/.eslintignore similarity index 100% rename from tee-worker/client-sdk/.eslintignore rename to tee-worker/identity/client-sdk/.eslintignore diff --git a/tee-worker/client-sdk/.eslintrc.json b/tee-worker/identity/client-sdk/.eslintrc.json similarity index 100% rename from tee-worker/client-sdk/.eslintrc.json rename to tee-worker/identity/client-sdk/.eslintrc.json diff --git a/tee-worker/client-sdk/.gitignore b/tee-worker/identity/client-sdk/.gitignore similarity index 100% rename from tee-worker/client-sdk/.gitignore rename to tee-worker/identity/client-sdk/.gitignore diff --git a/tee-worker/client-sdk/.npmrc b/tee-worker/identity/client-sdk/.npmrc similarity index 100% rename from tee-worker/client-sdk/.npmrc rename to tee-worker/identity/client-sdk/.npmrc diff --git a/tee-worker/client-sdk/.prettierignore b/tee-worker/identity/client-sdk/.prettierignore similarity index 100% rename from tee-worker/client-sdk/.prettierignore rename to tee-worker/identity/client-sdk/.prettierignore diff --git a/tee-worker/client-sdk/.prettierrc b/tee-worker/identity/client-sdk/.prettierrc similarity index 100% rename from tee-worker/client-sdk/.prettierrc rename to tee-worker/identity/client-sdk/.prettierrc diff --git a/tee-worker/client-sdk/.verdaccio/config.yml b/tee-worker/identity/client-sdk/.verdaccio/config.yml similarity index 100% rename from tee-worker/client-sdk/.verdaccio/config.yml rename to tee-worker/identity/client-sdk/.verdaccio/config.yml diff --git a/tee-worker/client-sdk/README.md b/tee-worker/identity/client-sdk/README.md similarity index 100% rename from tee-worker/client-sdk/README.md rename to tee-worker/identity/client-sdk/README.md diff --git a/tee-worker/client-sdk/jest.config.ts b/tee-worker/identity/client-sdk/jest.config.ts similarity index 100% rename from tee-worker/client-sdk/jest.config.ts rename to tee-worker/identity/client-sdk/jest.config.ts diff --git a/tee-worker/client-sdk/jest.preset.js b/tee-worker/identity/client-sdk/jest.preset.js similarity index 100% rename from tee-worker/client-sdk/jest.preset.js rename to tee-worker/identity/client-sdk/jest.preset.js diff --git a/tee-worker/client-sdk/nx.json b/tee-worker/identity/client-sdk/nx.json similarity index 100% rename from tee-worker/client-sdk/nx.json rename to tee-worker/identity/client-sdk/nx.json diff --git a/tee-worker/client-sdk/package.json b/tee-worker/identity/client-sdk/package.json similarity index 100% rename from tee-worker/client-sdk/package.json rename to tee-worker/identity/client-sdk/package.json diff --git a/tee-worker/client-sdk/packages/chaindata/.eslintrc.json b/tee-worker/identity/client-sdk/packages/chaindata/.eslintrc.json similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/.eslintrc.json rename to tee-worker/identity/client-sdk/packages/chaindata/.eslintrc.json diff --git a/tee-worker/client-sdk/packages/chaindata/CHANGELOG.md b/tee-worker/identity/client-sdk/packages/chaindata/CHANGELOG.md similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/CHANGELOG.md rename to tee-worker/identity/client-sdk/packages/chaindata/CHANGELOG.md diff --git a/tee-worker/client-sdk/packages/chaindata/README.md b/tee-worker/identity/client-sdk/packages/chaindata/README.md similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/README.md rename to tee-worker/identity/client-sdk/packages/chaindata/README.md diff --git a/tee-worker/client-sdk/packages/chaindata/package.json b/tee-worker/identity/client-sdk/packages/chaindata/package.json similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/package.json rename to tee-worker/identity/client-sdk/packages/chaindata/package.json diff --git a/tee-worker/client-sdk/packages/chaindata/project.json b/tee-worker/identity/client-sdk/packages/chaindata/project.json similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/project.json rename to tee-worker/identity/client-sdk/packages/chaindata/project.json diff --git a/tee-worker/client-sdk/packages/chaindata/src/index.ts b/tee-worker/identity/client-sdk/packages/chaindata/src/index.ts similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/src/index.ts rename to tee-worker/identity/client-sdk/packages/chaindata/src/index.ts diff --git a/tee-worker/client-sdk/packages/chaindata/src/lib/chaindata.ts b/tee-worker/identity/client-sdk/packages/chaindata/src/lib/chaindata.ts similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/src/lib/chaindata.ts rename to tee-worker/identity/client-sdk/packages/chaindata/src/lib/chaindata.ts diff --git a/tee-worker/client-sdk/packages/chaindata/tsconfig.json b/tee-worker/identity/client-sdk/packages/chaindata/tsconfig.json similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/tsconfig.json rename to tee-worker/identity/client-sdk/packages/chaindata/tsconfig.json diff --git a/tee-worker/client-sdk/packages/chaindata/tsconfig.lib.json b/tee-worker/identity/client-sdk/packages/chaindata/tsconfig.lib.json similarity index 100% rename from tee-worker/client-sdk/packages/chaindata/tsconfig.lib.json rename to tee-worker/identity/client-sdk/packages/chaindata/tsconfig.lib.json diff --git a/tee-worker/client-sdk/packages/enclave/.eslintrc.json b/tee-worker/identity/client-sdk/packages/enclave/.eslintrc.json similarity index 100% rename from tee-worker/client-sdk/packages/enclave/.eslintrc.json rename to tee-worker/identity/client-sdk/packages/enclave/.eslintrc.json diff --git a/tee-worker/client-sdk/packages/enclave/CHANGELOG.md b/tee-worker/identity/client-sdk/packages/enclave/CHANGELOG.md similarity index 100% rename from tee-worker/client-sdk/packages/enclave/CHANGELOG.md rename to tee-worker/identity/client-sdk/packages/enclave/CHANGELOG.md diff --git a/tee-worker/client-sdk/packages/enclave/LICENSE b/tee-worker/identity/client-sdk/packages/enclave/LICENSE similarity index 100% rename from tee-worker/client-sdk/packages/enclave/LICENSE rename to tee-worker/identity/client-sdk/packages/enclave/LICENSE diff --git a/tee-worker/client-sdk/packages/enclave/README.md b/tee-worker/identity/client-sdk/packages/enclave/README.md similarity index 100% rename from tee-worker/client-sdk/packages/enclave/README.md rename to tee-worker/identity/client-sdk/packages/enclave/README.md diff --git a/tee-worker/client-sdk/packages/enclave/docs/.nojekyll b/tee-worker/identity/client-sdk/packages/enclave/docs/.nojekyll similarity index 100% rename from tee-worker/client-sdk/packages/enclave/docs/.nojekyll rename to tee-worker/identity/client-sdk/packages/enclave/docs/.nojekyll diff --git a/tee-worker/client-sdk/packages/enclave/docs/README.md b/tee-worker/identity/client-sdk/packages/enclave/docs/README.md similarity index 100% rename from tee-worker/client-sdk/packages/enclave/docs/README.md rename to tee-worker/identity/client-sdk/packages/enclave/docs/README.md diff --git a/tee-worker/client-sdk/packages/enclave/docs/classes/Enclave.md b/tee-worker/identity/client-sdk/packages/enclave/docs/classes/Enclave.md similarity index 100% rename from tee-worker/client-sdk/packages/enclave/docs/classes/Enclave.md rename to tee-worker/identity/client-sdk/packages/enclave/docs/classes/Enclave.md diff --git a/tee-worker/client-sdk/packages/enclave/docs/modules/request.md b/tee-worker/identity/client-sdk/packages/enclave/docs/modules/request.md similarity index 100% rename from tee-worker/client-sdk/packages/enclave/docs/modules/request.md rename to tee-worker/identity/client-sdk/packages/enclave/docs/modules/request.md diff --git a/tee-worker/client-sdk/packages/enclave/jest.config.ts b/tee-worker/identity/client-sdk/packages/enclave/jest.config.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/jest.config.ts rename to tee-worker/identity/client-sdk/packages/enclave/jest.config.ts diff --git a/tee-worker/client-sdk/packages/enclave/package.json b/tee-worker/identity/client-sdk/packages/enclave/package.json similarity index 100% rename from tee-worker/client-sdk/packages/enclave/package.json rename to tee-worker/identity/client-sdk/packages/enclave/package.json diff --git a/tee-worker/client-sdk/packages/enclave/project.json b/tee-worker/identity/client-sdk/packages/enclave/project.json similarity index 100% rename from tee-worker/client-sdk/packages/enclave/project.json rename to tee-worker/identity/client-sdk/packages/enclave/project.json diff --git a/tee-worker/client-sdk/packages/enclave/src/index.ts b/tee-worker/identity/client-sdk/packages/enclave/src/index.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/index.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/index.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/__test__/id-graph-decoder.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/__test__/id-graph-decoder.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/__test__/id-graph-decoder.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/__test__/id-graph-decoder.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/__test__/payload-signing.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/__test__/payload-signing.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/__test__/payload-signing.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/__test__/payload-signing.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/config.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/config.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/config.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/config.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/enclave.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/enclave.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/enclave.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/enclave.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/get-enclave-nonce.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/get-enclave-nonce.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/get-enclave-nonce.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/get-enclave-nonce.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/get-id-graph-hash.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/get-id-graph-hash.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/get-id-graph-hash.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/get-id-graph-hash.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/get-id-graph.request.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/get-id-graph.request.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/get-id-graph.request.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/get-id-graph.request.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/get-last-registered-enclave.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/get-last-registered-enclave.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/get-last-registered-enclave.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/get-last-registered-enclave.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/index.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/index.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/index.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/index.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/link-identity-callback.request.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/link-identity-callback.request.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/link-identity-callback.request.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/link-identity-callback.request.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/link-identity.request.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/link-identity.request.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/link-identity.request.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/link-identity.request.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/request-batch-vc.request.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/request-batch-vc.request.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/request-batch-vc.request.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/request-batch-vc.request.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/requests/set-identity-networks.request.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/set-identity-networks.request.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/requests/set-identity-networks.request.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/requests/set-identity-networks.request.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/id-graph.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/id-graph.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/id-graph.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/id-graph.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/key-aes-output.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/key-aes-output.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/key-aes-output.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/key-aes-output.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/litentry-identity.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/litentry-identity.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/litentry-identity.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/litentry-identity.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/litentry-identity.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/litentry-identity.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/litentry-identity.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/litentry-identity.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/litentry-multi-signature.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/litentry-multi-signature.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/litentry-multi-signature.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/litentry-multi-signature.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/litentry-multi-signature.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/litentry-multi-signature.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/litentry-multi-signature.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/litentry-multi-signature.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/nonce.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/nonce.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/nonce.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/nonce.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/nonce.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/nonce.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/nonce.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/nonce.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/request.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/request.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/request.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/request.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/trusted-call.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/trusted-call.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/trusted-call.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/trusted-call.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/trusted-call.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/trusted-call.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/trusted-call.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/trusted-call.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/validation-data.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/validation-data.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/validation-data.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/validation-data.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/type-creators/validation-data.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/validation-data.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/type-creators/validation-data.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/type-creators/validation-data.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/calculate-id-graph-hash.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/calculate-id-graph-hash.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/calculate-id-graph-hash.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/calculate-id-graph-hash.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/calculate-id-graph-hash.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/calculate-id-graph-hash.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/calculate-id-graph-hash.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/calculate-id-graph-hash.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/create-payload-to-sign.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/create-payload-to-sign.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/create-payload-to-sign.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/create-payload-to-sign.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/create-payload-to-sign.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/create-payload-to-sign.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/create-payload-to-sign.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/create-payload-to-sign.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/decode-signature.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/decode-signature.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/decode-signature.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/decode-signature.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/get-signature-crypto-type.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/get-signature-crypto-type.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/get-signature-crypto-type.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/get-signature-crypto-type.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/safely-decode-option.test.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/safely-decode-option.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/safely-decode-option.test.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/safely-decode-option.test.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/safely-decode-option.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/safely-decode-option.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/safely-decode-option.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/safely-decode-option.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/shielding-key.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/shielding-key.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/shielding-key.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/shielding-key.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/types.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/types.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/types.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/types.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/u8aToBase64Url.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/u8aToBase64Url.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/u8aToBase64Url.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/u8aToBase64Url.ts diff --git a/tee-worker/client-sdk/packages/enclave/src/lib/util/verify-signature.ts b/tee-worker/identity/client-sdk/packages/enclave/src/lib/util/verify-signature.ts similarity index 100% rename from tee-worker/client-sdk/packages/enclave/src/lib/util/verify-signature.ts rename to tee-worker/identity/client-sdk/packages/enclave/src/lib/util/verify-signature.ts diff --git a/tee-worker/client-sdk/packages/enclave/tsconfig.json b/tee-worker/identity/client-sdk/packages/enclave/tsconfig.json similarity index 100% rename from tee-worker/client-sdk/packages/enclave/tsconfig.json rename to tee-worker/identity/client-sdk/packages/enclave/tsconfig.json diff --git a/tee-worker/client-sdk/packages/enclave/tsconfig.lib.json b/tee-worker/identity/client-sdk/packages/enclave/tsconfig.lib.json similarity index 100% rename from tee-worker/client-sdk/packages/enclave/tsconfig.lib.json rename to tee-worker/identity/client-sdk/packages/enclave/tsconfig.lib.json diff --git a/tee-worker/client-sdk/packages/enclave/tsconfig.spec.json b/tee-worker/identity/client-sdk/packages/enclave/tsconfig.spec.json similarity index 100% rename from tee-worker/client-sdk/packages/enclave/tsconfig.spec.json rename to tee-worker/identity/client-sdk/packages/enclave/tsconfig.spec.json diff --git a/tee-worker/client-sdk/packages/enclave/typedoc.json b/tee-worker/identity/client-sdk/packages/enclave/typedoc.json similarity index 100% rename from tee-worker/client-sdk/packages/enclave/typedoc.json rename to tee-worker/identity/client-sdk/packages/enclave/typedoc.json diff --git a/tee-worker/client-sdk/packages/vc-sdk/.eslintrc.json b/tee-worker/identity/client-sdk/packages/vc-sdk/.eslintrc.json similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/.eslintrc.json rename to tee-worker/identity/client-sdk/packages/vc-sdk/.eslintrc.json diff --git a/tee-worker/client-sdk/packages/vc-sdk/CHANGELOG.md b/tee-worker/identity/client-sdk/packages/vc-sdk/CHANGELOG.md similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/CHANGELOG.md rename to tee-worker/identity/client-sdk/packages/vc-sdk/CHANGELOG.md diff --git a/tee-worker/client-sdk/packages/vc-sdk/LICENSE b/tee-worker/identity/client-sdk/packages/vc-sdk/LICENSE similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/LICENSE rename to tee-worker/identity/client-sdk/packages/vc-sdk/LICENSE diff --git a/tee-worker/client-sdk/packages/vc-sdk/README.md b/tee-worker/identity/client-sdk/packages/vc-sdk/README.md similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/README.md rename to tee-worker/identity/client-sdk/packages/vc-sdk/README.md diff --git a/tee-worker/client-sdk/packages/vc-sdk/docs/.nojekyll b/tee-worker/identity/client-sdk/packages/vc-sdk/docs/.nojekyll similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/docs/.nojekyll rename to tee-worker/identity/client-sdk/packages/vc-sdk/docs/.nojekyll diff --git a/tee-worker/client-sdk/packages/vc-sdk/docs/README.md b/tee-worker/identity/client-sdk/packages/vc-sdk/docs/README.md similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/docs/README.md rename to tee-worker/identity/client-sdk/packages/vc-sdk/docs/README.md diff --git a/tee-worker/client-sdk/packages/vc-sdk/jest.config.ts b/tee-worker/identity/client-sdk/packages/vc-sdk/jest.config.ts similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/jest.config.ts rename to tee-worker/identity/client-sdk/packages/vc-sdk/jest.config.ts diff --git a/tee-worker/client-sdk/packages/vc-sdk/package.json b/tee-worker/identity/client-sdk/packages/vc-sdk/package.json similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/package.json rename to tee-worker/identity/client-sdk/packages/vc-sdk/package.json diff --git a/tee-worker/client-sdk/packages/vc-sdk/project.json b/tee-worker/identity/client-sdk/packages/vc-sdk/project.json similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/project.json rename to tee-worker/identity/client-sdk/packages/vc-sdk/project.json diff --git a/tee-worker/client-sdk/packages/vc-sdk/src/index.ts b/tee-worker/identity/client-sdk/packages/vc-sdk/src/index.ts similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/src/index.ts rename to tee-worker/identity/client-sdk/packages/vc-sdk/src/index.ts diff --git a/tee-worker/client-sdk/packages/vc-sdk/src/lib/__tests__/validate-enclave-registry.test.ts b/tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/__tests__/validate-enclave-registry.test.ts similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/src/lib/__tests__/validate-enclave-registry.test.ts rename to tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/__tests__/validate-enclave-registry.test.ts diff --git a/tee-worker/client-sdk/packages/vc-sdk/src/lib/runtime-enclave-registry.ts b/tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/runtime-enclave-registry.ts similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/src/lib/runtime-enclave-registry.ts rename to tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/runtime-enclave-registry.ts diff --git a/tee-worker/client-sdk/packages/vc-sdk/src/lib/validator.constants.ts b/tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/validator.constants.ts similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/src/lib/validator.constants.ts rename to tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/validator.constants.ts diff --git a/tee-worker/client-sdk/packages/vc-sdk/src/lib/validator.spec.ts b/tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/validator.spec.ts similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/src/lib/validator.spec.ts rename to tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/validator.spec.ts diff --git a/tee-worker/client-sdk/packages/vc-sdk/src/lib/validator.ts b/tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/validator.ts similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/src/lib/validator.ts rename to tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/validator.ts diff --git a/tee-worker/client-sdk/packages/vc-sdk/src/lib/validator.types.ts b/tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/validator.types.ts similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/src/lib/validator.types.ts rename to tee-worker/identity/client-sdk/packages/vc-sdk/src/lib/validator.types.ts diff --git a/tee-worker/client-sdk/packages/vc-sdk/tsconfig.json b/tee-worker/identity/client-sdk/packages/vc-sdk/tsconfig.json similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/tsconfig.json rename to tee-worker/identity/client-sdk/packages/vc-sdk/tsconfig.json diff --git a/tee-worker/client-sdk/packages/vc-sdk/tsconfig.lib.json b/tee-worker/identity/client-sdk/packages/vc-sdk/tsconfig.lib.json similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/tsconfig.lib.json rename to tee-worker/identity/client-sdk/packages/vc-sdk/tsconfig.lib.json diff --git a/tee-worker/client-sdk/packages/vc-sdk/tsconfig.spec.json b/tee-worker/identity/client-sdk/packages/vc-sdk/tsconfig.spec.json similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/tsconfig.spec.json rename to tee-worker/identity/client-sdk/packages/vc-sdk/tsconfig.spec.json diff --git a/tee-worker/client-sdk/packages/vc-sdk/typedoc.json b/tee-worker/identity/client-sdk/packages/vc-sdk/typedoc.json similarity index 100% rename from tee-worker/client-sdk/packages/vc-sdk/typedoc.json rename to tee-worker/identity/client-sdk/packages/vc-sdk/typedoc.json diff --git a/tee-worker/client-sdk/pnpm-lock.yaml b/tee-worker/identity/client-sdk/pnpm-lock.yaml similarity index 100% rename from tee-worker/client-sdk/pnpm-lock.yaml rename to tee-worker/identity/client-sdk/pnpm-lock.yaml diff --git a/tee-worker/client-sdk/pnpm-workspace.yaml b/tee-worker/identity/client-sdk/pnpm-workspace.yaml similarity index 100% rename from tee-worker/client-sdk/pnpm-workspace.yaml rename to tee-worker/identity/client-sdk/pnpm-workspace.yaml diff --git a/tee-worker/client-sdk/project.json b/tee-worker/identity/client-sdk/project.json similarity index 100% rename from tee-worker/client-sdk/project.json rename to tee-worker/identity/client-sdk/project.json diff --git a/tee-worker/client-sdk/tools/scripts/publish.mjs b/tee-worker/identity/client-sdk/tools/scripts/publish.mjs similarity index 100% rename from tee-worker/client-sdk/tools/scripts/publish.mjs rename to tee-worker/identity/client-sdk/tools/scripts/publish.mjs diff --git a/tee-worker/client-sdk/tsconfig.base.json b/tee-worker/identity/client-sdk/tsconfig.base.json similarity index 100% rename from tee-worker/client-sdk/tsconfig.base.json rename to tee-worker/identity/client-sdk/tsconfig.base.json diff --git a/tee-worker/core-primitives/attestation-handler/AttestationReportSigningCACert.pem b/tee-worker/identity/core-primitives/attestation-handler/AttestationReportSigningCACert.pem similarity index 100% rename from tee-worker/core-primitives/attestation-handler/AttestationReportSigningCACert.pem rename to tee-worker/identity/core-primitives/attestation-handler/AttestationReportSigningCACert.pem diff --git a/tee-worker/core-primitives/attestation-handler/Cargo.toml b/tee-worker/identity/core-primitives/attestation-handler/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/attestation-handler/Cargo.toml rename to tee-worker/identity/core-primitives/attestation-handler/Cargo.toml diff --git a/tee-worker/core-primitives/attestation-handler/src/attestation_handler.rs b/tee-worker/identity/core-primitives/attestation-handler/src/attestation_handler.rs similarity index 100% rename from tee-worker/core-primitives/attestation-handler/src/attestation_handler.rs rename to tee-worker/identity/core-primitives/attestation-handler/src/attestation_handler.rs diff --git a/tee-worker/core-primitives/attestation-handler/src/cert.rs b/tee-worker/identity/core-primitives/attestation-handler/src/cert.rs similarity index 100% rename from tee-worker/core-primitives/attestation-handler/src/cert.rs rename to tee-worker/identity/core-primitives/attestation-handler/src/cert.rs diff --git a/tee-worker/core-primitives/attestation-handler/src/collateral.rs b/tee-worker/identity/core-primitives/attestation-handler/src/collateral.rs similarity index 100% rename from tee-worker/core-primitives/attestation-handler/src/collateral.rs rename to tee-worker/identity/core-primitives/attestation-handler/src/collateral.rs diff --git a/tee-worker/core-primitives/attestation-handler/src/error.rs b/tee-worker/identity/core-primitives/attestation-handler/src/error.rs similarity index 100% rename from tee-worker/core-primitives/attestation-handler/src/error.rs rename to tee-worker/identity/core-primitives/attestation-handler/src/error.rs diff --git a/tee-worker/core-primitives/attestation-handler/src/lib.rs b/tee-worker/identity/core-primitives/attestation-handler/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/attestation-handler/src/lib.rs rename to tee-worker/identity/core-primitives/attestation-handler/src/lib.rs diff --git a/tee-worker/core-primitives/binary-merkle-tree/Cargo.toml b/tee-worker/identity/core-primitives/binary-merkle-tree/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/binary-merkle-tree/Cargo.toml rename to tee-worker/identity/core-primitives/binary-merkle-tree/Cargo.toml diff --git a/tee-worker/core-primitives/binary-merkle-tree/src/lib.rs b/tee-worker/identity/core-primitives/binary-merkle-tree/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/binary-merkle-tree/src/lib.rs rename to tee-worker/identity/core-primitives/binary-merkle-tree/src/lib.rs diff --git a/tee-worker/core-primitives/component-container/Cargo.toml b/tee-worker/identity/core-primitives/component-container/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/component-container/Cargo.toml rename to tee-worker/identity/core-primitives/component-container/Cargo.toml diff --git a/tee-worker/core-primitives/component-container/src/atomic_container.rs b/tee-worker/identity/core-primitives/component-container/src/atomic_container.rs similarity index 100% rename from tee-worker/core-primitives/component-container/src/atomic_container.rs rename to tee-worker/identity/core-primitives/component-container/src/atomic_container.rs diff --git a/tee-worker/core-primitives/component-container/src/component_container.rs b/tee-worker/identity/core-primitives/component-container/src/component_container.rs similarity index 100% rename from tee-worker/core-primitives/component-container/src/component_container.rs rename to tee-worker/identity/core-primitives/component-container/src/component_container.rs diff --git a/tee-worker/core-primitives/component-container/src/error.rs b/tee-worker/identity/core-primitives/component-container/src/error.rs similarity index 100% rename from tee-worker/core-primitives/component-container/src/error.rs rename to tee-worker/identity/core-primitives/component-container/src/error.rs diff --git a/tee-worker/core-primitives/component-container/src/lib.rs b/tee-worker/identity/core-primitives/component-container/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/component-container/src/lib.rs rename to tee-worker/identity/core-primitives/component-container/src/lib.rs diff --git a/tee-worker/core-primitives/enclave-api/Cargo.toml b/tee-worker/identity/core-primitives/enclave-api/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/enclave-api/Cargo.toml rename to tee-worker/identity/core-primitives/enclave-api/Cargo.toml diff --git a/tee-worker/core-primitives/enclave-api/build.rs b/tee-worker/identity/core-primitives/enclave-api/build.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/build.rs rename to tee-worker/identity/core-primitives/enclave-api/build.rs diff --git a/tee-worker/core-primitives/enclave-api/ffi/Cargo.toml b/tee-worker/identity/core-primitives/enclave-api/ffi/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/enclave-api/ffi/Cargo.toml rename to tee-worker/identity/core-primitives/enclave-api/ffi/Cargo.toml diff --git a/tee-worker/core-primitives/enclave-api/ffi/build.rs b/tee-worker/identity/core-primitives/enclave-api/ffi/build.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/ffi/build.rs rename to tee-worker/identity/core-primitives/enclave-api/ffi/build.rs diff --git a/tee-worker/core-primitives/enclave-api/ffi/src/lib.rs b/tee-worker/identity/core-primitives/enclave-api/ffi/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/ffi/src/lib.rs rename to tee-worker/identity/core-primitives/enclave-api/ffi/src/lib.rs diff --git a/tee-worker/core-primitives/enclave-api/src/enclave_base.rs b/tee-worker/identity/core-primitives/enclave-api/src/enclave_base.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/src/enclave_base.rs rename to tee-worker/identity/core-primitives/enclave-api/src/enclave_base.rs diff --git a/tee-worker/core-primitives/enclave-api/src/enclave_test.rs b/tee-worker/identity/core-primitives/enclave-api/src/enclave_test.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/src/enclave_test.rs rename to tee-worker/identity/core-primitives/enclave-api/src/enclave_test.rs diff --git a/tee-worker/core-primitives/enclave-api/src/error.rs b/tee-worker/identity/core-primitives/enclave-api/src/error.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/src/error.rs rename to tee-worker/identity/core-primitives/enclave-api/src/error.rs diff --git a/tee-worker/core-primitives/enclave-api/src/lib.rs b/tee-worker/identity/core-primitives/enclave-api/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/src/lib.rs rename to tee-worker/identity/core-primitives/enclave-api/src/lib.rs diff --git a/tee-worker/core-primitives/enclave-api/src/remote_attestation.rs b/tee-worker/identity/core-primitives/enclave-api/src/remote_attestation.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/src/remote_attestation.rs rename to tee-worker/identity/core-primitives/enclave-api/src/remote_attestation.rs diff --git a/tee-worker/core-primitives/enclave-api/src/sidechain.rs b/tee-worker/identity/core-primitives/enclave-api/src/sidechain.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/src/sidechain.rs rename to tee-worker/identity/core-primitives/enclave-api/src/sidechain.rs diff --git a/tee-worker/core-primitives/enclave-api/src/utils.rs b/tee-worker/identity/core-primitives/enclave-api/src/utils.rs similarity index 100% rename from tee-worker/core-primitives/enclave-api/src/utils.rs rename to tee-worker/identity/core-primitives/enclave-api/src/utils.rs diff --git a/tee-worker/core-primitives/enclave-metrics/Cargo.toml b/tee-worker/identity/core-primitives/enclave-metrics/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/enclave-metrics/Cargo.toml rename to tee-worker/identity/core-primitives/enclave-metrics/Cargo.toml diff --git a/tee-worker/core-primitives/enclave-metrics/src/lib.rs b/tee-worker/identity/core-primitives/enclave-metrics/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/enclave-metrics/src/lib.rs rename to tee-worker/identity/core-primitives/enclave-metrics/src/lib.rs diff --git a/tee-worker/core-primitives/extrinsics-factory/Cargo.toml b/tee-worker/identity/core-primitives/extrinsics-factory/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/extrinsics-factory/Cargo.toml rename to tee-worker/identity/core-primitives/extrinsics-factory/Cargo.toml diff --git a/tee-worker/core-primitives/extrinsics-factory/src/error.rs b/tee-worker/identity/core-primitives/extrinsics-factory/src/error.rs similarity index 100% rename from tee-worker/core-primitives/extrinsics-factory/src/error.rs rename to tee-worker/identity/core-primitives/extrinsics-factory/src/error.rs diff --git a/tee-worker/core-primitives/extrinsics-factory/src/lib.rs b/tee-worker/identity/core-primitives/extrinsics-factory/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/extrinsics-factory/src/lib.rs rename to tee-worker/identity/core-primitives/extrinsics-factory/src/lib.rs diff --git a/tee-worker/core-primitives/extrinsics-factory/src/mock.rs b/tee-worker/identity/core-primitives/extrinsics-factory/src/mock.rs similarity index 100% rename from tee-worker/core-primitives/extrinsics-factory/src/mock.rs rename to tee-worker/identity/core-primitives/extrinsics-factory/src/mock.rs diff --git a/tee-worker/core-primitives/hashing/Cargo.toml b/tee-worker/identity/core-primitives/hashing/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/hashing/Cargo.toml rename to tee-worker/identity/core-primitives/hashing/Cargo.toml diff --git a/tee-worker/core-primitives/hashing/src/lib.rs b/tee-worker/identity/core-primitives/hashing/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/hashing/src/lib.rs rename to tee-worker/identity/core-primitives/hashing/src/lib.rs diff --git a/tee-worker/core-primitives/hashing/src/std_hash.rs b/tee-worker/identity/core-primitives/hashing/src/std_hash.rs similarity index 100% rename from tee-worker/core-primitives/hashing/src/std_hash.rs rename to tee-worker/identity/core-primitives/hashing/src/std_hash.rs diff --git a/tee-worker/core-primitives/import-queue/Cargo.toml b/tee-worker/identity/core-primitives/import-queue/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/import-queue/Cargo.toml rename to tee-worker/identity/core-primitives/import-queue/Cargo.toml diff --git a/tee-worker/core-primitives/import-queue/src/error.rs b/tee-worker/identity/core-primitives/import-queue/src/error.rs similarity index 100% rename from tee-worker/core-primitives/import-queue/src/error.rs rename to tee-worker/identity/core-primitives/import-queue/src/error.rs diff --git a/tee-worker/core-primitives/import-queue/src/import_queue.rs b/tee-worker/identity/core-primitives/import-queue/src/import_queue.rs similarity index 100% rename from tee-worker/core-primitives/import-queue/src/import_queue.rs rename to tee-worker/identity/core-primitives/import-queue/src/import_queue.rs diff --git a/tee-worker/core-primitives/import-queue/src/lib.rs b/tee-worker/identity/core-primitives/import-queue/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/import-queue/src/lib.rs rename to tee-worker/identity/core-primitives/import-queue/src/lib.rs diff --git a/tee-worker/core-primitives/networking-utils/Cargo.toml b/tee-worker/identity/core-primitives/networking-utils/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/networking-utils/Cargo.toml rename to tee-worker/identity/core-primitives/networking-utils/Cargo.toml diff --git a/tee-worker/core-primitives/networking-utils/src/lib.rs b/tee-worker/identity/core-primitives/networking-utils/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/networking-utils/src/lib.rs rename to tee-worker/identity/core-primitives/networking-utils/src/lib.rs diff --git a/tee-worker/core-primitives/networking-utils/src/ports.rs b/tee-worker/identity/core-primitives/networking-utils/src/ports.rs similarity index 100% rename from tee-worker/core-primitives/networking-utils/src/ports.rs rename to tee-worker/identity/core-primitives/networking-utils/src/ports.rs diff --git a/tee-worker/core-primitives/node-api/Cargo.toml b/tee-worker/identity/core-primitives/node-api/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/node-api/Cargo.toml rename to tee-worker/identity/core-primitives/node-api/Cargo.toml diff --git a/tee-worker/core-primitives/node-api/api-client-extensions/Cargo.toml b/tee-worker/identity/core-primitives/node-api/api-client-extensions/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/node-api/api-client-extensions/Cargo.toml rename to tee-worker/identity/core-primitives/node-api/api-client-extensions/Cargo.toml diff --git a/tee-worker/core-primitives/node-api/api-client-extensions/src/account.rs b/tee-worker/identity/core-primitives/node-api/api-client-extensions/src/account.rs similarity index 100% rename from tee-worker/core-primitives/node-api/api-client-extensions/src/account.rs rename to tee-worker/identity/core-primitives/node-api/api-client-extensions/src/account.rs diff --git a/tee-worker/core-primitives/node-api/api-client-extensions/src/chain.rs b/tee-worker/identity/core-primitives/node-api/api-client-extensions/src/chain.rs similarity index 100% rename from tee-worker/core-primitives/node-api/api-client-extensions/src/chain.rs rename to tee-worker/identity/core-primitives/node-api/api-client-extensions/src/chain.rs diff --git a/tee-worker/core-primitives/node-api/api-client-extensions/src/lib.rs b/tee-worker/identity/core-primitives/node-api/api-client-extensions/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/node-api/api-client-extensions/src/lib.rs rename to tee-worker/identity/core-primitives/node-api/api-client-extensions/src/lib.rs diff --git a/tee-worker/core-primitives/node-api/api-client-extensions/src/pallet_teebag.rs b/tee-worker/identity/core-primitives/node-api/api-client-extensions/src/pallet_teebag.rs similarity index 100% rename from tee-worker/core-primitives/node-api/api-client-extensions/src/pallet_teebag.rs rename to tee-worker/identity/core-primitives/node-api/api-client-extensions/src/pallet_teebag.rs diff --git a/tee-worker/core-primitives/node-api/api-client-types/Cargo.toml b/tee-worker/identity/core-primitives/node-api/api-client-types/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/node-api/api-client-types/Cargo.toml rename to tee-worker/identity/core-primitives/node-api/api-client-types/Cargo.toml diff --git a/tee-worker/core-primitives/node-api/api-client-types/src/lib.rs b/tee-worker/identity/core-primitives/node-api/api-client-types/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/node-api/api-client-types/src/lib.rs rename to tee-worker/identity/core-primitives/node-api/api-client-types/src/lib.rs diff --git a/tee-worker/core-primitives/node-api/factory/Cargo.toml b/tee-worker/identity/core-primitives/node-api/factory/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/node-api/factory/Cargo.toml rename to tee-worker/identity/core-primitives/node-api/factory/Cargo.toml diff --git a/tee-worker/core-primitives/node-api/factory/src/lib.rs b/tee-worker/identity/core-primitives/node-api/factory/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/node-api/factory/src/lib.rs rename to tee-worker/identity/core-primitives/node-api/factory/src/lib.rs diff --git a/tee-worker/core-primitives/node-api/metadata-provider/Cargo.toml b/tee-worker/identity/core-primitives/node-api/metadata-provider/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/node-api/metadata-provider/Cargo.toml rename to tee-worker/identity/core-primitives/node-api/metadata-provider/Cargo.toml diff --git a/tee-worker/core-primitives/node-api/metadata-provider/src/error.rs b/tee-worker/identity/core-primitives/node-api/metadata-provider/src/error.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata-provider/src/error.rs rename to tee-worker/identity/core-primitives/node-api/metadata-provider/src/error.rs diff --git a/tee-worker/core-primitives/node-api/metadata-provider/src/lib.rs b/tee-worker/identity/core-primitives/node-api/metadata-provider/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata-provider/src/lib.rs rename to tee-worker/identity/core-primitives/node-api/metadata-provider/src/lib.rs diff --git a/tee-worker/core-primitives/node-api/metadata/Cargo.toml b/tee-worker/identity/core-primitives/node-api/metadata/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/Cargo.toml rename to tee-worker/identity/core-primitives/node-api/metadata/Cargo.toml diff --git a/tee-worker/core-primitives/node-api/metadata/src/error.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/error.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/error.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/error.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/lib.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/lib.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/lib.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/metadata_mocks.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/metadata_mocks.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/metadata_mocks.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/metadata_mocks.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_balances.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_balances.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_balances.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_balances.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_evm_assertion.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_evm_assertion.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_evm_assertion.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_evm_assertion.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_imp.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_imp.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_imp.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_imp.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_proxy.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_proxy.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_proxy.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_proxy.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_sidechain.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_sidechain.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_sidechain.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_sidechain.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_system.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_system.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_system.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_system.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_teebag.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_teebag.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_teebag.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_teebag.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_timestamp.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_timestamp.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_timestamp.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_timestamp.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_utility.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_utility.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_utility.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_utility.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/pallet_vcmp.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/pallet_vcmp.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/pallet_vcmp.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/pallet_vcmp.rs diff --git a/tee-worker/core-primitives/node-api/metadata/src/runtime_call.rs b/tee-worker/identity/core-primitives/node-api/metadata/src/runtime_call.rs similarity index 100% rename from tee-worker/core-primitives/node-api/metadata/src/runtime_call.rs rename to tee-worker/identity/core-primitives/node-api/metadata/src/runtime_call.rs diff --git a/tee-worker/core-primitives/node-api/src/lib.rs b/tee-worker/identity/core-primitives/node-api/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/node-api/src/lib.rs rename to tee-worker/identity/core-primitives/node-api/src/lib.rs diff --git a/tee-worker/core-primitives/nonce-cache/Cargo.toml b/tee-worker/identity/core-primitives/nonce-cache/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/nonce-cache/Cargo.toml rename to tee-worker/identity/core-primitives/nonce-cache/Cargo.toml diff --git a/tee-worker/core-primitives/nonce-cache/src/error.rs b/tee-worker/identity/core-primitives/nonce-cache/src/error.rs similarity index 100% rename from tee-worker/core-primitives/nonce-cache/src/error.rs rename to tee-worker/identity/core-primitives/nonce-cache/src/error.rs diff --git a/tee-worker/core-primitives/nonce-cache/src/lib.rs b/tee-worker/identity/core-primitives/nonce-cache/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/nonce-cache/src/lib.rs rename to tee-worker/identity/core-primitives/nonce-cache/src/lib.rs diff --git a/tee-worker/core-primitives/nonce-cache/src/nonce_cache.rs b/tee-worker/identity/core-primitives/nonce-cache/src/nonce_cache.rs similarity index 100% rename from tee-worker/core-primitives/nonce-cache/src/nonce_cache.rs rename to tee-worker/identity/core-primitives/nonce-cache/src/nonce_cache.rs diff --git a/tee-worker/core-primitives/ocall-api/Cargo.toml b/tee-worker/identity/core-primitives/ocall-api/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/ocall-api/Cargo.toml rename to tee-worker/identity/core-primitives/ocall-api/Cargo.toml diff --git a/tee-worker/core-primitives/ocall-api/src/lib.rs b/tee-worker/identity/core-primitives/ocall-api/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/ocall-api/src/lib.rs rename to tee-worker/identity/core-primitives/ocall-api/src/lib.rs diff --git a/tee-worker/core-primitives/primitives-cache/Cargo.toml b/tee-worker/identity/core-primitives/primitives-cache/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/primitives-cache/Cargo.toml rename to tee-worker/identity/core-primitives/primitives-cache/Cargo.toml diff --git a/tee-worker/core-primitives/primitives-cache/src/error.rs b/tee-worker/identity/core-primitives/primitives-cache/src/error.rs similarity index 100% rename from tee-worker/core-primitives/primitives-cache/src/error.rs rename to tee-worker/identity/core-primitives/primitives-cache/src/error.rs diff --git a/tee-worker/core-primitives/primitives-cache/src/lib.rs b/tee-worker/identity/core-primitives/primitives-cache/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/primitives-cache/src/lib.rs rename to tee-worker/identity/core-primitives/primitives-cache/src/lib.rs diff --git a/tee-worker/core-primitives/primitives-cache/src/primitives_cache.rs b/tee-worker/identity/core-primitives/primitives-cache/src/primitives_cache.rs similarity index 100% rename from tee-worker/core-primitives/primitives-cache/src/primitives_cache.rs rename to tee-worker/identity/core-primitives/primitives-cache/src/primitives_cache.rs diff --git a/tee-worker/core-primitives/rpc/Cargo.toml b/tee-worker/identity/core-primitives/rpc/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/rpc/Cargo.toml rename to tee-worker/identity/core-primitives/rpc/Cargo.toml diff --git a/tee-worker/core-primitives/rpc/src/lib.rs b/tee-worker/identity/core-primitives/rpc/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/rpc/src/lib.rs rename to tee-worker/identity/core-primitives/rpc/src/lib.rs diff --git a/tee-worker/core-primitives/settings/Cargo.toml b/tee-worker/identity/core-primitives/settings/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/settings/Cargo.toml rename to tee-worker/identity/core-primitives/settings/Cargo.toml diff --git a/tee-worker/core-primitives/settings/src/lib.rs b/tee-worker/identity/core-primitives/settings/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/settings/src/lib.rs rename to tee-worker/identity/core-primitives/settings/src/lib.rs diff --git a/tee-worker/core-primitives/settings/src/worker_mode.rs b/tee-worker/identity/core-primitives/settings/src/worker_mode.rs similarity index 100% rename from tee-worker/core-primitives/settings/src/worker_mode.rs rename to tee-worker/identity/core-primitives/settings/src/worker_mode.rs diff --git a/tee-worker/core-primitives/sgx-runtime-primitives/Cargo.toml b/tee-worker/identity/core-primitives/sgx-runtime-primitives/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/sgx-runtime-primitives/Cargo.toml rename to tee-worker/identity/core-primitives/sgx-runtime-primitives/Cargo.toml diff --git a/tee-worker/core-primitives/sgx-runtime-primitives/src/constants.rs b/tee-worker/identity/core-primitives/sgx-runtime-primitives/src/constants.rs similarity index 100% rename from tee-worker/core-primitives/sgx-runtime-primitives/src/constants.rs rename to tee-worker/identity/core-primitives/sgx-runtime-primitives/src/constants.rs diff --git a/tee-worker/core-primitives/sgx-runtime-primitives/src/lib.rs b/tee-worker/identity/core-primitives/sgx-runtime-primitives/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/sgx-runtime-primitives/src/lib.rs rename to tee-worker/identity/core-primitives/sgx-runtime-primitives/src/lib.rs diff --git a/tee-worker/core-primitives/sgx-runtime-primitives/src/types.rs b/tee-worker/identity/core-primitives/sgx-runtime-primitives/src/types.rs similarity index 100% rename from tee-worker/core-primitives/sgx-runtime-primitives/src/types.rs rename to tee-worker/identity/core-primitives/sgx-runtime-primitives/src/types.rs diff --git a/tee-worker/core-primitives/sgx/crypto/Cargo.toml b/tee-worker/identity/core-primitives/sgx/crypto/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/Cargo.toml rename to tee-worker/identity/core-primitives/sgx/crypto/Cargo.toml diff --git a/tee-worker/core-primitives/sgx/crypto/src/aes.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/aes.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/aes.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/aes.rs diff --git a/tee-worker/core-primitives/sgx/crypto/src/ed25519.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/ed25519.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/ed25519.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/ed25519.rs diff --git a/tee-worker/core-primitives/sgx/crypto/src/ed25519_derivation.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/ed25519_derivation.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/ed25519_derivation.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/ed25519_derivation.rs diff --git a/tee-worker/core-primitives/sgx/crypto/src/error.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/error.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/error.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/error.rs diff --git a/tee-worker/core-primitives/sgx/crypto/src/key_repository.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/key_repository.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/key_repository.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/key_repository.rs diff --git a/tee-worker/core-primitives/sgx/crypto/src/lib.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/lib.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/lib.rs diff --git a/tee-worker/core-primitives/sgx/crypto/src/mocks.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/mocks.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/mocks.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/mocks.rs diff --git a/tee-worker/core-primitives/sgx/crypto/src/rsa3072.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/rsa3072.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/rsa3072.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/rsa3072.rs diff --git a/tee-worker/core-primitives/sgx/crypto/src/traits.rs b/tee-worker/identity/core-primitives/sgx/crypto/src/traits.rs similarity index 100% rename from tee-worker/core-primitives/sgx/crypto/src/traits.rs rename to tee-worker/identity/core-primitives/sgx/crypto/src/traits.rs diff --git a/tee-worker/core-primitives/sgx/io/Cargo.toml b/tee-worker/identity/core-primitives/sgx/io/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/sgx/io/Cargo.toml rename to tee-worker/identity/core-primitives/sgx/io/Cargo.toml diff --git a/tee-worker/core-primitives/sgx/io/src/lib.rs b/tee-worker/identity/core-primitives/sgx/io/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/sgx/io/src/lib.rs rename to tee-worker/identity/core-primitives/sgx/io/src/lib.rs diff --git a/tee-worker/core-primitives/sgx/temp-dir/Cargo.toml b/tee-worker/identity/core-primitives/sgx/temp-dir/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/sgx/temp-dir/Cargo.toml rename to tee-worker/identity/core-primitives/sgx/temp-dir/Cargo.toml diff --git a/tee-worker/core-primitives/sgx/temp-dir/src/lib.rs b/tee-worker/identity/core-primitives/sgx/temp-dir/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/sgx/temp-dir/src/lib.rs rename to tee-worker/identity/core-primitives/sgx/temp-dir/src/lib.rs diff --git a/tee-worker/core-primitives/sgx/temp-dir/src/test.rs b/tee-worker/identity/core-primitives/sgx/temp-dir/src/test.rs similarity index 100% rename from tee-worker/core-primitives/sgx/temp-dir/src/test.rs rename to tee-worker/identity/core-primitives/sgx/temp-dir/src/test.rs diff --git a/tee-worker/core-primitives/stf-executor/Cargo.toml b/tee-worker/identity/core-primitives/stf-executor/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/stf-executor/Cargo.toml rename to tee-worker/identity/core-primitives/stf-executor/Cargo.toml diff --git a/tee-worker/core-primitives/stf-executor/src/enclave_signer.rs b/tee-worker/identity/core-primitives/stf-executor/src/enclave_signer.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/enclave_signer.rs rename to tee-worker/identity/core-primitives/stf-executor/src/enclave_signer.rs diff --git a/tee-worker/core-primitives/stf-executor/src/error.rs b/tee-worker/identity/core-primitives/stf-executor/src/error.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/error.rs rename to tee-worker/identity/core-primitives/stf-executor/src/error.rs diff --git a/tee-worker/core-primitives/stf-executor/src/executor.rs b/tee-worker/identity/core-primitives/stf-executor/src/executor.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/executor.rs rename to tee-worker/identity/core-primitives/stf-executor/src/executor.rs diff --git a/tee-worker/core-primitives/stf-executor/src/executor_tests.rs b/tee-worker/identity/core-primitives/stf-executor/src/executor_tests.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/executor_tests.rs rename to tee-worker/identity/core-primitives/stf-executor/src/executor_tests.rs diff --git a/tee-worker/core-primitives/stf-executor/src/getter_executor.rs b/tee-worker/identity/core-primitives/stf-executor/src/getter_executor.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/getter_executor.rs rename to tee-worker/identity/core-primitives/stf-executor/src/getter_executor.rs diff --git a/tee-worker/core-primitives/stf-executor/src/lib.rs b/tee-worker/identity/core-primitives/stf-executor/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/lib.rs rename to tee-worker/identity/core-primitives/stf-executor/src/lib.rs diff --git a/tee-worker/core-primitives/stf-executor/src/mocks.rs b/tee-worker/identity/core-primitives/stf-executor/src/mocks.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/mocks.rs rename to tee-worker/identity/core-primitives/stf-executor/src/mocks.rs diff --git a/tee-worker/core-primitives/stf-executor/src/state_getter.rs b/tee-worker/identity/core-primitives/stf-executor/src/state_getter.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/state_getter.rs rename to tee-worker/identity/core-primitives/stf-executor/src/state_getter.rs diff --git a/tee-worker/core-primitives/stf-executor/src/traits.rs b/tee-worker/identity/core-primitives/stf-executor/src/traits.rs similarity index 100% rename from tee-worker/core-primitives/stf-executor/src/traits.rs rename to tee-worker/identity/core-primitives/stf-executor/src/traits.rs diff --git a/tee-worker/core-primitives/stf-interface/Cargo.toml b/tee-worker/identity/core-primitives/stf-interface/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/stf-interface/Cargo.toml rename to tee-worker/identity/core-primitives/stf-interface/Cargo.toml diff --git a/tee-worker/core-primitives/stf-interface/src/lib.rs b/tee-worker/identity/core-primitives/stf-interface/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/stf-interface/src/lib.rs rename to tee-worker/identity/core-primitives/stf-interface/src/lib.rs diff --git a/tee-worker/core-primitives/stf-interface/src/mocks.rs b/tee-worker/identity/core-primitives/stf-interface/src/mocks.rs similarity index 100% rename from tee-worker/core-primitives/stf-interface/src/mocks.rs rename to tee-worker/identity/core-primitives/stf-interface/src/mocks.rs diff --git a/tee-worker/core-primitives/stf-interface/src/parentchain_pallet.rs b/tee-worker/identity/core-primitives/stf-interface/src/parentchain_pallet.rs similarity index 100% rename from tee-worker/core-primitives/stf-interface/src/parentchain_pallet.rs rename to tee-worker/identity/core-primitives/stf-interface/src/parentchain_pallet.rs diff --git a/tee-worker/core-primitives/stf-interface/src/runtime_upgrade.rs b/tee-worker/identity/core-primitives/stf-interface/src/runtime_upgrade.rs similarity index 100% rename from tee-worker/core-primitives/stf-interface/src/runtime_upgrade.rs rename to tee-worker/identity/core-primitives/stf-interface/src/runtime_upgrade.rs diff --git a/tee-worker/core-primitives/stf-interface/src/sudo_pallet.rs b/tee-worker/identity/core-primitives/stf-interface/src/sudo_pallet.rs similarity index 100% rename from tee-worker/core-primitives/stf-interface/src/sudo_pallet.rs rename to tee-worker/identity/core-primitives/stf-interface/src/sudo_pallet.rs diff --git a/tee-worker/core-primitives/stf-interface/src/system_pallet.rs b/tee-worker/identity/core-primitives/stf-interface/src/system_pallet.rs similarity index 100% rename from tee-worker/core-primitives/stf-interface/src/system_pallet.rs rename to tee-worker/identity/core-primitives/stf-interface/src/system_pallet.rs diff --git a/tee-worker/core-primitives/stf-primitives/Cargo.toml b/tee-worker/identity/core-primitives/stf-primitives/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/stf-primitives/Cargo.toml rename to tee-worker/identity/core-primitives/stf-primitives/Cargo.toml diff --git a/tee-worker/core-primitives/stf-primitives/src/error.rs b/tee-worker/identity/core-primitives/stf-primitives/src/error.rs similarity index 100% rename from tee-worker/core-primitives/stf-primitives/src/error.rs rename to tee-worker/identity/core-primitives/stf-primitives/src/error.rs diff --git a/tee-worker/core-primitives/stf-primitives/src/lib.rs b/tee-worker/identity/core-primitives/stf-primitives/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/stf-primitives/src/lib.rs rename to tee-worker/identity/core-primitives/stf-primitives/src/lib.rs diff --git a/tee-worker/core-primitives/stf-primitives/src/traits.rs b/tee-worker/identity/core-primitives/stf-primitives/src/traits.rs similarity index 100% rename from tee-worker/core-primitives/stf-primitives/src/traits.rs rename to tee-worker/identity/core-primitives/stf-primitives/src/traits.rs diff --git a/tee-worker/core-primitives/stf-primitives/src/types.rs b/tee-worker/identity/core-primitives/stf-primitives/src/types.rs similarity index 100% rename from tee-worker/core-primitives/stf-primitives/src/types.rs rename to tee-worker/identity/core-primitives/stf-primitives/src/types.rs diff --git a/tee-worker/core-primitives/stf-state-handler/Cargo.toml b/tee-worker/identity/core-primitives/stf-state-handler/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/Cargo.toml rename to tee-worker/identity/core-primitives/stf-state-handler/Cargo.toml diff --git a/tee-worker/core-primitives/stf-state-handler/src/error.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/error.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/error.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/error.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/file_io.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/file_io.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/file_io.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/file_io.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/handle_state.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/handle_state.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/handle_state.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/handle_state.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/in_memory_state_file_io.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/in_memory_state_file_io.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/in_memory_state_file_io.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/in_memory_state_file_io.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/lib.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/lib.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/lib.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/query_shard_state.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/query_shard_state.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/query_shard_state.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/query_shard_state.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/state_handler.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/state_handler.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/state_handler.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/state_handler.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/state_initializer.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/state_initializer.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/state_initializer.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/state_initializer.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/state_snapshot_primitives.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/state_snapshot_primitives.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/state_snapshot_primitives.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/state_snapshot_primitives.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/state_snapshot_repository.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/state_snapshot_repository.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/state_snapshot_repository.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/state_snapshot_repository.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/state_snapshot_repository_loader.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/state_snapshot_repository_loader.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/state_snapshot_repository_loader.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/state_snapshot_repository_loader.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/test/mocks/initialize_state_mock.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/test/mocks/initialize_state_mock.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/test/mocks/initialize_state_mock.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/test/mocks/initialize_state_mock.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/test/mocks/mod.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/test/mocks/mod.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/test/mocks/mod.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/test/mocks/mod.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/test/mocks/state_key_repository_mock.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/test/mocks/state_key_repository_mock.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/test/mocks/state_key_repository_mock.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/test/mocks/state_key_repository_mock.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/test/mocks/versioned_state_access_mock.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/test/mocks/versioned_state_access_mock.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/test/mocks/versioned_state_access_mock.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/test/mocks/versioned_state_access_mock.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/test/mod.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/test/mod.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/test/mod.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/test/mod.rs diff --git a/tee-worker/core-primitives/stf-state-handler/src/test/sgx_tests.rs b/tee-worker/identity/core-primitives/stf-state-handler/src/test/sgx_tests.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-handler/src/test/sgx_tests.rs rename to tee-worker/identity/core-primitives/stf-state-handler/src/test/sgx_tests.rs diff --git a/tee-worker/core-primitives/stf-state-observer/Cargo.toml b/tee-worker/identity/core-primitives/stf-state-observer/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/stf-state-observer/Cargo.toml rename to tee-worker/identity/core-primitives/stf-state-observer/Cargo.toml diff --git a/tee-worker/core-primitives/stf-state-observer/src/error.rs b/tee-worker/identity/core-primitives/stf-state-observer/src/error.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-observer/src/error.rs rename to tee-worker/identity/core-primitives/stf-state-observer/src/error.rs diff --git a/tee-worker/core-primitives/stf-state-observer/src/lib.rs b/tee-worker/identity/core-primitives/stf-state-observer/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-observer/src/lib.rs rename to tee-worker/identity/core-primitives/stf-state-observer/src/lib.rs diff --git a/tee-worker/core-primitives/stf-state-observer/src/mock.rs b/tee-worker/identity/core-primitives/stf-state-observer/src/mock.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-observer/src/mock.rs rename to tee-worker/identity/core-primitives/stf-state-observer/src/mock.rs diff --git a/tee-worker/core-primitives/stf-state-observer/src/state_observer.rs b/tee-worker/identity/core-primitives/stf-state-observer/src/state_observer.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-observer/src/state_observer.rs rename to tee-worker/identity/core-primitives/stf-state-observer/src/state_observer.rs diff --git a/tee-worker/core-primitives/stf-state-observer/src/traits.rs b/tee-worker/identity/core-primitives/stf-state-observer/src/traits.rs similarity index 100% rename from tee-worker/core-primitives/stf-state-observer/src/traits.rs rename to tee-worker/identity/core-primitives/stf-state-observer/src/traits.rs diff --git a/tee-worker/core-primitives/storage/Cargo.toml b/tee-worker/identity/core-primitives/storage/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/storage/Cargo.toml rename to tee-worker/identity/core-primitives/storage/Cargo.toml diff --git a/tee-worker/core-primitives/storage/src/error.rs b/tee-worker/identity/core-primitives/storage/src/error.rs similarity index 100% rename from tee-worker/core-primitives/storage/src/error.rs rename to tee-worker/identity/core-primitives/storage/src/error.rs diff --git a/tee-worker/core-primitives/storage/src/keys.rs b/tee-worker/identity/core-primitives/storage/src/keys.rs similarity index 100% rename from tee-worker/core-primitives/storage/src/keys.rs rename to tee-worker/identity/core-primitives/storage/src/keys.rs diff --git a/tee-worker/core-primitives/storage/src/lib.rs b/tee-worker/identity/core-primitives/storage/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/storage/src/lib.rs rename to tee-worker/identity/core-primitives/storage/src/lib.rs diff --git a/tee-worker/core-primitives/storage/src/proof.rs b/tee-worker/identity/core-primitives/storage/src/proof.rs similarity index 100% rename from tee-worker/core-primitives/storage/src/proof.rs rename to tee-worker/identity/core-primitives/storage/src/proof.rs diff --git a/tee-worker/core-primitives/storage/src/verify_storage_proof.rs b/tee-worker/identity/core-primitives/storage/src/verify_storage_proof.rs similarity index 100% rename from tee-worker/core-primitives/storage/src/verify_storage_proof.rs rename to tee-worker/identity/core-primitives/storage/src/verify_storage_proof.rs diff --git a/tee-worker/core-primitives/substrate-sgx/environmental/Cargo.toml b/tee-worker/identity/core-primitives/substrate-sgx/environmental/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/environmental/Cargo.toml rename to tee-worker/identity/core-primitives/substrate-sgx/environmental/Cargo.toml diff --git a/tee-worker/core-primitives/substrate-sgx/environmental/src/lib.rs b/tee-worker/identity/core-primitives/substrate-sgx/environmental/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/environmental/src/lib.rs rename to tee-worker/identity/core-primitives/substrate-sgx/environmental/src/lib.rs diff --git a/tee-worker/core-primitives/substrate-sgx/externalities/Cargo.toml b/tee-worker/identity/core-primitives/substrate-sgx/externalities/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/externalities/Cargo.toml rename to tee-worker/identity/core-primitives/substrate-sgx/externalities/Cargo.toml diff --git a/tee-worker/core-primitives/substrate-sgx/externalities/src/bypass.rs b/tee-worker/identity/core-primitives/substrate-sgx/externalities/src/bypass.rs similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/externalities/src/bypass.rs rename to tee-worker/identity/core-primitives/substrate-sgx/externalities/src/bypass.rs diff --git a/tee-worker/core-primitives/substrate-sgx/externalities/src/codec_impl.rs b/tee-worker/identity/core-primitives/substrate-sgx/externalities/src/codec_impl.rs similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/externalities/src/codec_impl.rs rename to tee-worker/identity/core-primitives/substrate-sgx/externalities/src/codec_impl.rs diff --git a/tee-worker/core-primitives/substrate-sgx/externalities/src/lib.rs b/tee-worker/identity/core-primitives/substrate-sgx/externalities/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/externalities/src/lib.rs rename to tee-worker/identity/core-primitives/substrate-sgx/externalities/src/lib.rs diff --git a/tee-worker/core-primitives/substrate-sgx/externalities/src/scope_limited.rs b/tee-worker/identity/core-primitives/substrate-sgx/externalities/src/scope_limited.rs similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/externalities/src/scope_limited.rs rename to tee-worker/identity/core-primitives/substrate-sgx/externalities/src/scope_limited.rs diff --git a/tee-worker/core-primitives/substrate-sgx/externalities/src/vectorize.rs b/tee-worker/identity/core-primitives/substrate-sgx/externalities/src/vectorize.rs similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/externalities/src/vectorize.rs rename to tee-worker/identity/core-primitives/substrate-sgx/externalities/src/vectorize.rs diff --git a/tee-worker/core-primitives/substrate-sgx/sp-io/Cargo.toml b/tee-worker/identity/core-primitives/substrate-sgx/sp-io/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/sp-io/Cargo.toml rename to tee-worker/identity/core-primitives/substrate-sgx/sp-io/Cargo.toml diff --git a/tee-worker/core-primitives/substrate-sgx/sp-io/src/lib.rs b/tee-worker/identity/core-primitives/substrate-sgx/sp-io/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/substrate-sgx/sp-io/src/lib.rs rename to tee-worker/identity/core-primitives/substrate-sgx/sp-io/src/lib.rs diff --git a/tee-worker/core-primitives/test/Cargo.toml b/tee-worker/identity/core-primitives/test/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/test/Cargo.toml rename to tee-worker/identity/core-primitives/test/Cargo.toml diff --git a/tee-worker/core-primitives/test/src/lib.rs b/tee-worker/identity/core-primitives/test/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/test/src/lib.rs rename to tee-worker/identity/core-primitives/test/src/lib.rs diff --git a/tee-worker/core-primitives/test/src/mock/handle_state_mock.rs b/tee-worker/identity/core-primitives/test/src/mock/handle_state_mock.rs similarity index 100% rename from tee-worker/core-primitives/test/src/mock/handle_state_mock.rs rename to tee-worker/identity/core-primitives/test/src/mock/handle_state_mock.rs diff --git a/tee-worker/core-primitives/test/src/mock/metrics_ocall_mock.rs b/tee-worker/identity/core-primitives/test/src/mock/metrics_ocall_mock.rs similarity index 100% rename from tee-worker/core-primitives/test/src/mock/metrics_ocall_mock.rs rename to tee-worker/identity/core-primitives/test/src/mock/metrics_ocall_mock.rs diff --git a/tee-worker/core-primitives/test/src/mock/mod.rs b/tee-worker/identity/core-primitives/test/src/mock/mod.rs similarity index 100% rename from tee-worker/core-primitives/test/src/mock/mod.rs rename to tee-worker/identity/core-primitives/test/src/mock/mod.rs diff --git a/tee-worker/core-primitives/test/src/mock/onchain_mock.rs b/tee-worker/identity/core-primitives/test/src/mock/onchain_mock.rs similarity index 100% rename from tee-worker/core-primitives/test/src/mock/onchain_mock.rs rename to tee-worker/identity/core-primitives/test/src/mock/onchain_mock.rs diff --git a/tee-worker/core-primitives/test/src/mock/shielding_crypto_mock.rs b/tee-worker/identity/core-primitives/test/src/mock/shielding_crypto_mock.rs similarity index 100% rename from tee-worker/core-primitives/test/src/mock/shielding_crypto_mock.rs rename to tee-worker/identity/core-primitives/test/src/mock/shielding_crypto_mock.rs diff --git a/tee-worker/core-primitives/test/src/mock/sidechain_ocall_api_mock.rs b/tee-worker/identity/core-primitives/test/src/mock/sidechain_ocall_api_mock.rs similarity index 100% rename from tee-worker/core-primitives/test/src/mock/sidechain_ocall_api_mock.rs rename to tee-worker/identity/core-primitives/test/src/mock/sidechain_ocall_api_mock.rs diff --git a/tee-worker/core-primitives/test/src/mock/stf_mock.rs b/tee-worker/identity/core-primitives/test/src/mock/stf_mock.rs similarity index 100% rename from tee-worker/core-primitives/test/src/mock/stf_mock.rs rename to tee-worker/identity/core-primitives/test/src/mock/stf_mock.rs diff --git a/tee-worker/core-primitives/time-utils/Cargo.toml b/tee-worker/identity/core-primitives/time-utils/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/time-utils/Cargo.toml rename to tee-worker/identity/core-primitives/time-utils/Cargo.toml diff --git a/tee-worker/core-primitives/time-utils/src/lib.rs b/tee-worker/identity/core-primitives/time-utils/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/time-utils/src/lib.rs rename to tee-worker/identity/core-primitives/time-utils/src/lib.rs diff --git a/tee-worker/core-primitives/top-pool-author/Cargo.toml b/tee-worker/identity/core-primitives/top-pool-author/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/top-pool-author/Cargo.toml rename to tee-worker/identity/core-primitives/top-pool-author/Cargo.toml diff --git a/tee-worker/core-primitives/top-pool-author/src/api.rs b/tee-worker/identity/core-primitives/top-pool-author/src/api.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/api.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/api.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/author.rs b/tee-worker/identity/core-primitives/top-pool-author/src/author.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/author.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/author.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/author_tests.rs b/tee-worker/identity/core-primitives/top-pool-author/src/author_tests.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/author_tests.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/author_tests.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/client_error.rs b/tee-worker/identity/core-primitives/top-pool-author/src/client_error.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/client_error.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/client_error.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/error.rs b/tee-worker/identity/core-primitives/top-pool-author/src/error.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/error.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/error.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/lib.rs b/tee-worker/identity/core-primitives/top-pool-author/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/lib.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/lib.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/mocks.rs b/tee-worker/identity/core-primitives/top-pool-author/src/mocks.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/mocks.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/mocks.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/test_fixtures.rs b/tee-worker/identity/core-primitives/top-pool-author/src/test_fixtures.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/test_fixtures.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/test_fixtures.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/test_utils.rs b/tee-worker/identity/core-primitives/top-pool-author/src/test_utils.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/test_utils.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/test_utils.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/top_filter.rs b/tee-worker/identity/core-primitives/top-pool-author/src/top_filter.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/top_filter.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/top_filter.rs diff --git a/tee-worker/core-primitives/top-pool-author/src/traits.rs b/tee-worker/identity/core-primitives/top-pool-author/src/traits.rs similarity index 100% rename from tee-worker/core-primitives/top-pool-author/src/traits.rs rename to tee-worker/identity/core-primitives/top-pool-author/src/traits.rs diff --git a/tee-worker/core-primitives/top-pool/Cargo.toml b/tee-worker/identity/core-primitives/top-pool/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/top-pool/Cargo.toml rename to tee-worker/identity/core-primitives/top-pool/Cargo.toml diff --git a/tee-worker/core-primitives/top-pool/src/base_pool.rs b/tee-worker/identity/core-primitives/top-pool/src/base_pool.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/base_pool.rs rename to tee-worker/identity/core-primitives/top-pool/src/base_pool.rs diff --git a/tee-worker/core-primitives/top-pool/src/basic_pool.rs b/tee-worker/identity/core-primitives/top-pool/src/basic_pool.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/basic_pool.rs rename to tee-worker/identity/core-primitives/top-pool/src/basic_pool.rs diff --git a/tee-worker/core-primitives/top-pool/src/error.rs b/tee-worker/identity/core-primitives/top-pool/src/error.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/error.rs rename to tee-worker/identity/core-primitives/top-pool/src/error.rs diff --git a/tee-worker/core-primitives/top-pool/src/future.rs b/tee-worker/identity/core-primitives/top-pool/src/future.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/future.rs rename to tee-worker/identity/core-primitives/top-pool/src/future.rs diff --git a/tee-worker/core-primitives/top-pool/src/lib.rs b/tee-worker/identity/core-primitives/top-pool/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/lib.rs rename to tee-worker/identity/core-primitives/top-pool/src/lib.rs diff --git a/tee-worker/core-primitives/top-pool/src/listener.rs b/tee-worker/identity/core-primitives/top-pool/src/listener.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/listener.rs rename to tee-worker/identity/core-primitives/top-pool/src/listener.rs diff --git a/tee-worker/core-primitives/top-pool/src/mocks/mod.rs b/tee-worker/identity/core-primitives/top-pool/src/mocks/mod.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/mocks/mod.rs rename to tee-worker/identity/core-primitives/top-pool/src/mocks/mod.rs diff --git a/tee-worker/core-primitives/top-pool/src/mocks/rpc_responder_mock.rs b/tee-worker/identity/core-primitives/top-pool/src/mocks/rpc_responder_mock.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/mocks/rpc_responder_mock.rs rename to tee-worker/identity/core-primitives/top-pool/src/mocks/rpc_responder_mock.rs diff --git a/tee-worker/core-primitives/top-pool/src/mocks/trusted_operation_pool_mock.rs b/tee-worker/identity/core-primitives/top-pool/src/mocks/trusted_operation_pool_mock.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/mocks/trusted_operation_pool_mock.rs rename to tee-worker/identity/core-primitives/top-pool/src/mocks/trusted_operation_pool_mock.rs diff --git a/tee-worker/core-primitives/top-pool/src/pool.rs b/tee-worker/identity/core-primitives/top-pool/src/pool.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/pool.rs rename to tee-worker/identity/core-primitives/top-pool/src/pool.rs diff --git a/tee-worker/core-primitives/top-pool/src/primitives.rs b/tee-worker/identity/core-primitives/top-pool/src/primitives.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/primitives.rs rename to tee-worker/identity/core-primitives/top-pool/src/primitives.rs diff --git a/tee-worker/core-primitives/top-pool/src/ready.rs b/tee-worker/identity/core-primitives/top-pool/src/ready.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/ready.rs rename to tee-worker/identity/core-primitives/top-pool/src/ready.rs diff --git a/tee-worker/core-primitives/top-pool/src/rotator.rs b/tee-worker/identity/core-primitives/top-pool/src/rotator.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/rotator.rs rename to tee-worker/identity/core-primitives/top-pool/src/rotator.rs diff --git a/tee-worker/core-primitives/top-pool/src/tracked_map.rs b/tee-worker/identity/core-primitives/top-pool/src/tracked_map.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/tracked_map.rs rename to tee-worker/identity/core-primitives/top-pool/src/tracked_map.rs diff --git a/tee-worker/core-primitives/top-pool/src/validated_pool.rs b/tee-worker/identity/core-primitives/top-pool/src/validated_pool.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/validated_pool.rs rename to tee-worker/identity/core-primitives/top-pool/src/validated_pool.rs diff --git a/tee-worker/core-primitives/top-pool/src/watcher.rs b/tee-worker/identity/core-primitives/top-pool/src/watcher.rs similarity index 100% rename from tee-worker/core-primitives/top-pool/src/watcher.rs rename to tee-worker/identity/core-primitives/top-pool/src/watcher.rs diff --git a/tee-worker/core-primitives/types/Cargo.toml b/tee-worker/identity/core-primitives/types/Cargo.toml similarity index 100% rename from tee-worker/core-primitives/types/Cargo.toml rename to tee-worker/identity/core-primitives/types/Cargo.toml diff --git a/tee-worker/core-primitives/types/src/lib.rs b/tee-worker/identity/core-primitives/types/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/types/src/lib.rs rename to tee-worker/identity/core-primitives/types/src/lib.rs diff --git a/tee-worker/core-primitives/types/src/parentchain/events.rs b/tee-worker/identity/core-primitives/types/src/parentchain/events.rs similarity index 100% rename from tee-worker/core-primitives/types/src/parentchain/events.rs rename to tee-worker/identity/core-primitives/types/src/parentchain/events.rs diff --git a/tee-worker/core-primitives/types/src/parentchain/mod.rs b/tee-worker/identity/core-primitives/types/src/parentchain/mod.rs similarity index 100% rename from tee-worker/core-primitives/types/src/parentchain/mod.rs rename to tee-worker/identity/core-primitives/types/src/parentchain/mod.rs diff --git a/tee-worker/core-primitives/types/src/storage.rs b/tee-worker/identity/core-primitives/types/src/storage.rs similarity index 100% rename from tee-worker/core-primitives/types/src/storage.rs rename to tee-worker/identity/core-primitives/types/src/storage.rs diff --git a/bitacross-worker/core-primitives/utils/Cargo.toml b/tee-worker/identity/core-primitives/utils/Cargo.toml similarity index 86% rename from bitacross-worker/core-primitives/utils/Cargo.toml rename to tee-worker/identity/core-primitives/utils/Cargo.toml index 5815055393..5fb370797f 100644 --- a/bitacross-worker/core-primitives/utils/Cargo.toml +++ b/tee-worker/identity/core-primitives/utils/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } -litentry-hex-utils = { path = "../../../primitives/hex", default-features = false } +litentry-hex-utils = { path = "../../../../common/utils/hex", default-features = false } [features] default = ["std"] diff --git a/tee-worker/core-primitives/utils/src/buffer.rs b/tee-worker/identity/core-primitives/utils/src/buffer.rs similarity index 100% rename from tee-worker/core-primitives/utils/src/buffer.rs rename to tee-worker/identity/core-primitives/utils/src/buffer.rs diff --git a/tee-worker/core-primitives/utils/src/error.rs b/tee-worker/identity/core-primitives/utils/src/error.rs similarity index 100% rename from tee-worker/core-primitives/utils/src/error.rs rename to tee-worker/identity/core-primitives/utils/src/error.rs diff --git a/tee-worker/core-primitives/utils/src/hex.rs b/tee-worker/identity/core-primitives/utils/src/hex.rs similarity index 100% rename from tee-worker/core-primitives/utils/src/hex.rs rename to tee-worker/identity/core-primitives/utils/src/hex.rs diff --git a/tee-worker/core-primitives/utils/src/hex_display.rs b/tee-worker/identity/core-primitives/utils/src/hex_display.rs similarity index 100% rename from tee-worker/core-primitives/utils/src/hex_display.rs rename to tee-worker/identity/core-primitives/utils/src/hex_display.rs diff --git a/tee-worker/core-primitives/utils/src/lib.rs b/tee-worker/identity/core-primitives/utils/src/lib.rs similarity index 100% rename from tee-worker/core-primitives/utils/src/lib.rs rename to tee-worker/identity/core-primitives/utils/src/lib.rs diff --git a/tee-worker/core-primitives/utils/src/stringify.rs b/tee-worker/identity/core-primitives/utils/src/stringify.rs similarity index 100% rename from tee-worker/core-primitives/utils/src/stringify.rs rename to tee-worker/identity/core-primitives/utils/src/stringify.rs diff --git a/tee-worker/core/direct-rpc-client/Cargo.toml b/tee-worker/identity/core/direct-rpc-client/Cargo.toml similarity index 100% rename from tee-worker/core/direct-rpc-client/Cargo.toml rename to tee-worker/identity/core/direct-rpc-client/Cargo.toml diff --git a/tee-worker/core/direct-rpc-client/src/lib.rs b/tee-worker/identity/core/direct-rpc-client/src/lib.rs similarity index 100% rename from tee-worker/core/direct-rpc-client/src/lib.rs rename to tee-worker/identity/core/direct-rpc-client/src/lib.rs diff --git a/tee-worker/core/direct-rpc-server/Cargo.toml b/tee-worker/identity/core/direct-rpc-server/Cargo.toml similarity index 100% rename from tee-worker/core/direct-rpc-server/Cargo.toml rename to tee-worker/identity/core/direct-rpc-server/Cargo.toml diff --git a/tee-worker/core/direct-rpc-server/src/builders/mod.rs b/tee-worker/identity/core/direct-rpc-server/src/builders/mod.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/builders/mod.rs rename to tee-worker/identity/core/direct-rpc-server/src/builders/mod.rs diff --git a/tee-worker/core/direct-rpc-server/src/builders/rpc_response_builder.rs b/tee-worker/identity/core/direct-rpc-server/src/builders/rpc_response_builder.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/builders/rpc_response_builder.rs rename to tee-worker/identity/core/direct-rpc-server/src/builders/rpc_response_builder.rs diff --git a/tee-worker/core/direct-rpc-server/src/builders/rpc_return_value_builder.rs b/tee-worker/identity/core/direct-rpc-server/src/builders/rpc_return_value_builder.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/builders/rpc_return_value_builder.rs rename to tee-worker/identity/core/direct-rpc-server/src/builders/rpc_return_value_builder.rs diff --git a/tee-worker/core/direct-rpc-server/src/lib.rs b/tee-worker/identity/core/direct-rpc-server/src/lib.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/lib.rs rename to tee-worker/identity/core/direct-rpc-server/src/lib.rs diff --git a/tee-worker/core/direct-rpc-server/src/mocks/determine_watch_mock.rs b/tee-worker/identity/core/direct-rpc-server/src/mocks/determine_watch_mock.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/mocks/determine_watch_mock.rs rename to tee-worker/identity/core/direct-rpc-server/src/mocks/determine_watch_mock.rs diff --git a/tee-worker/core/direct-rpc-server/src/mocks/mod.rs b/tee-worker/identity/core/direct-rpc-server/src/mocks/mod.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/mocks/mod.rs rename to tee-worker/identity/core/direct-rpc-server/src/mocks/mod.rs diff --git a/tee-worker/core/direct-rpc-server/src/mocks/response_channel_mock.rs b/tee-worker/identity/core/direct-rpc-server/src/mocks/response_channel_mock.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/mocks/response_channel_mock.rs rename to tee-worker/identity/core/direct-rpc-server/src/mocks/response_channel_mock.rs diff --git a/tee-worker/core/direct-rpc-server/src/mocks/send_rpc_response_mock.rs b/tee-worker/identity/core/direct-rpc-server/src/mocks/send_rpc_response_mock.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/mocks/send_rpc_response_mock.rs rename to tee-worker/identity/core/direct-rpc-server/src/mocks/send_rpc_response_mock.rs diff --git a/tee-worker/core/direct-rpc-server/src/response_channel.rs b/tee-worker/identity/core/direct-rpc-server/src/response_channel.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/response_channel.rs rename to tee-worker/identity/core/direct-rpc-server/src/response_channel.rs diff --git a/tee-worker/core/direct-rpc-server/src/rpc_connection_registry.rs b/tee-worker/identity/core/direct-rpc-server/src/rpc_connection_registry.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/rpc_connection_registry.rs rename to tee-worker/identity/core/direct-rpc-server/src/rpc_connection_registry.rs diff --git a/tee-worker/core/direct-rpc-server/src/rpc_responder.rs b/tee-worker/identity/core/direct-rpc-server/src/rpc_responder.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/rpc_responder.rs rename to tee-worker/identity/core/direct-rpc-server/src/rpc_responder.rs diff --git a/tee-worker/core/direct-rpc-server/src/rpc_watch_extractor.rs b/tee-worker/identity/core/direct-rpc-server/src/rpc_watch_extractor.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/rpc_watch_extractor.rs rename to tee-worker/identity/core/direct-rpc-server/src/rpc_watch_extractor.rs diff --git a/tee-worker/core/direct-rpc-server/src/rpc_ws_handler.rs b/tee-worker/identity/core/direct-rpc-server/src/rpc_ws_handler.rs similarity index 100% rename from tee-worker/core/direct-rpc-server/src/rpc_ws_handler.rs rename to tee-worker/identity/core/direct-rpc-server/src/rpc_ws_handler.rs diff --git a/tee-worker/core/offchain-worker-executor/Cargo.toml b/tee-worker/identity/core/offchain-worker-executor/Cargo.toml similarity index 100% rename from tee-worker/core/offchain-worker-executor/Cargo.toml rename to tee-worker/identity/core/offchain-worker-executor/Cargo.toml diff --git a/tee-worker/core/offchain-worker-executor/src/error.rs b/tee-worker/identity/core/offchain-worker-executor/src/error.rs similarity index 100% rename from tee-worker/core/offchain-worker-executor/src/error.rs rename to tee-worker/identity/core/offchain-worker-executor/src/error.rs diff --git a/tee-worker/core/offchain-worker-executor/src/executor.rs b/tee-worker/identity/core/offchain-worker-executor/src/executor.rs similarity index 100% rename from tee-worker/core/offchain-worker-executor/src/executor.rs rename to tee-worker/identity/core/offchain-worker-executor/src/executor.rs diff --git a/tee-worker/core/offchain-worker-executor/src/lib.rs b/tee-worker/identity/core/offchain-worker-executor/src/lib.rs similarity index 100% rename from tee-worker/core/offchain-worker-executor/src/lib.rs rename to tee-worker/identity/core/offchain-worker-executor/src/lib.rs diff --git a/tee-worker/core/parentchain/block-import-dispatcher/Cargo.toml b/tee-worker/identity/core/parentchain/block-import-dispatcher/Cargo.toml similarity index 100% rename from tee-worker/core/parentchain/block-import-dispatcher/Cargo.toml rename to tee-worker/identity/core/parentchain/block-import-dispatcher/Cargo.toml diff --git a/tee-worker/core/parentchain/block-import-dispatcher/src/error.rs b/tee-worker/identity/core/parentchain/block-import-dispatcher/src/error.rs similarity index 100% rename from tee-worker/core/parentchain/block-import-dispatcher/src/error.rs rename to tee-worker/identity/core/parentchain/block-import-dispatcher/src/error.rs diff --git a/tee-worker/core/parentchain/block-import-dispatcher/src/immediate_dispatcher.rs b/tee-worker/identity/core/parentchain/block-import-dispatcher/src/immediate_dispatcher.rs similarity index 100% rename from tee-worker/core/parentchain/block-import-dispatcher/src/immediate_dispatcher.rs rename to tee-worker/identity/core/parentchain/block-import-dispatcher/src/immediate_dispatcher.rs diff --git a/tee-worker/core/parentchain/block-import-dispatcher/src/lib.rs b/tee-worker/identity/core/parentchain/block-import-dispatcher/src/lib.rs similarity index 100% rename from tee-worker/core/parentchain/block-import-dispatcher/src/lib.rs rename to tee-worker/identity/core/parentchain/block-import-dispatcher/src/lib.rs diff --git a/tee-worker/core/parentchain/block-import-dispatcher/src/trigger_parentchain_block_import_mock.rs b/tee-worker/identity/core/parentchain/block-import-dispatcher/src/trigger_parentchain_block_import_mock.rs similarity index 100% rename from tee-worker/core/parentchain/block-import-dispatcher/src/trigger_parentchain_block_import_mock.rs rename to tee-worker/identity/core/parentchain/block-import-dispatcher/src/trigger_parentchain_block_import_mock.rs diff --git a/tee-worker/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs b/tee-worker/identity/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs similarity index 100% rename from tee-worker/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs rename to tee-worker/identity/core/parentchain/block-import-dispatcher/src/triggered_dispatcher.rs diff --git a/tee-worker/core/parentchain/block-importer/Cargo.toml b/tee-worker/identity/core/parentchain/block-importer/Cargo.toml similarity index 100% rename from tee-worker/core/parentchain/block-importer/Cargo.toml rename to tee-worker/identity/core/parentchain/block-importer/Cargo.toml diff --git a/tee-worker/core/parentchain/block-importer/src/block_importer.rs b/tee-worker/identity/core/parentchain/block-importer/src/block_importer.rs similarity index 100% rename from tee-worker/core/parentchain/block-importer/src/block_importer.rs rename to tee-worker/identity/core/parentchain/block-importer/src/block_importer.rs diff --git a/tee-worker/core/parentchain/block-importer/src/block_importer_mock.rs b/tee-worker/identity/core/parentchain/block-importer/src/block_importer_mock.rs similarity index 100% rename from tee-worker/core/parentchain/block-importer/src/block_importer_mock.rs rename to tee-worker/identity/core/parentchain/block-importer/src/block_importer_mock.rs diff --git a/tee-worker/core/parentchain/block-importer/src/error.rs b/tee-worker/identity/core/parentchain/block-importer/src/error.rs similarity index 100% rename from tee-worker/core/parentchain/block-importer/src/error.rs rename to tee-worker/identity/core/parentchain/block-importer/src/error.rs diff --git a/tee-worker/core/parentchain/block-importer/src/lib.rs b/tee-worker/identity/core/parentchain/block-importer/src/lib.rs similarity index 100% rename from tee-worker/core/parentchain/block-importer/src/lib.rs rename to tee-worker/identity/core/parentchain/block-importer/src/lib.rs diff --git a/tee-worker/core/parentchain/indirect-calls-executor/Cargo.toml b/tee-worker/identity/core/parentchain/indirect-calls-executor/Cargo.toml similarity index 100% rename from tee-worker/core/parentchain/indirect-calls-executor/Cargo.toml rename to tee-worker/identity/core/parentchain/indirect-calls-executor/Cargo.toml diff --git a/tee-worker/core/parentchain/indirect-calls-executor/src/error.rs b/tee-worker/identity/core/parentchain/indirect-calls-executor/src/error.rs similarity index 100% rename from tee-worker/core/parentchain/indirect-calls-executor/src/error.rs rename to tee-worker/identity/core/parentchain/indirect-calls-executor/src/error.rs diff --git a/tee-worker/core/parentchain/indirect-calls-executor/src/event_filter.rs b/tee-worker/identity/core/parentchain/indirect-calls-executor/src/event_filter.rs similarity index 100% rename from tee-worker/core/parentchain/indirect-calls-executor/src/event_filter.rs rename to tee-worker/identity/core/parentchain/indirect-calls-executor/src/event_filter.rs diff --git a/tee-worker/core/parentchain/indirect-calls-executor/src/executor.rs b/tee-worker/identity/core/parentchain/indirect-calls-executor/src/executor.rs similarity index 100% rename from tee-worker/core/parentchain/indirect-calls-executor/src/executor.rs rename to tee-worker/identity/core/parentchain/indirect-calls-executor/src/executor.rs diff --git a/tee-worker/core/parentchain/indirect-calls-executor/src/filter_metadata.rs b/tee-worker/identity/core/parentchain/indirect-calls-executor/src/filter_metadata.rs similarity index 100% rename from tee-worker/core/parentchain/indirect-calls-executor/src/filter_metadata.rs rename to tee-worker/identity/core/parentchain/indirect-calls-executor/src/filter_metadata.rs diff --git a/tee-worker/core/parentchain/indirect-calls-executor/src/lib.rs b/tee-worker/identity/core/parentchain/indirect-calls-executor/src/lib.rs similarity index 100% rename from tee-worker/core/parentchain/indirect-calls-executor/src/lib.rs rename to tee-worker/identity/core/parentchain/indirect-calls-executor/src/lib.rs diff --git a/tee-worker/core/parentchain/indirect-calls-executor/src/mock.rs b/tee-worker/identity/core/parentchain/indirect-calls-executor/src/mock.rs similarity index 100% rename from tee-worker/core/parentchain/indirect-calls-executor/src/mock.rs rename to tee-worker/identity/core/parentchain/indirect-calls-executor/src/mock.rs diff --git a/tee-worker/core/parentchain/indirect-calls-executor/src/traits.rs b/tee-worker/identity/core/parentchain/indirect-calls-executor/src/traits.rs similarity index 100% rename from tee-worker/core/parentchain/indirect-calls-executor/src/traits.rs rename to tee-worker/identity/core/parentchain/indirect-calls-executor/src/traits.rs diff --git a/tee-worker/core/parentchain/light-client/Cargo.toml b/tee-worker/identity/core/parentchain/light-client/Cargo.toml similarity index 100% rename from tee-worker/core/parentchain/light-client/Cargo.toml rename to tee-worker/identity/core/parentchain/light-client/Cargo.toml diff --git a/tee-worker/core/parentchain/light-client/src/concurrent_access.rs b/tee-worker/identity/core/parentchain/light-client/src/concurrent_access.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/concurrent_access.rs rename to tee-worker/identity/core/parentchain/light-client/src/concurrent_access.rs diff --git a/tee-worker/core/parentchain/light-client/src/error.rs b/tee-worker/identity/core/parentchain/light-client/src/error.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/error.rs rename to tee-worker/identity/core/parentchain/light-client/src/error.rs diff --git a/tee-worker/core/parentchain/light-client/src/finality.rs b/tee-worker/identity/core/parentchain/light-client/src/finality.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/finality.rs rename to tee-worker/identity/core/parentchain/light-client/src/finality.rs diff --git a/tee-worker/core/parentchain/light-client/src/io.rs b/tee-worker/identity/core/parentchain/light-client/src/io.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/io.rs rename to tee-worker/identity/core/parentchain/light-client/src/io.rs diff --git a/tee-worker/core/parentchain/light-client/src/justification.rs b/tee-worker/identity/core/parentchain/light-client/src/justification.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/justification.rs rename to tee-worker/identity/core/parentchain/light-client/src/justification.rs diff --git a/tee-worker/core/parentchain/light-client/src/lib.rs b/tee-worker/identity/core/parentchain/light-client/src/lib.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/lib.rs rename to tee-worker/identity/core/parentchain/light-client/src/lib.rs diff --git a/tee-worker/core/parentchain/light-client/src/light_client_init_params.rs b/tee-worker/identity/core/parentchain/light-client/src/light_client_init_params.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/light_client_init_params.rs rename to tee-worker/identity/core/parentchain/light-client/src/light_client_init_params.rs diff --git a/tee-worker/core/parentchain/light-client/src/light_validation.rs b/tee-worker/identity/core/parentchain/light-client/src/light_validation.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/light_validation.rs rename to tee-worker/identity/core/parentchain/light-client/src/light_validation.rs diff --git a/tee-worker/core/parentchain/light-client/src/light_validation_state.rs b/tee-worker/identity/core/parentchain/light-client/src/light_validation_state.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/light_validation_state.rs rename to tee-worker/identity/core/parentchain/light-client/src/light_validation_state.rs diff --git a/tee-worker/core/parentchain/light-client/src/mocks/mod.rs b/tee-worker/identity/core/parentchain/light-client/src/mocks/mod.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/mocks/mod.rs rename to tee-worker/identity/core/parentchain/light-client/src/mocks/mod.rs diff --git a/tee-worker/core/parentchain/light-client/src/mocks/validator_access_mock.rs b/tee-worker/identity/core/parentchain/light-client/src/mocks/validator_access_mock.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/mocks/validator_access_mock.rs rename to tee-worker/identity/core/parentchain/light-client/src/mocks/validator_access_mock.rs diff --git a/tee-worker/core/parentchain/light-client/src/mocks/validator_mock.rs b/tee-worker/identity/core/parentchain/light-client/src/mocks/validator_mock.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/mocks/validator_mock.rs rename to tee-worker/identity/core/parentchain/light-client/src/mocks/validator_mock.rs diff --git a/tee-worker/core/parentchain/light-client/src/mocks/validator_mock_seal.rs b/tee-worker/identity/core/parentchain/light-client/src/mocks/validator_mock_seal.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/mocks/validator_mock_seal.rs rename to tee-worker/identity/core/parentchain/light-client/src/mocks/validator_mock_seal.rs diff --git a/tee-worker/core/parentchain/light-client/src/state.rs b/tee-worker/identity/core/parentchain/light-client/src/state.rs similarity index 100% rename from tee-worker/core/parentchain/light-client/src/state.rs rename to tee-worker/identity/core/parentchain/light-client/src/state.rs diff --git a/tee-worker/core/parentchain/parentchain-crate/Cargo.toml b/tee-worker/identity/core/parentchain/parentchain-crate/Cargo.toml similarity index 100% rename from tee-worker/core/parentchain/parentchain-crate/Cargo.toml rename to tee-worker/identity/core/parentchain/parentchain-crate/Cargo.toml diff --git a/tee-worker/core/parentchain/parentchain-crate/src/lib.rs b/tee-worker/identity/core/parentchain/parentchain-crate/src/lib.rs similarity index 100% rename from tee-worker/core/parentchain/parentchain-crate/src/lib.rs rename to tee-worker/identity/core/parentchain/parentchain-crate/src/lib.rs diff --git a/tee-worker/core/parentchain/parentchain-crate/src/primitives.rs b/tee-worker/identity/core/parentchain/parentchain-crate/src/primitives.rs similarity index 100% rename from tee-worker/core/parentchain/parentchain-crate/src/primitives.rs rename to tee-worker/identity/core/parentchain/parentchain-crate/src/primitives.rs diff --git a/tee-worker/core/parentchain/test/Cargo.toml b/tee-worker/identity/core/parentchain/test/Cargo.toml similarity index 100% rename from tee-worker/core/parentchain/test/Cargo.toml rename to tee-worker/identity/core/parentchain/test/Cargo.toml diff --git a/tee-worker/core/parentchain/test/src/lib.rs b/tee-worker/identity/core/parentchain/test/src/lib.rs similarity index 100% rename from tee-worker/core/parentchain/test/src/lib.rs rename to tee-worker/identity/core/parentchain/test/src/lib.rs diff --git a/tee-worker/core/parentchain/test/src/parentchain_block_builder.rs b/tee-worker/identity/core/parentchain/test/src/parentchain_block_builder.rs similarity index 100% rename from tee-worker/core/parentchain/test/src/parentchain_block_builder.rs rename to tee-worker/identity/core/parentchain/test/src/parentchain_block_builder.rs diff --git a/tee-worker/core/parentchain/test/src/parentchain_header_builder.rs b/tee-worker/identity/core/parentchain/test/src/parentchain_header_builder.rs similarity index 100% rename from tee-worker/core/parentchain/test/src/parentchain_header_builder.rs rename to tee-worker/identity/core/parentchain/test/src/parentchain_header_builder.rs diff --git a/tee-worker/core/peer-top-broadcaster/Cargo.toml b/tee-worker/identity/core/peer-top-broadcaster/Cargo.toml similarity index 100% rename from tee-worker/core/peer-top-broadcaster/Cargo.toml rename to tee-worker/identity/core/peer-top-broadcaster/Cargo.toml diff --git a/tee-worker/core/peer-top-broadcaster/src/lib.rs b/tee-worker/identity/core/peer-top-broadcaster/src/lib.rs similarity index 100% rename from tee-worker/core/peer-top-broadcaster/src/lib.rs rename to tee-worker/identity/core/peer-top-broadcaster/src/lib.rs diff --git a/tee-worker/core/rest-client/Cargo.toml b/tee-worker/identity/core/rest-client/Cargo.toml similarity index 100% rename from tee-worker/core/rest-client/Cargo.toml rename to tee-worker/identity/core/rest-client/Cargo.toml diff --git a/tee-worker/core/rest-client/src/error.rs b/tee-worker/identity/core/rest-client/src/error.rs similarity index 100% rename from tee-worker/core/rest-client/src/error.rs rename to tee-worker/identity/core/rest-client/src/error.rs diff --git a/tee-worker/core/rest-client/src/fixtures/amazon_root_ca_1_v3.pem b/tee-worker/identity/core/rest-client/src/fixtures/amazon_root_ca_1_v3.pem similarity index 100% rename from tee-worker/core/rest-client/src/fixtures/amazon_root_ca_1_v3.pem rename to tee-worker/identity/core/rest-client/src/fixtures/amazon_root_ca_1_v3.pem diff --git a/tee-worker/core/rest-client/src/fixtures/baltimore_cyber_trust_root_v3.pem b/tee-worker/identity/core/rest-client/src/fixtures/baltimore_cyber_trust_root_v3.pem similarity index 100% rename from tee-worker/core/rest-client/src/fixtures/baltimore_cyber_trust_root_v3.pem rename to tee-worker/identity/core/rest-client/src/fixtures/baltimore_cyber_trust_root_v3.pem diff --git a/tee-worker/core/rest-client/src/fixtures/lets_encrypt_root_cert.pem b/tee-worker/identity/core/rest-client/src/fixtures/lets_encrypt_root_cert.pem similarity index 100% rename from tee-worker/core/rest-client/src/fixtures/lets_encrypt_root_cert.pem rename to tee-worker/identity/core/rest-client/src/fixtures/lets_encrypt_root_cert.pem diff --git a/tee-worker/core/rest-client/src/http_client.rs b/tee-worker/identity/core/rest-client/src/http_client.rs similarity index 100% rename from tee-worker/core/rest-client/src/http_client.rs rename to tee-worker/identity/core/rest-client/src/http_client.rs diff --git a/tee-worker/core/rest-client/src/lib.rs b/tee-worker/identity/core/rest-client/src/lib.rs similarity index 100% rename from tee-worker/core/rest-client/src/lib.rs rename to tee-worker/identity/core/rest-client/src/lib.rs diff --git a/tee-worker/core/rest-client/src/mocks/http_client_mock.rs b/tee-worker/identity/core/rest-client/src/mocks/http_client_mock.rs similarity index 100% rename from tee-worker/core/rest-client/src/mocks/http_client_mock.rs rename to tee-worker/identity/core/rest-client/src/mocks/http_client_mock.rs diff --git a/tee-worker/core/rest-client/src/mocks/mod.rs b/tee-worker/identity/core/rest-client/src/mocks/mod.rs similarity index 100% rename from tee-worker/core/rest-client/src/mocks/mod.rs rename to tee-worker/identity/core/rest-client/src/mocks/mod.rs diff --git a/tee-worker/core/rest-client/src/rest_client.rs b/tee-worker/identity/core/rest-client/src/rest_client.rs similarity index 100% rename from tee-worker/core/rest-client/src/rest_client.rs rename to tee-worker/identity/core/rest-client/src/rest_client.rs diff --git a/tee-worker/core/rpc-client/Cargo.toml b/tee-worker/identity/core/rpc-client/Cargo.toml similarity index 100% rename from tee-worker/core/rpc-client/Cargo.toml rename to tee-worker/identity/core/rpc-client/Cargo.toml diff --git a/tee-worker/core/rpc-client/src/direct_client.rs b/tee-worker/identity/core/rpc-client/src/direct_client.rs similarity index 100% rename from tee-worker/core/rpc-client/src/direct_client.rs rename to tee-worker/identity/core/rpc-client/src/direct_client.rs diff --git a/tee-worker/core/rpc-client/src/error.rs b/tee-worker/identity/core/rpc-client/src/error.rs similarity index 100% rename from tee-worker/core/rpc-client/src/error.rs rename to tee-worker/identity/core/rpc-client/src/error.rs diff --git a/tee-worker/core/rpc-client/src/lib.rs b/tee-worker/identity/core/rpc-client/src/lib.rs similarity index 100% rename from tee-worker/core/rpc-client/src/lib.rs rename to tee-worker/identity/core/rpc-client/src/lib.rs diff --git a/tee-worker/core/rpc-client/src/mock.rs b/tee-worker/identity/core/rpc-client/src/mock.rs similarity index 100% rename from tee-worker/core/rpc-client/src/mock.rs rename to tee-worker/identity/core/rpc-client/src/mock.rs diff --git a/tee-worker/core/rpc-client/src/ws_client.rs b/tee-worker/identity/core/rpc-client/src/ws_client.rs similarity index 100% rename from tee-worker/core/rpc-client/src/ws_client.rs rename to tee-worker/identity/core/rpc-client/src/ws_client.rs diff --git a/tee-worker/core/rpc-server/Cargo.toml b/tee-worker/identity/core/rpc-server/Cargo.toml similarity index 100% rename from tee-worker/core/rpc-server/Cargo.toml rename to tee-worker/identity/core/rpc-server/Cargo.toml diff --git a/tee-worker/core/rpc-server/src/lib.rs b/tee-worker/identity/core/rpc-server/src/lib.rs similarity index 100% rename from tee-worker/core/rpc-server/src/lib.rs rename to tee-worker/identity/core/rpc-server/src/lib.rs diff --git a/tee-worker/core/tls-websocket-server/Cargo.toml b/tee-worker/identity/core/tls-websocket-server/Cargo.toml similarity index 100% rename from tee-worker/core/tls-websocket-server/Cargo.toml rename to tee-worker/identity/core/tls-websocket-server/Cargo.toml diff --git a/tee-worker/core/tls-websocket-server/src/certificate_generation.rs b/tee-worker/identity/core/tls-websocket-server/src/certificate_generation.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/certificate_generation.rs rename to tee-worker/identity/core/tls-websocket-server/src/certificate_generation.rs diff --git a/tee-worker/core/tls-websocket-server/src/config_provider.rs b/tee-worker/identity/core/tls-websocket-server/src/config_provider.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/config_provider.rs rename to tee-worker/identity/core/tls-websocket-server/src/config_provider.rs diff --git a/tee-worker/core/tls-websocket-server/src/connection.rs b/tee-worker/identity/core/tls-websocket-server/src/connection.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/connection.rs rename to tee-worker/identity/core/tls-websocket-server/src/connection.rs diff --git a/tee-worker/core/tls-websocket-server/src/connection_id_generator.rs b/tee-worker/identity/core/tls-websocket-server/src/connection_id_generator.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/connection_id_generator.rs rename to tee-worker/identity/core/tls-websocket-server/src/connection_id_generator.rs diff --git a/tee-worker/core/tls-websocket-server/src/error.rs b/tee-worker/identity/core/tls-websocket-server/src/error.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/error.rs rename to tee-worker/identity/core/tls-websocket-server/src/error.rs diff --git a/tee-worker/core/tls-websocket-server/src/lib.rs b/tee-worker/identity/core/tls-websocket-server/src/lib.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/lib.rs rename to tee-worker/identity/core/tls-websocket-server/src/lib.rs diff --git a/tee-worker/core/tls-websocket-server/src/stream_state.rs b/tee-worker/identity/core/tls-websocket-server/src/stream_state.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/stream_state.rs rename to tee-worker/identity/core/tls-websocket-server/src/stream_state.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/fixtures/mod.rs b/tee-worker/identity/core/tls-websocket-server/src/test/fixtures/mod.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/fixtures/mod.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/fixtures/mod.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/fixtures/no_cert_verifier.rs b/tee-worker/identity/core/tls-websocket-server/src/test/fixtures/no_cert_verifier.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/fixtures/no_cert_verifier.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/fixtures/no_cert_verifier.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/fixtures/test_cert.rs b/tee-worker/identity/core/tls-websocket-server/src/test/fixtures/test_cert.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/fixtures/test_cert.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/fixtures/test_cert.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/fixtures/test_private_key.rs b/tee-worker/identity/core/tls-websocket-server/src/test/fixtures/test_private_key.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/fixtures/test_private_key.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/fixtures/test_private_key.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/fixtures/test_server.rs b/tee-worker/identity/core/tls-websocket-server/src/test/fixtures/test_server.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/fixtures/test_server.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/fixtures/test_server.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/fixtures/test_server_config_provider.rs b/tee-worker/identity/core/tls-websocket-server/src/test/fixtures/test_server_config_provider.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/fixtures/test_server_config_provider.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/fixtures/test_server_config_provider.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/mocks/mod.rs b/tee-worker/identity/core/tls-websocket-server/src/test/mocks/mod.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/mocks/mod.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/mocks/mod.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/mocks/web_socket_connection_mock.rs b/tee-worker/identity/core/tls-websocket-server/src/test/mocks/web_socket_connection_mock.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/mocks/web_socket_connection_mock.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/mocks/web_socket_connection_mock.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/mocks/web_socket_handler_mock.rs b/tee-worker/identity/core/tls-websocket-server/src/test/mocks/web_socket_handler_mock.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/mocks/web_socket_handler_mock.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/mocks/web_socket_handler_mock.rs diff --git a/tee-worker/core/tls-websocket-server/src/test/mod.rs b/tee-worker/identity/core/tls-websocket-server/src/test/mod.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/test/mod.rs rename to tee-worker/identity/core/tls-websocket-server/src/test/mod.rs diff --git a/tee-worker/core/tls-websocket-server/src/tls_common.rs b/tee-worker/identity/core/tls-websocket-server/src/tls_common.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/tls_common.rs rename to tee-worker/identity/core/tls-websocket-server/src/tls_common.rs diff --git a/tee-worker/core/tls-websocket-server/src/ws_server.rs b/tee-worker/identity/core/tls-websocket-server/src/ws_server.rs similarity index 100% rename from tee-worker/core/tls-websocket-server/src/ws_server.rs rename to tee-worker/identity/core/tls-websocket-server/src/ws_server.rs diff --git a/tee-worker/docker/README.md b/tee-worker/identity/docker/README.md similarity index 100% rename from tee-worker/docker/README.md rename to tee-worker/identity/docker/README.md diff --git a/tee-worker/docker/docker-compose.yml b/tee-worker/identity/docker/docker-compose.yml similarity index 100% rename from tee-worker/docker/docker-compose.yml rename to tee-worker/identity/docker/docker-compose.yml diff --git a/tee-worker/docker/entrypoint.sh b/tee-worker/identity/docker/entrypoint.sh similarity index 100% rename from tee-worker/docker/entrypoint.sh rename to tee-worker/identity/docker/entrypoint.sh diff --git a/tee-worker/docker/fork.Dockerfile b/tee-worker/identity/docker/fork.Dockerfile similarity index 100% rename from tee-worker/docker/fork.Dockerfile rename to tee-worker/identity/docker/fork.Dockerfile diff --git a/tee-worker/docker/lit-assertion-contracts-test.yml b/tee-worker/identity/docker/lit-assertion-contracts-test.yml similarity index 100% rename from tee-worker/docker/lit-assertion-contracts-test.yml rename to tee-worker/identity/docker/lit-assertion-contracts-test.yml diff --git a/tee-worker/docker/lit-di-bitcoin-identity-multiworker-test.yml b/tee-worker/identity/docker/lit-di-bitcoin-identity-multiworker-test.yml similarity index 100% rename from tee-worker/docker/lit-di-bitcoin-identity-multiworker-test.yml rename to tee-worker/identity/docker/lit-di-bitcoin-identity-multiworker-test.yml diff --git a/tee-worker/docker/lit-di-bitcoin-identity-test.yml b/tee-worker/identity/docker/lit-di-bitcoin-identity-test.yml similarity index 100% rename from tee-worker/docker/lit-di-bitcoin-identity-test.yml rename to tee-worker/identity/docker/lit-di-bitcoin-identity-test.yml diff --git a/tee-worker/docker/lit-di-evm-identity-multiworker-test.yml b/tee-worker/identity/docker/lit-di-evm-identity-multiworker-test.yml similarity index 100% rename from tee-worker/docker/lit-di-evm-identity-multiworker-test.yml rename to tee-worker/identity/docker/lit-di-evm-identity-multiworker-test.yml diff --git a/tee-worker/docker/lit-di-evm-identity-test.yml b/tee-worker/identity/docker/lit-di-evm-identity-test.yml similarity index 100% rename from tee-worker/docker/lit-di-evm-identity-test.yml rename to tee-worker/identity/docker/lit-di-evm-identity-test.yml diff --git a/tee-worker/docker/lit-di-solana-identity-multiworker-test.yml b/tee-worker/identity/docker/lit-di-solana-identity-multiworker-test.yml similarity index 100% rename from tee-worker/docker/lit-di-solana-identity-multiworker-test.yml rename to tee-worker/identity/docker/lit-di-solana-identity-multiworker-test.yml diff --git a/tee-worker/docker/lit-di-solana-identity-test.yml b/tee-worker/identity/docker/lit-di-solana-identity-test.yml similarity index 100% rename from tee-worker/docker/lit-di-solana-identity-test.yml rename to tee-worker/identity/docker/lit-di-solana-identity-test.yml diff --git a/tee-worker/docker/lit-di-substrate-identity-multiworker-test.yml b/tee-worker/identity/docker/lit-di-substrate-identity-multiworker-test.yml similarity index 100% rename from tee-worker/docker/lit-di-substrate-identity-multiworker-test.yml rename to tee-worker/identity/docker/lit-di-substrate-identity-multiworker-test.yml diff --git a/tee-worker/docker/lit-di-substrate-identity-test.yml b/tee-worker/identity/docker/lit-di-substrate-identity-test.yml similarity index 100% rename from tee-worker/docker/lit-di-substrate-identity-test.yml rename to tee-worker/identity/docker/lit-di-substrate-identity-test.yml diff --git a/tee-worker/docker/lit-discord-identity-test.yml b/tee-worker/identity/docker/lit-discord-identity-test.yml similarity index 100% rename from tee-worker/docker/lit-discord-identity-test.yml rename to tee-worker/identity/docker/lit-discord-identity-test.yml diff --git a/tee-worker/docker/lit-dr-vc-multiworker-test.yml b/tee-worker/identity/docker/lit-dr-vc-multiworker-test.yml similarity index 100% rename from tee-worker/docker/lit-dr-vc-multiworker-test.yml rename to tee-worker/identity/docker/lit-dr-vc-multiworker-test.yml diff --git a/tee-worker/docker/lit-dr-vc-test.yml b/tee-worker/identity/docker/lit-dr-vc-test.yml similarity index 100% rename from tee-worker/docker/lit-dr-vc-test.yml rename to tee-worker/identity/docker/lit-dr-vc-test.yml diff --git a/tee-worker/docker/lit-parentchain-nonce.yml b/tee-worker/identity/docker/lit-parentchain-nonce.yml similarity index 100% rename from tee-worker/docker/lit-parentchain-nonce.yml rename to tee-worker/identity/docker/lit-parentchain-nonce.yml diff --git a/tee-worker/docker/lit-resume-worker.yml b/tee-worker/identity/docker/lit-resume-worker.yml similarity index 100% rename from tee-worker/docker/lit-resume-worker.yml rename to tee-worker/identity/docker/lit-resume-worker.yml diff --git a/tee-worker/docker/lit-test-failed-parentchain-extrinsic.yml b/tee-worker/identity/docker/lit-test-failed-parentchain-extrinsic.yml similarity index 100% rename from tee-worker/docker/lit-test-failed-parentchain-extrinsic.yml rename to tee-worker/identity/docker/lit-test-failed-parentchain-extrinsic.yml diff --git a/tee-worker/docker/lit-test-stress-script.yml b/tee-worker/identity/docker/lit-test-stress-script.yml similarity index 100% rename from tee-worker/docker/lit-test-stress-script.yml rename to tee-worker/identity/docker/lit-test-stress-script.yml diff --git a/tee-worker/docker/lit-ts-api-package-build.yml b/tee-worker/identity/docker/lit-ts-api-package-build.yml similarity index 100% rename from tee-worker/docker/lit-ts-api-package-build.yml rename to tee-worker/identity/docker/lit-ts-api-package-build.yml diff --git a/tee-worker/docker/lit-twitter-identity-test.yml b/tee-worker/identity/docker/lit-twitter-identity-test.yml similarity index 100% rename from tee-worker/docker/lit-twitter-identity-test.yml rename to tee-worker/identity/docker/lit-twitter-identity-test.yml diff --git a/tee-worker/docker/lit-vc-correctness-test.yml b/tee-worker/identity/docker/lit-vc-correctness-test.yml similarity index 100% rename from tee-worker/docker/lit-vc-correctness-test.yml rename to tee-worker/identity/docker/lit-vc-correctness-test.yml diff --git a/tee-worker/docker/multiworker-docker-compose.yml b/tee-worker/identity/docker/multiworker-docker-compose.yml similarity index 100% rename from tee-worker/docker/multiworker-docker-compose.yml rename to tee-worker/identity/docker/multiworker-docker-compose.yml diff --git a/tee-worker/docker/ping.Dockerfile b/tee-worker/identity/docker/ping.Dockerfile similarity index 100% rename from tee-worker/docker/ping.Dockerfile rename to tee-worker/identity/docker/ping.Dockerfile diff --git a/tee-worker/docker/sidechain-benchmark.yml b/tee-worker/identity/docker/sidechain-benchmark.yml similarity index 100% rename from tee-worker/docker/sidechain-benchmark.yml rename to tee-worker/identity/docker/sidechain-benchmark.yml diff --git a/tee-worker/docs/README.md b/tee-worker/identity/docs/README.md similarity index 100% rename from tee-worker/docs/README.md rename to tee-worker/identity/docs/README.md diff --git a/tee-worker/docs/diagramms/block_import_sequence.svg b/tee-worker/identity/docs/diagramms/block_import_sequence.svg similarity index 100% rename from tee-worker/docs/diagramms/block_import_sequence.svg rename to tee-worker/identity/docs/diagramms/block_import_sequence.svg diff --git a/tee-worker/enclave-runtime/Cargo.lock b/tee-worker/identity/enclave-runtime/Cargo.lock similarity index 100% rename from tee-worker/enclave-runtime/Cargo.lock rename to tee-worker/identity/enclave-runtime/Cargo.lock diff --git a/tee-worker/enclave-runtime/Cargo.toml b/tee-worker/identity/enclave-runtime/Cargo.toml similarity index 98% rename from tee-worker/enclave-runtime/Cargo.toml rename to tee-worker/identity/enclave-runtime/Cargo.toml index 1d245136e7..a1c5d356e7 100644 --- a/tee-worker/enclave-runtime/Cargo.toml +++ b/tee-worker/identity/enclave-runtime/Cargo.toml @@ -150,10 +150,10 @@ lc-identity-verification = { path = "../litentry/core/identity-verification", de lc-parachain-extrinsic-task-receiver = { path = "../litentry/core/parachain-extrinsic-task/receiver", default-features = false, features = ["sgx"] } lc-stf-task-receiver = { path = "../litentry/core/stf-task/receiver", default-features = false, features = ["sgx"] } lc-vc-task-receiver = { path = "../litentry/core/vc-task/receiver", default-features = false, features = ["sgx"] } -litentry-hex-utils = { path = "../../primitives/hex", default-features = false } -litentry-macros = { path = "../../primitives/core/macros", default-features = false } +litentry-hex-utils = { path = "../../../common/utils/hex", default-features = false } +litentry-macros = { path = "../../../common/primitives/core/macros", default-features = false } litentry-primitives = { path = "../litentry/primitives", default-features = false, features = ["sgx"] } -litentry-proc-macros = { path = "../../primitives/core/proc-macros", default-features = false } +litentry-proc-macros = { path = "../../../common/primitives/core/proc-macros", default-features = false } # substrate deps frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } diff --git a/tee-worker/enclave-runtime/Enclave.config.production.xml b/tee-worker/identity/enclave-runtime/Enclave.config.production.xml similarity index 100% rename from tee-worker/enclave-runtime/Enclave.config.production.xml rename to tee-worker/identity/enclave-runtime/Enclave.config.production.xml diff --git a/tee-worker/enclave-runtime/Enclave.config.xml b/tee-worker/identity/enclave-runtime/Enclave.config.xml similarity index 100% rename from tee-worker/enclave-runtime/Enclave.config.xml rename to tee-worker/identity/enclave-runtime/Enclave.config.xml diff --git a/tee-worker/enclave-runtime/Enclave.edl b/tee-worker/identity/enclave-runtime/Enclave.edl similarity index 100% rename from tee-worker/enclave-runtime/Enclave.edl rename to tee-worker/identity/enclave-runtime/Enclave.edl diff --git a/tee-worker/enclave-runtime/Enclave.lds b/tee-worker/identity/enclave-runtime/Enclave.lds similarity index 100% rename from tee-worker/enclave-runtime/Enclave.lds rename to tee-worker/identity/enclave-runtime/Enclave.lds diff --git a/tee-worker/enclave-runtime/Enclave_private.pem b/tee-worker/identity/enclave-runtime/Enclave_private.pem similarity index 100% rename from tee-worker/enclave-runtime/Enclave_private.pem rename to tee-worker/identity/enclave-runtime/Enclave_private.pem diff --git a/tee-worker/enclave-runtime/Makefile b/tee-worker/identity/enclave-runtime/Makefile similarity index 100% rename from tee-worker/enclave-runtime/Makefile rename to tee-worker/identity/enclave-runtime/Makefile diff --git a/tee-worker/enclave-runtime/README.md b/tee-worker/identity/enclave-runtime/README.md similarity index 100% rename from tee-worker/enclave-runtime/README.md rename to tee-worker/identity/enclave-runtime/README.md diff --git a/tee-worker/enclave-runtime/rust-toolchain.toml b/tee-worker/identity/enclave-runtime/rust-toolchain.toml similarity index 100% rename from tee-worker/enclave-runtime/rust-toolchain.toml rename to tee-worker/identity/enclave-runtime/rust-toolchain.toml diff --git a/tee-worker/enclave-runtime/rustfmt.toml b/tee-worker/identity/enclave-runtime/rustfmt.toml similarity index 100% rename from tee-worker/enclave-runtime/rustfmt.toml rename to tee-worker/identity/enclave-runtime/rustfmt.toml diff --git a/tee-worker/enclave-runtime/src/attestation.rs b/tee-worker/identity/enclave-runtime/src/attestation.rs similarity index 100% rename from tee-worker/enclave-runtime/src/attestation.rs rename to tee-worker/identity/enclave-runtime/src/attestation.rs diff --git a/tee-worker/enclave-runtime/src/empty_impls.rs b/tee-worker/identity/enclave-runtime/src/empty_impls.rs similarity index 100% rename from tee-worker/enclave-runtime/src/empty_impls.rs rename to tee-worker/identity/enclave-runtime/src/empty_impls.rs diff --git a/tee-worker/enclave-runtime/src/error.rs b/tee-worker/identity/enclave-runtime/src/error.rs similarity index 100% rename from tee-worker/enclave-runtime/src/error.rs rename to tee-worker/identity/enclave-runtime/src/error.rs diff --git a/tee-worker/enclave-runtime/src/initialization/global_components.rs b/tee-worker/identity/enclave-runtime/src/initialization/global_components.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/global_components.rs rename to tee-worker/identity/enclave-runtime/src/initialization/global_components.rs diff --git a/tee-worker/enclave-runtime/src/initialization/mod.rs b/tee-worker/identity/enclave-runtime/src/initialization/mod.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/mod.rs rename to tee-worker/identity/enclave-runtime/src/initialization/mod.rs diff --git a/tee-worker/enclave-runtime/src/initialization/parentchain/common.rs b/tee-worker/identity/enclave-runtime/src/initialization/parentchain/common.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/parentchain/common.rs rename to tee-worker/identity/enclave-runtime/src/initialization/parentchain/common.rs diff --git a/tee-worker/enclave-runtime/src/initialization/parentchain/integritee_parachain.rs b/tee-worker/identity/enclave-runtime/src/initialization/parentchain/integritee_parachain.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/parentchain/integritee_parachain.rs rename to tee-worker/identity/enclave-runtime/src/initialization/parentchain/integritee_parachain.rs diff --git a/tee-worker/enclave-runtime/src/initialization/parentchain/integritee_solochain.rs b/tee-worker/identity/enclave-runtime/src/initialization/parentchain/integritee_solochain.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/parentchain/integritee_solochain.rs rename to tee-worker/identity/enclave-runtime/src/initialization/parentchain/integritee_solochain.rs diff --git a/tee-worker/enclave-runtime/src/initialization/parentchain/mod.rs b/tee-worker/identity/enclave-runtime/src/initialization/parentchain/mod.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/parentchain/mod.rs rename to tee-worker/identity/enclave-runtime/src/initialization/parentchain/mod.rs diff --git a/tee-worker/enclave-runtime/src/initialization/parentchain/target_a_parachain.rs b/tee-worker/identity/enclave-runtime/src/initialization/parentchain/target_a_parachain.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/parentchain/target_a_parachain.rs rename to tee-worker/identity/enclave-runtime/src/initialization/parentchain/target_a_parachain.rs diff --git a/tee-worker/enclave-runtime/src/initialization/parentchain/target_a_solochain.rs b/tee-worker/identity/enclave-runtime/src/initialization/parentchain/target_a_solochain.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/parentchain/target_a_solochain.rs rename to tee-worker/identity/enclave-runtime/src/initialization/parentchain/target_a_solochain.rs diff --git a/tee-worker/enclave-runtime/src/initialization/parentchain/target_b_parachain.rs b/tee-worker/identity/enclave-runtime/src/initialization/parentchain/target_b_parachain.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/parentchain/target_b_parachain.rs rename to tee-worker/identity/enclave-runtime/src/initialization/parentchain/target_b_parachain.rs diff --git a/tee-worker/enclave-runtime/src/initialization/parentchain/target_b_solochain.rs b/tee-worker/identity/enclave-runtime/src/initialization/parentchain/target_b_solochain.rs similarity index 100% rename from tee-worker/enclave-runtime/src/initialization/parentchain/target_b_solochain.rs rename to tee-worker/identity/enclave-runtime/src/initialization/parentchain/target_b_solochain.rs diff --git a/tee-worker/enclave-runtime/src/ipfs.rs b/tee-worker/identity/enclave-runtime/src/ipfs.rs similarity index 100% rename from tee-worker/enclave-runtime/src/ipfs.rs rename to tee-worker/identity/enclave-runtime/src/ipfs.rs diff --git a/tee-worker/enclave-runtime/src/lib.rs b/tee-worker/identity/enclave-runtime/src/lib.rs similarity index 100% rename from tee-worker/enclave-runtime/src/lib.rs rename to tee-worker/identity/enclave-runtime/src/lib.rs diff --git a/tee-worker/enclave-runtime/src/ocall/attestation_ocall.rs b/tee-worker/identity/enclave-runtime/src/ocall/attestation_ocall.rs similarity index 100% rename from tee-worker/enclave-runtime/src/ocall/attestation_ocall.rs rename to tee-worker/identity/enclave-runtime/src/ocall/attestation_ocall.rs diff --git a/tee-worker/enclave-runtime/src/ocall/ffi.rs b/tee-worker/identity/enclave-runtime/src/ocall/ffi.rs similarity index 100% rename from tee-worker/enclave-runtime/src/ocall/ffi.rs rename to tee-worker/identity/enclave-runtime/src/ocall/ffi.rs diff --git a/tee-worker/enclave-runtime/src/ocall/ipfs_ocall.rs b/tee-worker/identity/enclave-runtime/src/ocall/ipfs_ocall.rs similarity index 100% rename from tee-worker/enclave-runtime/src/ocall/ipfs_ocall.rs rename to tee-worker/identity/enclave-runtime/src/ocall/ipfs_ocall.rs diff --git a/tee-worker/enclave-runtime/src/ocall/metrics_ocall.rs b/tee-worker/identity/enclave-runtime/src/ocall/metrics_ocall.rs similarity index 100% rename from tee-worker/enclave-runtime/src/ocall/metrics_ocall.rs rename to tee-worker/identity/enclave-runtime/src/ocall/metrics_ocall.rs diff --git a/tee-worker/enclave-runtime/src/ocall/mod.rs b/tee-worker/identity/enclave-runtime/src/ocall/mod.rs similarity index 100% rename from tee-worker/enclave-runtime/src/ocall/mod.rs rename to tee-worker/identity/enclave-runtime/src/ocall/mod.rs diff --git a/tee-worker/enclave-runtime/src/ocall/on_chain_ocall.rs b/tee-worker/identity/enclave-runtime/src/ocall/on_chain_ocall.rs similarity index 100% rename from tee-worker/enclave-runtime/src/ocall/on_chain_ocall.rs rename to tee-worker/identity/enclave-runtime/src/ocall/on_chain_ocall.rs diff --git a/tee-worker/enclave-runtime/src/ocall/sidechain_ocall.rs b/tee-worker/identity/enclave-runtime/src/ocall/sidechain_ocall.rs similarity index 100% rename from tee-worker/enclave-runtime/src/ocall/sidechain_ocall.rs rename to tee-worker/identity/enclave-runtime/src/ocall/sidechain_ocall.rs diff --git a/tee-worker/enclave-runtime/src/rpc/common_api.rs b/tee-worker/identity/enclave-runtime/src/rpc/common_api.rs similarity index 100% rename from tee-worker/enclave-runtime/src/rpc/common_api.rs rename to tee-worker/identity/enclave-runtime/src/rpc/common_api.rs diff --git a/tee-worker/enclave-runtime/src/rpc/mod.rs b/tee-worker/identity/enclave-runtime/src/rpc/mod.rs similarity index 100% rename from tee-worker/enclave-runtime/src/rpc/mod.rs rename to tee-worker/identity/enclave-runtime/src/rpc/mod.rs diff --git a/tee-worker/enclave-runtime/src/rpc/rpc_response_channel.rs b/tee-worker/identity/enclave-runtime/src/rpc/rpc_response_channel.rs similarity index 100% rename from tee-worker/enclave-runtime/src/rpc/rpc_response_channel.rs rename to tee-worker/identity/enclave-runtime/src/rpc/rpc_response_channel.rs diff --git a/tee-worker/enclave-runtime/src/shard_creation_info.rs b/tee-worker/identity/enclave-runtime/src/shard_creation_info.rs similarity index 100% rename from tee-worker/enclave-runtime/src/shard_creation_info.rs rename to tee-worker/identity/enclave-runtime/src/shard_creation_info.rs diff --git a/tee-worker/enclave-runtime/src/stf_task_handler.rs b/tee-worker/identity/enclave-runtime/src/stf_task_handler.rs similarity index 100% rename from tee-worker/enclave-runtime/src/stf_task_handler.rs rename to tee-worker/identity/enclave-runtime/src/stf_task_handler.rs diff --git a/tee-worker/enclave-runtime/src/sync.rs b/tee-worker/identity/enclave-runtime/src/sync.rs similarity index 100% rename from tee-worker/enclave-runtime/src/sync.rs rename to tee-worker/identity/enclave-runtime/src/sync.rs diff --git a/tee-worker/enclave-runtime/src/test/Counter.sol b/tee-worker/identity/enclave-runtime/src/test/Counter.sol similarity index 100% rename from tee-worker/enclave-runtime/src/test/Counter.sol rename to tee-worker/identity/enclave-runtime/src/test/Counter.sol diff --git a/tee-worker/enclave-runtime/src/test/cert_tests.rs b/tee-worker/identity/enclave-runtime/src/test/cert_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/cert_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/cert_tests.rs diff --git a/tee-worker/enclave-runtime/src/test/direct_rpc_tests.rs b/tee-worker/identity/enclave-runtime/src/test/direct_rpc_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/direct_rpc_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/direct_rpc_tests.rs diff --git a/tee-worker/enclave-runtime/src/test/enclave_signer_tests.rs b/tee-worker/identity/enclave-runtime/src/test/enclave_signer_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/enclave_signer_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/enclave_signer_tests.rs diff --git a/tee-worker/enclave-runtime/src/test/evm_pallet_tests.rs b/tee-worker/identity/enclave-runtime/src/test/evm_pallet_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/evm_pallet_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/evm_pallet_tests.rs diff --git a/tee-worker/enclave-runtime/src/test/fixtures/components.rs b/tee-worker/identity/enclave-runtime/src/test/fixtures/components.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/fixtures/components.rs rename to tee-worker/identity/enclave-runtime/src/test/fixtures/components.rs diff --git a/tee-worker/enclave-runtime/src/test/fixtures/initialize_test_state.rs b/tee-worker/identity/enclave-runtime/src/test/fixtures/initialize_test_state.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/fixtures/initialize_test_state.rs rename to tee-worker/identity/enclave-runtime/src/test/fixtures/initialize_test_state.rs diff --git a/tee-worker/enclave-runtime/src/test/fixtures/mod.rs b/tee-worker/identity/enclave-runtime/src/test/fixtures/mod.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/fixtures/mod.rs rename to tee-worker/identity/enclave-runtime/src/test/fixtures/mod.rs diff --git a/tee-worker/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der b/tee-worker/identity/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der similarity index 100% rename from tee-worker/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der rename to tee-worker/identity/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der diff --git a/tee-worker/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin b/tee-worker/identity/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin similarity index 100% rename from tee-worker/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin rename to tee-worker/identity/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin diff --git a/tee-worker/enclave-runtime/src/test/fixtures/test_setup.rs b/tee-worker/identity/enclave-runtime/src/test/fixtures/test_setup.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/fixtures/test_setup.rs rename to tee-worker/identity/enclave-runtime/src/test/fixtures/test_setup.rs diff --git a/tee-worker/enclave-runtime/src/test/ipfs_tests.rs b/tee-worker/identity/enclave-runtime/src/test/ipfs_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/ipfs_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/ipfs_tests.rs diff --git a/tee-worker/enclave-runtime/src/test/mocks/attestation_ocall_mock.rs b/tee-worker/identity/enclave-runtime/src/test/mocks/attestation_ocall_mock.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/mocks/attestation_ocall_mock.rs rename to tee-worker/identity/enclave-runtime/src/test/mocks/attestation_ocall_mock.rs diff --git a/tee-worker/enclave-runtime/src/test/mocks/enclave_rpc_ocall_mock.rs b/tee-worker/identity/enclave-runtime/src/test/mocks/enclave_rpc_ocall_mock.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/mocks/enclave_rpc_ocall_mock.rs rename to tee-worker/identity/enclave-runtime/src/test/mocks/enclave_rpc_ocall_mock.rs diff --git a/tee-worker/enclave-runtime/src/test/mocks/mod.rs b/tee-worker/identity/enclave-runtime/src/test/mocks/mod.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/mocks/mod.rs rename to tee-worker/identity/enclave-runtime/src/test/mocks/mod.rs diff --git a/tee-worker/enclave-runtime/src/test/mocks/peer_updater_mock.rs b/tee-worker/identity/enclave-runtime/src/test/mocks/peer_updater_mock.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/mocks/peer_updater_mock.rs rename to tee-worker/identity/enclave-runtime/src/test/mocks/peer_updater_mock.rs diff --git a/tee-worker/enclave-runtime/src/test/mocks/propose_to_import_call_mock.rs b/tee-worker/identity/enclave-runtime/src/test/mocks/propose_to_import_call_mock.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/mocks/propose_to_import_call_mock.rs rename to tee-worker/identity/enclave-runtime/src/test/mocks/propose_to_import_call_mock.rs diff --git a/tee-worker/enclave-runtime/src/test/mocks/rpc_responder_mock.rs b/tee-worker/identity/enclave-runtime/src/test/mocks/rpc_responder_mock.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/mocks/rpc_responder_mock.rs rename to tee-worker/identity/enclave-runtime/src/test/mocks/rpc_responder_mock.rs diff --git a/tee-worker/enclave-runtime/src/test/mocks/types.rs b/tee-worker/identity/enclave-runtime/src/test/mocks/types.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/mocks/types.rs rename to tee-worker/identity/enclave-runtime/src/test/mocks/types.rs diff --git a/tee-worker/enclave-runtime/src/test/mod.rs b/tee-worker/identity/enclave-runtime/src/test/mod.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/mod.rs rename to tee-worker/identity/enclave-runtime/src/test/mod.rs diff --git a/tee-worker/enclave-runtime/src/test/sidechain_aura_tests.rs b/tee-worker/identity/enclave-runtime/src/test/sidechain_aura_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/sidechain_aura_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/sidechain_aura_tests.rs diff --git a/tee-worker/enclave-runtime/src/test/sidechain_event_tests.rs b/tee-worker/identity/enclave-runtime/src/test/sidechain_event_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/sidechain_event_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/sidechain_event_tests.rs diff --git a/tee-worker/enclave-runtime/src/test/state_getter_tests.rs b/tee-worker/identity/enclave-runtime/src/test/state_getter_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/state_getter_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/state_getter_tests.rs diff --git a/tee-worker/enclave-runtime/src/test/tests_main.rs b/tee-worker/identity/enclave-runtime/src/test/tests_main.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/tests_main.rs rename to tee-worker/identity/enclave-runtime/src/test/tests_main.rs diff --git a/tee-worker/enclave-runtime/src/test/top_pool_tests.rs b/tee-worker/identity/enclave-runtime/src/test/top_pool_tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/test/top_pool_tests.rs rename to tee-worker/identity/enclave-runtime/src/test/top_pool_tests.rs diff --git a/tee-worker/enclave-runtime/src/tls_ra/README.md b/tee-worker/identity/enclave-runtime/src/tls_ra/README.md similarity index 100% rename from tee-worker/enclave-runtime/src/tls_ra/README.md rename to tee-worker/identity/enclave-runtime/src/tls_ra/README.md diff --git a/tee-worker/enclave-runtime/src/tls_ra/authentication.rs b/tee-worker/identity/enclave-runtime/src/tls_ra/authentication.rs similarity index 100% rename from tee-worker/enclave-runtime/src/tls_ra/authentication.rs rename to tee-worker/identity/enclave-runtime/src/tls_ra/authentication.rs diff --git a/tee-worker/enclave-runtime/src/tls_ra/mocks.rs b/tee-worker/identity/enclave-runtime/src/tls_ra/mocks.rs similarity index 100% rename from tee-worker/enclave-runtime/src/tls_ra/mocks.rs rename to tee-worker/identity/enclave-runtime/src/tls_ra/mocks.rs diff --git a/tee-worker/enclave-runtime/src/tls_ra/mod.rs b/tee-worker/identity/enclave-runtime/src/tls_ra/mod.rs similarity index 100% rename from tee-worker/enclave-runtime/src/tls_ra/mod.rs rename to tee-worker/identity/enclave-runtime/src/tls_ra/mod.rs diff --git a/tee-worker/enclave-runtime/src/tls_ra/seal_handler.rs b/tee-worker/identity/enclave-runtime/src/tls_ra/seal_handler.rs similarity index 100% rename from tee-worker/enclave-runtime/src/tls_ra/seal_handler.rs rename to tee-worker/identity/enclave-runtime/src/tls_ra/seal_handler.rs diff --git a/tee-worker/enclave-runtime/src/tls_ra/tests.rs b/tee-worker/identity/enclave-runtime/src/tls_ra/tests.rs similarity index 100% rename from tee-worker/enclave-runtime/src/tls_ra/tests.rs rename to tee-worker/identity/enclave-runtime/src/tls_ra/tests.rs diff --git a/tee-worker/enclave-runtime/src/tls_ra/tls_ra_client.rs b/tee-worker/identity/enclave-runtime/src/tls_ra/tls_ra_client.rs similarity index 100% rename from tee-worker/enclave-runtime/src/tls_ra/tls_ra_client.rs rename to tee-worker/identity/enclave-runtime/src/tls_ra/tls_ra_client.rs diff --git a/tee-worker/enclave-runtime/src/tls_ra/tls_ra_server.rs b/tee-worker/identity/enclave-runtime/src/tls_ra/tls_ra_server.rs similarity index 100% rename from tee-worker/enclave-runtime/src/tls_ra/tls_ra_server.rs rename to tee-worker/identity/enclave-runtime/src/tls_ra/tls_ra_server.rs diff --git a/tee-worker/enclave-runtime/src/top_pool_execution.rs b/tee-worker/identity/enclave-runtime/src/top_pool_execution.rs similarity index 100% rename from tee-worker/enclave-runtime/src/top_pool_execution.rs rename to tee-worker/identity/enclave-runtime/src/top_pool_execution.rs diff --git a/tee-worker/enclave-runtime/src/utils.rs b/tee-worker/identity/enclave-runtime/src/utils.rs similarity index 100% rename from tee-worker/enclave-runtime/src/utils.rs rename to tee-worker/identity/enclave-runtime/src/utils.rs diff --git a/tee-worker/enclave-runtime/src/vc_issuance_task.rs b/tee-worker/identity/enclave-runtime/src/vc_issuance_task.rs similarity index 100% rename from tee-worker/enclave-runtime/src/vc_issuance_task.rs rename to tee-worker/identity/enclave-runtime/src/vc_issuance_task.rs diff --git a/tee-worker/enclave-runtime/x86_64-unknown-linux-sgx.json b/tee-worker/identity/enclave-runtime/x86_64-unknown-linux-sgx.json similarity index 100% rename from tee-worker/enclave-runtime/x86_64-unknown-linux-sgx.json rename to tee-worker/identity/enclave-runtime/x86_64-unknown-linux-sgx.json diff --git a/tee-worker/entrypoint.sh b/tee-worker/identity/entrypoint.sh similarity index 100% rename from tee-worker/entrypoint.sh rename to tee-worker/identity/entrypoint.sh diff --git a/tee-worker/extract_identity b/tee-worker/identity/extract_identity similarity index 100% rename from tee-worker/extract_identity rename to tee-worker/identity/extract_identity diff --git a/tee-worker/lib/readme.txt b/tee-worker/identity/lib/readme.txt similarity index 100% rename from tee-worker/lib/readme.txt rename to tee-worker/identity/lib/readme.txt diff --git a/tee-worker/license_header_scs.txt b/tee-worker/identity/license_header_scs.txt similarity index 100% rename from tee-worker/license_header_scs.txt rename to tee-worker/identity/license_header_scs.txt diff --git a/tee-worker/litentry/core/assertion-build-v2/Cargo.toml b/tee-worker/identity/litentry/core/assertion-build-v2/Cargo.toml similarity index 96% rename from tee-worker/litentry/core/assertion-build-v2/Cargo.toml rename to tee-worker/identity/litentry/core/assertion-build-v2/Cargo.toml index cd85cdedda..3c5593ba7c 100644 --- a/tee-worker/litentry/core/assertion-build-v2/Cargo.toml +++ b/tee-worker/identity/litentry/core/assertion-build-v2/Cargo.toml @@ -32,7 +32,7 @@ lc-common = { path = "../common", default-features = false } lc-credentials-v2 = { path = "../credentials-v2", default-features = false } lc-service = { path = "../service", default-features = false } lc-stf-task-sender = { path = "../stf-task/sender", default-features = false } -litentry-hex-utils = { path = "../../../../primitives/hex", default-features = false } +litentry-hex-utils = { path = "../../../../../common/utils/hex", default-features = false } litentry-primitives = { path = "../../primitives", default-features = false } [dev-dependencies] diff --git a/tee-worker/litentry/core/assertion-build-v2/src/lib.rs b/tee-worker/identity/litentry/core/assertion-build-v2/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build-v2/src/lib.rs rename to tee-worker/identity/litentry/core/assertion-build-v2/src/lib.rs diff --git a/tee-worker/litentry/core/assertion-build-v2/src/linked_identities/mod.rs b/tee-worker/identity/litentry/core/assertion-build-v2/src/linked_identities/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build-v2/src/linked_identities/mod.rs rename to tee-worker/identity/litentry/core/assertion-build-v2/src/linked_identities/mod.rs diff --git a/tee-worker/litentry/core/assertion-build-v2/src/nft_holder/mod.rs b/tee-worker/identity/litentry/core/assertion-build-v2/src/nft_holder/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build-v2/src/nft_holder/mod.rs rename to tee-worker/identity/litentry/core/assertion-build-v2/src/nft_holder/mod.rs diff --git a/tee-worker/litentry/core/assertion-build-v2/src/platform_user/mod.rs b/tee-worker/identity/litentry/core/assertion-build-v2/src/platform_user/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build-v2/src/platform_user/mod.rs rename to tee-worker/identity/litentry/core/assertion-build-v2/src/platform_user/mod.rs diff --git a/tee-worker/litentry/core/assertion-build-v2/src/token_holding_amount/mod.rs b/tee-worker/identity/litentry/core/assertion-build-v2/src/token_holding_amount/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build-v2/src/token_holding_amount/mod.rs rename to tee-worker/identity/litentry/core/assertion-build-v2/src/token_holding_amount/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/Cargo.toml b/tee-worker/identity/litentry/core/assertion-build/Cargo.toml similarity index 98% rename from tee-worker/litentry/core/assertion-build/Cargo.toml rename to tee-worker/identity/litentry/core/assertion-build/Cargo.toml index 1e21d217a4..10c6ae1001 100644 --- a/tee-worker/litentry/core/assertion-build/Cargo.toml +++ b/tee-worker/identity/litentry/core/assertion-build/Cargo.toml @@ -56,7 +56,7 @@ pallet-parachain-staking = { git = "https://github.com/litentry/litentry-paracha chrono = { version = "0.4.19", default-features = false, features = ["alloc"] } env_logger = "0.10.0" lc-mock-server = { path = "../mock-server" } -litentry-hex-utils = { path = "../../../../primitives/hex" } +litentry-hex-utils = { path = "../../../../../common/utils/hex" } ethabi = { version = "18.0.0", default-features = false } itp-test = { path = "../../../core-primitives/test", default-features = false } diff --git a/tee-worker/litentry/core/assertion-build/src/a1.rs b/tee-worker/identity/litentry/core/assertion-build/src/a1.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/a1.rs rename to tee-worker/identity/litentry/core/assertion-build/src/a1.rs diff --git a/tee-worker/litentry/core/assertion-build/src/a13.rs b/tee-worker/identity/litentry/core/assertion-build/src/a13.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/a13.rs rename to tee-worker/identity/litentry/core/assertion-build/src/a13.rs diff --git a/tee-worker/litentry/core/assertion-build/src/a14.rs b/tee-worker/identity/litentry/core/assertion-build/src/a14.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/a14.rs rename to tee-worker/identity/litentry/core/assertion-build/src/a14.rs diff --git a/tee-worker/litentry/core/assertion-build/src/a2.rs b/tee-worker/identity/litentry/core/assertion-build/src/a2.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/a2.rs rename to tee-worker/identity/litentry/core/assertion-build/src/a2.rs diff --git a/tee-worker/litentry/core/assertion-build/src/a20.rs b/tee-worker/identity/litentry/core/assertion-build/src/a20.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/a20.rs rename to tee-worker/identity/litentry/core/assertion-build/src/a20.rs diff --git a/tee-worker/litentry/core/assertion-build/src/a3.rs b/tee-worker/identity/litentry/core/assertion-build/src/a3.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/a3.rs rename to tee-worker/identity/litentry/core/assertion-build/src/a3.rs diff --git a/tee-worker/litentry/core/assertion-build/src/a6.rs b/tee-worker/identity/litentry/core/assertion-build/src/a6.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/a6.rs rename to tee-worker/identity/litentry/core/assertion-build/src/a6.rs diff --git a/tee-worker/litentry/core/assertion-build/src/a8.rs b/tee-worker/identity/litentry/core/assertion-build/src/a8.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/a8.rs rename to tee-worker/identity/litentry/core/assertion-build/src/a8.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/amount.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/amount.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/amount.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/amount.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/amount_holding.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/amount_holding.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/amount_holding.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/amount_holding.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/amount_token.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/amount_token.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/amount_token.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/amount_token.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/amounts.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/amounts.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/amounts.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/amounts.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/basic.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/basic.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/basic.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/basic.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/between_percents.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/between_percents.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/between_percents.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/between_percents.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/class_of_year.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/class_of_year.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/class_of_year.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/class_of_year.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/date.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/date.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/date.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/date.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/date_interval.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/date_interval.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/date_interval.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/date_interval.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/date_percent.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/date_percent.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/date_percent.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/date_percent.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/mirror.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/mirror.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/mirror.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/mirror.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/achainable/token.rs b/tee-worker/identity/litentry/core/assertion-build/src/achainable/token.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/achainable/token.rs rename to tee-worker/identity/litentry/core/assertion-build/src/achainable/token.rs diff --git a/tee-worker/litentry/core/assertion-build/src/brc20/amount_holder.rs b/tee-worker/identity/litentry/core/assertion-build/src/brc20/amount_holder.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/brc20/amount_holder.rs rename to tee-worker/identity/litentry/core/assertion-build/src/brc20/amount_holder.rs diff --git a/tee-worker/litentry/core/assertion-build/src/brc20/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/brc20/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/brc20/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/brc20/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/.gitignore b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/.gitignore similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/.gitignore rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/.gitignore diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/.prettierignore b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/.prettierignore similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/.prettierignore rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/.prettierignore diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/.prettierrc b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/.prettierrc similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/.prettierrc rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/.prettierrc diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/README.md b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/README.md similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/README.md rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/README.md diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A1.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/A1.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A1.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/A1.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A20.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/A20.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A20.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/A20.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A6.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/A6.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/A6.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/A6.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/DynamicAssertion.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/DynamicAssertion.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/DynamicAssertion.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/DynamicAssertion.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/ProxyDynamicAssertion.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/ProxyDynamicAssertion.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/ProxyDynamicAssertion.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/ProxyDynamicAssertion.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/README.md b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/README.md similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/README.md rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/README.md diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/AssertionLogic.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/AssertionLogic.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/AssertionLogic.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/AssertionLogic.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Http.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Http.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Http.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Http.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Identities.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Identities.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Identities.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Identities.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Json.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Json.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Json.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Json.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Logging.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Logging.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Logging.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Logging.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringCleaner.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringCleaner.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringCleaner.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringCleaner.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringComparison.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringComparison.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringComparison.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringComparison.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringShift.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringShift.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringShift.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/StringShift.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Utils.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Utils.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/libraries/Utils.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/libraries/Utils.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHexToNumber.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHexToNumber.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHexToNumber.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHexToNumber.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGet.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGet.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGet.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGet.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetBool.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetBool.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetBool.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetBool.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetI64.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetI64.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetI64.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetI64.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetString.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetString.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetString.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpGetString.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpPostString.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpPostString.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpPostString.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockHttpPostString.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockIdentityToString.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockIdentityToString.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockIdentityToString.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockIdentityToString.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockJsonGetArrayLen.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockJsonGetArrayLen.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockJsonGetArrayLen.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockJsonGetArrayLen.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockJsonGetString.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockJsonGetString.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockJsonGetString.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockJsonGetString.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockParseDecimal.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockParseDecimal.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockParseDecimal.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/mocks/MockParseDecimal.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/platform_user/DarenMarketClient.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/platform_user/DarenMarketClient.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/platform_user/DarenMarketClient.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/platform_user/DarenMarketClient.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/platform_user/PlatformUser.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/platform_user/PlatformUser.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/platform_user/PlatformUser.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/platform_user/PlatformUser.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/Get.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/Get.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/Get.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/Get.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/GetBool.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/GetBool.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/GetBool.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/GetBool.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/GetI64.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/GetI64.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/GetI64.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/GetI64.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/GetString.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/GetString.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/GetString.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/GetString.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/HexToNumber.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/HexToNumber.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/HexToNumber.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/HexToNumber.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/IdentityToString.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/IdentityToString.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/IdentityToString.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/IdentityToString.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/JsonTest.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/JsonTest.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/JsonTest.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/JsonTest.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/LoggingTest.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/LoggingTest.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/LoggingTest.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/LoggingTest.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/ParseDecimal.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/ParseDecimal.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/ParseDecimal.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/ParseDecimal.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/ParseInt.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/ParseInt.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/ParseInt.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/ParseInt.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/Post.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/Post.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/Post.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/Post.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/PostBool.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/PostBool.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/PostBool.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/PostBool.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/PostI64.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/PostI64.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/PostI64.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/PostI64.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/PostString.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/PostString.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/PostString.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/PostString.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/README.md b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/README.md similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/README.md rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/README.md diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/StringCleanerTest.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/StringCleanerTest.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/StringCleanerTest.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/StringCleanerTest.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/StringComparisonTest.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/StringComparisonTest.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/StringComparisonTest.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/StringComparisonTest.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/ToHex.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/ToHex.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/tests/ToHex.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/tests/ToHex.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/AchainableClient.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/AchainableClient.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/AchainableClient.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/AchainableClient.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/BlockchainInfoClient.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/BlockchainInfoClient.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/BlockchainInfoClient.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/BlockchainInfoClient.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Btc.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Btc.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Btc.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Btc.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Constants.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Constants.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Constants.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/Constants.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/GeniidataClient.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/GeniidataClient.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/GeniidataClient.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/GeniidataClient.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/MoralisClient.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/MoralisClient.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/MoralisClient.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/MoralisClient.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/NoderealClient.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/NoderealClient.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/NoderealClient.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/NoderealClient.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenHoldingAmount.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenHoldingAmount.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenHoldingAmount.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenHoldingAmount.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenMapping.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenMapping.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenMapping.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenMapping.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenQueryLogic.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenQueryLogic.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenQueryLogic.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/TokenQueryLogic.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/BRC20.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/BRC20.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/BRC20.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/BRC20.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Btcs.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Btcs.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Btcs.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Btcs.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Cats.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Cats.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Cats.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Cats.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Long.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Long.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Long.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Long.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Mmss.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Mmss.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Mmss.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Mmss.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Ordi.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Ordi.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Ordi.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Ordi.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Rats.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Rats.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Rats.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Rats.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Sats.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Sats.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Sats.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/brc20/Sats.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Ada.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Ada.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Ada.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Ada.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Amp.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Amp.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Amp.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Amp.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Atom.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Atom.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Atom.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Atom.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bch.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bch.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bch.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bch.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bean.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bean.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bean.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bean.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bnb.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bnb.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bnb.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Bnb.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Comp.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Comp.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Comp.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Comp.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Cro.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Cro.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Cro.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Cro.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Crv.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Crv.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Crv.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Crv.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Cvx.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Cvx.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Cvx.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Cvx.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Dai.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Dai.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Dai.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Dai.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Doge.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Doge.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Doge.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Doge.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Dydx.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Dydx.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Dydx.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Dydx.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Etc.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Etc.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Etc.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Etc.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Eth.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Eth.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Eth.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Eth.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Fil.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Fil.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Fil.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Fil.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Grt.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Grt.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Grt.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Grt.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Gtc.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Gtc.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Gtc.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Gtc.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Gusd.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Gusd.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Gusd.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Gusd.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Imx.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Imx.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Imx.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Imx.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Inj.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Inj.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Inj.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Inj.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Leo.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Leo.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Leo.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Leo.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Link.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Link.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Link.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Link.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Lit.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Lit.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Lit.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Lit.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Matic.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Matic.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Matic.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Matic.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Mcrt.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Mcrt.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Mcrt.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Mcrt.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Nfp.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Nfp.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Nfp.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Nfp.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/People.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/People.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/People.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/People.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Shib.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Shib.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Shib.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Shib.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Sol.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Sol.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Sol.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Sol.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/SpaceId.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/SpaceId.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/SpaceId.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/SpaceId.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Ton.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Ton.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Ton.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Ton.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Trx.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Trx.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Trx.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Trx.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Tusd.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Tusd.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Tusd.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Tusd.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Uni.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Uni.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Uni.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Uni.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdc.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdc.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdc.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdc.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdd.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdd.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdd.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdd.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdt.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdt.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdt.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Usdt.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Wbtc.sol b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Wbtc.sol similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Wbtc.sol rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/contracts/token_holding_amount/erc20/Wbtc.sol diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/hardhat.config.ts b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/hardhat.config.ts similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/hardhat.config.ts rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/hardhat.config.ts diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/package.json b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/package.json similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/package.json rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/package.json diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/pnpm-lock.yaml b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/pnpm-lock.yaml similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/pnpm-lock.yaml rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/pnpm-lock.yaml diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/repository.rs b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/repository.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/repository.rs rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/repository.rs diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/scripts/deploy.ts b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/scripts/deploy.ts similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/scripts/deploy.ts rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/scripts/deploy.ts diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/scripts/run_deploy.sh b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/scripts/run_deploy.sh similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/scripts/run_deploy.sh rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/scripts/run_deploy.sh diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/tests/platform-user.ts b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/platform-user.ts similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/tests/platform-user.ts rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/platform-user.ts diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/tests/string-cleaner.ts b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/string-cleaner.ts similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/tests/string-cleaner.ts rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/string-cleaner.ts diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/tests/string-comparison.ts b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/string-comparison.ts similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/tests/string-comparison.ts rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/string-comparison.ts diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/tests/token-holding-amount.ts b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/token-holding-amount.ts similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/tests/token-holding-amount.ts rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/token-holding-amount.ts diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/tests/utils/helper.ts b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/utils/helper.ts similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/tests/utils/helper.ts rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/tests/utils/helper.ts diff --git a/tee-worker/litentry/core/assertion-build/src/dynamic/tsconfig.json b/tee-worker/identity/litentry/core/assertion-build/src/dynamic/tsconfig.json similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/dynamic/tsconfig.json rename to tee-worker/identity/litentry/core/assertion-build/src/dynamic/tsconfig.json diff --git a/tee-worker/litentry/core/assertion-build/src/generic_discord_role.rs b/tee-worker/identity/litentry/core/assertion-build/src/generic_discord_role.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/generic_discord_role.rs rename to tee-worker/identity/litentry/core/assertion-build/src/generic_discord_role.rs diff --git a/tee-worker/litentry/core/assertion-build/src/holding_time.rs b/tee-worker/identity/litentry/core/assertion-build/src/holding_time.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/holding_time.rs rename to tee-worker/identity/litentry/core/assertion-build/src/holding_time.rs diff --git a/tee-worker/litentry/core/assertion-build/src/lib.rs b/tee-worker/identity/litentry/core/assertion-build/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/lib.rs rename to tee-worker/identity/litentry/core/assertion-build/src/lib.rs diff --git a/tee-worker/litentry/core/assertion-build/src/lit_staking.rs b/tee-worker/identity/litentry/core/assertion-build/src/lit_staking.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/lit_staking.rs rename to tee-worker/identity/litentry/core/assertion-build/src/lit_staking.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/amount_holding/evm_amount_holding.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/amount_holding/evm_amount_holding.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/amount_holding/evm_amount_holding.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/amount_holding/evm_amount_holding.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/amount_holding/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/amount_holding/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/amount_holding/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/amount_holding/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/bnb_domain/bnb_digit_domain_club_amount.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/bnb_domain/bnb_digit_domain_club_amount.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/bnb_domain/bnb_digit_domain_club_amount.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/bnb_domain/bnb_digit_domain_club_amount.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/bnb_domain/bnb_domain_holding_amount.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/bnb_domain/bnb_domain_holding_amount.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/bnb_domain/bnb_domain_holding_amount.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/bnb_domain/bnb_domain_holding_amount.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/bnb_domain/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/bnb_domain/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/bnb_domain/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/bnb_domain/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/crypto_summary/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/crypto_summary/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/crypto_summary/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/crypto_summary/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/nft_holder/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/nft_holder/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/nft_holder/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/nft_holder/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/nodereal/nft_holder/weirdo_ghost_gang_holder.rs b/tee-worker/identity/litentry/core/assertion-build/src/nodereal/nft_holder/weirdo_ghost_gang_holder.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/nodereal/nft_holder/weirdo_ghost_gang_holder.rs rename to tee-worker/identity/litentry/core/assertion-build/src/nodereal/nft_holder/weirdo_ghost_gang_holder.rs diff --git a/tee-worker/litentry/core/assertion-build/src/oneblock/course.rs b/tee-worker/identity/litentry/core/assertion-build/src/oneblock/course.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/oneblock/course.rs rename to tee-worker/identity/litentry/core/assertion-build/src/oneblock/course.rs diff --git a/tee-worker/litentry/core/assertion-build/src/oneblock/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/oneblock/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/oneblock/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/oneblock/mod.rs diff --git a/tee-worker/litentry/core/assertion-build/src/vip3/card.rs b/tee-worker/identity/litentry/core/assertion-build/src/vip3/card.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/vip3/card.rs rename to tee-worker/identity/litentry/core/assertion-build/src/vip3/card.rs diff --git a/tee-worker/litentry/core/assertion-build/src/vip3/mod.rs b/tee-worker/identity/litentry/core/assertion-build/src/vip3/mod.rs similarity index 100% rename from tee-worker/litentry/core/assertion-build/src/vip3/mod.rs rename to tee-worker/identity/litentry/core/assertion-build/src/vip3/mod.rs diff --git a/tee-worker/litentry/core/common/Cargo.toml b/tee-worker/identity/litentry/core/common/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/common/Cargo.toml rename to tee-worker/identity/litentry/core/common/Cargo.toml diff --git a/tee-worker/litentry/core/common/src/abort_strategy.rs b/tee-worker/identity/litentry/core/common/src/abort_strategy.rs similarity index 100% rename from tee-worker/litentry/core/common/src/abort_strategy.rs rename to tee-worker/identity/litentry/core/common/src/abort_strategy.rs diff --git a/tee-worker/litentry/core/common/src/lib.rs b/tee-worker/identity/litentry/core/common/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/common/src/lib.rs rename to tee-worker/identity/litentry/core/common/src/lib.rs diff --git a/tee-worker/litentry/core/common/src/platform_user/mod.rs b/tee-worker/identity/litentry/core/common/src/platform_user/mod.rs similarity index 100% rename from tee-worker/litentry/core/common/src/platform_user/mod.rs rename to tee-worker/identity/litentry/core/common/src/platform_user/mod.rs diff --git a/tee-worker/litentry/core/common/src/web3_nft/mod.rs b/tee-worker/identity/litentry/core/common/src/web3_nft/mod.rs similarity index 100% rename from tee-worker/litentry/core/common/src/web3_nft/mod.rs rename to tee-worker/identity/litentry/core/common/src/web3_nft/mod.rs diff --git a/tee-worker/litentry/core/common/src/web3_token/mod.rs b/tee-worker/identity/litentry/core/common/src/web3_token/mod.rs similarity index 100% rename from tee-worker/litentry/core/common/src/web3_token/mod.rs rename to tee-worker/identity/litentry/core/common/src/web3_token/mod.rs diff --git a/tee-worker/litentry/core/common/src/web3_token/token_amount_range.rs b/tee-worker/identity/litentry/core/common/src/web3_token/token_amount_range.rs similarity index 100% rename from tee-worker/litentry/core/common/src/web3_token/token_amount_range.rs rename to tee-worker/identity/litentry/core/common/src/web3_token/token_amount_range.rs diff --git a/tee-worker/litentry/core/common/src/web3_token/token_decimals_filter.rs b/tee-worker/identity/litentry/core/common/src/web3_token/token_decimals_filter.rs similarity index 100% rename from tee-worker/litentry/core/common/src/web3_token/token_decimals_filter.rs rename to tee-worker/identity/litentry/core/common/src/web3_token/token_decimals_filter.rs diff --git a/tee-worker/litentry/core/credentials-v2/Cargo.toml b/tee-worker/identity/litentry/core/credentials-v2/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/credentials-v2/Cargo.toml rename to tee-worker/identity/litentry/core/credentials-v2/Cargo.toml diff --git a/tee-worker/litentry/core/credentials-v2/src/lib.rs b/tee-worker/identity/litentry/core/credentials-v2/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/credentials-v2/src/lib.rs rename to tee-worker/identity/litentry/core/credentials-v2/src/lib.rs diff --git a/tee-worker/litentry/core/credentials-v2/src/linked_identities/mod.rs b/tee-worker/identity/litentry/core/credentials-v2/src/linked_identities/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials-v2/src/linked_identities/mod.rs rename to tee-worker/identity/litentry/core/credentials-v2/src/linked_identities/mod.rs diff --git a/tee-worker/litentry/core/credentials-v2/src/nft_holder/mod.rs b/tee-worker/identity/litentry/core/credentials-v2/src/nft_holder/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials-v2/src/nft_holder/mod.rs rename to tee-worker/identity/litentry/core/credentials-v2/src/nft_holder/mod.rs diff --git a/tee-worker/litentry/core/credentials-v2/src/platform_user/mod.rs b/tee-worker/identity/litentry/core/credentials-v2/src/platform_user/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials-v2/src/platform_user/mod.rs rename to tee-worker/identity/litentry/core/credentials-v2/src/platform_user/mod.rs diff --git a/tee-worker/litentry/core/credentials-v2/src/token_holding_amount/mod.rs b/tee-worker/identity/litentry/core/credentials-v2/src/token_holding_amount/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials-v2/src/token_holding_amount/mod.rs rename to tee-worker/identity/litentry/core/credentials-v2/src/token_holding_amount/mod.rs diff --git a/tee-worker/litentry/core/credentials/Cargo.toml b/tee-worker/identity/litentry/core/credentials/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/credentials/Cargo.toml rename to tee-worker/identity/litentry/core/credentials/Cargo.toml diff --git a/tee-worker/litentry/core/credentials/src/achainable/amount_holding_time.rs b/tee-worker/identity/litentry/core/credentials/src/achainable/amount_holding_time.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/achainable/amount_holding_time.rs rename to tee-worker/identity/litentry/core/credentials/src/achainable/amount_holding_time.rs diff --git a/tee-worker/litentry/core/credentials/src/achainable/bab_holder.rs b/tee-worker/identity/litentry/core/credentials/src/achainable/bab_holder.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/achainable/bab_holder.rs rename to tee-worker/identity/litentry/core/credentials/src/achainable/bab_holder.rs diff --git a/tee-worker/litentry/core/credentials/src/achainable/lit_holding_amount.rs b/tee-worker/identity/litentry/core/credentials/src/achainable/lit_holding_amount.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/achainable/lit_holding_amount.rs rename to tee-worker/identity/litentry/core/credentials/src/achainable/lit_holding_amount.rs diff --git a/tee-worker/litentry/core/credentials/src/achainable/mod.rs b/tee-worker/identity/litentry/core/credentials/src/achainable/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/achainable/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/achainable/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/achainable/uniswap_user.rs b/tee-worker/identity/litentry/core/credentials/src/achainable/uniswap_user.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/achainable/uniswap_user.rs rename to tee-worker/identity/litentry/core/credentials/src/achainable/uniswap_user.rs diff --git a/tee-worker/litentry/core/credentials/src/assertion_logic.rs b/tee-worker/identity/litentry/core/credentials/src/assertion_logic.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/assertion_logic.rs rename to tee-worker/identity/litentry/core/credentials/src/assertion_logic.rs diff --git a/tee-worker/litentry/core/credentials/src/brc20/amount_holder.rs b/tee-worker/identity/litentry/core/credentials/src/brc20/amount_holder.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/brc20/amount_holder.rs rename to tee-worker/identity/litentry/core/credentials/src/brc20/amount_holder.rs diff --git a/tee-worker/litentry/core/credentials/src/brc20/mod.rs b/tee-worker/identity/litentry/core/credentials/src/brc20/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/brc20/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/brc20/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/credential_schema.rs b/tee-worker/identity/litentry/core/credentials/src/credential_schema.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/credential_schema.rs rename to tee-worker/identity/litentry/core/credentials/src/credential_schema.rs diff --git a/tee-worker/litentry/core/credentials/src/error.rs b/tee-worker/identity/litentry/core/credentials/src/error.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/error.rs rename to tee-worker/identity/litentry/core/credentials/src/error.rs diff --git a/tee-worker/litentry/core/credentials/src/generic_discord_role/mod.rs b/tee-worker/identity/litentry/core/credentials/src/generic_discord_role/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/generic_discord_role/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/generic_discord_role/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/lib.rs b/tee-worker/identity/litentry/core/credentials/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/lib.rs rename to tee-worker/identity/litentry/core/credentials/src/lib.rs diff --git a/tee-worker/litentry/core/credentials/src/litentry_profile/holding_amount.rs b/tee-worker/identity/litentry/core/credentials/src/litentry_profile/holding_amount.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/litentry_profile/holding_amount.rs rename to tee-worker/identity/litentry/core/credentials/src/litentry_profile/holding_amount.rs diff --git a/tee-worker/litentry/core/credentials/src/litentry_profile/lit_staking.rs b/tee-worker/identity/litentry/core/credentials/src/litentry_profile/lit_staking.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/litentry_profile/lit_staking.rs rename to tee-worker/identity/litentry/core/credentials/src/litentry_profile/lit_staking.rs diff --git a/tee-worker/litentry/core/credentials/src/litentry_profile/mirror.rs b/tee-worker/identity/litentry/core/credentials/src/litentry_profile/mirror.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/litentry_profile/mirror.rs rename to tee-worker/identity/litentry/core/credentials/src/litentry_profile/mirror.rs diff --git a/tee-worker/litentry/core/credentials/src/litentry_profile/mod.rs b/tee-worker/identity/litentry/core/credentials/src/litentry_profile/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/litentry_profile/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/litentry_profile/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/litentry_profile/token_balance.rs b/tee-worker/identity/litentry/core/credentials/src/litentry_profile/token_balance.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/litentry_profile/token_balance.rs rename to tee-worker/identity/litentry/core/credentials/src/litentry_profile/token_balance.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/amount_holding/evm_amount_holding.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/amount_holding/evm_amount_holding.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/amount_holding/evm_amount_holding.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/amount_holding/evm_amount_holding.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/amount_holding/mod.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/amount_holding/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/amount_holding/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/amount_holding/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/bnb_domain/bnb_digit_domain_club_amount.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/bnb_domain/bnb_digit_domain_club_amount.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/bnb_domain/bnb_digit_domain_club_amount.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/bnb_domain/bnb_digit_domain_club_amount.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/bnb_domain/bnb_domain_holding_amount.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/bnb_domain/bnb_domain_holding_amount.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/bnb_domain/bnb_domain_holding_amount.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/bnb_domain/bnb_domain_holding_amount.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/bnb_domain/mod.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/bnb_domain/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/bnb_domain/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/bnb_domain/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/crypto_summary/mod.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/crypto_summary/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/crypto_summary/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/crypto_summary/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/crypto_summary/summary.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/crypto_summary/summary.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/crypto_summary/summary.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/crypto_summary/summary.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/mod.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/nft_holder/mod.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/nft_holder/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/nft_holder/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/nft_holder/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/nodereal/nft_holder/weirdo_ghost_gang_holder.rs b/tee-worker/identity/litentry/core/credentials/src/nodereal/nft_holder/weirdo_ghost_gang_holder.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/nodereal/nft_holder/weirdo_ghost_gang_holder.rs rename to tee-worker/identity/litentry/core/credentials/src/nodereal/nft_holder/weirdo_ghost_gang_holder.rs diff --git a/tee-worker/litentry/core/credentials/src/oneblock/mod.rs b/tee-worker/identity/litentry/core/credentials/src/oneblock/mod.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/oneblock/mod.rs rename to tee-worker/identity/litentry/core/credentials/src/oneblock/mod.rs diff --git a/tee-worker/litentry/core/credentials/src/schema.rs b/tee-worker/identity/litentry/core/credentials/src/schema.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/schema.rs rename to tee-worker/identity/litentry/core/credentials/src/schema.rs diff --git a/tee-worker/litentry/core/credentials/src/templates/credential.json b/tee-worker/identity/litentry/core/credentials/src/templates/credential.json similarity index 100% rename from tee-worker/litentry/core/credentials/src/templates/credential.json rename to tee-worker/identity/litentry/core/credentials/src/templates/credential.json diff --git a/tee-worker/litentry/core/credentials/src/templates/credential_schema.json b/tee-worker/identity/litentry/core/credentials/src/templates/credential_schema.json similarity index 100% rename from tee-worker/litentry/core/credentials/src/templates/credential_schema.json rename to tee-worker/identity/litentry/core/credentials/src/templates/credential_schema.json diff --git a/tee-worker/litentry/core/credentials/src/vip3.rs b/tee-worker/identity/litentry/core/credentials/src/vip3.rs similarity index 100% rename from tee-worker/litentry/core/credentials/src/vip3.rs rename to tee-worker/identity/litentry/core/credentials/src/vip3.rs diff --git a/tee-worker/litentry/core/data-providers/Cargo.toml b/tee-worker/identity/litentry/core/data-providers/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/data-providers/Cargo.toml rename to tee-worker/identity/litentry/core/data-providers/Cargo.toml diff --git a/tee-worker/litentry/core/data-providers/src/achainable.rs b/tee-worker/identity/litentry/core/data-providers/src/achainable.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/achainable.rs rename to tee-worker/identity/litentry/core/data-providers/src/achainable.rs diff --git a/tee-worker/litentry/core/data-providers/src/achainable_names.rs b/tee-worker/identity/litentry/core/data-providers/src/achainable_names.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/achainable_names.rs rename to tee-worker/identity/litentry/core/data-providers/src/achainable_names.rs diff --git a/tee-worker/litentry/core/data-providers/src/blockchain_info.rs b/tee-worker/identity/litentry/core/data-providers/src/blockchain_info.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/blockchain_info.rs rename to tee-worker/identity/litentry/core/data-providers/src/blockchain_info.rs diff --git a/tee-worker/litentry/core/data-providers/src/daren_market.rs b/tee-worker/identity/litentry/core/data-providers/src/daren_market.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/daren_market.rs rename to tee-worker/identity/litentry/core/data-providers/src/daren_market.rs diff --git a/tee-worker/litentry/core/data-providers/src/discord_litentry.rs b/tee-worker/identity/litentry/core/data-providers/src/discord_litentry.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/discord_litentry.rs rename to tee-worker/identity/litentry/core/data-providers/src/discord_litentry.rs diff --git a/tee-worker/litentry/core/data-providers/src/discord_official.rs b/tee-worker/identity/litentry/core/data-providers/src/discord_official.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/discord_official.rs rename to tee-worker/identity/litentry/core/data-providers/src/discord_official.rs diff --git a/tee-worker/litentry/core/data-providers/src/geniidata.rs b/tee-worker/identity/litentry/core/data-providers/src/geniidata.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/geniidata.rs rename to tee-worker/identity/litentry/core/data-providers/src/geniidata.rs diff --git a/tee-worker/litentry/core/data-providers/src/karat_dao.rs b/tee-worker/identity/litentry/core/data-providers/src/karat_dao.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/karat_dao.rs rename to tee-worker/identity/litentry/core/data-providers/src/karat_dao.rs diff --git a/tee-worker/litentry/core/data-providers/src/lib.rs b/tee-worker/identity/litentry/core/data-providers/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/lib.rs rename to tee-worker/identity/litentry/core/data-providers/src/lib.rs diff --git a/tee-worker/litentry/core/data-providers/src/magic_craft.rs b/tee-worker/identity/litentry/core/data-providers/src/magic_craft.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/magic_craft.rs rename to tee-worker/identity/litentry/core/data-providers/src/magic_craft.rs diff --git a/tee-worker/litentry/core/data-providers/src/moralis.rs b/tee-worker/identity/litentry/core/data-providers/src/moralis.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/moralis.rs rename to tee-worker/identity/litentry/core/data-providers/src/moralis.rs diff --git a/tee-worker/litentry/core/data-providers/src/nodereal.rs b/tee-worker/identity/litentry/core/data-providers/src/nodereal.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/nodereal.rs rename to tee-worker/identity/litentry/core/data-providers/src/nodereal.rs diff --git a/tee-worker/litentry/core/data-providers/src/nodereal_jsonrpc.rs b/tee-worker/identity/litentry/core/data-providers/src/nodereal_jsonrpc.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/nodereal_jsonrpc.rs rename to tee-worker/identity/litentry/core/data-providers/src/nodereal_jsonrpc.rs diff --git a/tee-worker/litentry/core/data-providers/src/twitter_official.rs b/tee-worker/identity/litentry/core/data-providers/src/twitter_official.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/twitter_official.rs rename to tee-worker/identity/litentry/core/data-providers/src/twitter_official.rs diff --git a/tee-worker/litentry/core/data-providers/src/vip3.rs b/tee-worker/identity/litentry/core/data-providers/src/vip3.rs similarity index 100% rename from tee-worker/litentry/core/data-providers/src/vip3.rs rename to tee-worker/identity/litentry/core/data-providers/src/vip3.rs diff --git a/tee-worker/litentry/core/dynamic-assertion/Cargo.toml b/tee-worker/identity/litentry/core/dynamic-assertion/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/dynamic-assertion/Cargo.toml rename to tee-worker/identity/litentry/core/dynamic-assertion/Cargo.toml diff --git a/tee-worker/litentry/core/dynamic-assertion/src/lib.rs b/tee-worker/identity/litentry/core/dynamic-assertion/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/dynamic-assertion/src/lib.rs rename to tee-worker/identity/litentry/core/dynamic-assertion/src/lib.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/.gitignore b/tee-worker/identity/litentry/core/evm-dynamic-assertions/.gitignore similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/.gitignore rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/.gitignore diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/Cargo.toml b/tee-worker/identity/litentry/core/evm-dynamic-assertions/Cargo.toml similarity index 97% rename from tee-worker/litentry/core/evm-dynamic-assertions/Cargo.toml rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/Cargo.toml index 8bad962754..a1a18fa908 100644 --- a/tee-worker/litentry/core/evm-dynamic-assertions/Cargo.toml +++ b/tee-worker/identity/litentry/core/evm-dynamic-assertions/Cargo.toml @@ -44,7 +44,7 @@ litentry-primitives = { path = "../../primitives", default-features = false } http_req = { features = ["rust-tls"], branch = "master", git = "https://github.com/integritee-network/http_req" } lc-mock-server = { path = "../mock-server" } litentry-primitives = { path = "../../primitives" } -litentry-hex-utils = { path = "../../../../primitives/hex" } +litentry-hex-utils = { path = "../../../../../common/utils/hex" } [features] default = ["std"] diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/lib.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/lib.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/lib.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/mock.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/mock.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/mock.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/mock.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/hex_to_number.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/hex_to_number.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/hex_to_number.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/hex_to_number.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/http_get.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/http_get.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/http_get.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/http_get.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/http_post.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/http_post.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/http_post.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/http_post.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/identity_to_string.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/identity_to_string.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/identity_to_string.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/identity_to_string.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/json_utils.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/json_utils.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/json_utils.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/json_utils.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/logging.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/logging.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/logging.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/logging.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/macros.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/macros.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/macros.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/macros.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/mocks.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/mocks.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/mocks.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/mocks.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/mod.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/mod.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/mod.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/mod.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/parse_decimal.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/parse_decimal.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/parse_decimal.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/parse_decimal.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/parse_int.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/parse_int.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/parse_int.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/parse_int.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/to_hex.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/to_hex.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/precompiles/to_hex.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/precompiles/to_hex.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/repository.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/repository.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/repository.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/repository.rs diff --git a/tee-worker/litentry/core/evm-dynamic-assertions/src/sealing.rs b/tee-worker/identity/litentry/core/evm-dynamic-assertions/src/sealing.rs similarity index 100% rename from tee-worker/litentry/core/evm-dynamic-assertions/src/sealing.rs rename to tee-worker/identity/litentry/core/evm-dynamic-assertions/src/sealing.rs diff --git a/tee-worker/litentry/core/identity-verification/Cargo.toml b/tee-worker/identity/litentry/core/identity-verification/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/identity-verification/Cargo.toml rename to tee-worker/identity/litentry/core/identity-verification/Cargo.toml diff --git a/tee-worker/litentry/core/identity-verification/src/error.rs b/tee-worker/identity/litentry/core/identity-verification/src/error.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/error.rs rename to tee-worker/identity/litentry/core/identity-verification/src/error.rs diff --git a/tee-worker/litentry/core/identity-verification/src/lib.rs b/tee-worker/identity/litentry/core/identity-verification/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/lib.rs rename to tee-worker/identity/litentry/core/identity-verification/src/lib.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/discord.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/discord.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/discord.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/discord.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/email/mailer/mod.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/email/mailer/mod.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/email/mailer/mod.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/email/mailer/mod.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/email/mailer/sendgrid_mailer.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/email/mailer/sendgrid_mailer.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/email/mailer/sendgrid_mailer.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/email/mailer/sendgrid_mailer.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/email/mailer/template.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/email/mailer/template.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/email/mailer/template.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/email/mailer/template.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/email/mod.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/email/mod.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/email/mod.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/email/mod.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/email/verification_code_store.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/email/verification_code_store.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/email/verification_code_store.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/email/verification_code_store.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/helpers.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/helpers.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/helpers.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/helpers.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/mod.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/mod.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/mod.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/mod.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/twitter/mod.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/twitter/mod.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/twitter/mod.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/twitter/mod.rs diff --git a/tee-worker/litentry/core/identity-verification/src/web2/twitter/oauth_store.rs b/tee-worker/identity/litentry/core/identity-verification/src/web2/twitter/oauth_store.rs similarity index 100% rename from tee-worker/litentry/core/identity-verification/src/web2/twitter/oauth_store.rs rename to tee-worker/identity/litentry/core/identity-verification/src/web2/twitter/oauth_store.rs diff --git a/tee-worker/litentry/core/mock-server/Cargo.toml b/tee-worker/identity/litentry/core/mock-server/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/mock-server/Cargo.toml rename to tee-worker/identity/litentry/core/mock-server/Cargo.toml diff --git a/tee-worker/litentry/core/mock-server/src/achainable.rs b/tee-worker/identity/litentry/core/mock-server/src/achainable.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/achainable.rs rename to tee-worker/identity/litentry/core/mock-server/src/achainable.rs diff --git a/tee-worker/litentry/core/mock-server/src/blockchain_info.rs b/tee-worker/identity/litentry/core/mock-server/src/blockchain_info.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/blockchain_info.rs rename to tee-worker/identity/litentry/core/mock-server/src/blockchain_info.rs diff --git a/tee-worker/litentry/core/mock-server/src/daren_market.rs b/tee-worker/identity/litentry/core/mock-server/src/daren_market.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/daren_market.rs rename to tee-worker/identity/litentry/core/mock-server/src/daren_market.rs diff --git a/tee-worker/litentry/core/mock-server/src/discord_litentry.rs b/tee-worker/identity/litentry/core/mock-server/src/discord_litentry.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/discord_litentry.rs rename to tee-worker/identity/litentry/core/mock-server/src/discord_litentry.rs diff --git a/tee-worker/litentry/core/mock-server/src/discord_official.rs b/tee-worker/identity/litentry/core/mock-server/src/discord_official.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/discord_official.rs rename to tee-worker/identity/litentry/core/mock-server/src/discord_official.rs diff --git a/tee-worker/litentry/core/mock-server/src/geniidata.rs b/tee-worker/identity/litentry/core/mock-server/src/geniidata.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/geniidata.rs rename to tee-worker/identity/litentry/core/mock-server/src/geniidata.rs diff --git a/tee-worker/litentry/core/mock-server/src/karat_dao.rs b/tee-worker/identity/litentry/core/mock-server/src/karat_dao.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/karat_dao.rs rename to tee-worker/identity/litentry/core/mock-server/src/karat_dao.rs diff --git a/tee-worker/litentry/core/mock-server/src/lib.rs b/tee-worker/identity/litentry/core/mock-server/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/lib.rs rename to tee-worker/identity/litentry/core/mock-server/src/lib.rs diff --git a/tee-worker/litentry/core/mock-server/src/litentry_archive.rs b/tee-worker/identity/litentry/core/mock-server/src/litentry_archive.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/litentry_archive.rs rename to tee-worker/identity/litentry/core/mock-server/src/litentry_archive.rs diff --git a/tee-worker/litentry/core/mock-server/src/magic_craft.rs b/tee-worker/identity/litentry/core/mock-server/src/magic_craft.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/magic_craft.rs rename to tee-worker/identity/litentry/core/mock-server/src/magic_craft.rs diff --git a/tee-worker/litentry/core/mock-server/src/moralis.rs b/tee-worker/identity/litentry/core/mock-server/src/moralis.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/moralis.rs rename to tee-worker/identity/litentry/core/mock-server/src/moralis.rs diff --git a/tee-worker/litentry/core/mock-server/src/nodereal.rs b/tee-worker/identity/litentry/core/mock-server/src/nodereal.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/nodereal.rs rename to tee-worker/identity/litentry/core/mock-server/src/nodereal.rs diff --git a/tee-worker/litentry/core/mock-server/src/nodereal_jsonrpc.rs b/tee-worker/identity/litentry/core/mock-server/src/nodereal_jsonrpc.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/nodereal_jsonrpc.rs rename to tee-worker/identity/litentry/core/mock-server/src/nodereal_jsonrpc.rs diff --git a/tee-worker/litentry/core/mock-server/src/oneblock.rs b/tee-worker/identity/litentry/core/mock-server/src/oneblock.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/oneblock.rs rename to tee-worker/identity/litentry/core/mock-server/src/oneblock.rs diff --git a/tee-worker/litentry/core/mock-server/src/twitter_official.rs b/tee-worker/identity/litentry/core/mock-server/src/twitter_official.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/twitter_official.rs rename to tee-worker/identity/litentry/core/mock-server/src/twitter_official.rs diff --git a/tee-worker/litentry/core/mock-server/src/vip3.rs b/tee-worker/identity/litentry/core/mock-server/src/vip3.rs similarity index 100% rename from tee-worker/litentry/core/mock-server/src/vip3.rs rename to tee-worker/identity/litentry/core/mock-server/src/vip3.rs diff --git a/tee-worker/litentry/core/parachain-extrinsic-task/receiver/Cargo.toml b/tee-worker/identity/litentry/core/parachain-extrinsic-task/receiver/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/parachain-extrinsic-task/receiver/Cargo.toml rename to tee-worker/identity/litentry/core/parachain-extrinsic-task/receiver/Cargo.toml diff --git a/tee-worker/litentry/core/parachain-extrinsic-task/receiver/src/lib.rs b/tee-worker/identity/litentry/core/parachain-extrinsic-task/receiver/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/parachain-extrinsic-task/receiver/src/lib.rs rename to tee-worker/identity/litentry/core/parachain-extrinsic-task/receiver/src/lib.rs diff --git a/tee-worker/litentry/core/parachain-extrinsic-task/sender/Cargo.toml b/tee-worker/identity/litentry/core/parachain-extrinsic-task/sender/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/parachain-extrinsic-task/sender/Cargo.toml rename to tee-worker/identity/litentry/core/parachain-extrinsic-task/sender/Cargo.toml diff --git a/tee-worker/litentry/core/parachain-extrinsic-task/sender/src/lib.rs b/tee-worker/identity/litentry/core/parachain-extrinsic-task/sender/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/parachain-extrinsic-task/sender/src/lib.rs rename to tee-worker/identity/litentry/core/parachain-extrinsic-task/sender/src/lib.rs diff --git a/tee-worker/litentry/core/service/Cargo.toml b/tee-worker/identity/litentry/core/service/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/service/Cargo.toml rename to tee-worker/identity/litentry/core/service/Cargo.toml diff --git a/tee-worker/litentry/core/service/src/lib.rs b/tee-worker/identity/litentry/core/service/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/service/src/lib.rs rename to tee-worker/identity/litentry/core/service/src/lib.rs diff --git a/tee-worker/litentry/core/service/src/platform_user/daren_market_user.rs b/tee-worker/identity/litentry/core/service/src/platform_user/daren_market_user.rs similarity index 100% rename from tee-worker/litentry/core/service/src/platform_user/daren_market_user.rs rename to tee-worker/identity/litentry/core/service/src/platform_user/daren_market_user.rs diff --git a/tee-worker/litentry/core/service/src/platform_user/karat_dao_user.rs b/tee-worker/identity/litentry/core/service/src/platform_user/karat_dao_user.rs similarity index 100% rename from tee-worker/litentry/core/service/src/platform_user/karat_dao_user.rs rename to tee-worker/identity/litentry/core/service/src/platform_user/karat_dao_user.rs diff --git a/tee-worker/litentry/core/service/src/platform_user/magic_craft_staking_user.rs b/tee-worker/identity/litentry/core/service/src/platform_user/magic_craft_staking_user.rs similarity index 100% rename from tee-worker/litentry/core/service/src/platform_user/magic_craft_staking_user.rs rename to tee-worker/identity/litentry/core/service/src/platform_user/magic_craft_staking_user.rs diff --git a/tee-worker/litentry/core/service/src/platform_user/mod.rs b/tee-worker/identity/litentry/core/service/src/platform_user/mod.rs similarity index 100% rename from tee-worker/litentry/core/service/src/platform_user/mod.rs rename to tee-worker/identity/litentry/core/service/src/platform_user/mod.rs diff --git a/tee-worker/litentry/core/service/src/web3_nft/mod.rs b/tee-worker/identity/litentry/core/service/src/web3_nft/mod.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_nft/mod.rs rename to tee-worker/identity/litentry/core/service/src/web3_nft/mod.rs diff --git a/tee-worker/litentry/core/service/src/web3_nft/nft_holder/common.rs b/tee-worker/identity/litentry/core/service/src/web3_nft/nft_holder/common.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_nft/nft_holder/common.rs rename to tee-worker/identity/litentry/core/service/src/web3_nft/nft_holder/common.rs diff --git a/tee-worker/litentry/core/service/src/web3_nft/nft_holder/mod.rs b/tee-worker/identity/litentry/core/service/src/web3_nft/nft_holder/mod.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_nft/nft_holder/mod.rs rename to tee-worker/identity/litentry/core/service/src/web3_nft/nft_holder/mod.rs diff --git a/tee-worker/litentry/core/service/src/web3_token/mod.rs b/tee-worker/identity/litentry/core/service/src/web3_token/mod.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_token/mod.rs rename to tee-worker/identity/litentry/core/service/src/web3_token/mod.rs diff --git a/tee-worker/litentry/core/service/src/web3_token/token_balance/bnb_balance.rs b/tee-worker/identity/litentry/core/service/src/web3_token/token_balance/bnb_balance.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_token/token_balance/bnb_balance.rs rename to tee-worker/identity/litentry/core/service/src/web3_token/token_balance/bnb_balance.rs diff --git a/tee-worker/litentry/core/service/src/web3_token/token_balance/btc_balance.rs b/tee-worker/identity/litentry/core/service/src/web3_token/token_balance/btc_balance.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_token/token_balance/btc_balance.rs rename to tee-worker/identity/litentry/core/service/src/web3_token/token_balance/btc_balance.rs diff --git a/tee-worker/litentry/core/service/src/web3_token/token_balance/common.rs b/tee-worker/identity/litentry/core/service/src/web3_token/token_balance/common.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_token/token_balance/common.rs rename to tee-worker/identity/litentry/core/service/src/web3_token/token_balance/common.rs diff --git a/tee-worker/litentry/core/service/src/web3_token/token_balance/eth_balance.rs b/tee-worker/identity/litentry/core/service/src/web3_token/token_balance/eth_balance.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_token/token_balance/eth_balance.rs rename to tee-worker/identity/litentry/core/service/src/web3_token/token_balance/eth_balance.rs diff --git a/tee-worker/litentry/core/service/src/web3_token/token_balance/lit_balance.rs b/tee-worker/identity/litentry/core/service/src/web3_token/token_balance/lit_balance.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_token/token_balance/lit_balance.rs rename to tee-worker/identity/litentry/core/service/src/web3_token/token_balance/lit_balance.rs diff --git a/tee-worker/litentry/core/service/src/web3_token/token_balance/mod.rs b/tee-worker/identity/litentry/core/service/src/web3_token/token_balance/mod.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_token/token_balance/mod.rs rename to tee-worker/identity/litentry/core/service/src/web3_token/token_balance/mod.rs diff --git a/tee-worker/litentry/core/service/src/web3_token/token_balance/sol_balance.rs b/tee-worker/identity/litentry/core/service/src/web3_token/token_balance/sol_balance.rs similarity index 100% rename from tee-worker/litentry/core/service/src/web3_token/token_balance/sol_balance.rs rename to tee-worker/identity/litentry/core/service/src/web3_token/token_balance/sol_balance.rs diff --git a/tee-worker/litentry/core/stf-task/receiver/Cargo.toml b/tee-worker/identity/litentry/core/stf-task/receiver/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/stf-task/receiver/Cargo.toml rename to tee-worker/identity/litentry/core/stf-task/receiver/Cargo.toml diff --git a/tee-worker/litentry/core/stf-task/receiver/src/handler/assertion.rs b/tee-worker/identity/litentry/core/stf-task/receiver/src/handler/assertion.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/receiver/src/handler/assertion.rs rename to tee-worker/identity/litentry/core/stf-task/receiver/src/handler/assertion.rs diff --git a/tee-worker/litentry/core/stf-task/receiver/src/handler/identity_verification.rs b/tee-worker/identity/litentry/core/stf-task/receiver/src/handler/identity_verification.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/receiver/src/handler/identity_verification.rs rename to tee-worker/identity/litentry/core/stf-task/receiver/src/handler/identity_verification.rs diff --git a/tee-worker/litentry/core/stf-task/receiver/src/handler/mod.rs b/tee-worker/identity/litentry/core/stf-task/receiver/src/handler/mod.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/receiver/src/handler/mod.rs rename to tee-worker/identity/litentry/core/stf-task/receiver/src/handler/mod.rs diff --git a/tee-worker/litentry/core/stf-task/receiver/src/lib.rs b/tee-worker/identity/litentry/core/stf-task/receiver/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/receiver/src/lib.rs rename to tee-worker/identity/litentry/core/stf-task/receiver/src/lib.rs diff --git a/tee-worker/litentry/core/stf-task/receiver/src/mock.rs b/tee-worker/identity/litentry/core/stf-task/receiver/src/mock.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/receiver/src/mock.rs rename to tee-worker/identity/litentry/core/stf-task/receiver/src/mock.rs diff --git a/tee-worker/litentry/core/stf-task/receiver/src/test.rs b/tee-worker/identity/litentry/core/stf-task/receiver/src/test.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/receiver/src/test.rs rename to tee-worker/identity/litentry/core/stf-task/receiver/src/test.rs diff --git a/tee-worker/litentry/core/stf-task/sender/Cargo.toml b/tee-worker/identity/litentry/core/stf-task/sender/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/stf-task/sender/Cargo.toml rename to tee-worker/identity/litentry/core/stf-task/sender/Cargo.toml diff --git a/tee-worker/litentry/core/stf-task/sender/src/error.rs b/tee-worker/identity/litentry/core/stf-task/sender/src/error.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/sender/src/error.rs rename to tee-worker/identity/litentry/core/stf-task/sender/src/error.rs diff --git a/tee-worker/litentry/core/stf-task/sender/src/lib.rs b/tee-worker/identity/litentry/core/stf-task/sender/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/sender/src/lib.rs rename to tee-worker/identity/litentry/core/stf-task/sender/src/lib.rs diff --git a/tee-worker/litentry/core/stf-task/sender/src/request.rs b/tee-worker/identity/litentry/core/stf-task/sender/src/request.rs similarity index 100% rename from tee-worker/litentry/core/stf-task/sender/src/request.rs rename to tee-worker/identity/litentry/core/stf-task/sender/src/request.rs diff --git a/tee-worker/litentry/core/teebag-storage/Cargo.toml b/tee-worker/identity/litentry/core/teebag-storage/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/teebag-storage/Cargo.toml rename to tee-worker/identity/litentry/core/teebag-storage/Cargo.toml diff --git a/tee-worker/litentry/core/teebag-storage/src/lib.rs b/tee-worker/identity/litentry/core/teebag-storage/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/teebag-storage/src/lib.rs rename to tee-worker/identity/litentry/core/teebag-storage/src/lib.rs diff --git a/tee-worker/litentry/core/vc-task/receiver/Cargo.toml b/tee-worker/identity/litentry/core/vc-task/receiver/Cargo.toml similarity index 97% rename from tee-worker/litentry/core/vc-task/receiver/Cargo.toml rename to tee-worker/identity/litentry/core/vc-task/receiver/Cargo.toml index b90cc042af..eed2ef1760 100644 --- a/tee-worker/litentry/core/vc-task/receiver/Cargo.toml +++ b/tee-worker/identity/litentry/core/vc-task/receiver/Cargo.toml @@ -40,7 +40,7 @@ lc-parachain-extrinsic-task-sender = { path = "../../parachain-extrinsic-task/se lc-stf-task-receiver = { path = "../../stf-task/receiver", default-features = false } lc-stf-task-sender = { path = "../../stf-task/sender", default-features = false } lc-vc-task-sender = { path = "../sender", default-features = false } -litentry-macros = { path = "../../../../../primitives/core/macros", default-features = false } +litentry-macros = { path = "../../../../../../common/primitives/core/macros", default-features = false } litentry-primitives = { path = "../../../primitives", default-features = false } pallet-identity-management-tee = { path = "../../../pallets/identity-management", default-features = false } diff --git a/tee-worker/litentry/core/vc-task/receiver/src/lib.rs b/tee-worker/identity/litentry/core/vc-task/receiver/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/vc-task/receiver/src/lib.rs rename to tee-worker/identity/litentry/core/vc-task/receiver/src/lib.rs diff --git a/tee-worker/litentry/core/vc-task/sender/Cargo.toml b/tee-worker/identity/litentry/core/vc-task/sender/Cargo.toml similarity index 100% rename from tee-worker/litentry/core/vc-task/sender/Cargo.toml rename to tee-worker/identity/litentry/core/vc-task/sender/Cargo.toml diff --git a/tee-worker/litentry/core/vc-task/sender/src/lib.rs b/tee-worker/identity/litentry/core/vc-task/sender/src/lib.rs similarity index 100% rename from tee-worker/litentry/core/vc-task/sender/src/lib.rs rename to tee-worker/identity/litentry/core/vc-task/sender/src/lib.rs diff --git a/tee-worker/litentry/pallets/identity-management/Cargo.toml b/tee-worker/identity/litentry/pallets/identity-management/Cargo.toml similarity index 100% rename from tee-worker/litentry/pallets/identity-management/Cargo.toml rename to tee-worker/identity/litentry/pallets/identity-management/Cargo.toml diff --git a/tee-worker/litentry/pallets/identity-management/src/identity_context.rs b/tee-worker/identity/litentry/pallets/identity-management/src/identity_context.rs similarity index 100% rename from tee-worker/litentry/pallets/identity-management/src/identity_context.rs rename to tee-worker/identity/litentry/pallets/identity-management/src/identity_context.rs diff --git a/tee-worker/litentry/pallets/identity-management/src/lib.rs b/tee-worker/identity/litentry/pallets/identity-management/src/lib.rs similarity index 100% rename from tee-worker/litentry/pallets/identity-management/src/lib.rs rename to tee-worker/identity/litentry/pallets/identity-management/src/lib.rs diff --git a/tee-worker/litentry/pallets/identity-management/src/migrations.rs b/tee-worker/identity/litentry/pallets/identity-management/src/migrations.rs similarity index 100% rename from tee-worker/litentry/pallets/identity-management/src/migrations.rs rename to tee-worker/identity/litentry/pallets/identity-management/src/migrations.rs diff --git a/tee-worker/litentry/pallets/identity-management/src/mock.rs b/tee-worker/identity/litentry/pallets/identity-management/src/mock.rs similarity index 100% rename from tee-worker/litentry/pallets/identity-management/src/mock.rs rename to tee-worker/identity/litentry/pallets/identity-management/src/mock.rs diff --git a/tee-worker/litentry/pallets/identity-management/src/tests.rs b/tee-worker/identity/litentry/pallets/identity-management/src/tests.rs similarity index 100% rename from tee-worker/litentry/pallets/identity-management/src/tests.rs rename to tee-worker/identity/litentry/pallets/identity-management/src/tests.rs diff --git a/tee-worker/litentry/primitives/Cargo.toml b/tee-worker/identity/litentry/primitives/Cargo.toml similarity index 100% rename from tee-worker/litentry/primitives/Cargo.toml rename to tee-worker/identity/litentry/primitives/Cargo.toml diff --git a/tee-worker/litentry/primitives/src/aes.rs b/tee-worker/identity/litentry/primitives/src/aes.rs similarity index 100% rename from tee-worker/litentry/primitives/src/aes.rs rename to tee-worker/identity/litentry/primitives/src/aes.rs diff --git a/tee-worker/litentry/primitives/src/aes_request.rs b/tee-worker/identity/litentry/primitives/src/aes_request.rs similarity index 100% rename from tee-worker/litentry/primitives/src/aes_request.rs rename to tee-worker/identity/litentry/primitives/src/aes_request.rs diff --git a/tee-worker/litentry/primitives/src/bitcoin_address.rs b/tee-worker/identity/litentry/primitives/src/bitcoin_address.rs similarity index 100% rename from tee-worker/litentry/primitives/src/bitcoin_address.rs rename to tee-worker/identity/litentry/primitives/src/bitcoin_address.rs diff --git a/tee-worker/litentry/primitives/src/bitcoin_signature.rs b/tee-worker/identity/litentry/primitives/src/bitcoin_signature.rs similarity index 100% rename from tee-worker/litentry/primitives/src/bitcoin_signature.rs rename to tee-worker/identity/litentry/primitives/src/bitcoin_signature.rs diff --git a/tee-worker/litentry/primitives/src/ethereum_signature.rs b/tee-worker/identity/litentry/primitives/src/ethereum_signature.rs similarity index 100% rename from tee-worker/litentry/primitives/src/ethereum_signature.rs rename to tee-worker/identity/litentry/primitives/src/ethereum_signature.rs diff --git a/tee-worker/litentry/primitives/src/lib.rs b/tee-worker/identity/litentry/primitives/src/lib.rs similarity index 100% rename from tee-worker/litentry/primitives/src/lib.rs rename to tee-worker/identity/litentry/primitives/src/lib.rs diff --git a/tee-worker/litentry/primitives/src/validation_data.rs b/tee-worker/identity/litentry/primitives/src/validation_data.rs similarity index 100% rename from tee-worker/litentry/primitives/src/validation_data.rs rename to tee-worker/identity/litentry/primitives/src/validation_data.rs diff --git a/tee-worker/rust-sgx-sdk/Readme.md b/tee-worker/identity/rust-sgx-sdk/Readme.md similarity index 100% rename from tee-worker/rust-sgx-sdk/Readme.md rename to tee-worker/identity/rust-sgx-sdk/Readme.md diff --git a/tee-worker/rust-sgx-sdk/buildenv.mk b/tee-worker/identity/rust-sgx-sdk/buildenv.mk similarity index 100% rename from tee-worker/rust-sgx-sdk/buildenv.mk rename to tee-worker/identity/rust-sgx-sdk/buildenv.mk diff --git a/tee-worker/rust-sgx-sdk/common/inc/assert.h b/tee-worker/identity/rust-sgx-sdk/common/inc/assert.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/assert.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/assert.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/complex.h b/tee-worker/identity/rust-sgx-sdk/common/inc/complex.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/complex.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/complex.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/ctype.h b/tee-worker/identity/rust-sgx-sdk/common/inc/ctype.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/ctype.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/ctype.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/dirent.h b/tee-worker/identity/rust-sgx-sdk/common/inc/dirent.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/dirent.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/dirent.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/endian.h b/tee-worker/identity/rust-sgx-sdk/common/inc/endian.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/endian.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/endian.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/errno.h b/tee-worker/identity/rust-sgx-sdk/common/inc/errno.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/errno.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/errno.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/fenv.h b/tee-worker/identity/rust-sgx-sdk/common/inc/fenv.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/fenv.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/fenv.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/float.h b/tee-worker/identity/rust-sgx-sdk/common/inc/float.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/float.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/float.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/inttypes.h b/tee-worker/identity/rust-sgx-sdk/common/inc/inttypes.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/inttypes.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/inttypes.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/iso646.h b/tee-worker/identity/rust-sgx-sdk/common/inc/iso646.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/iso646.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/iso646.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/limits.h b/tee-worker/identity/rust-sgx-sdk/common/inc/limits.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/limits.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/limits.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/math.h b/tee-worker/identity/rust-sgx-sdk/common/inc/math.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/math.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/math.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/mbusafecrt.h b/tee-worker/identity/rust-sgx-sdk/common/inc/mbusafecrt.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/mbusafecrt.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/mbusafecrt.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/netdb.h b/tee-worker/identity/rust-sgx-sdk/common/inc/netdb.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/netdb.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/netdb.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/poll.h b/tee-worker/identity/rust-sgx-sdk/common/inc/poll.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/poll.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/poll.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/pthread.h b/tee-worker/identity/rust-sgx-sdk/common/inc/pthread.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/pthread.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/pthread.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/pwd.h b/tee-worker/identity/rust-sgx-sdk/common/inc/pwd.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/pwd.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/pwd.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sched.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sched.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sched.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sched.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/setjmp.h b/tee-worker/identity/rust-sgx-sdk/common/inc/setjmp.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/setjmp.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/setjmp.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/signal.h b/tee-worker/identity/rust-sgx-sdk/common/inc/signal.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/signal.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/signal.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/stdalign.h b/tee-worker/identity/rust-sgx-sdk/common/inc/stdalign.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/stdalign.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/stdalign.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/stdarg.h b/tee-worker/identity/rust-sgx-sdk/common/inc/stdarg.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/stdarg.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/stdarg.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/stdbool.h b/tee-worker/identity/rust-sgx-sdk/common/inc/stdbool.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/stdbool.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/stdbool.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/stddef.h b/tee-worker/identity/rust-sgx-sdk/common/inc/stddef.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/stddef.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/stddef.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/stdint.h b/tee-worker/identity/rust-sgx-sdk/common/inc/stdint.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/stdint.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/stdint.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/stdio.h b/tee-worker/identity/rust-sgx-sdk/common/inc/stdio.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/stdio.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/stdio.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/stdlib.h b/tee-worker/identity/rust-sgx-sdk/common/inc/stdlib.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/stdlib.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/stdlib.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/string.h b/tee-worker/identity/rust-sgx-sdk/common/inc/string.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/string.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/string.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/_types.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/_types.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/_types.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/_types.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/cdefs.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/cdefs.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/cdefs.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/cdefs.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/endian.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/endian.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/endian.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/endian.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/epoll.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/epoll.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/epoll.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/epoll.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/fpu.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/fpu.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/fpu.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/fpu.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/ieee.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/ieee.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/ieee.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/ieee.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/limits.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/limits.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/limits.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/limits.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/sockaddr.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/sockaddr.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/sockaddr.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/sockaddr.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/socket.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/socket.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/socket.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/socket.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/stat.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/stat.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/stat.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/stat.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/stdint.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/stdint.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/stdint.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/stdint.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/struct_timespec.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/struct_timespec.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/struct_timespec.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/struct_timespec.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/types.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/types.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/types.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/types.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/sys/uio.h b/tee-worker/identity/rust-sgx-sdk/common/inc/sys/uio.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/sys/uio.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/sys/uio.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/time.h b/tee-worker/identity/rust-sgx-sdk/common/inc/time.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/time.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/time.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/unistd.h b/tee-worker/identity/rust-sgx-sdk/common/inc/unistd.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/unistd.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/unistd.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/wchar.h b/tee-worker/identity/rust-sgx-sdk/common/inc/wchar.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/wchar.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/wchar.h diff --git a/tee-worker/rust-sgx-sdk/common/inc/wctype.h b/tee-worker/identity/rust-sgx-sdk/common/inc/wctype.h similarity index 100% rename from tee-worker/rust-sgx-sdk/common/inc/wctype.h rename to tee-worker/identity/rust-sgx-sdk/common/inc/wctype.h diff --git a/tee-worker/rust-sgx-sdk/edl/inc/dirent.h b/tee-worker/identity/rust-sgx-sdk/edl/inc/dirent.h similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/inc/dirent.h rename to tee-worker/identity/rust-sgx-sdk/edl/inc/dirent.h diff --git a/tee-worker/rust-sgx-sdk/edl/inc/stat.h b/tee-worker/identity/rust-sgx-sdk/edl/inc/stat.h similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/inc/stat.h rename to tee-worker/identity/rust-sgx-sdk/edl/inc/stat.h diff --git a/tee-worker/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl b/tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl rename to tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl diff --git a/tee-worker/rust-sgx-sdk/edl/intel/sgx_pthread.edl b/tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_pthread.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/intel/sgx_pthread.edl rename to tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_pthread.edl diff --git a/tee-worker/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl b/tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl rename to tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl diff --git a/tee-worker/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl b/tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl rename to tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl diff --git a/tee-worker/rust-sgx-sdk/edl/intel/sgx_tstdc.edl b/tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_tstdc.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/intel/sgx_tstdc.edl rename to tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_tstdc.edl diff --git a/tee-worker/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl b/tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl rename to tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl diff --git a/tee-worker/rust-sgx-sdk/edl/intel/sgx_ttls.edl b/tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_ttls.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/intel/sgx_ttls.edl rename to tee-worker/identity/rust-sgx-sdk/edl/intel/sgx_ttls.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_asyncio.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_asyncio.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_asyncio.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_asyncio.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_backtrace.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_backtrace.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_backtrace.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_backtrace.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_env.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_env.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_env.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_env.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_fd.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_fd.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_fd.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_fd.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_file.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_file.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_file.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_file.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_fs.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_fs.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_fs.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_fs.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_mem.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_mem.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_mem.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_mem.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_net.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_net.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_net.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_net.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_net_switchless.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_net_switchless.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_net_switchless.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_net_switchless.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_pipe.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_pipe.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_pipe.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_pipe.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_process.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_process.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_process.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_process.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_signal.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_signal.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_signal.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_signal.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_socket.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_socket.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_socket.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_socket.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_stdio.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_stdio.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_stdio.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_stdio.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_sys.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_sys.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_sys.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_sys.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_thread.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_thread.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_thread.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_thread.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_time.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_time.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_time.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_time.edl diff --git a/tee-worker/rust-sgx-sdk/edl/sgx_tstd.edl b/tee-worker/identity/rust-sgx-sdk/edl/sgx_tstd.edl similarity index 100% rename from tee-worker/rust-sgx-sdk/edl/sgx_tstd.edl rename to tee-worker/identity/rust-sgx-sdk/edl/sgx_tstd.edl diff --git a/tee-worker/rust-sgx-sdk/version b/tee-worker/identity/rust-sgx-sdk/version similarity index 100% rename from tee-worker/rust-sgx-sdk/version rename to tee-worker/identity/rust-sgx-sdk/version diff --git a/tee-worker/rust-toolchain.toml b/tee-worker/identity/rust-toolchain.toml similarity index 100% rename from tee-worker/rust-toolchain.toml rename to tee-worker/identity/rust-toolchain.toml diff --git a/tee-worker/rustfmt.toml b/tee-worker/identity/rustfmt.toml similarity index 100% rename from tee-worker/rustfmt.toml rename to tee-worker/identity/rustfmt.toml diff --git a/tee-worker/samples/teeracle/README.md b/tee-worker/identity/samples/teeracle/README.md similarity index 100% rename from tee-worker/samples/teeracle/README.md rename to tee-worker/identity/samples/teeracle/README.md diff --git a/tee-worker/samples/teeracle/install-teeracle.sh b/tee-worker/identity/samples/teeracle/install-teeracle.sh similarity index 100% rename from tee-worker/samples/teeracle/install-teeracle.sh rename to tee-worker/identity/samples/teeracle/install-teeracle.sh diff --git a/tee-worker/samples/teeracle/kubernetes/Chart.yaml b/tee-worker/identity/samples/teeracle/kubernetes/Chart.yaml similarity index 100% rename from tee-worker/samples/teeracle/kubernetes/Chart.yaml rename to tee-worker/identity/samples/teeracle/kubernetes/Chart.yaml diff --git a/tee-worker/samples/teeracle/kubernetes/templates/teeracle.yaml b/tee-worker/identity/samples/teeracle/kubernetes/templates/teeracle.yaml similarity index 100% rename from tee-worker/samples/teeracle/kubernetes/templates/teeracle.yaml rename to tee-worker/identity/samples/teeracle/kubernetes/templates/teeracle.yaml diff --git a/tee-worker/samples/teeracle/kubernetes/values.yaml b/tee-worker/identity/samples/teeracle/kubernetes/values.yaml similarity index 100% rename from tee-worker/samples/teeracle/kubernetes/values.yaml rename to tee-worker/identity/samples/teeracle/kubernetes/values.yaml diff --git a/tee-worker/scripts/benchmark_local-setup.sh b/tee-worker/identity/scripts/benchmark_local-setup.sh similarity index 100% rename from tee-worker/scripts/benchmark_local-setup.sh rename to tee-worker/identity/scripts/benchmark_local-setup.sh diff --git a/tee-worker/scripts/changelog/.gitignore b/tee-worker/identity/scripts/changelog/.gitignore similarity index 100% rename from tee-worker/scripts/changelog/.gitignore rename to tee-worker/identity/scripts/changelog/.gitignore diff --git a/tee-worker/scripts/changelog/Gemfile b/tee-worker/identity/scripts/changelog/Gemfile similarity index 100% rename from tee-worker/scripts/changelog/Gemfile rename to tee-worker/identity/scripts/changelog/Gemfile diff --git a/tee-worker/scripts/changelog/Gemfile.lock b/tee-worker/identity/scripts/changelog/Gemfile.lock similarity index 100% rename from tee-worker/scripts/changelog/Gemfile.lock rename to tee-worker/identity/scripts/changelog/Gemfile.lock diff --git a/tee-worker/scripts/changelog/README.md b/tee-worker/identity/scripts/changelog/README.md similarity index 100% rename from tee-worker/scripts/changelog/README.md rename to tee-worker/identity/scripts/changelog/README.md diff --git a/tee-worker/scripts/changelog/bin/changelog b/tee-worker/identity/scripts/changelog/bin/changelog similarity index 100% rename from tee-worker/scripts/changelog/bin/changelog rename to tee-worker/identity/scripts/changelog/bin/changelog diff --git a/tee-worker/scripts/changelog/digests/.gitignore b/tee-worker/identity/scripts/changelog/digests/.gitignore similarity index 100% rename from tee-worker/scripts/changelog/digests/.gitignore rename to tee-worker/identity/scripts/changelog/digests/.gitignore diff --git a/tee-worker/scripts/changelog/digests/.gitkeep b/tee-worker/identity/scripts/changelog/digests/.gitkeep similarity index 100% rename from tee-worker/scripts/changelog/digests/.gitkeep rename to tee-worker/identity/scripts/changelog/digests/.gitkeep diff --git a/tee-worker/scripts/changelog/lib/changelog.rb b/tee-worker/identity/scripts/changelog/lib/changelog.rb similarity index 100% rename from tee-worker/scripts/changelog/lib/changelog.rb rename to tee-worker/identity/scripts/changelog/lib/changelog.rb diff --git a/tee-worker/scripts/changelog/templates/_free_notes.md.tera b/tee-worker/identity/scripts/changelog/templates/_free_notes.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/_free_notes.md.tera rename to tee-worker/identity/scripts/changelog/templates/_free_notes.md.tera diff --git a/tee-worker/scripts/changelog/templates/challenge_level.md.tera b/tee-worker/identity/scripts/changelog/templates/challenge_level.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/challenge_level.md.tera rename to tee-worker/identity/scripts/changelog/templates/challenge_level.md.tera diff --git a/tee-worker/scripts/changelog/templates/change.md.tera b/tee-worker/identity/scripts/changelog/templates/change.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/change.md.tera rename to tee-worker/identity/scripts/changelog/templates/change.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes.md.tera b/tee-worker/identity/scripts/changelog/templates/changes.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes_applibs.md.tera b/tee-worker/identity/scripts/changelog/templates/changes_applibs.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes_applibs.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes_applibs.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes_client.md.tera b/tee-worker/identity/scripts/changelog/templates/changes_client.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes_client.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes_client.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes_core.md.tera b/tee-worker/identity/scripts/changelog/templates/changes_core.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes_core.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes_core.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes_evm.md.tera b/tee-worker/identity/scripts/changelog/templates/changes_evm.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes_evm.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes_evm.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes_misc.md.tera b/tee-worker/identity/scripts/changelog/templates/changes_misc.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes_misc.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes_misc.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes_offchain.md.tera b/tee-worker/identity/scripts/changelog/templates/changes_offchain.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes_offchain.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes_offchain.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes_sidechain.md.tera b/tee-worker/identity/scripts/changelog/templates/changes_sidechain.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes_sidechain.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes_sidechain.md.tera diff --git a/tee-worker/scripts/changelog/templates/changes_teeracle.md.tera b/tee-worker/identity/scripts/changelog/templates/changes_teeracle.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/changes_teeracle.md.tera rename to tee-worker/identity/scripts/changelog/templates/changes_teeracle.md.tera diff --git a/tee-worker/scripts/changelog/templates/debug.md.tera b/tee-worker/identity/scripts/changelog/templates/debug.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/debug.md.tera rename to tee-worker/identity/scripts/changelog/templates/debug.md.tera diff --git a/tee-worker/scripts/changelog/templates/global_challenge_level.md.tera b/tee-worker/identity/scripts/changelog/templates/global_challenge_level.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/global_challenge_level.md.tera rename to tee-worker/identity/scripts/changelog/templates/global_challenge_level.md.tera diff --git a/tee-worker/scripts/changelog/templates/global_priority.md.tera b/tee-worker/identity/scripts/changelog/templates/global_priority.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/global_priority.md.tera rename to tee-worker/identity/scripts/changelog/templates/global_priority.md.tera diff --git a/tee-worker/scripts/changelog/templates/high_priority.md.tera b/tee-worker/identity/scripts/changelog/templates/high_priority.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/high_priority.md.tera rename to tee-worker/identity/scripts/changelog/templates/high_priority.md.tera diff --git a/tee-worker/scripts/changelog/templates/pre_release.md.tera b/tee-worker/identity/scripts/changelog/templates/pre_release.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/pre_release.md.tera rename to tee-worker/identity/scripts/changelog/templates/pre_release.md.tera diff --git a/tee-worker/scripts/changelog/templates/template.md.tera b/tee-worker/identity/scripts/changelog/templates/template.md.tera similarity index 100% rename from tee-worker/scripts/changelog/templates/template.md.tera rename to tee-worker/identity/scripts/changelog/templates/template.md.tera diff --git a/tee-worker/scripts/init_env.sh b/tee-worker/identity/scripts/init_env.sh similarity index 100% rename from tee-worker/scripts/init_env.sh rename to tee-worker/identity/scripts/init_env.sh diff --git a/tee-worker/scripts/litentry/identity_test.sh b/tee-worker/identity/scripts/litentry/identity_test.sh similarity index 100% rename from tee-worker/scripts/litentry/identity_test.sh rename to tee-worker/identity/scripts/litentry/identity_test.sh diff --git a/tee-worker/scripts/litentry/release/ReadMe.md b/tee-worker/identity/scripts/litentry/release/ReadMe.md similarity index 100% rename from tee-worker/scripts/litentry/release/ReadMe.md rename to tee-worker/identity/scripts/litentry/release/ReadMe.md diff --git a/tee-worker/scripts/litentry/release/build.sh b/tee-worker/identity/scripts/litentry/release/build.sh similarity index 100% rename from tee-worker/scripts/litentry/release/build.sh rename to tee-worker/identity/scripts/litentry/release/build.sh diff --git a/tee-worker/scripts/litentry/release/template/para-alice.service b/tee-worker/identity/scripts/litentry/release/template/para-alice.service similarity index 100% rename from tee-worker/scripts/litentry/release/template/para-alice.service rename to tee-worker/identity/scripts/litentry/release/template/para-alice.service diff --git a/tee-worker/scripts/litentry/release/template/relay-alice.service b/tee-worker/identity/scripts/litentry/release/template/relay-alice.service similarity index 100% rename from tee-worker/scripts/litentry/release/template/relay-alice.service rename to tee-worker/identity/scripts/litentry/release/template/relay-alice.service diff --git a/tee-worker/scripts/litentry/release/template/relay-bob.service b/tee-worker/identity/scripts/litentry/release/template/relay-bob.service similarity index 100% rename from tee-worker/scripts/litentry/release/template/relay-bob.service rename to tee-worker/identity/scripts/litentry/release/template/relay-bob.service diff --git a/tee-worker/scripts/litentry/release/template/worker.service b/tee-worker/identity/scripts/litentry/release/template/worker.service similarity index 100% rename from tee-worker/scripts/litentry/release/template/worker.service rename to tee-worker/identity/scripts/litentry/release/template/worker.service diff --git a/tee-worker/scripts/litentry/ubuntu_setup.sh b/tee-worker/identity/scripts/litentry/ubuntu_setup.sh similarity index 100% rename from tee-worker/scripts/litentry/ubuntu_setup.sh rename to tee-worker/identity/scripts/litentry/ubuntu_setup.sh diff --git a/tee-worker/scripts/m8.sh b/tee-worker/identity/scripts/m8.sh similarity index 100% rename from tee-worker/scripts/m8.sh rename to tee-worker/identity/scripts/m8.sh diff --git a/tee-worker/scripts/polkadot_update.sh b/tee-worker/identity/scripts/polkadot_update.sh similarity index 100% rename from tee-worker/scripts/polkadot_update.sh rename to tee-worker/identity/scripts/polkadot_update.sh diff --git a/tee-worker/scripts/sidechain.sh b/tee-worker/identity/scripts/sidechain.sh similarity index 100% rename from tee-worker/scripts/sidechain.sh rename to tee-worker/identity/scripts/sidechain.sh diff --git a/tee-worker/scripts/teeracle.sh b/tee-worker/identity/scripts/teeracle.sh similarity index 100% rename from tee-worker/scripts/teeracle.sh rename to tee-worker/identity/scripts/teeracle.sh diff --git a/tee-worker/scripts/test_transfer/README.md b/tee-worker/identity/scripts/test_transfer/README.md similarity index 100% rename from tee-worker/scripts/test_transfer/README.md rename to tee-worker/identity/scripts/test_transfer/README.md diff --git a/tee-worker/scripts/test_transfer/package-lock.json b/tee-worker/identity/scripts/test_transfer/package-lock.json similarity index 100% rename from tee-worker/scripts/test_transfer/package-lock.json rename to tee-worker/identity/scripts/test_transfer/package-lock.json diff --git a/tee-worker/scripts/test_transfer/package.json b/tee-worker/identity/scripts/test_transfer/package.json similarity index 100% rename from tee-worker/scripts/test_transfer/package.json rename to tee-worker/identity/scripts/test_transfer/package.json diff --git a/tee-worker/scripts/test_transfer/transfer.js b/tee-worker/identity/scripts/test_transfer/transfer.js similarity index 100% rename from tee-worker/scripts/test_transfer/transfer.js rename to tee-worker/identity/scripts/test_transfer/transfer.js diff --git a/tee-worker/service/Cargo.toml b/tee-worker/identity/service/Cargo.toml similarity index 98% rename from tee-worker/service/Cargo.toml rename to tee-worker/identity/service/Cargo.toml index 4f3960b4a6..6bbf0edcee 100644 --- a/tee-worker/service/Cargo.toml +++ b/tee-worker/identity/service/Cargo.toml @@ -77,7 +77,7 @@ config = "0.13.3" lc-data-providers = { path = "../litentry/core/data-providers" } lc-mock-server = { path = "../litentry/core/mock-server" } lc-stf-task-sender = { path = "../litentry/core/stf-task/sender", default-features = false } -litentry-macros = { path = "../../primitives/core/macros", default-features = false } +litentry-macros = { path = "../../../common/primitives/core/macros", default-features = false } litentry-primitives = { path = "../litentry/primitives" } [features] diff --git a/tee-worker/service/build.rs b/tee-worker/identity/service/build.rs similarity index 100% rename from tee-worker/service/build.rs rename to tee-worker/identity/service/build.rs diff --git a/tee-worker/service/src/account_funding.rs b/tee-worker/identity/service/src/account_funding.rs similarity index 100% rename from tee-worker/service/src/account_funding.rs rename to tee-worker/identity/service/src/account_funding.rs diff --git a/tee-worker/service/src/cli.yml b/tee-worker/identity/service/src/cli.yml similarity index 100% rename from tee-worker/service/src/cli.yml rename to tee-worker/identity/service/src/cli.yml diff --git a/tee-worker/service/src/config.rs b/tee-worker/identity/service/src/config.rs similarity index 100% rename from tee-worker/service/src/config.rs rename to tee-worker/identity/service/src/config.rs diff --git a/tee-worker/service/src/enclave/api.rs b/tee-worker/identity/service/src/enclave/api.rs similarity index 100% rename from tee-worker/service/src/enclave/api.rs rename to tee-worker/identity/service/src/enclave/api.rs diff --git a/tee-worker/service/src/enclave/mod.rs b/tee-worker/identity/service/src/enclave/mod.rs similarity index 100% rename from tee-worker/service/src/enclave/mod.rs rename to tee-worker/identity/service/src/enclave/mod.rs diff --git a/tee-worker/service/src/enclave/tls_ra.rs b/tee-worker/identity/service/src/enclave/tls_ra.rs similarity index 100% rename from tee-worker/service/src/enclave/tls_ra.rs rename to tee-worker/identity/service/src/enclave/tls_ra.rs diff --git a/tee-worker/service/src/error.rs b/tee-worker/identity/service/src/error.rs similarity index 100% rename from tee-worker/service/src/error.rs rename to tee-worker/identity/service/src/error.rs diff --git a/tee-worker/service/src/globals/mod.rs b/tee-worker/identity/service/src/globals/mod.rs similarity index 100% rename from tee-worker/service/src/globals/mod.rs rename to tee-worker/identity/service/src/globals/mod.rs diff --git a/tee-worker/service/src/globals/tokio_handle.rs b/tee-worker/identity/service/src/globals/tokio_handle.rs similarity index 100% rename from tee-worker/service/src/globals/tokio_handle.rs rename to tee-worker/identity/service/src/globals/tokio_handle.rs diff --git a/tee-worker/service/src/initialized_service.rs b/tee-worker/identity/service/src/initialized_service.rs similarity index 100% rename from tee-worker/service/src/initialized_service.rs rename to tee-worker/identity/service/src/initialized_service.rs diff --git a/tee-worker/service/src/main.rs b/tee-worker/identity/service/src/main.rs similarity index 100% rename from tee-worker/service/src/main.rs rename to tee-worker/identity/service/src/main.rs diff --git a/tee-worker/service/src/main_impl.rs b/tee-worker/identity/service/src/main_impl.rs similarity index 100% rename from tee-worker/service/src/main_impl.rs rename to tee-worker/identity/service/src/main_impl.rs diff --git a/tee-worker/service/src/ocall_bridge/bridge_api.rs b/tee-worker/identity/service/src/ocall_bridge/bridge_api.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/bridge_api.rs rename to tee-worker/identity/service/src/ocall_bridge/bridge_api.rs diff --git a/tee-worker/service/src/ocall_bridge/component_factory.rs b/tee-worker/identity/service/src/ocall_bridge/component_factory.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/component_factory.rs rename to tee-worker/identity/service/src/ocall_bridge/component_factory.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/fetch_sidechain_blocks_from_peer.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/fetch_sidechain_blocks_from_peer.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/fetch_sidechain_blocks_from_peer.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/fetch_sidechain_blocks_from_peer.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/get_ias_socket.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/get_ias_socket.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/get_ias_socket.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/get_ias_socket.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/get_peers.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/get_peers.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/get_peers.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/get_peers.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/get_quote.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/get_quote.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/get_quote.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/get_quote.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/get_qve_report_on_quote.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/get_qve_report_on_quote.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/get_qve_report_on_quote.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/get_qve_report_on_quote.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/get_update_info.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/get_update_info.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/get_update_info.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/get_update_info.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/init_quote.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/init_quote.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/init_quote.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/init_quote.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/ipfs.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/ipfs.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/ipfs.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/ipfs.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/mod.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/mod.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/mod.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/mod.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/propose_sidechain_blocks.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/propose_sidechain_blocks.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/propose_sidechain_blocks.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/propose_sidechain_blocks.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/send_to_parentchain.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/send_to_parentchain.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/send_to_parentchain.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/send_to_parentchain.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/store_sidechain_blocks.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/store_sidechain_blocks.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/store_sidechain_blocks.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/store_sidechain_blocks.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/update_metric.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/update_metric.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/update_metric.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/update_metric.rs diff --git a/tee-worker/service/src/ocall_bridge/ffi/worker_request.rs b/tee-worker/identity/service/src/ocall_bridge/ffi/worker_request.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ffi/worker_request.rs rename to tee-worker/identity/service/src/ocall_bridge/ffi/worker_request.rs diff --git a/tee-worker/service/src/ocall_bridge/ipfs_ocall.rs b/tee-worker/identity/service/src/ocall_bridge/ipfs_ocall.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/ipfs_ocall.rs rename to tee-worker/identity/service/src/ocall_bridge/ipfs_ocall.rs diff --git a/tee-worker/service/src/ocall_bridge/metrics_ocall.rs b/tee-worker/identity/service/src/ocall_bridge/metrics_ocall.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/metrics_ocall.rs rename to tee-worker/identity/service/src/ocall_bridge/metrics_ocall.rs diff --git a/tee-worker/service/src/ocall_bridge/mod.rs b/tee-worker/identity/service/src/ocall_bridge/mod.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/mod.rs rename to tee-worker/identity/service/src/ocall_bridge/mod.rs diff --git a/tee-worker/service/src/ocall_bridge/remote_attestation_ocall.rs b/tee-worker/identity/service/src/ocall_bridge/remote_attestation_ocall.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/remote_attestation_ocall.rs rename to tee-worker/identity/service/src/ocall_bridge/remote_attestation_ocall.rs diff --git a/tee-worker/service/src/ocall_bridge/sidechain_ocall.rs b/tee-worker/identity/service/src/ocall_bridge/sidechain_ocall.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/sidechain_ocall.rs rename to tee-worker/identity/service/src/ocall_bridge/sidechain_ocall.rs diff --git a/tee-worker/service/src/ocall_bridge/test/mocks/mod.rs b/tee-worker/identity/service/src/ocall_bridge/test/mocks/mod.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/test/mocks/mod.rs rename to tee-worker/identity/service/src/ocall_bridge/test/mocks/mod.rs diff --git a/tee-worker/service/src/ocall_bridge/test/mocks/sidechain_bridge_mock.rs b/tee-worker/identity/service/src/ocall_bridge/test/mocks/sidechain_bridge_mock.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/test/mocks/sidechain_bridge_mock.rs rename to tee-worker/identity/service/src/ocall_bridge/test/mocks/sidechain_bridge_mock.rs diff --git a/tee-worker/service/src/ocall_bridge/test/mod.rs b/tee-worker/identity/service/src/ocall_bridge/test/mod.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/test/mod.rs rename to tee-worker/identity/service/src/ocall_bridge/test/mod.rs diff --git a/tee-worker/service/src/ocall_bridge/worker_on_chain_ocall.rs b/tee-worker/identity/service/src/ocall_bridge/worker_on_chain_ocall.rs similarity index 100% rename from tee-worker/service/src/ocall_bridge/worker_on_chain_ocall.rs rename to tee-worker/identity/service/src/ocall_bridge/worker_on_chain_ocall.rs diff --git a/tee-worker/service/src/parentchain_handler.rs b/tee-worker/identity/service/src/parentchain_handler.rs similarity index 100% rename from tee-worker/service/src/parentchain_handler.rs rename to tee-worker/identity/service/src/parentchain_handler.rs diff --git a/tee-worker/service/src/prometheus_metrics.rs b/tee-worker/identity/service/src/prometheus_metrics.rs similarity index 100% rename from tee-worker/service/src/prometheus_metrics.rs rename to tee-worker/identity/service/src/prometheus_metrics.rs diff --git a/tee-worker/service/src/setup.rs b/tee-worker/identity/service/src/setup.rs similarity index 100% rename from tee-worker/service/src/setup.rs rename to tee-worker/identity/service/src/setup.rs diff --git a/tee-worker/service/src/sidechain_setup.rs b/tee-worker/identity/service/src/sidechain_setup.rs similarity index 100% rename from tee-worker/service/src/sidechain_setup.rs rename to tee-worker/identity/service/src/sidechain_setup.rs diff --git a/tee-worker/service/src/sync_block_broadcaster.rs b/tee-worker/identity/service/src/sync_block_broadcaster.rs similarity index 100% rename from tee-worker/service/src/sync_block_broadcaster.rs rename to tee-worker/identity/service/src/sync_block_broadcaster.rs diff --git a/tee-worker/service/src/sync_state.rs b/tee-worker/identity/service/src/sync_state.rs similarity index 100% rename from tee-worker/service/src/sync_state.rs rename to tee-worker/identity/service/src/sync_state.rs diff --git a/tee-worker/service/src/tests/commons.rs b/tee-worker/identity/service/src/tests/commons.rs similarity index 100% rename from tee-worker/service/src/tests/commons.rs rename to tee-worker/identity/service/src/tests/commons.rs diff --git a/tee-worker/service/src/tests/mock.rs b/tee-worker/identity/service/src/tests/mock.rs similarity index 100% rename from tee-worker/service/src/tests/mock.rs rename to tee-worker/identity/service/src/tests/mock.rs diff --git a/tee-worker/service/src/tests/mocks/broadcast_blocks_mock.rs b/tee-worker/identity/service/src/tests/mocks/broadcast_blocks_mock.rs similarity index 100% rename from tee-worker/service/src/tests/mocks/broadcast_blocks_mock.rs rename to tee-worker/identity/service/src/tests/mocks/broadcast_blocks_mock.rs diff --git a/tee-worker/service/src/tests/mocks/enclave_api_mock.rs b/tee-worker/identity/service/src/tests/mocks/enclave_api_mock.rs similarity index 100% rename from tee-worker/service/src/tests/mocks/enclave_api_mock.rs rename to tee-worker/identity/service/src/tests/mocks/enclave_api_mock.rs diff --git a/tee-worker/service/src/tests/mocks/initialization_handler_mock.rs b/tee-worker/identity/service/src/tests/mocks/initialization_handler_mock.rs similarity index 100% rename from tee-worker/service/src/tests/mocks/initialization_handler_mock.rs rename to tee-worker/identity/service/src/tests/mocks/initialization_handler_mock.rs diff --git a/tee-worker/service/src/tests/mocks/mod.rs b/tee-worker/identity/service/src/tests/mocks/mod.rs similarity index 100% rename from tee-worker/service/src/tests/mocks/mod.rs rename to tee-worker/identity/service/src/tests/mocks/mod.rs diff --git a/tee-worker/service/src/tests/mocks/parentchain_api_mock.rs b/tee-worker/identity/service/src/tests/mocks/parentchain_api_mock.rs similarity index 100% rename from tee-worker/service/src/tests/mocks/parentchain_api_mock.rs rename to tee-worker/identity/service/src/tests/mocks/parentchain_api_mock.rs diff --git a/tee-worker/service/src/tests/mocks/update_worker_peers_mock.rs b/tee-worker/identity/service/src/tests/mocks/update_worker_peers_mock.rs similarity index 100% rename from tee-worker/service/src/tests/mocks/update_worker_peers_mock.rs rename to tee-worker/identity/service/src/tests/mocks/update_worker_peers_mock.rs diff --git a/tee-worker/service/src/tests/mod.rs b/tee-worker/identity/service/src/tests/mod.rs similarity index 100% rename from tee-worker/service/src/tests/mod.rs rename to tee-worker/identity/service/src/tests/mod.rs diff --git a/tee-worker/service/src/tests/parentchain_handler_test.rs b/tee-worker/identity/service/src/tests/parentchain_handler_test.rs similarity index 100% rename from tee-worker/service/src/tests/parentchain_handler_test.rs rename to tee-worker/identity/service/src/tests/parentchain_handler_test.rs diff --git a/tee-worker/service/src/utils.rs b/tee-worker/identity/service/src/utils.rs similarity index 100% rename from tee-worker/service/src/utils.rs rename to tee-worker/identity/service/src/utils.rs diff --git a/tee-worker/service/src/wasm.rs b/tee-worker/identity/service/src/wasm.rs similarity index 100% rename from tee-worker/service/src/wasm.rs rename to tee-worker/identity/service/src/wasm.rs diff --git a/tee-worker/service/src/worker.rs b/tee-worker/identity/service/src/worker.rs similarity index 100% rename from tee-worker/service/src/worker.rs rename to tee-worker/identity/service/src/worker.rs diff --git a/tee-worker/service/src/worker_peers_updater.rs b/tee-worker/identity/service/src/worker_peers_updater.rs similarity index 100% rename from tee-worker/service/src/worker_peers_updater.rs rename to tee-worker/identity/service/src/worker_peers_updater.rs diff --git a/tee-worker/sidechain/block-composer/Cargo.toml b/tee-worker/identity/sidechain/block-composer/Cargo.toml similarity index 100% rename from tee-worker/sidechain/block-composer/Cargo.toml rename to tee-worker/identity/sidechain/block-composer/Cargo.toml diff --git a/tee-worker/sidechain/block-composer/src/block_composer.rs b/tee-worker/identity/sidechain/block-composer/src/block_composer.rs similarity index 100% rename from tee-worker/sidechain/block-composer/src/block_composer.rs rename to tee-worker/identity/sidechain/block-composer/src/block_composer.rs diff --git a/tee-worker/sidechain/block-composer/src/error.rs b/tee-worker/identity/sidechain/block-composer/src/error.rs similarity index 100% rename from tee-worker/sidechain/block-composer/src/error.rs rename to tee-worker/identity/sidechain/block-composer/src/error.rs diff --git a/tee-worker/sidechain/block-composer/src/lib.rs b/tee-worker/identity/sidechain/block-composer/src/lib.rs similarity index 100% rename from tee-worker/sidechain/block-composer/src/lib.rs rename to tee-worker/identity/sidechain/block-composer/src/lib.rs diff --git a/tee-worker/sidechain/block-verification/Cargo.toml b/tee-worker/identity/sidechain/block-verification/Cargo.toml similarity index 100% rename from tee-worker/sidechain/block-verification/Cargo.toml rename to tee-worker/identity/sidechain/block-verification/Cargo.toml diff --git a/tee-worker/sidechain/block-verification/src/error.rs b/tee-worker/identity/sidechain/block-verification/src/error.rs similarity index 100% rename from tee-worker/sidechain/block-verification/src/error.rs rename to tee-worker/identity/sidechain/block-verification/src/error.rs diff --git a/tee-worker/sidechain/block-verification/src/lib.rs b/tee-worker/identity/sidechain/block-verification/src/lib.rs similarity index 100% rename from tee-worker/sidechain/block-verification/src/lib.rs rename to tee-worker/identity/sidechain/block-verification/src/lib.rs diff --git a/tee-worker/sidechain/block-verification/src/slot.rs b/tee-worker/identity/sidechain/block-verification/src/slot.rs similarity index 100% rename from tee-worker/sidechain/block-verification/src/slot.rs rename to tee-worker/identity/sidechain/block-verification/src/slot.rs diff --git a/tee-worker/sidechain/consensus/aura/Cargo.toml b/tee-worker/identity/sidechain/consensus/aura/Cargo.toml similarity index 98% rename from tee-worker/sidechain/consensus/aura/Cargo.toml rename to tee-worker/identity/sidechain/consensus/aura/Cargo.toml index 4a02b6b022..ace18aa863 100644 --- a/tee-worker/sidechain/consensus/aura/Cargo.toml +++ b/tee-worker/identity/sidechain/consensus/aura/Cargo.toml @@ -40,7 +40,7 @@ its-state = { path = "../../state", default-features = false } its-validateer-fetch = { path = "../../validateer-fetch", default-features = false } # litentry -litentry-hex-utils = { path = "../../../../primitives/hex", default-features = false } +litentry-hex-utils = { path = "../../../../../common/utils/hex", default-features = false } [dev-dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } diff --git a/tee-worker/sidechain/consensus/aura/src/block_importer.rs b/tee-worker/identity/sidechain/consensus/aura/src/block_importer.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/block_importer.rs rename to tee-worker/identity/sidechain/consensus/aura/src/block_importer.rs diff --git a/tee-worker/sidechain/consensus/aura/src/lib.rs b/tee-worker/identity/sidechain/consensus/aura/src/lib.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/lib.rs rename to tee-worker/identity/sidechain/consensus/aura/src/lib.rs diff --git a/tee-worker/sidechain/consensus/aura/src/proposer_factory.rs b/tee-worker/identity/sidechain/consensus/aura/src/proposer_factory.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/proposer_factory.rs rename to tee-worker/identity/sidechain/consensus/aura/src/proposer_factory.rs diff --git a/tee-worker/sidechain/consensus/aura/src/slot_proposer.rs b/tee-worker/identity/sidechain/consensus/aura/src/slot_proposer.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/slot_proposer.rs rename to tee-worker/identity/sidechain/consensus/aura/src/slot_proposer.rs diff --git a/tee-worker/sidechain/consensus/aura/src/test/block_importer_tests.rs b/tee-worker/identity/sidechain/consensus/aura/src/test/block_importer_tests.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/test/block_importer_tests.rs rename to tee-worker/identity/sidechain/consensus/aura/src/test/block_importer_tests.rs diff --git a/tee-worker/sidechain/consensus/aura/src/test/fixtures/mod.rs b/tee-worker/identity/sidechain/consensus/aura/src/test/fixtures/mod.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/test/fixtures/mod.rs rename to tee-worker/identity/sidechain/consensus/aura/src/test/fixtures/mod.rs diff --git a/tee-worker/sidechain/consensus/aura/src/test/fixtures/types.rs b/tee-worker/identity/sidechain/consensus/aura/src/test/fixtures/types.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/test/fixtures/types.rs rename to tee-worker/identity/sidechain/consensus/aura/src/test/fixtures/types.rs diff --git a/tee-worker/sidechain/consensus/aura/src/test/mocks/environment_mock.rs b/tee-worker/identity/sidechain/consensus/aura/src/test/mocks/environment_mock.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/test/mocks/environment_mock.rs rename to tee-worker/identity/sidechain/consensus/aura/src/test/mocks/environment_mock.rs diff --git a/tee-worker/sidechain/consensus/aura/src/test/mocks/mod.rs b/tee-worker/identity/sidechain/consensus/aura/src/test/mocks/mod.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/test/mocks/mod.rs rename to tee-worker/identity/sidechain/consensus/aura/src/test/mocks/mod.rs diff --git a/tee-worker/sidechain/consensus/aura/src/test/mocks/peer_updater_mock.rs b/tee-worker/identity/sidechain/consensus/aura/src/test/mocks/peer_updater_mock.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/test/mocks/peer_updater_mock.rs rename to tee-worker/identity/sidechain/consensus/aura/src/test/mocks/peer_updater_mock.rs diff --git a/tee-worker/sidechain/consensus/aura/src/test/mocks/proposer_mock.rs b/tee-worker/identity/sidechain/consensus/aura/src/test/mocks/proposer_mock.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/test/mocks/proposer_mock.rs rename to tee-worker/identity/sidechain/consensus/aura/src/test/mocks/proposer_mock.rs diff --git a/tee-worker/sidechain/consensus/aura/src/test/mod.rs b/tee-worker/identity/sidechain/consensus/aura/src/test/mod.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/test/mod.rs rename to tee-worker/identity/sidechain/consensus/aura/src/test/mod.rs diff --git a/tee-worker/sidechain/consensus/aura/src/verifier.rs b/tee-worker/identity/sidechain/consensus/aura/src/verifier.rs similarity index 100% rename from tee-worker/sidechain/consensus/aura/src/verifier.rs rename to tee-worker/identity/sidechain/consensus/aura/src/verifier.rs diff --git a/tee-worker/sidechain/consensus/common/Cargo.toml b/tee-worker/identity/sidechain/consensus/common/Cargo.toml similarity index 97% rename from tee-worker/sidechain/consensus/common/Cargo.toml rename to tee-worker/identity/sidechain/consensus/common/Cargo.toml index c34b90ff5e..35929eb778 100644 --- a/tee-worker/sidechain/consensus/common/Cargo.toml +++ b/tee-worker/identity/sidechain/consensus/common/Cargo.toml @@ -33,7 +33,7 @@ thiserror-sgx = { package = "thiserror", optional = true, git = "https://github. # substrate deps sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } -litentry-hex-utils = { path = "../../../../primitives/hex", default-features = false } +litentry-hex-utils = { path = "../../../../../common/utils/hex", default-features = false } [dev-dependencies] # local diff --git a/tee-worker/sidechain/consensus/common/src/block_import.rs b/tee-worker/identity/sidechain/consensus/common/src/block_import.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/block_import.rs rename to tee-worker/identity/sidechain/consensus/common/src/block_import.rs diff --git a/tee-worker/sidechain/consensus/common/src/block_import_confirmation_handler.rs b/tee-worker/identity/sidechain/consensus/common/src/block_import_confirmation_handler.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/block_import_confirmation_handler.rs rename to tee-worker/identity/sidechain/consensus/common/src/block_import_confirmation_handler.rs diff --git a/tee-worker/sidechain/consensus/common/src/block_import_queue_worker.rs b/tee-worker/identity/sidechain/consensus/common/src/block_import_queue_worker.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/block_import_queue_worker.rs rename to tee-worker/identity/sidechain/consensus/common/src/block_import_queue_worker.rs diff --git a/tee-worker/sidechain/consensus/common/src/block_production_suspension.rs b/tee-worker/identity/sidechain/consensus/common/src/block_production_suspension.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/block_production_suspension.rs rename to tee-worker/identity/sidechain/consensus/common/src/block_production_suspension.rs diff --git a/tee-worker/sidechain/consensus/common/src/error.rs b/tee-worker/identity/sidechain/consensus/common/src/error.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/error.rs rename to tee-worker/identity/sidechain/consensus/common/src/error.rs diff --git a/tee-worker/sidechain/consensus/common/src/header_db.rs b/tee-worker/identity/sidechain/consensus/common/src/header_db.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/header_db.rs rename to tee-worker/identity/sidechain/consensus/common/src/header_db.rs diff --git a/tee-worker/sidechain/consensus/common/src/is_descendant_of_builder.rs b/tee-worker/identity/sidechain/consensus/common/src/is_descendant_of_builder.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/is_descendant_of_builder.rs rename to tee-worker/identity/sidechain/consensus/common/src/is_descendant_of_builder.rs diff --git a/tee-worker/sidechain/consensus/common/src/lib.rs b/tee-worker/identity/sidechain/consensus/common/src/lib.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/lib.rs rename to tee-worker/identity/sidechain/consensus/common/src/lib.rs diff --git a/tee-worker/sidechain/consensus/common/src/peer_block_sync.rs b/tee-worker/identity/sidechain/consensus/common/src/peer_block_sync.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/peer_block_sync.rs rename to tee-worker/identity/sidechain/consensus/common/src/peer_block_sync.rs diff --git a/tee-worker/sidechain/consensus/common/src/test/mocks/block_import_queue_worker_mock.rs b/tee-worker/identity/sidechain/consensus/common/src/test/mocks/block_import_queue_worker_mock.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/test/mocks/block_import_queue_worker_mock.rs rename to tee-worker/identity/sidechain/consensus/common/src/test/mocks/block_import_queue_worker_mock.rs diff --git a/tee-worker/sidechain/consensus/common/src/test/mocks/block_importer_mock.rs b/tee-worker/identity/sidechain/consensus/common/src/test/mocks/block_importer_mock.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/test/mocks/block_importer_mock.rs rename to tee-worker/identity/sidechain/consensus/common/src/test/mocks/block_importer_mock.rs diff --git a/tee-worker/sidechain/consensus/common/src/test/mocks/confirm_block_import_mock.rs b/tee-worker/identity/sidechain/consensus/common/src/test/mocks/confirm_block_import_mock.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/test/mocks/confirm_block_import_mock.rs rename to tee-worker/identity/sidechain/consensus/common/src/test/mocks/confirm_block_import_mock.rs diff --git a/tee-worker/sidechain/consensus/common/src/test/mocks/mod.rs b/tee-worker/identity/sidechain/consensus/common/src/test/mocks/mod.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/test/mocks/mod.rs rename to tee-worker/identity/sidechain/consensus/common/src/test/mocks/mod.rs diff --git a/tee-worker/sidechain/consensus/common/src/test/mocks/verifier_mock.rs b/tee-worker/identity/sidechain/consensus/common/src/test/mocks/verifier_mock.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/test/mocks/verifier_mock.rs rename to tee-worker/identity/sidechain/consensus/common/src/test/mocks/verifier_mock.rs diff --git a/tee-worker/sidechain/consensus/common/src/test/mod.rs b/tee-worker/identity/sidechain/consensus/common/src/test/mod.rs similarity index 100% rename from tee-worker/sidechain/consensus/common/src/test/mod.rs rename to tee-worker/identity/sidechain/consensus/common/src/test/mod.rs diff --git a/tee-worker/sidechain/consensus/slots/Cargo.toml b/tee-worker/identity/sidechain/consensus/slots/Cargo.toml similarity index 100% rename from tee-worker/sidechain/consensus/slots/Cargo.toml rename to tee-worker/identity/sidechain/consensus/slots/Cargo.toml diff --git a/tee-worker/sidechain/consensus/slots/src/lib.rs b/tee-worker/identity/sidechain/consensus/slots/src/lib.rs similarity index 100% rename from tee-worker/sidechain/consensus/slots/src/lib.rs rename to tee-worker/identity/sidechain/consensus/slots/src/lib.rs diff --git a/tee-worker/sidechain/consensus/slots/src/mocks.rs b/tee-worker/identity/sidechain/consensus/slots/src/mocks.rs similarity index 100% rename from tee-worker/sidechain/consensus/slots/src/mocks.rs rename to tee-worker/identity/sidechain/consensus/slots/src/mocks.rs diff --git a/tee-worker/sidechain/consensus/slots/src/per_shard_slot_worker_tests.rs b/tee-worker/identity/sidechain/consensus/slots/src/per_shard_slot_worker_tests.rs similarity index 100% rename from tee-worker/sidechain/consensus/slots/src/per_shard_slot_worker_tests.rs rename to tee-worker/identity/sidechain/consensus/slots/src/per_shard_slot_worker_tests.rs diff --git a/tee-worker/sidechain/consensus/slots/src/slot_stream.rs b/tee-worker/identity/sidechain/consensus/slots/src/slot_stream.rs similarity index 100% rename from tee-worker/sidechain/consensus/slots/src/slot_stream.rs rename to tee-worker/identity/sidechain/consensus/slots/src/slot_stream.rs diff --git a/tee-worker/sidechain/consensus/slots/src/slots.rs b/tee-worker/identity/sidechain/consensus/slots/src/slots.rs similarity index 100% rename from tee-worker/sidechain/consensus/slots/src/slots.rs rename to tee-worker/identity/sidechain/consensus/slots/src/slots.rs diff --git a/tee-worker/sidechain/fork-tree/Cargo.toml b/tee-worker/identity/sidechain/fork-tree/Cargo.toml similarity index 100% rename from tee-worker/sidechain/fork-tree/Cargo.toml rename to tee-worker/identity/sidechain/fork-tree/Cargo.toml diff --git a/tee-worker/sidechain/fork-tree/src/lib.rs b/tee-worker/identity/sidechain/fork-tree/src/lib.rs similarity index 100% rename from tee-worker/sidechain/fork-tree/src/lib.rs rename to tee-worker/identity/sidechain/fork-tree/src/lib.rs diff --git a/tee-worker/sidechain/peer-fetch/Cargo.toml b/tee-worker/identity/sidechain/peer-fetch/Cargo.toml similarity index 100% rename from tee-worker/sidechain/peer-fetch/Cargo.toml rename to tee-worker/identity/sidechain/peer-fetch/Cargo.toml diff --git a/tee-worker/sidechain/peer-fetch/src/block_fetch_client.rs b/tee-worker/identity/sidechain/peer-fetch/src/block_fetch_client.rs similarity index 100% rename from tee-worker/sidechain/peer-fetch/src/block_fetch_client.rs rename to tee-worker/identity/sidechain/peer-fetch/src/block_fetch_client.rs diff --git a/tee-worker/sidechain/peer-fetch/src/block_fetch_server.rs b/tee-worker/identity/sidechain/peer-fetch/src/block_fetch_server.rs similarity index 100% rename from tee-worker/sidechain/peer-fetch/src/block_fetch_server.rs rename to tee-worker/identity/sidechain/peer-fetch/src/block_fetch_server.rs diff --git a/tee-worker/sidechain/peer-fetch/src/error.rs b/tee-worker/identity/sidechain/peer-fetch/src/error.rs similarity index 100% rename from tee-worker/sidechain/peer-fetch/src/error.rs rename to tee-worker/identity/sidechain/peer-fetch/src/error.rs diff --git a/tee-worker/sidechain/peer-fetch/src/lib.rs b/tee-worker/identity/sidechain/peer-fetch/src/lib.rs similarity index 100% rename from tee-worker/sidechain/peer-fetch/src/lib.rs rename to tee-worker/identity/sidechain/peer-fetch/src/lib.rs diff --git a/tee-worker/sidechain/peer-fetch/src/mocks/fetch_blocks_from_peer_mock.rs b/tee-worker/identity/sidechain/peer-fetch/src/mocks/fetch_blocks_from_peer_mock.rs similarity index 100% rename from tee-worker/sidechain/peer-fetch/src/mocks/fetch_blocks_from_peer_mock.rs rename to tee-worker/identity/sidechain/peer-fetch/src/mocks/fetch_blocks_from_peer_mock.rs diff --git a/tee-worker/sidechain/peer-fetch/src/mocks/mod.rs b/tee-worker/identity/sidechain/peer-fetch/src/mocks/mod.rs similarity index 100% rename from tee-worker/sidechain/peer-fetch/src/mocks/mod.rs rename to tee-worker/identity/sidechain/peer-fetch/src/mocks/mod.rs diff --git a/tee-worker/sidechain/peer-fetch/src/mocks/untrusted_peer_fetch_mock.rs b/tee-worker/identity/sidechain/peer-fetch/src/mocks/untrusted_peer_fetch_mock.rs similarity index 100% rename from tee-worker/sidechain/peer-fetch/src/mocks/untrusted_peer_fetch_mock.rs rename to tee-worker/identity/sidechain/peer-fetch/src/mocks/untrusted_peer_fetch_mock.rs diff --git a/tee-worker/sidechain/peer-fetch/src/untrusted_peer_fetch.rs b/tee-worker/identity/sidechain/peer-fetch/src/untrusted_peer_fetch.rs similarity index 100% rename from tee-worker/sidechain/peer-fetch/src/untrusted_peer_fetch.rs rename to tee-worker/identity/sidechain/peer-fetch/src/untrusted_peer_fetch.rs diff --git a/tee-worker/sidechain/primitives/Cargo.toml b/tee-worker/identity/sidechain/primitives/Cargo.toml similarity index 100% rename from tee-worker/sidechain/primitives/Cargo.toml rename to tee-worker/identity/sidechain/primitives/Cargo.toml diff --git a/tee-worker/sidechain/primitives/src/lib.rs b/tee-worker/identity/sidechain/primitives/src/lib.rs similarity index 100% rename from tee-worker/sidechain/primitives/src/lib.rs rename to tee-worker/identity/sidechain/primitives/src/lib.rs diff --git a/tee-worker/sidechain/primitives/src/traits/mod.rs b/tee-worker/identity/sidechain/primitives/src/traits/mod.rs similarity index 100% rename from tee-worker/sidechain/primitives/src/traits/mod.rs rename to tee-worker/identity/sidechain/primitives/src/traits/mod.rs diff --git a/tee-worker/sidechain/primitives/src/types/block.rs b/tee-worker/identity/sidechain/primitives/src/types/block.rs similarity index 100% rename from tee-worker/sidechain/primitives/src/types/block.rs rename to tee-worker/identity/sidechain/primitives/src/types/block.rs diff --git a/tee-worker/sidechain/primitives/src/types/block_data.rs b/tee-worker/identity/sidechain/primitives/src/types/block_data.rs similarity index 100% rename from tee-worker/sidechain/primitives/src/types/block_data.rs rename to tee-worker/identity/sidechain/primitives/src/types/block_data.rs diff --git a/tee-worker/sidechain/primitives/src/types/header.rs b/tee-worker/identity/sidechain/primitives/src/types/header.rs similarity index 100% rename from tee-worker/sidechain/primitives/src/types/header.rs rename to tee-worker/identity/sidechain/primitives/src/types/header.rs diff --git a/tee-worker/sidechain/primitives/src/types/mod.rs b/tee-worker/identity/sidechain/primitives/src/types/mod.rs similarity index 100% rename from tee-worker/sidechain/primitives/src/types/mod.rs rename to tee-worker/identity/sidechain/primitives/src/types/mod.rs diff --git a/tee-worker/sidechain/rpc-handler/Cargo.toml b/tee-worker/identity/sidechain/rpc-handler/Cargo.toml similarity index 100% rename from tee-worker/sidechain/rpc-handler/Cargo.toml rename to tee-worker/identity/sidechain/rpc-handler/Cargo.toml diff --git a/tee-worker/sidechain/rpc-handler/src/constants.rs b/tee-worker/identity/sidechain/rpc-handler/src/constants.rs similarity index 100% rename from tee-worker/sidechain/rpc-handler/src/constants.rs rename to tee-worker/identity/sidechain/rpc-handler/src/constants.rs diff --git a/tee-worker/sidechain/rpc-handler/src/direct_top_pool_api.rs b/tee-worker/identity/sidechain/rpc-handler/src/direct_top_pool_api.rs similarity index 100% rename from tee-worker/sidechain/rpc-handler/src/direct_top_pool_api.rs rename to tee-worker/identity/sidechain/rpc-handler/src/direct_top_pool_api.rs diff --git a/tee-worker/sidechain/rpc-handler/src/import_block_api.rs b/tee-worker/identity/sidechain/rpc-handler/src/import_block_api.rs similarity index 100% rename from tee-worker/sidechain/rpc-handler/src/import_block_api.rs rename to tee-worker/identity/sidechain/rpc-handler/src/import_block_api.rs diff --git a/tee-worker/sidechain/rpc-handler/src/lib.rs b/tee-worker/identity/sidechain/rpc-handler/src/lib.rs similarity index 100% rename from tee-worker/sidechain/rpc-handler/src/lib.rs rename to tee-worker/identity/sidechain/rpc-handler/src/lib.rs diff --git a/tee-worker/sidechain/sidechain-crate/Cargo.toml b/tee-worker/identity/sidechain/sidechain-crate/Cargo.toml similarity index 100% rename from tee-worker/sidechain/sidechain-crate/Cargo.toml rename to tee-worker/identity/sidechain/sidechain-crate/Cargo.toml diff --git a/tee-worker/sidechain/sidechain-crate/src/lib.rs b/tee-worker/identity/sidechain/sidechain-crate/src/lib.rs similarity index 100% rename from tee-worker/sidechain/sidechain-crate/src/lib.rs rename to tee-worker/identity/sidechain/sidechain-crate/src/lib.rs diff --git a/tee-worker/sidechain/state/Cargo.toml b/tee-worker/identity/sidechain/state/Cargo.toml similarity index 100% rename from tee-worker/sidechain/state/Cargo.toml rename to tee-worker/identity/sidechain/state/Cargo.toml diff --git a/tee-worker/sidechain/state/src/error.rs b/tee-worker/identity/sidechain/state/src/error.rs similarity index 100% rename from tee-worker/sidechain/state/src/error.rs rename to tee-worker/identity/sidechain/state/src/error.rs diff --git a/tee-worker/sidechain/state/src/impls.rs b/tee-worker/identity/sidechain/state/src/impls.rs similarity index 100% rename from tee-worker/sidechain/state/src/impls.rs rename to tee-worker/identity/sidechain/state/src/impls.rs diff --git a/tee-worker/sidechain/state/src/lib.rs b/tee-worker/identity/sidechain/state/src/lib.rs similarity index 100% rename from tee-worker/sidechain/state/src/lib.rs rename to tee-worker/identity/sidechain/state/src/lib.rs diff --git a/tee-worker/sidechain/storage/Cargo.toml b/tee-worker/identity/sidechain/storage/Cargo.toml similarity index 100% rename from tee-worker/sidechain/storage/Cargo.toml rename to tee-worker/identity/sidechain/storage/Cargo.toml diff --git a/tee-worker/sidechain/storage/src/db.rs b/tee-worker/identity/sidechain/storage/src/db.rs similarity index 100% rename from tee-worker/sidechain/storage/src/db.rs rename to tee-worker/identity/sidechain/storage/src/db.rs diff --git a/tee-worker/sidechain/storage/src/error.rs b/tee-worker/identity/sidechain/storage/src/error.rs similarity index 100% rename from tee-worker/sidechain/storage/src/error.rs rename to tee-worker/identity/sidechain/storage/src/error.rs diff --git a/tee-worker/sidechain/storage/src/fetch_blocks_mock.rs b/tee-worker/identity/sidechain/storage/src/fetch_blocks_mock.rs similarity index 100% rename from tee-worker/sidechain/storage/src/fetch_blocks_mock.rs rename to tee-worker/identity/sidechain/storage/src/fetch_blocks_mock.rs diff --git a/tee-worker/sidechain/storage/src/interface.rs b/tee-worker/identity/sidechain/storage/src/interface.rs similarity index 100% rename from tee-worker/sidechain/storage/src/interface.rs rename to tee-worker/identity/sidechain/storage/src/interface.rs diff --git a/tee-worker/sidechain/storage/src/lib.rs b/tee-worker/identity/sidechain/storage/src/lib.rs similarity index 100% rename from tee-worker/sidechain/storage/src/lib.rs rename to tee-worker/identity/sidechain/storage/src/lib.rs diff --git a/tee-worker/sidechain/storage/src/storage.rs b/tee-worker/identity/sidechain/storage/src/storage.rs similarity index 100% rename from tee-worker/sidechain/storage/src/storage.rs rename to tee-worker/identity/sidechain/storage/src/storage.rs diff --git a/tee-worker/sidechain/storage/src/storage_tests_get_blocks_after.rs b/tee-worker/identity/sidechain/storage/src/storage_tests_get_blocks_after.rs similarity index 100% rename from tee-worker/sidechain/storage/src/storage_tests_get_blocks_after.rs rename to tee-worker/identity/sidechain/storage/src/storage_tests_get_blocks_after.rs diff --git a/tee-worker/sidechain/storage/src/storage_tests_get_blocks_in_range.rs b/tee-worker/identity/sidechain/storage/src/storage_tests_get_blocks_in_range.rs similarity index 100% rename from tee-worker/sidechain/storage/src/storage_tests_get_blocks_in_range.rs rename to tee-worker/identity/sidechain/storage/src/storage_tests_get_blocks_in_range.rs diff --git a/tee-worker/sidechain/storage/src/test_utils.rs b/tee-worker/identity/sidechain/storage/src/test_utils.rs similarity index 100% rename from tee-worker/sidechain/storage/src/test_utils.rs rename to tee-worker/identity/sidechain/storage/src/test_utils.rs diff --git a/tee-worker/sidechain/test/Cargo.toml b/tee-worker/identity/sidechain/test/Cargo.toml similarity index 100% rename from tee-worker/sidechain/test/Cargo.toml rename to tee-worker/identity/sidechain/test/Cargo.toml diff --git a/tee-worker/sidechain/test/src/lib.rs b/tee-worker/identity/sidechain/test/src/lib.rs similarity index 100% rename from tee-worker/sidechain/test/src/lib.rs rename to tee-worker/identity/sidechain/test/src/lib.rs diff --git a/tee-worker/sidechain/test/src/sidechain_block_builder.rs b/tee-worker/identity/sidechain/test/src/sidechain_block_builder.rs similarity index 100% rename from tee-worker/sidechain/test/src/sidechain_block_builder.rs rename to tee-worker/identity/sidechain/test/src/sidechain_block_builder.rs diff --git a/tee-worker/sidechain/test/src/sidechain_block_data_builder.rs b/tee-worker/identity/sidechain/test/src/sidechain_block_data_builder.rs similarity index 100% rename from tee-worker/sidechain/test/src/sidechain_block_data_builder.rs rename to tee-worker/identity/sidechain/test/src/sidechain_block_data_builder.rs diff --git a/tee-worker/sidechain/test/src/sidechain_header_builder.rs b/tee-worker/identity/sidechain/test/src/sidechain_header_builder.rs similarity index 100% rename from tee-worker/sidechain/test/src/sidechain_header_builder.rs rename to tee-worker/identity/sidechain/test/src/sidechain_header_builder.rs diff --git a/tee-worker/sidechain/validateer-fetch/Cargo.toml b/tee-worker/identity/sidechain/validateer-fetch/Cargo.toml similarity index 100% rename from tee-worker/sidechain/validateer-fetch/Cargo.toml rename to tee-worker/identity/sidechain/validateer-fetch/Cargo.toml diff --git a/tee-worker/sidechain/validateer-fetch/src/error.rs b/tee-worker/identity/sidechain/validateer-fetch/src/error.rs similarity index 100% rename from tee-worker/sidechain/validateer-fetch/src/error.rs rename to tee-worker/identity/sidechain/validateer-fetch/src/error.rs diff --git a/tee-worker/sidechain/validateer-fetch/src/lib.rs b/tee-worker/identity/sidechain/validateer-fetch/src/lib.rs similarity index 100% rename from tee-worker/sidechain/validateer-fetch/src/lib.rs rename to tee-worker/identity/sidechain/validateer-fetch/src/lib.rs diff --git a/tee-worker/sidechain/validateer-fetch/src/validateer.rs b/tee-worker/identity/sidechain/validateer-fetch/src/validateer.rs similarity index 100% rename from tee-worker/sidechain/validateer-fetch/src/validateer.rs rename to tee-worker/identity/sidechain/validateer-fetch/src/validateer.rs diff --git a/tee-worker/ts-tests/.editorconfig b/tee-worker/identity/ts-tests/.editorconfig similarity index 100% rename from tee-worker/ts-tests/.editorconfig rename to tee-worker/identity/ts-tests/.editorconfig diff --git a/tee-worker/ts-tests/.gitignore b/tee-worker/identity/ts-tests/.gitignore similarity index 100% rename from tee-worker/ts-tests/.gitignore rename to tee-worker/identity/ts-tests/.gitignore diff --git a/tee-worker/ts-tests/.prettierrc b/tee-worker/identity/ts-tests/.prettierrc similarity index 100% rename from tee-worker/ts-tests/.prettierrc rename to tee-worker/identity/ts-tests/.prettierrc diff --git a/tee-worker/ts-tests/README.md b/tee-worker/identity/ts-tests/README.md similarity index 100% rename from tee-worker/ts-tests/README.md rename to tee-worker/identity/ts-tests/README.md diff --git a/tee-worker/ts-tests/integration-tests/.env.local.example b/tee-worker/identity/ts-tests/integration-tests/.env.local.example similarity index 100% rename from tee-worker/ts-tests/integration-tests/.env.local.example rename to tee-worker/identity/ts-tests/integration-tests/.env.local.example diff --git a/tee-worker/ts-tests/integration-tests/.env.staging b/tee-worker/identity/ts-tests/integration-tests/.env.staging similarity index 100% rename from tee-worker/ts-tests/integration-tests/.env.staging rename to tee-worker/identity/ts-tests/integration-tests/.env.staging diff --git a/tee-worker/ts-tests/integration-tests/.eslintrc.json b/tee-worker/identity/ts-tests/integration-tests/.eslintrc.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/.eslintrc.json rename to tee-worker/identity/ts-tests/integration-tests/.eslintrc.json diff --git a/tee-worker/ts-tests/integration-tests/assertion_contracts.test.ts b/tee-worker/identity/ts-tests/integration-tests/assertion_contracts.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/assertion_contracts.test.ts rename to tee-worker/identity/ts-tests/integration-tests/assertion_contracts.test.ts diff --git a/tee-worker/ts-tests/integration-tests/common/call.ts b/tee-worker/identity/ts-tests/integration-tests/common/call.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/call.ts rename to tee-worker/identity/ts-tests/integration-tests/common/call.ts diff --git a/tee-worker/ts-tests/integration-tests/common/common-types.ts b/tee-worker/identity/ts-tests/integration-tests/common/common-types.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/common-types.ts rename to tee-worker/identity/ts-tests/integration-tests/common/common-types.ts diff --git a/tee-worker/ts-tests/integration-tests/common/config.js b/tee-worker/identity/ts-tests/integration-tests/common/config.js similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/config.js rename to tee-worker/identity/ts-tests/integration-tests/common/config.js diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/achainable.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/achainable.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/achainable.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/achainable.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/blockchaininfo.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/blockchaininfo.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/blockchaininfo.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/blockchaininfo.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/discord.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/discord.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/discord.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/discord.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/geniidata.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/geniidata.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/geniidata.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/geniidata.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/index.ts b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/index.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/index.ts rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/index.ts diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/litentry.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/litentry.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/litentry.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/litentry.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/moralis.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/moralis.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/moralis.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/moralis.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/nodereal.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/nodereal.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/nodereal.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/nodereal.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/oneblock.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/oneblock.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/oneblock.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/oneblock.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/twitter.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/twitter.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/twitter.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/twitter.json diff --git a/tee-worker/ts-tests/integration-tests/common/credential-json/vip3.json b/tee-worker/identity/ts-tests/integration-tests/common/credential-json/vip3.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/credential-json/vip3.json rename to tee-worker/identity/ts-tests/integration-tests/common/credential-json/vip3.json diff --git a/tee-worker/ts-tests/integration-tests/common/di-utils.ts b/tee-worker/identity/ts-tests/integration-tests/common/di-utils.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/di-utils.ts rename to tee-worker/identity/ts-tests/integration-tests/common/di-utils.ts diff --git a/tee-worker/ts-tests/integration-tests/common/helpers.ts b/tee-worker/identity/ts-tests/integration-tests/common/helpers.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/helpers.ts rename to tee-worker/identity/ts-tests/integration-tests/common/helpers.ts diff --git a/tee-worker/ts-tests/integration-tests/common/transactions.ts b/tee-worker/identity/ts-tests/integration-tests/common/transactions.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/transactions.ts rename to tee-worker/identity/ts-tests/integration-tests/common/transactions.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/assertion.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/assertion.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/assertion.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/assertion.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/common.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/common.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/common.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/common.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/context.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/context.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/context.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/context.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/crypto.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/crypto.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/crypto.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/crypto.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/identity-helper.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/identity-helper.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/identity-helper.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/identity-helper.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/index.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/index.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/index.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/index.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/integration-setup.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/integration-setup.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/integration-setup.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/integration-setup.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/storage.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/storage.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/storage.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/storage.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/type-creators.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/type-creators.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/type-creators.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/type-creators.ts diff --git a/tee-worker/ts-tests/integration-tests/common/utils/vc-helper.ts b/tee-worker/identity/ts-tests/integration-tests/common/utils/vc-helper.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/common/utils/vc-helper.ts rename to tee-worker/identity/ts-tests/integration-tests/common/utils/vc-helper.ts diff --git a/tee-worker/ts-tests/integration-tests/di_bitcoin_identity.test.ts b/tee-worker/identity/ts-tests/integration-tests/di_bitcoin_identity.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/di_bitcoin_identity.test.ts rename to tee-worker/identity/ts-tests/integration-tests/di_bitcoin_identity.test.ts diff --git a/tee-worker/ts-tests/integration-tests/di_evm_identity.test.ts b/tee-worker/identity/ts-tests/integration-tests/di_evm_identity.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/di_evm_identity.test.ts rename to tee-worker/identity/ts-tests/integration-tests/di_evm_identity.test.ts diff --git a/tee-worker/ts-tests/integration-tests/di_solana_identity.test.ts b/tee-worker/identity/ts-tests/integration-tests/di_solana_identity.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/di_solana_identity.test.ts rename to tee-worker/identity/ts-tests/integration-tests/di_solana_identity.test.ts diff --git a/tee-worker/ts-tests/integration-tests/di_substrate_identity.test.ts b/tee-worker/identity/ts-tests/integration-tests/di_substrate_identity.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/di_substrate_identity.test.ts rename to tee-worker/identity/ts-tests/integration-tests/di_substrate_identity.test.ts diff --git a/tee-worker/ts-tests/integration-tests/discord_identity.test.ts b/tee-worker/identity/ts-tests/integration-tests/discord_identity.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/discord_identity.test.ts rename to tee-worker/identity/ts-tests/integration-tests/discord_identity.test.ts diff --git a/tee-worker/ts-tests/integration-tests/dr_vc.test.ts b/tee-worker/identity/ts-tests/integration-tests/dr_vc.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/dr_vc.test.ts rename to tee-worker/identity/ts-tests/integration-tests/dr_vc.test.ts diff --git a/tee-worker/ts-tests/integration-tests/package.json b/tee-worker/identity/ts-tests/integration-tests/package.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/package.json rename to tee-worker/identity/ts-tests/integration-tests/package.json diff --git a/tee-worker/ts-tests/integration-tests/tsconfig.json b/tee-worker/identity/ts-tests/integration-tests/tsconfig.json similarity index 100% rename from tee-worker/ts-tests/integration-tests/tsconfig.json rename to tee-worker/identity/ts-tests/integration-tests/tsconfig.json diff --git a/tee-worker/ts-tests/integration-tests/twitter_identity.test.ts b/tee-worker/identity/ts-tests/integration-tests/twitter_identity.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/twitter_identity.test.ts rename to tee-worker/identity/ts-tests/integration-tests/twitter_identity.test.ts diff --git a/tee-worker/ts-tests/integration-tests/vc.issuer.attest.example.ts b/tee-worker/identity/ts-tests/integration-tests/vc.issuer.attest.example.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/vc.issuer.attest.example.ts rename to tee-worker/identity/ts-tests/integration-tests/vc.issuer.attest.example.ts diff --git a/tee-worker/ts-tests/integration-tests/vc_correctness.test.ts b/tee-worker/identity/ts-tests/integration-tests/vc_correctness.test.ts similarity index 100% rename from tee-worker/ts-tests/integration-tests/vc_correctness.test.ts rename to tee-worker/identity/ts-tests/integration-tests/vc_correctness.test.ts diff --git a/tee-worker/ts-tests/package.json b/tee-worker/identity/ts-tests/package.json similarity index 100% rename from tee-worker/ts-tests/package.json rename to tee-worker/identity/ts-tests/package.json diff --git a/tee-worker/ts-tests/pnpm-lock.yaml b/tee-worker/identity/ts-tests/pnpm-lock.yaml similarity index 100% rename from tee-worker/ts-tests/pnpm-lock.yaml rename to tee-worker/identity/ts-tests/pnpm-lock.yaml diff --git a/tee-worker/ts-tests/pnpm-workspace.yaml b/tee-worker/identity/ts-tests/pnpm-workspace.yaml similarity index 100% rename from tee-worker/ts-tests/pnpm-workspace.yaml rename to tee-worker/identity/ts-tests/pnpm-workspace.yaml diff --git a/tee-worker/ts-tests/post-checks/.gitignore b/tee-worker/identity/ts-tests/post-checks/.gitignore similarity index 100% rename from tee-worker/ts-tests/post-checks/.gitignore rename to tee-worker/identity/ts-tests/post-checks/.gitignore diff --git a/tee-worker/ts-tests/post-checks/README.md b/tee-worker/identity/ts-tests/post-checks/README.md similarity index 100% rename from tee-worker/ts-tests/post-checks/README.md rename to tee-worker/identity/ts-tests/post-checks/README.md diff --git a/tee-worker/ts-tests/post-checks/config.ts b/tee-worker/identity/ts-tests/post-checks/config.ts similarity index 100% rename from tee-worker/ts-tests/post-checks/config.ts rename to tee-worker/identity/ts-tests/post-checks/config.ts diff --git a/tee-worker/ts-tests/post-checks/package.json b/tee-worker/identity/ts-tests/post-checks/package.json similarity index 100% rename from tee-worker/ts-tests/post-checks/package.json rename to tee-worker/identity/ts-tests/post-checks/package.json diff --git a/tee-worker/ts-tests/post-checks/tests/post-check.test.ts b/tee-worker/identity/ts-tests/post-checks/tests/post-check.test.ts similarity index 100% rename from tee-worker/ts-tests/post-checks/tests/post-check.test.ts rename to tee-worker/identity/ts-tests/post-checks/tests/post-check.test.ts diff --git a/tee-worker/ts-tests/post-checks/tsconfig.json b/tee-worker/identity/ts-tests/post-checks/tsconfig.json similarity index 100% rename from tee-worker/ts-tests/post-checks/tsconfig.json rename to tee-worker/identity/ts-tests/post-checks/tsconfig.json diff --git a/tee-worker/ts-tests/stress-runner b/tee-worker/identity/ts-tests/stress-runner similarity index 100% rename from tee-worker/ts-tests/stress-runner rename to tee-worker/identity/ts-tests/stress-runner diff --git a/tee-worker/ts-tests/stress/.env.local.example b/tee-worker/identity/ts-tests/stress/.env.local.example similarity index 100% rename from tee-worker/ts-tests/stress/.env.local.example rename to tee-worker/identity/ts-tests/stress/.env.local.example diff --git a/tee-worker/ts-tests/stress/.env.staging b/tee-worker/identity/ts-tests/stress/.env.staging similarity index 100% rename from tee-worker/ts-tests/stress/.env.staging rename to tee-worker/identity/ts-tests/stress/.env.staging diff --git a/tee-worker/ts-tests/stress/bin/stress.ts b/tee-worker/identity/ts-tests/stress/bin/stress.ts similarity index 100% rename from tee-worker/ts-tests/stress/bin/stress.ts rename to tee-worker/identity/ts-tests/stress/bin/stress.ts diff --git a/tee-worker/ts-tests/stress/config.json b/tee-worker/identity/ts-tests/stress/config.json similarity index 100% rename from tee-worker/ts-tests/stress/config.json rename to tee-worker/identity/ts-tests/stress/config.json diff --git a/tee-worker/ts-tests/stress/package.json b/tee-worker/identity/ts-tests/stress/package.json similarity index 100% rename from tee-worker/ts-tests/stress/package.json rename to tee-worker/identity/ts-tests/stress/package.json diff --git a/tee-worker/ts-tests/stress/src/api-context-manager.ts b/tee-worker/identity/ts-tests/stress/src/api-context-manager.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/api-context-manager.ts rename to tee-worker/identity/ts-tests/stress/src/api-context-manager.ts diff --git a/tee-worker/ts-tests/stress/src/config.ts b/tee-worker/identity/ts-tests/stress/src/config.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/config.ts rename to tee-worker/identity/ts-tests/stress/src/config.ts diff --git a/tee-worker/ts-tests/stress/src/context-manager.ts b/tee-worker/identity/ts-tests/stress/src/context-manager.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/context-manager.ts rename to tee-worker/identity/ts-tests/stress/src/context-manager.ts diff --git a/tee-worker/ts-tests/stress/src/job-queue.ts b/tee-worker/identity/ts-tests/stress/src/job-queue.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/job-queue.ts rename to tee-worker/identity/ts-tests/stress/src/job-queue.ts diff --git a/tee-worker/ts-tests/stress/src/litentry-api.ts b/tee-worker/identity/ts-tests/stress/src/litentry-api.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/litentry-api.ts rename to tee-worker/identity/ts-tests/stress/src/litentry-api.ts diff --git a/tee-worker/ts-tests/stress/src/measurement.ts b/tee-worker/identity/ts-tests/stress/src/measurement.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/measurement.ts rename to tee-worker/identity/ts-tests/stress/src/measurement.ts diff --git a/tee-worker/ts-tests/stress/src/random-wallet.ts b/tee-worker/identity/ts-tests/stress/src/random-wallet.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/random-wallet.ts rename to tee-worker/identity/ts-tests/stress/src/random-wallet.ts diff --git a/tee-worker/ts-tests/stress/src/steps.ts b/tee-worker/identity/ts-tests/stress/src/steps.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/steps.ts rename to tee-worker/identity/ts-tests/stress/src/steps.ts diff --git a/tee-worker/ts-tests/stress/src/user-session.ts b/tee-worker/identity/ts-tests/stress/src/user-session.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/user-session.ts rename to tee-worker/identity/ts-tests/stress/src/user-session.ts diff --git a/tee-worker/ts-tests/stress/src/util/consumer.ts b/tee-worker/identity/ts-tests/stress/src/util/consumer.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/util/consumer.ts rename to tee-worker/identity/ts-tests/stress/src/util/consumer.ts diff --git a/tee-worker/ts-tests/stress/src/util/sleep.ts b/tee-worker/identity/ts-tests/stress/src/util/sleep.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/util/sleep.ts rename to tee-worker/identity/ts-tests/stress/src/util/sleep.ts diff --git a/tee-worker/ts-tests/stress/src/util/with-retry.ts b/tee-worker/identity/ts-tests/stress/src/util/with-retry.ts similarity index 100% rename from tee-worker/ts-tests/stress/src/util/with-retry.ts rename to tee-worker/identity/ts-tests/stress/src/util/with-retry.ts diff --git a/tee-worker/ts-tests/stress/test/test.ts b/tee-worker/identity/ts-tests/stress/test/test.ts similarity index 100% rename from tee-worker/ts-tests/stress/test/test.ts rename to tee-worker/identity/ts-tests/stress/test/test.ts diff --git a/tee-worker/ts-tests/stress/tsconfig.json b/tee-worker/identity/ts-tests/stress/tsconfig.json similarity index 100% rename from tee-worker/ts-tests/stress/tsconfig.json rename to tee-worker/identity/ts-tests/stress/tsconfig.json diff --git a/tee-worker/ts-tests/worker/.env.local.example b/tee-worker/identity/ts-tests/worker/.env.local.example similarity index 100% rename from tee-worker/ts-tests/worker/.env.local.example rename to tee-worker/identity/ts-tests/worker/.env.local.example diff --git a/tee-worker/ts-tests/worker/.env.staging b/tee-worker/identity/ts-tests/worker/.env.staging similarity index 100% rename from tee-worker/ts-tests/worker/.env.staging rename to tee-worker/identity/ts-tests/worker/.env.staging diff --git a/tee-worker/ts-tests/worker/.eslintrc.json b/tee-worker/identity/ts-tests/worker/.eslintrc.json similarity index 100% rename from tee-worker/ts-tests/worker/.eslintrc.json rename to tee-worker/identity/ts-tests/worker/.eslintrc.json diff --git a/tee-worker/ts-tests/worker/package.json b/tee-worker/identity/ts-tests/worker/package.json similarity index 100% rename from tee-worker/ts-tests/worker/package.json rename to tee-worker/identity/ts-tests/worker/package.json diff --git a/tee-worker/ts-tests/worker/resuming_worker.test.ts b/tee-worker/identity/ts-tests/worker/resuming_worker.test.ts similarity index 100% rename from tee-worker/ts-tests/worker/resuming_worker.test.ts rename to tee-worker/identity/ts-tests/worker/resuming_worker.test.ts diff --git a/tee-worker/ts-tests/worker/tsconfig.json b/tee-worker/identity/ts-tests/worker/tsconfig.json similarity index 100% rename from tee-worker/ts-tests/worker/tsconfig.json rename to tee-worker/identity/ts-tests/worker/tsconfig.json diff --git a/tee-worker/upstream_commit b/tee-worker/identity/upstream_commit similarity index 100% rename from tee-worker/upstream_commit rename to tee-worker/identity/upstream_commit