diff --git a/.github/workflows/copy-workflow.yml b/.github/workflows/copy-workflow.yml new file mode 100644 index 000000000..3c9e7a066 --- /dev/null +++ b/.github/workflows/copy-workflow.yml @@ -0,0 +1,74 @@ +name: Crowdin Copy and Create PR + +on: + workflow_dispatch: + # push: + # paths: [ 'docs/**', 'platforms/**','i18n/en/**', 'src/pages/**', 'meeting-notes/**' ] + # branches: [ main ] + +permissions: + contents: write + pull-requests: write + +jobs: + crowdin_copy_and_pr: + runs-on: ubuntu-latest + + steps: + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: main + + - name: Merge latest changes from origin/main + run: | + git fetch origin + git checkout main + git merge origin/main + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: yarn install + + - name: Run crowdin:fix + run: yarn run crowdin:fix + + - name: Configure Git + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + + - name: Check for changes + id: changes + run: | + if git diff --quiet; then + echo "changes=false" >> $GITHUB_OUTPUT + else + echo "changes=true" >> $GITHUB_OUTPUT + fi + + - name: Create and push changes to branch + if: steps.changes.outputs.changes == 'true' + run: | + BRANCH_NAME="crowdin-copy-changes" + git push origin --delete $BRANCH_NAME || true + git checkout -b $BRANCH_NAME + git add . + git commit -m "chore: Copy ignored files using crowdin:fix" + git push --force --set-upstream origin $BRANCH_NAME + echo "branch_name=$BRANCH_NAME" >> $GITHUB_ENV + + - name: Install GitHub CLI + if: steps.changes.outputs.changes == 'true' + run: sudo apt-get install -y gh + + - name: Create Pull Request + if: steps.changes.outputs.changes == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr create --repo ${{ github.repository }} --base main --head ${{ env.branch_name }} --title "Copy ignored files using crowdin:fix" --body "This PR was created by GitHub Actions to copy ignored files using the crowdin:fix command." diff --git a/.github/workflows/download-workflow.yml b/.github/workflows/download-workflow.yml new file mode 100644 index 000000000..efd3b9258 --- /dev/null +++ b/.github/workflows/download-workflow.yml @@ -0,0 +1,37 @@ +name: Crowdin Download Action + +on: + workflow_dispatch: + ### Schedule currently disabled ### + # schedule: + # - cron: '0 9 * * *' + # - cron: '0 13 * * *' + # - cron: '0 17 * * *' + +permissions: + contents: write + pull-requests: write + +jobs: + crowdin: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Synchronize with Crowdin + uses: crowdin/github-action@v2 + with: + upload_sources: false + upload_translations: false + download_translations: true + localization_branch_name: l10n_crowdin_translations + + create_pull_request: true + pull_request_title: 'New Crowdin translations' + pull_request_body: 'New Crowdin pull request with translations' + pull_request_base_branch_name: 'main' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: '669532' + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae8c7e361..a9c1bde9c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,6 @@ jobs: run: yarn check:mdx - name: Build app - run: yarn build + run: yarn build --locale en diff --git a/.github/workflows/upload-workflow.yml b/.github/workflows/upload-workflow.yml new file mode 100644 index 000000000..324f856b7 --- /dev/null +++ b/.github/workflows/upload-workflow.yml @@ -0,0 +1,36 @@ +name: Crowdin Upload + +on: + workflow_dispatch: + # push: + # branches: [ main ] + +jobs: + crowdin-upload: + runs-on: ubuntu-latest + steps: + - name: Checkout Docs Repo + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + cache-dependency-path: '**/yarn.lock' + + - name: Install Dependencies + run: yarn --prefer-offline + + - name: Write Translations + run: yarn write-translations + + - name: Crowdin push + uses: crowdin/github-action@v2 + with: + upload_sources: true + upload_translations: false + download_translations: false + env: + CROWDIN_PROJECT_ID: '669532' + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/.gitignore b/.gitignore index f67daafa2..7007950ad 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,9 @@ yarn-error.log* # non-production openrpc.json files /openrpc/*openrpc.json +# Environment variables +.env + +# translation files +i18n stellar-cli-repo diff --git a/Dockerfile b/Dockerfile index f1c720cef..ab31dfa0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,11 +15,20 @@ RUN apt-get update && apt-get install --no-install-recommends -y gpg curl git ma apt-get update && apt-get install -y nodejs yarn && apt-get clean COPY . /app/ +ARG CROWDIN_PERSONAL_TOKEN +ARG BUILD_TRANSLATIONS="False" RUN yarn install RUN yarn rpcspec:build RUN yarn stellar-cli:build -RUN NODE_OPTIONS="--max-old-space-size=4096" yarn build + +ENV NODE_OPTIONS="--max-old-space-size=4096" +RUN if [ "$BUILD_TRANSLATIONS" = "True" ]; then \ + CROWDIN_PERSONAL_TOKEN=${CROWDIN_PERSONAL_TOKEN} yarn build:production; \ + else \ + # In the preview build, we only want to build for English. Much quicker + yarn build; \ + fi FROM nginx:1.27 diff --git a/Makefile b/Makefile index 0b53a9434..5f6e07272 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,11 @@ LABEL ?= $(shell git rev-parse --short HEAD)$(and $(shell git status -s),-dirty- TAG ?= stellar/stellar-docs:$(LABEL) # https://github.com/opencontainers/image-spec/blob/master/annotations.md BUILD_DATE := $(shell date -u +%FT%TZ) +# If we're not in production, don't build translations +BUILD_TRANSLATIONS ?= "False" docker-build: - $(SUDO) docker build --no-cache --pull --label org.opencontainers.image.created="$(BUILD_DATE)" -t $(TAG) . + $(SUDO) docker build --no-cache --pull --label org.opencontainers.image.created="$(BUILD_DATE)" -t $(TAG) . --build-arg CROWDIN_PERSONAL_TOKEN=${CROWDIN_PERSONAL_TOKEN} --build-arg BUILD_TRANSLATIONS=${BUILD_TRANSLATIONS} docker-push: $(SUDO) docker push $(TAG) diff --git a/ap_versioned_docs/version-2.10/admin-guide/events/getting-started.mdx b/ap_versioned_docs/version-2.10/admin-guide/events/getting-started.mdx index 229bbc799..7547bbf70 100644 --- a/ap_versioned_docs/version-2.10/admin-guide/events/getting-started.mdx +++ b/ap_versioned_docs/version-2.10/admin-guide/events/getting-started.mdx @@ -11,7 +11,7 @@ Anchor Platform provides an event service that sends HTTP webhook notifications - Quote updates - Customer KYC status changes -Event schemas for business servers are defined in the [API reference](/platforms/anchor-platform/next/api-reference/callbacks/post-event). +Event schemas for business servers are defined in the [API reference](../../api-reference/callbacks/post-event.api.mdx). **Client Applications** @@ -25,4 +25,4 @@ _Event schemas for client applications are defined in their respective SEPs:_ - [SEP-24 Transaction Events](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md#single-historical-transaction) - [SEP-31 Transaction Events](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0031.md#get-transaction) -This eliminates the need for business servers and client applications to continuously poll the APIs for updates. \ No newline at end of file +This eliminates the need for business servers and client applications to continuously poll the APIs for updates. diff --git a/ap_versioned_docs/version-2.10/admin-guide/sep24/integration.mdx b/ap_versioned_docs/version-2.10/admin-guide/sep24/integration.mdx index 865922840..ce7fd2d73 100644 --- a/ap_versioned_docs/version-2.10/admin-guide/sep24/integration.mdx +++ b/ap_versioned_docs/version-2.10/admin-guide/sep24/integration.mdx @@ -1016,6 +1016,6 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-9]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md [sep-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md -[event-handling]: /ap_versioned_docs/version-2.10/admin-guide/events/README.mdx -[rate-callback]: /ap_versioned_docs/version-2.10/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [json-rpc-methods]: ../../api-reference/platform/rpc/methods/README.mdx diff --git a/ap_versioned_docs/version-2.10/admin-guide/sep6/integration.mdx b/ap_versioned_docs/version-2.10/admin-guide/sep6/integration.mdx index 87a6919b9..98a4c3916 100644 --- a/ap_versioned_docs/version-2.10/admin-guide/sep6/integration.mdx +++ b/ap_versioned_docs/version-2.10/admin-guide/sep6/integration.mdx @@ -985,7 +985,7 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-6]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0006.md -[event-handling]: /ap_versioned_docs/version-2.10/admin-guide/events/README.mdx -[customer-callback]: /ap_versioned_docs/version-2.10/api-reference/callbacks/README.mdx -[rate-callback]: /ap_versioned_docs/version-2.10/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[customer-callback]: ../../api-reference/callbacks/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [get-transactions]: ../../api-reference/platform/transactions/get-transactions.api.mdx diff --git a/ap_versioned_docs/version-2.11/admin-guide/events/getting-started.mdx b/ap_versioned_docs/version-2.11/admin-guide/events/getting-started.mdx index 5001c7931..7547bbf70 100644 --- a/ap_versioned_docs/version-2.11/admin-guide/events/getting-started.mdx +++ b/ap_versioned_docs/version-2.11/admin-guide/events/getting-started.mdx @@ -11,7 +11,7 @@ Anchor Platform provides an event service that sends HTTP webhook notifications - Quote updates - Customer KYC status changes -Event schemas for business servers are defined in the [API reference](/platforms/anchor-platform/next/api-reference/callbacks/post-event). +Event schemas for business servers are defined in the [API reference](../../api-reference/callbacks/post-event.api.mdx). **Client Applications** diff --git a/ap_versioned_docs/version-2.11/admin-guide/sep24/integration.mdx b/ap_versioned_docs/version-2.11/admin-guide/sep24/integration.mdx index bb3a9f759..ce7fd2d73 100644 --- a/ap_versioned_docs/version-2.11/admin-guide/sep24/integration.mdx +++ b/ap_versioned_docs/version-2.11/admin-guide/sep24/integration.mdx @@ -1016,6 +1016,6 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-9]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md [sep-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md -[event-handling]: /ap_versioned_docs/version-2.11/admin-guide/events/README.mdx -[rate-callback]: /ap_versioned_docs/version-2.11/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [json-rpc-methods]: ../../api-reference/platform/rpc/methods/README.mdx diff --git a/ap_versioned_docs/version-2.11/admin-guide/sep6/integration.mdx b/ap_versioned_docs/version-2.11/admin-guide/sep6/integration.mdx index 5b4d53d58..98a4c3916 100644 --- a/ap_versioned_docs/version-2.11/admin-guide/sep6/integration.mdx +++ b/ap_versioned_docs/version-2.11/admin-guide/sep6/integration.mdx @@ -985,7 +985,7 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-6]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0006.md -[event-handling]: /ap_versioned_docs/version-2.11/admin-guide/events/README.mdx -[customer-callback]: /ap_versioned_docs/version-2.11/api-reference/callbacks/README.mdx -[rate-callback]: /ap_versioned_docs/version-2.11/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[customer-callback]: ../../api-reference/callbacks/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [get-transactions]: ../../api-reference/platform/transactions/get-transactions.api.mdx diff --git a/ap_versioned_docs/version-2.8/admin-guide/events/getting-started.mdx b/ap_versioned_docs/version-2.8/admin-guide/events/getting-started.mdx index bd98c3d65..7547bbf70 100644 --- a/ap_versioned_docs/version-2.8/admin-guide/events/getting-started.mdx +++ b/ap_versioned_docs/version-2.8/admin-guide/events/getting-started.mdx @@ -11,7 +11,7 @@ Anchor Platform provides an event service that sends HTTP webhook notifications - Quote updates - Customer KYC status changes -Event schemas for business servers are defined in the [API reference](/ap_versioned_docs/version-2.8/api-reference/callbacks/post-event.api.mdx). +Event schemas for business servers are defined in the [API reference](../../api-reference/callbacks/post-event.api.mdx). **Client Applications** @@ -25,4 +25,4 @@ _Event schemas for client applications are defined in their respective SEPs:_ - [SEP-24 Transaction Events](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md#single-historical-transaction) - [SEP-31 Transaction Events](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0031.md#get-transaction) -This eliminates the need for business servers and client applications to continuously poll the APIs for updates. \ No newline at end of file +This eliminates the need for business servers and client applications to continuously poll the APIs for updates. diff --git a/ap_versioned_docs/version-2.8/admin-guide/sep24/integration.mdx b/ap_versioned_docs/version-2.8/admin-guide/sep24/integration.mdx index 099bd817d..ce7fd2d73 100644 --- a/ap_versioned_docs/version-2.8/admin-guide/sep24/integration.mdx +++ b/ap_versioned_docs/version-2.8/admin-guide/sep24/integration.mdx @@ -1016,6 +1016,6 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-9]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md [sep-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md -[event-handling]: /ap_versioned_docs/version-2.8/admin-guide/events/README.mdx -[rate-callback]: /ap_versioned_docs/version-2.8/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [json-rpc-methods]: ../../api-reference/platform/rpc/methods/README.mdx diff --git a/ap_versioned_docs/version-2.8/admin-guide/sep6/integration.mdx b/ap_versioned_docs/version-2.8/admin-guide/sep6/integration.mdx index 7e19260cc..5beb354bf 100644 --- a/ap_versioned_docs/version-2.8/admin-guide/sep6/integration.mdx +++ b/ap_versioned_docs/version-2.8/admin-guide/sep6/integration.mdx @@ -981,7 +981,7 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-6]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0006.md -[event-handling]: /ap_versioned_docs/version-2.8/admin-guide/events/README.mdx -[customer-callback]: /ap_versioned_docs/version-2.8/api-reference/callbacks/README.mdx -[rate-callback]: /ap_versioned_docs/version-2.8/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[customer-callback]: ../../api-reference/callbacks/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [get-transactions]: ../../api-reference/platform/transactions/get-transactions.api.mdx diff --git a/ap_versioned_docs/version-2.9/admin-guide/events/getting-started.mdx b/ap_versioned_docs/version-2.9/admin-guide/events/getting-started.mdx index 229bbc799..7547bbf70 100644 --- a/ap_versioned_docs/version-2.9/admin-guide/events/getting-started.mdx +++ b/ap_versioned_docs/version-2.9/admin-guide/events/getting-started.mdx @@ -11,7 +11,7 @@ Anchor Platform provides an event service that sends HTTP webhook notifications - Quote updates - Customer KYC status changes -Event schemas for business servers are defined in the [API reference](/platforms/anchor-platform/next/api-reference/callbacks/post-event). +Event schemas for business servers are defined in the [API reference](../../api-reference/callbacks/post-event.api.mdx). **Client Applications** @@ -25,4 +25,4 @@ _Event schemas for client applications are defined in their respective SEPs:_ - [SEP-24 Transaction Events](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md#single-historical-transaction) - [SEP-31 Transaction Events](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0031.md#get-transaction) -This eliminates the need for business servers and client applications to continuously poll the APIs for updates. \ No newline at end of file +This eliminates the need for business servers and client applications to continuously poll the APIs for updates. diff --git a/ap_versioned_docs/version-2.9/admin-guide/sep24/integration.mdx b/ap_versioned_docs/version-2.9/admin-guide/sep24/integration.mdx index f07b332a6..ce7fd2d73 100644 --- a/ap_versioned_docs/version-2.9/admin-guide/sep24/integration.mdx +++ b/ap_versioned_docs/version-2.9/admin-guide/sep24/integration.mdx @@ -1016,6 +1016,6 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-9]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md [sep-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md -[event-handling]: /ap_versioned_docs/version-2.9/admin-guide/events/README.mdx -[rate-callback]: /ap_versioned_docs/version-2.9/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [json-rpc-methods]: ../../api-reference/platform/rpc/methods/README.mdx diff --git a/ap_versioned_docs/version-2.9/admin-guide/sep6/integration.mdx b/ap_versioned_docs/version-2.9/admin-guide/sep6/integration.mdx index c1836b071..98a4c3916 100644 --- a/ap_versioned_docs/version-2.9/admin-guide/sep6/integration.mdx +++ b/ap_versioned_docs/version-2.9/admin-guide/sep6/integration.mdx @@ -985,7 +985,7 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-6]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0006.md -[event-handling]: /ap_versioned_docs/version-2.9/admin-guide/events/README.mdx -[customer-callback]: /ap_versioned_docs/version-2.9/api-reference/callbacks/README.mdx -[rate-callback]: /ap_versioned_docs/version-2.9/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[customer-callback]: ../../api-reference/callbacks/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [get-transactions]: ../../api-reference/platform/transactions/get-transactions.api.mdx diff --git a/ap_versioned_docs/version-3.0.0/admin-guide/events/getting-started.mdx b/ap_versioned_docs/version-3.0.0/admin-guide/events/getting-started.mdx index 5001c7931..7547bbf70 100644 --- a/ap_versioned_docs/version-3.0.0/admin-guide/events/getting-started.mdx +++ b/ap_versioned_docs/version-3.0.0/admin-guide/events/getting-started.mdx @@ -11,7 +11,7 @@ Anchor Platform provides an event service that sends HTTP webhook notifications - Quote updates - Customer KYC status changes -Event schemas for business servers are defined in the [API reference](/platforms/anchor-platform/next/api-reference/callbacks/post-event). +Event schemas for business servers are defined in the [API reference](../../api-reference/callbacks/post-event.api.mdx). **Client Applications** diff --git a/ap_versioned_docs/version-3.0.0/admin-guide/sep24/integration.mdx b/ap_versioned_docs/version-3.0.0/admin-guide/sep24/integration.mdx index 4fae1b17e..6caf77d25 100644 --- a/ap_versioned_docs/version-3.0.0/admin-guide/sep24/integration.mdx +++ b/ap_versioned_docs/version-3.0.0/admin-guide/sep24/integration.mdx @@ -1016,6 +1016,6 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-9]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md [sep-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md -[event-handling]: /platforms/anchor-platform/admin-guide/events/README.mdx -[rate-callback]: /platforms/anchor-platform/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [json-rpc-methods]: ../../api-reference/platform/rpc/methods/README.mdx diff --git a/ap_versioned_docs/version-3.0.0/admin-guide/sep6/integration.mdx b/ap_versioned_docs/version-3.0.0/admin-guide/sep6/integration.mdx index 7627af2e8..179218144 100644 --- a/ap_versioned_docs/version-3.0.0/admin-guide/sep6/integration.mdx +++ b/ap_versioned_docs/version-3.0.0/admin-guide/sep6/integration.mdx @@ -985,7 +985,7 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-6]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0006.md -[event-handling]: /platforms/anchor-platform/admin-guide/events/README.mdx -[customer-callback]: /platforms/anchor-platform/api-reference/callbacks/README.mdx -[rate-callback]: /platforms/anchor-platform/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[customer-callback]: ../../api-reference/callbacks/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [get-transactions]: ../../api-reference/platform/transactions/get-transactions.api.mdx diff --git a/config/anchorPlatform.config.ts b/config/anchorPlatform.config.ts index 687ae7165..65b926724 100644 --- a/config/anchorPlatform.config.ts +++ b/config/anchorPlatform.config.ts @@ -1,5 +1,7 @@ import type { PluginConfig } from '@docusaurus/types'; import versions from '../ap_versions.json' +import { makeEditUrl } from './constants'; + import type * as Plugin from '@docusaurus/types/src/plugin'; import type * as OpenApiPlugin from 'docusaurus-plugin-openapi-docs'; import type { APIVersionOptions } from 'docusaurus-plugin-openapi-docs/src/types'; @@ -54,7 +56,7 @@ export const anchorPlatformPluginInstances: PluginConfig[] = [ routeBasePath: "/platforms/anchor-platform", docItemComponent: "@theme/ApiItem", sidebarPath: "config/anchorPlatform.sidebar.ts", - editUrl: "https://github.com/stellar/stellar-docs/tree/main", + editUrl: makeEditUrl, exclude: ['**/component/**', '**/README.md'], showLastUpdateTime: true, showLastUpdateAuthor: true, diff --git a/config/constants.ts b/config/constants.ts new file mode 100644 index 000000000..abe262522 --- /dev/null +++ b/config/constants.ts @@ -0,0 +1,11 @@ +export const DEFAULT_LOCALE: string = 'en'; +export const LOCALE_FULL_CODE: Record = { + es: 'es-ES', +}; + +export const makeEditUrl = ({ locale, versionDocsDirPath, docPath }) => { + if (locale !== DEFAULT_LOCALE) { + return `https://crowdin.com/project/stellar-dev-docs/${LOCALE_FULL_CODE[locale]}` + } + return `https://github.com/stellar/stellar-docs/edit/main/${versionDocsDirPath}/${docPath}` +}; diff --git a/config/disbursementPlatform.config.ts b/config/disbursementPlatform.config.ts index 328aff5c5..6e729bc0d 100644 --- a/config/disbursementPlatform.config.ts +++ b/config/disbursementPlatform.config.ts @@ -1,3 +1,5 @@ +import { makeEditUrl } from './constants'; + import type { PluginConfig } from '@docusaurus/types'; import type * as Plugin from '@docusaurus/types/src/plugin'; import type * as OpenApiPlugin from 'docusaurus-plugin-openapi-docs'; @@ -29,7 +31,7 @@ export const disbursementPlatformPluginInstances: PluginConfig[] = [ routeBasePath: "/platforms/stellar-disbursement-platform", docItemComponent: "@theme/ApiItem", sidebarPath: "config/disbursementPlatform.sidebar.ts", - editUrl: "https://github.com/stellar/stellar-docs/tree/main", + editUrl: makeEditUrl, exclude: ['**/component/**', '**/README.md'], showLastUpdateTime: true, showLastUpdateAuthor: true, diff --git a/crowdin.yaml b/crowdin.yaml new file mode 100644 index 000000000..66881ff93 --- /dev/null +++ b/crowdin.yaml @@ -0,0 +1,37 @@ +# Crowdin credentials +project_id: '669532' +api_token_env: CROWDIN_PERSONAL_TOKEN + +# Choose file structure in Crowdin +# e.g. true or false +preserve_hierarchy: true + +# Files configuration +files: + # JSON translation files + - source: /i18n/en/**/* + translation: /i18n/%two_letters_code%/**/%original_file_name% + # Docs Markdown files + - source: /docs/**/* + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name% + ignore : ['**/*.api.mdx', '**/*.info.mdx', '**/*.tag.mdx', '**/*.schema.mdx', '**/*.json'] + # Stellar Disbursement Platform Docs Markdown files + - source: /platforms/stellar-disbursement-platform/**/* + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs-sdp/current/**/%original_file_name% + ignore : ['**/*.api.mdx', '**/*.info.mdx', '**/*.tag.mdx', '**/*.schema.mdx', '**/*.json'] + # Anchor Platform Docs Markdown files + - source: /platforms/anchor-platform/**/* + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs-ap/current/**/%original_file_name% + ignore : ['**/*.api.mdx', '**/*.info.mdx', '**/*.tag.mdx', '**/*.schema.mdx', '**/*.json'] + # Anchor Platform versioned docs + - source: /ap_versioned_docs/**/* + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs-ap/**/%original_file_name% + ignore : ['**/*.api.mdx', '**/*.info.mdx', '**/*.tag.mdx', '**/*.schema.mdx', '**/*.json'] + # Meeting Notes Blog Markdown files + - source: /meeting-notes/**/* + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-blog/**/%original_file_name% + # Pages Markdown files + - source: /src/pages/**/* + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-pages/**/%original_file_name% + ignore: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '**/*.css'] + type: 'mdx_v2' diff --git a/docs/README.mdx b/docs/README.mdx index c1de1d70a..5444a4dda 100644 --- a/docs/README.mdx +++ b/docs/README.mdx @@ -6,30 +6,30 @@ hide_table_of_contents: true ## Navigating the docs -### [Build](/docs/build/README.mdx) +### [Build](./build/README.mdx) Contains tutorials and how-to guides for writing smart contracts, building applications, interacting with the network, and more. -### [Learn](/docs/learn/fundamentals/README.mdx) +### [Learn](./learn/fundamentals/README.mdx) Find all informational and conceptual content here. Learn about Stellar fundamentals like how accounts and transactions function, dive deeper into the functionality of each operation, discover how fees work, and more. -### [Tokens](/docs/tokens/README.mdx) +### [Tokens](./tokens/README.mdx) Information on how to issue assets on the Stellar network and create custom smart contract tokens. -### [Data](/docs/data/README.mdx) +### [Data](./data/README.mdx) Discover various data availability options: RPC, Hubble, Horizon, and Galexie. -### [Tools](/docs/tools/README.mdx) +### [Tools](./tools/README.mdx) Learn about all the available tools at your disposal for building on, interacting with, or just watching the Stellar network. Also, find information on how to use the Anchor Platform or Stellar Disbursement Platform. -### [Networks](/docs/networks/README.mdx) +### [Networks](./networks/README.mdx) Information about deployed networks (Mainnet, Testnet, and Futurenet), current software versions, and resource limitations and fees. -### [Validators](/docs/validators/README.mdx) +### [Validators](./validators/README.mdx) Everything you'll need to know if you want to run, operate, and maintain a core validator node on the Stellar network. diff --git a/docs/build/apps/dapp-frontend.mdx b/docs/build/apps/dapp-frontend.mdx index 0f36a8d2f..c48ffd8d4 100644 --- a/docs/build/apps/dapp-frontend.mdx +++ b/docs/build/apps/dapp-frontend.mdx @@ -164,7 +164,7 @@ Let's see it in action! Start the dev server: npm run dev ``` -And open [http://localhost:4321](http://localhost:4321) in your browser. You should see the greeting from the contract! +And open [localhost:4321](http://localhost:4321) in your browser. You should see the greeting from the contract! You can try updating the `{ to: 'Soroban' }` argument. When you save the file, the page will automatically update. diff --git a/docs/build/guides/conversions/address-conversions.mdx b/docs/build/guides/conversions/address-conversions.mdx index 26bc8ff79..82ef7b281 100644 --- a/docs/build/guides/conversions/address-conversions.mdx +++ b/docs/build/guides/conversions/address-conversions.mdx @@ -4,8 +4,7 @@ hide_table_of_contents: true description: Convert an address to other types --- -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; +import { CodeExample } from "@site/src/components/CodeExample"; The `Address` is an opaque type that could represent an "account" on the Stellar network (i.e., a keypair), or a "contract." From Soroban's point of view, it doesn't really matter which it is. The "account" variety of these addresses are typically displayed as a `G...` public address, and the "contract" variety is typically displayed as a `C...` address. An address may also be displayed in other formats such as a 32 byte array, a string, or an ScVal type. The Soroban SDKs provide methods that easily convert an address to any of these types. @@ -13,124 +12,104 @@ The `Address` is an opaque type that could represent an "account" on the Stellar Bytes are a more compact and efficient way to store data in terms of storage optimization and data transmission. In situations where you need to store or transmit an address in a fixed-size, such as for cryptographic operations or data serialization, you need to convert the address to a bytesN format - - - - ```rust - use soroban_sdk::{Address, BytesN, Env, FromVal}; + - pub fn address_to_bytes32(env: &Env, address: Address) -> BytesN<32> { - let address_to_bytes: BytesN<32> = BytesN::from_val(env, &address.to_val()); - address_to_bytes - } - ``` - +```rust +use soroban_sdk::{Address, BytesN, Env, FromVal}; - - ```js - const StellarSdk = require('@stellar/stellar-sdk'); +pub fn address_to_bytes32(env: &Env, address: Address) -> BytesN<32> { +let address_to_bytes: BytesN<32> = BytesN::from_val(env, &address.to_val()); + address_to_bytes +} +``` - // Example Stellar address - const stellarAddress = 'GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN'; - // Create an Address object - const address = new StellarSdk.Address(stellarAddress); - // Convert the Address to raw public key bytes (Buffer) - const buffer = address.toBuffer(); - ``` +```js +const StellarSdk = require("@stellar/stellar-sdk"); - +// Example Stellar address +const stellarAddress = + "GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN"; +// Create an Address object +const address = new StellarSdk.Address(stellarAddress); +// Convert the Address to raw public key bytes (Buffer) +const buffer = address.toBuffer(); +``` - +```python +from stellar_sdk.address import Address +from stellar_sdk.strkey import StrKey - ```python - from stellar_sdk.address import Address - from stellar_sdk.strkey import StrKey +# Example Stellar address +stellar_address = 'GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN' +# Convert the address to bytes +StrKey.decode_ed25519_public_key(stellar_address) +``` - # Example Stellar address - stellar_address = 'GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN' - # Convert the address to bytes - StrKey.decode_ed25519_public_key(stellar_address) - ``` - - - + ## Address to String When transferring data between different systems or over a network, using text-based formats like JSON and XML string formats are often required. Storing addresses as strings in databases can simplify database schema design and queries. Strings are easier to manipulate and are more compatible with user interfaces and APIs. - - - - ```rust - use soroban_sdk::{Address, String, Env}; - - pub fn address_to_string(address: Address) -> String { - address.to_string() - } - ``` - + - +```rust +use soroban_sdk::{Address, String, Env}; - ```js - const StellarSdk = require('@stellar/stellar-sdk'); +pub fn address_to_string(address: Address) -> String { + address.to_string() +} +``` - // Example Stellar address - const stellarAddress = 'GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN'; - // Create an Address object - const address = new StellarSdk.Address(stellarAddress); - // Convert the address to string - const addressToString = address.toString(); - ``` +```js +const StellarSdk = require("@stellar/stellar-sdk"); - +// Example Stellar address +const stellarAddress = + "GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN"; +// Create an Address object +const address = new StellarSdk.Address(stellarAddress); +// Convert the address to string +const addressToString = address.toString(); +``` - + # Address to ScVal Addresses are often passed as function parameters in Soroban smart contracts. These addresses must be in ScVal format because the Soroban virtual machine processes data in this format. Similarly, if a smart contract function returns an address, it will be returned as an ScVal. Converting to and from ScVal ensures that you can properly handle these return values. - - - - ```rust - use soroban_sdk::{Address, Val}; - - pub fn address_to_sc_val(address: Address) -> Val { - address.to_val() - } - ``` - - - - - ```js - // Example Stellar address - const stellarAddress = 'GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN'; - // Create an Address object - const address = new StellarSdk.Address(stellarAddress); - // Convert the Address to xdr.ScVal - const scVal = address.toScVal(); - // Convert the Address to xdr.ScAddress - const scAddress = address.toScAddress(); - ``` - - - - - - ```python - from stellar_sdk.address import Address - - # Example Stellar address - stellar_address = 'GBJCHUKZMTFSLOMNC7P4TS4VJJBTCYL3XKSOLXAUJSD56C4LHND5TWUC' - # Create an Address object - address = Address(stellar_address) - # Convert the Address object to an ScAddress - sc_address_xdr = address.to_xdr_sc_address() - ``` - - - + + +```rust +use soroban_sdk::{Address, Val}; + +pub fn address_to_sc_val(address: Address) -> Val { + address.to_val() +} +``` + +```js +// Example Stellar address +const stellarAddress = + "GCM5WPR4DDR24FSAX5LIEM4J7AI3KOWJYANSXEPKYXCSZOTAYXE75AFN"; +// Create an Address object +const address = new StellarSdk.Address(stellarAddress); +// Convert the Address to xdr.ScVal +const scVal = address.toScVal(); +// Convert the Address to xdr.ScAddress +const scAddress = address.toScAddress(); +``` + +```python +from stellar_sdk.address import Address + +# Example Stellar address +stellar_address = 'GBJCHUKZMTFSLOMNC7P4TS4VJJBTCYL3XKSOLXAUJSD56C4LHND5TWUC' +# Create an Address object +address = Address(stellar_address) +# Convert the Address object to an ScAddress +sc_address_xdr = address.to_xdr_sc_address() +``` + + diff --git a/docs/build/guides/conversions/bytes-conversions.mdx b/docs/build/guides/conversions/bytes-conversions.mdx index 22aea8d54..f04548b7e 100644 --- a/docs/build/guides/conversions/bytes-conversions.mdx +++ b/docs/build/guides/conversions/bytes-conversions.mdx @@ -4,8 +4,7 @@ hide_table_of_contents: true description: Convert from bytes to other types --- -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; +import { CodeExample } from "@site/src/components/CodeExample"; Bytes is a contiguous growable array type containing u8s. They may represent various types of data including strings, addresses, or other information. Converting any data type to bytes ensures that the data be consistently handled by the Soroban runtime and interacting systems. @@ -13,132 +12,112 @@ Bytes is a contiguous growable array type containing u8s. They may represent var When retrieving data stored on the blockchain, addresses might be stored in byte representation for compactness and efficiency. Off-chain systems, such as APIs, databases, or user interfaces, usually expect addresses in a human-readable format. In such cases, you need to convert the bytes to an address format to ensure compatibility. - - - - ```rust - use soroban_sdk::{Address, Bytes, Env}; + - pub fn bytes_to_address(bytes: Bytes) -> Address { - Address::from_string_bytes(&bytes) - } - ``` - +```rust +use soroban_sdk::{Address, Bytes, Env}; - - - ```js - const StellarSdk = require('@stellar/stellar-sdk'); +pub fn bytes_to_address(bytes: Bytes) -> Address { + Address::from_string_bytes(&bytes) +} +``` - // Example bytes value - const rawBytes = Buffer.from('99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe', 'hex'); - // Convert bytes to an account Address - const addressFromBytes = StellarSdk.Address.account(rawBytes); - addressFromBytes.toString(); - // Convert from bytes to a string address - const addressFromBytes = StellarSdk.Address.contract(rawBytes); - addressFromBytes.toString(); - ``` +```js +const StellarSdk = require("@stellar/stellar-sdk"); - +// Example bytes value +const rawBytes = Buffer.from( + "99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe", + "hex", +); +// Convert bytes to an account Address +const addressFromBytes = StellarSdk.Address.account(rawBytes); +addressFromBytes.toString(); +// Convert from bytes to a string address +const addressFromBytes = StellarSdk.Address.contract(rawBytes); +addressFromBytes.toString(); +``` - +```python +from stellar_sdk.address import Address - ```python - from stellar_sdk.address import Address +# Example bytes value +raw_bytes = bytes.fromhex('99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe') +bytes_to_address = Address.from_raw_account(raw_bytes) +``` - # Example bytes value - raw_bytes = bytes.fromhex('99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe') - bytes_to_address = Address.from_raw_account(raw_bytes) - ``` - - - + ## Bytes to String When dealing with binary data, you may need to convert certain portions of the data to a human-readable format like strings for logging, debugging, processing or display. - - - - ```rust - use soroban_sdk::{String, Bytes, Env, FromVal}; - - pub fn bytes_to_string(env: &Env, bytes: Bytes) -> String { - String::from_val(env, &bytes.to_val()) - } - ``` - - - - + - ```js - const StellarSdk = require('@stellar/stellar-sdk'); +```rust +use soroban_sdk::{String, Bytes, Env, FromVal}; - // Example bytes value - const rawBytes = Buffer.from('99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe', 'hex'); - // Convert bytes to string - const bytesToString = rawBytes.toString('hex'); - ``` +pub fn bytes_to_string(env: &Env, bytes: Bytes) -> String { + String::from_val(env, &bytes.to_val()) +} +``` - +```js +const StellarSdk = require("@stellar/stellar-sdk"); - +// Example bytes value +const rawBytes = Buffer.from( + "99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe", + "hex", +); +// Convert bytes to string +const bytesToString = rawBytes.toString("hex"); +``` - ```python - from stellar_sdk.address import Address +```python +from stellar_sdk.address import Address - # Example bytes - raw_bytes = b'99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe' - # Convert bytes to string - bytes_to_string = raw_bytes.decode('utf-8') - ``` - +# Example bytes +raw_bytes = b'99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe' +# Convert bytes to string +bytes_to_string = raw_bytes.decode('utf-8') +``` - + ## Bytes to ScVal In a Soroban smart contract that interacts with an external oracle service to provide price data in raw byte format, you would need to convert the bytes to ScVal to process and manipulate the data within your contract. - - - - ```rust - use soroban_sdk::{Bytes, Env, FromVal, Val}; - - pub fn bytes_to_val(env: &Env, bytes: Bytes) -> Val { - Val::from_val(env, &bytes.to_val()) - } - - ``` - - - + - ```js - const StellarSdk = require('@stellar/stellar-sdk'); +```rust +use soroban_sdk::{Bytes, Env, FromVal, Val}; - // Example bytes value - const rawBytes = Buffer.from('99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe', 'hex'); - // Convert bytes to xdr.ScVal - const bytesToScVal = StellarSdk.xdr.ScVal.scvBytes(rawBytes); - ``` +pub fn bytes_to_val(env: &Env, bytes: Bytes) -> Val { + Val::from_val(env, &bytes.to_val()) +} +``` - +```js +const StellarSdk = require("@stellar/stellar-sdk"); - +// Example bytes value +const rawBytes = Buffer.from( + "99db3e3c18e3ae1640bf56823389f811b53ac9c01b2b91eac5c52cba60c5c9fe", + "hex", +); +// Convert bytes to xdr.ScVal +const bytesToScVal = StellarSdk.xdr.ScVal.scvBytes(rawBytes); +``` - ```python - import stellar_sdk +```python +import stellar_sdk - # Example bytes value - raw_bytes = b'example_bytes_data' - # Convert bytes to ScVal - sc_val = stellar_sdk.scval.to_bytes(raw_bytes) - ``` +# Example bytes value +raw_bytes = b'example_bytes_data' +# Convert bytes to ScVal +sc_val = stellar_sdk.scval.to_bytes(raw_bytes) +``` - - + diff --git a/docs/build/guides/conversions/scval-conversions.mdx b/docs/build/guides/conversions/scval-conversions.mdx index bd61d122f..455945503 100644 --- a/docs/build/guides/conversions/scval-conversions.mdx +++ b/docs/build/guides/conversions/scval-conversions.mdx @@ -12,96 +12,90 @@ Soroban Contract Value (`ScVal`) is a custom type defined within the Soroban run ## ScVal to bytesN - + - ```js - const StellarSdk = require('@stellar/stellar-sdk'); +```js +const StellarSdk = require("@stellar/stellar-sdk"); - // Convert ScVal to bytes - const bytesFromScVal = scVal.bytes(); +/* Convert ScVal to bytes */ +const bytesFromScVal = StellarSdk.scVal.bytes(); +``` - ``` - `.bytes()` converts an ScVal value to bytes. - `scVal` is the ScVal value to be converted to bytes. +- `.bytes()` converts an ScVal value to bytes. +- `scVal` is the ScVal value to be converted to bytes. - + + - +```python +import stellar_sdk - ```python - import stellar_sdk +# Convert ScVal to bytes +sc_val_to_bytes = stellar_sdk.scval.from_bytes(sc_val) +``` - # Convert ScVal to bytes - sc_val_to_bytes = stellar_sdk.scval.from_bytes(sc_val) - - ``` - `stellar_sdk.scval.from_bytes()` converts an ScVal value to bytes. - `sc_val` is the ScVal value to be converted to bytes. - +- `stellar_sdk.scval.from_bytes()` converts an ScVal value to bytes. +- `sc_val` is the ScVal value to be converted to bytes. + ## ScVal to address - - - ```js - const StellarSdk = require('@stellar/stellar-sdk'); + - const addressFromScVal = StellarSdk.Address.fromScVal(scVal); - addressFromScVal.toString(); +```js +const StellarSdk = require("@stellar/stellar-sdk"); - ``` - `StellarSdk.Address.fromScVal()` converts an ScVal value to an address. - `scVal` is the ScVal value to be converted to an address. +const addressFromScVal = StellarSdk.Address.fromScVal(scVal); +addressFromScVal.toString(); +``` - +- `StellarSdk.Address.fromScVal()` converts an ScVal value to an address. +- `scVal` is the ScVal value to be converted to an address. - + + - ```python - import stellar_sdk +```python +import stellar_sdk - sc_to_address = Address.from_xdr_sc_address(sc_val) +sc_to_address = Address.from_xdr_sc_address(sc_val) +``` - ``` - `stellar_sdk.scval.from_xdr_sc_addres9()` converts an ScVal value to an address. - `sc_val` represents the ScVal value to be converted to an address. - - +- `stellar_sdk.scval.from_xdr_sc_addres9()` converts an ScVal value to an address. +- `sc_val` represents the ScVal value to be converted to an address. + ## ScVal to String - - - ```js - const StellarSdk = require('@stellar/stellar-sdk'); + - const stringFromScVal = scVal.toString('utf-8'); +```js +const StellarSdk = require("@stellar/stellar-sdk"); - ``` - `scVal.toString()` converts an ScVal value to a string. - `scVal` is the ScVal value to be converted to a string. - `utf-8` is the encoding format for the string. +const stringFromScVal = scVal.toString("utf-8"); +``` - +`scVal.toString()` converts an ScVal value to a string. `scVal` is the ScVal value to be converted to a string. `utf-8` is the encoding format for the string. - + + - ```python +```python - import stellar_sdk +import stellar_sdk - # scval to string - sc_val_to_string = stellar_sdk.scval.from_string(sc_val) +# scval to string +sc_val_to_string = stellar_sdk.scval.from_string(sc_val) +``` - ``` - `stellar_sdk.scval.from_string()` converts an ScVal value to a string. - `sc_val` represents the ScVal value to be converted to a string. - +- `stellar_sdk.scval.from_string()` converts an ScVal value to a string. +- `sc_val` represents the ScVal value to be converted to a string. + diff --git a/docs/build/guides/conversions/string-conversions.mdx b/docs/build/guides/conversions/string-conversions.mdx index f40ad6277..bbe4f9508 100644 --- a/docs/build/guides/conversions/string-conversions.mdx +++ b/docs/build/guides/conversions/string-conversions.mdx @@ -14,41 +14,41 @@ Strings are a sequence of characters used to represent readable text. They are u Some systems use binary formats where data needs to be represented as a fixed-length byte array for storage or processing. For example, fixed-length hashes or identifiers. Converting strings to a fixed byte size ensures that the data fits the required size constraints. - - - ```rust - use soroban_sdk::{String, BytesN, Env, FromVal}; + - pub fn string_to_bytesN(env: &Env, string: String) -> BytesN<32> { - BytesN::from_val(env, &string.to_val()) - } - ``` - +```rust +use soroban_sdk::{String, BytesN, Env, FromVal}; - +pub fn string_to_bytesN(env: &Env, string: String) -> BytesN<32> { + BytesN::from_val(env, &string.to_val()) +} +``` - ```js - import StellarSdk = require('@stellar/stellar-sdk'); + + - // Example string - const stringValue = 'Hello, Stellar!'; - // Convert the string to bytes format - const byteValue = Buffer.from(stringValue, 'utf-8'); - ``` - +```js +import StellarSdk = require('@stellar/stellar-sdk'); - +// Example string +const stringValue = 'Hello, Stellar!'; +// Convert the string to bytes format +const byteValue = Buffer.from(stringValue, 'utf-8'); +``` - ```python - import stellar_sdk + + - string_value.encode() - ``` - `string_value` is the string value to be converted to bytes. - `.encode()` is a method that converts the string to bytes. +```python +import stellar_sdk - +string_value.encode() +``` +- `string_value` is the string value to be converted to bytes. +- `.encode()` is a method that converts the string to bytes. + + ## String to address @@ -56,29 +56,29 @@ Some systems use binary formats where data needs to be represented as a fixed-le An address received in a user input may be of string type and you would need to convert it to an address type to perform validations, transactions, or other operations within your smart contract. - - - ```rust - use soroban_sdk::{Address, Env, String}; + + +```rust +use soroban_sdk::{Address, Env, String}; - pub fn string_to_address(string: String) -> Address { - Address::from_string(&string) - } - ``` - +pub fn string_to_address(string: String) -> Address { + Address::from_string(&string) +} +``` - + + - ```js - const StellarSdk = require('@stellar/stellar-sdk'); +```js +const StellarSdk = require("@stellar/stellar-sdk"); - const stringToAddress = StellarSdk.Address.fromString(stellarAddress); - ``` - `stellarAddress` is the string value to be converted to an address. - `StellarSdk.Address.fromString()` is a method that converts a string to an address. +const stringToAddress = StellarSdk.Address.fromString(stellarAddress); +``` - +- `stellarAddress` is the string value to be converted to an address. +- `StellarSdk.Address.fromString()` is a method that converts a string to an address. + ## String to ScVal @@ -86,40 +86,39 @@ An address received in a user input may be of string type and you would need to When calling functions or methods that expect ScVal types, you need to convert your string data to ScVal to make the call successful. For example, if your smart contract needs to store or manipulate a user input string within its state or use it as part of its logic, you would convert the string to an ScVal type to integrate it with the contract's operations. - - - ```rust - use soroban_sdk::{String, Env, Val}; + - pub fn string_to_val(env: &Env, string: String) -> Val { - string.to_val() - } - ``` - +```rust +use soroban_sdk::{String, Env, Val}; - +pub fn string_to_val(env: &Env, string: String) -> Val { + string.to_val() +} +``` - ```js - import StellarSdk from '@stellar/stellar-sdk'; + + - // Example string value - const stringValue = 'Hello, Stellar!'; - // Convert the string to ScVal - const stringToScVal = StellarSdk.xdr.ScVal.scvString(stringValue); - ``` +```js +import StellarSdk from "@stellar/stellar-sdk"; - +// Example string value +const stringValue = "Hello, Stellar!"; +// Convert the string to ScVal +const stringToScVal = StellarSdk.xdr.ScVal.scvString(stringValue); +``` - + + - ```python - import stellar_sdk +```python +import stellar_sdk - string_to_sc_val = stellar_sdk.scval.to_string(string_value) - ``` - `string_value` is the string value to be converted to an ScVal - `stellar_sdk.scval.to_string()` converts the string value to an ScVal +string_to_sc_val = stellar_sdk.scval.to_string(string_value) +``` - +- `string_value` is the string value to be converted to an ScVal +- `stellar_sdk.scval.to_string()` converts the string value to an ScVal + diff --git a/docs/build/guides/dapps/frontend-guide.mdx b/docs/build/guides/dapps/frontend-guide.mdx index 401364e59..8dc1601ba 100644 --- a/docs/build/guides/dapps/frontend-guide.mdx +++ b/docs/build/guides/dapps/frontend-guide.mdx @@ -345,11 +345,11 @@ This setup provides a solid foundation for building the user interface of our St Before we start integrating smart contract functionality into our Stellar dapp, let's understand the basic concepts of Soroban contracts. -Soroban is a smart contract platform built on the Stellar network. It allows developers to write and deploy smart contracts that run on the Stellar blockchain. Soroban contracts are written in Rust and compiled to [XDR (External Data Representation)](/docs/learn/encyclopedia/data-format/xdr) for execution on the Stellar network. +Soroban is a smart contract platform built on the Stellar network. It allows developers to write and deploy smart contracts that run on the Stellar blockchain. Soroban contracts are written in Rust and compiled to [XDR (External Data Representation)](../../../learn/encyclopedia/data-format/xdr.mdx) for execution on the Stellar network. ### Data Types -Stellar supports a few data types that can be used in Soroban contracts and we need to do conversions from time to time between those types and the types we have in Javascript. The full list of primitive data types are explained [here](/docs/learn/encyclopedia/contract-development/types/built-in-types). +Stellar supports a few data types that can be used in Soroban contracts and we need to do conversions from time to time between those types and the types we have in Javascript. The full list of primitive data types are explained [here](../../../learn/encyclopedia/contract-development/types/built-in-types.mdx). ### XDR @@ -365,7 +365,7 @@ Calculating these fees can be cumbersome but the Stellar SDK provides a way to c The ABI or spec is a json file that contains the contract's interface. It defines the functions that can be called on the contract, their parameters, and return types. The ABI is used by clients to interact with the contract and execute its functions. The ABI is generated from the contract's source code and is used to compile the contract into XDR for execution on the Stellar network. -ABI can be genrated for a contract using the [`stellar contract bindings`](/docs/tools/developer-tools/cli/stellar-cli#stellar-contract-bindings-json) command and can be used to interact with the contract. +ABI can be genrated for a contract using the [`stellar contract bindings`](../../../tools/developer-tools/cli/stellar-cli.mdx#stellar-contract-bindings-json) command and can be used to interact with the contract. This ABI can also be generated as a typescript library to ease development in your DApp and we'll be looking it later in this guide @@ -725,7 +725,7 @@ Notice how we used a different operation `contract.call("increment")` to interac After calling the transaction to increment successfully, we need to poll and then call another method `server.getTransaction` to get the transaction result. The transaction result contains the new counter value which we extract and display to the user. -The value gotten from the transaction result is stored in a form called `scval` due to the limited [number of types](/docs/learn/encyclopedia/contract-development/types/built-in-types) that exist in soroban today. This value is transmitted about in the form of `xdr` which can be converted to an `scVal` using the sdk. The value is then parsed as `u32` which is a 32-bit unsigned integer. We will learn more about converting these types when [working with contract specs](/docs/build/guides/conventions) +The value gotten from the transaction result is stored in a form called `scval` due to the limited [number of types](../../../learn/encyclopedia/contract-development/types/built-in-types.mdx) that exist in soroban today. This value is transmitted about in the form of `xdr` which can be converted to an `scVal` using the sdk. The value is then parsed as `u32` which is a 32-bit unsigned integer. We will learn more about converting these types [in this collection of guides](../conversions/README.mdx). :::tip @@ -743,7 +743,7 @@ This is made possible by using the `server.getEvents` method which allows you to We will be editing the `CounterPage` component to read events from the counter smart contract immediately the page loads to get the initial counter value and update instead of using "Unknown". Before we continue, please take a look at the [contract code](https://github.com/stellar/soroban-examples/blob/main/events/src/lib.rs). In the contract code, an event named `increment` is emitted whenever the `increment` function is called. It is published over 2 topics, `increment` and `COUNTER` and we need to listen to these topics to get the events. -The topics are stored in a data type called `symbol` and we will need to convert both `increment` and `COUNTER` to `symbol` before we can use them in the [`server.getEvents`](https://developers.stellar.org/docs/data/rpc/api-reference/methods/getEvents) method. At maximum, stellar RPCs keep track of events for 7 days and you can query events that happened within the last 7 days, so if you need to store events for longer, you may need to make use of an [indexer](/docs/data/data-indexers/README.mdx). +The topics are stored in a data type called `symbol` and we will need to convert both `increment` and `COUNTER` to `symbol` before we can use them in the [`server.getEvents`](https://developers.stellar.org/docs/data/rpc/api-reference/methods/getEvents) method. At maximum, stellar RPCs keep track of events for 7 days and you can query events that happened within the last 7 days, so if you need to store events for longer, you may need to make use of an [indexer](../../../data/data-indexers/README.mdx). To use events,we edit our counter page and add the following code: @@ -801,21 +801,21 @@ The library generated contains helper methods for calling each contract and also To achieve this, you need to -- Have the [Stellar CLI](/docs/tools/developer-tools/cli/install-cli) installed. +- Have the [Stellar CLI](../../../tools/developer-tools/cli/install-cli.mdx) installed. - Have either source code or deployed contract ID of the contract. - Know the network it was deployed to. #### Scenario 1: I have the Contract ID but no code -In this scenario, we need to use the command [`stellar contract fetch`](/docs/tools/developer-tools/cli/stellar-cli#stellar-contract-fetch) to fetch the wasm code of the contract +In this scenario, we need to use the command [`stellar contract fetch`](../../../tools/developer-tools/cli/stellar-cli.mdx#stellar-contract-fetch) to fetch the wasm code of the contract #### Scenario 2: I have the code -The next step here is to build it to a wasm file using the [`stellar contract build`](/docs/tools/developer-tools/cli/stellar-cli#stellar-contract-build) command. +The next step here is to build it to a wasm file using the [`stellar contract build`](../../../tools/developer-tools/cli/stellar-cli.mdx#stellar-contract-build) command. ### Generating the Library -After getting the wasm, we can now run [`stellar contract bindings typescript`](/docs/tools/developer-tools/cli/stellar-cli#stellar-contract-bindings-typescript) to generate the library which is ready to be published to NPM. The library generated is suited for working with complex contracts. +After getting the wasm, we can now run [`stellar contract bindings typescript`](../../../tools/developer-tools/cli/stellar-cli.mdx#stellar-contract-bindings-typescript) to generate the library which is ready to be published to NPM. The library generated is suited for working with complex contracts. ## 7. Common Pitfalls @@ -827,15 +827,15 @@ The data types in Javascript are different from the data types in soroban. When ### Fees -Calculating fees for transactions can be tricky. The Stellar SDK provides a way to calculate fees using the `server.prepareTransaction` method, which simulates the transaction and returns the appropriate fees. Fees are calculated in [stroops](/docs/learn/glossary#stroop) +Calculating fees for transactions can be tricky. The Stellar SDK provides a way to calculate fees using the `server.prepareTransaction` method, which simulates the transaction and returns the appropriate fees. Fees are calculated in [stroops](../../../learn/glossary.mdx#stroop) ### SendTransaction and GetTransaction -Results from a smart contract execution or any of the [valid transactions](/docs/learn/fundamentals/transactions/list-of-operations#extend-footprint-ttl) on soroban are not immediate. They are kept in a `PENDING` state until they are confirmed. You need to poll the `getTransaction` method to get the final result of the transaction. +Results from a smart contract execution or any of the [valid transactions](../../../learn/fundamentals/transactions/list-of-operations.mdx#extend-footprint-ttl) on soroban are not immediate. They are kept in a `PENDING` state until they are confirmed. You need to poll the `getTransaction` method to get the final result of the transaction. ### State Archival -State Archival is a characteristic of soroban contracts where some data stored on the ledger about the contract might be archived. This [guide](/docs/build/guides/archival) helps to understand how to work with state archival in DApps. +State Archival is a characteristic of soroban contracts where some data stored on the ledger about the contract might be archived. These [guides](../archival/README.mdx) helps to understand how to work with state archival in DApps. ### Data Retention diff --git a/docs/build/guides/testing/detecting-changes-with-test-snapshots.mdx b/docs/build/guides/testing/detecting-changes-with-test-snapshots.mdx index f595ae9dd..f53f29332 100644 --- a/docs/build/guides/testing/detecting-changes-with-test-snapshots.mdx +++ b/docs/build/guides/testing/detecting-changes-with-test-snapshots.mdx @@ -49,5 +49,5 @@ Note that test snapshots are extremely verbose and thoroughly understanding each To give this a go, check out the [Getting Started] contract or any of the [examples], run the tests, and look for the test snapshots on disk. -[Getting Started]: ../../smart-contracts/getting-started -[examples]: ../../smart-contracts/example-contracts +[Getting Started]: ../../smart-contracts/getting-started/README.mdx +[examples]: ../../smart-contracts/example-contracts/README.mdx diff --git a/docs/build/guides/transactions/README.mdx b/docs/build/guides/transactions/README.mdx index 8ea06bb69..a396ea736 100644 --- a/docs/build/guides/transactions/README.mdx +++ b/docs/build/guides/transactions/README.mdx @@ -6,5 +6,3 @@ sidebar_position: 120 --- The entry point for every smart contract interaction is ultimately a transaction on the Stellar network. Read more about transactions in the [Operations and Transactions section](../../../learn/fundamentals/transactions/README.mdx). - -[transaction]: ../../../learn/fundamentals/transactions/operations-and-transactions.mdx diff --git a/docs/data/horizon/README.mdx b/docs/data/horizon/README.mdx index 9d61f9c97..c5de28872 100644 --- a/docs/data/horizon/README.mdx +++ b/docs/data/horizon/README.mdx @@ -26,8 +26,8 @@ Running Horizon within your own infrastructure provides a number of benefits. Yo The Stellar Development Foundation (SDF) runs two instances of Horizon: -- [https://horizon-testnet.stellar.org/](https://horizon-testnet.stellar.org/) for interacting with the [testnet](../../learn/fundamentals/networks.mdx) -- [https://horizon-futurenet.stellar.org/](https://horizon-futurenet.stellar.org/) for interacting with the [futurenet](../../learn/fundamentals/networks.mdx) +- [horizon-testnet.stellar.org](https://horizon-testnet.stellar.org/) for interacting with the [testnet](../../learn/fundamentals/networks.mdx) +- [horizon-futurenet.stellar.org](https://horizon-futurenet.stellar.org/) for interacting with the [futurenet](../../learn/fundamentals/networks.mdx) ## In These Docs diff --git a/docs/data/hubble/data-catalog/data-dictionary/history-effects.mdx b/docs/data/hubble/data-catalog/data-dictionary/history-effects.mdx index fab022276..eeac11dc3 100644 --- a/docs/data/hubble/data-catalog/data-dictionary/history-effects.mdx +++ b/docs/data/hubble/data-catalog/data-dictionary/history-effects.mdx @@ -4,6 +4,162 @@ sidebar_position: 100 description: "" --- +| Name | Description | Data Type | Domain Values | Primary Key? | Natural Key? | Partition or Cluster Field? | Required? | Notes | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| address | The address of the account. The address is the account's public key encoded in base32. All account addresses start with a \`G\` | string | | | | cluster | | | +| address_muxed | Address multiplexed | string | | | | | | | +| operation_id | Unique identifier for an operation | integer | | | | cluster | | | +| type | The number indicating which type of effect | integer | | | | cluster | | | +| type_string | The string indicating which type of effect | string | | | | | | | +| details | Unstructured JSON object that contains details based on the type of effect. Each effect will return its own relevant details, with the rest of the details as null | record | | | | | | | +| details.liquidity_pool | Liquidity pools provide a simple, non-interactive way to trade large amounts of capital and enable high volumes of trading | record | | | | | | | +| details.liquidity_pool.fee_bp | The number of basis points charged as a percentage of the trade in order to complete the transaction. The fees earned on all trades are divided amongst pool shareholders and distributed as an incentive to keep money in the pools | integer | | | | | | | +| details.liquidity_pool.id | Unique identifier for a liquidity pool. There cannot be duplicate pools for the same asset pair. Once a pool has been created for the asset pair, another cannot be created. | string | | | | | | | +| details.liquidity_pool.total_shares | Total number of pool shares issued | numeric | | | | | | | +| details.liquidity_pool.total_trustlines | Number of trustlines for the associated pool shares | integer | | | | | | | +| details.liquidity_pool.type | The mechanism that calculates pricing and division of shares for the pool. With the initial AMM rollout, the only type of liquidity pool allowed to be created is a constant product pool. | string | | | | | | | +| details.liquidity_pool.reserves | Reserved asset in liquidity pool | record | | | | | | | +| details.liquidity_pool.reserves.asset | Reserve asset | string | | | | | | | +| details.liquidity_pool.reserves.amount | Reserve asset amount | numeric | | | | | | | +| details.reserves_received | Asset amount received for reserves from liquidity pool withdraw | record | | | | | | | +| details.reserves_received.asset | Recieved asset | string | | | | | | | +| details.reserves_received.amount | Recieved asset amount | numeric | | | | | | | +| details.reserves_deposited | Asset amount deposited for reserves from liquidity pool deposit | record | | | | | | | +| details.reserves_deposited.asset | Deposited asset | string | | | | | | | +| details.reserves_deposited.amount | Deposited asset amount | numeric | | | | | | | +| details.reserves_revoked | Asset amount revoked for reserves from liquidity pool revoke | record | | | | | | | +| details.reserves_revoked.asset | Revoked asset | string | | | | | | | +| details.reserves_revoked.amount | Revoked asset amount | numeric | | | | | | | +| details.reserves_revoked.claimable_balance_id | Claimable balance id | string | | | | | | | +| details.bought | Asset bought from trade | record | | | | | | | +| details.bought.asset | Asset bought | string | | | | | | | +| details.bought.amount | Asset amount bought | numeric | | | | | | | +| details.sold | Asset sold from trade | record | | | | | | | +| details.sold.asset | Asset sold | string | | | | | | | +| details.sold.amount | Asset amount sold | numeric | | | | | | | +| details.shares_revoked | Shares revoked from liquidity pool revoke | numeric | | | | | | | +| details.shares_received | Shares received from liquidity pool deposit | numeric | | | | | | | +| details.shares_redeemed | Shares redeemed from liquidity pool withrdaw | numeric | | | | | | | +| details.liquidity_pool_id | Unique identifier for a liquidity pool | string | | | | | | | +| details.balance_id | The unique identifier of the claimable balance. The id is comprised of 8 character type code + SHA-256 hash of the history operation id that created the balance. The balance id can be joined back to the \`claimable_balances\` table to gather more details about the balance | string | | | | | | | +| details.new_seq | New sequence number after bump sequence | integer | | | | | | | +| details.name | The manage data operation allows an account to write and store data directly on the ledger in a key value pair format. The name is the key for a data entry. | string | | | | | | | +| details.value | Value of data from manage data effect | string | | | | | | | +| details.trustor | Account address of trustor | string | | | | | | | +| details.limit | The upper bound amount of an asset that an account can hold | numeric | | | | | | | +| details.inflation_destination | Inflation destination account id | string | | | | | | | +| details.authorized_flag | Auth value for set trustline flags | boolean | | | | | | | +| details.auth_immutable_flag | Auth value for set trustline flags | boolean | | | | | | | +| details.authorized_to_maintain_liabilites | Auth value for set trustline flags | boolean | | | | | | | +| details.auth_revocable_flag | Auth value for set trustline flags | boolean | | | | | | | +| details.auth_required_flag | Auth value for set trustline flags | boolean | | | | | | | +| details.auth_clawback_enabled_flag | Auth value for set trustline flags | boolean | | | | | | | +| details.claimable_balance_clawback_enabled_flag | Auth value for set trustline flags | boolean | | | | | | | +| details.clawback_enabled_flag | Auth value for set trustline flags | boolean | | | | | | | +| details.high_threshold | The sum of the weight of all signatures that sign a transaction for the high threshold operation. The weight must exceed the set threshold for the operation to succeed. | integer | | | | | | | +| details.med_threshold | The sum of the weight of all signatures that sign a transaction for the medium threshold operation. The weight must exceed the set threshold for the operation to succeed. | integer | | | | | | | +| details.low_threshold | The sum of the weight of all signatures that sign a transaction for the low threshold operation. The weight must exceed the set threshold for the operation to succeed. | integer | | | | | | | +| details.home_domain | The home domain used for the stellar.toml file discovery | string | | | | | | | +| details.asset_issuer | The account address of the original asset issuer that created the asset | string | | | | | | | +| details.asset | Asset on network | string | | | | | | | +| details.asset_code | The 4 or 12 character code representation of the asset on the network | string | | | | | | | +| details.asset_type | The identifier for type of asset code, can be a alphanumeric with 4 characters, 12 characters or the native asset to the network, XLM. | string | | | | | | | +| details.signer | The address of the account that is allowed to authorize (sign) transactions for another account. This process is called multi-sig | string | | | | | | | +| details.sponsor | The account address of the sponsor who is paying the reserves for this signer | string | | | | | | | +| details.new_sponsor | The new account address of the sponsor who is paying the reserves for this signer | string | | | | | | | +| details.former_sponsor | The former account address of the sponsor who is paying the reserves for this signer | string | | | | | | | +| details.weight | Signer weight | integer | | | | | | | +| details.public_key | Signer public key | string | | | | | | | +| details.amount | Asset amount | numeric | | | | | | | +| details.starting_balance | Account asset starting balance | numeric | | | | | | | +| details.seller | Selling account | string | | | | | | | +| details.seller_muxed | Account multiplexed | string | | | | | | | +| details.seller_muxed_id | Account multiplexed id | integer | | | | | | | +| details.offer_id | The unique id for the offer. This id can be joined with the \`offers\` table | integer | | | | | | | +| details.sold_amount | Amount of asset sold | numeric | | | | | | | +| details.sold_asset_type | The identifier for type of asset code, can be a alphanumeric with 4 characters, 12 characters or the native asset to the network, XLM. | string | | | | | | | +| details.sold_asset_code | The 4 or 12 character code representation of the asset on the network | string | | | | | | | +| details.sold_asset_issuer | The account address of the original asset issuer that created the asset | string | | | | | | | +| details.bought_asset_type | The identifier for type of asset code, can be a alphanumeric with 4 characters, 12 characters or the native asset to the network, XLM. | string | | | | | | | +| details.bought_asset_code | The 4 or 12 character code representation of the asset on the network | string | | | | | | | +| details.bought_asset_issuer | The account address of the original asset issuer that created the asset | string | | | | | | | +| details.bought_amount | Amount of asset bought | numeric | | | | | | | +| details.data_name | Ledger entry data name | string | | | | | | | +| details.predicate | The condition which must be satisfied so the destination can claim the balance. The predicate can include logical rules using AND, OR and NOT logic. | record | | | | | | | +| details.predicate.not | | record | | | | | | | +| details.predicate.not.abs_before | | string | | | | | | | +| details.predicate.not.rel_before | | integer | | | | | | | +| details.predicate.not.unconditional | | boolean | | | | | | | +| details.predicate.not.and | | record | | | | | | | +| details.predicate.not.and.abs_before | | string | | | | | | | +| details.predicate.not.and.rel_before | | integer | | | | | | | +| details.predicate.not.and.unconditional | | boolean | | | | | | | +| details.predicate.not.and.abs_before_epoch | | integer | | | | | | | +| details.predicate.not.or | | record | | | | | | | +| details.predicate.not.or.abs_before | | string | | | | | | | +| details.predicate.not.or.rel_before | | integer | | | | | | | +| details.predicate.not.or.unconditional | | boolean | | | | | | | +| details.predicate.not.or.abs_before_epoch | | integer | | | | | | | +| details.predicate.not.not | | record | | | | | | | +| details.predicate.not.not.abs_before | | string | | | | | | | +| details.predicate.not.not.rel_before | | integer | | | | | | | +| details.predicate.not.not.unconditional | | boolean | | | | | | | +| details.predicate.not.not.abs_before_epoch | | integer | | | | | | | +| details.predicate.not.abs_before_epoch | | integer | | | | | | | +| details.predicate.type | | integer | | | | | | | +| details.predicate.and | | record | | | | | | | +| details.predicate.and.abs_before | | string | | | | | | | +| details.predicate.and.rel_before | | integer | | | | | | | +| details.predicate.and.unconditional | | boolean | | | | | | | +| details.predicate.and.and | | record | | | | | | | +| details.predicate.and.and.abs_before | | string | | | | | | | +| details.predicate.and.and.rel_before | | integer | | | | | | | +| details.predicate.and.and.unconditional | | boolean | | | | | | | +| details.predicate.and.and.abs_before_epoch | | integer | | | | | | | +| details.predicate.and.or | | record | | | | | | | +| details.predicate.and.or.abs_before | | string | | | | | | | +| details.predicate.and.or.rel_before | | integer | | | | | | | +| details.predicate.and.or.unconditional | | boolean | | | | | | | +| details.predicate.and.or.abs_before_epoch | | integer | | | | | | | +| details.predicate.and.not | | record | | | | | | | +| details.predicate.and.not.abs_before | | string | | | | | | | +| details.predicate.and.not.rel_before | | integer | | | | | | | +| details.predicate.and.not.unconditional | | boolean | | | | | | | +| details.predicate.and.not.abs_before_epoch | | integer | | | | | | | +| details.predicate.and.abs_before_epoch | | integer | | | | | | | +| details.predicate.or | | record | | | | | | | +| details.predicate.or.abs_before | | string | | | | | | | +| details.predicate.or.rel_before | | integer | | | | | | | +| details.predicate.or.unconditional | | boolean | | | | | | | +| details.predicate.or.and | | record | | | | | | | +| details.predicate.or.and.abs_before | | string | | | | | | | +| details.predicate.or.and.rel_before | | integer | | | | | | | +| details.predicate.or.and.unconditional | | boolean | | | | | | | +| details.predicate.or.and.not | | record | | | | | | | +| details.predicate.or.and.not.abs_before | | string | | | | | | | +| details.predicate.or.and.not.rel_before | | integer | | | | | | | +| details.predicate.or.and.not.unconditional | | boolean | | | | | | | +| details.predicate.or.and.not.abs_before_epoch | | integer | | | | | | | +| details.predicate.or.and.abs_before_epoch | | integer | | | | | | | +| details.predicate.or.or | | record | | | | | | | +| details.predicate.or.or.abs_before | | string | | | | | | | +| details.predicate.or.or.rel_before | | integer | | | | | | | +| details.predicate.or.or.unconditional | | boolean | | | | | | | +| details.predicate.or.or.abs_before_epoch | | integer | | | | | | | +| details.predicate.or.not | | record | | | | | | | +| details.predicate.or.not.abs_before | | string | | | | | | | +| details.predicate.or.not.rel_before | | integer | | | | | | | +| details.predicate.or.not.unconditional | | boolean | | | | | | | +| details.predicate.or.not.abs_before_epoch | | integer | | | | | | | +| details.predicate.or.abs_before_epoch | | integer | | | | | | | +| details.predicate.abs_before | Deadline for when the balance must be claimed. If a balance is claimed before the date then the clause of the condition is satisfied. | string | | | | | | | +| details.predicate.rel_before | A relative deadline for when the claimable balance can be claimed. The value represents the number of seconds since the close time of the ledger which created the claimable balance \#### Notes: This condition is useful when creating a timebounds based on creation conditions. If the creator wanted a balance only claimable one week after creation, this condition would satisfy that rule. | integer | | | | | | | +| details.predicate.unconditional | If true it means this clause of the condition is always satisfied. \#### Notes: When the predicate is only unconditional = true, it means that the balance can be claimed under any conditions | boolean | | | | | | | +| details.predicate.abs_before_epoch | A UNIX epoch value in seconds representing the same deadline date as abs_before. | integer | | | | | | | +| batch_id | String representation of the run id for a given DAG in Airflow. Takes the form of `scheduled__-`. Batch ids are unique to the batch and help with monitoring and rerun capabilities | string | | | | | | | +| batch_run_date | The start date for the batch interval. When taken with the date in the batch_id, the date represents the interval of ledgers processed. The batch run date can be seen as a proxy of closed_at for a ledger. | datetime | | | | MONTH partition | | | +| batch_insert_ts | The timestamp in UTC when a batch of records was inserted into the database. This field can help identify if a batch executed in real time or as part of a backfill | timestamp | | | | | | | +
## Table Metadata diff --git a/docs/data/hubble/data-catalog/data-lineage.mdx b/docs/data/hubble/data-catalog/data-lineage.mdx index f4cdf8766..45f51b7b2 100644 --- a/docs/data/hubble/data-catalog/data-lineage.mdx +++ b/docs/data/hubble/data-catalog/data-lineage.mdx @@ -1,5 +1,4 @@ --- -id: data-lineage title: Data Lineage --- diff --git a/docs/learn/fundamentals/lumens.mdx b/docs/learn/fundamentals/lumens.mdx index 7beaa964b..900306ff0 100644 --- a/docs/learn/fundamentals/lumens.mdx +++ b/docs/learn/fundamentals/lumens.mdx @@ -3,7 +3,7 @@ title: Lumens (XLM) sidebar_position: 30 --- -Lumens (XLM) are the native currency of the Stellar network. The lumen is the only token that doesn’t require an issuer or trustline. They are used to pay all transaction [fees](#transaction-fees), fund [rent](fees-resource-limits-metering.mdx#resource-fees), and to cover [minimum balance requirements](stellar-data-structures/accounts.mdx#base-reserves-and-subentries) on the network. +Lumens (XLM) are the native currency of the Stellar network. The lumen is the only token that doesn’t require an issuer or trustline. They are used to pay all transaction [fees](#transaction-fees), fund [rent](./fees-resource-limits-metering.mdx#resource-fee), and to cover [minimum balance requirements](stellar-data-structures/accounts.mdx#base-reserves-and-subentries) on the network. To read up on the basics of lumens, head over to our Stellar Learn site: [Stellar Learn: Lumens](https://www.stellar.org/lumens) diff --git a/docs/learn/fundamentals/transactions/list-of-operations.mdx b/docs/learn/fundamentals/transactions/list-of-operations.mdx index 1bf0b2528..c5ebe10c2 100644 --- a/docs/learn/fundamentals/transactions/list-of-operations.mdx +++ b/docs/learn/fundamentals/transactions/list-of-operations.mdx @@ -148,7 +148,7 @@ Learn more about passive sell offers: [Liquidity on Stellar: SDEX and Liquidity | Selling | asset | Asset the offer creator is selling. | | Buying | asset | Asset the offer creator is buying. | | Amount | integer | Amount of `buying` being bought. Set to `0` if you want to delete an existing offer. | -| Price | \{numerator, denominator} | Price of 1 unit of `buying` in terms of `selling`. For example, if you wanted to buy 30 XLM and sell 5 BTC, the price would be {5,30}. | +| Price | \{numerator, denominator} | Price of 1 unit of `buying` in terms of `selling`. For example, if you wanted to buy 30 XLM and sell 5 BTC, the price would be \{5,30}. | | Offer ID | unsigned integer | The ID of the offer. `0` for new offer. Set to existing offer ID to update or delete. | **Possible errors**: @@ -182,7 +182,7 @@ Learn more about passive sell offers: [Liquidity on Stellar: SDEX and Liquidity | Selling | asset | Asset the offer creator is selling. | | Buying | asset | Asset the offer creator is buying. | | Amount | integer | Amount of `selling` being sold. Set to `0` if you want to delete an existing offer. | -| Price | \{numerator, denominator} | Price of 1 unit of `selling` in terms of `buying`. For example, if you wanted to sell 30 XLM and buy 5 BTC, the price would be {5,30}. | +| Price | \{numerator, denominator} | Price of 1 unit of `selling` in terms of `buying`. For example, if you wanted to sell 30 XLM and buy 5 BTC, the price would be \{5,30}. | | Offer ID | unsigned integer | The ID of the offer. `0` for new offer. Set to existing offer ID to update or delete. | **Possible errors**: @@ -216,7 +216,7 @@ Learn more about passive sell offers: [Liquidity on Stellar: SDEX and Liquidity | Selling | asset | Asset the offer creator is selling. | | Buying | asset | Asset the offer creator is buying. | | Amount | integer | Amount of `selling` being sold. | -| Price | \{numerator, denominator} | Price of 1 unit of `selling` in terms of `buying`. For example, if you wanted to sell 30 XLM and buy 5 BTC, the price would be {5,30}. | +| Price | \{numerator, denominator} | Price of 1 unit of `selling` in terms of `buying`. For example, if you wanted to sell 30 XLM and buy 5 BTC, the price would be \{5,30}. | **Possible errors**: diff --git a/docs/learn/fundamentals/transactions/operations-and-transactions.mdx b/docs/learn/fundamentals/transactions/operations-and-transactions.mdx index b2f33197a..2692a3397 100644 --- a/docs/learn/fundamentals/transactions/operations-and-transactions.mdx +++ b/docs/learn/fundamentals/transactions/operations-and-transactions.mdx @@ -31,7 +31,7 @@ Transactions are atomic. Meaning if one operation in a transaction fails, all op Operations are executed for the source account of the transaction unless an operation override is defined. -Smart contract transactions also go through a simulation process where developers can test how the transaction would be executed on the network using the RPC endpoint `simulateTransaction`. Read more in the [Soroban docs](/docs/learn/encyclopedia/contract-development/contract-interactions/transaction-simulation.mdx). +Smart contract transactions also go through a simulation process where developers can test how the transaction would be executed on the network using the RPC endpoint `simulateTransaction`. Read more in the [Soroban docs](../../encyclopedia/contract-development/contract-interactions/transaction-simulation.mdx). #### Transaction attributes diff --git a/docs/tokens/publishing-asset-info.mdx b/docs/tokens/publishing-asset-info.mdx index ee91a777f..0466e224a 100644 --- a/docs/tokens/publishing-asset-info.mdx +++ b/docs/tokens/publishing-asset-info.mdx @@ -41,7 +41,7 @@ Required field for all asset issuers: - `ACCOUNTS`: A list of public keys for all the Stellar accounts associated with your asset. -Listing your public keys lets users confirm that you own them. For example, when [https://google.com](https://google.com/) hosts a `stellar.toml` file, users can be sure that only the accounts listed on it belong to Google. If someone then says, "You need to pay your Google bill this month, send payment to address GIAMGOOGLEIPROMISE", but that key is not listed on Google's `stellar.toml`, then users know not to trust it. +Listing your public keys lets users confirm that you own them. For example, when [google.com](https://google.com/) hosts a `stellar.toml` file, users can be sure that only the accounts listed on it belong to Google. If someone then says, "You need to pay your Google bill this month, send payment to address GIAMGOOGLEIPROMISE", but that key is not listed on Google's `stellar.toml`, then users know not to trust it. There are several fields where you list information about your Stellar integration to aid in discoverability. If you are an anchor service, and you have set up infrastructure to interoperate with wallets and allow for in-app deposit and withdrawal of assets, make sure to include the locations of your servers on your `stellar.toml` file so those wallets know where to find relevant endpoints to query. In particular, list these: diff --git a/docs/validators/admin-guide/configuring.mdx b/docs/validators/admin-guide/configuring.mdx index af49e996e..39b6a8807 100644 --- a/docs/validators/admin-guide/configuring.mdx +++ b/docs/validators/admin-guide/configuring.mdx @@ -205,7 +205,7 @@ ADDRESS="core.rando.com" :::info Important Note -Your quorum set is automatically configured based on the information you provide in the `[[VALIDATORS]]` and/or `[[HOME_DOMAINS]]` tables. Removing a validator will result in a new quorum set being generated and may have unintended consequence for you and other network participants. Be sure to carefully consider the implications of removing a validator from your configuration and follow the guidance to [coordinate with other validators](../tier-1-orgs.mdx#coordinating-with-other-validators) before making changes. +Your quorum set is automatically configured based on the information you provide in the `[[VALIDATORS]]` and/or `[[HOME_DOMAINS]]` tables. Removing a validator will result in a new quorum set being generated and may have unintended consequence for you and other network participants. Be sure to carefully consider the implications of removing a validator from your configuration and follow the guidance to [coordinate with other validators](../tier-1-orgs.mdx#coordinate-with-other-validators) before making changes. ::: diff --git a/docusaurus.config.ts b/docusaurus.config.ts index c7d223c20..76b1b968b 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -2,6 +2,7 @@ import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex'; import { themes as prismThemes } from 'prism-react-renderer'; +import { makeEditUrl, DEFAULT_LOCALE } from './config/constants'; import { anchorPlatformPluginInstances } from './config/anchorPlatform.config'; import { disbursementPlatformPluginInstances } from './config/disbursementPlatform.config'; @@ -15,14 +16,15 @@ const config: Config = { url: "https://developers.stellar.org", baseUrl: "/", trailingSlash: false, + onBrokenAnchors: "warn", onBrokenLinks: "throw", onBrokenMarkdownLinks: "throw", favicon: "img/favicon-96x96.png", organizationName: "stellar", projectName: "stellar-docs", i18n: { - defaultLocale: "en", - locales: ["en"], + defaultLocale: DEFAULT_LOCALE, + locales: ["en", "es"], }, plugins: [ "docusaurus-plugin-sass", @@ -85,7 +87,7 @@ const config: Config = { rehypePlugins: [rehypeKatex], sidebarPath: "config/sidebars.ts", sidebarItemsGenerator: require("./src/sidebar-generator"), - editUrl: "https://github.com/stellar/stellar-docs/tree/main", + editUrl: makeEditUrl, exclude: ['**/component/**', '**/README.md'], }, theme: { @@ -111,6 +113,10 @@ const config: Config = { }, ], themeConfig: { + announcementBar: { + id: 'announcementBar-translation', + content: 'Disclaimer: This documentation has been automatically translated and may contain inaccuracies. For the most accurate information, please refer to the original English version. We are not responsible for translation errors.', + }, docs: { sidebar: { autoCollapseCategories: false, @@ -230,6 +236,10 @@ const config: Config = { label: 'Meetings', position: 'right', }, + { + type: 'localeDropdown', + position: 'right', + }, { href: "https://github.com/stellar/stellar-docs", position: "right", diff --git a/meeting-notes/2024-01-18.mdx b/meeting-notes/2024-01-18.mdx index 0e5d48509..0b6c16e6f 100644 --- a/meeting-notes/2024-01-18.mdx +++ b/meeting-notes/2024-01-18.mdx @@ -1,5 +1,5 @@ --- -title: '2024-01-18' +title: "2024-01-18" authors: naman tags: [protocol] --- @@ -29,4 +29,4 @@ tags: [protocol] 1. What are the best practices for managing transactions in the frontend, with respect to transaction ordering. 1. Core devs confirmed that ordering is intentionally arbitrary. 1. Request for an API for current version of the environment/sdk -1. Github issue filed for the RPC to return versions of the current node. \ No newline at end of file +1. Github issue filed for the RPC to return versions of the current node. diff --git a/meeting-notes/2024-01-26.mdx b/meeting-notes/2024-01-26.mdx index 8eba6d26b..b019ef246 100644 --- a/meeting-notes/2024-01-26.mdx +++ b/meeting-notes/2024-01-26.mdx @@ -1,5 +1,5 @@ --- -title: '2024-01-26' +title: "2024-01-26" authors: kalepail tags: [developer] --- diff --git a/meeting-notes/2024-02-01.mdx b/meeting-notes/2024-02-01.mdx index 6378cb821..f581603ba 100644 --- a/meeting-notes/2024-02-01.mdx +++ b/meeting-notes/2024-02-01.mdx @@ -1,5 +1,5 @@ --- -title: '2024-02-01' +title: "2024-02-01" authors: naman tags: [protocol] --- @@ -24,4 +24,4 @@ tags: [protocol] 1. It is also costly to bundle decoding with verification in guest. 1. Soroban has always led with a batteries included mindset. Keeping in line with that approach, it makes sense to further investigate and determine whether a host function makes sense for these as well. 1. Leigh’s implementation may require further evaluation of the crates used for ecdsa and p256. -1. Brief discussion around proposed process for adding of a host function by a non-core dev. \ No newline at end of file +1. Brief discussion around proposed process for adding of a host function by a non-core dev. diff --git a/meeting-notes/2024-02-09.mdx b/meeting-notes/2024-02-09.mdx index 3042ee8b7..e26bb9038 100644 --- a/meeting-notes/2024-02-09.mdx +++ b/meeting-notes/2024-02-09.mdx @@ -1,5 +1,5 @@ --- -title: '2024-02-09' +title: "2024-02-09" authors: kalepail tags: [developer] --- @@ -17,4 +17,4 @@ tags: [developer] 1. [SEP draft](https://github.com/orbitlens/stellar-protocol/blob/sep-0042-token-lists/ecosystem/sep-0042.md) 2. [Discord discussion](https://discord.com/channels/897514728459468821/1162558946867953704) 2. Stellar + Soroban documentation survey - 1. [Take the survey](https://discord.com/channels/897514728459468821/1204462856037470248/1205196745877757962) \ No newline at end of file + 1. [Take the survey](https://discord.com/channels/897514728459468821/1204462856037470248/1205196745877757962) diff --git a/meeting-notes/2024-02-15.mdx b/meeting-notes/2024-02-15.mdx index 71c74b1c9..89ecc5dbb 100644 --- a/meeting-notes/2024-02-15.mdx +++ b/meeting-notes/2024-02-15.mdx @@ -1,5 +1,5 @@ --- -title: '2024-02-15' +title: "2024-02-15" authors: naman tags: [protocol] --- @@ -15,29 +15,29 @@ tags: [protocol] 1. The meeting was focused on the process of adding host functions, using WebAuthN as the example use case; continued from the previous meeting. 2. Discussion of remaining concerns with adding secp256r1 verification host function from previous meeting. - - What does it mean for secp256r1 to be added as a host function vs. as a signer type? - - As a host function, user can sign soroban auth entries. Need another stellar account to fund and submit tx to the chain. The latter can be done by a stellar account which may be operated by a wallet or a contract. - - __check_auth is invoked when the contract being interacted with calls require_auth + - What does it mean for secp256r1 to be added as a host function vs. as a signer type? + - As a host function, user can sign soroban auth entries. Need another stellar account to fund and submit tx to the chain. The latter can be done by a stellar account which may be operated by a wallet or a contract. + - \_\_check_auth is invoked when the contract being interacted with calls require_auth 3. CAP-52 was drafted to introduce encoding/decoding functions for Base64, which is needed by WebAuthN. Considerations discussed in the meeting: - - Performance: 1066 bytes that costs 1M instr to encode a 32byte hash; so the cost is very small and it’s questionable whether a host function is required. - - Interface required two functions (encode/decode) - - Implementation wise, WebAuthN requires url alphabet and padding, which decoder likely needs to support. Should we use symbols or ints? Do we need custom alphabets? - - Do we really need more encoding schemes? Isn’t XDR enough? - - Expensive auth mechanisms, i.e. webauthn, cannot be coupled with contracts with heavy business logic (which might be a lot of contracts), thus making adoption problematic. - - We should probably add building blocks to enable the ecosystem to add new use cases. -4. CAP-53 was drafted to introduce encoding/decoding functions for JSON, which is needed by WebAuthN. Considerations discussed in the meeting: - - Performance: 3.9Kb, 2.5M CPU instr. - - If the size of the input blob is unknown, execution time will increase. - - Valuable to have such a lightweight function that’ll be used in various place. - - Interface: 11 functions - - What to do with numbers and decimals? Add decimals and floats? - - We only have to extract one field for WebAuthN but what about the general case? - - The number type in JSON is decimal but soroban does not support that. How should this be handled? - - Discussion around alternative interface and implementations. + - Performance: 1066 bytes that costs 1M instr to encode a 32byte hash; so the cost is very small and it’s questionable whether a host function is required. + - Interface required two functions (encode/decode) + - Implementation wise, WebAuthN requires url alphabet and padding, which decoder likely needs to support. Should we use symbols or ints? Do we need custom alphabets? + - Do we really need more encoding schemes? Isn’t XDR enough? + - Expensive auth mechanisms, i.e. webauthn, cannot be coupled with contracts with heavy business logic (which might be a lot of contracts), thus making adoption problematic. + - We should probably add building blocks to enable the ecosystem to add new use cases. +4. CAP-53 was drafted to introduce encoding/decoding functions for JSON, which is needed by WebAuthN. Considerations discussed in the meeting: + - Performance: 3.9Kb, 2.5M CPU instr. + - If the size of the input blob is unknown, execution time will increase. + - Valuable to have such a lightweight function that’ll be used in various place. + - Interface: 11 functions + - What to do with numbers and decimals? Add decimals and floats? + - We only have to extract one field for WebAuthN but what about the general case? + - The number type in JSON is decimal but soroban does not support that. How should this be handled? + - Discussion around alternative interface and implementations. 5. Core dev concerns - - Maintainability: if you add a host function, you have to maintain it forever. If there are more versions, we have to keep it around. - - Expanded surface area for security bugs. - - Should define a path where core dev is not in the implementation loop, as their schedules are packed with stability work. How to prioritize against stability work, which may get derailed due to new functionality such as what’s being currently discussed. - - Next steps: - - Core team to put together a plan for adding Base64. This is an important exercise that helps determine even more challenges of doing so. The output of this exercise may be that base64 _shouldn’t_ in fact be implemented at this point. - - Discussion around the JSON interface is to be continued. + - Maintainability: if you add a host function, you have to maintain it forever. If there are more versions, we have to keep it around. + - Expanded surface area for security bugs. + - Should define a path where core dev is not in the implementation loop, as their schedules are packed with stability work. How to prioritize against stability work, which may get derailed due to new functionality such as what’s being currently discussed. + - Next steps: + - Core team to put together a plan for adding Base64. This is an important exercise that helps determine even more challenges of doing so. The output of this exercise may be that base64 _shouldn’t_ in fact be implemented at this point. + - Discussion around the JSON interface is to be continued. diff --git a/meeting-notes/2024-02-22.mdx b/meeting-notes/2024-02-22.mdx index 3ab6227db..e8ddacf05 100644 --- a/meeting-notes/2024-02-22.mdx +++ b/meeting-notes/2024-02-22.mdx @@ -1,5 +1,5 @@ --- -title: '2024-02-22' +title: "2024-02-22" authors: kalepail tags: [developer] --- diff --git a/meeting-notes/2024-02-29.mdx b/meeting-notes/2024-02-29.mdx index 2ec1f2661..3e28aed28 100644 --- a/meeting-notes/2024-02-29.mdx +++ b/meeting-notes/2024-02-29.mdx @@ -1,5 +1,5 @@ --- -title: '2024-02-29' +title: "2024-02-29" authors: naman tags: [protocol] --- @@ -13,9 +13,7 @@ tags: [protocol] [Discord agenda thread](https://discord.com/channels/897514728459468821/1212118102565855243) -1. Tommaso (@tdep) proposed a core change to allow for extending instance and code TTL with separate values on the host environment to allow for more cost-efficient designs - a. Proposal and discussion are captured in github discussions [stellar-core#1447](https://github.com/stellar/stellar-protocol/discussions/1447) -2. Tommaso receieved feedback on the proposal as well as implementation. Since it didn't require a metering change, core devs thought it to be a quick change. +1. Tommaso (@tdep) proposed a core change to allow for extending instance and code TTL with separate values on the host environment to allow for more cost-efficient designs a. Proposal and discussion are captured in github discussions [stellar-core#1447](https://github.com/stellar/stellar-protocol/discussions/1447) +2. Tommaso receieved feedback on the proposal as well as implementation. Since it didn't require a metering change, core devs thought it to be a quick change. 3. The ecosystem voted in favor of the proposal by upvoting the post on Github Discussions. 13 votes were [recorded](https://github.com/stellar/stellar-protocol/discussions/). 4. As next steps, a CAP will be authored to capture the proposal and put forth for approval from CAP Core Team. - diff --git a/meeting-notes/2024-03-07.mdx b/meeting-notes/2024-03-07.mdx index 4cd82f1ce..693e1fcdf 100644 --- a/meeting-notes/2024-03-07.mdx +++ b/meeting-notes/2024-03-07.mdx @@ -1,5 +1,5 @@ --- -title: '2024-03-07' +title: "2024-03-07" authors: kalepail tags: [developer] --- diff --git a/meeting-notes/2024-03-14.mdx b/meeting-notes/2024-03-14.mdx index 0bb955aed..d5894a841 100644 --- a/meeting-notes/2024-03-14.mdx +++ b/meeting-notes/2024-03-14.mdx @@ -1,5 +1,5 @@ --- -title: '2024-03-14' +title: "2024-03-14" authors: naman tags: [protocol] --- @@ -13,13 +13,11 @@ tags: [protocol] [Discord agenda thread](https://discord.com/channels/897514728459468821/1217193723612368926) -1. CAP Core Team deliberated over the latest proposals put forth by the Stellar ecosystem to advance stellar-core. -2. Nicholas and David from the CAP Core Team listened to the following proposals and discussed the proposals with the authors. - a. CAP Core team will deliver their vote over email. +1. CAP Core Team deliberated over the latest proposals put forth by the Stellar ecosystem to advance stellar-core. +2. Nicholas and David from the CAP Core Team listened to the following proposals and discussed the proposals with the authors. a. CAP Core team will deliver their vote over email. 3. Proposals discussed: - a. [CAP-51](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0051.md): add support for secp256r1 verification; by @leigh - b. [CAP-53](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0053.md): create separate functions for extending the time-to-live for contract instance and contract code; by @tdep - c. [CAP-54](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0054.md): lower total costs by refining the Soroban cost model used for VM instantiation into multiple separate and more-accurate costs; by @graydon - d. [CAP-55](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0055.md): lower total costs by linking fewer host functions during VM instantiation in Soroban; by @graydon - e. [CAP-56](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0056.md): lower total costs by caching parsed Wasm modules within a Soroban transaction; by @graydon - + a. [CAP-51](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0051.md): add support for secp256r1 verification; by @leigh + b. [CAP-53](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0053.md): create separate functions for extending the time-to-live for contract instance and contract code; by @tdep + c. [CAP-54](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0054.md): lower total costs by refining the Soroban cost model used for VM instantiation into multiple separate and more-accurate costs; by @graydon + d. [CAP-55](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0055.md): lower total costs by linking fewer host functions during VM instantiation in Soroban; by @graydon + e. [CAP-56](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0056.md): lower total costs by caching parsed Wasm modules within a Soroban transaction; by @graydon diff --git a/meeting-notes/2024-03-21.mdx b/meeting-notes/2024-03-21.mdx index 1a37e79d6..717ff5372 100644 --- a/meeting-notes/2024-03-21.mdx +++ b/meeting-notes/2024-03-21.mdx @@ -1,5 +1,5 @@ --- -title: '2024-03-21' +title: "2024-03-21" authors: kalepail tags: [developer] --- diff --git a/meeting-notes/2024-03-28.mdx b/meeting-notes/2024-03-28.mdx index 57054dec1..32dadf84e 100644 --- a/meeting-notes/2024-03-28.mdx +++ b/meeting-notes/2024-03-28.mdx @@ -1,5 +1,5 @@ --- -title: '2024-03-28' +title: "2024-03-28" authors: naman tags: [protocol] --- @@ -13,7 +13,7 @@ tags: [protocol] [Agenda thread](https://github.com/stellar/stellar-protocol/discussions/1475) -1. The Standards Working Group proposed changes to the SEP process that empower the ecosystem by making the current process more decentralized and ecosystem-friendly. +1. The Standards Working Group proposed changes to the SEP process that empower the ecosystem by making the current process more decentralized and ecosystem-friendly. 2. The process has already been used for several proposals over the last three months. 3. Esteblock from Soroswap shared their journey of participating in the proposal for Asset List ([SEP-42](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0042.md)) and implementing the proposed standard 4. Discussion continues in the proposal doc. diff --git a/meeting-notes/2024-04-04.mdx b/meeting-notes/2024-04-04.mdx index 3292f6121..d9310c7d7 100644 --- a/meeting-notes/2024-04-04.mdx +++ b/meeting-notes/2024-04-04.mdx @@ -1,21 +1,22 @@ --- -title: '2024-04-04' +title: "2024-04-04" authors: naman tags: [developer] --- -Today's recording has two parts. The first 12 minutes are audio-only. The next 45 minutes have video as well. -Please note the slides were shared in discord chat over screensharing, due to technical difficulties. +Today's recording has two parts. The first 12 minutes are audio-only. The next 45 minutes have video as well. Please note the slides were shared in discord chat over screensharing, due to technical difficulties. Part 1 (audio-only): + + frameborder="0" + width="500" + height="100" + src="https://drive.google.com/file/d/14ddYFIMDgsX70hTCv8C1tKaAGmJiprw7/preview" +> Part 2 (video): + -1. Garand discussed changes to the State Archival proposal based on feedback received at Meridian 2023. The proposed changes are: - - Previously, a downstream system called the ESS (Expired State Store) would store expired entries. In the new proposal, There is no ESS. All Archived entries, as well as all information required to generate restoration proofs for those entries, is stored directly in the History Archive. - - RPC nodes can generate proofs for archived state during preflight - - Captive-core can be directly queried for archived state, meaning that RPC/Horizon instances can potentially service queries for archival state +1. Garand discussed changes to the State Archival proposal based on feedback received at Meridian 2023. The proposed changes are: + +- Previously, a downstream system called the ESS (Expired State Store) would store expired entries. In the new proposal, There is no ESS. All Archived entries, as well as all information required to generate restoration proofs for those entries, is stored directly in the History Archive. +- RPC nodes can generate proofs for archived state during preflight +- Captive-core can be directly queried for archived state, meaning that RPC/Horizon instances can potentially service queries for archival state + 2. [The draft proposal](https://docs.google.com/document/d/1FAs3Yfo-o-gVqccrP29NSG8ysRvdEoyvuL7ywV4ijXI/edit#heading=h.1xwsoyifxbfm) 3. [Ongoing discussion](https://github.com/stellar/stellar-protocol/discussions/1480) 4. Snapshot size is TBD; it's a function of bucket list size as well as memory and historic demands placed on the RPC. diff --git a/meeting-notes/2024-05-02.mdx b/meeting-notes/2024-05-02.mdx index 2e9c7120c..a595895d2 100644 --- a/meeting-notes/2024-05-02.mdx +++ b/meeting-notes/2024-05-02.mdx @@ -1,5 +1,5 @@ --- -title: '2024-05-02' +title: "2024-05-02" authors: naman tags: [developer] --- @@ -14,9 +14,9 @@ tags: [developer] [Discord Agenda thread](https://discord.com/channels/897514728459468821/1234887262530048010/1234887262530048010) 1. Fifo presented [Stellar Plus](https://docs.cheesecakelabs.com/stellar-plus), which is a Javascript library to simplify the Stellar and Soroban development. -2. Ecosystem members found the design for Stellar Plus composable and encompassing of all Stellar related functionality including management of assets, accounts, wasm-related operations, as well as RPC utils. +2. Ecosystem members found the design for Stellar Plus composable and encompassing of all Stellar related functionality including management of assets, accounts, wasm-related operations, as well as RPC utils. 3. The links to Fifo's presentation and Stellar Plus are: - - [Miro Board showing Stellar Plus architecture](https://miro.com/app/board/uXjVKMDkMPI=/?share_link_id=643609701897) - - [Stellar Plus Repositore](https://discord.com/channels/897514728459468821/1234887262530048010/1235699608274079865) - - [Examples Repository](https://github.com/fazzatti/stellar-plus-examples) - - [Docs](https://docs.cheesecakelabs.com/stellar-plus) + - [Miro Board showing Stellar Plus architecture](https://miro.com/app/board/uXjVKMDkMPI=/?share_link_id=643609701897) + - [Stellar Plus Repositore](https://discord.com/channels/897514728459468821/1234887262530048010/1235699608274079865) + - [Examples Repository](https://github.com/fazzatti/stellar-plus-examples) + - [Docs](https://docs.cheesecakelabs.com/stellar-plus) diff --git a/meeting-notes/2024-05-09.mdx b/meeting-notes/2024-05-09.mdx index 616da31ed..12556769d 100644 --- a/meeting-notes/2024-05-09.mdx +++ b/meeting-notes/2024-05-09.mdx @@ -1,5 +1,5 @@ --- -title: '2024-05-09' +title: "2024-05-09" authors: naman tags: [developer] --- @@ -13,6 +13,6 @@ tags: [developer] 1. Tyler built a voting application using passkeys to sign the transaction, which is an implementation of the secp256r1 verification function. 2. He showed a cross-platform implementation (web and mobile) and demonstrated that passkeys are the perfect interface between web3 contracts and web2 authentication mechanisms that most end users are accostomed to. -3. Ecosystem members discussed the use of smart wallets that would use passkeys as a signer. Challenges were identified around fees requires for smart wallets, the need for a common implementation for a smart wallet, as well as how might it interface with existing password managers. -4. The voting application can be tried out at [https://passkey.sorobanbyexample.org/](https://passkey.sorobanbyexample.org/) -5. Code for the demo is here [https://github.com/kalepail/soroban-passkey](https://github.com/kalepail/soroban-passkey) +3. Ecosystem members discussed the use of smart wallets that would use passkeys as a signer. Challenges were identified around fees requires for smart wallets, the need for a common implementation for a smart wallet, as well as how might it interface with existing password managers. +4. The voting application can be tried out at [passkey.sorobanbyexample.org/](https://passkey.sorobanbyexample.org/) +5. Code for the demo is here [github.com/kalepail/soroban-passkey](https://github.com/kalepail/soroban-passkey) diff --git a/meeting-notes/2024-06-13.mdx b/meeting-notes/2024-06-13.mdx index a27324a3e..91c649959 100644 --- a/meeting-notes/2024-06-13.mdx +++ b/meeting-notes/2024-06-13.mdx @@ -1,5 +1,5 @@ --- -title: '2024-06-13' +title: "2024-06-13" authors: kalepail tags: [developer] --- @@ -12,13 +12,13 @@ tags: [developer] > 1. Tyler created Super Peach, a web3 application that uses passkeys to sign transactions. He demonstrated how passkeys can be used in authorization flows and how they can be used to sign transactions. - * Code: https://github.com/kalepail/superpeach - * Demo: https://superpeach.vercel.app + - Code: https://github.com/kalepail/superpeach + - Demo: https://superpeach.vercel.app 2. Introduced `passkey-kit`. A TypeScript SDK for creating and managing Smart Wallets via passkeys (includes the actual [Smart Wallet interface](https://github.com/kalepail/passkey-kit/tree/main/contracts)) - * Code: https://github.com/kalepail/passkey-kit - * Demo: https://passkey-kit-demo.pages.dev + - Code: https://github.com/kalepail/passkey-kit + - Demo: https://passkey-kit-demo.pages.dev 3. Introduced Launchtube, a service for submitting transactions onchain by covering both the transaction fee AND the sequence number. Wild! - * Code: https://github.com/kalepail/launchtube (ask in the `#passkeys` channel on Discord for a testnet token) + - Code: https://github.com/kalepail/launchtube (ask in the `#passkeys` channel on Discord for a testnet token) 4. He shared his vision for pushing the passkey implementation through to becoming a [standard for the ecosystem](https://docs.google.com/document/d/1c_Wom6eK1UpC3E7VuQZfOBCLc2d5lvqAhMN7VPieMBQ/edit). Join the `#passkeys` channel on the Discord to continue the discussion diff --git a/meeting-notes/2024-06-20.mdx b/meeting-notes/2024-06-20.mdx index 7cc11b52f..48ba43312 100644 --- a/meeting-notes/2024-06-20.mdx +++ b/meeting-notes/2024-06-20.mdx @@ -1,5 +1,5 @@ --- -title: '2024-06-20' +title: "2024-06-20" authors: naman tags: [developer] --- diff --git a/meeting-notes/2024-06-27.mdx b/meeting-notes/2024-06-27.mdx index 5148b9380..f98ddae9c 100644 --- a/meeting-notes/2024-06-27.mdx +++ b/meeting-notes/2024-06-27.mdx @@ -1,5 +1,5 @@ --- -title: '2024-06-27' +title: "2024-06-27" authors: naman tags: [developer] --- @@ -14,8 +14,8 @@ tags: [developer] 1. [Chad](https://github.com/chadoh) and [Willem](https://github.com/willemneal) from [Aha Labs](https://github.com/AhaLabs) discuss the updates to the new and improved [stellar-cli](https://github.com/stellar/stellar-cli) 2. Some highlights include the change from the name 'soroban' to 'stellar' when using the CLI tool and the addition of new commands. 3. They cover some cool functions like local network setup, account creation, and transaction signing. with the following commands: - - `stellar network container [start|logs]` - - `stellar keys [generate|fund|ls]` - - `stellar contract init` to get a whole new Soroban project - - and so much more! + - `stellar network container [start|logs]` + - `stellar keys [generate|fund|ls]` + - `stellar contract init` to get a whole new Soroban project + - and so much more! 4. They also discuss expected future updates including support for more Stellar operations and integration with Stellar Lab V2! diff --git a/meeting-notes/2024-07-11.mdx b/meeting-notes/2024-07-11.mdx index 7c0fc83f5..6b8f5e8be 100644 --- a/meeting-notes/2024-07-11.mdx +++ b/meeting-notes/2024-07-11.mdx @@ -1,5 +1,5 @@ --- -title: '2024-07-11' +title: "2024-07-11" authors: naman tags: [developer] --- @@ -12,7 +12,6 @@ tags: [developer] > 1. SDF Data team gave a crash course in analysis of Stellar data, and covered how to access Hubble, tips for efficient querying, and how to get started with data exploration. -2. [Slides](https://docs.google.com/presentation/d/1QsCwFLFcDF4RmNIwtSSnNrUfZb0RM0kLxOOxC7ENY5M/edit#slide=id.g2cb5821e4de_1_1143) are publicly available and legible async. +2. [Slides](https://docs.google.com/presentation/d/1QsCwFLFcDF4RmNIwtSSnNrUfZb0RM0kLxOOxC7ENY5M/edit#slide=id.g2cb5821e4de_1_1143) are publicly available and legible async. 3. Tips for data anlaysis are also covered in [docs](https://developers.stellar.org/docs/data/hubble/analyst-guide) 4. Share your queries and post questions in #hubble in Stellar discord, which is a dedicated channel for data-related topics. - diff --git a/meeting-notes/2024-07-18.mdx b/meeting-notes/2024-07-18.mdx index efcfcc879..59324c00b 100644 --- a/meeting-notes/2024-07-18.mdx +++ b/meeting-notes/2024-07-18.mdx @@ -1,5 +1,5 @@ --- -title: '2024-07-18' +title: "2024-07-18" authors: naman tags: [developer] --- @@ -11,17 +11,10 @@ tags: [developer] allow="autoplay" > +Note: the first part of the call was lost. The video posted above captures the second half of the call where various ecosystem developers shared their use cases and needs for a smart wallet on Stellar. -Note: the first part of the call was lost. The video posted above captures the second half of the call where various ecosystem developers shared their use cases and needs for a smart wallet on Stellar. - -1. Tyler put forward a [proposal](https://github.com/stellar/stellar-protocol/discussions/1499) for a smart wallet as a public good. Given that the native auth can be overloaded by using `__check_auth`, Stellar implementation of a smart wallet is fairly straightforward. The capability to customize the auth is already built into the core protocol. +1. Tyler put forward a [proposal](https://github.com/stellar/stellar-protocol/discussions/1499) for a smart wallet as a public good. Given that the native auth can be overloaded by using `__check_auth`, Stellar implementation of a smart wallet is fairly straightforward. The capability to customize the auth is already built into the core protocol. 2. See the [proposal](https://github.com/stellar/stellar-protocol/discussions/1499) here and implementation [here](https://github.com/kalepail/passkey-kit/blob/main/contracts/webauthn-wallet/src/lib.rs) -3. The proposal only uses WebAuthN-based signers i.e. passkeys. It does not use ed25519, which, perhaps it should given that ~100% of the accounts on Stellar use the scheme. It also introduces the notion of temporary and admin signers to illustrate the notion that the account can be managed by multiple signers, each with a different access policy. -4. The biggest unlock with custom auth is the ability to execute custom logic. We heard from various ecosystem members about how might they us it. -4a. A dev is building a perpetual protocol and thought smart wallets could be used to automatically manage defi positions, which would be a significant improvement over status quo where the user has to constantly track assets to determine _when_ to execute a trade. -4b. Folks are excited about foregoing the seed phrase for passkeys, which is especially meaningful when onboarding net new users to the blockchain. -4c. Authorizing a cross-chain message from a different chain, especially programmatic authorization, requires an implementation of custom accounts. -4d. Some apps have noted that users prefer not to have a wallet but simply experience the value of the app, especially games. For this, the app may assign a temprory account to the user and control access via check_auth. -4c. Microtransactions without needing user sign is super interesting for apps as well. +3. The proposal only uses WebAuthN-based signers i.e. passkeys. It does not use ed25519, which, perhaps it should given that ~100% of the accounts on Stellar use the scheme. It also introduces the notion of temporary and admin signers to illustrate the notion that the account can be managed by multiple signers, each with a different access policy. +4. The biggest unlock with custom auth is the ability to execute custom logic. We heard from various ecosystem members about how might they us it. 4a. A dev is building a perpetual protocol and thought smart wallets could be used to automatically manage defi positions, which would be a significant improvement over status quo where the user has to constantly track assets to determine _when_ to execute a trade. 4b. Folks are excited about foregoing the seed phrase for passkeys, which is especially meaningful when onboarding net new users to the blockchain. 4c. Authorizing a cross-chain message from a different chain, especially programmatic authorization, requires an implementation of custom accounts. 4d. Some apps have noted that users prefer not to have a wallet but simply experience the value of the app, especially games. For this, the app may assign a temprory account to the user and control access via check_auth. 4c. Microtransactions without needing user sign is super interesting for apps as well. 5. This has been a very insightful meeting and we learnt about how the Stellar ecosystem plans to leverage smart wallet. Let's continue the conversation in discord! - diff --git a/meeting-notes/2024-07-25.mdx b/meeting-notes/2024-07-25.mdx index a80b0bd59..299249ff7 100644 --- a/meeting-notes/2024-07-25.mdx +++ b/meeting-notes/2024-07-25.mdx @@ -1,10 +1,9 @@ --- -title: '2024-07-25' +title: "2024-07-25" authors: naman tags: [protocol] --- - -A Core Dev, Dima, discussed the proposal to add constructor support to Soroban, Stellar's smart contract system. - -Relevant links: [Draft CAP](https://github.com/stellar/stellar-protocol/blob/50dde0611440d6dc562a33462e6ba5f1504b2753/core/cap-0058.md), -[Ongoing discussion](https://github.com/stellar/stellar-protocol/discussions/1501), -[Motivating Discord Thread](https://discord.com/channels/897514728459468821/1067534037310255225) +A Core Dev, Dima, discussed the proposal to add constructor support to Soroban, Stellar's smart contract system. +Relevant links: [Draft CAP](https://github.com/stellar/stellar-protocol/blob/50dde0611440d6dc562a33462e6ba5f1504b2753/core/cap-0058.md), [Ongoing discussion](https://github.com/stellar/stellar-protocol/discussions/1501), [Motivating Discord Thread](https://discord.com/channels/897514728459468821/1067534037310255225) Key points discussed: + 1. The proposal improves usability of Soroban for contract and SDK developers. A constructor gaurantees contract initialization thus reducing overhead contract code that's usually added to ensure initialization. 2. There was general agreement for the proposal, questions were primarily implementation-focused like whether constructors should handle arguments, what should happen with upgrades, backwards comptability with contract creation functions, and behaviour on wasm update. -5. The high impact topic of naming is put to ecosystem vote, please cast yours [here](https://github.com/stellar/stellar-protocol/discussions/1507). - - +3. The high impact topic of naming is put to ecosystem vote, please cast yours [here](https://github.com/stellar/stellar-protocol/discussions/1507). diff --git a/meeting-notes/2024-08-01.mdx b/meeting-notes/2024-08-01.mdx index e03dd8b59..0c2f914ca 100644 --- a/meeting-notes/2024-08-01.mdx +++ b/meeting-notes/2024-08-01.mdx @@ -1,5 +1,5 @@ --- -title: '2024-08-01' +title: "2024-08-01" authors: naman tags: [developer] --- @@ -11,7 +11,6 @@ tags: [developer] allow="autoplay" > - 1. Piyal demonstrated that Freighter's swap functionality is now served by [Soroswap](https://soroswap.finance/). It was previously served by Stellar Dex. 2. Freighter has made integration instructions available [here](https://github.com/stellar/freighter/blob/d248f2ad0aa03da72ea6eeaf7907ac0454fdcc72/extension/INTEGRATING_SOROSWAP.MD?plain=1#L2). 3. Esteban shared that [Palta Labs](https://paltalabs.io/) has created a DEX aggregator and made it available to all via the [Router SDK](https://docs.soroswap.finance/03-technical-reference/07-optimal-route/01-soroswap-router-sdk). diff --git a/meeting-notes/2024-08-08.mdx b/meeting-notes/2024-08-08.mdx index 3e314a7f2..f4c12dd10 100644 --- a/meeting-notes/2024-08-08.mdx +++ b/meeting-notes/2024-08-08.mdx @@ -1,5 +1,5 @@ --- -title: '2024-08-12' +title: "2024-08-12" authors: naman tags: [developer] --- @@ -12,7 +12,3 @@ tags: [developer] > 1. Tdep discussed Zephyr, an execution env built on top of the indexer Mercury. He also walked through examples demonstrating how Zephyr can simplify dapp development. - - - - diff --git a/meeting-notes/2024-08-15.mdx b/meeting-notes/2024-08-15.mdx index d49e9b97c..0c3bf6b5c 100644 --- a/meeting-notes/2024-08-15.mdx +++ b/meeting-notes/2024-08-15.mdx @@ -1,5 +1,5 @@ --- -title: '2024-08-15' +title: "2024-08-15" authors: julian tags: [developer] --- @@ -15,11 +15,9 @@ tags: [developer] 2.[Link to the presentation](https://docs.google.com/presentation/d/1mDOrBLfe8-Bq6VCy7r5bb4w_uZjq-EOorbV3ZwYfs1k/edit?usp=sharing) -_Note_: The hosts microphone audio is not in the video so there is some silence during Q/A. -Here are the question asked during the Q/A: +_Note_: The hosts microphone audio is not in the video so there is some silence during Q/A. Here are the question asked during the Q/A: -1. (From ! markus_0) why do you always have an infinite amount of tokens in the pool? Wouldn't it be safer to start small and mint more as demand opens up -2.(From HunterIonize) What purpose does this serve exactly? Sorry to be blunt -3. How do you see the Orbit Protocol contributing to financial inclusion on a global scale, particularly in underbanked regions? What challenges do you anticipate in achieving this? -4. In 5-10 years, how do you see the landscape of Forex on blockchain evolving? What role do you believe Stellar will play in this evolution, and how will Blend and Orbit Protocol be at the forefront? -5. Are there any asks of the developer community? +1. (From ! markus_0) why do you always have an infinite amount of tokens in the pool? Wouldn't it be safer to start small and mint more as demand opens up 2.(From HunterIonize) What purpose does this serve exactly? Sorry to be blunt +2. How do you see the Orbit Protocol contributing to financial inclusion on a global scale, particularly in underbanked regions? What challenges do you anticipate in achieving this? +3. In 5-10 years, how do you see the landscape of Forex on blockchain evolving? What role do you believe Stellar will play in this evolution, and how will Blend and Orbit Protocol be at the forefront? +4. Are there any asks of the developer community? diff --git a/meeting-notes/2024-08-22.mdx b/meeting-notes/2024-08-22.mdx index 394d44f1b..c0ed92d54 100644 --- a/meeting-notes/2024-08-22.mdx +++ b/meeting-notes/2024-08-22.mdx @@ -1,26 +1,30 @@ --- -title: '2024-08-23' +title: "2024-08-23" authors: naman tags: [protocol] --- - + [Discord agenda thread](https://discord.com/channels/897514728459468821/900374272751591424/1275577430043525204) Core Developers discussed the latest proposals to advance Stellar Core in this week's Protocol Meeting. - -1. The proposal for addition of a constructor to Soroban’s flavor of Rust was introduced in a previous protocol meeting ([previous meeting](https://developers.stellar.org/meetings/2024/07/25)), documented in [CAP-58](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0058.md). A constructor is a function that will only be executed the first time the contract is created. +1. The proposal for addition of a constructor to Soroban’s flavor of Rust was introduced in a previous protocol meeting ([previous meeting](https://developers.stellar.org/meetings/2024/07/25)), documented in [CAP-58](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0058.md). A constructor is a function that will only be executed the first time the contract is created. 2. In this meeting, Dima discussed the updates made since the last meeting: - 1. Default constructor - if a constructor is not defined explicitly, the contract is treated as if it has a constructor - 2. Semantics of the return value - if the transactions succeeds, it is required to return a valid value - 3. Constructor interaction with custom accounts - custom accounts must be aware of the context that they are authorizing. + 1. Default constructor - if a constructor is not defined explicitly, the contract is treated as if it has a constructor + 2. Semantics of the return value - if the transactions succeeds, it is required to return a valid value + 3. Constructor interaction with custom accounts - custom accounts must be aware of the context that they are authorizing. 3. Graydon discussed the upgrade to the Wasmi virtual machine, documented in [CAP-60](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0060.md). Wasmi works by translating WebAssembly code to to an Internal Representation (IR) and then executing it. The upgrade is impactful in two ways. - 1. Translating from WebAssembly to IR takes longer but the execution of the resulting IR is performant. - 2. The upgrade introduces lazy compilation. Of all functions in a contract, only ones that are called in a given transaction will translated thus reducing both latency and fees. + 1. Translating from WebAssembly to IR takes longer but the execution of the resulting IR is performant. + 2. The upgrade introduces lazy compilation. Of all functions in a contract, only ones that are called in a given transaction will translated thus reducing both latency and fees. 4. Jay discussed addition of BLS12-381 cryptographic curve, documented in [CAP-59](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0059.md). - 1. Addition of pairing-friendly elliptic curves enables zk-based applications. 11 host functions have been added to expose mapping, pairing, and arithmetic on the BLS12-381 curve. - 2. Examples case of BLS signature verification was presented. It consumed 26M instructions (running natively), which is promising given the per-transaction limit is 100M. - 3. There was general agreement that the interface is the right one as it allows a contract developer to implement a wide variety of use cases. Discussion continues in discord. - 4. Jay requested that developers should build applications against the function and give feedback. + 1. Addition of pairing-friendly elliptic curves enables zk-based applications. 11 host functions have been added to expose mapping, pairing, and arithmetic on the BLS12-381 curve. + 2. Examples case of BLS signature verification was presented. It consumed 26M instructions (running natively), which is promising given the per-transaction limit is 100M. + 3. There was general agreement that the interface is the right one as it allows a contract developer to implement a wide variety of use cases. Discussion continues in discord. + 4. Jay requested that developers should build applications against the function and give feedback. diff --git a/meeting-notes/2024-08-29.mdx b/meeting-notes/2024-08-29.mdx index 41ebfac8d..257d09aa9 100644 --- a/meeting-notes/2024-08-29.mdx +++ b/meeting-notes/2024-08-29.mdx @@ -1,21 +1,26 @@ --- -title: '2024-08-29' +title: "2024-08-29" authors: naman tags: [protocol] --- - + Agenda: [Discord thread](https://discord.com/channels/897514728459468821/900374272751591424/1278045556211716171) CAP Core team deliberated on the proposed CAPs: 1. Addition of a constructor to Soroban's flavor of Rust. [CAP](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0058.md) - 1. Team's concern was about potential break in compatibility, which Dima had addressed. There were no further concerns. -3. Addition of BLS12-381 curve and required field arithmetics - [CAP](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0059.md) - 1. Team's concern was about providing functions to check invalid input. It's too computationally expensive to do the check at the contract layer so the it may need to be implemented as a host function. Jay is seeking ecosystem input around use cases that require strict input validation. - 2. There were no further concerns. -5. Increase performance by upgrading Soroban's VM. [CAP Discussion](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0060.md) - 1. Team's comments were about accuracy of the measurement method but the demonstrated benefits of wall clock time were thought to be promising. - 2. There was a suggestion to expose performance improvements to contract developers thus creating the incentive to optimize contracts to leverage the improvements. - 3. There were no further concerns. + 1. Team's concern was about potential break in compatibility, which Dima had addressed. There were no further concerns. +2. Addition of BLS12-381 curve and required field arithmetics - [CAP](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0059.md) + 1. Team's concern was about providing functions to check invalid input. It's too computationally expensive to do the check at the contract layer so the it may need to be implemented as a host function. Jay is seeking ecosystem input around use cases that require strict input validation. + 2. There were no further concerns. +3. Increase performance by upgrading Soroban's VM. [CAP Discussion](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0060.md) + 1. Team's comments were about accuracy of the measurement method but the demonstrated benefits of wall clock time were thought to be promising. + 2. There was a suggestion to expose performance improvements to contract developers thus creating the incentive to optimize contracts to leverage the improvements. + 3. There were no further concerns. diff --git a/meeting-notes/2024-09-05.mdx b/meeting-notes/2024-09-05.mdx index 0478e1a5e..3158556ec 100644 --- a/meeting-notes/2024-09-05.mdx +++ b/meeting-notes/2024-09-05.mdx @@ -1,24 +1,29 @@ --- -title: '2024-09-05' +title: "2024-09-05" authors: anataliocs tags: [developer] --- - + Agenda: [Discord thread](https://discord.com/channels/897514728459468821/900374272751591424/1280678171053789317) Platform team demonstrated Galexie, a part of CDP(Composable Data Platform): 1. Galexie - 1. Data Extraction: Extracts raw ledger data from the Stellar network - 2. Compression: Compresses raw data for efficient storage - 3. Storage Options: Supports runtime configuration through the Datastore abstraction to use various physical storage layers, starting with Google Cloud Storage (GCS) - 4. Modes of Operation: Can operate in either batch mode or streaming mode -2. Composable Data Platform - 1. Flexible Datastore: Multiple options for physical data storage layers - 2. Galexie: Used to extract, compress and export data to your chosen Datastore - 3. Transform: Structure data in a model suitable to your application + 1. Data Extraction: Extracts raw ledger data from the Stellar network + 2. Compression: Compresses raw data for efficient storage + 3. Storage Options: Supports runtime configuration through the Datastore abstraction to use various physical storage layers, starting with Google Cloud Storage (GCS) + 4. Modes of Operation: Can operate in either batch mode or streaming mode +2. Composable Data Platform + 1. Flexible Datastore: Multiple options for physical data storage layers + 2. Galexie: Used to extract, compress and export data to your chosen Datastore + 3. Transform: Structure data in a model suitable to your application 3. Pluggable Data Pipelines - 1. Workflows: Create ETL(extract, transform, load) pipelines - 2. Streaming: Fast, lightweight streaming data \ No newline at end of file + 1. Workflows: Create ETL(extract, transform, load) pipelines + 2. Streaming: Fast, lightweight streaming data diff --git a/meeting-notes/2024-09-12.mdx b/meeting-notes/2024-09-12.mdx index b07fa3191..7d7ab794a 100644 --- a/meeting-notes/2024-09-12.mdx +++ b/meeting-notes/2024-09-12.mdx @@ -1,22 +1,27 @@ --- -title: '2024-09-12' +title: "2024-09-12" authors: carstenjacobsen tags: [developer] --- - + Agenda: [Discord thread](https://discord.com/channels/897514728459468821/900374272751591424/1282934024892973077) Developer Experience team member Nando Vieira introduced the CLI features alias and snapshot: 1. Alias - 1. Install of Hello World example for showcasing alias - 2. Showed examples of how contract IDs are often passed as parameters in CLI commands like invoke (copying ID string or command substitution) - 3. How to deploy a smart contract and create an alias - 4. How to invoke the smart contract with the alias -2. Snapshot - 1. How to create a ledger snapshop - 2. How to use the snapshot in a test case + 1. Install of Hello World example for showcasing alias + 2. Showed examples of how contract IDs are often passed as parameters in CLI commands like invoke (copying ID string or command substitution) + 3. How to deploy a smart contract and create an alias + 4. How to invoke the smart contract with the alias +2. Snapshot + 1. How to create a ledger snapshop + 2. How to use the snapshot in a test case -Towards the end Nando went through the developer documentation, with focus on the added command line examples for Windows users, and a useful cookbook for CLI commands. \ No newline at end of file +Towards the end Nando went through the developer documentation, with focus on the added command line examples for Windows users, and a useful cookbook for CLI commands. diff --git a/meeting-notes/2024-09-19.mdx b/meeting-notes/2024-09-19.mdx index f24c9d9f9..a50cd29df 100644 --- a/meeting-notes/2024-09-19.mdx +++ b/meeting-notes/2024-09-19.mdx @@ -1,10 +1,15 @@ --- -title: '2024-09-19' +title: "2024-09-19" authors: carstenjacobsen tags: [developer] --- - + Agenda: [Discord thread](https://discord.com/channels/897514728459468821/900374272751591424/1285627254130610297) @@ -12,8 +17,8 @@ SDF DevRel team member Carsten Jacobsen showed how to build a simple Hello World 1. Create the default Hello World smart contract using the Stellar CLI 2. Create TypeScript bindings (package) using the Stellar CLI -3. Create the default Next.js using the npx create-next-app command -4. Add and link the TypeScript binding package to the Next.js project +3. Create the default Next.js using the npx create-next-app command +4. Add and link the TypeScript binding package to the Next.js project 5. Create a simple frontend with a form to submit a string 6. Import the package in the Next.js page, and setup a client 7. Create submit-function to send form value to the smart contract diff --git a/meeting-notes/2024-09-26.mdx b/meeting-notes/2024-09-26.mdx index 1fa53a6e4..dc009069a 100644 --- a/meeting-notes/2024-09-26.mdx +++ b/meeting-notes/2024-09-26.mdx @@ -1,17 +1,21 @@ --- -title: '2024-09-26' +title: "2024-09-26" authors: anataliocs tags: [developer] --- - + Agenda: [Discord thread](https://discord.com/channels/897514728459468821/900374272751591424/1288890126038208532) -Summary: Hoops Finance, a DeFi protocol, discussed their platform they are building. https://www.hoops.finance/ - +Summary: Hoops Finance, a DeFi protocol, discussed their platform they are building. https://www.hoops.finance/ 1. They abstract away the complexity of DeFi investments for normal users through a series of guided prompts. 2. Provides simplified access to LP liquidity provisioning abstraction 3. Public AMM API for read/write data on AMMs on Stellar -4. Hoops Finance API: https://api.v1.xlm.services/#overview +4. Hoops Finance API: https://api.v1.xlm.services/#overview diff --git a/meeting-notes/2024-10-24.mdx b/meeting-notes/2024-10-24.mdx index f6acac050..4190a737b 100644 --- a/meeting-notes/2024-10-24.mdx +++ b/meeting-notes/2024-10-24.mdx @@ -1,10 +1,15 @@ --- -title: '2024-10-24' +title: "2024-10-24" authors: carstenjacobsen tags: [developer] --- - + Agenda: [Discord thread](https://discord.com/channels/897514728459468821/900374272751591424/1298362698123182080) diff --git a/meeting-notes/2024-11-14.mdx b/meeting-notes/2024-11-14.mdx index ea0f02aea..60b02b3e5 100644 --- a/meeting-notes/2024-11-14.mdx +++ b/meeting-notes/2024-11-14.mdx @@ -1,14 +1,19 @@ --- -title: '2024-11-14' +title: "2024-11-14" authors: carstenjacobsen tags: [developer] --- - + Agenda: [Discord thread](https://discord.com/events/897514728459468821/1304859059425382553/1306725344870400000) -At this week’s developer meeting, Jeesun demonstrated the new Stellar Lab, showcasing its enhanced features designed to improve the developer experience. +At this week’s developer meeting, Jeesun demonstrated the new Stellar Lab, showcasing its enhanced features designed to improve the developer experience. The tech stack of the new Stellar Lab was discussed in the meeting, and the following demos were used to show the Lab's functionality: diff --git a/package.json b/package.json index 4ce55ad46..e16ed41fe 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", - "build": "docusaurus build", + "build": "docusaurus build --locale en", + "build:production": "yarn crowdin:sync && yarn crowdin:fix && yarn build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear", @@ -19,8 +20,8 @@ "api": "yarn api:clean && yarn api:bundle && yarn api:gen", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "format:mdx": "prettier --write \"{docs,src/pages,platforms}/**/*.{md,mdx}\"", - "check:mdx": "prettier -c \"{docs,src/pages,platforms}/**/*.{md,mdx}\"", + "format:mdx": "prettier --write \"{docs,src/pages,platforms,meeting-notes}/**/*.{md,mdx}\"", + "check:mdx": "prettier -c \"{docs,src/pages,platforms,meeting-notes}/**/*.{md,mdx}\"", "lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix", "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"", "prepare": "husky", @@ -28,12 +29,16 @@ "rpcspec:build": "node openrpc/scripts/build.mjs", "rpcspec:validate": "node openrpc/scripts/build.mjs && node openrpc/scripts/validate.mjs", "stellar-cli:build": "node scripts/stellar_cli.mjs", + "crowdin": "crowdin", + "crowdin:fix": "node scripts/copyIgnoredFiles.mjs && ./scripts/fix_translations.sh", + "crowdin:sync": "docusaurus write-translations && crowdin upload --no-progress && crowdin download --no-progress", "ap:versions:clean": "docusaurus clean-api-docs:version -p ap-apis ap_platform:all && docusaurus clean-api-docs:version -p ap-apis ap_callbacks:all && docusaurus clean-api-docs:version -p ap-apis ap_custody:all", "ap:versions:gen": "docusaurus gen-api-docs:version -p ap-apis ap_platform:all && docusaurus gen-api-docs:version -p ap-apis ap_callbacks:all && docusaurus gen-api-docs:version -p ap-apis ap_custody:all && rm ap_versioned_docs/version-*/api-reference/{callbacks,custody,platform/transactions}/*.info.mdx", "ap:versions:regen": "yarn ap:versions:clean && yarn ap:versions:gen", "ap:versions:new": "docusaurus docs:version:ap $VERSION && node scripts/ap_new_version.mjs $VERSION" }, "dependencies": { + "@crowdin/cli": "^4.5.0", "@docusaurus/core": "3.4.0", "@docusaurus/preset-classic": "3.4.0", "@docusaurus/remark-plugin-npm2yarn": "3.4.0", @@ -49,6 +54,7 @@ "docusaurus-plugin-openapi-docs": "^3.0.1", "docusaurus-plugin-sentry": "^2.0.0", "docusaurus-theme-openapi-docs": "^3.0.1", + "js-yaml": "^4.1.0", "patch-package": "^8.0.0", "prism-react-renderer": "^2.3.1", "react": "^18.3.1", diff --git a/platforms/anchor-platform/admin-guide/events/getting-started.mdx b/platforms/anchor-platform/admin-guide/events/getting-started.mdx index 5001c7931..7547bbf70 100644 --- a/platforms/anchor-platform/admin-guide/events/getting-started.mdx +++ b/platforms/anchor-platform/admin-guide/events/getting-started.mdx @@ -11,7 +11,7 @@ Anchor Platform provides an event service that sends HTTP webhook notifications - Quote updates - Customer KYC status changes -Event schemas for business servers are defined in the [API reference](/platforms/anchor-platform/next/api-reference/callbacks/post-event). +Event schemas for business servers are defined in the [API reference](../../api-reference/callbacks/post-event.api.mdx). **Client Applications** diff --git a/platforms/anchor-platform/admin-guide/sep24/integration.mdx b/platforms/anchor-platform/admin-guide/sep24/integration.mdx index 4fae1b17e..6caf77d25 100644 --- a/platforms/anchor-platform/admin-guide/sep24/integration.mdx +++ b/platforms/anchor-platform/admin-guide/sep24/integration.mdx @@ -1016,6 +1016,6 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-9]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md [sep-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md -[event-handling]: /platforms/anchor-platform/admin-guide/events/README.mdx -[rate-callback]: /platforms/anchor-platform/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [json-rpc-methods]: ../../api-reference/platform/rpc/methods/README.mdx diff --git a/platforms/anchor-platform/admin-guide/sep6/integration.mdx b/platforms/anchor-platform/admin-guide/sep6/integration.mdx index 7627af2e8..179218144 100644 --- a/platforms/anchor-platform/admin-guide/sep6/integration.mdx +++ b/platforms/anchor-platform/admin-guide/sep6/integration.mdx @@ -985,7 +985,7 @@ Works in the same manner as for the deposit flow. For more details, see [Transac [sep-6]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0006.md -[event-handling]: /platforms/anchor-platform/admin-guide/events/README.mdx -[customer-callback]: /platforms/anchor-platform/api-reference/callbacks/README.mdx -[rate-callback]: /platforms/anchor-platform/api-reference/callbacks/README.mdx +[event-handling]: ../events/README.mdx +[customer-callback]: ../../api-reference/callbacks/README.mdx +[rate-callback]: ../../api-reference/callbacks/README.mdx [get-transactions]: ../../api-reference/platform/transactions/get-transactions.api.mdx diff --git a/platforms/anchor-platform/api-reference/platform/rpc/methods/README.mdx b/platforms/anchor-platform/api-reference/platform/rpc/methods/README.mdx index 2e66a5c05..ee8fdac5d 100644 --- a/platforms/anchor-platform/api-reference/platform/rpc/methods/README.mdx +++ b/platforms/anchor-platform/api-reference/platform/rpc/methods/README.mdx @@ -13,27 +13,31 @@ The OpenRPC Specification for JSON-RPC API is available [here](https://playgroun Postman collection is available [here](https://documenter.getpostman.com/view/9257637/2s9Y5U1kra) - | | | | --- | --- | | | [do_stellar_payment](do_stellar_payment.mdx) | | | - [do_stellar_refund](do_stellar_refund.mdx) | | | - [get_transaction](get_transaction.mdx) | | | - [get_transactions](get_transactions.mdx) | | | - [notify_amounts_updated](notify_amounts_updated.mdx) | | | - [notify_customer_info_updated](notify_customer_info_updated.mdx) | | | - [notify_interactive_flow_completed](notify_interactive_flow_completed.mdx) | | - | [notify_offchain_funds_available](notify_offchain_funds_available.mdx) | | | - [notify_offchain_funds_pending](notify_offchain_funds_pending.mdx) | | | - [notify_offchain_funds_received](notify_offchain_funds_received.mdx) | | | - [notify_offchain_funds_sent](notify_offchain_funds_sent.mdx) | | | - [notify_onchain_funds_received](notify_onchain_funds_received.mdx) | | | - [notify_onchain_funds_sent](notify_onchain_funds_sent.mdx) | | | - [notify_refund_pending](notify_refund_pending.mdx) | | | - [notify_refund_sent](notify_refund_sent.mdx) | | | - [notify_transaction_error](notify_transaction_error.mdx) | | | - [notify_transaction_expired](notify_transaction_expired.mdx) | | | - [notify_transaction_on_hold](notify_transaction_on_hold.mdx) | | | - [notify_transaction_recovery](notify_transaction_recovery.mdx) | | | - [notify_trust_set](notify_trust_set.mdx) | | | - [request_offchain_funds](request_offchain_funds.mdx) | | | - [request_onchain_funds](request_onchain_funds.mdx) | | | - [request_trust](request_trust.mdx) | + +| | | +| --- | --- | +| | [do_stellar_payment](./do_stellar_payment.mdx) | +| | [do_stellar_refund](./do_stellar_refund.mdx) | +| | [get_transaction](./get_transaction.mdx) | +| | [get_transactions](./get_transactions.mdx) | +| | [notify_amounts_updated](./notify_amounts_updated.mdx) | +| | [notify_customer_info_updated](./notify_customer_info_updated.mdx) | +| | [notify_interactive_flow_completed](./notify_interactive_flow_completed.mdx) | +| | [notify_offchain_funds_available](./notify_offchain_funds_available.mdx) | +| | [notify_offchain_funds_pending](./notify_offchain_funds_pending.mdx) | +| | [notify_offchain_funds_received](./notify_offchain_funds_received.mdx) | +| | [notify_offchain_funds_sent](./notify_offchain_funds_sent.mdx) | +| | [notify_onchain_funds_received](./notify_onchain_funds_received.mdx) | +| | [notify_onchain_funds_sent](./notify_onchain_funds_sent.mdx) | +| | [notify_refund_pending](./notify_refund_pending.mdx) | +| | [notify_refund_sent](./notify_refund_sent.mdx) | +| | [notify_transaction_error](./notify_transaction_error.mdx) | +| | [notify_transaction_expired](./notify_transaction_expired.mdx) | +| | [notify_transaction_on_hold](./notify_transaction_on_hold.mdx) | +| | [notify_transaction_recovery](./notify_transaction_recovery.mdx) | +| | [notify_trust_set](./notify_trust_set.mdx) | +| | [request_offchain_funds](./request_offchain_funds.mdx) | +| | [request_onchain_funds](./request_onchain_funds.mdx) | +| | [request_trust](./request_trust.mdx) | + diff --git a/platforms/stellar-disbursement-platform/admin-guide/60-anchor-platform-integration-points.mdx b/platforms/stellar-disbursement-platform/admin-guide/anchor-platform-integration-points.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/60-anchor-platform-integration-points.mdx rename to platforms/stellar-disbursement-platform/admin-guide/anchor-platform-integration-points.mdx index 511e94363..7436ecf55 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/60-anchor-platform-integration-points.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/anchor-platform-integration-points.mdx @@ -1,6 +1,5 @@ --- title: Anchor Platform Integration Points -id: anchor-platform-integration-points sidebar_position: 60 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/45-configuring-sdp.mdx b/platforms/stellar-disbursement-platform/admin-guide/configuring-sdp.mdx similarity index 95% rename from platforms/stellar-disbursement-platform/admin-guide/45-configuring-sdp.mdx rename to platforms/stellar-disbursement-platform/admin-guide/configuring-sdp.mdx index 62f47dc15..55d764c1f 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/45-configuring-sdp.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/configuring-sdp.mdx @@ -1,5 +1,4 @@ --- -id: configuring-sdp title: Configuring the SDP description: Understand the configuration options available for the Stellar Disbursement Platform (SDP) keywords: [SDP, configuration] @@ -40,8 +39,8 @@ Operational Configuration allows controlling metrics, logging, and other operati - `SENTRY_DSN` - 🔑 The DSN (client key) of the Sentry project. If not provided, Sentry will not be used. - `ENVIRONMENT` - The environment where the application is running. Example: "development", "staging", "production". Default: "development". - `DATABASE_URL` - 🔑 The connection string for the PostgreSQL database. Format is `postgres://username:password@host:port/database?sslmode=disable`. Default: "postgres://localhost:5432/sdp?sslmode=disable". -- `BASE_URL` - The SDP backend server's base URL. Default: "http://localhost:8000". Tenant-specific URLs will be configured during the [tenant provisioning process](tenant-provisioning#creating-tenants). -- `SDP_UI_BASE_URL` - The SDP UI/dashboard Base URL used to send the invitation link when a new user is created. Tenant-specific URLs will be configured during the [tenant provisioning process](tenant-provisioning#creating-tenants). +- `BASE_URL` - The SDP backend server's base URL. Default: "http://localhost:8000". Tenant-specific URLs will be configured during the [tenant provisioning process](./tenant-provisioning.mdx#creating-tenants). +- `SDP_UI_BASE_URL` - The SDP UI/dashboard Base URL used to send the invitation link when a new user is created. Tenant-specific URLs will be configured during the [tenant provisioning process](./tenant-provisioning.mdx#creating-tenants). ### Messaging Configuration @@ -87,7 +86,7 @@ Stellar Configuration allows configuring accounts, transactions, and other Stell - `SEP10_SIGNING_PRIVATE_KEY` - 🔑 The private key of the Stellar account that signs the SEP-10 transactions. It's also used to sign URLs. - `MAX_BASE_FEE` - The max base fee for submitting a Stellar transaction. Default: 10000. -The remaining configurations related to distribution accounts are detailed in the `Stellar accounts configuration` section of [1.x to 2.x Migration Guide](single-tenant-to-multi-tenant-migration#environment-variables). +The remaining configurations related to distribution accounts are detailed in the `Stellar accounts configuration` section of [1.x to 2.x Migration Guide](./single-tenant-to-multi-tenant-migration.mdx#environment-variables). ### Security Configuration @@ -125,11 +124,11 @@ Anchor Platform Configuration allows configuring the anchor platform used by the For asynchronous processing, the SDP Core Service gives user the choice to use either the Event Broker or Scheduled Jobs. -The configurations for this section are detailed in the `Event Broker and Scheduler Configurations` of the [1.x to 2.x Migration Guide](single-tenant-to-multi-tenant-migration#environment-variables). +The configurations for this section are detailed in the `Event Broker and Scheduler Configurations` of the [1.x to 2.x Migration Guide](./single-tenant-to-multi-tenant-migration.mdx#environment-variables). ### Multi-tenancy Configuration -The configurations for this section are detailed in `General Environment Variables` of the [1.x to 2.x Migration Guide](single-tenant-to-multi-tenant-migration#environment-variables). +The configurations for this section are detailed in `General Environment Variables` of the [1.x to 2.x Migration Guide](./single-tenant-to-multi-tenant-migration.mdx#environment-variables). ## Transaction Submission Service (TSS) @@ -176,7 +175,7 @@ The following configurations are required for using channel accounts to submit t #### Distribution Accounts Configuration -The following configurations are related to the distribution accounts used to send funds to recipients. This configuration should match the configuration in the SDP Core Service. For more details, refer to the `Stellar accounts configuration` section of [1.x to 2.x Migration Guide](single-tenant-to-multi-tenant-migration#environment-variables). +The following configurations are related to the distribution accounts used to send funds to recipients. This configuration should match the configuration in the SDP Core Service. For more details, refer to the `Stellar accounts configuration` section of [1.x to 2.x Migration Guide](./single-tenant-to-multi-tenant-migration.mdx#environment-variables). - `DISTRIBUTION_ACCOUNT_ENCRYPTION_PASSPHRASE` - 🔑 A Stellar-compliant ed25519 private key used to encrypt/decrypt the in-memory distribution accounts' private keys. - `DISTRIBUTION_PUBLIC_KEY` - The public key of the HOST's Stellar distribution account, used to create channel accounts. @@ -184,7 +183,7 @@ The following configurations are related to the distribution accounts used to se ### Event Broker Configuration -If an Event Broker is used for asynchronous processing, the TSS will need to be configured to use it. For more details, refer to the `Event Broker and Scheduler Configurations` of the [1.x to 2.x Migration Guide](single-tenant-to-multi-tenant-migration#environment-variables). +If an Event Broker is used for asynchronous processing, the TSS will need to be configured to use it. For more details, refer to the `Event Broker and Scheduler Configurations` of the [1.x to 2.x Migration Guide](./single-tenant-to-multi-tenant-migration.mdx#environment-variables). - `EVENT_BROKER_TYPE` - The type of event broker to use. Options: "KAFKA", "NONE". Default: "KAFKA". - `BROKER_URLS` - List of Message Broker URLs comma-separated. diff --git a/platforms/stellar-disbursement-platform/admin-guide/40-deploy-the-sdp.mdx b/platforms/stellar-disbursement-platform/admin-guide/deploy-the-sdp.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/40-deploy-the-sdp.mdx rename to platforms/stellar-disbursement-platform/admin-guide/deploy-the-sdp.mdx index 4ca82dc73..065ed096f 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/40-deploy-the-sdp.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/deploy-the-sdp.mdx @@ -1,6 +1,5 @@ --- title: Deploy the SDP -id: deploy-the-sdp sidebar_position: 40 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/20-design-and-architecture.mdx b/platforms/stellar-disbursement-platform/admin-guide/design-and-architecture.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/20-design-and-architecture.mdx rename to platforms/stellar-disbursement-platform/admin-guide/design-and-architecture.mdx index c1596a13f..458303421 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/20-design-and-architecture.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/design-and-architecture.mdx @@ -1,6 +1,5 @@ --- title: Design and Architecture -id: design-and-architecture sidebar_position: 20 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/30-getting-started.mdx b/platforms/stellar-disbursement-platform/admin-guide/getting-started.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/30-getting-started.mdx rename to platforms/stellar-disbursement-platform/admin-guide/getting-started.mdx index 37187b1cc..a9c999634 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/30-getting-started.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/getting-started.mdx @@ -1,6 +1,5 @@ --- title: Getting Started -id: getting-started sidebar_position: 30 --- @@ -189,7 +188,7 @@ Payments will start failing if the distribution account runs out of funds. To fi - The distribution account address can be found under `Distribution Account` on the frontend sidebar. Copy that address. - Access [https://horizon-testnet.stellar.org/accounts/:accountId](https://horizon-testnet.stellar.org/accounts/GARGKDIDH7WMKV5WWPK4BH4CKEQIZGWUCA4EUXCY5VICHTHLEBXVNVMW) in your browser and check the balance. - If the balance is indeed low, you can add more funds by creating a new account and sending funds to the distribution account. - - Access [https://demo-wallet.stellar.org/](https://demo-wallet.stellar.org/) in your browser. + - Access [demo-wallet.stellar.org](https://demo-wallet.stellar.org/) in your browser. - Click on `Generate Keypair for new account` to create a new testnet account. Your account comes with 10,000 XLM. - Click on `Send` and enter the distribution account public key and the amount you want to send. - Using Freighter or [Stellar Lab](https://lab.stellar.org/account/create?$=network$id=testnet&label=Testnet&horizonUrl=https:////horizon-testnet.stellar.org&rpcUrl=https:////soroban-testnet.stellar.org&passphrase=Test%20SDF%20Network%20/;%20September%202015;;), swap the XLM for USDC if you wish to test with USDC. diff --git a/platforms/stellar-disbursement-platform/admin-guide/50-making-your-wallet-sdp-ready.mdx b/platforms/stellar-disbursement-platform/admin-guide/making-your-wallet-sdp-ready.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/50-making-your-wallet-sdp-ready.mdx rename to platforms/stellar-disbursement-platform/admin-guide/making-your-wallet-sdp-ready.mdx index c8b930f8d..5fe6ab80b 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/50-making-your-wallet-sdp-ready.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/making-your-wallet-sdp-ready.mdx @@ -1,6 +1,5 @@ --- title: Making Your Wallet SDP-Ready -id: making-your-wallet-sdp-ready sidebar_position: 50 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/10-overview.mdx b/platforms/stellar-disbursement-platform/admin-guide/overview.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/10-overview.mdx rename to platforms/stellar-disbursement-platform/admin-guide/overview.mdx index d241125bc..30f2dc30d 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/10-overview.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/overview.mdx @@ -1,6 +1,5 @@ --- title: Overview -id: overview sidebar_position: 10 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/42-secure-operation-manual.mdx b/platforms/stellar-disbursement-platform/admin-guide/secure-operation-manual.mdx similarity index 98% rename from platforms/stellar-disbursement-platform/admin-guide/42-secure-operation-manual.mdx rename to platforms/stellar-disbursement-platform/admin-guide/secure-operation-manual.mdx index 7f155ae1f..ac7029ce6 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/42-secure-operation-manual.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/secure-operation-manual.mdx @@ -1,6 +1,5 @@ --- title: Secure Operation Manual -id: secure-operation-manual sidebar_position: 42 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/70-migrating-to-sdp-multi-tenant.mdx b/platforms/stellar-disbursement-platform/admin-guide/single-tenant-to-multi-tenant-migration.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/70-migrating-to-sdp-multi-tenant.mdx rename to platforms/stellar-disbursement-platform/admin-guide/single-tenant-to-multi-tenant-migration.mdx index 686a50202..a5c5e5d53 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/70-migrating-to-sdp-multi-tenant.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/single-tenant-to-multi-tenant-migration.mdx @@ -151,7 +151,7 @@ On the Anchor Platform side, we must set the following envs: ### Seggregation of Funds -In the multi-tenant version, tenants funds are isolated from each other **unless the tenant is created with `"distribution_account_type": "DISTRIBUTION_ACCOUNT.STELLAR.ENV"`**. For more information on the distribution account types, please refer to the [Tenant Provisioning](48-tenant-provisioning.mdx#creating-tenants) section. +In the multi-tenant version, tenants funds are isolated from each other **unless the tenant is created with `"distribution_account_type": "DISTRIBUTION_ACCOUNT.STELLAR.ENV"`**. For more information on the distribution account types, please refer to the [Tenant Provisioning](./tenant-provisioning.mdx#creating-tenants) section. The channel accounts on the other hand are shared between tenants, and they are created by the HOST distribution account, set in the `DISTRIBUTION_SEED` environment variable. The channel accounts are encrypted using the `CHANNEL_ACCOUNT_ENCRYPTION_PASSPHRASE` environment variable, or the `DISTRIBUTION_SEED` if the former is not set. In the single-tenant version, the channel accounts were encrypted by the `DISTRIBUTION_SEED`. diff --git a/platforms/stellar-disbursement-platform/admin-guide/48-tenant-provisioning.mdx b/platforms/stellar-disbursement-platform/admin-guide/tenant-provisioning.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/48-tenant-provisioning.mdx rename to platforms/stellar-disbursement-platform/admin-guide/tenant-provisioning.mdx index 6af351253..5c0ad4e4f 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/48-tenant-provisioning.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/tenant-provisioning.mdx @@ -1,5 +1,4 @@ --- -id: tenant-provisioning title: Provisioning a New Tenant description: Learn how to provision and configure a new tenant in the Stellar Disbursement Platform. keywords: diff --git a/platforms/stellar-disbursement-platform/admin-guide/user-interface/60-analytics.mdx b/platforms/stellar-disbursement-platform/admin-guide/user-interface/analytics.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/user-interface/60-analytics.mdx rename to platforms/stellar-disbursement-platform/admin-guide/user-interface/analytics.mdx index 8dade895e..d18660b26 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/user-interface/60-analytics.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/user-interface/analytics.mdx @@ -1,6 +1,5 @@ --- title: Analytics -id: analytics sidebar_position: 60 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/user-interface/70-circle-configutration.mdx b/platforms/stellar-disbursement-platform/admin-guide/user-interface/circle-configuration.mdx similarity index 97% rename from platforms/stellar-disbursement-platform/admin-guide/user-interface/70-circle-configutration.mdx rename to platforms/stellar-disbursement-platform/admin-guide/user-interface/circle-configuration.mdx index c285b8adc..cdc19cb45 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/user-interface/70-circle-configutration.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/user-interface/circle-configuration.mdx @@ -1,6 +1,5 @@ --- title: Circle Configuration -id: circle-configutration sidebar_position: 70 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/user-interface/10-dashboard-home.mdx b/platforms/stellar-disbursement-platform/admin-guide/user-interface/dashboard-home.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/user-interface/10-dashboard-home.mdx rename to platforms/stellar-disbursement-platform/admin-guide/user-interface/dashboard-home.mdx index f7fd22815..a140abb45 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/user-interface/10-dashboard-home.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/user-interface/dashboard-home.mdx @@ -1,6 +1,5 @@ --- title: Dashboard Home -id: dashboard-home sidebar_position: 10 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/user-interface/20-disbursements.mdx b/platforms/stellar-disbursement-platform/admin-guide/user-interface/disbursements.mdx similarity index 98% rename from platforms/stellar-disbursement-platform/admin-guide/user-interface/20-disbursements.mdx rename to platforms/stellar-disbursement-platform/admin-guide/user-interface/disbursements.mdx index 407933cd3..31757f6db 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/user-interface/20-disbursements.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/user-interface/disbursements.mdx @@ -1,6 +1,5 @@ --- title: Disbursements -id: disbursements sidebar_position: 20 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/user-interface/40-payments.mdx b/platforms/stellar-disbursement-platform/admin-guide/user-interface/payments.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/user-interface/40-payments.mdx rename to platforms/stellar-disbursement-platform/admin-guide/user-interface/payments.mdx index 5cf1bcb97..dedfd10f5 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/user-interface/40-payments.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/user-interface/payments.mdx @@ -1,6 +1,5 @@ --- title: Payments -id: payments sidebar_position: 40 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/user-interface/30-receivers.mdx b/platforms/stellar-disbursement-platform/admin-guide/user-interface/receivers.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/user-interface/30-receivers.mdx rename to platforms/stellar-disbursement-platform/admin-guide/user-interface/receivers.mdx index b228d0490..4ab11b05b 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/user-interface/30-receivers.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/user-interface/receivers.mdx @@ -1,6 +1,5 @@ --- title: Receivers -id: receivers sidebar_position: 30 --- diff --git a/platforms/stellar-disbursement-platform/admin-guide/user-interface/50-wallets.mdx b/platforms/stellar-disbursement-platform/admin-guide/user-interface/wallets.mdx similarity index 99% rename from platforms/stellar-disbursement-platform/admin-guide/user-interface/50-wallets.mdx rename to platforms/stellar-disbursement-platform/admin-guide/user-interface/wallets.mdx index 1977dc6a2..28c9e8599 100644 --- a/platforms/stellar-disbursement-platform/admin-guide/user-interface/50-wallets.mdx +++ b/platforms/stellar-disbursement-platform/admin-guide/user-interface/wallets.mdx @@ -1,6 +1,5 @@ --- title: Wallets -id: wallets sidebar_position: 50 --- diff --git a/scripts/copyIgnoredFiles.mjs b/scripts/copyIgnoredFiles.mjs new file mode 100644 index 000000000..022f52f9c --- /dev/null +++ b/scripts/copyIgnoredFiles.mjs @@ -0,0 +1,126 @@ +import fs from 'fs'; +import path from 'path'; +import glob from 'glob'; +import yaml from 'js-yaml'; + +// Define the list of language codes +const languages = ['es']; + +/** + * Reads and parses the crowdin.yaml file. + * @param {string} filePath - The path to the crowdin.yaml file. + * @returns {Object} - The parsed configuration object. + */ +function readCrowdinConfig(filePath) { + try { + const fileContent = fs.readFileSync(filePath, 'utf8'); + return yaml.load(fileContent); + } catch (err) { + logMessage(`Error reading or parsing the file ${filePath}: ${err.message}`); + process.exit(1); + } +} + +/** + * Extracts the sources array from the configuration object. + * @param {Object} config - The parsed configuration object. + * @returns {string[]} - The array of source paths. + */ +function extractSources(config) { + return config.files.map(file => file.source.replace(/\/\*\*\/\*$/, '').replace(/^\//, '')); +} + +/** + * Logs a message to the console with a timestamp. + * @param {string} message - The message to log. + */ +function logMessage(message) { + console.log(`[${new Date().toISOString()}] ${message}`); +} + +/** + * Copies a file or directory from source to destination. + * @param {string} src - The source path. + * @param {string} dest - The destination path. + */ +function copyFileOrDirectory(src, dest) { + const destDir = path.dirname(dest); + fs.mkdirSync(destDir, { recursive: true }); + + const stat = fs.statSync(src); + if (stat.isDirectory()) { + fs.cpSync(src, dest, { recursive: true }); + logMessage(`Successfully copied directory ${src} to ${dest}`); + } else { + fs.copyFileSync(src, dest); + logMessage(`Successfully copied file ${src} to ${dest}`); + } +} + +/** + * Replaces placeholders in the translation path with actual values. + * @param {string} translationPath - The translation path template. + * @param {string} languageCode - The language code to replace placeholders. + * @param {string} srcPath - The source file path. + * @param {string[]} sources - The array of source paths. + * @returns {string} - The translation path with placeholders replaced. + */ +function getTranslationPath(translationPath, languageCode, srcPath, sources) { + let relativePath = srcPath; + + for (const source of sources) { + if (srcPath.startsWith(source)) { + relativePath = srcPath.replace(`${source}/`, ''); + break; + } + } + + const destPath = translationPath + .replace('%two_letters_code%', languageCode) + .replace('%original_file_name%', path.basename(srcPath)) + .replace('**', path.dirname(relativePath).replace(/\\/g, '/')); + + return path.join(process.cwd(), destPath); +} + +/** + * Copies ignored files for each language based on the configuration. + */ +function copyIgnoredFilesForLanguages(config) { + const sources = extractSources(config); + + config.files.forEach(({ source, translation, ignore = [] }) => { + ignore.forEach(ignorePattern => { + let srcPattern = source + .replace(/^\//, '') // Strip the leading slash for the source path + .replace(/\*\*\/\*$/, ''); // strips the glob patter from the end + srcPattern += ignorePattern + + glob(srcPattern, (err, files) => { + if (err) { + logMessage(`Error processing pattern ${srcPattern}: ${err.message}`); + return; + } + + files.forEach(srcPath => { + languages.forEach(languageCode => { + const destPath = getTranslationPath(translation, languageCode, srcPath, sources); + copyFileOrDirectory(srcPath, destPath); + }); + }); + }); + }); + }); +} + +/** + * Main function to execute the workflow. + */ +function main() { + const config = readCrowdinConfig('crowdin.yaml'); + copyIgnoredFilesForLanguages(config); + logMessage('Ignored files copied for all specified languages.'); +} + +// Execute the main function +main(); diff --git a/scripts/fix_translations.sh b/scripts/fix_translations.sh new file mode 100755 index 000000000..96f2655de --- /dev/null +++ b/scripts/fix_translations.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +perl -i -pe's/\s\{/ \\{/g' i18n/es/docusaurus-plugin-content-docs/current/learn/fundamentals/transactions/list-of-operations.mdx +perl -i -pe's/<\s(.*\.mdx)>/\1/' i18n/es/docusaurus-plugin-content-docs-ap/**/admin-guide/component/observer/observer.mdx diff --git a/src/components/AttributeTable/ListItem/index.js b/src/components/AttributeTable/ListItem/index.js index bf98a5c24..7d06d4ae5 100644 --- a/src/components/AttributeTable/ListItem/index.js +++ b/src/components/AttributeTable/ListItem/index.js @@ -4,6 +4,7 @@ import Details from "@theme/Details"; import { combineAdjacentStrings, partition } from "@site/src/helpers"; import styles from "./styles.module.scss"; +import Translate from "@docusaurus/Translate"; export const ListItem = (props) => { const children = props.children.props.children.filter((child) => child !== "\n"); @@ -39,7 +40,15 @@ export const ListItem = (props) => {

