Skip to content

NearDeFi/shade-agent-framework

Repository files navigation

shade-agent-framework

Warning

This technology has not yet undergone a formal audit. Please conduct your own due diligence and exercise caution before integrating or relying on it in production environments

The Shade Agent Framework is built to enable verifiable and trust minimized Web3 agents that can sign transactions across most chains. At the core the framework is the verification of trusted execution environments (TEE) in NEAR Protocol smart contracts and the usage of smart contract transaction singing via chain signatures. Guardrails can be implemented at the smart contract level to stop the execution of unauthorized actions even if the TEE is compromised.

This monorepo contains all the tooling for the Shade Agent Framework. It contains:


Installation

shade-agent-js

npm i @neardefi/shade-agent-js

shade-agent-cli

npm i -g @neardefi/shade-agent-cli

shade-attestation

cargo add shade-attestation

Testing

  • Before testing, install dependencies and build libraries

    In the shade-agent-framework root

    cd shade-agent-cli
    npm i
    cd ../shade-agent-js
    npm i
    npm run build
    cd ../tests-in-tee
    npm i
    cd test-image
    npm i
    cd ../..
  • Build the contract

    In the shade-agent-framework root

    Linux

    cd shade-contract-template
    cargo near build non-reproducible-wasm --no-abi

    Mac

    docker run --rm \
    -v "$(pwd)":/workspace \
    -w "/workspace/shade-contract-template" \
    pivortex/near-builder@sha256:cdffded38c6cff93a046171269268f99d517237fac800f58e5ad1bcd8d6e2418 \
    cargo near build non-reproducible-wasm --no-abi
  • Fill out environment variables

    Inside ./tests-in-tee fill out an env file

    TESTNET_ACCOUNT_ID=
    TESTNET_PRIVATE_KEY=
    SPONSOR_ACCOUNT_ID=
    SPONSOR_PRIVATE_KEY=
    PHALA_API_KEY=

    TESTNET and SPONSOR can be the same; make sure the account has at least 20 testnet NEAR.

  • Run all tests

    In the shade-agent-framework root

    cd shade-agent-js
    npm run test
    cd ../tests-in-tee
    npm run test
    cd ../shade-contract-template
    cargo test
    cd ..

About

No description, website, or topics provided.

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.txt
Unknown
LICENSE-THIRD-PARTY.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published