├── .dockerignore
├── .githooks
├── README.md
└── pre-commit
├── .github
├── ISSUE_TEMPLATE
│ ├── dependency-update.md
│ ├── release.md
│ └── task.md
├── actions
│ └── disk-cleanup
│ │ └── action.yaml
├── dependabot.yml
├── file-filter.yml
├── pull_request_template.md
├── runtime.json
└── workflows
│ ├── benchmark-machine.yml
│ ├── benchmark-runtime-weights.yml
│ ├── build-docker-with-args.yml
│ ├── build-wasm.yml
│ ├── check-runtime-upgrade.yml
│ ├── ci.yml
│ ├── coverage.yml
│ ├── create-release-draft.yml
│ ├── create-release-issue.yml
│ ├── delete-cache-after-pr-close.yml
│ ├── issue-stale-bot.yml
│ ├── post-checks.yml
│ ├── release-bot.yml
│ ├── try-runtime.yml
│ └── verify-correctness-of-vc-content.yml
├── .gitignore
├── .gitmodules
├── .nvmrc
├── .taplo.toml
├── LICENSE
├── Makefile
├── README.md
├── local-setup
├── .env.dev
├── README.md
├── __init__.py
├── development-worker.json
├── launch.py
├── py
│ ├── __init__.py
│ ├── helpers.py
│ └── worker.py
├── rococo_one_worker.json
├── start_parachain.sh
├── tmux_logger.sh
├── tmux_logger_three_nodes.sh
└── worker-log-level-config.toml
├── parachain
├── Cargo.lock
├── Cargo.toml
├── LICENSE_HEADER
├── docker
│ ├── Dockerfile
│ ├── bridge.dockerfile
│ ├── entrypoint.sh
│ ├── example.yml
│ ├── package.json
│ └── pnpm-lock.yaml
├── node
│ ├── Cargo.toml
│ ├── build.rs
│ ├── res
│ │ ├── README.md
│ │ ├── chain_specs
│ │ │ ├── heima-plain.json
│ │ │ ├── heima.json
│ │ │ ├── paseo-plain.json
│ │ │ └── paseo.json
│ │ └── genesis_info
│ │ │ ├── heima.json
│ │ │ └── paseo.json
│ └── src
│ │ ├── chain_specs
│ │ ├── heima.rs
│ │ ├── mod.rs
│ │ └── paseo.rs
│ │ ├── cli.rs
│ │ ├── command.rs
│ │ ├── evm_tracing_types.rs
│ │ ├── fake_runtime_api.rs
│ │ ├── main.rs
│ │ ├── rpc.rs
│ │ ├── service.rs
│ │ ├── standalone_block_import.rs
│ │ └── tracing.rs
├── pallets
│ ├── account-fix
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── bitacross
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── custodial_wallet.rs
│ │ │ └── lib.rs
│ ├── bridge
│ │ ├── assets-handler
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── tests.rs
│ │ ├── bridge-transfer
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── benchmarking.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ ├── tests.rs
│ │ │ │ └── weights.rs
│ │ ├── chain-bridge
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── benchmarking.rs
│ │ │ │ ├── hashing.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ ├── tests.rs
│ │ │ │ └── weights.rs
│ │ └── common
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ └── lib.rs
│ ├── collab-ai
│ │ ├── aiusd-convertor
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── tests.rs
│ │ ├── common
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ ├── curator
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── tests.rs
│ │ ├── guardian
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── tests.rs
│ │ ├── halving-mint
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ ├── tests.rs
│ │ │ │ └── traits.rs
│ │ ├── investing-pool
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── tests.rs
│ │ └── pool-proposal
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── ordered_set.rs
│ │ │ ├── tests.rs
│ │ │ └── types.rs
│ ├── evm-assertions
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ └── tests.rs
│ ├── extrinsic-filter
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── benchmarking.rs
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── tests.rs
│ │ │ └── weights.rs
│ ├── identity-management
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── benchmarking.rs
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── tests.rs
│ │ │ └── weights.rs
│ ├── omni-account
│ │ ├── Cargo.toml
│ │ ├── runtime-api
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ └── tests.rs
│ ├── omni-bridge
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ └── tests.rs
│ ├── parachain-staking
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── auto_compound.rs
│ │ │ ├── benchmarking.rs
│ │ │ ├── delegation_requests.rs
│ │ │ ├── inflation.rs
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── mock_zero_delay.rs
│ │ │ ├── set.rs
│ │ │ ├── tests.rs
│ │ │ ├── tests_zero_delay.rs
│ │ │ ├── traits.rs
│ │ │ ├── types.rs
│ │ │ └── weights.rs
│ ├── score-staking
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── tests.rs
│ │ │ └── types.rs
│ ├── teebag
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src
│ │ │ ├── benchmarking.rs
│ │ │ ├── ias-data
│ │ │ ├── enclave-signing-pubkey-TEST4.bin
│ │ │ ├── enclave-signing-pubkey-TEST5.bin
│ │ │ ├── enclave-signing-pubkey-TEST6.bin
│ │ │ ├── enclave-signing-pubkey-TEST7.bin
│ │ │ ├── enclave-signing-pubkey-TEST8-PRODUCTION.bin
│ │ │ ├── enclave-signing-pubkey-TEST9.bin
│ │ │ ├── ra_dcap_dump_quote.ra
│ │ │ ├── ra_dump_cert_TEST4.der
│ │ │ ├── ra_dump_cert_TEST5.der
│ │ │ ├── ra_dump_cert_TEST6.der
│ │ │ ├── ra_dump_cert_TEST7.der
│ │ │ ├── ra_dump_cert_TEST8_PRODUCTION.der
│ │ │ └── ra_dump_cert_TEST9_enclave_add.der
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── test_util.rs
│ │ │ ├── tests.rs
│ │ │ └── weights.rs
│ ├── upstream_commit
│ ├── vc-management
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── benchmarking.rs
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── schema.rs
│ │ │ ├── tests.rs
│ │ │ └── weights.rs
│ └── xcm-asset-manager
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── benchmarking.rs
│ │ ├── lib.rs
│ │ ├── mock.rs
│ │ ├── tests.rs
│ │ └── weights.rs
├── precompiles
│ ├── assets-erc20
│ │ ├── Cargo.toml
│ │ ├── ERC20.sol
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ └── tests.rs
│ ├── bridge-transfer
│ │ ├── BridgeInterface.sol
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── collab-ai
│ │ ├── aiusd-convertor
│ │ │ ├── AIUSDConvertor.sol
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── tests.rs
│ │ ├── curator
│ │ │ ├── Cargo.toml
│ │ │ ├── Curator.sol
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── tests.rs
│ │ ├── guardian
│ │ │ ├── Cargo.toml
│ │ │ ├── Guardian.sol
│ │ │ └── src
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── tests.rs
│ │ ├── investing-pool
│ │ │ ├── Cargo.toml
│ │ │ ├── InvestingPool.sol
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ └── pool-proposal
│ │ │ ├── Cargo.toml
│ │ │ ├── PoolProposal.sol
│ │ │ └── src
│ │ │ └── lib.rs
│ ├── omni-bridge
│ │ ├── Cargo.toml
│ │ ├── OmniBridgeInterface.sol
│ │ └── src
│ │ │ └── lib.rs
│ ├── parachain-staking
│ │ ├── Cargo.toml
│ │ ├── StakingInterface.sol
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ └── tests.rs
│ ├── score-staking
│ │ ├── Cargo.toml
│ │ ├── ScoreStakingInterface.sol
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ └── tests.rs
│ └── vesting
│ │ ├── Cargo.toml
│ │ ├── VestingInterface.sol
│ │ └── src
│ │ └── lib.rs
├── primitives
│ ├── Cargo.toml
│ └── src
│ │ ├── assertion
│ │ ├── achainable.rs
│ │ ├── bnb_domain.rs
│ │ ├── contest.rs
│ │ ├── dynamic.rs
│ │ ├── evm_amount_holding.rs
│ │ ├── generic_discord_role.rs
│ │ ├── mod.rs
│ │ ├── network.rs
│ │ ├── oneblock.rs
│ │ ├── platform_user.rs
│ │ ├── soraquiz.rs
│ │ ├── vip3.rs
│ │ ├── web3_nft.rs
│ │ └── web3_token.rs
│ │ ├── error.rs
│ │ ├── identity.rs
│ │ ├── lib.rs
│ │ ├── omni
│ │ ├── account.rs
│ │ ├── chain.rs
│ │ ├── intent.rs
│ │ ├── mod.rs
│ │ └── token.rs
│ │ ├── teebag
│ │ ├── dcap_types.rs
│ │ ├── mod.rs
│ │ ├── quoting_enclave.rs
│ │ ├── sgx_verify
│ │ │ ├── AttestationReportSigningCACert.pem
│ │ │ ├── collateral.rs
│ │ │ ├── ephemeral_key.rs
│ │ │ ├── fuzz
│ │ │ │ ├── Cargo.lock
│ │ │ │ ├── Cargo.toml
│ │ │ │ └── fuzz_targets
│ │ │ │ │ ├── decode_quote.rs
│ │ │ │ │ ├── deserialize_json.rs
│ │ │ │ │ ├── extract_tcb_info.rs
│ │ │ │ │ ├── signature_check.rs
│ │ │ │ │ └── verify_ias_report.rs
│ │ │ ├── mod.rs
│ │ │ ├── netscape_comment.rs
│ │ │ ├── test
│ │ │ │ ├── dcap
│ │ │ │ │ ├── dcap_quote_cert.der
│ │ │ │ │ ├── pck_crl.der
│ │ │ │ │ ├── pck_crl_issuer_chain.pem
│ │ │ │ │ ├── qe_identity.json
│ │ │ │ │ ├── qe_identity_cert.pem
│ │ │ │ │ ├── qe_identity_issuer_chain.pem
│ │ │ │ │ ├── root_ca_crl.der
│ │ │ │ │ ├── tcb_info.json
│ │ │ │ │ └── tcb_info_issuer_chain.pem
│ │ │ │ ├── enclave-signing-pubkey-TEST4.bin
│ │ │ │ ├── enclave-signing-pubkey-TEST5.bin
│ │ │ │ ├── enclave-signing-pubkey-TEST6.bin
│ │ │ │ ├── enclave-signing-pubkey-TEST7.bin
│ │ │ │ ├── enclave-signing-pubkey-TEST8-PRODUCTION.bin
│ │ │ │ ├── ra_dump_cert_TEST4.der
│ │ │ │ ├── ra_dump_cert_TEST5.der
│ │ │ │ ├── ra_dump_cert_TEST6.der
│ │ │ │ ├── ra_dump_cert_TEST7.der
│ │ │ │ ├── ra_dump_cert_TEST8_PRODUCTION.der
│ │ │ │ ├── test_ra_cert_MRSIGNER1_MRENCLAVE1.der
│ │ │ │ ├── test_ra_cert_MRSIGNER2_MRENCLAVE2.der
│ │ │ │ ├── test_ra_cert_MRSIGNER3_MRENCLAVE2.der
│ │ │ │ ├── test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin
│ │ │ │ ├── test_ra_signer_attn_MRSIGNER2_MRENCLAVE2.bin
│ │ │ │ ├── test_ra_signer_attn_MRSIGNER3_MRENCLAVE2.bin
│ │ │ │ ├── test_ra_signer_pubkey_MRSIGNER1_MRENCLAVE1.bin
│ │ │ │ ├── test_ra_signer_pubkey_MRSIGNER2_MRENCLAVE2.bin
│ │ │ │ └── test_ra_signer_pubkey_MRSIGNER3_MRENCLAVE2.bin
│ │ │ ├── tests.rs
│ │ │ └── utils.rs
│ │ ├── tcb.rs
│ │ └── types.rs
│ │ └── vc.rs
├── runtime
│ ├── common
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── tests
│ │ │ ├── base_call_filter.rs
│ │ │ ├── mod.rs
│ │ │ ├── setup
│ │ │ ├── mod.rs
│ │ │ ├── parachain.rs
│ │ │ └── relay_chain.rs
│ │ │ └── transaction_payment.rs
│ ├── heima
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src
│ │ │ ├── asset_config.rs
│ │ │ ├── constants.rs
│ │ │ ├── lib.rs
│ │ │ ├── migration
│ │ │ ├── P9100.rs
│ │ │ ├── P9135.rs
│ │ │ ├── P9175.rs
│ │ │ ├── P9191
│ │ │ │ ├── migrate_balances_transaction_payment.rs
│ │ │ │ ├── migrate_bounty.rs
│ │ │ │ ├── migrate_bridge_related.rs
│ │ │ │ ├── migrate_democracy.rs
│ │ │ │ ├── migrate_identity.rs
│ │ │ │ ├── migrate_multisig.rs
│ │ │ │ ├── migrate_parachain_staking.rs
│ │ │ │ ├── migrate_preimage.rs
│ │ │ │ ├── migrate_proxy.rs
│ │ │ │ ├── migrate_treasury.rs
│ │ │ │ ├── migrate_vesting.rs
│ │ │ │ └── mod.rs
│ │ │ ├── P9192.rs
│ │ │ ├── P9223.rs
│ │ │ ├── migration.md
│ │ │ └── mod.rs
│ │ │ ├── precompiles.rs
│ │ │ ├── tests
│ │ │ └── mod.rs
│ │ │ ├── weights
│ │ │ ├── cumulus_pallet_xcmp_queue.rs
│ │ │ ├── frame_system.rs
│ │ │ ├── mod.rs
│ │ │ ├── pallet_asset_manager.rs
│ │ │ ├── pallet_balances.rs
│ │ │ ├── pallet_bridge_transfer.rs
│ │ │ ├── pallet_chain_bridge.rs
│ │ │ ├── pallet_collective.rs
│ │ │ ├── pallet_democracy.rs
│ │ │ ├── pallet_evm.rs
│ │ │ ├── pallet_extrinsic_filter.rs
│ │ │ ├── pallet_identity.rs
│ │ │ ├── pallet_identity_management.rs
│ │ │ ├── pallet_membership.rs
│ │ │ ├── pallet_multisig.rs
│ │ │ ├── pallet_parachain_staking.rs
│ │ │ ├── pallet_preimage.rs
│ │ │ ├── pallet_proxy.rs
│ │ │ ├── pallet_scheduler.rs
│ │ │ ├── pallet_session.rs
│ │ │ ├── pallet_teebag.rs
│ │ │ ├── pallet_timestamp.rs
│ │ │ ├── pallet_treasury.rs
│ │ │ ├── pallet_utility.rs
│ │ │ └── pallet_vc_management.rs
│ │ │ └── xcm_config.rs
│ └── paseo
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src
│ │ ├── asset_config.rs
│ │ ├── constants.rs
│ │ ├── governance_v2
│ │ ├── mod.rs
│ │ ├── origins.rs
│ │ └── tracks.rs
│ │ ├── lib.rs
│ │ ├── migration
│ │ ├── P9223.rs
│ │ ├── migration.md
│ │ └── mod.rs
│ │ ├── precompiles.rs
│ │ ├── tests
│ │ └── mod.rs
│ │ ├── weights
│ │ ├── cumulus_pallet_xcmp_queue.rs
│ │ ├── frame_system.rs
│ │ ├── mod.rs
│ │ ├── pallet_asset_manager.rs
│ │ ├── pallet_balances.rs
│ │ ├── pallet_bridge_transfer.rs
│ │ ├── pallet_chain_bridge.rs
│ │ ├── pallet_collective.rs
│ │ ├── pallet_conviction_voting.rs
│ │ ├── pallet_democracy.rs
│ │ ├── pallet_evm.rs
│ │ ├── pallet_extrinsic_filter.rs
│ │ ├── pallet_identity.rs
│ │ ├── pallet_identity_management.rs
│ │ ├── pallet_membership.rs
│ │ ├── pallet_multisig.rs
│ │ ├── pallet_parachain_staking.rs
│ │ ├── pallet_preimage.rs
│ │ ├── pallet_proxy.rs
│ │ ├── pallet_referenda.rs
│ │ ├── pallet_scheduler.rs
│ │ ├── pallet_session.rs
│ │ ├── pallet_teebag.rs
│ │ ├── pallet_timestamp.rs
│ │ ├── pallet_treasury.rs
│ │ ├── pallet_utility.rs
│ │ ├── pallet_vc_management.rs
│ │ └── pallet_whitelist.rs
│ │ └── xcm_config.rs
├── rust-toolchain.toml
├── rustfmt.toml
├── scripts
│ ├── benchmark-weight-local.sh
│ ├── benchmark-weight-remote.sh
│ ├── build-bridge.sh
│ ├── build-docker.sh
│ ├── clean-network.sh
│ ├── generate-prod-chain-spec.sh
│ ├── generate-release-notes.sh
│ ├── generate-upstream-patch.sh
│ ├── geth
│ │ ├── genesis.json
│ │ ├── keystore
│ │ │ ├── alice.json
│ │ │ ├── bob.json
│ │ │ ├── charlie.json
│ │ │ ├── dave.json
│ │ │ └── eve.json
│ │ ├── password.txt
│ │ └── run_geth.sh
│ ├── launch-network.sh
│ ├── launch-standalone.sh
│ ├── pre-commit.sh
│ ├── run-ts-test.sh
│ ├── runtime-upgrade.sh
│ └── ts-utils
│ │ ├── .gitignore
│ │ ├── .prettierrc
│ │ ├── batch-transfer.ts
│ │ ├── initApis.ts
│ │ ├── move-vcregistry-snapshot.ts
│ │ ├── package.json
│ │ ├── pnpm-lock.yaml
│ │ ├── setup-enclave.ts
│ │ ├── transfer-to-whitelist.ts
│ │ ├── transfer.ts
│ │ └── tsconfig.json
├── templates
│ └── benchmark
│ │ ├── README.md
│ │ └── pallet-weight-template.hbs
├── ts-tests
│ ├── .env.example
│ ├── .gitignore
│ ├── .prettierrc
│ ├── README.md
│ ├── common
│ │ ├── abi
│ │ │ ├── bridge
│ │ │ │ ├── Bridge.json
│ │ │ │ ├── ERC20Handler.json
│ │ │ │ ├── ERC721Handler.json
│ │ │ │ ├── GenericHandler.json
│ │ │ │ ├── MintableERC20.json
│ │ │ │ └── README.md
│ │ │ └── precompile
│ │ │ │ ├── Bridge.json
│ │ │ │ ├── OmniBridge.json
│ │ │ │ ├── README.md
│ │ │ │ ├── Staking.json
│ │ │ │ └── Vesting.json
│ │ ├── keys
│ │ │ ├── 0x148FfB2074A9e59eD58142822b3eB3fcBffb0cd7.key
│ │ │ ├── 0x24962717f8fA5BA3b931bACaF9ac03924EB475a0.key
│ │ │ ├── 0x4CEEf6139f00F9F4535Ad19640Ff7A0137708485.key
│ │ │ ├── 0x8e0a907331554AF72563Bd8D43051C2E64Be5d35.key
│ │ │ ├── 0xff93B45308FD417dF303D6515aB04D9e89a750Ca.key
│ │ │ ├── 5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy.key
│ │ │ ├── 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty.key
│ │ │ ├── 5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y.key
│ │ │ ├── 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY.key
│ │ │ └── 5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw.key
│ │ ├── setup
│ │ │ ├── register-parathread.ts
│ │ │ ├── setup-bridge.ts
│ │ │ ├── setup-enclave.ts
│ │ │ ├── teebag-set-dev-mode.ts
│ │ │ ├── upgrade-parathread.ts
│ │ │ └── wait-finalized-block.ts
│ │ └── utils
│ │ │ ├── compile.ts
│ │ │ ├── config.ts
│ │ │ ├── consts.ts
│ │ │ ├── function.ts
│ │ │ ├── index.ts
│ │ │ └── integration-setup.ts
│ ├── config.ci.json
│ ├── config.prod.json
│ ├── global.d.ts
│ ├── integration-tests
│ │ ├── base-filter.test.ts
│ │ ├── bridge.test.ts
│ │ ├── evm-contract.test.ts
│ │ ├── precompile-contract.test.ts
│ │ ├── transaction-fee.test.ts
│ │ └── transfer.test.ts
│ ├── package.json
│ ├── pnpm-lock.yaml
│ └── tsconfig.json
├── utils
│ ├── Cargo.toml
│ ├── proc-macros
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── reuse.rs
│ └── src
│ │ ├── hex.rs
│ │ ├── lib.rs
│ │ └── macros.rs
└── zombienet
│ └── config.toml
└── tee-worker
├── .taplo.toml
├── Cargo.lock
├── Cargo.toml
├── client-api
├── .gitignore
├── CHANGELOG.md
├── README.md
├── package.json
├── pnpm-lock.yaml
├── src
│ ├── identity
│ │ ├── index.ts
│ │ ├── interfaces
│ │ │ ├── definitions.ts
│ │ │ ├── identity
│ │ │ │ └── definitions.ts
│ │ │ ├── omniAccount
│ │ │ │ └── definitions.ts
│ │ │ ├── sidechain
│ │ │ │ └── definitions.ts
│ │ │ ├── trusted_operations
│ │ │ │ └── definitions.ts
│ │ │ └── vc
│ │ │ │ └── definitions.ts
│ │ └── tsconfig.json
│ ├── omni
│ │ ├── index.ts
│ │ ├── interfaces
│ │ │ ├── definitions.ts
│ │ │ ├── identity
│ │ │ │ └── definitions.ts
│ │ │ ├── omniAccount
│ │ │ │ └── definitions.ts
│ │ │ ├── omniExecutor
│ │ │ │ └── definitions.ts
│ │ │ ├── sidechain
│ │ │ │ └── definitions.ts
│ │ │ ├── trusted_operations
│ │ │ │ └── definitions.ts
│ │ │ └── vc
│ │ │ │ └── definitions.ts
│ │ └── tsconfig.json
│ └── sidechain
│ │ ├── index.ts
│ │ ├── interfaces
│ │ ├── definitions.ts
│ │ └── dummynocustom
│ │ │ └── definitions.ts
│ │ └── tsconfig.json
├── tsconfig.base.json
└── tsup.config.ts
├── common
├── core-primitives
│ ├── attestation-handler
│ │ ├── AttestationReportSigningCACert.pem
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── attestation_handler.rs
│ │ │ ├── cert.rs
│ │ │ ├── collateral.rs
│ │ │ ├── error.rs
│ │ │ └── lib.rs
│ ├── binary-merkle-tree
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── component-container
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── atomic_container.rs
│ │ │ ├── component_container.rs
│ │ │ ├── error.rs
│ │ │ └── lib.rs
│ ├── enclave-metrics
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── extrinsics-factory
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ └── mock.rs
│ ├── hashing
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── std_hash.rs
│ ├── import-queue
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── import_queue.rs
│ │ │ └── lib.rs
│ ├── networking-utils
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── ports.rs
│ ├── node-api
│ │ ├── Cargo.toml
│ │ ├── api-client-extensions
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── account.rs
│ │ │ │ ├── chain.rs
│ │ │ │ ├── lib.rs
│ │ │ │ └── pallet_teebag.rs
│ │ ├── api-client-types
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ ├── factory
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ ├── metadata-provider
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── error.rs
│ │ │ │ └── lib.rs
│ │ ├── metadata
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── error.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── metadata_mocks.rs
│ │ │ │ ├── pallet_balances.rs
│ │ │ │ ├── pallet_evm_assertion.rs
│ │ │ │ ├── pallet_imp.rs
│ │ │ │ ├── pallet_omni_account.rs
│ │ │ │ ├── pallet_proxy.rs
│ │ │ │ ├── pallet_sidechain.rs
│ │ │ │ ├── pallet_system.rs
│ │ │ │ ├── pallet_teebag.rs
│ │ │ │ ├── pallet_timestamp.rs
│ │ │ │ ├── pallet_utility.rs
│ │ │ │ ├── pallet_vcmp.rs
│ │ │ │ └── runtime_call.rs
│ │ └── src
│ │ │ └── lib.rs
│ ├── nonce-cache
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ └── nonce_cache.rs
│ ├── ocall-api
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── primitives-cache
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ └── primitives_cache.rs
│ ├── rpc
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── settings
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── worker_mode.rs
│ ├── sgx-runtime-primitives
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── constants.rs
│ │ │ ├── lib.rs
│ │ │ └── types.rs
│ ├── sgx
│ │ ├── crypto
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── aes.rs
│ │ │ │ ├── aes256.rs
│ │ │ │ ├── ecdsa.rs
│ │ │ │ ├── ed25519.rs
│ │ │ │ ├── ed25519_derivation.rs
│ │ │ │ ├── error.rs
│ │ │ │ ├── key_repository.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mocks.rs
│ │ │ │ ├── rsa3072.rs
│ │ │ │ ├── schnorr.rs
│ │ │ │ └── traits.rs
│ │ ├── io
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ └── temp-dir
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── test.rs
│ ├── stf-interface
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mocks.rs
│ │ │ ├── parentchain_pallet.rs
│ │ │ ├── runtime_upgrade.rs
│ │ │ ├── sudo_pallet.rs
│ │ │ └── system_pallet.rs
│ ├── stf-primitives
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── traits.rs
│ │ │ └── types.rs
│ ├── stf-state-handler
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── file_io.rs
│ │ │ ├── handle_state.rs
│ │ │ ├── in_memory_state_file_io.rs
│ │ │ ├── lib.rs
│ │ │ ├── query_shard_state.rs
│ │ │ ├── state_handler.rs
│ │ │ ├── state_initializer.rs
│ │ │ ├── state_snapshot_primitives.rs
│ │ │ ├── state_snapshot_repository.rs
│ │ │ ├── state_snapshot_repository_loader.rs
│ │ │ └── test
│ │ │ ├── mocks
│ │ │ ├── initialize_state_mock.rs
│ │ │ ├── mod.rs
│ │ │ ├── state_key_repository_mock.rs
│ │ │ └── versioned_state_access_mock.rs
│ │ │ ├── mod.rs
│ │ │ └── sgx_tests.rs
│ ├── stf-state-observer
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── state_observer.rs
│ │ │ └── traits.rs
│ ├── storage
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── keys.rs
│ │ │ ├── lib.rs
│ │ │ ├── proof.rs
│ │ │ └── verify_storage_proof.rs
│ ├── substrate-sgx
│ │ ├── environmental
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ ├── externalities
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── bypass.rs
│ │ │ │ ├── codec_impl.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── scope_limited.rs
│ │ │ │ └── vectorize.rs
│ │ └── sp-io
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ └── lib.rs
│ ├── test
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── mock
│ │ │ ├── handle_state_mock.rs
│ │ │ ├── metrics_ocall_mock.rs
│ │ │ ├── mod.rs
│ │ │ ├── onchain_mock.rs
│ │ │ ├── shielding_crypto_mock.rs
│ │ │ ├── sidechain_ocall_api_mock.rs
│ │ │ └── stf_mock.rs
│ ├── time-utils
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── types
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── parentchain
│ │ │ ├── events.rs
│ │ │ └── mod.rs
│ │ │ ├── sidechain.rs
│ │ │ └── storage.rs
│ └── utils
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── buffer.rs
│ │ ├── error.rs
│ │ ├── hex.rs
│ │ ├── hex_display.rs
│ │ ├── lib.rs
│ │ └── stringify.rs
├── core
│ ├── parentchain
│ │ ├── light-client
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── concurrent_access.rs
│ │ │ │ ├── error.rs
│ │ │ │ ├── finality.rs
│ │ │ │ ├── io.rs
│ │ │ │ ├── justification.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── light_validation.rs
│ │ │ │ ├── light_validation_state.rs
│ │ │ │ ├── mocks
│ │ │ │ ├── mod.rs
│ │ │ │ ├── validator_access_mock.rs
│ │ │ │ ├── validator_mock.rs
│ │ │ │ └── validator_mock_seal.rs
│ │ │ │ └── state.rs
│ │ └── test
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── parentchain_block_builder.rs
│ │ │ └── parentchain_header_builder.rs
│ ├── rest-client
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── fixtures
│ │ │ ├── amazon_root_ca_1_v3.pem
│ │ │ ├── baltimore_cyber_trust_root_v3.pem
│ │ │ └── lets_encrypt_root_cert.pem
│ │ │ ├── http_client.rs
│ │ │ ├── lib.rs
│ │ │ ├── mocks
│ │ │ ├── http_client_mock.rs
│ │ │ └── mod.rs
│ │ │ └── rest_client.rs
│ ├── rpc-client
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── direct_client.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ └── ws_client.rs
│ ├── system-version
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src
│ │ │ └── lib.rs
│ └── tls-websocket-server
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── certificate_generation.rs
│ │ ├── config_provider.rs
│ │ ├── connection.rs
│ │ ├── connection_id_generator.rs
│ │ ├── error.rs
│ │ ├── lib.rs
│ │ ├── stream_state.rs
│ │ ├── test
│ │ ├── fixtures
│ │ │ ├── mod.rs
│ │ │ ├── no_cert_verifier.rs
│ │ │ ├── test_cert.rs
│ │ │ ├── test_private_key.rs
│ │ │ ├── test_server.rs
│ │ │ └── test_server_config_provider.rs
│ │ ├── mocks
│ │ │ ├── mod.rs
│ │ │ ├── web_socket_connection_mock.rs
│ │ │ └── web_socket_handler_mock.rs
│ │ └── mod.rs
│ │ ├── tls_common.rs
│ │ └── ws_server.rs
└── litentry
│ ├── core
│ ├── parachain-extrinsic-task
│ │ ├── receiver
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ └── sender
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ └── lib.rs
│ └── teebag-storage
│ │ ├── Cargo.toml
│ │ └── src
│ │ └── lib.rs
│ ├── pallets
│ ├── identity-management
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── identity_context.rs
│ │ │ ├── lib.rs
│ │ │ ├── migrations.rs
│ │ │ ├── mock.rs
│ │ │ └── tests.rs
│ └── parentchain
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── lib.rs
│ │ ├── mock.rs
│ │ ├── tests.rs
│ │ └── weights.rs
│ └── primitives
│ ├── Cargo.toml
│ └── src
│ ├── aes_request.rs
│ ├── bitcoin_address.rs
│ ├── bitcoin_signature.rs
│ ├── ethereum_signature.rs
│ ├── lib.rs
│ ├── plain_request.rs
│ ├── stf_request.rs
│ └── validation_data.rs
├── identity
├── .dockerignore
├── .editorconfig
├── .gitattributes.orig
├── .githooks
│ └── pre-commit
├── .github
│ └── workflows
│ │ ├── build_and_test.yml
│ │ ├── publish-docker-sidechain.yml
│ │ └── publish-docker-teeracle.yml
├── .gitignore
├── DESIGN.md
├── Dockerfile
├── Jenkinsfile
├── LICENSE
├── Makefile
├── README.md
├── UpdateRustSGXSDK.mk
├── app-libs
│ ├── parentchain-interface
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── event_subscriber.rs
│ │ │ ├── integritee
│ │ │ ├── event_filter.rs
│ │ │ ├── event_handler.rs
│ │ │ └── mod.rs
│ │ │ ├── lib.rs
│ │ │ ├── target_a
│ │ │ ├── event_filter.rs
│ │ │ ├── event_handler.rs
│ │ │ └── mod.rs
│ │ │ └── target_b
│ │ │ ├── event_filter.rs
│ │ │ ├── event_handler.rs
│ │ │ └── mod.rs
│ ├── sgx-runtime
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── evm.rs
│ │ │ ├── lib.rs
│ │ │ └── migration.rs
│ └── stf
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── evm_helpers.rs
│ │ ├── getter.rs
│ │ ├── hash.rs
│ │ ├── helpers.rs
│ │ ├── lib.rs
│ │ ├── stf_sgx.rs
│ │ ├── stf_sgx_primitives.rs
│ │ ├── stf_sgx_tests.rs
│ │ ├── test_genesis.rs
│ │ ├── trusted_call.rs
│ │ ├── trusted_call_litentry.rs
│ │ └── trusted_call_result.rs
├── bin
│ └── .gitkeep
├── build.Dockerfile
├── cli
│ ├── Cargo.toml
│ ├── README.md
│ ├── benchmark.sh
│ ├── lit_parentchain_nonce.sh
│ ├── lit_test_dr_vc.sh
│ ├── lit_test_failed_parentchain_extrinsic.sh
│ ├── lit_ts_api_package_build.sh
│ ├── lit_ts_integration_test.sh
│ ├── lit_ts_worker_test.sh
│ ├── src
│ │ ├── attesteer
│ │ │ ├── commands
│ │ │ │ ├── mod.rs
│ │ │ │ ├── send_dcap_quote.rs
│ │ │ │ └── send_ias_attestation.rs
│ │ │ └── mod.rs
│ │ ├── base_cli
│ │ │ ├── commands
│ │ │ │ ├── balance.rs
│ │ │ │ ├── faucet.rs
│ │ │ │ ├── listen.rs
│ │ │ │ ├── litentry
│ │ │ │ │ ├── activate_identity.rs
│ │ │ │ │ ├── deactivate_identity.rs
│ │ │ │ │ ├── id_graph_hash.rs
│ │ │ │ │ ├── link_identity.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── shield_text.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── register_tcb_info.rs
│ │ │ │ ├── system_version.rs
│ │ │ │ └── transfer.rs
│ │ │ └── mod.rs
│ │ ├── benchmark
│ │ │ ├── mod.rs
│ │ │ ├── request_vc.rs
│ │ │ └── stf.rs
│ │ ├── command_utils.rs
│ │ ├── commands.rs
│ │ ├── evm
│ │ │ ├── commands
│ │ │ │ ├── evm_call.rs
│ │ │ │ ├── evm_command_utils.rs
│ │ │ │ ├── evm_create.rs
│ │ │ │ ├── evm_read.rs
│ │ │ │ └── mod.rs
│ │ │ └── mod.rs
│ │ ├── lib.rs
│ │ ├── main.rs
│ │ ├── trusted_base_cli
│ │ │ ├── commands
│ │ │ │ ├── balance.rs
│ │ │ │ ├── get_shard.rs
│ │ │ │ ├── litentry
│ │ │ │ │ ├── clean_id_graphs.rs
│ │ │ │ │ ├── get_storage.rs
│ │ │ │ │ ├── id_graph.rs
│ │ │ │ │ ├── link_identity.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ ├── remove_identity.rs
│ │ │ │ │ ├── request_vc.rs
│ │ │ │ │ ├── request_vc_subcommands.rs
│ │ │ │ │ └── send_erroneous_parentchain_call.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── nonce.rs
│ │ │ │ ├── set_balance.rs
│ │ │ │ └── transfer.rs
│ │ │ └── mod.rs
│ │ ├── trusted_cli.rs
│ │ ├── trusted_command_utils.rs
│ │ └── trusted_operation.rs
│ ├── test_auto_shielding_with_transfer_bob.sh
│ ├── test_shield_on_target_nodes_with_transfer_to_alice.sh
│ └── tests
│ │ └── basic_tests.rs
├── client-sdk
│ ├── .eslintignore
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── .npmrc
│ ├── .prettierignore
│ ├── .prettierrc
│ ├── .verdaccio
│ │ └── config.yml
│ ├── README.md
│ ├── jest.config.ts
│ ├── jest.preset.js
│ ├── nx.json
│ ├── package.json
│ ├── packages
│ │ ├── chaindata
│ │ │ ├── .eslintrc.json
│ │ │ ├── CHANGELOG.md
│ │ │ ├── README.md
│ │ │ ├── package.json
│ │ │ ├── project.json
│ │ │ ├── src
│ │ │ │ ├── index.ts
│ │ │ │ └── lib
│ │ │ │ │ └── chaindata.ts
│ │ │ ├── tsconfig.json
│ │ │ └── tsconfig.lib.json
│ │ └── client-sdk
│ │ │ ├── .eslintrc.json
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── docs
│ │ │ ├── .nojekyll
│ │ │ ├── README.md
│ │ │ ├── classes
│ │ │ │ └── Enclave.md
│ │ │ └── modules
│ │ │ │ └── request.md
│ │ │ ├── jest.config.ts
│ │ │ ├── package.json
│ │ │ ├── project.json
│ │ │ ├── src
│ │ │ ├── index.ts
│ │ │ └── lib
│ │ │ │ ├── __test__
│ │ │ │ ├── id-graph-decoder.test.ts
│ │ │ │ └── payload-signing.test.ts
│ │ │ │ ├── config.ts
│ │ │ │ ├── enclave.ts
│ │ │ │ ├── requests
│ │ │ │ ├── add-account.request.ts
│ │ │ │ ├── call-ethereum.request.ts
│ │ │ │ ├── create-account-store.request.ts
│ │ │ │ ├── get-enclave-nonce.ts
│ │ │ │ ├── get-id-graph-hash.ts
│ │ │ │ ├── get-id-graph.request.ts
│ │ │ │ ├── get-last-registered-enclave.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── link-identity-callback.request.ts
│ │ │ │ ├── link-identity.request.ts
│ │ │ │ ├── publicize-account.request.ts
│ │ │ │ ├── remark.request.ts
│ │ │ │ ├── remove-accounts.request.ts
│ │ │ │ ├── request-batch-vc.request.ts
│ │ │ │ ├── request-verification-code.request.ts
│ │ │ │ ├── request_auth_token.request.ts
│ │ │ │ ├── set-identity-networks.request.ts
│ │ │ │ ├── transfer-ethereum.request.ts
│ │ │ │ ├── transfer-native.request.ts
│ │ │ │ └── transfer-solana.request.ts
│ │ │ │ ├── type-creators
│ │ │ │ ├── id-graph.ts
│ │ │ │ ├── key-aes-output.ts
│ │ │ │ ├── litentry-identity.test.ts
│ │ │ │ ├── litentry-identity.ts
│ │ │ │ ├── litentry-multi-signature.test.ts
│ │ │ │ ├── litentry-multi-signature.ts
│ │ │ │ ├── nonce.test.ts
│ │ │ │ ├── nonce.ts
│ │ │ │ ├── request.ts
│ │ │ │ ├── tc-authentication.test.ts
│ │ │ │ ├── tc-authentication.ts
│ │ │ │ ├── trusted-call.test.ts
│ │ │ │ ├── trusted-call.ts
│ │ │ │ ├── validation-data.test.ts
│ │ │ │ └── validation-data.ts
│ │ │ │ ├── util
│ │ │ │ ├── calculate-id-graph-hash.test.ts
│ │ │ │ ├── calculate-id-graph-hash.ts
│ │ │ │ ├── codec-to-string.ts
│ │ │ │ ├── create-payload-to-sign.test.ts
│ │ │ │ ├── create-payload-to-sign.ts
│ │ │ │ ├── decode-signature.ts
│ │ │ │ ├── get-signature-crypto-type.ts
│ │ │ │ ├── safely-decode-option.test.ts
│ │ │ │ ├── safely-decode-option.ts
│ │ │ │ ├── shielding-key.ts
│ │ │ │ ├── types.ts
│ │ │ │ ├── u8aToBase64Url.ts
│ │ │ │ └── verify-signature.ts
│ │ │ │ └── vc-validator
│ │ │ │ ├── __tests__
│ │ │ │ └── validate-enclave-registry.test.ts
│ │ │ │ ├── runtime-enclave-registry.ts
│ │ │ │ ├── validator.spec.ts
│ │ │ │ ├── validator.ts
│ │ │ │ └── validator.types.ts
│ │ │ ├── tsconfig.json
│ │ │ ├── tsconfig.lib.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── typedoc.json
│ ├── pnpm-lock.yaml
│ ├── pnpm-workspace.yaml
│ ├── project.json
│ ├── tools
│ │ └── scripts
│ │ │ └── publish.mjs
│ └── tsconfig.base.json
├── core-primitives
│ ├── enclave-api
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── ffi
│ │ │ ├── Cargo.toml
│ │ │ ├── build.rs
│ │ │ └── src
│ │ │ │ └── lib.rs
│ │ └── src
│ │ │ ├── enclave_base.rs
│ │ │ ├── enclave_test.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── remote_attestation.rs
│ │ │ ├── sidechain.rs
│ │ │ └── utils.rs
│ ├── stf-executor
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── enclave_signer.rs
│ │ │ ├── error.rs
│ │ │ ├── executor.rs
│ │ │ ├── executor_tests.rs
│ │ │ ├── getter_executor.rs
│ │ │ ├── lib.rs
│ │ │ ├── mocks.rs
│ │ │ ├── state_getter.rs
│ │ │ └── traits.rs
│ ├── top-pool-author
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── api.rs
│ │ │ ├── author.rs
│ │ │ ├── author_tests.rs
│ │ │ ├── client_error.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── mocks.rs
│ │ │ ├── test_fixtures.rs
│ │ │ ├── test_utils.rs
│ │ │ ├── top_filter.rs
│ │ │ └── traits.rs
│ └── top-pool
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── base_pool.rs
│ │ ├── basic_pool.rs
│ │ ├── error.rs
│ │ ├── future.rs
│ │ ├── lib.rs
│ │ ├── listener.rs
│ │ ├── mocks
│ │ ├── mod.rs
│ │ ├── rpc_responder_mock.rs
│ │ └── trusted_operation_pool_mock.rs
│ │ ├── pool.rs
│ │ ├── primitives.rs
│ │ ├── ready.rs
│ │ ├── rotator.rs
│ │ ├── tracked_map.rs
│ │ ├── validated_pool.rs
│ │ └── watcher.rs
├── core
│ ├── direct-rpc-client
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── direct-rpc-server
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── builders
│ │ │ ├── mod.rs
│ │ │ ├── rpc_response_builder.rs
│ │ │ └── rpc_return_value_builder.rs
│ │ │ ├── lib.rs
│ │ │ ├── mocks
│ │ │ ├── determine_watch_mock.rs
│ │ │ ├── mod.rs
│ │ │ ├── response_channel_mock.rs
│ │ │ └── send_rpc_response_mock.rs
│ │ │ ├── response_channel.rs
│ │ │ ├── rpc_connection_registry.rs
│ │ │ ├── rpc_responder.rs
│ │ │ ├── rpc_watch_extractor.rs
│ │ │ └── rpc_ws_handler.rs
│ ├── offchain-worker-executor
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── executor.rs
│ │ │ └── lib.rs
│ ├── parentchain
│ │ ├── block-import-dispatcher
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── error.rs
│ │ │ │ ├── immediate_dispatcher.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── trigger_parentchain_block_import_mock.rs
│ │ │ │ └── triggered_dispatcher.rs
│ │ ├── block-importer
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── block_importer.rs
│ │ │ │ ├── block_importer_mock.rs
│ │ │ │ ├── error.rs
│ │ │ │ └── lib.rs
│ │ ├── indirect-calls-executor
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── error.rs
│ │ │ │ ├── event_filter.rs
│ │ │ │ ├── executor.rs
│ │ │ │ ├── filter_metadata.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── traits.rs
│ │ └── parentchain-crate
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ └── lib.rs
│ ├── peer-top-broadcaster
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ └── rpc-server
│ │ ├── Cargo.toml
│ │ └── src
│ │ └── lib.rs
├── docker
│ ├── README.md
│ ├── docker-compose.yml
│ ├── entrypoint.sh
│ ├── fork.Dockerfile
│ ├── lit-di-identity-multiworker-test.yml
│ ├── lit-di-identity-test.yml
│ ├── lit-dr-vc-multiworker-test.yml
│ ├── lit-dr-vc-test.yml
│ ├── lit-native-request-vc-multiworker-test.yml
│ ├── lit-native-request-vc-test.yml
│ ├── lit-omni-account-multiworker-test.yml
│ ├── lit-omni-account-test.yml
│ ├── lit-parentchain-nonce.yml
│ ├── lit-resume-worker.yml
│ ├── lit-test-failed-parentchain-extrinsic.yml
│ ├── lit-test-stress-script.yml
│ ├── lit-ts-api-package-build.yml
│ ├── lit-vc-correctness-test.yml
│ ├── multiworker-docker-compose.yml
│ ├── ping.Dockerfile
│ └── sidechain-benchmark.yml
├── docs
│ ├── README.md
│ └── diagramms
│ │ └── block_import_sequence.svg
├── enclave-runtime
│ ├── Cargo.lock
│ ├── Cargo.toml
│ ├── Enclave.config.production.xml
│ ├── Enclave.config.xml
│ ├── Enclave.edl
│ ├── Enclave.lds
│ ├── Enclave_private.pem
│ ├── Makefile
│ ├── README.md
│ ├── rust-toolchain.toml
│ ├── rustfmt.toml
│ ├── src
│ │ ├── attestation.rs
│ │ ├── empty_impls.rs
│ │ ├── error.rs
│ │ ├── initialization
│ │ │ ├── global_components.rs
│ │ │ ├── mod.rs
│ │ │ └── parentchain
│ │ │ │ ├── common.rs
│ │ │ │ ├── integritee_parachain.rs
│ │ │ │ ├── integritee_solochain.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── target_a_parachain.rs
│ │ │ │ ├── target_a_solochain.rs
│ │ │ │ ├── target_b_parachain.rs
│ │ │ │ └── target_b_solochain.rs
│ │ ├── ipfs.rs
│ │ ├── lib.rs
│ │ ├── ocall
│ │ │ ├── attestation_ocall.rs
│ │ │ ├── ffi.rs
│ │ │ ├── ipfs_ocall.rs
│ │ │ ├── metrics_ocall.rs
│ │ │ ├── mod.rs
│ │ │ ├── on_chain_ocall.rs
│ │ │ └── sidechain_ocall.rs
│ │ ├── rpc
│ │ │ ├── common_api.rs
│ │ │ ├── mod.rs
│ │ │ └── rpc_response_channel.rs
│ │ ├── shard_creation_info.rs
│ │ ├── stf_task_handler.rs
│ │ ├── sync.rs
│ │ ├── test
│ │ │ ├── Counter.sol
│ │ │ ├── cert_tests.rs
│ │ │ ├── direct_rpc_tests.rs
│ │ │ ├── enclave_signer_tests.rs
│ │ │ ├── evm_pallet_tests.rs
│ │ │ ├── fixtures
│ │ │ │ ├── components.rs
│ │ │ │ ├── initialize_test_state.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── ra_dump_cert_TEST4.der
│ │ │ │ ├── test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin
│ │ │ │ └── test_setup.rs
│ │ │ ├── ipfs_tests.rs
│ │ │ ├── mocks
│ │ │ │ ├── attestation_ocall_mock.rs
│ │ │ │ ├── enclave_rpc_ocall_mock.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── peer_updater_mock.rs
│ │ │ │ ├── propose_to_import_call_mock.rs
│ │ │ │ ├── rpc_responder_mock.rs
│ │ │ │ └── types.rs
│ │ │ ├── mod.rs
│ │ │ ├── sidechain_aura_tests.rs
│ │ │ ├── sidechain_event_tests.rs
│ │ │ ├── state_getter_tests.rs
│ │ │ ├── tests_main.rs
│ │ │ └── top_pool_tests.rs
│ │ ├── tls_ra
│ │ │ ├── README.md
│ │ │ ├── authentication.rs
│ │ │ ├── mocks.rs
│ │ │ ├── mod.rs
│ │ │ ├── seal_handler.rs
│ │ │ ├── tests.rs
│ │ │ ├── tls_ra_client.rs
│ │ │ └── tls_ra_server.rs
│ │ ├── top_pool_execution.rs
│ │ ├── utils.rs
│ │ └── vc_issuance_task.rs
│ └── x86_64-unknown-linux-sgx.json
├── entrypoint.sh
├── extract_identity
├── lib
│ └── readme.txt
├── license_header_scs.txt
├── litentry
│ └── core
│ │ ├── assertion-build-v2
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── linked_identities
│ │ │ └── mod.rs
│ │ │ ├── nft_holder
│ │ │ └── mod.rs
│ │ │ ├── platform_user
│ │ │ └── mod.rs
│ │ │ └── token_holding_amount
│ │ │ └── mod.rs
│ │ ├── assertion-build
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── a1.rs
│ │ │ ├── a13.rs
│ │ │ ├── a14.rs
│ │ │ ├── a2.rs
│ │ │ ├── a20.rs
│ │ │ ├── a3.rs
│ │ │ ├── a6.rs
│ │ │ ├── a8.rs
│ │ │ ├── achainable
│ │ │ ├── amount.rs
│ │ │ ├── amount_holding.rs
│ │ │ ├── amount_token.rs
│ │ │ ├── amounts.rs
│ │ │ ├── basic.rs
│ │ │ ├── between_percents.rs
│ │ │ ├── class_of_year.rs
│ │ │ ├── date.rs
│ │ │ ├── date_interval.rs
│ │ │ ├── date_percent.rs
│ │ │ ├── mirror.rs
│ │ │ ├── mod.rs
│ │ │ └── token.rs
│ │ │ ├── brc20
│ │ │ ├── amount_holder.rs
│ │ │ └── mod.rs
│ │ │ ├── dynamic
│ │ │ ├── mod.rs
│ │ │ └── repository.rs
│ │ │ ├── generic_discord_role.rs
│ │ │ ├── holding_time.rs
│ │ │ ├── lib.rs
│ │ │ ├── lit_staking.rs
│ │ │ ├── nodereal
│ │ │ ├── amount_holding
│ │ │ │ ├── evm_amount_holding.rs
│ │ │ │ └── mod.rs
│ │ │ ├── bnb_domain
│ │ │ │ ├── bnb_digit_domain_club_amount.rs
│ │ │ │ ├── bnb_domain_holding_amount.rs
│ │ │ │ └── mod.rs
│ │ │ ├── crypto_summary
│ │ │ │ └── mod.rs
│ │ │ ├── mod.rs
│ │ │ └── nft_holder
│ │ │ │ ├── mod.rs
│ │ │ │ └── weirdo_ghost_gang_holder.rs
│ │ │ ├── oneblock
│ │ │ ├── course.rs
│ │ │ └── mod.rs
│ │ │ └── vip3
│ │ │ ├── card.rs
│ │ │ └── mod.rs
│ │ ├── authentication
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── jwt.rs
│ │ │ └── lib.rs
│ │ ├── common
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── abort_strategy.rs
│ │ │ ├── lib.rs
│ │ │ ├── platform_user
│ │ │ └── mod.rs
│ │ │ ├── web3_nft
│ │ │ └── mod.rs
│ │ │ └── web3_token
│ │ │ ├── mod.rs
│ │ │ ├── token_amount_range.rs
│ │ │ └── token_decimals_filter.rs
│ │ ├── credentials-v2
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── linked_identities
│ │ │ └── mod.rs
│ │ │ ├── nft_holder
│ │ │ └── mod.rs
│ │ │ ├── platform_user
│ │ │ └── mod.rs
│ │ │ └── token_holding_amount
│ │ │ └── mod.rs
│ │ ├── credentials
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── achainable
│ │ │ ├── amount_holding_time.rs
│ │ │ ├── bab_holder.rs
│ │ │ ├── lit_holding_amount.rs
│ │ │ ├── mod.rs
│ │ │ └── uniswap_user.rs
│ │ │ ├── assertion_logic.rs
│ │ │ ├── brc20
│ │ │ ├── amount_holder.rs
│ │ │ └── mod.rs
│ │ │ ├── credential_schema.rs
│ │ │ ├── error.rs
│ │ │ ├── generic_discord_role
│ │ │ └── mod.rs
│ │ │ ├── lib.rs
│ │ │ ├── litentry_profile
│ │ │ ├── holding_amount.rs
│ │ │ ├── lit_staking.rs
│ │ │ ├── mirror.rs
│ │ │ ├── mod.rs
│ │ │ └── token_balance.rs
│ │ │ ├── nodereal
│ │ │ ├── amount_holding
│ │ │ │ ├── evm_amount_holding.rs
│ │ │ │ └── mod.rs
│ │ │ ├── bnb_domain
│ │ │ │ ├── bnb_digit_domain_club_amount.rs
│ │ │ │ ├── bnb_domain_holding_amount.rs
│ │ │ │ └── mod.rs
│ │ │ ├── crypto_summary
│ │ │ │ ├── mod.rs
│ │ │ │ └── summary.rs
│ │ │ ├── mod.rs
│ │ │ └── nft_holder
│ │ │ │ ├── mod.rs
│ │ │ │ └── weirdo_ghost_gang_holder.rs
│ │ │ ├── oneblock
│ │ │ └── mod.rs
│ │ │ ├── schema.rs
│ │ │ ├── templates
│ │ │ ├── credential.json
│ │ │ └── credential_schema.json
│ │ │ └── vip3.rs
│ │ ├── data-providers
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── achainable.rs
│ │ │ ├── achainable_names.rs
│ │ │ ├── blockchain_info.rs
│ │ │ ├── daren_market.rs
│ │ │ ├── discord_litentry.rs
│ │ │ ├── discord_official.rs
│ │ │ ├── geniidata.rs
│ │ │ ├── google.rs
│ │ │ ├── karat_dao.rs
│ │ │ ├── lib.rs
│ │ │ ├── magic_craft.rs
│ │ │ ├── moralis.rs
│ │ │ ├── nodereal.rs
│ │ │ ├── nodereal_jsonrpc.rs
│ │ │ ├── twitter_official.rs
│ │ │ └── vip3.rs
│ │ ├── dynamic-assertion
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ │ ├── evm-dynamic-assertions
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mock.rs
│ │ │ ├── precompiles
│ │ │ ├── hex_to_number.rs
│ │ │ ├── http_get.rs
│ │ │ ├── http_post.rs
│ │ │ ├── identity_to_string.rs
│ │ │ ├── json_utils.rs
│ │ │ ├── logging.rs
│ │ │ ├── macros.rs
│ │ │ ├── mocks.rs
│ │ │ ├── mod.rs
│ │ │ ├── parse_decimal.rs
│ │ │ ├── parse_int.rs
│ │ │ └── to_hex.rs
│ │ │ ├── repository.rs
│ │ │ └── sealing.rs
│ │ ├── identity-verification
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── helpers.rs
│ │ │ ├── lib.rs
│ │ │ └── web2
│ │ │ ├── discord.rs
│ │ │ ├── email
│ │ │ ├── mailer
│ │ │ │ ├── mod.rs
│ │ │ │ ├── sendgrid_mailer.rs
│ │ │ │ └── template.rs
│ │ │ ├── mod.rs
│ │ │ └── verification_code_store.rs
│ │ │ ├── google
│ │ │ ├── mod.rs
│ │ │ └── oauth2_state_store.rs
│ │ │ ├── mod.rs
│ │ │ └── twitter
│ │ │ ├── mod.rs
│ │ │ └── oauth_store.rs
│ │ ├── mock-server
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── achainable.rs
│ │ │ ├── blockchain_info.rs
│ │ │ ├── daren_market.rs
│ │ │ ├── discord_litentry.rs
│ │ │ ├── discord_official.rs
│ │ │ ├── geniidata.rs
│ │ │ ├── karat_dao.rs
│ │ │ ├── lib.rs
│ │ │ ├── litentry_archive.rs
│ │ │ ├── magic_craft.rs
│ │ │ ├── moralis.rs
│ │ │ ├── nodereal.rs
│ │ │ ├── nodereal_jsonrpc.rs
│ │ │ ├── oneblock.rs
│ │ │ ├── twitter_official.rs
│ │ │ └── vip3.rs
│ │ ├── native-task
│ │ ├── receiver
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── authentication_utils.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── trusted_call_authenticated.rs
│ │ │ │ ├── trusted_call_handlers
│ │ │ │ ├── mod.rs
│ │ │ │ └── request_vc_handler.rs
│ │ │ │ └── types.rs
│ │ └── sender
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ └── lib.rs
│ │ ├── omni-account
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── in_memory_store.rs
│ │ │ ├── lib.rs
│ │ │ └── repository.rs
│ │ ├── service
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── platform_user
│ │ │ ├── daren_market_user.rs
│ │ │ ├── karat_dao_user.rs
│ │ │ ├── magic_craft_staking_user.rs
│ │ │ └── mod.rs
│ │ │ ├── web3_nft
│ │ │ ├── mod.rs
│ │ │ └── nft_holder
│ │ │ │ ├── common.rs
│ │ │ │ └── mod.rs
│ │ │ └── web3_token
│ │ │ ├── mod.rs
│ │ │ └── token_balance
│ │ │ ├── bnb_balance.rs
│ │ │ ├── btc_balance.rs
│ │ │ ├── common.rs
│ │ │ ├── eth_balance.rs
│ │ │ ├── lit_balance.rs
│ │ │ ├── mod.rs
│ │ │ └── sol_balance.rs
│ │ ├── stf-task
│ │ ├── receiver
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── handler
│ │ │ │ ├── assertion.rs
│ │ │ │ ├── identity_verification.rs
│ │ │ │ └── mod.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── mock.rs
│ │ │ │ └── test.rs
│ │ └── sender
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ ├── error.rs
│ │ │ └── lib.rs
│ │ └── vc-task
│ │ ├── receiver
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ │ └── sender
│ │ ├── Cargo.toml
│ │ └── src
│ │ └── lib.rs
├── rust-sgx-sdk
│ ├── Readme.md
│ ├── buildenv.mk
│ ├── common
│ │ └── inc
│ │ │ ├── assert.h
│ │ │ ├── complex.h
│ │ │ ├── ctype.h
│ │ │ ├── dirent.h
│ │ │ ├── endian.h
│ │ │ ├── errno.h
│ │ │ ├── fenv.h
│ │ │ ├── float.h
│ │ │ ├── inttypes.h
│ │ │ ├── iso646.h
│ │ │ ├── limits.h
│ │ │ ├── math.h
│ │ │ ├── mbusafecrt.h
│ │ │ ├── netdb.h
│ │ │ ├── poll.h
│ │ │ ├── pthread.h
│ │ │ ├── pwd.h
│ │ │ ├── sched.h
│ │ │ ├── setjmp.h
│ │ │ ├── signal.h
│ │ │ ├── stdalign.h
│ │ │ ├── stdarg.h
│ │ │ ├── stdbool.h
│ │ │ ├── stddef.h
│ │ │ ├── stdint.h
│ │ │ ├── stdio.h
│ │ │ ├── stdlib.h
│ │ │ ├── string.h
│ │ │ ├── sys
│ │ │ ├── _types.h
│ │ │ ├── cdefs.h
│ │ │ ├── endian.h
│ │ │ ├── epoll.h
│ │ │ ├── fpu.h
│ │ │ ├── ieee.h
│ │ │ ├── limits.h
│ │ │ ├── sockaddr.h
│ │ │ ├── socket.h
│ │ │ ├── stat.h
│ │ │ ├── stdint.h
│ │ │ ├── struct_timespec.h
│ │ │ ├── types.h
│ │ │ └── uio.h
│ │ │ ├── time.h
│ │ │ ├── unistd.h
│ │ │ ├── wchar.h
│ │ │ └── wctype.h
│ ├── edl
│ │ ├── inc
│ │ │ ├── dirent.h
│ │ │ └── stat.h
│ │ ├── intel
│ │ │ ├── sgx_dcap_tvl.edl
│ │ │ ├── sgx_pthread.edl
│ │ │ ├── sgx_tkey_exchange.edl
│ │ │ ├── sgx_tprotected_fs.edl
│ │ │ ├── sgx_tstdc.edl
│ │ │ ├── sgx_tswitchless.edl
│ │ │ └── sgx_ttls.edl
│ │ ├── sgx_asyncio.edl
│ │ ├── sgx_backtrace.edl
│ │ ├── sgx_env.edl
│ │ ├── sgx_fd.edl
│ │ ├── sgx_file.edl
│ │ ├── sgx_fs.edl
│ │ ├── sgx_mem.edl
│ │ ├── sgx_net.edl
│ │ ├── sgx_net_switchless.edl
│ │ ├── sgx_pipe.edl
│ │ ├── sgx_process.edl
│ │ ├── sgx_signal.edl
│ │ ├── sgx_socket.edl
│ │ ├── sgx_stdio.edl
│ │ ├── sgx_sys.edl
│ │ ├── sgx_thread.edl
│ │ ├── sgx_time.edl
│ │ └── sgx_tstd.edl
│ └── version
├── samples
│ └── teeracle
│ │ ├── README.md
│ │ ├── install-teeracle.sh
│ │ └── kubernetes
│ │ ├── Chart.yaml
│ │ ├── templates
│ │ └── teeracle.yaml
│ │ └── values.yaml
├── scripts
│ ├── benchmark_local-setup.sh
│ ├── changelog
│ │ ├── .gitignore
│ │ ├── Gemfile
│ │ ├── Gemfile.lock
│ │ ├── README.md
│ │ ├── bin
│ │ │ └── changelog
│ │ ├── digests
│ │ │ ├── .gitignore
│ │ │ └── .gitkeep
│ │ ├── lib
│ │ │ └── changelog.rb
│ │ └── templates
│ │ │ ├── _free_notes.md.tera
│ │ │ ├── challenge_level.md.tera
│ │ │ ├── change.md.tera
│ │ │ ├── changes.md.tera
│ │ │ ├── changes_applibs.md.tera
│ │ │ ├── changes_client.md.tera
│ │ │ ├── changes_core.md.tera
│ │ │ ├── changes_evm.md.tera
│ │ │ ├── changes_misc.md.tera
│ │ │ ├── changes_offchain.md.tera
│ │ │ ├── changes_sidechain.md.tera
│ │ │ ├── changes_teeracle.md.tera
│ │ │ ├── debug.md.tera
│ │ │ ├── global_challenge_level.md.tera
│ │ │ ├── global_priority.md.tera
│ │ │ ├── high_priority.md.tera
│ │ │ ├── pre_release.md.tera
│ │ │ └── template.md.tera
│ ├── init_env.sh
│ ├── litentry
│ │ ├── identity_test.sh
│ │ ├── release
│ │ │ ├── ReadMe.md
│ │ │ ├── build.sh
│ │ │ └── template
│ │ │ │ ├── para-alice.service
│ │ │ │ ├── relay-alice.service
│ │ │ │ ├── relay-bob.service
│ │ │ │ └── worker.service
│ │ └── ubuntu_setup.sh
│ ├── m8.sh
│ ├── polkadot_update.sh
│ ├── sidechain.sh
│ ├── teeracle.sh
│ └── test_transfer
│ │ ├── README.md
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ └── transfer.js
├── service
│ ├── Cargo.toml
│ ├── build.rs
│ └── src
│ │ ├── account_funding.rs
│ │ ├── cli.yml
│ │ ├── config.rs
│ │ ├── enclave
│ │ ├── api.rs
│ │ ├── mod.rs
│ │ └── tls_ra.rs
│ │ ├── error.rs
│ │ ├── globals
│ │ ├── mod.rs
│ │ └── tokio_handle.rs
│ │ ├── initialized_service.rs
│ │ ├── main.rs
│ │ ├── main_impl.rs
│ │ ├── ocall_bridge
│ │ ├── bridge_api.rs
│ │ ├── component_factory.rs
│ │ ├── ffi
│ │ │ ├── fetch_sidechain_blocks_from_peer.rs
│ │ │ ├── get_ias_socket.rs
│ │ │ ├── get_peers.rs
│ │ │ ├── get_quote.rs
│ │ │ ├── get_qve_report_on_quote.rs
│ │ │ ├── get_update_info.rs
│ │ │ ├── init_quote.rs
│ │ │ ├── ipfs.rs
│ │ │ ├── mod.rs
│ │ │ ├── propose_sidechain_blocks.rs
│ │ │ ├── send_to_parentchain.rs
│ │ │ ├── store_sidechain_blocks.rs
│ │ │ ├── update_metric.rs
│ │ │ └── worker_request.rs
│ │ ├── ipfs_ocall.rs
│ │ ├── metrics_ocall.rs
│ │ ├── mod.rs
│ │ ├── remote_attestation_ocall.rs
│ │ ├── sidechain_ocall.rs
│ │ ├── test
│ │ │ ├── mocks
│ │ │ │ ├── mod.rs
│ │ │ │ └── sidechain_bridge_mock.rs
│ │ │ └── mod.rs
│ │ └── worker_on_chain_ocall.rs
│ │ ├── parentchain_handler.rs
│ │ ├── prometheus_metrics.rs
│ │ ├── setup.rs
│ │ ├── sidechain_setup.rs
│ │ ├── sync_block_broadcaster.rs
│ │ ├── sync_state.rs
│ │ ├── tests
│ │ ├── commons.rs
│ │ ├── mock.rs
│ │ ├── mocks
│ │ │ ├── broadcast_blocks_mock.rs
│ │ │ ├── enclave_api_mock.rs
│ │ │ ├── initialization_handler_mock.rs
│ │ │ ├── mod.rs
│ │ │ ├── parentchain_api_mock.rs
│ │ │ └── update_worker_peers_mock.rs
│ │ ├── mod.rs
│ │ └── parentchain_handler_test.rs
│ │ ├── utils.rs
│ │ ├── wasm.rs
│ │ ├── worker.rs
│ │ └── worker_peers_updater.rs
├── sidechain
│ ├── block-composer
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── block_composer.rs
│ │ │ ├── error.rs
│ │ │ └── lib.rs
│ ├── block-verification
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ └── slot.rs
│ ├── consensus
│ │ ├── aura
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── block_importer.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── proposer_factory.rs
│ │ │ │ ├── slot_proposer.rs
│ │ │ │ ├── test
│ │ │ │ ├── block_importer_tests.rs
│ │ │ │ ├── fixtures
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ └── types.rs
│ │ │ │ ├── mocks
│ │ │ │ │ ├── environment_mock.rs
│ │ │ │ │ ├── mod.rs
│ │ │ │ │ ├── peer_updater_mock.rs
│ │ │ │ │ └── proposer_mock.rs
│ │ │ │ └── mod.rs
│ │ │ │ └── verifier.rs
│ │ ├── common
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── block_import.rs
│ │ │ │ ├── block_import_confirmation_handler.rs
│ │ │ │ ├── block_import_queue_worker.rs
│ │ │ │ ├── block_production_suspension.rs
│ │ │ │ ├── error.rs
│ │ │ │ ├── header_db.rs
│ │ │ │ ├── is_descendant_of_builder.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── peer_block_sync.rs
│ │ │ │ └── test
│ │ │ │ ├── mocks
│ │ │ │ ├── block_import_queue_worker_mock.rs
│ │ │ │ ├── block_importer_mock.rs
│ │ │ │ ├── confirm_block_import_mock.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── verifier_mock.rs
│ │ │ │ └── mod.rs
│ │ └── slots
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── mocks.rs
│ │ │ ├── per_shard_slot_worker_tests.rs
│ │ │ ├── slot_stream.rs
│ │ │ └── slots.rs
│ ├── fork-tree
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── peer-fetch
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── block_fetch_client.rs
│ │ │ ├── block_fetch_server.rs
│ │ │ ├── error.rs
│ │ │ ├── lib.rs
│ │ │ ├── mocks
│ │ │ ├── fetch_blocks_from_peer_mock.rs
│ │ │ ├── mod.rs
│ │ │ └── untrusted_peer_fetch_mock.rs
│ │ │ └── untrusted_peer_fetch.rs
│ ├── primitives
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── traits
│ │ │ └── mod.rs
│ │ │ └── types
│ │ │ ├── block.rs
│ │ │ ├── block_data.rs
│ │ │ ├── header.rs
│ │ │ └── mod.rs
│ ├── rpc-handler
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── constants.rs
│ │ │ ├── direct_top_pool_api.rs
│ │ │ ├── import_block_api.rs
│ │ │ └── lib.rs
│ ├── sidechain-crate
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── state
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── error.rs
│ │ │ ├── impls.rs
│ │ │ └── lib.rs
│ ├── storage
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── db.rs
│ │ │ ├── error.rs
│ │ │ ├── fetch_blocks_mock.rs
│ │ │ ├── interface.rs
│ │ │ ├── lib.rs
│ │ │ ├── storage.rs
│ │ │ ├── storage_tests_get_blocks_after.rs
│ │ │ ├── storage_tests_get_blocks_in_range.rs
│ │ │ └── test_utils.rs
│ ├── test
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── sidechain_block_builder.rs
│ │ │ ├── sidechain_block_data_builder.rs
│ │ │ └── sidechain_header_builder.rs
│ └── validateer-fetch
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── error.rs
│ │ ├── lib.rs
│ │ └── validateer.rs
├── ts-tests
│ ├── .editorconfig
│ ├── .gitignore
│ ├── .prettierrc
│ ├── README.md
│ ├── integration-tests
│ │ ├── .env.local.example
│ │ ├── .env.staging
│ │ ├── .eslintrc.json
│ │ ├── common
│ │ │ ├── call.ts
│ │ │ ├── common-types.ts
│ │ │ ├── config.js
│ │ │ ├── credential-json
│ │ │ │ ├── achainable.json
│ │ │ │ ├── blockchaininfo.json
│ │ │ │ ├── discord.json
│ │ │ │ ├── geniidata.json
│ │ │ │ ├── index.ts
│ │ │ │ ├── litentry.json
│ │ │ │ ├── moralis.json
│ │ │ │ ├── nodereal.json
│ │ │ │ ├── oneblock.json
│ │ │ │ ├── twitter.json
│ │ │ │ └── vip3.json
│ │ │ ├── di-utils.ts
│ │ │ ├── helpers.ts
│ │ │ ├── transactions.ts
│ │ │ └── utils
│ │ │ │ ├── assertion.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── context.ts
│ │ │ │ ├── crypto.ts
│ │ │ │ ├── identity-helper.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── integration-setup.ts
│ │ │ │ ├── native-request-helpers.ts
│ │ │ │ ├── storage.ts
│ │ │ │ ├── type-creators.ts
│ │ │ │ └── vc-helper.ts
│ │ ├── di_identity.test.ts
│ │ ├── dr_vc.test.ts
│ │ ├── native_request_vc.test.ts
│ │ ├── omni_account.test.ts
│ │ ├── package.json
│ │ ├── tsconfig.json
│ │ ├── vc.issuer.attest.example.ts
│ │ └── vc_correctness.test.ts
│ ├── package.json
│ ├── pnpm-lock.yaml
│ ├── pnpm-workspace.yaml
│ ├── post-checks
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── config.ts
│ │ ├── package.json
│ │ ├── tests
│ │ │ └── post-check.test.ts
│ │ └── tsconfig.json
│ ├── stress-runner
│ ├── stress
│ │ ├── .env.local.example
│ │ ├── .env.staging
│ │ ├── bin
│ │ │ └── stress.ts
│ │ ├── config.json
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── api-context-manager.ts
│ │ │ ├── config.ts
│ │ │ ├── context-manager.ts
│ │ │ ├── job-queue.ts
│ │ │ ├── litentry-api.ts
│ │ │ ├── measurement.ts
│ │ │ ├── random-wallet.ts
│ │ │ ├── steps.ts
│ │ │ ├── user-session.ts
│ │ │ └── util
│ │ │ │ ├── consumer.ts
│ │ │ │ ├── sleep.ts
│ │ │ │ └── with-retry.ts
│ │ ├── test
│ │ │ └── test.ts
│ │ └── tsconfig.json
│ └── worker
│ │ ├── .env.local.example
│ │ ├── .env.staging
│ │ ├── .eslintrc.json
│ │ ├── package.json
│ │ ├── resuming_worker.test.ts
│ │ └── tsconfig.json
└── upstream_commit
├── omni-executor
├── .env.example
├── .gitignore
├── .taplo.toml
├── Cargo.lock
├── Cargo.toml
├── Dockerfile
├── Makefile
├── README.md
├── accounting-contract-client
│ ├── Cargo.toml
│ ├── abi
│ │ └── AccountingContract.json
│ └── src
│ │ ├── lib.rs
│ │ └── solana.rs
├── accounting-contract
│ ├── bsc
│ │ ├── .gitignore
│ │ ├── foundry.toml
│ │ ├── remappings.txt
│ │ ├── script
│ │ │ ├── AccountingContract.s.sol
│ │ │ └── deploy_contract.sh
│ │ ├── src
│ │ │ └── AccountingContract.sol
│ │ └── test
│ │ │ └── AccountingContract.t.sol
│ └── solana
│ │ ├── .gitignore
│ │ ├── Anchor.toml
│ │ ├── Cargo.lock
│ │ ├── Cargo.toml
│ │ ├── migrations
│ │ └── deploy.ts
│ │ ├── package.json
│ │ ├── programs
│ │ └── accounting-contract
│ │ │ ├── Cargo.toml
│ │ │ ├── Xargo.toml
│ │ │ └── src
│ │ │ └── lib.rs
│ │ ├── test-account.json
│ │ ├── tests
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ └── test_initialize.rs
│ │ ├── tsconfig.json
│ │ └── yarn.lock
├── binance-api
│ ├── Cargo.toml
│ └── src
│ │ ├── convert_api
│ │ ├── mod.rs
│ │ └── types.rs
│ │ ├── error.rs
│ │ ├── lib.rs
│ │ ├── spot_trading_api
│ │ ├── mod.rs
│ │ └── types.rs
│ │ ├── traits.rs
│ │ ├── types.rs
│ │ └── wallet_api
│ │ ├── mod.rs
│ │ └── types.rs
├── cli
│ ├── ts_client_sdk_test.sh
│ └── ts_integration_test.sh
├── client-sdk
│ ├── .eslintignore
│ ├── .eslintrc.json
│ ├── .gitignore
│ ├── .npmrc
│ ├── .prettierignore
│ ├── .prettierrc
│ ├── .verdaccio
│ │ └── config.yml
│ ├── README.md
│ ├── jest.config.ts
│ ├── jest.preset.js
│ ├── nx.json
│ ├── package.json
│ ├── packages
│ │ ├── chaindata
│ │ │ ├── .eslintrc.json
│ │ │ ├── CHANGELOG.md
│ │ │ ├── README.md
│ │ │ ├── package.json
│ │ │ ├── project.json
│ │ │ ├── src
│ │ │ │ ├── index.ts
│ │ │ │ └── lib
│ │ │ │ │ └── chaindata.ts
│ │ │ ├── tsconfig.json
│ │ │ ├── tsconfig.lib.json
│ │ │ └── tsup.config.ts
│ │ └── client-sdk
│ │ │ ├── .eslintrc.json
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── docs
│ │ │ ├── @heima-network
│ │ │ │ └── namespaces
│ │ │ │ │ └── request
│ │ │ │ │ ├── README.md
│ │ │ │ │ └── functions
│ │ │ │ │ ├── addAccount.md
│ │ │ │ │ ├── callEthereum.md
│ │ │ │ │ ├── getAccountNonce.md
│ │ │ │ │ ├── getOAuth2GoogleAuthorizationUrl.md
│ │ │ │ │ ├── getOmniAccountNonceWithIdentity.md
│ │ │ │ │ ├── publicizeAccount.md
│ │ │ │ │ ├── removeAccounts.md
│ │ │ │ │ ├── requestAuthToken.md
│ │ │ │ │ ├── requestEmailVerificationCode.md
│ │ │ │ │ ├── requestPumpxJwt.md
│ │ │ │ │ ├── setPermissions.md
│ │ │ │ │ ├── systemRemark.md
│ │ │ │ │ ├── transferEthereum.md
│ │ │ │ │ ├── transferNative.md
│ │ │ │ │ └── transferSolana.md
│ │ │ ├── README.md
│ │ │ ├── classes
│ │ │ │ └── Enclave.md
│ │ │ ├── enumerations
│ │ │ │ ├── ConnectionState.md
│ │ │ │ ├── OmniRpcMethod.md
│ │ │ │ └── PumpxRpcMethod.md
│ │ │ ├── functions
│ │ │ │ ├── createAesOutputType.md
│ │ │ │ ├── createIdentityType.md
│ │ │ │ ├── createNativeTaskType.md
│ │ │ │ ├── createOmniAuth.md
│ │ │ │ ├── createPayloadToSign.md
│ │ │ │ ├── createRawTaskType.md
│ │ │ │ ├── createValidationDataType.md
│ │ │ │ ├── createVerificationMessage.md
│ │ │ │ ├── decodeSignature.md
│ │ │ │ ├── decrypt.md
│ │ │ │ ├── decryptWithAes.md
│ │ │ │ ├── encrypt.md
│ │ │ │ ├── exportKey.md
│ │ │ │ ├── generate.md
│ │ │ │ ├── generateNonce12.md
│ │ │ │ ├── getAndWaitForAccountStoreCreation.md
│ │ │ │ ├── getSignatureCryptoType.md
│ │ │ │ ├── importKey.md
│ │ │ │ ├── isWeb3.md
│ │ │ │ ├── toHash.md
│ │ │ │ ├── toPublicKey.md
│ │ │ │ ├── u8aToBase64Url.md
│ │ │ │ └── verifySignature.md
│ │ │ ├── type-aliases
│ │ │ │ ├── DiscordOAuth2Proof.md
│ │ │ │ ├── DiscordProof.md
│ │ │ │ ├── EmailProof.md
│ │ │ │ ├── JsonRpcRequest.md
│ │ │ │ ├── JsonRpcResponse.md
│ │ │ │ ├── Maybe.md
│ │ │ │ ├── OmniAuthData.md
│ │ │ │ ├── SubstrateOrEvmOrBtcAddress.md
│ │ │ │ ├── TwitterOAuth2Proof.md
│ │ │ │ ├── TwitterProof.md
│ │ │ │ └── Web3Proof.md
│ │ │ └── variables
│ │ │ │ └── enclave.md
│ │ │ ├── jest.config.ts
│ │ │ ├── package.json
│ │ │ ├── project.json
│ │ │ ├── src
│ │ │ ├── index.ts
│ │ │ └── lib
│ │ │ │ ├── __test__
│ │ │ │ └── enclave.test.ts
│ │ │ │ ├── config.ts
│ │ │ │ ├── enclave.ts
│ │ │ │ ├── requests
│ │ │ │ ├── __test__
│ │ │ │ │ ├── account-store.request.test.ts
│ │ │ │ │ ├── get-nonce.request.test.ts
│ │ │ │ │ ├── get-oauth2-google-authorization-url.request.test.ts
│ │ │ │ │ ├── pumpx-add-wallet.request.test.ts
│ │ │ │ │ ├── pumpx-export-wallet.request.test.ts
│ │ │ │ │ ├── pumpx-request-jwt.request.test.ts
│ │ │ │ │ └── request-email-verification-code.request.test.ts
│ │ │ │ ├── add-account.request.ts
│ │ │ │ ├── aes-task.request.ts
│ │ │ │ ├── create-account-store.request.ts
│ │ │ │ ├── get-nonce.request.ts
│ │ │ │ ├── get-oauth2-google-authorization-url.request.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── intents
│ │ │ │ │ ├── __test__
│ │ │ │ │ │ ├── call-ethereum.request.test.ts
│ │ │ │ │ │ ├── system-remark.request.test.ts
│ │ │ │ │ │ ├── transfer-ethereum.request.test.ts
│ │ │ │ │ │ ├── transfer-native.request.test.ts
│ │ │ │ │ │ └── transfer-solana.request.test.ts
│ │ │ │ │ ├── call-ethereum.request.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── intent.request.ts
│ │ │ │ │ ├── system-remark.request.ts
│ │ │ │ │ ├── transfer-ethereum.request.ts
│ │ │ │ │ ├── transfer-native.request.ts
│ │ │ │ │ └── transfer-solana.request.ts
│ │ │ │ ├── publicize-account.request.ts
│ │ │ │ ├── pumpx-request-jwt.request.ts
│ │ │ │ ├── remove-accounts.request.ts
│ │ │ │ ├── request-auth-token.request.ts
│ │ │ │ ├── request-email-verification-code.request.ts
│ │ │ │ └── set-permissions.request.ts
│ │ │ │ ├── test-utils
│ │ │ │ └── helpers.ts
│ │ │ │ ├── type-creators
│ │ │ │ ├── __test__
│ │ │ │ │ ├── heima-multi-signature.test.ts
│ │ │ │ │ ├── identity.test.ts
│ │ │ │ │ ├── native-task.test.ts
│ │ │ │ │ └── validation-data.test.ts
│ │ │ │ ├── aes-output.ts
│ │ │ │ ├── heima-multi-signature.ts
│ │ │ │ ├── identity.ts
│ │ │ │ ├── native-task.ts
│ │ │ │ ├── oauth2.ts
│ │ │ │ ├── omni-auth.ts
│ │ │ │ ├── raw-task.ts
│ │ │ │ └── validation-data.ts
│ │ │ │ └── utils
│ │ │ │ ├── aes-key.ts
│ │ │ │ ├── create-payload-to-sign.ts
│ │ │ │ ├── create-verification-message.ts
│ │ │ │ ├── decode-signature.ts
│ │ │ │ ├── get-signature-crypto-type.ts
│ │ │ │ ├── identity.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── rpc-method.ts
│ │ │ │ ├── shielding-key.ts
│ │ │ │ ├── types.ts
│ │ │ │ ├── u8aToBase64Url.ts
│ │ │ │ └── verify-signature.ts
│ │ │ ├── tsconfig.json
│ │ │ ├── tsconfig.lib.json
│ │ │ ├── tsconfig.spec.json
│ │ │ ├── tsup.config.ts
│ │ │ └── typedoc.json
│ ├── pnpm-lock.yaml
│ ├── pnpm-workspace.yaml
│ ├── project.json
│ ├── tools
│ │ └── scripts
│ │ │ └── publish.mjs
│ ├── tsconfig.base.json
│ └── workspace.json
├── docker
│ ├── docker-compose.yml
│ ├── omni-account-test.yml
│ └── omni-client-sdk-test.yml
├── enclave_key.pem
├── ethereum-rpc
│ ├── Cargo.toml
│ └── src
│ │ ├── client.rs
│ │ ├── lib.rs
│ │ └── signer.rs
├── executor-core
│ ├── Cargo.toml
│ ├── README.md
│ └── src
│ │ ├── ecdsa_key_store.rs
│ │ ├── ed25519_key_store.rs
│ │ ├── event_handler.rs
│ │ ├── fetcher.rs
│ │ ├── intent_executor.rs
│ │ ├── key_store.rs
│ │ ├── lib.rs
│ │ ├── listener.rs
│ │ ├── native_task.rs
│ │ ├── shielding_key_store.rs
│ │ ├── sync_checkpoint_repository.rs
│ │ └── wallet_metrics.rs
├── executor-crypto
│ ├── Cargo.toml
│ └── src
│ │ ├── aes256.rs
│ │ ├── jwt.rs
│ │ ├── lib.rs
│ │ ├── secp256k1.rs
│ │ ├── shielding_key.rs
│ │ └── traits.rs
├── executor-primitives
│ ├── Cargo.toml
│ └── src
│ │ ├── auth.rs
│ │ ├── lib.rs
│ │ ├── signature
│ │ ├── bitcoin.rs
│ │ ├── evm.rs
│ │ ├── heima_multi_signature.rs
│ │ └── mod.rs
│ │ ├── utils
│ │ ├── hex.rs
│ │ └── mod.rs
│ │ └── validation_data.rs
├── executor-storage
│ ├── Cargo.toml
│ └── src
│ │ ├── account_store.rs
│ │ ├── asset_lock.rs
│ │ ├── heima_jwt.rs
│ │ ├── intent_id.rs
│ │ ├── lib.rs
│ │ ├── member_omni_account.rs
│ │ ├── oauth2_state_verifier.rs
│ │ ├── pumpx_account_profile.rs
│ │ └── verification_code.rs
├── executor-worker
│ ├── Cargo.lock
│ ├── Cargo.toml
│ └── src
│ │ ├── cli.rs
│ │ └── main.rs
├── heima
│ ├── authentication
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── auth_token.rs
│ │ │ ├── constants.rs
│ │ │ ├── lib.rs
│ │ │ └── web3.rs
│ └── identity-verification
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── helpers.rs
│ │ ├── lib.rs
│ │ ├── web2
│ │ ├── email
│ │ │ ├── mailer
│ │ │ │ ├── mod.rs
│ │ │ │ └── template.rs
│ │ │ └── mod.rs
│ │ ├── google
│ │ │ └── mod.rs
│ │ └── mod.rs
│ │ └── web3.rs
├── intent
│ ├── asset-lock
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── account_wide.rs
│ │ │ ├── always_unlocked.rs
│ │ │ ├── lib.rs
│ │ │ └── precise.rs
│ ├── executors
│ │ ├── cross-chain
│ │ │ ├── Cargo.toml
│ │ │ └── src
│ │ │ │ ├── cross_chain.rs
│ │ │ │ ├── cross_chain_swap_tests.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── single_chain.rs
│ │ │ │ ├── single_chain_swap_tests.rs
│ │ │ │ └── types.rs
│ │ ├── ethereum
│ │ │ ├── Cargo.toml
│ │ │ ├── artifacts
│ │ │ │ └── SimpleDelegateContract.sol
│ │ │ └── src
│ │ │ │ ├── delegate_call.rs
│ │ │ │ ├── lib.rs
│ │ │ │ ├── signer.rs
│ │ │ │ └── tx.rs
│ │ └── solana
│ │ │ ├── Cargo.toml
│ │ │ ├── dev-key.json
│ │ │ └── src
│ │ │ └── lib.rs
│ └── token-query
│ │ ├── Cargo.toml
│ │ ├── artifacts
│ │ └── IERC20.sol
│ │ └── src
│ │ └── lib.rs
├── local
│ └── keystore
│ │ ├── README.md
│ │ └── substrate_key.bin
├── native-task-handler
│ ├── Cargo.toml
│ └── src
│ │ ├── aes256_key_store.rs
│ │ ├── lib.rs
│ │ └── types.rs
├── oauth-providers
│ ├── Cargo.toml
│ └── src
│ │ ├── google.rs
│ │ └── lib.rs
├── omni-executor.manifest.template
├── parentchain
│ ├── api-interface
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── artifacts
│ │ │ └── metadata.scale
│ │ └── src
│ │ │ ├── interface.rs
│ │ │ └── lib.rs
│ ├── attestation
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ └── lib.rs
│ ├── listener
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── event_handler.rs
│ │ │ ├── fetcher.rs
│ │ │ ├── lib.rs
│ │ │ ├── listener.rs
│ │ │ └── sync_checkpoint.rs
│ ├── rpc-client
│ │ ├── Cargo.toml
│ │ └── src
│ │ │ ├── lib.rs
│ │ │ ├── metadata.rs
│ │ │ ├── type_converters.rs
│ │ │ └── xt_status.rs
│ └── signer
│ │ ├── Cargo.toml
│ │ └── src
│ │ ├── key_store.rs
│ │ ├── lib.rs
│ │ └── tx_signer.rs
├── pumpx
│ ├── Cargo.toml
│ └── src
│ │ ├── auth_key_store.rs
│ │ ├── constants.rs
│ │ ├── lib.rs
│ │ ├── pumpx_api
│ │ ├── methods
│ │ │ ├── add_wallet.rs
│ │ │ ├── common.rs
│ │ │ ├── create_cross_order.rs
│ │ │ ├── create_limit_order.rs
│ │ │ ├── create_market_order_tx.rs
│ │ │ ├── create_market_order_unsigned_tx.rs
│ │ │ ├── create_transfer_tx.rs
│ │ │ ├── create_transfer_unsigned_tx.rs
│ │ │ ├── cross_fail.rs
│ │ │ ├── get_account_user_id.rs
│ │ │ ├── get_gas_info.rs
│ │ │ ├── get_user_trade_info.rs
│ │ │ ├── heima_post_login.rs
│ │ │ ├── mod.rs
│ │ │ ├── send_order_tx.rs
│ │ │ ├── send_transfer_tx.rs
│ │ │ ├── user_connect.rs
│ │ │ └── verify_google_code.rs
│ │ └── mod.rs
│ │ └── signer_client.rs
├── rpc-server
│ ├── Cargo.toml
│ └── src
│ │ ├── auth_token_key_store.rs
│ │ ├── error_code.rs
│ │ ├── lib.rs
│ │ ├── methods
│ │ ├── mod.rs
│ │ ├── omni
│ │ │ ├── add_wallet.rs
│ │ │ ├── common.rs
│ │ │ ├── export_wallet.rs
│ │ │ ├── get_health.rs
│ │ │ ├── get_next_intent_id.rs
│ │ │ ├── get_oauth2_google_authorization_url.rs
│ │ │ ├── get_omni_account.rs
│ │ │ ├── get_shielding_key.rs
│ │ │ ├── get_web3_sign_in_message.rs
│ │ │ ├── mod.rs
│ │ │ ├── notify_limit_order_result.rs
│ │ │ ├── request_email_verification_code.rs
│ │ │ ├── request_jwt.rs
│ │ │ ├── sign_limit_order.rs
│ │ │ ├── submit_native_task.rs
│ │ │ ├── submit_swap_order.rs
│ │ │ ├── test_protected_method.rs
│ │ │ ├── transfer_widthdraw.rs
│ │ │ └── user_login.rs
│ │ └── pumpx
│ │ │ ├── add_wallet.rs
│ │ │ ├── common.rs
│ │ │ ├── export_wallet.rs
│ │ │ ├── get_next_intent_id.rs
│ │ │ ├── get_omni_account.rs
│ │ │ ├── mod.rs
│ │ │ ├── notify_limit_order_result.rs
│ │ │ ├── request_jwt.rs
│ │ │ ├── sign_limit_order.rs
│ │ │ ├── submit_swap_order.rs
│ │ │ └── transfer_widthdraw.rs
│ │ ├── middlewares
│ │ ├── http_middleware.rs
│ │ ├── mod.rs
│ │ └── rpc_middleware.rs
│ │ ├── server.rs
│ │ ├── task.rs
│ │ └── verify_auth.rs
├── rust-toolchain.toml
├── signer-client
│ ├── Cargo.toml
│ └── src
│ │ ├── lib.rs
│ │ └── mocks.rs
├── solana
│ ├── Cargo.toml
│ └── src
│ │ ├── lib.rs
│ │ └── signer.rs
└── ts-tests
│ ├── .prettierrc
│ ├── README.md
│ ├── integration-tests
│ ├── eslintrc.json
│ ├── omni_account.test.ts
│ ├── package.json
│ ├── tsconfig.json
│ └── utils
│ │ ├── context.ts
│ │ ├── crypto.ts
│ │ ├── helpers.ts
│ │ ├── identity.ts
│ │ ├── omni_account.ts
│ │ ├── requests.ts
│ │ ├── signer.ts
│ │ ├── type_creators.ts
│ │ └── wallet.ts
│ ├── package.json
│ ├── pnpm-lock.yaml
│ └── pnpm-workspace.yaml
├── rust-toolchain.toml
└── rustfmt.toml
/.dockerignore:
--------------------------------------------------------------------------------
1 | .dockerignore
2 | .git/
3 | .github/
4 | .githooks/
5 | **/target
6 | **/local-setup
7 |
8 | # stuff under tee-worker/
9 | tee-worker/.dockerignore
10 | tee-worker/**/bin/*.bin
11 | tee-worker/**/bin/key.txt
12 | tee-worker/**/bin/spid.txt
13 | tee-worker/**/bin/sidechain_db/
14 | tee-worker/**/docker/*.yml
15 | tee-worker/**/docs/
16 | tee-worker/**/scripts/
17 | tee-worker/**/target/
18 | tee-worker/**/tmp/
19 | tee-worker/**/*.Dockerfile
20 | tee-worker/**/Dockerfile
21 |
--------------------------------------------------------------------------------
/.githooks/README.md:
--------------------------------------------------------------------------------
1 | To use the hooks under this folder, either set the git config for this repo:
2 | ```
3 | git config core.hooksPath .githooks
4 | ```
5 |
6 | or
7 | manually copy the hook files to .git/hooks/ and double check the files are exectuable.
8 |
9 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/task.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Task issue template
3 | about: Generic issue for new tasks
4 | ---
5 |
6 | ### Context
7 | What's the context and background of this issue?
8 |
9 | ### Task
10 | What needs to be done here?
11 |
12 | ### Acceptance criteria
13 | What's the definition of done, if applicable?
14 |
15 | ---
16 | :heavy_check_mark: Please set appropriate **labels** and **assignees** if applicable.
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
2 | ### Context
3 |
4 |
5 |
6 | ### Labels
7 |
8 | Please apply following PR-related labels when appropriate:
9 | - `C0-breaking`: if your change could break the existing client, e.g. API change, critical logic change
10 | - `C1-noteworthy`: if your change is non-breaking, but is still worth noticing for the client, e.g. reference code improvement
11 |
12 | ### How (Optional)
13 |
14 |
15 |
16 | ### Testing Evidences
17 |
18 | Please attach any relevant evidences if applicable
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.github/runtime.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "paseo",
4 | "package": "paseo-runtime",
5 | "path": "runtime/paseo",
6 | "uri": "wss://rpc.paseo-parachain.heima.network:443"
7 | },
8 | {
9 | "name": "heima",
10 | "package": "heima-runtime",
11 | "path": "runtime/heima",
12 | "uri": "wss://rpc.heima-parachain.heima.network:443"
13 | }
14 | ]
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/target/
2 | **/tmp/
3 | .idea
4 | .vscode
5 | .DS_Store
6 | .cargo/config
7 |
8 | **/node_modules/
9 | **/ts-tests/.yarn
10 |
11 | tags.lock
12 |
13 | recipe.json
14 | rococo-fork.json
15 |
16 | **/gethdata/
17 |
18 | *.patch
19 | /log
20 | /log-backup
21 | **/__pycache__/
22 | **/.env
23 |
24 | rust-analyzer.json
25 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "tee-worker/omni-executor/accounting-contract/bsc/lib/openzeppelin-contracts"]
2 | path = tee-worker/omni-executor/accounting-contract/bsc/lib/openzeppelin-contracts
3 | url = https://github.com/OpenZeppelin/openzeppelin-contracts
4 | [submodule "tee-worker/omni-executor/accounting-contract/bsc/lib/forge-std"]
5 | path = tee-worker/omni-executor/accounting-contract/bsc/lib/forge-std
6 | url = https://github.com/foundry-rs/forge-std
7 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | lts/iron
2 |
--------------------------------------------------------------------------------
/.taplo.toml:
--------------------------------------------------------------------------------
1 | include = ["**/Cargo.toml"]
2 | exclude = ["tee-worker/**/Cargo.toml"]
3 |
4 | [formatting]
5 | array_auto_expand = false
6 | array_auto_collapse = false
7 | indent_string = " "
8 | inline_table_expand = false
9 |
10 | [[rule]]
11 | include = ["**/Cargo.toml"]
12 | keys = ["dependencies", "target", "patch"]
13 |
14 | [rule.formatting]
15 | reorder_keys = true
16 |
17 | [[rule]]
18 | include = ["**/Cargo.toml"]
19 | keys = ["features"]
20 |
21 | [rule.formatting]
22 | array_auto_expand = true
23 |
--------------------------------------------------------------------------------
/local-setup/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/local-setup/__init__.py
--------------------------------------------------------------------------------
/local-setup/development-worker.json:
--------------------------------------------------------------------------------
1 | {
2 | "workers": [
3 | {
4 | "id": "dev",
5 | "source": "bin",
6 | "flags": [
7 | "--clean-reset",
8 | "-P",
9 | "$TrustedWorkerPort",
10 | "-w",
11 | "$UntrustedWorkerPort",
12 | "-r",
13 | "$MuRaPort",
14 | "-h",
15 | "$UntrustedHttpPort",
16 | "-p",
17 | "$CollatorWSPort",
18 | "--enable-mock-server",
19 | "--parentchain-start-block",
20 | "0",
21 | "--enable-metrics"
22 | ],
23 | "subcommand_flags": [
24 | "--skip-ra",
25 | "--dev"
26 | ]
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/local-setup/py/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/local-setup/py/__init__.py
--------------------------------------------------------------------------------
/local-setup/rococo_one_worker.json:
--------------------------------------------------------------------------------
1 | {
2 | "workers": [
3 | {
4 | "source": "bin",
5 | "flags": [
6 | "--clean-reset",
7 | "--ws-external",
8 | "-P",
9 | "2000",
10 | "-w",
11 | "2001",
12 | "-r",
13 | "3443",
14 | "-h",
15 | "4545",
16 | "-u",
17 | "wss://rpc.heima-parachain.heima.network",
18 | "-p",
19 | "443",
20 | "--parentchain-start-block",
21 | "3299860"
22 | ],
23 | "subcommand_flags": [
24 | ]
25 | }
26 | ]
27 | }
--------------------------------------------------------------------------------
/parachain/LICENSE_HEADER:
--------------------------------------------------------------------------------
1 | // Copyright 2020-2024 Trust Computing GmbH.
2 | // This file is part of Litentry.
3 | //
4 | // Litentry is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // Litentry is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with Litentry. If not, see .
16 |
--------------------------------------------------------------------------------
/parachain/docker/bridge.dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.18
2 |
3 | RUN go install github.com/litentry/ChainBridge/cmd/chainbridge@sol0.8.19
4 |
--------------------------------------------------------------------------------
/parachain/docker/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "heima-launch",
3 | "version": "1.0.0",
4 | "main": "",
5 | "license": "GPL-3.0",
6 | "scripts": {
7 | "start": "node_modules/@open-web3/parachain-launch/bin/parachain-launch"
8 | },
9 | "dependencies": {
10 | "@open-web3/parachain-launch": "^2.0.0"
11 | },
12 | "packageManager": "pnpm@8.7.6"
13 | }
14 |
--------------------------------------------------------------------------------
/parachain/node/res/README.md:
--------------------------------------------------------------------------------
1 | This folder contains the static resource for node.
2 |
3 | `genesis_info/` contains JSON-format data which will be loaded by `chain_spec.rs` to genesis a `GenesisConfig`.
4 |
5 | `chain_spec/` contains the raw chain spec that is generated by `build-spec` command.
6 |
--------------------------------------------------------------------------------
/parachain/pallets/bridge/common/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | authors = ['Trust Computing GmbH ']
3 | edition = '2021'
4 | homepage = 'https://www.heima.network'
5 | name = 'pallet-bridge-common'
6 | repository = 'https://github.com/litentry/heima'
7 | version = '0.1.0'
8 |
9 | [dependencies]
10 | parity-scale-codec = { workspace = true }
11 | scale-info = { workspace = true }
12 |
13 | frame-support = { workspace = true, optional = true }
14 | sp-runtime = { workspace = true }
15 |
16 | [features]
17 | default = ["std"]
18 | runtime-benchmarks = [
19 | "frame-support/runtime-benchmarks",
20 | "sp-runtime/runtime-benchmarks",
21 | ]
22 | std = [
23 | "frame-support?/std",
24 | "parity-scale-codec/std",
25 | "scale-info/std",
26 | "sp-runtime/std",
27 | ]
28 |
--------------------------------------------------------------------------------
/parachain/pallets/omni-account/runtime-api/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | authors = ['Trust Computing GmbH ']
3 | version = "0.1.0"
4 | edition = "2021"
5 | homepage = 'https://www.heima.network'
6 | name = 'pallet-omni-account-runtime-api'
7 | repository = 'https://github.com/litentry/heima'
8 |
9 | [dependencies]
10 | parity-scale-codec = { workspace = true }
11 | sp-api = { workspace = true }
12 |
13 | heima-primitives = { workspace = true }
14 | pallet-omni-account = { workspace = true }
15 |
16 | [features]
17 | default = ["std"]
18 | std = [
19 | "heima-primitives/std",
20 | "pallet-omni-account/std",
21 | "parity-scale-codec/std",
22 | "sp-api/std",
23 | ]
24 |
--------------------------------------------------------------------------------
/parachain/pallets/teebag/README.md:
--------------------------------------------------------------------------------
1 | Pallet for Litentry's tee-worker registration and management.
2 |
3 | Currently it expects the following worker type:
4 | - identity worker
5 | - bitacross worker
6 |
7 | It serves as the registry for public information such as MRENCLAVE, worker-endpoint, vc-pubkey etc.
8 |
9 | TBA: MAA / RA information
10 |
11 | This crate is partially based on `teerex` and `sidechain` crate on https://github.com/integritee-network/pallets/commit/e124aebb2d3d05a9a65f209f8e6304c6790f15d5 - for the code part / file that is (mostly) copied from intergritee, the original licence is kept.
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST4.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST4.bin
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST5.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST5.bin
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST6.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST6.bin
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST7.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST7.bin
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST8-PRODUCTION.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST8-PRODUCTION.bin
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST9.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/enclave-signing-pubkey-TEST9.bin
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/ra_dcap_dump_quote.ra:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/ra_dcap_dump_quote.ra
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST4.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST4.der
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST5.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST5.der
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST6.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST6.der
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST7.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST7.der
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST8_PRODUCTION.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST8_PRODUCTION.der
--------------------------------------------------------------------------------
/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST9_enclave_add.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/pallets/teebag/src/ias-data/ra_dump_cert_TEST9_enclave_add.der
--------------------------------------------------------------------------------
/parachain/pallets/upstream_commit:
--------------------------------------------------------------------------------
1 | 75e57c5
2 |
--------------------------------------------------------------------------------
/parachain/precompiles/bridge-transfer/BridgeInterface.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-3.0-only
2 | pragma solidity >=0.8.3;
3 |
4 | interface IBridgeTransfer {
5 | /// @notice Used to transfer assets through token bridge.
6 | /// @param amount: The amount of tokens to be transferred.
7 | /// @param dest_id: The destination chain id indicator
8 | /// @param resource_id: Resource indicator of type of assets transferred
9 | /// @param recipient: Recipient address, typically H160/H256
10 | /// @custom:selector 0x6e700f9a
11 | /// transferAssets(uint256,uint8,bytes32,bytes)
12 | function transferAssets(uint256 amount, uint8 dest_id, bytes32 resource_id, bytes calldata recipient) external;
13 | }
14 |
--------------------------------------------------------------------------------
/parachain/precompiles/vesting/VestingInterface.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-3.0-only
2 | pragma solidity >=0.8.3;
3 |
4 | interface IVesting {
5 | /// @notice Used to unlock vest.
6 | /// @custom:selector 0x458efde3
7 | /// vest()
8 | function vest() external;
9 | }
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/fuzz/fuzz_targets/decode_quote.rs:
--------------------------------------------------------------------------------
1 | #![no_main]
2 |
3 | use parity_scale_codec::{Decode};
4 | use libfuzzer_sys::fuzz_target;
5 | use sgx_verify::DcapQuote;
6 |
7 | fuzz_target!(|data: &[u8]| {
8 | let mut copy = data;
9 | let _quote: Result = Decode::decode(&mut copy);
10 |
11 | // This assert is commented out because the fuzzer manages to find a "valid" quote that can
12 | // at least be decoded into memory. We would need additional verification steps (for example signature)
13 | // to enable this check.
14 | //assert!(quote.is_err());
15 | });
16 |
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/fuzz/fuzz_targets/deserialize_json.rs:
--------------------------------------------------------------------------------
1 | #![no_main]
2 |
3 | use libfuzzer_sys::fuzz_target;
4 | use sgx_verify::collateral::{EnclaveIdentity, TcbInfo};
5 |
6 | fuzz_target!(|data: &[u8]| {
7 | let enclave: Result = serde_json::from_slice(data);
8 | assert!(enclave.is_err());
9 | let tcb_info: Result = serde_json::from_slice(data);
10 | assert!(tcb_info.is_err());
11 | });
12 |
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/fuzz/fuzz_targets/extract_tcb_info.rs:
--------------------------------------------------------------------------------
1 | #![no_main]
2 |
3 | use libfuzzer_sys::fuzz_target;
4 | use sgx_verify::extract_tcb_info;
5 |
6 | fuzz_target!(|data: &[u8]| {
7 | assert!(extract_tcb_info(data).is_err());
8 | });
9 |
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/fuzz/fuzz_targets/verify_ias_report.rs:
--------------------------------------------------------------------------------
1 | #![no_main]
2 |
3 | use libfuzzer_sys::fuzz_target;
4 | use sgx_verify::verify_ias_report;
5 |
6 | fuzz_target!(|data: &[u8]| {
7 | // Check test that there is now panic and that the provided data is not a valid IAS report
8 | assert!(verify_ias_report(data).is_err());
9 | });
10 |
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/dcap/root_ca_crl.der:
--------------------------------------------------------------------------------
1 | 308201213081c8020101300a06082a8648ce3d0403023068311a301806035504030c11496e74656c2053475820526f6f74204341311a3018060355040a0c11496e74656c20436f72706f726174696f6e3114301206035504070c0b53616e746120436c617261310b300906035504080c024341310b3009060355040613025553170d3232303431393038333131385a170d3233303431393038333131385aa02f302d300a0603551d140403020101301f0603551d2304183016801422650cd65a9d3489f383b49552bf501b392706ac300a06082a8648ce3d0403020348003045022100b7805acf592113584c45c8b0e11b2b8a9db462a215bbf8d4fd416539d7f5ab7502207ff56984c5199cf2b23d97d37b104ec0ebb5243674f41346887a6bdfbfdfeb42
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST4.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST4.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST5.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST5.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST6.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST6.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST7.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST7.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST8-PRODUCTION.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/enclave-signing-pubkey-TEST8-PRODUCTION.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST4.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST4.der
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST5.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST5.der
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST6.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST6.der
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST7.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST7.der
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST8_PRODUCTION.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/ra_dump_cert_TEST8_PRODUCTION.der
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_cert_MRSIGNER1_MRENCLAVE1.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_cert_MRSIGNER1_MRENCLAVE1.der
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_cert_MRSIGNER2_MRENCLAVE2.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_cert_MRSIGNER2_MRENCLAVE2.der
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_cert_MRSIGNER3_MRENCLAVE2.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_cert_MRSIGNER3_MRENCLAVE2.der
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_attn_MRSIGNER2_MRENCLAVE2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_attn_MRSIGNER2_MRENCLAVE2.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_attn_MRSIGNER3_MRENCLAVE2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_attn_MRSIGNER3_MRENCLAVE2.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER1_MRENCLAVE1.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER1_MRENCLAVE1.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER2_MRENCLAVE2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER2_MRENCLAVE2.bin
--------------------------------------------------------------------------------
/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER3_MRENCLAVE2.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/primitives/src/teebag/sgx_verify/test/test_ra_signer_pubkey_MRSIGNER3_MRENCLAVE2.bin
--------------------------------------------------------------------------------
/parachain/runtime/heima/src/migration/mod.rs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/runtime/heima/src/migration/mod.rs
--------------------------------------------------------------------------------
/parachain/runtime/paseo/src/migration/migration.md:
--------------------------------------------------------------------------------
1 | # A set of migrations
2 | P9223.rs
3 | https://github.com/litentry/heima/releases/tag/v0.9.22-03
4 | This migration is for updating storage version for Paseo
--------------------------------------------------------------------------------
/parachain/runtime/paseo/src/migration/mod.rs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/parachain/runtime/paseo/src/migration/mod.rs
--------------------------------------------------------------------------------
/parachain/rust-toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | channel = "1.83.0"
3 | components = ["rust-src", "rustfmt", "clippy"]
4 | targets = ["wasm32-unknown-unknown"]
--------------------------------------------------------------------------------
/parachain/rustfmt.toml:
--------------------------------------------------------------------------------
1 | hard_tabs = true
2 | max_width = 100
3 | use_small_heuristics = "Max"
4 | reorder_imports = true
5 | newline_style = "Unix"
6 | chain_width = 80
7 | match_arm_leading_pipes = "Preserve"
8 | match_block_trailing_comma = true
9 | use_field_init_shorthand = true
--------------------------------------------------------------------------------
/parachain/scripts/build-bridge.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -eo pipefail
3 |
4 | ROOTDIR=$(git rev-parse --show-toplevel)
5 |
6 | # Build the image
7 | echo "Building litentry/chainbridge:latest docker image ..."
8 | docker build --no-cache -f ${ROOTDIR}/parachain/docker/bridge.dockerfile -t litentry/chainbridge:latest .
--------------------------------------------------------------------------------
/parachain/scripts/generate-prod-chain-spec.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -eo pipefail
3 |
4 | function usage() {
5 | echo "Usage: $0 heima|paseo [docker-tag]"
6 | }
7 |
8 | [ $# -lt 1 ] && (usage; exit 1)
9 |
10 | ROOTDIR=$(git rev-parse --show-toplevel)
11 | cd "$ROOTDIR/parachain"
12 |
13 | CHAIN=$1
14 | TAG=${2:-latest}
15 | image="litentry/heima:$TAG"
16 |
17 | docker pull "$image"
18 |
19 | docker run --rm "$image" build-spec --chain=generate-$CHAIN > node/res/chain_specs/$CHAIN-plain.json
20 | docker run --rm "$image" build-spec --chain=generate-$CHAIN --raw > node/res/chain_specs/$CHAIN.json
21 |
22 | echo "Done, please check node/res/chain_specs/"
23 | ls -l node/res/chain_specs/
24 |
--------------------------------------------------------------------------------
/parachain/scripts/geth/keystore/charlie.json:
--------------------------------------------------------------------------------
1 | {
2 | "address": "24962717f8fa5ba3b931bacaf9ac03924eb475a0",
3 | "crypto": {
4 | "cipher": "aes-128-ctr",
5 | "ciphertext": "2010c82e4f777f75e9ffdd4514e099b25816c8560242b9762ce1ed04573b50f5",
6 | "cipherparams": {
7 | "iv": "7c2aab96d18369be4ac521ed03049f9f"
8 | },
9 | "kdf": "scrypt",
10 | "kdfparams": {
11 | "dklen": 32,
12 | "n": 262144,
13 | "p": 1,
14 | "r": 8,
15 | "salt": "6036a600ca2166251039131d77d6b37d89e80000dd004bbf16580a2643910b78"
16 | },
17 | "mac": "fa77b3747acab9c4130b7095475e34af45bce8c8ba6c12a4bb5fb23d8f079cab"
18 | },
19 | "id": "91b5a990-689d-48d1-a694-6443a09af53e",
20 | "version": 3
21 | }
--------------------------------------------------------------------------------
/parachain/scripts/geth/keystore/dave.json:
--------------------------------------------------------------------------------
1 | {
2 | "address": "148ffb2074a9e59ed58142822b3eb3fcbffb0cd7",
3 | "crypto": {
4 | "cipher": "aes-128-ctr",
5 | "ciphertext": "9551ea975036fe0226dd577e0b90c52d9fd32a403eab86c2a4a90a5dee5f475e",
6 | "cipherparams": {
7 | "iv": "3c7d71f2868268fcdf15d164d7e6c0af"
8 | },
9 | "kdf": "scrypt",
10 | "kdfparams": {
11 | "dklen": 32,
12 | "n": 262144,
13 | "p": 1,
14 | "r": 8,
15 | "salt": "1ef030cb03e35d2cdf061f1795251536045f9036bfb097fde0c6da6b0f41c701"
16 | },
17 | "mac": "cd1093e3feec3684c5c6463ea73ffe25e36cd8bb11abc979b5582b960d5a6917"
18 | },
19 | "id": "968788f7-c7b8-4b91-bc8a-a6544618003b",
20 | "version": 3
21 | }
--------------------------------------------------------------------------------
/parachain/scripts/geth/keystore/eve.json:
--------------------------------------------------------------------------------
1 | {
2 | "address": "4ceef6139f00f9f4535ad19640ff7a0137708485",
3 | "crypto": {
4 | "cipher": "aes-128-ctr",
5 | "ciphertext": "180729be5cf9c7df4e14e2f80079dd7c4022d43b30b18fe8bda54e1268ae378a",
6 | "cipherparams": {
7 | "iv": "a7178c2bed9c29d4ba5933f53de5575b"
8 | },
9 | "kdf": "scrypt",
10 | "kdfparams": {
11 | "dklen": 32,
12 | "n": 262144,
13 | "p": 1,
14 | "r": 8,
15 | "salt": "105cf7887c292b02c9648c56f9520cf39d2b829b340a09d8ae88c4b2577b5826"
16 | },
17 | "mac": "dd97648c2a234a7e81a43871ced0fb07832eb97b7c81e61a6dd451e5ea3269ff"
18 | },
19 | "id": "41f27bcf-9139-4b9c-9370-0becd8d73eb1",
20 | "version": 3
21 | }
--------------------------------------------------------------------------------
/parachain/scripts/geth/password.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/parachain/scripts/run-ts-test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -eo pipefail
4 |
5 | case "$1" in
6 | heima|paseo) export PARACHAIN_TYPE=$1 ;;
7 | *) echo "usage: ./$0 heima|paseo"; exit 1 ;;
8 | esac
9 |
10 | ROOTDIR=$(git rev-parse --show-toplevel)
11 | cd "$ROOTDIR/parachain/ts-tests"
12 |
13 | HEIMA_DIR=${HEIMA_DIR:-"/tmp/parachain_dev"}
14 | [ -d "$HEIMA_DIR" ] || mkdir -p "$HEIMA_DIR"
15 |
16 | [ -f .env ] || echo "NODE_ENV=ci" > .env
17 | pnpm install
18 | pnpm run test-filter 2>&1 | tee -a "$HEIMA_DIR/parachain_ci_test.log"
19 |
20 | pnpm run test-evm-contract 2>&1 | tee -a "$HEIMA_DIR/parachain_ci_test.log"
21 | pnpm run test-precompile-contract 2>&1 | tee -a "$HEIMA_DIR/parachain_ci_test.log"
22 |
--------------------------------------------------------------------------------
/parachain/scripts/ts-utils/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore all JSON files
2 | *.json
3 | !package.json
4 |
5 | # But don't ignore tsconfig.json
6 | !tsconfig.json
--------------------------------------------------------------------------------
/parachain/scripts/ts-utils/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "es5",
3 | "singleQuote": true,
4 | "printWidth": 120,
5 | "tabWidth": 4,
6 | "semi": true
7 | }
8 |
--------------------------------------------------------------------------------
/parachain/scripts/ts-utils/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ts-utils",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "format": "pnpm exec prettier --write '**.ts'"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "@polkadot/api": "*",
14 | "@polkadot/util-crypto": "^13.0.2"
15 | },
16 | "devDependencies": {
17 | "@types/node": "^18.15.11",
18 | "colors": "^1.4.0",
19 | "ethers": "^6.13.2",
20 | "exceljs": "^4.3.0",
21 | "prettier": "^2.8.7",
22 | "ts-node": "^10.9.1",
23 | "typescript": "^5.0.4"
24 | },
25 | "packageManager": "pnpm@8.7.6"
26 | }
27 |
--------------------------------------------------------------------------------
/parachain/scripts/ts-utils/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "esModuleInterop": true
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/parachain/templates/benchmark/README.md:
--------------------------------------------------------------------------------
1 | This folder containers the templates that are used for benchmarking.
2 |
3 | `pallet-weight-template.hbs` is based on https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs
4 | with a few modifications:
5 |
6 | - use `{{header}}` to configure header from command line
7 | - add `#![allow(clippy::unnecessary_cast)]` to make clippy happy
8 | - `SubstrateWeight` -> `LitentryWeight`
--------------------------------------------------------------------------------
/parachain/ts-tests/.env.example:
--------------------------------------------------------------------------------
1 | NODE_ENV=<`local` or `prod` or `test` or `ci`>
2 |
--------------------------------------------------------------------------------
/parachain/ts-tests/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | .pnp.*
3 |
4 | config.local.json
5 | package-lock.json
6 |
7 | common/bob.json
8 | common/data/
--------------------------------------------------------------------------------
/parachain/ts-tests/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "es5",
3 | "singleQuote": true,
4 | "printWidth": 120,
5 | "tabWidth": 4,
6 | "semi": true
7 | }
8 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/abi/precompile/Bridge.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputs": [
4 | {
5 | "internalType": "uint256",
6 | "name": "amount",
7 | "type": "uint256"
8 | },
9 | {
10 | "internalType": "uint8",
11 | "name": "dest_id",
12 | "type": "uint8"
13 | },
14 | {
15 | "internalType": "bytes32",
16 | "name": "resource_id",
17 | "type": "bytes32"
18 | },
19 | {
20 | "internalType": "bytes",
21 | "name": "recipient",
22 | "type": "bytes"
23 | }
24 | ],
25 | "name": "transferAssets",
26 | "outputs": [],
27 | "stateMutability": "nonpayable",
28 | "type": "function"
29 | }
30 | ]
--------------------------------------------------------------------------------
/parachain/ts-tests/common/abi/precompile/OmniBridge.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputs": [
4 | {
5 | "internalType": "uint256",
6 | "name": "amount",
7 | "type": "uint256"
8 | },
9 | {
10 | "internalType": "uint8",
11 | "name": "dest_id",
12 | "type": "uint8"
13 | },
14 | {
15 | "internalType": "bool",
16 | "name": "native",
17 | "type": "bool"
18 | },
19 | {
20 | "internalType": "uint256",
21 | "name": "asset_id",
22 | "type": "uint256"
23 | },
24 | {
25 | "internalType": "bytes",
26 | "name": "recipient",
27 | "type": "bytes"
28 | }
29 | ],
30 | "name": "payIn",
31 | "outputs": [],
32 | "stateMutability": "nonpayable",
33 | "type": "function"
34 | }
35 | ]
--------------------------------------------------------------------------------
/parachain/ts-tests/common/abi/precompile/README.md:
--------------------------------------------------------------------------------
1 | # EVM Contracts JSON
2 |
3 | This folder contains Ethereum Virtual Machine (EVM) contracts converted to JSON format using Remix.
4 |
5 | ## What is Remix?
6 |
7 | [Remix](https://remix.ethereum.org/) is an open-source web and desktop application that helps developers write, test, and deploy smart contracts on the Ethereum blockchain. It provides a user-friendly interface for Solidity development and offers features such as a built-in code editor, debugger, and compiler.
8 |
9 | ## Included Contracts
10 |
11 | - [ParachainStaking] precompiles/parachain-staking/StakingInterface.sol
12 | - [BridgeTransfer] precompiles/bridge-transfer/BridgeInterface.sol
13 | - [OmniBridge] precompiles/omni-bridge/OmniBridgeInterface.sol
14 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/abi/precompile/Vesting.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputs": [],
4 | "name": "vest",
5 | "outputs": [],
6 | "stateMutability": "nonpayable",
7 | "type": "function"
8 | }
9 | ]
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/0x148FfB2074A9e59eD58142822b3eB3fcBffb0cd7.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "secp256k1",
3 | "publicKey": "0x03537d29c8cc79883c593d6d86bcbe281ed4b8e77554d99a5fd9228f698f7bffc1",
4 | "address": "0x148FfB2074A9e59eD58142822b3eB3fcBffb0cd7",
5 | "ciphertext": "9VQOouaujMKxej/gBg1UmNXqp4uOwfFAD9pfwaKFEADu83LBx4r0zQHUATEjqcIuh97lvhm8BJ6pXllG"
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/0x24962717f8fA5BA3b931bACaF9ac03924EB475a0.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "secp256k1",
3 | "publicKey": "0x035933285a484fe3f600040ab207eb5c3162f13e91d8698b4053b980891dc122d9",
4 | "address": "0x24962717f8fA5BA3b931bACaF9ac03924EB475a0",
5 | "ciphertext": "zbr/uT3rjeuD301Ec6SyHLkp0wfDsF6YyDk9/exT4zjrfGt4+4zA2d++RIR9dNU8w9RhWhpgmWgBFr8b"
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/0x4CEEf6139f00F9F4535Ad19640Ff7A0137708485.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "secp256k1",
3 | "publicKey": "0x026eea5c6b073252f665c3d487cc6fb5804e2050fe17b231512a48cef0a4f0f323",
4 | "address": "0x4CEEf6139f00F9F4535Ad19640Ff7A0137708485",
5 | "ciphertext": "6B7rBw5isADNOoczVJm7/HQhI4b8aW/4GKZbRClej3Y7gpOiyeKS5eRCgBY5noOgArl8dHflAX3JPGEH"
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/0x8e0a907331554AF72563Bd8D43051C2E64Be5d35.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "secp256k1",
3 | "publicKey": "0x026f7a4f6fcf1ae8aa25e1227cb9b67aa462edc47e956d7d3d7dbe899e09484e4c",
4 | "address": "0x8e0a907331554AF72563Bd8D43051C2E64Be5d35",
5 | "ciphertext": "D60RUPRCW+YIXOGvQukM+PzQvHBGF2jBCkt2wUFDVVuDmqomQaUZv2O2ApWLqep3S/xKQRRcsk02mMJe"
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/0xff93B45308FD417dF303D6515aB04D9e89a750Ca.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "secp256k1",
3 | "publicKey": "0x027c482893044672fca67ef5b43c9eeaa888f1adf17c7f739fc57d88efd8475f25",
4 | "address": "0xff93B45308FD417dF303D6515aB04D9e89a750Ca",
5 | "ciphertext": "3TLWB2xHIITvBj0p9RDRHCG81otd5nsPupFXOy9tbaIskzO2B34f/KyKPe9RskkwJ0H4BMCK/GC3760X"
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "sr25519",
3 | "publicKey": "0x306721211d5404bd9da88e0204360a1a9ab8b87c66c1bc2fcdd37f3c2222cc20",
4 | "address": "5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy",
5 | "ciphertext": "LvzMT96ONpbj3XyQ8KLcKlYtei12mJBTyefeRZiLnRJgxVphRb9PhxaWApUFxhEgd+EWZ0Fuadbi2hiBEVezELD/PTKpJcP8yMqTbH7QooIXmyj7H/jWd/lUzdE1k0GOzrE+fCmURTUFEG0MmUE1Q26rm/qa"
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "sr25519",
3 | "publicKey": "0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48",
4 | "address": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
5 | "ciphertext": "3Iu+mNpLk1cJ/ShFRx3tEAi+ENw+8LlaDhvG4QFhxCVZqcET+aqx0suLequSM4N7Dzu+LVY/603EPMdUo3gfV6Fb/fvk67Dj69q1aBJmJZXUW/rNGZKySHCQ7WodNfeXXyKiNEWk9xDNaFTmcUgDMnETV7k="
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "sr25519",
3 | "publicKey": "0x90b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22",
4 | "address": "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y",
5 | "ciphertext": "JbcLO1xs3+dYsFowt1BdnYHhl/4vtwRgdf1LY/R6DWwNlQCyqLr/WCIE4w7Ggkcu+PFvMRu4yoE7C34LmphZBFp+KMX3aoECd8BhIRsGZU4CvoST2ZEAffHnM+NIVD2fWMTF3SFCUCcrYcI5TplwVv53eCUkdEWh"
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "sr25519",
3 | "publicKey": "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d",
4 | "address": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
5 | "ciphertext": "bTeQbl7XCEWPw/WDXLATME27D41UzziWGL35ahBnuGHQy81d+j1dCC3QvEvNf3zl7habO5bx0jU7GPZ670g87PvmtTUebzwGHIUHCOUc2mpRLqfyIAVC/wMZeHgbY3SlXvI07PbnI6H6WkEpnOFEOwyvGE/1IA=="
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/keys/5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw.key:
--------------------------------------------------------------------------------
1 | {
2 | "type": "sr25519",
3 | "publicKey": "0xe659a7a1628cdd93febc04a4e0646ea20e9f5f0ce097d9a05290d4a9e054df4e",
4 | "address": "5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw",
5 | "ciphertext": "vWNxXSLfm/LIk605Y00riqW3n6Bu9YYojndajmZjw9o6YU6nnWImvo5oUPVq2nXJJyXytHVx1dzepwnXn+2QeTFOGcpX1tDJDCGxJfdsE8xojPPpdgGb1XxFaheOcqx6sQkXxmqcc+fVHXoscong9QmOxWE="
6 | }
7 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/utils/config.ts:
--------------------------------------------------------------------------------
1 | export function loadConfig() {
2 | require('dotenv').config();
3 | switch (process.env.NODE_ENV) {
4 | case 'local':
5 | return require('../../config.local.json');
6 | case 'test':
7 | case 'ci':
8 | return require('../../config.ci.json');
9 | case 'prod':
10 | return require('../../config.prod.json');
11 | default:
12 | throw new Error(`Invalid NODE_ENV: ${process.env.NODE_ENV}`);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/utils/consts.ts:
--------------------------------------------------------------------------------
1 | // substrate native token
2 | export const destResourceId = '0x00000000000000000000000000000063a7e2be78898ba83824b0c0cc8dfb6001';
3 |
--------------------------------------------------------------------------------
/parachain/ts-tests/common/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './config';
2 | export * from './integration-setup';
3 | export * from './function';
4 | export * from './consts';
5 |
--------------------------------------------------------------------------------
/parachain/ts-tests/config.ci.json:
--------------------------------------------------------------------------------
1 | {
2 | "eth_endpoint": "http://127.0.0.1:8545",
3 | "eth_address": "[0x4d88dc5d528a33e4b8be579e9476715f60060582]",
4 | "private_key": "0xe82c0c4259710bb0d6cf9f9e8d0ad73419c1278a14d375e5ca691e7618103011",
5 | "ocw_account": "5FEYX9NES9mAJt1Xg4WebmHWywxyeGQK8G3oEBXtyfZrRePX",
6 | "genesis_state_path": "/tmp/parachain_dev/genesis-state",
7 | "genesis_wasm_path": "/tmp/parachain_dev/genesis-wasm",
8 | "parachain_ws": "ws://127.0.0.1:9944",
9 | "relaychain_ws": "ws://127.0.0.1:9946",
10 | "bridge_path": "/tmp/parachain_dev/chainbridge",
11 | "parachain_fast_runtime": "true"
12 | }
13 |
--------------------------------------------------------------------------------
/parachain/ts-tests/config.prod.json:
--------------------------------------------------------------------------------
1 | {
2 | "eth_endpoint": "http://127.0.0.1:8545",
3 | "eth_address": "[0x4d88dc5d528a33e4b8be579e9476715f60060582]",
4 | "private_key": "0xe82c0c4259710bb0d6cf9f9e8d0ad73419c1278a14d375e5ca691e7618103011",
5 | "ocw_account": "5FEYX9NES9mAJt1Xg4WebmHWywxyeGQK8G3oEBXtyfZrRePX",
6 | "genesis_state_path": "/tmp/parachain_dev/genesis-state",
7 | "genesis_wasm_path": "/tmp/parachain_dev/genesis-wasm",
8 | "parachain_ws": "ws://127.0.0.1:9944",
9 | "relaychain_ws": "ws://127.0.0.1:9946",
10 | "bridge_path": "/tmp/parachain_dev/chainbridge",
11 | "parachain_fast_runtime": "false"
12 | }
13 |
--------------------------------------------------------------------------------
/parachain/ts-tests/global.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'solc';
2 |
--------------------------------------------------------------------------------
/parachain/ts-tests/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./node_modules/gts/tsconfig-google.json",
3 | "compilerOptions": {
4 | "esModuleInterop": true,
5 | "resolveJsonModule": true,
6 | "target": "es5",
7 | "lib": ["es2019"],
8 | "rootDir": ".",
9 | "outDir": "build"
10 | },
11 | "include": ["ts-tests/**/*.ts", "ts-tests/**/*.d.ts"],
12 | "exclude": ["node_modules"]
13 | }
14 |
--------------------------------------------------------------------------------
/parachain/utils/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | authors = ['Trust Computing GmbH ']
3 | name = "heima-utils"
4 | version = "0.1.0"
5 | edition = "2021"
6 |
7 | [dependencies]
8 | hex = { workspace = true }
9 |
10 | [dev-dependencies]
11 | parity-scale-codec = { workspace = true }
12 |
13 | [features]
14 | default = ["std"]
15 | std = [
16 | "parity-scale-codec/std",
17 | "hex/std",
18 | ]
19 | development = []
20 |
--------------------------------------------------------------------------------
/parachain/utils/proc-macros/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | authors = ['Trust Computing GmbH ']
3 | name = "heima-utils-proc-macros"
4 | version = "0.1.0"
5 | edition = "2021"
6 |
7 | [lib]
8 | proc-macro = true
9 |
10 | [dependencies]
11 | cargo_toml = "0.19"
12 | proc-macro2 = "1"
13 | quote = "1"
14 | syn = { version = "2", features = ["full", "visit-mut"] }
15 |
--------------------------------------------------------------------------------
/tee-worker/.taplo.toml:
--------------------------------------------------------------------------------
1 | include = ["**/Cargo.toml"]
2 |
3 | [formatting]
4 | array_auto_expand = false
5 | array_auto_collapse = false
6 | indent_string = " "
7 | inline_table_expand = false
8 |
9 | [[rule]]
10 | include = ["**/Cargo.toml"]
11 | keys = ["dependencies", "target", "patch"]
12 |
13 | [rule.formatting]
14 | reorder_keys = true
15 |
16 | [[rule]]
17 | include = ["**/Cargo.toml"]
18 | keys = ["features"]
19 |
20 | [rule.formatting]
21 | array_auto_expand = true
--------------------------------------------------------------------------------
/tee-worker/client-api/.gitignore:
--------------------------------------------------------------------------------
1 | # Build outputs
2 | /dist
3 | /build
4 |
5 | # Generated files
6 | /src/*/build/
7 | /src/**/interfaces/**/*.ts
8 | !/src/**/interfaces/**/definitions.ts
9 |
10 | # Node modules
11 | node_modules
12 |
13 | # Metadata files
14 | metadata-*.json
15 |
16 | # IDE and OS files
17 | .DS_Store
18 | .idea
19 | .vscode
--------------------------------------------------------------------------------
/tee-worker/client-api/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # CHANGELOG
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7 |
8 | This package is a refactor of [parachain-api](https://www.npmjs.com/package/@heima-network/parachain-api) and [sidechain-api](https://www.npmjs.com/package/@heima-network/sidechain-api).
9 |
10 | ## [Unreleased]
11 |
12 | ## [0.0.2] - 2025-06-05
13 | ### Changed
14 | - Change `CorePrimitivesIdentity` to `HeimaPrimitivesIdentity`
15 |
16 | ## [0.0.1] - 2025-05-22
17 | ### Changed
18 | - Change `@heima-network/*-api` to `@heima-network/api-augment/*`
19 |
20 |
21 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/identity/interfaces/definitions.ts:
--------------------------------------------------------------------------------
1 | export { default as identity } from "./identity/definitions";
2 | export { default as vc } from "./vc/definitions";
3 | export { default as trusted_operations } from "./trusted_operations/definitions";
4 | export { default as sidechain } from "./sidechain/definitions";
5 | export { default as omniAccount } from "./omniAccount/definitions";
6 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/identity/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": ".",
5 | "baseUrl": "./",
6 | "outDir": "../../dist/identity",
7 | "declarationDir": "../../dist/identity",
8 | "declarationMap": true,
9 | "paths": {
10 | "@heima-network/api-augment/identity/interfaces/*": ["interfaces/*"],
11 | "@polkadot/api/augment": ["interfaces/augment-api.ts"],
12 | "@polkadot/types/augment": ["interfaces/augment-types.ts"],
13 | "@polkadot/types/lookup": ["interfaces/types-lookup.ts"]
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/omni/index.ts:
--------------------------------------------------------------------------------
1 | // augment on-chain lookup types
2 | import "./interfaces/types-lookup.js";
3 |
4 | // augment types for createType(...)
5 | import "./interfaces/augment-types.js";
6 | import "./interfaces/registry.js";
7 |
8 | // augment API interfaces
9 | import "./interfaces/augment-api.js";
10 |
11 | export * from "@polkadot/types/lookup";
12 | export * from "./interfaces/index.js";
13 |
14 | import { default as omniAccount } from "./interfaces/omniAccount/definitions.js";
15 | import { default as omniExecutor } from "./interfaces/omniExecutor/definitions.js";
16 | export { omniAccount, omniExecutor };
17 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/omni/interfaces/definitions.ts:
--------------------------------------------------------------------------------
1 | export { default as identity } from "./identity/definitions";
2 | export { default as vc } from "./vc/definitions";
3 | export { default as omniAccount } from "./omniAccount/definitions";
4 | export { default as trusted_operations } from "./trusted_operations/definitions";
5 | export { default as sidechain } from "./sidechain/definitions";
6 | export { default as omniExecutor } from "./omniExecutor/definitions";
7 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/omni/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": ".",
5 | "baseUrl": "./",
6 | "outDir": "../../dist/omni",
7 | "declarationDir": "../../dist/omni",
8 | "declarationMap": true,
9 | "paths": {
10 | "@heima-network/api-augment/omni/interfaces/*": ["interfaces/*"],
11 | "@polkadot/api/augment": ["interfaces/augment-api.ts"],
12 | "@polkadot/types/augment": ["interfaces/augment-types.ts"],
13 | "@polkadot/types/lookup": ["interfaces/types-lookup.ts"]
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/sidechain/index.ts:
--------------------------------------------------------------------------------
1 | // augment on-chain lookup types
2 | import "./interfaces/types-lookup.js";
3 |
4 | // augment types for createType(...)
5 | import "./interfaces/augment-types.js";
6 | import "./interfaces/registry.js";
7 |
8 | // augment API interfaces
9 | import "./interfaces/augment-api.js";
10 |
11 | export * from "./interfaces";
12 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/sidechain/interfaces/definitions.ts:
--------------------------------------------------------------------------------
1 | export { default as dummynocustom } from "./dummynocustom/definitions";
2 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/sidechain/interfaces/dummynocustom/definitions.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | types: {},
3 | };
4 |
--------------------------------------------------------------------------------
/tee-worker/client-api/src/sidechain/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": ".",
5 | "baseUrl": "./",
6 | "outDir": "../../dist/sidechain",
7 | "declarationDir": "../../dist/sidechain",
8 | "declarationMap": true,
9 | "paths": {
10 | "@heima-network/api-augment/sidechain/interfaces/*": ["interfaces/*"],
11 | "@polkadot/api/augment": ["interfaces/augment-api.ts"],
12 | "@polkadot/types/augment": ["interfaces/augment-types.ts"],
13 | "@polkadot/types/lookup": ["interfaces/types-lookup.ts"]
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tee-worker/client-api/tsconfig.base.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "esnext",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "strict": true,
7 | "noImplicitAny": true,
8 | "noImplicitReturns": true,
9 | "esModuleInterop": true,
10 | "skipLibCheck": true,
11 | "baseUrl": ".",
12 | "composite": true,
13 | "declaration": true,
14 | "paths": {
15 | "identity": ["identity/src"],
16 | "omni": ["omni/src"],
17 | "sidechain": ["sidechain/src"]
18 | }
19 | },
20 | "exclude": ["node_modules", "dist"]
21 | }
22 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/binary-merkle-tree/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-binary-merkle-tree"
3 | version = "0.8.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | binary-merkle-tree = { workspace = true }
8 | codec = { package = "parity-scale-codec", workspace = true }
9 | serde = { workspace = true }
10 |
11 | [features]
12 | std = [
13 | "codec/std",
14 | "serde/std",
15 | "binary-merkle-tree/std",
16 | ]
17 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/component-container/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-component-container"
3 | version = "0.8.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | sgx_tstd = { workspace = true, optional = true }
9 | thiserror = { workspace = true, optional = true }
10 | thiserror_sgx = { workspace = true, optional = true }
11 |
12 | [features]
13 | default = ["std"]
14 | std = [
15 | "thiserror",
16 | ]
17 | sgx = [
18 | "sgx_tstd",
19 | "thiserror_sgx",
20 | ]
21 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/enclave-metrics/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-enclave-metrics"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | codec = { package = "parity-scale-codec", workspace = true, features = ["full"] }
9 | litentry-primitives = { workspace = true }
10 | sgx_tstd = { workspace = true, optional = true }
11 |
12 | [features]
13 | default = ["std"]
14 | std = [
15 | "codec/std",
16 | "litentry-primitives/std",
17 | ]
18 | sgx = [
19 | "sgx_tstd",
20 | "litentry-primitives/sgx",
21 | ]
22 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/hashing/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-hashing"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | sp-core = { workspace = true }
9 |
10 | [features]
11 | default = ["std"]
12 | std = [
13 | "sp-core/std",
14 | ]
15 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/import-queue/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-import-queue"
3 | version = "0.8.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | sgx_tstd = { workspace = true, optional = true }
9 | sgx_types = { workspace = true }
10 |
11 | thiserror = { workspace = true, optional = true }
12 | thiserror_sgx = { workspace = true, optional = true }
13 |
14 | [features]
15 | default = ["std"]
16 | std = [
17 | "thiserror",
18 | ]
19 | sgx = [
20 | "sgx_tstd",
21 | "thiserror_sgx",
22 | ]
23 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/networking-utils/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-networking-utils"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | sgx_tstd = { workspace = true, optional = true }
9 |
10 | [features]
11 | default = ["std"]
12 | std = []
13 | sgx = [
14 | "sgx_tstd",
15 | ]
16 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/node-api/api-client-extensions/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-api-client-extensions"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | sp-consensus-grandpa = { workspace = true, features = ["std"] }
9 | sp-runtime = { workspace = true, features = ["std"] }
10 | substrate-api-client = { workspace = true, features = ["std"] }
11 |
12 | itp-api-client-types = { workspace = true, features = ["std"] }
13 | itp-types = { workspace = true, features = ["std"] }
14 |
15 | [features]
16 | # used for unit testing only!
17 | mocks = []
18 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/node-api/api-client-types/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-api-client-types"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | codec = { package = "parity-scale-codec", workspace = true }
9 | itp-types = { workspace = true }
10 | substrate-api-client = { workspace = true }
11 |
12 | [features]
13 | default = ["std"]
14 | std = [
15 | "itp-types/std",
16 | "substrate-api-client/std",
17 | "substrate-api-client/tungstenite-client",
18 | ]
19 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/node-api/factory/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-node-api-factory"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | itp-api-client-types = { workspace = true, features = ["std"] }
9 | sp-core = { workspace = true, features = ["std"] }
10 | thiserror = { workspace = true }
11 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/node-api/metadata-provider/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-node-api-metadata-provider"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | sgx_tstd = { workspace = true, optional = true }
9 | thiserror = { workspace = true, optional = true }
10 | thiserror_sgx = { workspace = true, optional = true }
11 |
12 | itp-node-api-metadata = { workspace = true }
13 | itp-stf-primitives = { workspace = true }
14 |
15 | [features]
16 | default = ["std"]
17 | std = [
18 | "thiserror",
19 | "itp-stf-primitives/std",
20 | ]
21 | sgx = [
22 | "sgx_tstd",
23 | "thiserror_sgx",
24 | ]
25 | # used for unit testing only!
26 | mocks = []
27 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/nonce-cache/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-nonce-cache"
3 | version = "0.8.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | sgx_tstd = { workspace = true, optional = true }
9 | thiserror = { workspace = true, optional = true }
10 | thiserror_sgx = { workspace = true, optional = true }
11 |
12 | [features]
13 | default = ["std"]
14 | std = [
15 | "thiserror",
16 | ]
17 | sgx = [
18 | "sgx_tstd",
19 | "thiserror_sgx",
20 | ]
21 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/primitives-cache/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-primitives-cache"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | lazy_static = { workspace = true }
9 | sgx_tstd = { workspace = true, optional = true }
10 | thiserror = { workspace = true, optional = true }
11 | thiserror_sgx = { workspace = true, optional = true }
12 |
13 | [features]
14 | default = ["std"]
15 | std = [
16 | "thiserror",
17 | ]
18 | sgx = [
19 | "sgx_tstd",
20 | "thiserror_sgx",
21 | ]
22 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/rpc/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-rpc"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | codec = { package = "parity-scale-codec", workspace = true }
9 | itp-types = { workspace = true }
10 | serde = { workspace = true }
11 | serde_json = { workspace = true }
12 | sgx_tstd = { workspace = true, optional = true }
13 |
14 | [features]
15 | default = ["std"]
16 | std = [
17 | "codec/std",
18 | "itp-types/std",
19 | "serde/std",
20 | "serde_json/std",
21 | ]
22 | sgx = [
23 | "sgx_tstd",
24 | ]
25 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/settings/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-settings"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | litentry-primitives = { workspace = true }
9 |
10 | [features]
11 | development = [
12 | "litentry-primitives/development",
13 | ]
14 | sidechain = []
15 | offchain-worker = []
16 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/sgx-runtime-primitives/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-sgx-runtime-primitives"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | frame-system = { workspace = true }
9 | pallet-balances = { workspace = true }
10 | sp-core = { workspace = true }
11 | sp-runtime = { workspace = true }
12 |
13 | [features]
14 | default = ["std"]
15 | std = [
16 | "frame-system/std",
17 | "pallet-balances/std",
18 | "sp-core/std",
19 | "sp-runtime/std",
20 | ]
21 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/sgx/io/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-sgx-io"
3 | version = "0.8.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | sgx_tstd = { workspace = true, features = ["untrusted_fs"], optional = true }
8 |
9 | [features]
10 | default = ["std"]
11 | std = []
12 | sgx = [
13 | "sgx_tstd",
14 | ]
15 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/sgx/temp-dir/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-sgx-temp-dir"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | lazy_static = { workspace = true }
8 | sgx_tstd = { workspace = true, optional = true }
9 |
10 | [dev-dependencies.safe-lock]
11 | version = "^0.1"
12 |
13 | [features]
14 | default = ["std"]
15 | std = []
16 | sgx = [
17 | "sgx_tstd",
18 | ]
19 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/stf-interface/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-stf-interface"
3 | version = "0.8.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | codec = { package = "parity-scale-codec", workspace = true }
9 |
10 | itp-node-api-metadata = { workspace = true, features = ["mocks"] }
11 | itp-node-api-metadata-provider = { workspace = true }
12 | itp-stf-primitives = { workspace = true }
13 | itp-types = { workspace = true }
14 |
15 | [features]
16 | default = ["std"]
17 | std = [
18 | "itp-node-api-metadata/std",
19 | "itp-node-api-metadata-provider/std",
20 | "itp-stf-primitives/std",
21 | "itp-types/std",
22 | ]
23 | sgx = []
24 | mocks = []
25 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/stf-state-observer/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-stf-state-observer"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | itp-types = { workspace = true }
9 | sgx_tstd = { workspace = true, optional = true }
10 |
11 | log = { workspace = true }
12 | thiserror = { workspace = true, optional = true }
13 | thiserror_sgx = { workspace = true, optional = true }
14 |
15 | [features]
16 | default = ["std"]
17 | std = [
18 | "itp-types/std",
19 | "log/std",
20 | "thiserror",
21 | ]
22 | sgx = [
23 | "sgx_tstd",
24 | "thiserror_sgx",
25 | ]
26 | mocks = []
27 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/substrate-sgx/environmental/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "environmental"
3 | description = "Set scope-limited values can can be accessed statically"
4 | version = "1.1.3"
5 | authors = ["Parity Technologies "]
6 | license = "Apache-2.0"
7 | edition = "2021"
8 |
9 | [dependencies]
10 | sgx_tstd = { workspace = true, features = ["thread"], optional = true }
11 |
12 | [features]
13 | default = ["std"]
14 | std = []
15 | sgx = ["sgx_tstd"]
16 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/time-utils/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-time-utils"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | chrono = { workspace = true, optional = true }
9 | chrono_sgx = { workspace = true, optional = true }
10 | sgx_tstd = { workspace = true, optional = true }
11 |
12 | [features]
13 | default = ["std"]
14 | std = [
15 | "chrono",
16 | ]
17 | sgx = [
18 | "sgx_tstd",
19 | "chrono_sgx",
20 | ]
21 |
--------------------------------------------------------------------------------
/tee-worker/common/core-primitives/utils/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itp-utils"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | homepage = "https://www.heima.network/"
6 | repository = "https://github.com/litentry/heima"
7 | license = "Apache-2.0"
8 | edition = "2021"
9 |
10 | [dependencies]
11 | codec = { package = "parity-scale-codec", workspace = true }
12 | heima-utils = { workspace = true }
13 | hex = { workspace = true }
14 |
15 | [features]
16 | default = ["std"]
17 | std = [
18 | "codec/std",
19 | "hex/std",
20 | ]
21 |
--------------------------------------------------------------------------------
/tee-worker/common/core/parentchain/test/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itc-parentchain-test"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | homepage = 'https://www.heima.network'
6 | repository = 'https://github.com/litentry/heima'
7 | license = "Apache-2.0"
8 | edition = "2021"
9 |
10 | [dependencies]
11 | itp-types = { workspace = true }
12 | sp-runtime = { workspace = true }
13 |
14 | [features]
15 | default = ["std"]
16 | std = [
17 | "itp-types/std",
18 | "sp-runtime/std",
19 | ]
20 |
--------------------------------------------------------------------------------
/tee-worker/common/core/rest-client/src/mocks/mod.rs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2021 Integritee AG and Supercomputing Systems AG
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | */
17 |
18 | pub mod http_client_mock;
19 |
--------------------------------------------------------------------------------
/tee-worker/common/core/system-version/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "itc-system-version"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | build = 'build.rs'
6 | edition = "2021"
7 |
8 | [dependencies]
9 | # sgx dependencies
10 | sgx_tstd = { workspace = true, optional = true }
11 |
12 | [build-dependencies]
13 | built = { workspace = true, features = ["chrono", "semver"] }
14 |
15 | [features]
16 | default = ["std"]
17 | std = []
18 | sgx = [
19 | "sgx_tstd",
20 | ]
21 |
--------------------------------------------------------------------------------
/tee-worker/common/core/tls-websocket-server/src/test/mod.rs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2021 Integritee AG and Supercomputing Systems AG
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | */
17 |
18 | pub mod fixtures;
19 | pub mod mocks;
20 |
--------------------------------------------------------------------------------
/tee-worker/common/litentry/core/parachain-extrinsic-task/receiver/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "lc-parachain-extrinsic-task-receiver"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | log = { workspace = true }
8 |
9 | sgx_tstd = { workspace = true, features = ["net", "thread"], optional = true }
10 |
11 | itp-extrinsics-factory = { workspace = true }
12 | itp-ocall-api = { workspace = true }
13 | itp-types = { workspace = true }
14 | lc-parachain-extrinsic-task-sender = { workspace = true }
15 |
16 | [features]
17 | default = ["std"]
18 | std = [
19 | "log/std",
20 | "lc-parachain-extrinsic-task-sender/std",
21 | ]
22 | sgx = [
23 | "sgx_tstd",
24 | "lc-parachain-extrinsic-task-sender/sgx",
25 | ]
26 |
--------------------------------------------------------------------------------
/tee-worker/common/litentry/core/parachain-extrinsic-task/sender/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "lc-parachain-extrinsic-task-sender"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | lazy_static = { workspace = true }
8 | log = { workspace = true }
9 |
10 | itp-types = { workspace = true }
11 | sgx_tstd = { workspace = true, features = ["net", "thread"], optional = true }
12 |
13 | [features]
14 | default = ["std"]
15 | sgx = [
16 | "sgx_tstd",
17 | ]
18 | std = [
19 | "log/std",
20 | ]
21 |
--------------------------------------------------------------------------------
/tee-worker/common/litentry/core/teebag-storage/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "lc-teebag-storage"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | itp-storage = { workspace = true }
9 | itp-types = { workspace = true }
10 | sp-std = { workspace = true }
11 |
12 | [features]
13 | default = ["std"]
14 | std = [
15 | "sp-std/std",
16 | "itp-storage/std",
17 | "itp-types/std",
18 | ]
19 |
--------------------------------------------------------------------------------
/tee-worker/common/litentry/pallets/parentchain/src/weights.rs:
--------------------------------------------------------------------------------
1 | pub use frame_support::weights::{constants::RocksDbWeight, Weight};
2 |
3 | /// Weight functions needed for pallet_parentchain.
4 | pub trait WeightInfo {
5 | fn set_block() -> Weight;
6 | }
7 |
8 | /// Weights for pallet_parentchain using the Integritee parachain node and recommended hardware.
9 | impl WeightInfo for () {
10 | fn set_block() -> Weight {
11 | Weight::from_parts(10_000, 0)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tee-worker/identity/.dockerignore:
--------------------------------------------------------------------------------
1 | # Litentry note: this file is unused
2 | # Please edit the ../.dockerignore directly
3 | .git
4 | .githooks
5 | .github
6 | .idea
7 | ci/
8 | docker/*yml
9 | docs/
10 | local-setup/
11 | scripts/
12 | target/
13 | enclave-runtime/target/
14 | tmp/
15 | *.Dockerfile
16 | Dockerfile
--------------------------------------------------------------------------------
/tee-worker/identity/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = tab
5 | indent_size = 4
6 | tab_width = 4
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | max_line_length = 100
11 | insert_final_newline = true
12 |
13 | [*.yml]
14 | indent_style = space
15 | indent_size = 2
16 | tab_width = 2
17 | end_of_line = lf
18 |
19 | [*.ts]
20 | indent_style = space
21 | indent_size = 2
22 | tab_width = 2
23 | end_of_line = lf
24 |
25 | [*.js]
26 | indent_style = space
27 | indent_size = 2
28 | tab_width = 2
29 | end_of_line = lf
30 |
31 |
32 | [*.toml]
33 | indent_style = space
34 |
--------------------------------------------------------------------------------
/tee-worker/identity/.gitattributes.orig:
--------------------------------------------------------------------------------
1 | # TODO: why do we need binary mode for Cargo.lock?
2 | # Cargo.lock linguist-generated=true -diff
3 |
4 | [attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
5 |
6 | * text=auto eol=lf
7 | *.cpp rust
8 | *.h rust
9 | *.rs rust
10 | *.fixed linguist-language=Rust
11 | src/etc/installer/gfx/* binary
12 | *.woff binary
13 | src/vendor/** -text
14 | Cargo.lock -merge linguist-generated=false
15 |
16 | # Older git versions try to fix line endings on images, this prevents it.
17 | *.png binary
18 | *.ico binary
19 |
--------------------------------------------------------------------------------
/tee-worker/identity/.githooks/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This pre-commit hook uses cargo fmt to check the code style
4 | # Install it either with `make githooks` or copy the file to .git/hooks
5 |
6 | echo '+cargo fmt -- --check'
7 | cargo fmt -- --check
8 | result=$?
9 |
10 | if [[ ${result} -ne 0 ]] ; then
11 | cat <<\EOF
12 | There are some code style issues, run `cargo fmt` first.
13 | EOF
14 | exit 1
15 | fi
16 |
17 | exit 0
--------------------------------------------------------------------------------
/tee-worker/identity/app-libs/sgx-runtime/src/migration.rs:
--------------------------------------------------------------------------------
1 | use super::*;
2 |
3 | use crate::Runtime;
4 | use frame_support::{traits::OnRuntimeUpgrade, weights::Weight};
5 |
6 | // This is just an example of how to write a custom migration
7 | // It has no effect on tee-worker running
8 | // For more details, see: https://docs.substrate.io/maintain/runtime-upgrades/#storage-migration
9 | pub struct Upgrade;
10 | impl OnRuntimeUpgrade for Upgrade {
11 | fn on_runtime_upgrade() -> Weight {
12 | pallet_identity_management_tee::migrations::migrate_to_v1::()
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tee-worker/identity/bin/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/identity/bin/.gitkeep
--------------------------------------------------------------------------------
/tee-worker/identity/cli/lit_ts_worker_test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2020-2024 Trust Computing GmbH.
4 |
5 | set -euo pipefail
6 |
7 | function usage() {
8 | echo ""
9 | echo "This is a script for tee-worker worker ts-test. Pass test name as first argument"
10 | echo ""
11 | }
12 |
13 | [ $# -ne 1 ] && (usage; exit 1)
14 | TEST=$1
15 |
16 |
17 | BINARY_DIR="/usr/local/bin"
18 | PARACHAIN_ENDPOINT="ws://localhost:9944"
19 |
20 | echo "Using binary dir: $BINARY_DIR"
21 | echo "Using node endpoint: $PARACHAIN_ENDPOINT"
22 |
23 | cd /ts-tests
24 | pnpm install
25 | NODE_ENV=staging pnpm --filter worker run test $TEST
26 |
--------------------------------------------------------------------------------
/tee-worker/identity/cli/src/base_cli/commands/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod balance;
2 | pub mod faucet;
3 | pub mod listen;
4 | pub mod litentry;
5 | pub mod register_tcb_info;
6 | pub mod system_version;
7 | pub mod transfer;
8 |
--------------------------------------------------------------------------------
/tee-worker/identity/cli/src/benchmark/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod request_vc;
2 | pub mod stf;
3 |
--------------------------------------------------------------------------------
/tee-worker/identity/cli/src/evm/commands/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod evm_call;
2 | pub mod evm_command_utils;
3 | pub mod evm_create;
4 | pub mod evm_read;
5 |
6 | pub use crate::get_layer_two_evm_nonce;
7 |
--------------------------------------------------------------------------------
/tee-worker/identity/cli/src/trusted_base_cli/commands/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod balance;
2 | pub mod get_shard;
3 | pub mod nonce;
4 | pub mod set_balance;
5 | pub mod transfer;
6 |
7 | pub mod litentry;
8 |
--------------------------------------------------------------------------------
/tee-worker/identity/cli/tests/basic_tests.rs:
--------------------------------------------------------------------------------
1 | use clap::Parser;
2 | use litentry_cli::Cli;
3 |
4 | fn init() {
5 | let _ = env_logger::try_init();
6 | }
7 |
8 | #[test]
9 | fn test_version() {
10 | init();
11 |
12 | let res = Cli::try_parse_from(vec!["placeholder_cli_path", "--version"]);
13 | let _err = clap::Error::new(clap::error::ErrorKind::DisplayVersion);
14 | assert!(matches!(res, Err(_err)));
15 | }
16 |
17 | #[test]
18 | fn test_help() {
19 | init();
20 |
21 | let res = Cli::try_parse_from(vec!["placeholder_cli_path", "--help"]);
22 | let _err = clap::Error::new(clap::error::ErrorKind::DisplayHelp);
23 | assert!(matches!(res, Err(_err)));
24 | }
25 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | dist
5 | tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | yarn-error.log
34 | testem.log
35 | /typings
36 |
37 | # System Files
38 | .DS_Store
39 | Thumbs.db
40 |
41 | .nx/cache
42 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/.npmrc:
--------------------------------------------------------------------------------
1 | strict-peer-dependencies=false
2 | auto-install-peers=true
3 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/.prettierignore:
--------------------------------------------------------------------------------
1 | # Add files here to ignore them from prettier formatting
2 | /dist
3 | /coverage
4 | /.nx/cache
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "printWidth": 80
4 | }
5 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/.verdaccio/config.yml:
--------------------------------------------------------------------------------
1 | # path to a directory with all packages
2 | storage: ../tmp/local-registry/storage
3 |
4 | # a list of other known repositories we can talk to
5 | uplinks:
6 | npmjs:
7 | url: https://registry.npmjs.org/
8 | maxage: 60m
9 |
10 | packages:
11 | '**':
12 | # give all users (including non-authenticated users) full access
13 | # because it is a local registry
14 | access: $all
15 | publish: $all
16 | unpublish: $all
17 |
18 | # if package is not available locally, proxy requests to npm registry
19 | proxy: npmjs
20 |
21 | # log settings
22 | logs:
23 | type: stdout
24 | format: pretty
25 | level: warn
26 |
27 | publish:
28 | allow_offline: true # set offline to true to allow publish offline
29 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # Heima Client Packages
4 |
5 | This repository contains packages that are published on NPM for dApps to interact with the Heima network.
6 |
7 | Learn more about it on [Heima's official documentation](https://docs.heima.network/parachain/sdk-documentation).
8 |
9 | ## Packages
10 |
11 | - `@litentry/client-sdk` ([go-to](packages/enclave/README.md)): provides helpers for dApps to interact with the Heima network
12 | - `@litentry/chaindata` ([go-to](packages/chaindata/README.md)): provides chain information of Heima networks.
13 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/jest.config.ts:
--------------------------------------------------------------------------------
1 | import { getJestProjects } from '@nx/jest';
2 |
3 | export default {
4 | projects: getJestProjects(),
5 | };
6 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/jest.preset.js:
--------------------------------------------------------------------------------
1 | const nxPreset = require('@nx/jest/preset').default;
2 |
3 | module.exports = { ...nxPreset };
4 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/chaindata/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["../../.eslintrc.json"],
3 | "ignorePatterns": ["!**/*"],
4 | "overrides": [
5 | {
6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7 | "rules": {}
8 | },
9 | {
10 | "files": ["*.ts", "*.tsx"],
11 | "rules": {}
12 | },
13 | {
14 | "files": ["*.js", "*.jsx"],
15 | "rules": {}
16 | },
17 | {
18 | "files": ["*.json"],
19 | "parser": "jsonc-eslint-parser",
20 | "rules": {
21 | "@nx/dependency-checks": "error"
22 | }
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/chaindata/README.md:
--------------------------------------------------------------------------------
1 | # @litentry/chaindata
2 |
3 | This library contains information about the available networks at Litentry, including its testnets.
4 |
5 | ## Installation
6 |
7 | 1. Install from NPM
8 |
9 | ```
10 | npm install @litentry/chaindata
11 | ```
12 |
13 | 2. Explore
14 |
15 | ```ts
16 | import { all, byId } from '@litentry/chaindata`;
17 |
18 | console.log(all);
19 |
20 | console.log(`Litentry's production RPC URL is: ${byId['litentry-prod'].rpcs[0].url}`);
21 | ```
22 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/chaindata/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@litentry/chaindata",
3 | "version": "0.3.0",
4 | "dependencies": {
5 | "tslib": "^2.5.3"
6 | },
7 | "type": "commonjs",
8 | "main": "./src/index.js",
9 | "typings": "./src/index.d.ts"
10 | }
11 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/chaindata/src/index.ts:
--------------------------------------------------------------------------------
1 | export type { ChainSpec, ChainId } from './lib/chaindata';
2 | export { all, byId, getChain } from './lib/chaindata';
3 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/chaindata/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "forceConsistentCasingInFileNames": true,
6 | "strict": true,
7 | "noImplicitOverride": true,
8 | "noPropertyAccessFromIndexSignature": true,
9 | "noImplicitReturns": true,
10 | "noFallthroughCasesInSwitch": true
11 | },
12 | "files": [],
13 | "include": [],
14 | "references": [
15 | {
16 | "path": "./tsconfig.lib.json"
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/chaindata/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "types": ["node"]
7 | },
8 | "include": ["src/**/*.ts"],
9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["../../.eslintrc.json"],
3 | "ignorePatterns": ["!**/*"],
4 | "overrides": [
5 | {
6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7 | "rules": {}
8 | },
9 | {
10 | "files": ["*.ts", "*.tsx"],
11 | "rules": {}
12 | },
13 | {
14 | "files": ["*.js", "*.jsx"],
15 | "rules": {}
16 | },
17 | {
18 | "files": ["*.json"],
19 | "parser": "jsonc-eslint-parser",
20 | "rules": {
21 | "@nx/dependency-checks": "error"
22 | }
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/docs/.nojekyll:
--------------------------------------------------------------------------------
1 | TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-sdk',
4 | preset: '../../jest.preset.js',
5 | testEnvironment: 'node',
6 | transform: {
7 | '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }],
8 | },
9 | moduleFileExtensions: ['ts', 'js', 'html'],
10 | coverageDirectory: '../../coverage/packages/client-sdk',
11 | transformIgnorePatterns: ['node_modules/(?!(@litentry/|.pnpm/@litentry|@heima|.pnpm/@heima)).*'],
12 | moduleNameMapper: {},
13 | };
14 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/src/lib/config.ts:
--------------------------------------------------------------------------------
1 | import { type ChainId, getChain } from '@litentry/chaindata';
2 |
3 | const CURRENT_NETWORK =
4 | process.env.LITENTRY_NETWORK ||
5 | process.env.NX_LITENTRY_NETWORK ||
6 | process.env.PARACHAIN_NETWORK ||
7 | process.env.NX_PARACHAIN_NETWORK ||
8 | 'litentry-prod';
9 |
10 | export let ENCLAVE_ENDPOINT = '';
11 |
12 | // Custom networks have priority
13 | if (
14 | CURRENT_NETWORK.startsWith('ws://') ||
15 | CURRENT_NETWORK.startsWith('wss://')
16 | ) {
17 | ENCLAVE_ENDPOINT = CURRENT_NETWORK;
18 | } else {
19 | ENCLAVE_ENDPOINT = getChain(CURRENT_NETWORK as ChainId).enclaveRpcs[0].url;
20 | }
21 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/src/lib/util/codec-to-string.ts:
--------------------------------------------------------------------------------
1 | import type { Enum } from '@polkadot/types';
2 |
3 | export function codecToString(codec: Enum): string {
4 | const output = codec.type;
5 |
6 | const value = codec.value?.toHuman();
7 |
8 | if (value == null) {
9 | return output;
10 | }
11 |
12 | if (value.toString() === '[object Object]') {
13 | return `${output}: ${JSON.stringify(value)}`;
14 | }
15 |
16 | return `${output}: ${value}`;
17 | }
18 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/src/lib/util/types.ts:
--------------------------------------------------------------------------------
1 | export type Maybe = null | undefined | T;
2 |
3 | export type JsonRpcRequest = {
4 | jsonrpc: string;
5 | method: string;
6 | params: Array;
7 | /**
8 | * Use sequential numbers starting from 1 for consecutive requests.
9 | * For one-time request that closes connections right away, using `1` is ok.
10 | */
11 | id?: number;
12 | };
13 |
14 | export type JsonRpcResponse = {
15 | jsonrpc: string;
16 | id: number | string;
17 | result: string;
18 | };
19 |
20 | /**
21 | * Substrate SS58 address, Substrate public key or EVM address
22 | */
23 | export type SubstrateOrEvmOrBtcAddress = string | `0x${string}`;
24 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/src/lib/util/verify-signature.ts:
--------------------------------------------------------------------------------
1 | import type { VerifyResult } from '@polkadot/util-crypto/types';
2 | import { decodeAddress, signatureVerify } from '@polkadot/util-crypto';
3 | import { u8aToHex } from '@polkadot/util';
4 |
5 | export function verifySignature(args: {
6 | message: string | Uint8Array;
7 | signature: string | Uint8Array;
8 | address: string | Uint8Array;
9 | }): VerifyResult {
10 | const { message, signature, address } = args;
11 | const publicKey = decodeAddress(address);
12 | const hexPublicKey = u8aToHex(publicKey);
13 |
14 | return signatureVerify(message, signature, hexPublicKey);
15 | }
16 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "forceConsistentCasingInFileNames": true,
5 | "strict": true,
6 | "allowJs": true,
7 | "noImplicitOverride": true,
8 | "noPropertyAccessFromIndexSignature": false,
9 | "noImplicitReturns": true,
10 | "noFallthroughCasesInSwitch": true,
11 | "resolveJsonModule": true,
12 | "esModuleInterop": true
13 | },
14 | "files": [],
15 | "include": [],
16 | "references": [
17 | {
18 | "path": "./tsconfig.lib.json"
19 | },
20 | {
21 | "path": "./tsconfig.spec.json"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "types": ["node"]
7 | },
8 | "include": ["src/**/*.ts"],
9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "jest.config.ts",
10 | "src/**/*.test.ts",
11 | "src/**/*.spec.ts",
12 | "src/**/*.d.ts"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/packages/client-sdk/typedoc.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://typedoc.org/schema.json",
3 | "plugin": ["typedoc-plugin-markdown"],
4 | "entryPoints": ["./src/index.ts"],
5 | "disableGit": true,
6 | "sourceLinkTemplate": "https://github.com/litentry/client-sdk/blob/develop/{path}#L{line}",
7 | "readme": "none",
8 | "out": "docs"
9 | }
10 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - 'packages/*'
3 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@litentry-client-sdk/source",
3 | "$schema": "node_modules/nx/schemas/project-schema.json",
4 | "targets": {
5 | "local-registry": {
6 | "executor": "@nx/js:verdaccio",
7 | "options": {
8 | "port": 4873,
9 | "config": ".verdaccio/config.yml",
10 | "storage": "tmp/local-registry/storage"
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tee-worker/identity/client-sdk/tsconfig.base.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "rootDir": ".",
5 | "sourceMap": true,
6 | "declaration": false,
7 | "moduleResolution": "node",
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "importHelpers": true,
11 | "target": "esnext",
12 | "module": "esnext",
13 | "lib": ["es2020", "dom"],
14 | "skipLibCheck": true,
15 | "skipDefaultLibCheck": true,
16 | "baseUrl": ".",
17 | "paths": {
18 | "@litentry/chaindata": ["packages/chaindata/src/index.ts"],
19 | "packages/client-sdk": ["packages/client-sdk/src/index.ts"],
20 | "@litentry/vc-sdk": ["packages/vc-sdk/src/index.ts"]
21 | }
22 | },
23 | "exclude": ["node_modules", "tmp"]
24 | }
25 |
--------------------------------------------------------------------------------
/tee-worker/identity/core-primitives/enclave-api/ffi/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "id-itp-enclave-api-ffi"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | sgx_types = { workspace = true }
8 |
9 | [features]
10 | # necessary to run cargo tests without any preliminaries
11 | # See: https://github.com/rust-lang/cargo/issues/2549
12 | link-sgx-libs = []
13 |
--------------------------------------------------------------------------------
/tee-worker/identity/core-primitives/enclave-api/src/error.rs:
--------------------------------------------------------------------------------
1 | use codec::Error as CodecError;
2 | use sgx_types::{sgx_quote3_error_t, sgx_status_t};
3 |
4 | #[derive(Debug, thiserror::Error)]
5 | pub enum Error {
6 | #[error("{0}")]
7 | Codec(#[from] CodecError),
8 | #[error("Enclave Error: {0}")]
9 | Sgx(sgx_status_t),
10 | #[error("Enclave Quote Error: {0}")]
11 | SgxQuote(sgx_quote3_error_t),
12 | #[error("Error, other: {0}")]
13 | Other(Box),
14 | }
15 |
--------------------------------------------------------------------------------
/tee-worker/identity/core/direct-rpc-server/src/builders/mod.rs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2021 Integritee AG and Supercomputing Systems AG
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | */
17 |
18 | pub mod rpc_response_builder;
19 | pub mod rpc_return_value_builder;
20 |
--------------------------------------------------------------------------------
/tee-worker/identity/docker/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | # Check if the first argument is "mrenclave"
5 | if [ "$1" = "mrenclave" ]; then
6 | # If "mrenclave" is provided, execute the corresponding command
7 | $SGX_ENCLAVE_SIGNER dump \
8 | -enclave /usr/local/bin/enclave.signed.so \
9 | -dumpfile df.out && \
10 | /usr/local/bin/extract_identity < df.out && rm df.out | grep -oP ':\s*\K[a-fA-F0-9]+'
11 |
12 | else
13 | # If no specific command is provided, execute the default unnamed command
14 |
15 | # run aesmd in the background
16 | /opt/intel/sgx-aesm-service/aesm/aesm_service
17 |
18 | exec /usr/local/bin/litentry-worker "${@}"
19 | fi
20 |
--------------------------------------------------------------------------------
/tee-worker/identity/docker/lit-parentchain-nonce.yml:
--------------------------------------------------------------------------------
1 | services:
2 | lit-parentchain-nonce:
3 | image: litentry/identity-cli:latest
4 | container_name: litentry-parentchain-nonce
5 | volumes:
6 | - ../cli:/usr/local/worker-cli
7 | build:
8 | context: ..
9 | dockerfile: build.Dockerfile
10 | target: deployed-client
11 | depends_on:
12 | litentry-worker-1:
13 | condition: service_healthy
14 | networks:
15 | - litentry-test-network
16 | entrypoint:
17 | "/usr/local/worker-cli/lit_parentchain_nonce.sh -p 9944 -u ws://heima-node
18 | -V ws://litentry-worker-1 -A 2011 -C /usr/local/bin/litentry-cli 2>&1"
19 | restart: "no"
20 | networks:
21 | litentry-test-network:
22 | driver: bridge
--------------------------------------------------------------------------------
/tee-worker/identity/docker/ping.Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2021 Integritee AG
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM alpine:latest
16 |
17 | RUN apk add --update iproute2
18 |
19 | ENTRYPOINT ping
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/Enclave.config.production.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 0
4 | 0
5 | 0x40000
6 | 0x80000000
7 | 1024
8 | 0
9 | 1
10 | 0
11 | 0xFFFFFFFF
12 |
13 |
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/Enclave.config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 0
4 | 0
5 | 0x40000
6 | 0x20000000
7 | 1024
8 | 0
9 | 0
10 | 0
11 | 0xFFFFFFFF
12 |
13 |
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/Enclave.lds:
--------------------------------------------------------------------------------
1 | enclave.so
2 | {
3 | global:
4 | g_global_data_sim;
5 | g_global_data;
6 | enclave_entry;
7 | local:
8 | *;
9 | };
10 |
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/README.md:
--------------------------------------------------------------------------------
1 | # sidechain dependency graph
2 | cargo depgraph --features dcap,sidechain --include enclave-runtime,itp-types,ita-stf | dot -Tsvg > dependency-graph.svg
3 |
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/rust-toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | channel = "nightly-2022-10-22"
3 | targets = ["wasm32-unknown-unknown"]
4 | profile = "default" # include rustfmt, clippy
5 |
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/rustfmt.toml:
--------------------------------------------------------------------------------
1 | hard_tabs = true
2 | max_width = 100
3 | use_small_heuristics = "Max"
4 | reorder_imports = true
5 | newline_style = "Unix"
6 | chain_width = 80
7 | match_arm_leading_pipes = "Preserve"
8 | match_block_trailing_comma = true
9 | use_field_init_shorthand = true
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/src/rpc/mod.rs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2021 Integritee AG and Supercomputing Systems AG
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | */
17 | pub mod common_api;
18 | pub mod rpc_response_channel;
19 |
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/src/stf_task_handler.rs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/src/test/Counter.sol:
--------------------------------------------------------------------------------
1 | pragma solidity >=0.8.0;
2 |
3 | contract Counter {
4 | uint256 private value;
5 | address private last_caller;
6 |
7 | constructor() {
8 | value = 1;
9 | last_caller = msg.sender;
10 | }
11 |
12 | fallback() external payable { value = 5; }
13 |
14 | function inc() public {
15 | value += 1;
16 | last_caller = msg.sender;
17 | }
18 |
19 | function add(uint delta) public {
20 | value += delta;
21 | last_caller = msg.sender;
22 | }
23 |
24 | function get_value() view public returns (uint) {
25 | return value;
26 | }
27 |
28 | function get_last_caller() view public returns (address) {
29 | return last_caller;
30 | }
31 | }
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/identity/enclave-runtime/src/test/fixtures/ra_dump_cert_TEST4.der
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/identity/enclave-runtime/src/test/fixtures/test_ra_signer_attn_MRSIGNER1_MRENCLAVE1.bin
--------------------------------------------------------------------------------
/tee-worker/identity/enclave-runtime/src/vc_issuance_task.rs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/identity/enclave-runtime/src/vc_issuance_task.rs
--------------------------------------------------------------------------------
/tee-worker/identity/lib/readme.txt:
--------------------------------------------------------------------------------
1 | lib
--------------------------------------------------------------------------------
/tee-worker/identity/license_header_scs.txt:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2021 Integritee AG and Supercomputing Systems AG
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | */
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/common/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | edition = "2021"
3 | name = "lc-common"
4 | version = "0.1.0"
5 |
6 | [dependencies]
7 | litentry-primitives = { workspace = true }
8 | sgx_tstd = { workspace = true, features = ["net", "thread"], optional = true }
9 |
10 | [features]
11 | default = ["std"]
12 | sgx = [
13 | "sgx_tstd",
14 | "litentry-primitives/sgx",
15 | ]
16 | std = [
17 | "litentry-primitives/std",
18 | ]
19 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/credentials-v2/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | authors = ["Trust Computing GmbH "]
3 | edition = "2021"
4 | name = "lc-credentials-v2"
5 | version = "0.1.0"
6 |
7 | [dependencies]
8 | sgx_tstd = { workspace = true, features = ["net", "thread"], optional = true }
9 |
10 | lc-common = { workspace = true }
11 | lc-credentials = { workspace = true }
12 | litentry-primitives = { workspace = true }
13 |
14 | [features]
15 | default = ["std"]
16 | sgx = [
17 | "sgx_tstd",
18 | "litentry-primitives/sgx",
19 | "lc-common/sgx",
20 | "lc-credentials/sgx",
21 | ]
22 | std = [
23 | "litentry-primitives/std",
24 | "lc-common/std",
25 | "lc-credentials/std",
26 | ]
27 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/dynamic-assertion/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "lc-dynamic-assertion"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition = "2021"
6 |
7 | [dependencies]
8 | litentry-primitives = { workspace = true }
9 | sgx_tstd = { workspace = true, optional = true }
10 |
11 | [features]
12 | default = ["std"]
13 | sgx = [
14 | "sgx_tstd",
15 | "litentry-primitives/sgx",
16 | ]
17 | std = [
18 | "litentry-primitives/std",
19 | ]
20 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/evm-dynamic-assertions/.gitignore:
--------------------------------------------------------------------------------
1 | !*.rs
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/identity-verification/src/web2/discord.rs:
--------------------------------------------------------------------------------
1 | use crate::{Error, Result};
2 | use lc_data_providers::discord_official::DiscordMessage;
3 | use litentry_primitives::ErrorDetail;
4 | use std::vec::Vec;
5 |
6 | pub fn payload_from_discord(discord: &DiscordMessage) -> Result> {
7 | let data = &discord.content;
8 | hex::decode(data.strip_prefix("0x").unwrap_or(data.as_str()))
9 | .map_err(|_| Error::LinkIdentityFailed(ErrorDetail::ParseError))
10 | }
11 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/identity-verification/src/web2/email/mailer/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod sendgrid_mailer;
2 | pub(crate) mod template;
3 |
4 | use crate::alloc::string::String;
5 |
6 | pub struct Mail {
7 | pub to: String,
8 | pub subject: String,
9 | pub body: String,
10 | }
11 |
12 | pub trait Mailer {
13 | fn send(&mut self, mail: Mail) -> Result<(), String>;
14 | }
15 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/identity-verification/src/web2/email/mod.rs:
--------------------------------------------------------------------------------
1 | mod verification_code_store;
2 | pub use verification_code_store::*;
3 | mod mailer;
4 | pub use mailer::*;
5 |
6 | use crate::alloc::string::String;
7 |
8 | pub fn send_verification_email(
9 | mailer: &mut impl Mailer,
10 | to_email: String,
11 | verification_code: String,
12 | ) -> Result<(), String> {
13 | let mail = mailer::Mail {
14 | to: to_email,
15 | subject: String::from("Verify your email address"),
16 | body: template::EMAIL_VERIFICATION_TEMPLATE
17 | .replace("{{ verification_code }}", &verification_code),
18 | };
19 |
20 | mailer.send(mail)
21 | }
22 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/mock-server/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | edition = "2021"
3 | name = "lc-mock-server"
4 | version = "0.1.0"
5 |
6 | [dependencies]
7 | hex = { workspace = true, features = ["std"] }
8 | log = { workspace = true, features = ["std"] }
9 | serde_json = { workspace = true, features = ["std"] }
10 | tokio = { version = "1.5", features = ["full"] }
11 | warp = "0.3"
12 |
13 | sp-core = { workspace = true, features = ["std"] }
14 |
15 | # Internal dependencies
16 | ita-stf = { package = "id-ita-stf", path = "../../../app-libs/stf" }
17 | itp-rpc = { workspace = true, features = ["std"] }
18 | lc-data-providers = { workspace = true, features = ["std"] }
19 | litentry-primitives = { workspace = true, features = ["std"] }
20 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/native-task/sender/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "lc-native-task-sender"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | sgx_tstd = { workspace = true, features = ["net", "thread"], optional = true }
8 |
9 | lazy_static = { workspace = true }
10 | log = { workspace = true }
11 |
12 | litentry-primitives = { workspace = true }
13 |
14 | [features]
15 | default = ["std"]
16 | sgx = [
17 | "sgx_tstd",
18 | ]
19 | std = [
20 | "log/std",
21 | ]
22 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/service/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | authors = ["Trust Computing GmbH "]
3 | edition = "2021"
4 | name = "lc-service"
5 | version = "0.1.0"
6 |
7 | [dependencies]
8 | log = { workspace = true }
9 | sgx_tstd = { workspace = true, features = ["net", "thread"], optional = true }
10 |
11 | lc-common = { workspace = true }
12 | lc-data-providers = { workspace = true }
13 | litentry-primitives = { workspace = true }
14 |
15 | [features]
16 | default = ["std"]
17 | sgx = [
18 | "sgx_tstd",
19 | "litentry-primitives/sgx",
20 | "lc-common/sgx",
21 | "lc-data-providers/sgx",
22 | ]
23 | std = [
24 | "log/std",
25 | "litentry-primitives/std",
26 | "lc-common/std",
27 | "lc-data-providers/std",
28 | ]
29 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/stf-task/receiver/src/mock.rs:
--------------------------------------------------------------------------------
1 | use itp_top_pool_author::{error::Result, mocks::GLOBAL_MOCK_AUTHOR_API};
2 |
3 | use std::{sync::mpsc::Receiver, vec::Vec};
4 |
5 | pub const COMMON_SEED: &[u8] =
6 | b"crouch whisper apple ladder skull blouse ridge oven despair cloth pony";
7 |
8 | pub fn init_global_mock_author_api() -> Result>> {
9 | let (sender, receiver) = std::sync::mpsc::channel();
10 | let mut stf_task_storage = GLOBAL_MOCK_AUTHOR_API.lock().unwrap();
11 | *stf_task_storage = Some(sender);
12 | Ok(receiver)
13 | }
14 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/stf-task/receiver/src/test.rs:
--------------------------------------------------------------------------------
1 | use super::*;
2 |
3 | // TODO: shall we rewrite the thread-pool test?
4 |
--------------------------------------------------------------------------------
/tee-worker/identity/litentry/core/vc-task/sender/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "lc-vc-task-sender"
3 | version = "0.1.0"
4 | edition = "2021"
5 |
6 | [dependencies]
7 | sgx_tstd = { workspace = true, features = ["net", "thread"], optional = true }
8 |
9 | lazy_static = { workspace = true }
10 | log = { workspace = true }
11 |
12 | litentry-primitives = { workspace = true }
13 |
14 | [features]
15 | default = ["std"]
16 | sgx = [
17 | "sgx_tstd",
18 | ]
19 | std = [
20 | "log/std",
21 | ]
22 |
--------------------------------------------------------------------------------
/tee-worker/identity/rust-sgx-sdk/Readme.md:
--------------------------------------------------------------------------------
1 | # RUST-SGX-SDK
2 |
3 | This folder contains only the neccessary parts from the [RUST-SGX-SDK](https://github.com/baidu/rust-sgx-sdk).
4 |
5 | All the crates are directly fetched from github.
--------------------------------------------------------------------------------
/tee-worker/identity/rust-sgx-sdk/common/inc/iso646.h:
--------------------------------------------------------------------------------
1 | /* $OpenBSD: iso646.h,v 1.3 2001/10/11 00:05:21 espie Exp $ */
2 | /* $NetBSD: iso646.h,v 1.1 1995/02/17 09:08:10 jtc Exp $ */
3 |
4 | /*
5 | * Written by J.T. Conklin 02/16/95.
6 | * Public domain.
7 | */
8 |
9 | #ifndef _ISO646_H_
10 | #define _ISO646_H_
11 |
12 | #ifndef __cplusplus
13 | #define and &&
14 | #define and_eq &=
15 | #define bitand &
16 | #define bitor |
17 | #define compl ~
18 | #define not !
19 | #define not_eq !=
20 | #define or ||
21 | #define or_eq |=
22 | #define xor ^
23 | #define xor_eq ^=
24 | #endif
25 |
26 | #endif /* !_ISO646_H_ */
27 |
--------------------------------------------------------------------------------
/tee-worker/identity/rust-sgx-sdk/common/inc/stdalign.h:
--------------------------------------------------------------------------------
1 | #ifndef _STDALIGN_H
2 | #define _STDALIGN_H
3 | #ifndef __cplusplus
4 | /* this whole header only works in C11 or with compiler extensions */
5 | #if __STDC_VERSION__ < 201112L && defined( __GNUC__)
6 | #define _Alignas(t) __attribute__((__aligned__(t)))
7 | #define _Alignof(t) __alignof__(t)
8 | #endif
9 | #define alignas _Alignas
10 | #define alignof _Alignof
11 | #endif
12 | #define __alignas_is_defined 1
13 | #define __alignof_is_defined 1
14 | #endif
15 |
16 |
--------------------------------------------------------------------------------
/tee-worker/identity/rust-sgx-sdk/version:
--------------------------------------------------------------------------------
1 | 27bd225ae6dbcd1d0a6d4d9590acc4d73c5195c2
2 |
--------------------------------------------------------------------------------
/tee-worker/identity/samples/teeracle/install-teeracle.sh:
--------------------------------------------------------------------------------
1 | #!/bin/env bash
2 |
3 | namespace=teeracle
4 | helm uninstall -n $namespace teeracle
5 |
6 | helm install -f ./kubernetes/values.yaml teeracle ./kubernetes --create-namespace -n $namespace
7 |
8 |
--------------------------------------------------------------------------------
/tee-worker/identity/samples/teeracle/kubernetes/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v2
2 | name: teeracle
3 | description: teeracle dcap
4 |
5 | type: application
6 | version: 0.1.0
7 | appVersion: 1.0.0
--------------------------------------------------------------------------------
/tee-worker/identity/samples/teeracle/kubernetes/values.yaml:
--------------------------------------------------------------------------------
1 | imagePullSecrets:
2 | - name: regcred
3 |
4 | imagePullPolicy: IfNotPresent
5 |
6 | image: integritee/teeracle:v0.12.2-dev
7 |
8 | #
9 | # To get more insights run:
10 | # docker run integritee/teeracle:v0.12.2-dev --help
11 | #
12 | app:
13 | url: "wss://rococo.api.integritee.network"
14 | interval: "2m"
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/benchmark_local-setup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | pushd ..
5 |
6 | pushd bin
7 | ./litentry-worker mrenclave | tee ~/mrenclave.b58
8 | popd
9 |
10 | ulimit -S -n 4096
11 |
12 | python3 local-setup/launch.py local-setup/config/benchmark.json &
13 | PID=$!
14 | echo $PID > ./benchmark.pid
15 | echo "Benchmark PID: $PID"
16 |
17 | sleep 40s
18 |
19 | pushd bin
20 | ./litentry-cli -p 9930 -P 2030 trusted --direct --mrenclave "$(cat ~/mrenclave.b58)" benchmark 20 100 -w
21 | popd
22 |
23 | sleep 10s
24 |
25 | if test -f "./benchmark.pid"; then
26 | echo "Killing benchmark process"
27 | kill -s SIGTERM "$(cat ./benchmark.pid)"
28 | rm benchmark.pid
29 | fi
30 |
31 | popd
32 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/.gitignore:
--------------------------------------------------------------------------------
1 | changelog.md
2 | *.json
3 | release*.md
4 | .env
5 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/Gemfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | source 'https://rubygems.org'
4 |
5 | git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6 |
7 | gem 'octokit', '~> 4'
8 |
9 | gem 'git_diff_parser', '~> 3'
10 |
11 | gem 'toml', '~> 0.3.0'
12 |
13 | gem 'rake', group: :dev
14 |
15 | gem 'optparse', '~> 0.1.1'
16 |
17 | gem 'logger', '~> 1.4'
18 |
19 | gem 'test-unit', group: :dev
20 |
21 | gem 'rubocop', group: :dev, require: false
22 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/README.md:
--------------------------------------------------------------------------------
1 | ## License
2 |
3 | Everything in this folder is GPL 3.0 licensed. The original has been authored by parity and was taken from here: https://github.com/paritytech/polkadot/tree/master/scripts/ci/changelog.
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/digests/.gitignore:
--------------------------------------------------------------------------------
1 | *.json
2 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/digests/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/identity/scripts/changelog/digests/.gitkeep
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/_free_notes.md.tera:
--------------------------------------------------------------------------------
1 |
2 | {# This file uses the Markdown format with additional templating such as this comment. -#}
3 | {# Such a comment will not show up in the rendered release notes. -#}
4 | {# The content of this file (if any) will be inserted at the top of the release notes -#}
5 | {# and generated for each new release candidate. -#}
6 | {# Ensure you leave an empty line at both top and bottom of this file. -#}
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/changes.md.tera:
--------------------------------------------------------------------------------
1 | {# This include generates the section showing the changes #}
2 | ## Changes
3 |
4 | {# for not now printed until pallet is actually included #}
5 | {# ### Legend #}
6 |
7 | {# - {{ WOR }} Worker #}
8 | {# - {{ PAL }} Pallet #}
9 |
10 | {% include "changes_applibs.md.tera" %}
11 |
12 | {% include "changes_client.md.tera" %}
13 |
14 | {% include "changes_core.md.tera" %}
15 |
16 | {% include "changes_evm.md.tera" %}
17 |
18 | {% include "changes_offchain.md.tera" %}
19 |
20 | {% include "changes_sidechain.md.tera" %}
21 |
22 | {% include "changes_teeracle.md.tera" %}
23 |
24 | {% include "changes_misc.md.tera" %}
25 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/changes_applibs.md.tera:
--------------------------------------------------------------------------------
1 | {% import "change.md.tera" as m_c -%}
2 | ### App-Libs
3 |
4 | {#- The changes are sorted by merge date #}
5 | {%- for pr in changes | sort(attribute="merged_at") %}
6 |
7 | {%- if pr.meta.B %}
8 | {%- if pr.meta.B.value == 0 %}
9 | {#- We skip silent ones -#}
10 | {%- else -%}
11 |
12 | {%- if pr.meta.A.value == 2 %}
13 | - {{ m_c::change(c=pr) }}
14 | {%- endif -%}
15 | {% endif -%}
16 | {% endif -%}
17 | {% endfor %}
18 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/changes_client.md.tera:
--------------------------------------------------------------------------------
1 | {% import "change.md.tera" as m_c -%}
2 | ### Client
3 |
4 | {#- The changes are sorted by merge date #}
5 | {%- for pr in changes | sort(attribute="merged_at") %}
6 |
7 | {%- if pr.meta.B %}
8 | {%- if pr.meta.B.value == 0 %}
9 | {#- We skip silent ones -#}
10 | {%- else -%}
11 |
12 | {%- if pr.meta.A.value == 1 %}
13 | - {{ m_c::change(c=pr) }}
14 | {%- endif -%}
15 | {% endif -%}
16 | {% endif -%}
17 | {% endfor %}
18 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/changes_core.md.tera:
--------------------------------------------------------------------------------
1 | {% import "change.md.tera" as m_c -%}
2 | ### Core
3 |
4 | {#- The changes are sorted by merge date #}
5 | {%- for pr in changes | sort(attribute="merged_at") %}
6 |
7 | {%- if pr.meta.B %}
8 | {%- if pr.meta.B.value == 0 %}
9 | {#- We skip silent ones -#}
10 | {%- else -%}
11 |
12 | {%- if pr.meta.A.value == 0 %}
13 | - {{ m_c::change(c=pr) }}
14 | {%- endif -%}
15 | {% endif -%}
16 | {% endif -%}
17 | {% endfor %}
18 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/changes_evm.md.tera:
--------------------------------------------------------------------------------
1 | {% import "change.md.tera" as m_c -%}
2 | ### EVM Feature
3 |
4 | {#- The changes are sorted by merge date #}
5 | {%- for pr in changes | sort(attribute="merged_at") %}
6 |
7 | {%- if pr.meta.B %}
8 | {%- if pr.meta.B.value == 0 %}
9 | {#- We skip silent ones -#}
10 | {%- else -%}
11 |
12 | {%- if pr.meta.A.value == 6 %}
13 | - {{ m_c::change(c=pr) }}
14 | {%- endif -%}
15 | {% endif -%}
16 | {% endif -%}
17 | {% endfor %}
18 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/changes_offchain.md.tera:
--------------------------------------------------------------------------------
1 | {% import "change.md.tera" as m_c -%}
2 | ### Offchain
3 |
4 | {#- The changes are sorted by merge date #}
5 | {%- for pr in changes | sort(attribute="merged_at") %}
6 |
7 | {%- if pr.meta.B %}
8 | {%- if pr.meta.B.value == 0 %}
9 | {#- We skip silent ones -#}
10 | {%- else -%}
11 |
12 | {%- if pr.meta.A.value == 4 %}
13 | - {{ m_c::change(c=pr) }}
14 | {%- endif -%}
15 | {% endif -%}
16 | {% endif -%}
17 | {% endfor %}
18 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/changes_sidechain.md.tera:
--------------------------------------------------------------------------------
1 | {% import "change.md.tera" as m_c -%}
2 | ### Sidechain
3 |
4 | {#- The changes are sorted by merge date #}
5 | {%- for pr in changes | sort(attribute="merged_at") %}
6 |
7 | {%- if pr.meta.B %}
8 | {%- if pr.meta.B.value == 0 %}
9 | {#- We skip silent ones -#}
10 | {%- else -%}
11 |
12 | {%- if pr.meta.A.value == 3 %}
13 | - {{ m_c::change(c=pr) }}
14 | {%- endif -%}
15 | {% endif -%}
16 | {% endif -%}
17 | {% endfor %}
18 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/changes_teeracle.md.tera:
--------------------------------------------------------------------------------
1 | {% import "change.md.tera" as m_c -%}
2 | ### Teeracle
3 |
4 | {#- The changes are sorted by merge date #}
5 | {%- for pr in changes | sort(attribute="merged_at") %}
6 |
7 | {%- if pr.meta.B %}
8 | {%- if pr.meta.B.value == 0 %}
9 | {#- We skip silent ones -#}
10 | {%- else -%}
11 |
12 | {%- if pr.meta.A.value == 5 %}
13 | - {{ m_c::change(c=pr) }}
14 | {%- endif -%}
15 | {% endif -%}
16 | {% endif -%}
17 | {% endfor %}
18 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/debug.md.tera:
--------------------------------------------------------------------------------
1 | {%- set to_ignore = changes | filter(attribute="meta.B.value", value=0) %}
2 |
3 |
9 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/changelog/templates/pre_release.md.tera:
--------------------------------------------------------------------------------
1 | {%- if env.PRE_RELEASE == "true" -%}
2 | ⚠️ This is a pre-release
3 |
4 | **Release candidates** are **pre-releases** and may not be final.
5 | Although they are reasonably tested, there may be additional changes or issues
6 | before an official release is tagged. Use at your own discretion, and consider
7 | only using final releases on critical production infrastructure.
8 |
9 | {% else -%}
10 |
11 | {%- endif %}
12 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/init_env.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # script that sets the correct environment variables to execute other scripts
4 |
5 | export SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
6 | export PROJ_ROOT="$(dirname "$SCRIPT_DIR")"
7 | export CLIENT_DIR="$PROJ_ROOT/cli"
8 | export LOG_DIR="$PROJ_ROOT/log"
9 | export CI_DIR="$PROJ_ROOT/ci"
10 | export RUST_LOG=info,ws=warn,substrate_api_client=warn,ac_node_api=warn
11 |
12 | echo "Set environment variables:"
13 | echo " BASH_SCRIPT_DIR: $SCRIPT_DIR"
14 | echo " PROJ_ROOT: $PROJ_ROOT"
15 | echo " CLIENT_DIR: $CLIENT_DIR"
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/litentry/release/template/relay-alice.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Litentry Relaychain Alice
3 |
4 | [Service]
5 | Type=simple
6 | User=USER
7 | WorkingDirectory=/opt/litentry/parachain
8 | ExecStart=/opt/litentry/parachain/polkadot --base-path /opt/litentry/parachain/relay-alice --chain /opt/litentry/parachain/rococo-local-chain-spec.json --alice --port 30336 --rpc-port 9946
9 | Restart=always
10 | RestartSec=120
11 | StandardOutput=append:/opt/litentry/parachain/relay.alice.log
12 | StandardError=inherit
13 |
14 | [Install]
15 | WantedBy=multi-user.target
16 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/litentry/release/template/relay-bob.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Litentry Relaychain Bob
3 |
4 | [Service]
5 | Type=simple
6 | User=USER
7 | WorkingDirectory=/opt/litentry/parachain
8 | ExecStart=/opt/litentry/parachain/polkadot --base-path /opt/litentry/parachain/relay-bob --chain /opt/litentry/parachain/rococo-local-chain-spec.json --bob --port 30337 --rpc-port 9947
9 | Restart=always
10 | RestartSec=120
11 | StandardOutput=append:/opt/litentry/parachain/relay.bob.log
12 | StandardError=inherit
13 |
14 | [Install]
15 | WantedBy=multi-user.target
16 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/m8.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -euo pipefail
3 |
4 | # Runs M8 demo: Either set `CLIENT_DIR` env var directly or run script with:
5 | #
6 | # source ./init_env.sh && ./m8.sh
7 |
8 | cd "$CLIENT_DIR" || exit
9 |
10 | LOG_1="${LOG_1:-$LOG_DIR/m8_demo_direct_call_1.log}"
11 | LOG_2="${LOG_2:-$LOG_DIR/m8_demo_direct_call_2.log}"
12 |
13 | echo "[m8.sh] printing to logs:"
14 | echo " $LOG_1"
15 | echo " $LOG_2"
16 |
17 | touch "$LOG_1"
18 | touch "$LOG_2"
19 |
20 | ./demo_direct_call.sh -p 9944 -P 2000 -C ./../bin/litentry-cli -t first 2>&1 | tee "$LOG_1"
21 | ./demo_direct_call.sh -p 9944 -P 3000 -C ./../bin/litentry-cli -t second 2>&1 | tee "$LOG_2"
22 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/sidechain.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -euo pipefail
3 |
4 | # Runs sidechain demo: Either set `CLIENT_DIR` env var directly or run script with:
5 | #
6 | # source ./init_env.sh && ./sidechain.sh
7 |
8 | cd "$CLIENT_DIR" || exit
9 |
10 | LOG="${LOG:-$LOG_DIR/sidechain_demo.log}"
11 |
12 | echo "[sidechain.sh] printing to logs:"
13 | echo " $LOG"
14 |
15 | touch "$LOG"
16 |
17 | ./demo_sidechain.sh -p 9944 -A 2000 -B 3000 -C ./../bin/litentry-cli 2>&1 | tee "$LOG"
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/teeracle.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -euo pipefail
3 |
4 | # Runs Teeracle1 demo: Either set `CLIENT_DIR` env var directly or run script with:
5 | #
6 | # source ./init_env.sh && ./teeracle.sh
7 |
8 | echo "$CLIENT_DIR"
9 |
10 | cd "$CLIENT_DIR" || exit
11 |
12 | LOG_1="${LOG_1:-$LOG_DIR/teeracle1_demo_whitelist.log}"
13 |
14 | echo "[teeracle.sh] printing to logs:"
15 | echo " $LOG_1"
16 |
17 | touch "$LOG_1"
18 |
19 | ./demo_teeracle_whitelist.sh -p 9944 -P 2000 -d 120 -i 24 2>&1 | tee "$LOG_1"
20 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/test_transfer/README.md:
--------------------------------------------------------------------------------
1 | ## Test transfer from Alice to random account
2 |
3 | ## Install
4 | ```bash
5 | npm install
6 | ```
7 |
--------------------------------------------------------------------------------
/tee-worker/identity/scripts/test_transfer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test_transfer",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "@polkadot/api": "*",
13 | "@polkadot/keyring": "^13.4.4",
14 | "@polkadot/util-crypto": "^13.4.4"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tee-worker/identity/service/src/enclave/mod.rs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2021 Integritee AG and Supercomputing Systems AG
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | */
17 |
18 | #[cfg(feature = "link-binary")]
19 | pub mod api;
20 | pub mod tls_ra;
21 |
--------------------------------------------------------------------------------
/tee-worker/identity/service/src/globals/mod.rs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2021 Integritee AG and Supercomputing Systems AG
3 | Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 |
17 | */
18 |
19 | pub mod tokio_handle;
20 |
--------------------------------------------------------------------------------
/tee-worker/identity/sidechain/consensus/aura/src/test/mocks/peer_updater_mock.rs:
--------------------------------------------------------------------------------
1 | use itc_peer_top_broadcaster::PeerUpdater;
2 |
3 | pub struct PeerUpdaterMock {}
4 |
5 | impl PeerUpdater for PeerUpdaterMock {
6 | fn update(&self, _peers: Vec) {}
7 | }
8 |
--------------------------------------------------------------------------------
/tee-worker/identity/sidechain/consensus/common/src/test/mod.rs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2021 Integritee AG and Supercomputing Systems AG
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 |
16 | */
17 |
18 | pub mod mocks;
19 |
--------------------------------------------------------------------------------
/tee-worker/identity/sidechain/fork-tree/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "fork-tree"
3 | version = "3.0.0"
4 | authors = ["Parity Technologies "]
5 | edition = "2021"
6 | license = "Apache-2.0"
7 | homepage = "https://substrate.io"
8 | repository = "https://github.com/paritytech/substrate/"
9 | description = "Utility library for managing tree-like ordered data with logic for pruning the tree while finalizing nodes."
10 | documentation = "https://docs.rs/fork-tree"
11 | readme = "README.md"
12 |
13 | [dependencies]
14 | codec = { package = "parity-scale-codec", workspace = true }
15 | sgx_tstd = { workspace = true, optional = true }
16 |
17 | [features]
18 | default = ["std"]
19 | std = [
20 | "codec/std",
21 | ]
22 | sgx = [
23 | # teaclave
24 | "sgx_tstd",
25 | ]
26 |
--------------------------------------------------------------------------------
/tee-worker/identity/sidechain/test/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "its-test"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ', 'Integritee AG ']
5 | homepage = 'https://www.heima.network'
6 | repository = 'https://github.com/litentry/heima'
7 | license = "Apache-2.0"
8 | edition = "2021"
9 |
10 | [dependencies]
11 |
12 | sgx_tstd = { workspace = true, features = ["untrusted_time"], optional = true }
13 | sp-core = { workspace = true }
14 |
15 | itp-types = { workspace = true }
16 | its-primitives = { workspace = true, features = ["full_crypto"] }
17 |
18 | [features]
19 | default = ["std"]
20 | std = [
21 | "itp-types/std",
22 | "its-primitives/std",
23 | "sp-core/std",
24 | ]
25 | sgx = [
26 | "sgx_tstd",
27 | ]
28 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 4
6 |
7 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/.gitignore:
--------------------------------------------------------------------------------
1 | .env.local
2 | cache/
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "es5",
3 | "singleQuote": true,
4 | "printWidth": 120,
5 | "tabWidth": 4,
6 | "semi": true
7 | }
8 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/.env.local.example:
--------------------------------------------------------------------------------
1 | NODE_ENV = local
2 | PARACHAIN_ENDPOINT = ws://localhost:9944
3 | BINARY_DIR=../../bin
4 | LITENTRY_CLI_DIR=../../bin/litentry-cli
5 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/.env.staging:
--------------------------------------------------------------------------------
1 | NODE_ENV = staging
2 | PARACHAIN_ENDPOINT = "ws://heima-node:9944"
3 | BINARY_DIR=/usr/local/bin
4 | LITENTRY_CLI_DIR=/usr/local/bin/litentry-cli
5 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/common/config.js:
--------------------------------------------------------------------------------
1 | import dotenv from 'dotenv';
2 |
3 | // eslint-disable-next-line @typescript-eslint/no-var-requires, no-undef
4 | dotenv.config({ path: `.env.${process.env.NODE_ENV || 'local'}` });
5 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/common/credential-json/blockchaininfo.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "token-holding-amount-btc",
4 | "name": "Bitcoin Holding Amount",
5 | "description": "The number of bitcoin tokens you hold > 0",
6 | "assertion": {
7 | "id": "TokenHoldingAmount",
8 | "payload": "BTC"
9 | },
10 | "dataProvider": "blockchaininfo",
11 | "network": "bitcoin",
12 | "mockDid": "litentry:bitcoin:0x03041ee39c741c35eb55078220dceb477a1e3b1b129977e0b37db6624772b5bda8",
13 | "mockWeb3Network": "BitcoinP2wpkh",
14 | "expectedCredentialValue": true
15 | }
16 | ]
17 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/common/credential-json/geniidata.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "token-holding-amount-btcs",
4 | "name": "BTCS Holding Amount",
5 | "description": "The number of BTCS tokens you hold > 0",
6 | "assertion": {
7 | "id": "Brc20AmountHolder",
8 | "payload": []
9 | },
10 | "dataProvider": "geniidata",
11 | "network": "bitcoin",
12 | "mockDid": "litentry:bitcoin:0x0202eb94e79b526f80b9029672f03d7c721da64c99fe742545423cbcc70851727f",
13 | "mockWeb3Network": "BitcoinP2wpkh",
14 | "expectedCredentialValue": true
15 | }
16 | ]
17 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/common/credential-json/litentry.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "evm-version-early-bird",
4 | "name": "IDHub EVM Version Early Bird",
5 | "description": "The user is an early bird user of the IdentityHub EVM version and has generated at least 1 credential during 2023 Aug 14th ~ Aug 21st.",
6 | "assertion": {
7 | "id": "A20",
8 | "payload": []
9 | },
10 | "dataProvider": "litentryIndexer",
11 | "network": "litentry",
12 | "mockDid": "litentry:substrate:0xa20d2c66bd88271ce78b2d8b7367c025e108944fda26a5a4e95b5efcc3f26b45",
13 | "mockWeb3Network": "litentry,polkadot",
14 | "expectedCredentialValue": false
15 | }
16 | ]
17 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/common/credential-json/moralis.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "token-holding-amount-sol",
4 | "name": "SOL Holding Amount",
5 | "description": "The number of SOL tokens you hold > 0",
6 | "assertion": {
7 | "id": "TokenHoldingAmount",
8 | "payload": "SOL"
9 | },
10 | "dataProvider": "moralis",
11 | "network": "solana",
12 | "mockDid": "litentry:solana:6xJ8xjUu6rY7kQS4kJodG4NcNgMtubUXGbhdBb7gqJMn",
13 | "mockWeb3Network": "solana",
14 | "expectedCredentialValue": true
15 | }
16 | ]
17 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/common/credential-json/twitter.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "twitter-follower-amount",
4 | "name": "Twitter Follower Amount",
5 | "description": "You have a certain amount of Twitter followers.",
6 | "assertion": {
7 | "id": "A6",
8 | "payload": "A6"
9 | },
10 | "dataProvider": "twitter",
11 | "network": "twitter",
12 | "mockDid": "litentry:twitter:litentry",
13 | "mockWeb3Network": "",
14 | "expectedCredentialValue": true
15 | }
16 | ]
17 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/common/utils/common.ts:
--------------------------------------------------------------------------------
1 | export function sleep(secs: number) {
2 | return new Promise((resolve) => {
3 | setTimeout(resolve, secs * 1000);
4 | });
5 | }
6 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/common/utils/index.ts:
--------------------------------------------------------------------------------
1 | import '../config';
2 |
3 | // in order to handle self-signed certificates we need to turn off the validation
4 | // TODO add self signed certificate ??
5 | process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
6 |
7 | export * from './assertion';
8 | export * from './common';
9 | export * from './context';
10 | export * from './crypto';
11 | export * from './identity-helper';
12 | export * from './integration-setup';
13 | export * from './storage';
14 | export * from './vc-helper';
15 | export * from './type-creators';
16 | export * from './native-request-helpers';
17 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/integration-tests/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "declaration": true,
7 | "strict": true,
8 | "skipLibCheck": true,
9 | "esModuleInterop": true,
10 | "allowSyntheticDefaultImports": true,
11 | "resolveJsonModule": true,
12 | "baseUrl": "."
13 | },
14 | "ts-node": {
15 | "esm": true,
16 | "experimentalResolver": true,
17 | "experimentalSpecifierResolution": "node",
18 | "transpileOnly": true
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module",
3 | "license": "ISC",
4 | "scripts": {
5 | "format": "pnpm run --recursive format",
6 | "check-format": "pnpm run --recursive check-format",
7 | "clean": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +"
8 | },
9 | "engines": {
10 | "node": ">=20.0.0"
11 | },
12 | "packageManager": "pnpm@9.15.2",
13 | "pnpm": {
14 | "overrides": {
15 | "base-x": "4.0.1",
16 | "elliptic": "6.6.1",
17 | "ws": "^8.18.2",
18 | "@types/ws": "^8.5.9"
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages: ['integration-tests', 'stress', 'worker', 'post-checks']
2 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/post-checks/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | build
4 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/post-checks/config.ts:
--------------------------------------------------------------------------------
1 | import { byId, ChainId } from '@litentry/chaindata';
2 |
3 | // Change this to the environment you want to test
4 | const network = process.env.LITENTRY_NETWORK;
5 | const chain = byId[network as ChainId];
6 |
7 | export const nodeEndpoint: string = chain.rpcs[0].url;
8 | export const enclaveEndpoint: string = chain.enclaveRpcs[0].url;
9 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/post-checks/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "rootDir": ".",
4 | "target": "esnext",
5 | "module": "esnext",
6 | "moduleResolution": "node",
7 | "declaration": true,
8 | "strict": true,
9 | "skipLibCheck": true,
10 | "allowJs": true,
11 | "importHelpers": true,
12 | "esModuleInterop": true,
13 | "allowSyntheticDefaultImports": true,
14 | "resolveJsonModule": true,
15 | "baseUrl": "."
16 | },
17 | "paths": {},
18 | "ts-node": {
19 | "esm": true,
20 | "experimentalResolver": true,
21 | "experimentalSpecifierResolution": "node",
22 | "transpileOnly": true
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/stress-runner:
--------------------------------------------------------------------------------
1 | #! /usr/bin/bash
2 |
3 | mkdir -p stress-output
4 |
5 | for i in {1..30}; do
6 | pnpm --filter stress run test > stress-output/process-$i.csv &
7 | done
8 |
9 | wait $(jobs -p)
10 |
11 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/stress/.env.local.example:
--------------------------------------------------------------------------------
1 | NODE_ENV = local
2 | ENCLAVE_ENDPOINT = wss://localhost:2000
3 | PARACHAIN_ENDPOINT = "ws://localhost:9944"
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/stress/.env.staging:
--------------------------------------------------------------------------------
1 | NODE_ENV=staging
2 | WORKER_ENDPOINT=wss://litentry-worker-1:2011
3 | PARACHAIN_ENDPOINT="ws://heima-node:9944"
4 | NODE_TLS_REJECT_UNAUTHORIZED=0
5 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/stress/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "connections": 20,
3 | "iterations": 10,
4 | "parachainEndpoint": "ws://tee-staging.litentry.io:9944",
5 | "enclaveEndpoint": "wss://tee-staging.litentry.io:2000"
6 | }
7 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/stress/src/config.ts:
--------------------------------------------------------------------------------
1 | import { z } from 'zod';
2 | import { readFileSync } from 'fs';
3 |
4 | export const Config = z.object({
5 | connections: z.number().int().positive(),
6 | iterations: z.number(),
7 | parachainEndpoint: z.string().url(),
8 | enclaveEndpoint: z.string().url(),
9 | });
10 |
11 | export type Config = z.infer;
12 |
13 | export function loadConfig(path: string): Config {
14 | return Config.parse(JSON.parse(readFileSync(path, { encoding: 'utf8' })));
15 | }
16 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/stress/src/random-wallet.ts:
--------------------------------------------------------------------------------
1 | import { Keyring } from '@polkadot/api';
2 | import { KeyringPair } from '@polkadot/keyring/types';
3 | import { randomBytes } from 'crypto';
4 | import { ethers } from 'ethers';
5 | import { Wallet } from './litentry-api';
6 |
7 | function randomSubstrateWallet(): KeyringPair {
8 | const keyring = new Keyring({ type: 'sr25519' });
9 | return keyring.addFromSeed(randomBytes(32));
10 | }
11 | function randomEvmWallet(): ethers.Wallet {
12 | return ethers.Wallet.createRandom();
13 | }
14 | export function randomWallet(): Wallet {
15 | return Math.random() > 0.5
16 | ? { type: 'substrate', keyringPair: randomSubstrateWallet() }
17 | : { type: 'evm', wallet: randomEvmWallet() };
18 | }
19 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/stress/src/util/consumer.ts:
--------------------------------------------------------------------------------
1 | export type Consumer = (arg: T) => Promise;
2 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/stress/src/util/sleep.ts:
--------------------------------------------------------------------------------
1 | export function sleep(ms: number) {
2 | return new Promise((resolve) => setTimeout(resolve, ms));
3 | }
4 |
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/worker/.env.local.example:
--------------------------------------------------------------------------------
1 | NODE_ENV = local
2 | PARACHAIN_ENDPOINT = "ws://localhost:9944"
3 | BINARY_DIR=/usr/local/bin
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/worker/.env.staging:
--------------------------------------------------------------------------------
1 | NODE_ENV=staging
2 | PARACHAIN_ENDPOINT="ws://heima-node:9944"
3 | NODE_TLS_REJECT_UNAUTHORIZED=0
4 | BINARY_DIR=/usr/local/bin
--------------------------------------------------------------------------------
/tee-worker/identity/ts-tests/worker/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "declaration": true,
7 | "strict": true,
8 | "skipLibCheck": true,
9 | "esModuleInterop": true,
10 | "allowSyntheticDefaultImports": true,
11 | "resolveJsonModule": true,
12 | "baseUrl": "."
13 | },
14 | "ts-node": {
15 | "esm": true,
16 | "experimentalResolver": true,
17 | "experimentalSpecifierResolution": "node"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tee-worker/identity/upstream_commit:
--------------------------------------------------------------------------------
1 | e40355f8
2 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/.env.example:
--------------------------------------------------------------------------------
1 | # sendgrid config
2 | OE_SENDGRID_API_KEY=
3 | OE_SENDGRID_FROM_EMAIL=
4 | OE_SENDGRID_FROM_NAME=
5 | # pumpX config
6 | OE_PUMPX_API_BASE_URL=
--------------------------------------------------------------------------------
/tee-worker/omni-executor/.gitignore:
--------------------------------------------------------------------------------
1 | debug/
2 | target/
3 | .idea/
4 | **/*.bin
5 |
6 | storage_db
7 |
8 | cache
9 | omni-executor.manifest
10 | omni-executor.manifest.sgx
11 | omni-executor.sig
12 | omni-executor
13 | storage_db
14 | test_get_health_storage_db
15 | test_get_shielding_key_storage_db
16 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/.taplo.toml:
--------------------------------------------------------------------------------
1 | include = ["Cargo.toml", "**/Cargo.toml"]
2 |
3 | [formatting]
4 | array_auto_expand = false
5 | array_auto_collapse = false
6 | indent_string = " "
7 | inline_table_expand = false
8 |
9 | [[rule]]
10 | include = ["Cargo.toml", "**/Cargo.toml"]
11 | keys = ["dependencies", "target", "patch", "workspace", "workspace.dependencies", "workspace.package", "features"]
12 |
13 | [rule.formatting]
14 | reorder_keys = true
15 | array_auto_expand = true
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract-client/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "accounting-contract-client"
3 | version = "0.1.0"
4 | edition.workspace = true
5 |
6 | [dependencies]
7 | accounting-contract = { workspace = true }
8 | alloy = { workspace = true, features = ["contract", "signer-local", "rpc", "rpc-types", "eips"] }
9 | anchor-client = { workspace = true }
10 | async-trait = { workspace = true }
11 | ethereum-rpc = { workspace = true }
12 | mockall = { workspace = true }
13 | sp-core = { workspace = true }
14 | tokio = { workspace = true, features = ["full"] }
15 | tracing = { workspace = true }
16 |
17 | [lints]
18 | workspace = true
19 |
20 | [features]
21 | mocks = []
22 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/bsc/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiler files
2 | cache/
3 | out/
4 |
5 | # Ignores development broadcast logs
6 | !/broadcast
7 | /broadcast/*/31337/
8 | /broadcast/**/dry-run/
9 |
10 | # Docs
11 | docs/
12 |
13 | # Dotenv file
14 | .env
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/bsc/foundry.toml:
--------------------------------------------------------------------------------
1 | [profile.default]
2 | src = 'src'
3 | out = 'out'
4 | libs = ['lib']
5 |
6 | # See more config options https://github.com/foundry-rs/foundry/tree/master/config
7 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/bsc/remappings.txt:
--------------------------------------------------------------------------------
1 | @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
2 | erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/
3 | forge-std/=lib/forge-std/src/
4 | halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/
5 | openzeppelin-contracts/=lib/openzeppelin-contracts/
6 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/.gitignore:
--------------------------------------------------------------------------------
1 | .anchor
2 | .DS_Store
3 | target
4 | **/*.rs.bk
5 | node_modules
6 | test-ledger
7 | .yarn
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/Anchor.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 |
3 | [features]
4 | resolution = true
5 | skip-lint = false
6 |
7 | [programs.localnet]
8 | accounting_contract = "31weKQJQA9ZFYaVdnjtAXUoEGPW8UUFC5TEvgPJugAub"
9 |
10 | [registry]
11 | url = "https://api.apr.dev"
12 |
13 | [provider]
14 | url = "http://localhost:8899"
15 | cluster = "Localnet"
16 | wallet = "test-account.json"
17 |
18 | [scripts]
19 | test = "cargo test"
20 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/Cargo.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 | members = [
3 | "programs/*",
4 | "tests",
5 | ]
6 | resolver = "2"
7 |
8 | [profile.release]
9 | overflow-checks = true
10 | lto = "fat"
11 | codegen-units = 1
12 | [profile.release.build-override]
13 | opt-level = 3
14 | incremental = false
15 | codegen-units = 1
16 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/migrations/deploy.ts:
--------------------------------------------------------------------------------
1 | // Migrations are an early feature. Currently, they're nothing more than this
2 | // single deploy script that's invoked from the CLI, injecting a provider
3 | // configured from the workspace's Anchor.toml.
4 |
5 | const anchor = require("@coral-xyz/anchor");
6 |
7 | module.exports = async function (provider) {
8 | // Configure client to use the provider.
9 | anchor.setProvider(provider);
10 |
11 | // Add your deploy script here.
12 | };
13 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "license": "ISC",
3 | "scripts": {
4 | "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
5 | "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
6 | },
7 | "dependencies": {
8 | "@coral-xyz/anchor": "^0.31.1"
9 | },
10 | "devDependencies": {
11 | "chai": "^4.3.4",
12 | "mocha": "^9.0.3",
13 | "ts-mocha": "^10.0.0",
14 | "@types/bn.js": "^5.1.0",
15 | "@types/chai": "^4.3.0",
16 | "@types/mocha": "^9.0.0",
17 | "typescript": "^4.3.5",
18 | "prettier": "^2.6.2"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/programs/accounting-contract/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "accounting-contract"
3 | version = "0.1.0"
4 | description = "Created with Anchor"
5 | edition = "2021"
6 |
7 | [lib]
8 | crate-type = ["cdylib", "lib"]
9 | name = "accounting_contract"
10 |
11 | [features]
12 | cpi = ["no-entrypoint"]
13 | default = []
14 | idl-build = ["anchor-lang/idl-build"]
15 | no-entrypoint = []
16 | no-idl = []
17 | no-log-ix-name = []
18 |
19 | [dependencies]
20 | anchor-lang = { version = "0.31.1", features = ["init-if-needed"] }
21 | serde = { version = "1.0", features = ["derive"] }
22 | solana-program = "2.2.1"
23 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/programs/accounting-contract/Xargo.toml:
--------------------------------------------------------------------------------
1 | [target.bpfel-unknown-unknown.dependencies.std]
2 | features = []
3 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/test-account.json:
--------------------------------------------------------------------------------
1 | [31,52,98,161,163,237,13,102,0,170,50,144,231,215,243,59,110,247,149,11,30,212,133,124,45,84,166,110,183,200,11,215,110,0,228,85,218,214,62,186,38,132,212,223,219,6,73,150,247,160,29,102,94,14,86,157,223,100,235,9,33,227,221,68]
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/tests/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "tests"
3 | version = "0.1.0"
4 | description = "Created with Anchor"
5 | edition = "2021"
6 |
7 | [dependencies]
8 | accounting-contract = { version = "0.1.0", path = "../programs/accounting-contract" }
9 | anchor-client = "0.30.1"
10 | bincode = "1.3.3"
11 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/tests/src/lib.rs:
--------------------------------------------------------------------------------
1 | #[cfg(test)]
2 | mod test_initialize;
3 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/accounting-contract/solana/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "types": ["mocha", "chai"],
4 | "typeRoots": ["./node_modules/@types"],
5 | "lib": ["es2015"],
6 | "module": "commonjs",
7 | "target": "es6",
8 | "esModuleInterop": true
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/binance-api/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "binance-api"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | async-trait = { workspace = true }
9 | chrono = { workspace = true }
10 | hex = { workspace = true }
11 | hmac = { workspace = true }
12 | mockall = { workspace = true }
13 | reqwest = { workspace = true }
14 | serde = { workspace = true }
15 | sha2 = { workspace = true }
16 | tracing = { workspace = true }
17 | url = { workspace = true }
18 |
19 | [dev-dependencies]
20 | tracing-subscriber = { workspace = true }
21 |
22 | [lints]
23 | workspace = true
24 |
25 | [features]
26 | mocks = []
27 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/binance-api/src/error.rs:
--------------------------------------------------------------------------------
1 | #[derive(Debug)]
2 | pub enum Error {
3 | RequestFailed,
4 | ParseResponseFailed,
5 | MethodNotSupported,
6 | InvalidParams,
7 | MaxRecvWindowExceeded,
8 | LimitExceeded,
9 | }
10 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/binance-api/src/traits.rs:
--------------------------------------------------------------------------------
1 | use std::collections::HashMap;
2 |
3 | pub trait TryIntoParams {
4 | fn try_into_params(&self) -> Result, &'static str>;
5 | }
6 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/binance-api/src/types.rs:
--------------------------------------------------------------------------------
1 | pub type AssetSymbol = String;
2 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | dist
5 | tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | yarn-error.log
34 | testem.log
35 | /typings
36 |
37 | # System Files
38 | .DS_Store
39 | Thumbs.db
40 |
41 | .nx
42 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/.npmrc:
--------------------------------------------------------------------------------
1 | strict-peer-dependencies=false
2 | auto-install-peers=true
3 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/.prettierignore:
--------------------------------------------------------------------------------
1 | # Add files here to ignore them from prettier formatting
2 | /dist
3 | /coverage
4 | /.nx/cache
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "printWidth": 120
4 | }
5 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # Omni Client Packages
4 |
5 | This repository contains packages that are published on NPM for dApps to interact with the Heima Protocol.
6 |
7 | Learn more about it on [Heima's official documentation](https://docs.heima.network/parachain/sdk-documentation).
8 |
9 | ## Packages
10 |
11 | - `@heima-network/client-sdk` ([go-to](packages/client-sdk/README.md)): provides helpers for dApps to interact with the Heima Protocol
12 | - `@heima-network/chaindata` ([go-to](packages/chaindata/README.md)): provides chain information of Heima networks.
13 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/jest.config.ts:
--------------------------------------------------------------------------------
1 | import { getJestProjectsAsync } from '@nx/jest';
2 |
3 | export default async () => ({
4 | projects: [...(await getJestProjectsAsync())],
5 | });
6 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/jest.preset.js:
--------------------------------------------------------------------------------
1 | const nxPreset = require('@nx/jest/preset').default;
2 |
3 | process.env.HEIMA_NETWORK = process.env.OMNI_WORKER_ENDPOINT ?? 'heima-local';
4 | process.env.PARACHAIN_NETWORK = process.env.PARACHAIN_ENDPOINT ?? 'ws://localhost:9944';
5 |
6 | module.exports = { ...nxPreset };
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/chaindata/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["../../.eslintrc.json"],
3 | "ignorePatterns": ["!**/*"],
4 | "overrides": [
5 | {
6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7 | "rules": {}
8 | },
9 | {
10 | "files": ["*.ts", "*.tsx"],
11 | "rules": {}
12 | },
13 | {
14 | "files": ["*.js", "*.jsx"],
15 | "rules": {}
16 | },
17 | {
18 | "files": ["*.json"],
19 | "parser": "jsonc-eslint-parser",
20 | "rules": {
21 | "@nx/dependency-checks": "error"
22 | }
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/chaindata/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7 |
8 | ## [Unreleased]
9 |
10 | - Initial version
11 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/chaindata/README.md:
--------------------------------------------------------------------------------
1 | # @heima-network/chaindata
2 |
3 | This library contains information about the available networks at Heima, including its testnets.
4 |
5 | ## Installation
6 |
7 | 1. Install from NPM
8 |
9 | ```
10 | npm install @heima-network/chaindata
11 | ```
12 |
13 | 2. Explore
14 |
15 | ```ts
16 | import { all, byId } from '@heima-network/chaindata`;
17 |
18 | console.log(all);
19 |
20 | console.log(`Heima's production RPC URL is: ${byId['heima-prod'].rpcs[0].url}`);
21 | ```
22 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/chaindata/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@heima-network/chaindata",
3 | "version": "0.0.7",
4 | "dependencies": {
5 | "tslib": "^2.5.3",
6 | "tsup": "^8.4.0"
7 | },
8 | "type": "module",
9 | "types": "./dist/index.d.ts",
10 | "module": "./dist/index.js",
11 | "main": "./dist/index.cjs",
12 | "exports": {
13 | ".": {
14 | "import": "./dist/index.js",
15 | "require": "./dist/index.cjs"
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/chaindata/src/index.ts:
--------------------------------------------------------------------------------
1 | export type { ChainSpec, ChainId } from './lib/chaindata';
2 | export { all, byId, getChain } from './lib/chaindata';
3 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/chaindata/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "forceConsistentCasingInFileNames": true,
5 | "strict": true,
6 | "noImplicitOverride": true,
7 | "noPropertyAccessFromIndexSignature": true,
8 | "noImplicitReturns": true,
9 | "noFallthroughCasesInSwitch": true,
10 | "baseUrl": ".",
11 | },
12 | "files": [],
13 | "include": [],
14 | "references": [
15 | {
16 | "path": "./tsconfig.lib.json"
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/chaindata/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./dist",
5 | "baseUrl": ".",
6 | "declaration": true,
7 | "types": ["node"]
8 | },
9 | "include": ["src/**/*.ts"],
10 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/chaindata/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'tsup';
2 | export default defineConfig([
3 | {
4 | entry: ['src'],
5 | outDir: './dist',
6 | format: ['esm', 'cjs'],
7 | splitting: false,
8 | sourcemap: true,
9 | clean: true,
10 | treeshake: true,
11 | dts: {
12 | resolve: true,
13 | },
14 | },
15 | ]);
16 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7 |
8 | ## [Unreleased]
9 |
10 | - Update NativeTaskOk::PumpxJwt to NativeTaskOk::PumpxRequestJwt
11 |
12 | ## [1.0.0-next.4] - 2025-04-02
13 |
14 | ### Added
15 |
16 | - Adapt the content for [Simplify nativetask calling interface](https://github.com/litentry/heima/pull/3319)
17 | - Add `PumpxRequestJwt` function
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/enumerations/OmniRpcMethod.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / OmniRpcMethod
6 |
7 | # Enumeration: OmniRpcMethod
8 |
9 | Defined in: [utils/rpc-method.ts:7](https://github.com/litentry/heima/blob/dev/utils/rpc-method.ts#L7)
10 |
11 | ## Enumeration Members
12 |
13 | ### RequestEmailVerificationCode
14 |
15 | > **RequestEmailVerificationCode**: `"omni_requestEmailVerificationCode"`
16 |
17 | Defined in: [utils/rpc-method.ts:8](https://github.com/litentry/heima/blob/dev/utils/rpc-method.ts#L8)
18 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/createOmniAuth.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / createOmniAuth
6 |
7 | # Function: createOmniAuth()
8 |
9 | > **createOmniAuth**(`registry`, `data`): `OmniAuth`
10 |
11 | Defined in: [type-creators/omni-auth.ts:25](https://github.com/litentry/heima/blob/dev/type-creators/omni-auth.ts#L25)
12 |
13 | ## Parameters
14 |
15 | ### registry
16 |
17 | `Registry`
18 |
19 | ### data
20 |
21 | [`OmniAuthData`](../type-aliases/OmniAuthData.md)
22 |
23 | ## Returns
24 |
25 | `OmniAuth`
26 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/decrypt.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / decrypt
6 |
7 | # Function: decrypt()
8 |
9 | > **decrypt**(`args`, `shieldingKey`): `Promise`\<\{ `cleartext`: `Uint8Array`; \}\>
10 |
11 | Defined in: [utils/shielding-key.ts:17](https://github.com/litentry/heima/blob/dev/utils/shielding-key.ts#L17)
12 |
13 | ## Parameters
14 |
15 | ### args
16 |
17 | #### ciphertext
18 |
19 | `Uint8Array`
20 |
21 | #### nonce
22 |
23 | `Uint8Array`
24 |
25 | ### shieldingKey
26 |
27 | `CryptoKey`
28 |
29 | ## Returns
30 |
31 | `Promise`\<\{ `cleartext`: `Uint8Array`; \}\>
32 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/decryptWithAes.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / decryptWithAes
6 |
7 | # Function: decryptWithAes()
8 |
9 | > **decryptWithAes**(`key`, `aesOutput`, `type`): `Promise`\<`` `0x${string}` ``\>
10 |
11 | Defined in: [utils/aes-key.ts:16](https://github.com/litentry/heima/blob/dev/utils/aes-key.ts#L16)
12 |
13 | ## Parameters
14 |
15 | ### key
16 |
17 | `` `0x${string}` ``
18 |
19 | ### aesOutput
20 |
21 | `AesOutput`
22 |
23 | ### type
24 |
25 | `"hex"` | `"utf-8"`
26 |
27 | ## Returns
28 |
29 | `Promise`\<`` `0x${string}` ``\>
30 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/encrypt.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / encrypt
6 |
7 | # Function: encrypt()
8 |
9 | > **encrypt**(`args`, `shieldingKey`): `Promise`\<\{ `ciphertext`: `Uint8Array`; \}\>
10 |
11 | Defined in: [utils/shielding-key.ts:51](https://github.com/litentry/heima/blob/dev/utils/shielding-key.ts#L51)
12 |
13 | Encrypts the given cleartext with the given nonce and shielding key.
14 |
15 | ## Parameters
16 |
17 | ### args
18 |
19 | #### cleartext
20 |
21 | `Uint8Array`
22 |
23 | #### nonce
24 |
25 | `Uint8Array`
26 |
27 | ### shieldingKey
28 |
29 | `CryptoKey`
30 |
31 | ## Returns
32 |
33 | `Promise`\<\{ `ciphertext`: `Uint8Array`; \}\>
34 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/exportKey.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / exportKey
6 |
7 | # Function: exportKey()
8 |
9 | > **exportKey**(`cryptoKey`): `Promise`\<`Uint8Array`\>
10 |
11 | Defined in: [utils/shielding-key.ts:67](https://github.com/litentry/heima/blob/dev/utils/shielding-key.ts#L67)
12 |
13 | ## Parameters
14 |
15 | ### cryptoKey
16 |
17 | `CryptoKey`
18 |
19 | ## Returns
20 |
21 | `Promise`\<`Uint8Array`\>
22 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/generate.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / generate
6 |
7 | # Function: generate()
8 |
9 | > **generate**(): `Promise`\<`CryptoKey`\>
10 |
11 | Defined in: [utils/shielding-key.ts:11](https://github.com/litentry/heima/blob/dev/utils/shielding-key.ts#L11)
12 |
13 | Generates a random shielding key.
14 |
15 | ## Returns
16 |
17 | `Promise`\<`CryptoKey`\>
18 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/generateNonce12.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / generateNonce12
6 |
7 | # Function: generateNonce12()
8 |
9 | > **generateNonce12**(): `Uint8Array`
10 |
11 | Defined in: [utils/shielding-key.ts:44](https://github.com/litentry/heima/blob/dev/utils/shielding-key.ts#L44)
12 |
13 | Generates a random nonce of 12 bytes.
14 |
15 | 12 bytes is the recommended size for AES-GCM and what is used by the Enclave in most cases.
16 |
17 | ## Returns
18 |
19 | `Uint8Array`
20 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/importKey.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / importKey
6 |
7 | # Function: importKey()
8 |
9 | > **importKey**(`key`): `Promise`\<`CryptoKey`\>
10 |
11 | Defined in: [utils/aes-key.ts:8](https://github.com/litentry/heima/blob/dev/utils/aes-key.ts#L8)
12 |
13 | ## Parameters
14 |
15 | ### key
16 |
17 | `` `0x${string}` ``
18 |
19 | ## Returns
20 |
21 | `Promise`\<`CryptoKey`\>
22 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/isWeb3.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / isWeb3
6 |
7 | # Function: isWeb3()
8 |
9 | > **isWeb3**(`identity`): `boolean`
10 |
11 | Defined in: [utils/identity.ts:11](https://github.com/litentry/heima/blob/dev/utils/identity.ts#L11)
12 |
13 | Checks if the given identity is a Web3 identity.
14 |
15 | ## Parameters
16 |
17 | ### identity
18 |
19 | `Identity`
20 |
21 | The identity object to check
22 |
23 | ## Returns
24 |
25 | `boolean`
26 |
27 | `true` if the identity is EVM, Substrate, Bitcoin, or Solana based; `false` otherwise
28 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/toHash.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / toHash
6 |
7 | # Function: toHash()
8 |
9 | > **toHash**(`identity`): `` `0x${string}` ``
10 |
11 | Defined in: [utils/identity.ts:23](https://github.com/litentry/heima/blob/dev/utils/identity.ts#L23)
12 |
13 | Converts the given identity to hash.
14 |
15 | ## Parameters
16 |
17 | ### identity
18 |
19 | `Identity`
20 |
21 | The identity object to convert
22 |
23 | ## Returns
24 |
25 | `` `0x${string}` ``
26 |
27 | A hash hex string of the identity
28 |
29 | ## Reference
30 |
31 | https://github.com/litentry/heima/blob/dev/parachain/primitives/src/identity.rs#L547
32 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/functions/toPublicKey.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / toPublicKey
6 |
7 | # Function: toPublicKey()
8 |
9 | > **toPublicKey**(`address`): `` `0x${string}` ``
10 |
11 | Defined in: [type-creators/identity.ts:83](https://github.com/litentry/heima/blob/dev/type-creators/identity.ts#L83)
12 |
13 | Returns the public key from a given substrate address.
14 |
15 | ## Parameters
16 |
17 | ### address
18 |
19 | `string`
20 |
21 | ## Returns
22 |
23 | `` `0x${string}` ``
24 |
25 | ## Throws
26 |
27 | if the address is not a valid substrate address
28 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/type-aliases/Maybe.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / Maybe
6 |
7 | # Type Alias: Maybe\
8 |
9 | > **Maybe**\<`T`\> = `null` \| `undefined` \| `T`
10 |
11 | Defined in: [utils/types.ts:1](https://github.com/litentry/heima/blob/dev/utils/types.ts#L1)
12 |
13 | ## Type Parameters
14 |
15 | ### T
16 |
17 | `T`
18 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/type-aliases/OmniAuthData.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / OmniAuthData
6 |
7 | # Type Alias: OmniAuthData
8 |
9 | > **OmniAuthData** = \{ `type`: `"Email"`; `verificationCode`: `string`; \} \| \{ `signature`: `string`; `signer`: `Identity`; `type`: `"Web3"`; \} \| \{ `token`: `string`; `type`: `"AuthToken"`; \} \| \{ `data`: `OAuth2DataType`; `type`: `"OAuth2"`; \}
10 |
11 | Defined in: [type-creators/omni-auth.ts:6](https://github.com/litentry/heima/blob/dev/type-creators/omni-auth.ts#L6)
12 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/type-aliases/SubstrateOrEvmOrBtcAddress.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / SubstrateOrEvmOrBtcAddress
6 |
7 | # Type Alias: SubstrateOrEvmOrBtcAddress
8 |
9 | > **SubstrateOrEvmOrBtcAddress** = `string` \| `` `0x${string}` ``
10 |
11 | Defined in: [utils/types.ts:23](https://github.com/litentry/heima/blob/dev/utils/types.ts#L23)
12 |
13 | Substrate SS58 address, Substrate public key or EVM address
14 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/type-aliases/TwitterProof.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / TwitterProof
6 |
7 | # Type Alias: TwitterProof
8 |
9 | > **TwitterProof** = `object`
10 |
11 | Defined in: [type-creators/validation-data.ts:27](https://github.com/litentry/heima/blob/dev/type-creators/validation-data.ts#L27)
12 |
13 | Ownership proof for Twitter accounts
14 |
15 | ## See
16 |
17 | createValidationDataType
18 |
19 | ## Properties
20 |
21 | ### tweetId
22 |
23 | > **tweetId**: `string`
24 |
25 | Defined in: [type-creators/validation-data.ts:27](https://github.com/litentry/heima/blob/dev/type-creators/validation-data.ts#L27)
26 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/docs/variables/enclave.md:
--------------------------------------------------------------------------------
1 | [**@heima-network/client-sdk**](../README.md)
2 |
3 | ***
4 |
5 | [@heima-network/client-sdk](../README.md) / enclave
6 |
7 | # Variable: enclave
8 |
9 | > `const` **enclave**: [`Enclave`](../classes/Enclave.md)
10 |
11 | Defined in: [enclave.ts:388](https://github.com/litentry/heima/blob/dev/enclave.ts#L388)
12 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-sdk',
4 | preset: '../../jest.preset.js',
5 | testEnvironment: 'node',
6 | transform: {
7 | '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }],
8 | },
9 | moduleFileExtensions: ['ts', 'js', 'html'],
10 | coverageDirectory: '../../coverage/packages/client-sdk',
11 | transformIgnorePatterns: ['node_modules/(?!(@heima-network/|.pnpm/@heima-network)).*'],
12 | testPathIgnorePatterns: ['dist'],
13 | moduleNameMapper: {},
14 | };
15 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/src/index.ts:
--------------------------------------------------------------------------------
1 | import '@heima-network/parachain-api';
2 |
3 | export { Enclave, enclave, ConnectionState } from '@lib/enclave';
4 |
5 | /** @namespace requests */
6 | export * as request from '@lib/requests';
7 |
8 | // type creators
9 | export * from '@lib/type-creators/aes-output';
10 | export * from '@lib/type-creators/identity';
11 | export * from '@lib/type-creators/raw-task';
12 | export * from '@lib/type-creators/native-task';
13 | export * from '@type-creators/validation-data';
14 | export * from '@lib/type-creators/omni-auth';
15 |
16 | // utils
17 | export * from '@lib/test-utils/helpers';
18 | export * from '@lib/utils';
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/src/lib/__test__/enclave.test.ts:
--------------------------------------------------------------------------------
1 | import { enclave } from '@lib/enclave';
2 |
3 | describe('enclave', () => {
4 | it('get shielding key', async () => {
5 | const shieldingKey = await enclave.getShieldingKey();
6 |
7 | expect(shieldingKey).toBeDefined();
8 | });
9 | });
10 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/src/lib/requests/__test__/get-oauth2-google-authorization-url.request.test.ts:
--------------------------------------------------------------------------------
1 | import { getOAuth2GoogleAuthorizationUrl } from '@requests/get-oauth2-google-authorization-url.request';
2 |
3 | describe('get-oauth2-google-authorization-url', () => {
4 | it('should works', async () => {
5 | const authorizeUrl = await getOAuth2GoogleAuthorizationUrl({
6 | googleAccount: 'test@google.com',
7 | redirectUri: 'https://test.com',
8 | });
9 |
10 | expect(authorizeUrl).toContain('https://accounts.google.com/o/oauth2/v2/auth');
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/src/lib/requests/__test__/request-email-verification-code.request.test.ts:
--------------------------------------------------------------------------------
1 | import { requestEmailVerificationCode } from '@requests/request-email-verification-code.request';
2 |
3 | describe.skip('request-email-verification-code', () => {
4 | it('should works', async () => {
5 | await requestEmailVerificationCode({
6 | email: 'test@google.com',
7 | });
8 | });
9 | });
10 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/src/lib/requests/index.ts:
--------------------------------------------------------------------------------
1 | export { addAccount } from './add-account.request';
2 | export { removeAccounts } from './remove-accounts.request';
3 | export { publicizeAccount } from './publicize-account.request';
4 | export { setPermissions } from './set-permissions.request';
5 | export { requestAuthToken } from './request-auth-token.request';
6 | export { requestPumpxJwt } from './pumpx-request-jwt.request';
7 |
8 | export { getOAuth2GoogleAuthorizationUrl } from './get-oauth2-google-authorization-url.request';
9 | export { getAccountNonce, getOmniAccountNonceWithIdentity } from './get-nonce.request';
10 | export { requestEmailVerificationCode } from './request-email-verification-code.request';
11 | export * from './intents';
12 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/src/lib/requests/intents/index.ts:
--------------------------------------------------------------------------------
1 | export { callEthereum } from './call-ethereum.request';
2 | export { systemRemark } from './system-remark.request';
3 | export { transferEthereum } from './transfer-ethereum.request';
4 | export { transferNative } from './transfer-native.request';
5 | export { transferSolana } from './transfer-solana.request';
6 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/src/lib/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './create-payload-to-sign';
2 | export * from './create-verification-message';
3 | export * from './decode-signature';
4 | export * from './get-signature-crypto-type';
5 | export * from './shielding-key';
6 | export * from './types';
7 | export * from './u8aToBase64Url';
8 | export * from './verify-signature';
9 | export * from './identity';
10 | export * from './rpc-method';
11 | export * from './aes-key';
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/src/lib/utils/rpc-method.ts:
--------------------------------------------------------------------------------
1 | export const enum PumpxRpcMethod {
2 | RequestJwt = 'pumpx_requestJwt',
3 | ExportWallet = 'pumpx_exportWallet',
4 | AddWallet = 'pumpx_addWallet',
5 | }
6 |
7 | export const enum OmniRpcMethod {
8 | RequestEmailVerificationCode = 'omni_requestEmailVerificationCode',
9 | }
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./dist",
5 | "declaration": true,
6 | "rootDir": ".",
7 | "types": ["node"],
8 | "baseUrl": ".",
9 | "paths": {
10 | "@lib/*": ["src/lib/*"],
11 | "@requests/*": ["src/lib/requests/*"],
12 | "@type-creators/*": ["src/lib/type-creators/*"],
13 | "@utils/*": ["src/lib/utils/*"],
14 | "@test-utils/*": ["src/lib/test-utils/*"]
15 | },
16 | "stripInternal": true,
17 | "declarationMap": true
18 | },
19 | "include": ["src/**/*.ts"],
20 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/lib/test-utils/*"]
21 | }
22 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./dist",
5 | "module": "commonjs",
6 | "types": ["jest", "node"],
7 | "baseUrl": ".",
8 | "paths": {
9 | "@lib/*": ["src/lib/*"],
10 | "@requests/*": ["src/lib/requests/*"],
11 | "@type-creators/*": ["src/lib/type-creators/*"],
12 | "@utils/*": ["src/lib/utils/*"],
13 | "@test-utils/*": ["src/lib/test-utils/*"]
14 | }
15 | },
16 | "include": ["jest.config.ts", "src/lib/test-utils/*", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'tsup';
2 | import { execSync } from 'child_process';
3 | export default defineConfig([
4 | {
5 | entry: ['src'],
6 | outDir: './dist',
7 | format: ['esm', 'cjs'],
8 | splitting: false,
9 | sourcemap: true,
10 | clean: true,
11 | treeshake: true,
12 | dts: {
13 | resolve: true,
14 | },
15 | },
16 | ]);
17 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/packages/client-sdk/typedoc.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://typedoc.org/schema.json",
3 | "plugin": ["typedoc-plugin-markdown"],
4 | "entryPoints": ["./src/index.ts"],
5 | "disableGit": true,
6 | "sourceLinkTemplate": "https://github.com/litentry/heima/blob/dev/{path}#L{line}",
7 | "readme": "none",
8 | "out": "docs"
9 | }
10 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - 'packages/*'
3 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@heima-client-sdk/source",
3 | "$schema": "node_modules/nx/schemas/project-schema.json",
4 | "targets": {
5 | "local-registry": {
6 | "executor": "@nx/js:verdaccio",
7 | "options": {
8 | "port": 4873,
9 | "config": ".verdaccio/config.yml",
10 | "storage": "tmp/local-registry/storage"
11 | }
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/client-sdk/workspace.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/nx/schemas/workspace-schema.json",
3 | "version": 2,
4 | "projects": {
5 | "chaindata": "packages/chaindata",
6 | "client-sdk": "packages/client-sdk"
7 | }
8 | }
--------------------------------------------------------------------------------
/tee-worker/omni-executor/ethereum-rpc/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "ethereum-rpc"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | alloy = { workspace = true, features = ["contract", "signer-local", "rpc", "rpc-types", "eips"] }
9 | async-trait = { workspace = true }
10 | executor-core = { workspace = true }
11 | hex-literal = { workspace = true }
12 | libsecp256k1 = { workspace = true }
13 | mockall = { workspace = true }
14 | sp-core = { workspace = true }
15 | tokio = { workspace = true }
16 | tracing = { workspace = true }
17 |
18 | # Local dependencies
19 | signer-client = { workspace = true }
20 |
21 | [lints]
22 | workspace = true
23 |
24 | [features]
25 | mocks = []
26 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-core/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/omni-executor/executor-core/README.md
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-crypto/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "executor-crypto"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | ethers = { workspace = true }
9 | jsonwebtoken = { workspace = true }
10 | parity-scale-codec = { workspace = true }
11 | rand = { workspace = true }
12 | ring = { workspace = true }
13 | rsa = { workspace = true, features = ["sha2"] }
14 | secp256k1 = { workspace = true, features = ["std", "global-context", "recovery"] }
15 | serde = { workspace = true }
16 | serde_with = { workspace = true }
17 | sp-core = { workspace = true }
18 | tracing = { workspace = true }
19 |
20 | [dev-dependencies]
21 | chrono = { workspace = true }
22 |
23 | [lints]
24 | workspace = true
25 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-crypto/src/traits.rs:
--------------------------------------------------------------------------------
1 | use std::fmt::Debug;
2 | use std::vec::Vec;
3 |
4 | pub trait Encrypt {
5 | type Error: Debug;
6 | fn encrypt(&self, data: &[u8]) -> Result, Self::Error>;
7 | }
8 |
9 | pub trait Decrypt {
10 | type Error: Debug;
11 | fn decrypt(&self, data: &[u8]) -> Result, Self::Error>;
12 | }
13 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-primitives/src/signature/mod.rs:
--------------------------------------------------------------------------------
1 | mod bitcoin;
2 | pub use bitcoin::BitcoinSignature;
3 |
4 | mod evm;
5 | pub use evm::EthereumSignature;
6 |
7 | mod heima_multi_signature;
8 | pub use heima_multi_signature::{HeimaMultiSignature, SolanaSignature, SubstrateSignature};
9 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-primitives/src/utils/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod hex;
2 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-storage/src/account_store.rs:
--------------------------------------------------------------------------------
1 | use crate::Storage;
2 | use executor_primitives::{AccountId, MemberAccount};
3 | use rocksdb::DB;
4 | use std::{sync::Arc, vec::Vec};
5 |
6 | const STORAGE_NAME: &str = "account_store_storage";
7 |
8 | pub struct AccountStoreStorage {
9 | db: Arc,
10 | }
11 |
12 | impl AccountStoreStorage {
13 | pub fn new(db: Arc) -> Self {
14 | Self { db }
15 | }
16 | }
17 |
18 | type AccountStore = Vec;
19 |
20 | impl Storage for AccountStoreStorage {
21 | fn db(&self) -> Arc {
22 | self.db.clone()
23 | }
24 |
25 | fn name(&self) -> &'static str {
26 | STORAGE_NAME
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-storage/src/heima_jwt.rs:
--------------------------------------------------------------------------------
1 | use crate::Storage;
2 | use executor_primitives::AccountId;
3 | use rocksdb::DB;
4 | use std::sync::Arc;
5 |
6 | const STORAGE_NAME: &str = "heima_jwt_storage";
7 |
8 | pub type HeimaJwtStorageKey = (AccountId, &'static str);
9 |
10 | pub struct HeimaJwtStorage {
11 | db: Arc,
12 | }
13 |
14 | impl HeimaJwtStorage {
15 | pub fn new(db: Arc) -> Self {
16 | Self { db }
17 | }
18 | }
19 |
20 | impl Storage for HeimaJwtStorage {
21 | fn db(&self) -> Arc {
22 | self.db.clone()
23 | }
24 |
25 | fn name(&self) -> &'static str {
26 | STORAGE_NAME
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-storage/src/intent_id.rs:
--------------------------------------------------------------------------------
1 | use crate::Storage;
2 | use executor_primitives::{AccountId, IntentId};
3 | use rocksdb::DB;
4 | use std::sync::Arc;
5 |
6 | const STORAGE_NAME: &str = "intent_id_storage";
7 |
8 | pub struct IntentIdStorage {
9 | db: Arc,
10 | }
11 |
12 | impl IntentIdStorage {
13 | pub fn new(db: Arc) -> Self {
14 | Self { db }
15 | }
16 | }
17 |
18 | impl Storage for IntentIdStorage {
19 | fn db(&self) -> Arc {
20 | self.db.clone()
21 | }
22 |
23 | fn name(&self) -> &'static str {
24 | STORAGE_NAME
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-storage/src/member_omni_account.rs:
--------------------------------------------------------------------------------
1 | use crate::Storage;
2 | use executor_primitives::{AccountId, Hash};
3 | use rocksdb::DB;
4 | use std::sync::Arc;
5 |
6 | const STORAGE_NAME: &str = "member_omni_account";
7 |
8 | pub struct MemberOmniAccountStorage {
9 | db: Arc,
10 | }
11 |
12 | impl MemberOmniAccountStorage {
13 | pub fn new(db: Arc) -> Self {
14 | Self { db }
15 | }
16 | }
17 |
18 | impl Storage for MemberOmniAccountStorage {
19 | fn db(&self) -> Arc {
20 | self.db.clone()
21 | }
22 |
23 | fn name(&self) -> &'static str {
24 | STORAGE_NAME
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-storage/src/oauth2_state_verifier.rs:
--------------------------------------------------------------------------------
1 | use crate::Storage;
2 | use executor_primitives::Hash;
3 | use rocksdb::DB;
4 | use std::sync::Arc;
5 |
6 | const STORAGE_NAME: &str = "oauth2_state_storage";
7 |
8 | pub struct OAuth2StateVerifierStorage {
9 | db: Arc,
10 | }
11 |
12 | impl OAuth2StateVerifierStorage {
13 | pub fn new(db: Arc) -> Self {
14 | Self { db }
15 | }
16 | }
17 |
18 | impl Storage for OAuth2StateVerifierStorage {
19 | fn db(&self) -> Arc {
20 | self.db.clone()
21 | }
22 |
23 | fn name(&self) -> &'static str {
24 | STORAGE_NAME
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-storage/src/pumpx_account_profile.rs:
--------------------------------------------------------------------------------
1 | use crate::Storage;
2 | use executor_primitives::{AccountId, PumpxAccountProfile};
3 | use rocksdb::DB;
4 | use std::sync::Arc;
5 |
6 | const STORAGE_NAME: &str = "pumpx_profile_storage";
7 |
8 | pub struct PumpxProfileStorage {
9 | db: Arc,
10 | }
11 |
12 | impl PumpxProfileStorage {
13 | pub fn new(db: Arc) -> Self {
14 | Self { db }
15 | }
16 | }
17 |
18 | impl Storage for PumpxProfileStorage {
19 | fn db(&self) -> Arc {
20 | self.db.clone()
21 | }
22 |
23 | fn name(&self) -> &'static str {
24 | STORAGE_NAME
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-storage/src/verification_code.rs:
--------------------------------------------------------------------------------
1 | use crate::Storage;
2 | use executor_primitives::Hash;
3 | use rocksdb::DB;
4 | use std::sync::Arc;
5 |
6 | const STORAGE_NAME: &str = "verification_code_storage";
7 |
8 | pub struct VerificationCodeStorage {
9 | db: Arc,
10 | }
11 |
12 | impl VerificationCodeStorage {
13 | pub fn new(db: Arc) -> Self {
14 | Self { db }
15 | }
16 | }
17 |
18 | impl Storage for VerificationCodeStorage {
19 | fn db(&self) -> Arc {
20 | self.db.clone()
21 | }
22 |
23 | fn name(&self) -> &'static str {
24 | STORAGE_NAME
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/executor-worker/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "executor-worker"
7 | version = "0.1.0"
8 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/heima/authentication/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "heima-authentication"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | parity-scale-codec = { workspace = true }
9 | rsa = { workspace = true }
10 | serde = { workspace = true }
11 | tracing = { workspace = true }
12 |
13 | # Local dependencies
14 | executor-crypto = { workspace = true }
15 | executor-primitives = { workspace = true }
16 |
17 | [dev-dependencies]
18 | chrono = { workspace = true }
19 | rand = { workspace = true }
20 |
21 | [lints]
22 | workspace = true
23 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/heima/authentication/src/constants.rs:
--------------------------------------------------------------------------------
1 | // Authentication related constants
2 | pub const AUTH_TOKEN_EXPIRATION_DAYS: u64 = 7; // 1 week
3 | pub const AUTH_TOKEN_ACCESS_TYPE: &str = "access";
4 | pub const AUTH_TOKEN_ID_TYPE: &str = "id";
5 |
6 | // Client ID constants for JWT audience
7 | pub const CLIENT_ID_HEIMA: &str = "heima";
8 | pub const CLIENT_ID_PUMPX: &str = "pumpx";
9 | pub const CLIENT_ID_WILDMETA: &str = "wildmeta";
10 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/heima/authentication/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod auth_token;
2 | pub mod constants;
3 | pub mod web3;
4 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/heima/authentication/src/web3.rs:
--------------------------------------------------------------------------------
1 | use serde::{Deserialize, Serialize};
2 |
3 | #[derive(Serialize, Deserialize, Clone)]
4 | pub struct HeimaMessagePayload {
5 | pub client_id: String,
6 | pub omni_account: String,
7 | pub message_code: String,
8 | }
9 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/heima/identity-verification/src/web2/email/mod.rs:
--------------------------------------------------------------------------------
1 | mod mailer;
2 | pub use mailer::Mailer;
3 |
4 | pub fn generate_verification_code() -> String {
5 | crate::helpers::generate_otp(6)
6 | }
7 |
8 | pub async fn send_verification_email(
9 | mailer: &impl mailer::MailerTrait,
10 | to: String,
11 | verification_code: String,
12 | ) -> Result<(), mailer::Error> {
13 | let mail = mailer::Mail {
14 | to,
15 | subject: "Verify your email".to_string(),
16 | body: mailer::template::EMAIL_VERIFICATION_TEMPLATE
17 | .replace("{{ verification_code }}", &verification_code),
18 | content_type: "text/html".to_string(),
19 | };
20 | mailer.send(mail).await
21 | }
22 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/intent/asset-lock/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "intent-asset-lock"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | parity-scale-codec = { workspace = true }
9 | ruint = { workspace = true, features = ["parity-scale-codec"] }
10 | tracing = { workspace = true }
11 |
12 | # Local dependencies
13 | executor-core = { workspace = true }
14 | executor-primitives = { workspace = true }
15 | executor-storage = { workspace = true }
16 | heima-primitives = { workspace = true }
17 |
18 |
19 | [dev-dependencies]
20 | rust_decimal = { workspace = true }
21 | tempfile = { workspace = true }
22 |
23 | [lints]
24 | workspace = true
25 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/intent/executors/solana/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "solana-intent-executor"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | async-trait = { workspace = true }
9 | executor-core = { workspace = true }
10 | solana-client = { workspace = true }
11 | solana-sdk = { workspace = true }
12 | tokio = { workspace = true }
13 | tracing = { workspace = true }
14 |
15 | # Local dependencies
16 | executor-primitives = { workspace = true }
17 | pumpx = { workspace = true }
18 |
19 | [lints]
20 | workspace = true
21 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/intent/executors/solana/dev-key.json:
--------------------------------------------------------------------------------
1 | [81,141,231,104,31,107,111,196,199,235,191,149,123,251,26,38,204,85,251,179,206,71,246,102,244,163,73,163,159,122,246,26,113,113,153,87,165,34,236,236,215,147,18,130,105,149,134,167,149,227,48,189,127,11,122,177,171,43,15,129,138,91,9,122]
2 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/local/keystore/README.md:
--------------------------------------------------------------------------------
1 | This folder contains the dev keystore: signer key
2 |
3 | How is bin file generated:
4 |
5 | ```bash
6 | # subkey inspect '//Alice'
7 | echo -n "e5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a" | xxd -r -p > substrate_key.bin
8 | ```
--------------------------------------------------------------------------------
/tee-worker/omni-executor/local/keystore/substrate_key.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/omni-executor/local/keystore/substrate_key.bin
--------------------------------------------------------------------------------
/tee-worker/omni-executor/oauth-providers/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "oauth-providers"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | reqwest = { workspace = true }
9 | serde = { workspace = true }
10 |
11 | [lints]
12 | workspace = true
13 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/oauth-providers/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod google;
2 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/parentchain/api-interface/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "parentchain-api-interface"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | subxt = { workspace = true }
9 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/parentchain/api-interface/artifacts/metadata.scale:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/omni-executor/parentchain/api-interface/artifacts/metadata.scale
--------------------------------------------------------------------------------
/tee-worker/omni-executor/parentchain/api-interface/src/lib.rs:
--------------------------------------------------------------------------------
1 | mod interface;
2 | pub use interface::api::*;
3 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/parentchain/signer/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "parentchain-signer"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | parity-scale-codec = { workspace = true }
9 | subxt-core = { workspace = true }
10 | subxt-signer = { workspace = true }
11 | tracing = { workspace = true }
12 |
13 | # Local dependencies
14 | executor-core = { workspace = true }
15 | executor-crypto = { workspace = true }
16 | executor-primitives = { workspace = true }
17 | parentchain-rpc-client = { workspace = true }
18 |
19 | [dev-dependencies]
20 | tracing-subscriber = { workspace = true }
21 |
22 | [lints]
23 | workspace = true
24 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/pumpx/src/pumpx_api/methods/mod.rs:
--------------------------------------------------------------------------------
1 | pub mod add_wallet;
2 | pub mod common;
3 | pub mod create_cross_order;
4 | pub mod create_limit_order;
5 | pub mod create_market_order_tx;
6 | pub mod create_market_order_unsigned_tx;
7 | pub mod create_transfer_tx;
8 | pub mod create_transfer_unsigned_tx;
9 | pub mod cross_fail;
10 | pub mod get_account_user_id;
11 | pub mod get_gas_info;
12 | pub mod get_user_trade_info;
13 | pub mod heima_post_login;
14 | pub mod send_order_tx;
15 | pub mod send_transfer_tx;
16 | pub mod user_connect;
17 | pub mod verify_google_code;
18 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/rpc-server/src/lib.rs:
--------------------------------------------------------------------------------
1 | mod auth_token_key_store;
2 | mod error_code;
3 | mod methods;
4 | mod middlewares;
5 | mod server;
6 | mod task;
7 | mod verify_auth;
8 |
9 | pub use auth_token_key_store::AuthTokenKeyStore;
10 | pub use executor_crypto::shielding_key::ShieldingKey;
11 | pub use server::start_server;
12 |
13 | use executor_primitives::utils::hex::{hex_encode, FromHexPrefixed};
14 | use jsonrpsee::types::ErrorCode;
15 | use parity_scale_codec::{Decode, Encode};
16 | use serde::{Deserialize, Serialize};
17 | use tokio::sync::oneshot;
18 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/rpc-server/src/methods/mod.rs:
--------------------------------------------------------------------------------
1 | use crate::server::RpcContext;
2 | use jsonrpsee::RpcModule;
3 |
4 | mod pumpx;
5 | use pumpx::*;
6 |
7 | mod omni;
8 | use omni::*;
9 |
10 | // TODO: list all protected methods here once the interface has been updated
11 | pub const PROTECTED_METHODS: [&str; 1] = ["omni_testProtectedMethod"];
12 |
13 | pub fn register_methods(module: &mut RpcModule) {
14 | register_omni(module);
15 | register_pumpx(module);
16 | }
17 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/rpc-server/src/middlewares/mod.rs:
--------------------------------------------------------------------------------
1 | mod http_middleware;
2 | mod rpc_middleware;
3 |
4 | pub(crate) use http_middleware::*;
5 | pub(crate) use rpc_middleware::*;
6 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/rust-toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | channel = "1.87"
3 | profile = "default" # include rustfmt, clippy
4 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/signer-client/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "signer-client"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | async-trait = { workspace = true }
9 | mockall = { workspace = true }
10 | serde = { workspace = true }
11 |
12 | # Local dependencies
13 | executor-crypto = { workspace = true }
14 |
15 | [lints]
16 | workspace = true
17 |
18 | [features]
19 | mocks = []
20 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/solana/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "solana"
3 | version = "0.1.0"
4 | authors = ['Trust Computing GmbH ']
5 | edition.workspace = true
6 |
7 | [dependencies]
8 | async-trait = { workspace = true }
9 | mockall = { workspace = true }
10 | solana-client = { workspace = true }
11 | solana-sdk = { workspace = true }
12 | spl-associated-token-account = { workspace = true }
13 | spl-token = { workspace = true }
14 | tokio = { workspace = true }
15 | tracing = { workspace = true }
16 |
17 | # Local dependencies
18 | executor-core = { workspace = true }
19 | pumpx = { workspace = true }
20 | signer-client = { workspace = true }
21 |
22 | [lints]
23 | workspace = true
24 |
25 | [features]
26 | mocks = []
27 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/ts-tests/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "es5",
3 | "singleQuote": true,
4 | "printWidth": 120,
5 | "tabWidth": 4,
6 | "semi": true
7 | }
8 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/ts-tests/integration-tests/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "declaration": true,
7 | "strict": true,
8 | "skipLibCheck": true,
9 | "esModuleInterop": true,
10 | "allowSyntheticDefaultImports": true,
11 | "resolveJsonModule": true,
12 | "baseUrl": "."
13 | },
14 | "ts-node": {
15 | "esm": true,
16 | "experimentalResolver": true,
17 | "experimentalSpecifierResolution": "node",
18 | "transpileOnly": true
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/ts-tests/integration-tests/utils/crypto.ts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/litentry/heima/8c624b5e8ed06c1b3affac13e44cc3860bdcf9b5/tee-worker/omni-executor/ts-tests/integration-tests/utils/crypto.ts
--------------------------------------------------------------------------------
/tee-worker/omni-executor/ts-tests/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module",
3 | "scripts": {
4 | "clean": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +"
5 | },
6 | "license": "ISC",
7 | "packageManager": "pnpm@10.2.1+sha512.398035c7bd696d0ba0b10a688ed558285329d27ea994804a52bad9167d8e3a72bcb993f9699585d3ca25779ac64949ef422757a6c31102c12ab932e5cbe5cc92",
8 | "pnpm": {
9 | "overrides": {
10 | "base-x": "4.0.1",
11 | "ws": "^8.18.2",
12 | "@types/ws": "^8.5.9"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/tee-worker/omni-executor/ts-tests/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - integration-tests
3 |
--------------------------------------------------------------------------------
/tee-worker/rust-toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | channel = "nightly-2022-10-22"
3 | targets = ["wasm32-unknown-unknown"]
4 | profile = "default" # include rustfmt, clippy
5 |
--------------------------------------------------------------------------------
/tee-worker/rustfmt.toml:
--------------------------------------------------------------------------------
1 | hard_tabs = true
2 | max_width = 100
3 | use_small_heuristics = "Max"
4 | reorder_imports = true
5 | newline_style = "Unix"
6 | chain_width = 80
7 | match_arm_leading_pipes = "Preserve"
8 | match_block_trailing_comma = true
9 | use_field_init_shorthand = true
--------------------------------------------------------------------------------