{description}

{collapsedList.length > 0 && ( -
Show child attributes}> +
+ + Show child attributes + + + }> {collapsedList}
)} diff --git a/src/components/CanvasFeeGraphs/index.tsx b/src/components/CanvasFeeGraphs/index.tsx index a8f500d83..d387be451 100644 --- a/src/components/CanvasFeeGraphs/index.tsx +++ b/src/components/CanvasFeeGraphs/index.tsx @@ -2,11 +2,20 @@ import React from 'react'; import BrowserOnly from '@docusaurus/BrowserOnly'; import styles from './styles.module.css'; +import Translate from '@docusaurus/Translate'; + +const translatedLoading = ( + + Loading... + +) export default function CanvasEmbed() { return (
- Loading...
}> + {translatedLoading}
}> {() => { const Canvas = require("canvas-embed").Canvas; return ; diff --git a/src/components/CodeExample.js b/src/components/CodeExample.js index 2e74da80e..29696d55e 100644 --- a/src/components/CodeExample.js +++ b/src/components/CodeExample.js @@ -3,6 +3,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; import { CODE_LANGS } from "../constants"; +import Translate from '@docusaurus/Translate'; export const CodeExample = ({ children }) => ( @@ -16,7 +17,13 @@ export const CodeExample = ({ children }) => ( + Example + + } > {codeProps.children} diff --git a/src/components/EndpointsTable.js b/src/components/EndpointsTable.js index 83fb0b418..a2db54903 100644 --- a/src/components/EndpointsTable.js +++ b/src/components/EndpointsTable.js @@ -1,6 +1,15 @@ import React from "react"; import { MethodTable } from "./MethodTable"; +import Translate from "@docusaurus/Translate"; -export const EndpointsTable = ({ children, title = "Endpoints" }) => ( +const transledEndpoints = ( + + Endpoints + +) + +export const EndpointsTable = ({ children, title = transledEndpoints }) => ( {children} ); diff --git a/src/components/ExampleResponse/index.js b/src/components/ExampleResponse/index.js index 69d987857..0c6558fe5 100644 --- a/src/components/ExampleResponse/index.js +++ b/src/components/ExampleResponse/index.js @@ -2,8 +2,17 @@ import React from "react"; import clsx from "clsx"; import styles from "./styles.module.scss"; +import Translate from "@docusaurus/Translate"; -export const ExampleResponse = ({ children, title = "Example" }) => { +const transledExample = ( + + Example + +) + +export const ExampleResponse = ({ children, title = transledExample }) => { const codeElement = children.props.children; return React.cloneElement(codeElement, { diff --git a/src/components/ReadMore.js b/src/components/ReadMore.js deleted file mode 100644 index 06b258a6a..000000000 --- a/src/components/ReadMore.js +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; - -export const ReadMore = ({ url }) => Read More; diff --git a/src/components/ReaderFeedback/index.js b/src/components/ReaderFeedback/index.js index 8f51ddc49..77fc242f1 100644 --- a/src/components/ReaderFeedback/index.js +++ b/src/components/ReaderFeedback/index.js @@ -3,6 +3,7 @@ import useIsBrowser from '@docusaurus/useIsBrowser'; import IconThumbsUp from '@site/static/icons/thumbs-up.svg'; import IconThumbsDown from '@site/static/icons/thumbs-down.svg'; +import Translate, { translate } from "@docusaurus/Translate"; const ReaderFeedback = ({ pageId }) => { const [feedbackGiven, setFeedbackGiven] = useState(false); @@ -18,18 +19,34 @@ const ReaderFeedback = ({ pageId }) => { return (
{feedbackGiven ? ( - 'Thanks for your feedback!' + + Thanks for your feedback! + ) : ( <> - Did you find this page helpful? + + Did you find this page helpful? + diff --git a/src/components/WalletCodeExample.tsx b/src/components/WalletCodeExample.tsx index 8e2710f45..ec7fcde7b 100644 --- a/src/components/WalletCodeExample.tsx +++ b/src/components/WalletCodeExample.tsx @@ -5,6 +5,7 @@ import CodeBlock from '@theme/CodeBlock'; import BrowserOnly from '@docusaurus/BrowserOnly'; import {getCookie, walletDefaultLang} from "./LanguageSpecific"; import {CODE_LANGS} from "../constants"; +import Translate from '@docusaurus/Translate'; // TODO: when TS docs are ready set to false const ALLOW_EMPTY_DOCS = true; @@ -38,7 +39,13 @@ const getTabs = (children: React.ReactElement, targetLanguage: String) => { + Example + + } default={defaultVal === CODE_LANGS[language]} > @@ -60,7 +67,12 @@ const getTabs = (children: React.ReactElement, targetLanguage: String) => { default={defaultVal === language} > - // There is no code example for {language} yet + + {'// There is no code example for {language} yet'} + ); } else { diff --git a/src/components/WalletGuideWarn.tsx b/src/components/WalletGuideWarn.tsx index ce6d793a8..c0fd396d4 100644 --- a/src/components/WalletGuideWarn.tsx +++ b/src/components/WalletGuideWarn.tsx @@ -3,6 +3,7 @@ import Admonition from '@theme/Admonition'; import {LanguageButtons} from "./LanguageButtons"; import {LanguageSpecific} from "./LanguageSpecific"; import {CODE_LANGS} from "../constants"; +import Translate from "@docusaurus/Translate"; type WalletGuideWarnProps = { WIPLangs?: String[]; @@ -10,7 +11,13 @@ type WalletGuideWarnProps = { export const WalletGuideWarn: React.FC = (props) => { const langs = (props.WIPLangs || []).map(v => CODE_LANGS[v.toLowerCase()]); - const admonition = Documentation for this language is currently work in progress. Some of information may not be applicable for this language, or missing. Code samples may be incomplete.; + const admonition = + + Documentation for this language is currently work in progress. Some of information may not be applicable for this language, or missing. Code samples may be incomplete. + + ; const kt = langs.indexOf("Kotlin") != -1 ? admonition : <>; const ts = langs.indexOf("TypeScript") != -1 ? admonition: <>; diff --git a/src/components/WayfindingBoxes/index.js b/src/components/WayfindingBoxes/index.js index e814a1191..8785c7189 100644 --- a/src/components/WayfindingBoxes/index.js +++ b/src/components/WayfindingBoxes/index.js @@ -3,96 +3,150 @@ import clsx from 'clsx'; import Heading from '@theme/Heading'; import Link from '@docusaurus/Link'; import styles from './styles.module.css'; +import Translate, {translate} from '@docusaurus/Translate'; const WayfindingWays = [ { - title: 'Stellar 101', + title: translate({ + message: 'Stellar 101', + id: 'components.WayfindingBoxes.Stellar101.Title' + }), image: require('@site/static/icons/stellar-101.png').default, description: ( - <> + Learn about the core concepts of Stellar in this educational section. - + ), link: ( - Dive In + + Dive In + ), }, { - title: 'Write a Smart Contract', + title: translate({ + message: 'Write a Smart Contract', + id: 'components.WayfindingBoxes.WriteASmartContract.Title' + }), image: require('@site/static/icons/contract.png').default, description: ( - <> + Get set up and write your first smart contract on the Stellar network. - + ), - // temporarily set this to /docs/soroban until "smart contracts" section is done link: ( - Get Started + + Get Started + ), }, { - title: 'Issue an Asset', + title: translate({ + message: 'Issue an Asset', + id: 'components.WayfindingBoxes.IssueAnAsset.Title' + }), image: require('@site/static/icons/issue-assets.png').default, description: ( - <> + Issuing assets on Stellar is easy. Learn how in this tutorial. - + ), link: ( - Issue Asset + + Issue Asset + ), }, { - title: 'Build an Application', + title: translate({ + message: 'Build an Application', + id: 'components.WayfindingBoxes.BuildAnApplication.Title' + }), image: require('@site/static/icons/build-applications.png').default, description: ( - <> + Build an application on Stellar using the Wallet SDK or JS SDK. - + ), link: ( - Get Building + + Get Building + ), }, { - title: 'Developer Tools', + title: translate({ + message: 'Developer Tools', + id: 'components.WayfindingBoxes.DeveloperTools.Title' + }), image: require('@site/static/icons/dev-tools.png').default, description: ( - <> + Stellar has a myriad of community and SDF-maintained tools. Check them out! - + ), link: ( - See Tools + + See Tools + ), }, { - title: 'Access Data', + title: translate({ + message: 'Access Data', + id: 'components.WayfindingBoxes.AccessData.Title' + }), image: require('@site/static/icons/access-data.png').default, description: ( - <> + The RPC, Hubble, and Horizon offer all the data capabilities you could possibly need. - + ), link: ( - Get the Goods + + Get the Goods + ), }, diff --git a/src/css/custom.scss b/src/css/custom.scss index 0825bf70e..a1de0a86c 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -140,6 +140,8 @@ div[class^="announcementBar_"] { var(--site-announcement-bar-stripe-color2) 10px, var(--site-announcement-bar-stripe-color2) 40px ); + + height: fit-content; } /* Navbar customizations */ diff --git a/src/theme/AnnouncementBar/index.tsx b/src/theme/AnnouncementBar/index.tsx new file mode 100644 index 000000000..378e605be --- /dev/null +++ b/src/theme/AnnouncementBar/index.tsx @@ -0,0 +1,21 @@ +import React from 'react'; +import AnnouncementBar from '@theme-original/AnnouncementBar'; +import type AnnouncementBarType from '@theme/AnnouncementBar'; +import type {WrapperProps} from '@docusaurus/types'; +import { useLocation } from '@docusaurus/router'; + +type Props = WrapperProps; + +export default function AnnouncementBarWrapper(props: Props): JSX.Element { + const location = useLocation(); + + if (!location.pathname.startsWith('/es')) { + return null + } + + return ( + <> + + + ); +} diff --git a/src/theme/DocCardList/index.tsx b/src/theme/DocCardList/index.tsx index fa0a857c0..4f502eb57 100644 --- a/src/theme/DocCardList/index.tsx +++ b/src/theme/DocCardList/index.tsx @@ -10,9 +10,9 @@ type Props = WrapperProps; function DocCardListForCurrentSidebarCategory(props: Props): JSX.Element { const category = useCurrentSidebarCategory(); - return category.label === 'Example Contracts' + return (category.label === 'Example Contracts' || category.label === 'Ejemplos de contratos') ? - : category.label === 'How-To Guides' + : (category.label === 'How-To Guides' || category.label === 'Guías de Cómo-Hacer') ? : ; } diff --git a/src/theme/DocItem/Footer/index.tsx b/src/theme/DocItem/Footer/index.tsx index 5bc8efde9..83fadb994 100644 --- a/src/theme/DocItem/Footer/index.tsx +++ b/src/theme/DocItem/Footer/index.tsx @@ -6,18 +6,25 @@ import DocCardList from '@theme/DocCardList'; import type FooterType from '@theme/DocItem/Footer'; import type { WrapperProps } from '@docusaurus/types'; import clsx from 'clsx'; +import Translate from '@docusaurus/Translate'; type Props = WrapperProps; export default function FooterWrapper(props: Props): JSX.Element { const { metadata } = useDoc(); - const canDisplayDocCardsOnGuide = metadata.permalink?.startsWith('/docs/build/guides'); + const canDisplayDocCardsOnGuide = metadata.permalink?.includes('/docs/build/guides'); + const isMainGuidesPage = metadata.id === 'build/guides/README' return ( <> {canDisplayDocCardsOnGuide && -
- {metadata.permalink !== '/docs/build/guides/' &&

Guides in this category:

} +
+ {!isMainGuidesPage &&

+ Guides in this category: +

}
} diff --git a/src/theme/DocSidebar/index.tsx b/src/theme/DocSidebar/index.tsx index 8c18e3205..a89fb693b 100644 --- a/src/theme/DocSidebar/index.tsx +++ b/src/theme/DocSidebar/index.tsx @@ -9,7 +9,12 @@ export default function DocSidebarWrapper(props: Props): JSX.Element { let newProps; // For all `/platforms` and `/docs/data` sidebars, remove the parent category from the sidebar. - if (props.path.startsWith('/platforms') || props.path.startsWith('/docs/data')) { + if ( + props.path.startsWith('/platforms') || + props.path.startsWith('/docs/data') || + props.path.startsWith('/es/platforms') || + props.path.startsWith('/es/docs/data') + ) { newProps = { ...props, }; diff --git a/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx b/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx index a22224fcf..3e6802b74 100644 --- a/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +++ b/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx @@ -21,7 +21,7 @@ export default function DocsVersionDropdownNavbarItemWrapper(props: Props): JSX. * version dropdown for each plugin in your navbarItems config property for * this to work well. */ - if (!(pathname.startsWith('/platforms/anchor-platform') && docsPluginId === 'ap')) { + if (!(pathname.match(/^(\/es)?\/platforms\/anchor-platform/) && docsPluginId === 'ap')) { return null } return ( diff --git a/yarn.lock b/yarn.lock index 216806d5e..9205c9aec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1248,6 +1248,17 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== +"@crowdin/cli@^4.5.0": + version "4.5.0" + resolved "https://registry.yarnpkg.com/@crowdin/cli/-/cli-4.5.0.tgz#c84bde006473fdb6303274ead578e0c5aad994c2" + integrity sha512-faj84fCXT8GcM0CwZ6KuXQ6ckwRHj2OKFFib048RobykRoMFJxXJnu6P/OBjWpcqFFbxWJB0QL0VkS42hqdMng== + dependencies: + command-exists-promise "^2.0.2" + node-fetch "2.7.0" + shelljs "^0.8.5" + tar "^6.2.0" + yauzl "^3.1.0" + "@discoveryjs/json-ext@0.5.7": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" @@ -4041,6 +4052,11 @@ browserslist@^4.0.0, browserslist@^4.18.1, browserslist@^4.21.10, browserslist@^ node-releases "^2.0.14" update-browserslist-db "^1.0.16" +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -4284,6 +4300,11 @@ cheerio@^1.0.0-rc.12: optionalDependencies: fsevents "~2.3.2" +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + chroma-js@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-2.4.2.tgz#dffc214ed0c11fa8eefca2c36651d8e57cbfb2b0" @@ -4441,6 +4462,11 @@ comma-separated-tokens@^2.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee" integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg== +command-exists-promise@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/command-exists-promise/-/command-exists-promise-2.0.2.tgz#7beecc4b218299f3c61fa69a4047aa0b36a64a99" + integrity sha512-T6PB6vdFrwnHXg/I0kivM3DqaCGZLjjYSOe0a5WgFKcz1sOnmOeIjnhQPXVXX3QjVbLyTJ85lJkX6lUpukTzaA== + commander@2.20.3, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -6437,6 +6463,13 @@ fs-extra@^9.0.0, fs-extra@^9.0.1: jsonfile "^6.0.1" universalify "^2.0.0" +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + fs-monkey@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.6.tgz#8ead082953e88d992cf3ff844faa907b26756da2" @@ -9546,11 +9579,36 @@ minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +minipass@^3.0.0: + version "3.3.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + "minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + mobx-react-lite@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/mobx-react-lite/-/mobx-react-lite-4.0.7.tgz#f4e21e18d05c811010dcb1d3007e797924c4d90b" @@ -9693,7 +9751,7 @@ node-fetch-h2@^2.3.0: dependencies: http2-client "^1.2.5" -node-fetch@^2.6.1: +node-fetch@2.7.0, node-fetch@^2.6.1: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -10291,6 +10349,11 @@ pbkdf2@^3.0.3, pbkdf2@^3.1.2: safe-buffer "^5.0.1" sha.js "^2.4.8" +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + perfect-scrollbar@^1.5.5: version "1.5.5" resolved "https://registry.yarnpkg.com/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz#41a211a2fb52a7191eff301432134ea47052b27f" @@ -12593,6 +12656,18 @@ tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== +tar@^6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + terser-webpack-plugin@^5.3.10, terser-webpack-plugin@^5.3.9: version "5.3.10" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" @@ -13751,6 +13826,14 @@ yargs@^17.0.1: y18n "^5.0.5" yargs-parser "^21.1.1" +yauzl@^3.1.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-3.1.3.tgz#f61c17ad1a09403bc7adb01dfb302a9e74bf4a50" + integrity sha512-JCCdmlJJWv7L0q/KylOekyRaUrdEoUxWkWVcgorosTROCFWiS9p2NNPE9Yb91ak7b1N5SxAZEliWpspbZccivw== + dependencies: + buffer-crc32 "~0.2.3" + pend "~1.2.0" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"