diff --git a/.github/workflows/tagBasedImageBuild.yml b/.github/workflows/tagBasedImageBuild.yml index 36c442be4..8bb59c356 100644 --- a/.github/workflows/tagBasedImageBuild.yml +++ b/.github/workflows/tagBasedImageBuild.yml @@ -28,4 +28,6 @@ jobs: target: prod platforms: linux/amd64,linux/arm64 push: true - tags: thirdweb/engine:${{ github.ref_name }} # Set the docker tag to the Git tag name + tags: | + thirdweb/engine:${{ github.ref_name }} + thirdweb/engine:latest diff --git a/docs/1-user-guide.md b/docs/1-user-guide.md index 806289058..d84072648 100644 --- a/docs/1-user-guide.md +++ b/docs/1-user-guide.md @@ -46,7 +46,7 @@ Web3-api enables you to create and use backend wallets. To get started create yo Backend wallets are used by the web3-api to execute transactions, you should think of these as owned by the developer who's running the server. -1.POST /create/wallet +1.POST /backend-wallet/create `{ "walletType": "aws-kms | gcp-kms | local" }` diff --git a/docs/guides/deployment/zeet-deployment.md b/docs/guides/deployment/zeet-deployment.md index 0b1ffb873..50fc1e954 100644 --- a/docs/guides/deployment/zeet-deployment.md +++ b/docs/guides/deployment/zeet-deployment.md @@ -23,4 +23,4 @@ THIRDWEB_API_SECRET_KEY - Add a Project Name 11. Click on `Deploy` button -12. Once the deployment is complete, you can click on the URL given by zeet to access the API & Swagger UI +12. Once the deployment is complete, you can click on the URL given by zeet to check if Engine is running. diff --git a/docs/kms/aws_kms_how_to.md b/docs/kms/aws_kms_how_to.md index f38552d45..22564a16e 100644 --- a/docs/kms/aws_kms_how_to.md +++ b/docs/kms/aws_kms_how_to.md @@ -15,7 +15,7 @@ kms:CreateAlias kms:Verify ``` -3. Create an AWS KMS key, see [here](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html) for more details. or, you can use the `/wallet/create` to create a key. +3. Create an AWS KMS key, see [here](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html) for more details. or, you can use the `/backend-wallet/create` to create a key. NOTE: @@ -27,17 +27,13 @@ Key Spec: ECC_SECG_P256K1 Key Usage: Sign and verify ``` -Once you create the key above, you can use `/wallet/add` and send details on the end-point to create the wallet - ### Set up Web3-API with AWS KMS If you are on the `latest` or `nightly` version of Web3-API, then you can use the below steps to set up AWS KMS: 1. Make sure your Engine is running with the environment variables setup, see [here](../1-user-guide.md) for more details. 2. Open `http://localhost:3005` in your browser to see the Swagger UI. -3. Copy the `THIRDWEB_API_SECRET_KEY` and use it in the `Authorization` header. On Swagger UI click on `Authorize` on top-righ corner and paste the `THIRDWEB_API_SECRET_KEY` in the `value` field and click `Authorize`. -4. Open `Configurations Tab` -5. Click on `POST /configuration/wallets` and paste the below body: +3. Open `Configurations Tab` and use the AWS Access Key ID, AWS Access Secret Key & AWS Region to setup AWS KMS. ```js { @@ -48,11 +44,11 @@ If you are on the `latest` or `nightly` version of Web3-API, then you can use th } ``` -6. Click `execute` & the AWS KMS Config will be added to Engine. +4. Click `create` & the AWS KMS Config will be added to Engine. Now you can Create or Import AWS KMS Wallets using the `/backend-wallet/create` or `/backend-wallet/import` endpoints. -For Engine Version below `v0.0.3`, use the below: +#### For Engine Version below `v0.0.3`, use the below: Create a `.env` file in the root directory of the project and add the below details. diff --git a/docs/kms/google_kms_how_to.md b/docs/kms/google_kms_how_to.md index 63aeea3d3..00425ce7b 100644 --- a/docs/kms/google_kms_how_to.md +++ b/docs/kms/google_kms_how_to.md @@ -17,21 +17,18 @@ Cloud KMS CryptoKey Signer/Verifier 5. Click `Add Key` -> Create new Key -> select `JSON` & download the JSON file. This JSON file details will be used to authenticate google auth while using Google Cloud KMS. 6. Create a keyring in Google KMS, see [here](https://cloud.google.com/kms/docs/create-key-ring) for more details. -Optional: Create a key in the keyring, see [here](https://cloud.google.com/kms/docs/create-key) for more details. or, you can use the `/wallet/create` to create a key in the keyring. +Optional: Create a key in the keyring, see [here](https://cloud.google.com/kms/docs/create-key) for more details. or, you can use the `/backend-wallet/create` to create a key in the keyring. ### Set up with Google KMS If you are on the `latest` or `nightly` version of Web3-API, then you can use the below steps to set up AWS KMS: 1. Make sure your Engine is running with the environment variables setup, see [here](../1-user-guide.md) for more details. -2. Open `http://localhost:3005` in your browser to see the Swagger UI. -3. Copy the `THIRDWEB_API_SECRET_KEY` and use it in the `Authorization` header. On Swagger UI click on `Authorize` on top-righ corner and paste the `THIRDWEB_API_SECRET_KEY` in the `value` field and click `Authorize`. -4. Open `Configurations Tab` -5. Click on `POST /configuration/wallets` and paste the below body: +2. Open [thirdweb Engine Dashboard](https://thirdweb.com/dashboard/engine) and add your local Engine URL `https://localhost:3005` +3. Open `Configurations Tab` and use the details from the JSON file downloaded to setup GCP KMS. ```js { - "type": "gcp-kms", "gcpApplicationProjectId": "", "gcpKmsLocationId": "", "gcpKmsKeyRingId": "", @@ -40,10 +37,12 @@ If you are on the `latest` or `nightly` version of Web3-API, then you can use th } ``` -6. Click `execute` & the GCP KMS Config will be added to Engine. +4. Click `create` & the GCP KMS Config will be added to Engine. Now you can Create or Import GCP KMS Wallets using the `/backend-wallet/create` or `/backend-wallet/import` endpoints. +#### For Engine Version below `v0.0.3`, use the below: + Create a `.env` file in the root directory of the project and add the below details. ```