diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40190d6bca..023c6e64e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,17 +9,13 @@ on: package_name: description: 'The package name to release (e.g., xrpl, ripple-address-codec)' required: true - dry-run: - description: 'Perform dry run (create draft release and npm publish with dry-run)' - required: false - default: 'true' - type: choice - options: - - 'true' - - 'false' release_branch: description: 'Release branch the release is generated from' required: true + npmjs_dist_tag: + description: 'npm distribution tag(Read more https://docs.npmjs.com/adding-dist-tags-to-packages)' + default: 'latest' + concurrency: group: release cancel-in-progress: true @@ -31,45 +27,46 @@ jobs: outputs: package_version: ${{ steps.get_version.outputs.version }} steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.release_branch }} - fetch-depth: 0 - - name: Validate inputs - run: | - set -euo pipefail - if git ls-remote --exit-code origin "refs/heads/${{ github.event.inputs.release_branch }}" > /dev/null; then - echo "✅ Found release branch: ${{ github.event.inputs.release_branch }}" - else - echo "❌ Release branch ${{ github.event.inputs.release_branch }} not found in remote. Failing workflow." - exit 1 - fi - - if grep -R --exclude-dir=.git --exclude-dir=.github "artifactory.ops.ripple.com" .; then - echo "❌ Internal Artifactory URL found" - exit 1 - else - echo "✅ No Internal Artifactory URL found" - fi - - - name: Get package version from package.json - id: get_version - run: | - set -euo pipefail - PACKAGE_NAME="${{ github.event.inputs.package_name }}" - PKG_JSON="packages/${PACKAGE_NAME}/package.json" - if [[ ! -f "$PKG_JSON" ]]; then - echo "package.json not found at $PKG_JSON. Check 'package_name' input." >&2 - exit 1 - fi - VERSION=$(jq -er .version "$PKG_JSON") - if [[ -z "$VERSION" || "$VERSION" == "null" ]]; then - echo "Version is empty or missing in $PKG_JSON" >&2 - exit 1 - fi - echo "PACKAGE_VERSION=$VERSION" >> "$GITHUB_ENV" - echo "version=$VERSION" >> "$GITHUB_OUTPUT" + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.release_branch }} + fetch-depth: 0 + + - name: Validate inputs + run: | + set -euo pipefail + if git ls-remote --exit-code origin "refs/heads/${{ github.event.inputs.release_branch }}" > /dev/null; then + echo "✅ Found release branch: ${{ github.event.inputs.release_branch }}" + else + echo "❌ Release branch ${{ github.event.inputs.release_branch }} not found in remote. Failing workflow." + exit 1 + fi + + if grep -R --exclude-dir=.git --exclude-dir=.github "artifactory.ops.ripple.com" .; then + echo "❌ Internal Artifactory URL found" + exit 1 + else + echo "✅ No Internal Artifactory URL found" + fi + + - name: Get package version from package.json + id: get_version + run: | + set -euo pipefail + PACKAGE_NAME="${{ github.event.inputs.package_name }}" + PKG_JSON="packages/${PACKAGE_NAME}/package.json" + if [[ ! -f "$PKG_JSON" ]]; then + echo "package.json not found at $PKG_JSON. Check 'package_name' input." >&2 + exit 1 + fi + VERSION=$(jq -er .version "$PKG_JSON") + if [[ -z "$VERSION" || "$VERSION" == "null" ]]; then + echo "Version is empty or missing in $PKG_JSON" >&2 + exit 1 + fi + echo "PACKAGE_VERSION=$VERSION" >> "$GITHUB_ENV" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" run_faucet_test: name: Run faucet tests ${{ needs.get_version.outputs.package_version }} @@ -79,7 +76,6 @@ jobs: git_ref: ${{ github.event.inputs.release_branch }} secrets: inherit - run_tests: name: Run unit/integration tests ${{ needs.get_version.outputs.package_version }} permissions: @@ -96,161 +92,324 @@ jobs: runs-on: ubuntu-latest needs: [get_version, run_faucet_test, run_tests] name: Pre Release Pipeline for ${{ needs.get_version.outputs.package_version }} + permissions: + issues: write env: PACKAGE_VERSION: "${{ needs.get_version.outputs.package_version }}" PACKAGE_NAME: "${{ github.event.inputs.package_name }}" - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.release_branch }} - fetch-depth: 0 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: 'https://registry.npmjs.org' - - - name: Build package - run: | - # dubugging info - npm --version - node --version - ls -l - pwd - - #build - npm ci - npm run build - - - name: Notify Slack if tests fail - if: failure() - env: - SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} - run: | - MESSAGE="❌ Build failed for xrpl.js ${{ env.PACKAGE_VERSION }}. Check the logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - curl -X POST https://slack.com/api/chat.postMessage \ - -H "Authorization: Bearer $SLACK_TOKEN" \ - -H "Content-Type: application/json" \ - -d "$(jq -n \ - --arg channel "#xrpl-js" \ - --arg text "$MESSAGE" \ - '{channel: $channel, text: $text}')" - - - name: Install cyclonedx-npm - run: npm install -g @cyclonedx/cyclonedx-npm - - - name: Generate CycloneDX SBOM - run: cyclonedx-npm --output-format json --output-file sbom.json - - - name: Scan SBOM for vulnerabilities using Trivy - uses: aquasecurity/trivy-action@0.28.0 - with: - scan-type: sbom - scan-ref: sbom.json - format: table - exit-code: 0 - output: vuln-report.txt - severity: CRITICAL,HIGH - - - name: Upload sbom to OWASP - run: | - curl -X POST \ - -H "X-Api-Key: ${{ secrets.OWASP_TOKEN }}" \ - -F "project=7c40c8ea-ea0f-4a5f-9b9f-368e53232397" \ - -F "bom=@sbom.json" \ - https://owasp-dt-api.prod.ripplex.io/api/v1/bom - - - name: Upload SBOM artifact - uses: actions/upload-artifact@v4 - with: - name: sbom - path: sbom.json - - - name: Print scan report - run: cat vuln-report.txt - - - name: Upload vulnerability report artifact - uses: actions/upload-artifact@v4 - with: - name: vulnerability-report - path: vuln-report.txt - - - name: Generate lerna.json for choosen the package - run: | - - echo "🔧 Updating lerna.json to include only packages/${{ env.PACKAGE_NAME }}" - - # Use jq to update the packages field safely - jq --arg pkg "packages/${{ env.PACKAGE_NAME }}" '.packages = [$pkg]' lerna.json > lerna.tmp.json && mv lerna.tmp.json lerna.json - - echo "✅ lerna.json updated:" - cat lerna.json - - - name: Pack tarball - run: | - set -euo pipefail - echo "Packaging ${{ env.PACKAGE_NAME }}" - find "packages/${{ env.PACKAGE_NAME }}" -maxdepth 1 -name '*.tgz' -delete || true - TARBALL=$(npx lerna exec --scope "${{ env.PACKAGE_NAME }}" -- npm pack --json | jq -r '.[0].filename') - echo "TARBALL=packages/${{ env.PACKAGE_NAME }}/${TARBALL}" >> "$GITHUB_ENV" - env: - NPM_CONFIG_USERCONFIG: ${{ runner.temp }}/.npmrc - - - name: Upload tarball as artifact - uses: actions/upload-artifact@v4 - with: - name: npm-package-tarball - path: ${{ env.TARBALL }} + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.release_branch }} + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + + - name: Build package + run: | + # dubugging info + npm i -g npm@11.6.0 + npm --version + node --version + ls -l + pwd + + #build + npm ci + npm run build + + - name: Notify Slack if tests fail + if: failure() + env: + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} + run: | + MESSAGE="❌ Build failed for xrpl.js ${{ env.PACKAGE_VERSION }}. Check the logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + curl -X POST https://slack.com/api/chat.postMessage \ + -H "Authorization: Bearer $SLACK_TOKEN" \ + -H "Content-Type: application/json" \ + -d "$(jq -n \ + --arg channel "#test-alert" \ + --arg text "$MESSAGE" \ + '{channel: $channel, text: $text}')" + + - name: Install cyclonedx-npm + run: npm install -g @cyclonedx/cyclonedx-npm + + - name: Generate CycloneDX SBOM + run: cyclonedx-npm --output-format json --output-file sbom.json + + - name: Scan SBOM for vulnerabilities using Trivy + uses: aquasecurity/trivy-action@0.28.0 + with: + scan-type: sbom + scan-ref: sbom.json + format: table + exit-code: 0 + output: vuln-report.txt + severity: CRITICAL,HIGH + + - name: Upload sbom to OWASP + run: | + curl -X POST \ + -H "X-Api-Key: ${{ secrets.OWASP_TOKEN }}" \ + -F "project=7c40c8ea-ea0f-4a5f-9b9f-368e53232397" \ + -F "bom=@sbom.json" \ + https://owasp-dt-api.prod.ripplex.io/api/v1/bom + + - name: Upload SBOM artifact + uses: actions/upload-artifact@v4 + with: + name: sbom + path: sbom.json + + - name: Print scan report + run: cat vuln-report.txt + + - name: Upload vulnerability report artifact + id: upload_vuln + uses: actions/upload-artifact@v4 + with: + name: vulnerability-report + path: vuln-report.txt + + - name: Build vuln artifact URL + id: vuln_art + run: | + echo "art_url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.upload_vuln.outputs.artifact-id }}" >> "$GITHUB_OUTPUT" + + - name: Check vulnerabilities in report + id: check_vulns + shell: bash + env: + REPORT_PATH: vuln-report.txt # change if different + run: | + set -euo pipefail + if grep -qE "CRITICAL|HIGH" "$REPORT_PATH"; then + echo "found=true" >> "$GITHUB_OUTPUT" + else + echo "found=false" >> "$GITHUB_OUTPUT" + fi + + - name: Create GitHub Issue (links to report artifact) + if: steps.check_vulns.outputs.found == 'true' + shell: bash + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + PKG_NAME: ${{ env.PACKAGE_NAME }} + PKG_VER: ${{ env.PACKAGE_VERSION }} + REL_BRANCH: ${{ github.event.inputs.release_branch }} + VULN_ART_URL: ${{ steps.vuln_art.outputs.art_url }} + LABELS: security + run: | + set -euo pipefail + TITLE="🔒 Security vulnerabilities in ${PKG_NAME}@${PKG_VER}" + : > issue_body.md + + echo "The vulnerability scan has detected **CRITICAL/HIGH** vulnerabilities for \`${PKG_NAME}@${PKG_VER}\` on branch \`${REL_BRANCH}\`." >> issue_body.md + echo "" >> issue_body.md + echo "**Release Branch:** \`${REL_BRANCH}\`" >> issue_body.md + echo "**Package Version:** \`${PKG_VER}\`" >> issue_body.md + echo "" >> issue_body.md + echo "**Full vulnerability report:** ${VULN_ART_URL}" >> issue_body.md + echo "" >> issue_body.md + echo "Please review the report and take necessary action." >> issue_body.md + echo "" >> issue_body.md + echo "---" >> issue_body.md + echo "_This issue was automatically generated by the Release Pipeline._" >> issue_body.md + gh issue create --title "$TITLE" --body-file issue_body.md --label "$LABELS" + + - name: Generate lerna.json for choosen the package + run: | + echo "🔧 Updating lerna.json to include only packages/${{ env.PACKAGE_NAME }}" + # Use jq to update the packages field safely + jq --arg pkg "packages/${{ env.PACKAGE_NAME }}" '.packages = [$pkg]' lerna.json > lerna.tmp.json && mv lerna.tmp.json lerna.json + echo "✅ lerna.json updated:" + cat lerna.json + + - name: Pack tarball + run: | + set -euo pipefail + echo "Packaging ${{ env.PACKAGE_NAME }}" + find "packages/${{ env.PACKAGE_NAME }}" -maxdepth 1 -name '*.tgz' -delete || true + TARBALL=$(npx lerna exec --scope "@shichengsh001/${{ env.PACKAGE_NAME }}" -- npm pack --json | jq -r '.[0].filename') + echo "TARBALL=packages/${{ env.PACKAGE_NAME }}/${TARBALL}" >> "$GITHUB_ENV" + + - name: Upload tarball as artifact + uses: actions/upload-artifact@v4 + with: + name: npm-package-tarball + path: ${{ env.TARBALL }} review: runs-on: ubuntu-latest needs: [get_version, run_faucet_test, run_tests, pre_release] + permissions: + pull-requests: write name: Review test and security scan result env: PACKAGE_VERSION: "${{ needs.get_version.outputs.package_version }}" PACKAGE_NAME: "${{ github.event.inputs.package_name }}" steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.release_branch }} - fetch-depth: 0 - - name: Release summary for review - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: ${{ github.repository }} - RUN_ID: ${{ github.run_id }} - run: | - ARTIFACT_NAME="vulnerability-report" - RELEASE_BRANCH="${{ github.event.inputs.release_branch }}" - COMMIT_SHA="$(git rev-parse --short HEAD)" - - echo "Fetching artifact ID for ${ARTIFACT_NAME}..." - ARTIFACTS=$(curl -s -H "Authorization: Bearer $GH_TOKEN" \ - -H "Accept: application/vnd.github+json" \ - https://api.github.com/repos/$REPO/actions/runs/$RUN_ID/artifacts) - - ARTIFACT_ID=$(echo "$ARTIFACTS" | jq -r ".artifacts[] | select(.name == \"$ARTIFACT_NAME\") | .id") - - if [ -z "$ARTIFACT_ID" ]; then - echo "❌ Artifact not found." - exit 1 - fi - echo "🔍 Please review the following details before proceeding:" - echo "📦 Package Name: $PACKAGE_NAME" - echo "🔖 Package Version: $PACKAGE_VERSION" - echo "🌿 Release Branc: $RELEASE_BRANCH" - echo "🔢 Commit SHA: $COMMIT_SHA" - echo "🔗 Please review Vulnerabilities detected: https://github.com/$REPO/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID" + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.release_branch }} + fetch-depth: 0 + - name: Create PR from release branch to main (skips for rc/beta) + if: ${{ github.event.inputs.npmjs_dist_tag == '' || github.event.inputs.npmjs_dist_tag == 'latest' }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + RELEASE_BRANCH: ${{ github.event.inputs.release_branch }} + VERSION: ${{ needs.get_version.outputs.package_version }} + run: | + set -euo pipefail + + echo "🔎 Checking if a PR already exists for $RELEASE_BRANCH → main…" + OWNER="${REPO%%/*}" + + # List open PRs with base=main and head=OWNER:RELEASE_BRANCH + PRS_JSON="$(gh api \ + -H 'Accept: application/vnd.github+json' \ + "/repos/$REPO/pulls?state=open&base=main&head=${OWNER}:${RELEASE_BRANCH}")" + + PR_NUMBER="$(printf '%s' "$PRS_JSON" | jq -r '.[0].number // empty')" + PR_URL="$(printf '%s' "$PRS_JSON" | jq -r '.[0].html_url // empty')" + + if [ -n "${PR_NUMBER:-}" ]; then + echo "ℹ️ PR already exists: #$PR_NUMBER" + else + echo "📝 Creating PR for release $VERSION from $RELEASE_BRANCH → main" + CREATE_JSON="$(jq -n \ + --arg title "Release $VERSION: $RELEASE_BRANCH → main" \ + --arg head "$RELEASE_BRANCH" \ + --arg base "main" \ + --arg body "Automated PR for release **$VERSION** from **$RELEASE_BRANCH** → **main**. Workflow Run: https://github.com/$REPO/actions/runs/${{ github.run_id }}" \ + '{title:$title, head:$head, base:$base, body:$body}')" + + RESP="$(gh api \ + -H 'Accept: application/vnd.github+json' \ + --method POST \ + /repos/$REPO/pulls \ + --input <(printf '%s' "$CREATE_JSON"))" + + PR_NUMBER="$(printf '%s' "$RESP" | jq -r '.number')" + PR_URL="$(printf '%s' "$RESP" | jq -r '.html_url')" + + # (Optional) add a label to the PR (labels are an Issues API) + gh api \ + -H 'Accept: application/vnd.github+json' \ + --method POST \ + "/repos/$REPO/issues/$PR_NUMBER/labels" \ + --input <(jq -n --arg l "release" '{labels:[$l]}') >/dev/null || true + fi + + echo "PR_URL=$PR_URL" >> "$GITHUB_ENV" + echo "✅ PR URL: $PR_URL" + + - name: Release summary for review + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} + REPO: ${{ github.repository }} + RUN_ID: ${{ github.run_id }} + ENV_NAME: official-release + PACKAGE_NAME: ${{ env.PACKAGE_NAME }} + PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} + NPMJS_DIST_TAG: ${{ github.event.inputs.npmjs_dist_tag }} + GITHUB_ACTOR: ${{ github.actor }} + GITHUB_TRIGGERING_ACTOR: ${{ github.triggering_actor }} + RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + + run: | + set -euo pipefail + ARTIFACT_NAME="vulnerability-report" + RELEASE_BRANCH="${{ github.event.inputs.release_branch }}" + COMMIT_SHA="$(git rev-parse --short HEAD)" + + echo "Fetching artifact ID for ${ARTIFACT_NAME}..." + ARTIFACTS=$(curl -s -H "Authorization: Bearer $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + "https://api.github.com/repos/$REPO/actions/runs/$RUN_ID/artifacts") + + ARTIFACT_ID=$(echo "$ARTIFACTS" | jq -r ".artifacts[] | select(.name == \"$ARTIFACT_NAME\") | .id") + + if [ -z "${ARTIFACT_ID:-}" ]; then + echo "❌ Artifact not found." + exit 1 + fi + + echo "🔍 Please review the following details before proceeding:" + echo "📦 Package Name: $PACKAGE_NAME" + echo "🔖 Package Version: $PACKAGE_VERSION" + echo "🌿 Release Branch: $RELEASE_BRANCH" + echo "🔢 Commit SHA: $COMMIT_SHA" + echo "🔗 Vulnerabilities: https://github.com/$REPO/actions/runs/$RUN_ID/artifacts/$ARTIFACT_ID" + + # executor = the person who triggered the pipeline + EXECUTOR="${GITHUB_TRIGGERING_ACTOR:-$GITHUB_ACTOR}" + + # Fetch environment and extract required reviewers + ENV_JSON="$(curl -sSf \ + -H "Authorization: Bearer $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + "https://api.github.com/repos/$REPO/environments/$ENV_NAME")" + + REVIEWERS="$(printf '%s' "$ENV_JSON" | jq -r ' + (.protection_rules // []) + | map(select(.type=="required_reviewers") | .reviewers // []) + | add // [] + | map( + if .type=="User" then (.reviewer.login) + elif .type=="Team" then (.reviewer.slug) + else (.reviewer.login // .reviewer.slug // "unknown") + end + ) + | unique + | join(", ") + ')" + + if [ -z "$REVIEWERS" ] || [ "$REVIEWERS" = "null" ]; then + REVIEWERS="(no required reviewers configured)" + fi + + # RC detection: skip step 2 if RC (dist-tag starts with rc OR version contains -rc) + INCLUDE_PR_LINE=false + if [ -z "${NPMJS_DIST_TAG:-}" ] || [ "${NPMJS_DIST_TAG:-}" = "latest" ]; then + INCLUDE_PR_LINE=true + fi + + if [ "$INCLUDE_PR_LINE" = true ]; then + STEP2_LINE="2. Review the package update PR and provide two approvals. DO NOT MERGE - ${EXECUTOR} will verify the package on npm registry and merge this approved PR." + printf -v MESSAGE '%s is releasing %s@%s. At least two approvers from (%s) need to take following actions:\n1. Review the release artifacts and approve/reject the release. (%s)\n%s' \ + "$EXECUTOR" "$PACKAGE_NAME" "$PACKAGE_VERSION" "$REVIEWERS" "$RUN_URL" "$STEP2_LINE" + else + printf -v MESSAGE '%s is releasing %s@%s. At least two approvers from (%s) need to take following actions:\n1. Review the release artifacts and approve/reject the release. (%s)' \ + "$EXECUTOR" "$PACKAGE_NAME" "$PACKAGE_VERSION" "$REVIEWERS" "$RUN_URL" + fi + + echo "$MESSAGE" + + # Post to Slack (channel can be changed as needed) + curl -sS -X POST https://slack.com/api/chat.postMessage \ + -H "Authorization: Bearer $SLACK_TOKEN" \ + -H "Content-Type: application/json; charset=utf-8" \ + -d "$(jq -n \ + --arg channel "#test-alert" \ + --arg text "$MESSAGE" \ + '{channel: $channel, text: $text}')" release: runs-on: ubuntu-latest permissions: - id-token: write - contents: write + id-token: write + contents: write needs: [get_version, run_faucet_test, run_tests, pre_release, review] name: Release Pipeline for ${{ needs.get_version.outputs.package_version }} env: @@ -260,94 +419,97 @@ jobs: name: official-release url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.release_branch }} - fetch-depth: 0 - - - name: Ensure Git tag exists - id: create_tag - run: | - set -euo pipefail - BASE_TAG="${{ env.PACKAGE_NAME }}@${{ env.PACKAGE_VERSION }}" - DRY_RUN="${{ github.event.inputs.dry-run }}" - TAG="$BASE_TAG" - - if [ "$DRY_RUN" = "true" ]; then - TAG="draft-$BASE_TAG" - fi - - git fetch --tags origin - - if git rev-parse "$TAG" >/dev/null 2>&1 && [ "$DRY_RUN" != "true" ]; then - echo "❌ Tag $TAG already exists (not a draft). Failing." - exit 1 - fi - - echo "🔖 Tagging $TAG" - git tag -f "$TAG" - git push origin -f "$TAG" - - echo "tag_name=$TAG" >> "$GITHUB_OUTPUT" - - - name: Create GitHub release - uses: softprops/action-gh-release@v2 - with: - tag_name: "${{ steps.create_tag.outputs.tag_name }}" - name: "${{ steps.create_tag.outputs.tag_name }}" - draft: ${{ github.event.inputs.dry-run == 'true' }} - generate_release_notes: true - make_latest: ${{ github.event.inputs.dry-run != 'true' }} - - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: npm-package-tarball - path: dist - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: 'https://registry.npmjs.org/' - - name: Publish to npm - run: | - cd dist - PKG=$(ls *.tgz) - echo $PKG - if [[ "${{ github.event.inputs.dry-run }}" == "true" ]]; then - npm publish "$PKG" --provenance --access public --registry=https://registry.npmjs.org/ --dry-run - else - npm publish "$PKG" --provenance --access public --registry=https://registry.npmjs.org/ - fi - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Notify Slack success - if: success() - env: - SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} - run: | - MESSAGE="✅ Released xrpl.js v${{ env.PACKAGE_VERSION }}. Published to npm and GitHub successfully." - curl -X POST https://slack.com/api/chat.postMessage \ - -H "Authorization: Bearer $SLACK_TOKEN" \ - -H "Content-Type: application/json" \ - -d "$(jq -n \ - --arg channel "#xrpl-js" \ - --arg text "$MESSAGE" \ - '{channel: $channel, text: $text}')" - - - name: Notify Slack if tests fail - if: failure() - env: - SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} - run: | - MESSAGE="❌ Tests failed for xrpl.js ${{ env.PACKAGE_VERSION }}. Check the logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - curl -X POST https://slack.com/api/chat.postMessage \ - -H "Authorization: Bearer $SLACK_TOKEN" \ - -H "Content-Type: application/json" \ - -d "$(jq -n \ - --arg channel "#xrpl-js" \ - --arg text "$MESSAGE" \ - '{channel: $channel, text: $text}')" + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.release_branch }} + fetch-depth: 0 + + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: npm-package-tarball + path: dist + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org/' + + - name: Publish to npm + run: | + cd dist + PKG=$(ls *.tgz) + echo $PKG + NPM_DIST_TAG="${{ github.event.inputs.npmjs_dist_tag }}" + if [ -z "$NPM_DIST_TAG" ]; then + NPM_DIST_TAG="latest" + fi + npm i -g npm@11.6.0 + npm publish "$PKG" --provenance --access public --registry=https://registry.npmjs.org/ --tag "$NPM_DIST_TAG" + + - name: Ensure Git tag exists + id: create_tag + run: | + set -euo pipefail + TAG="${{ env.PACKAGE_NAME }}@${{ env.PACKAGE_VERSION }}" + + git fetch --tags origin + + if git rev-parse "$TAG" >/dev/null 2>&1 ; then + echo "❌ Tag $TAG already exists (not a draft). Failing." + exit 1 + fi + + echo "🔖 Tagging $TAG" + git tag -f "$TAG" + git push origin -f "$TAG" + + echo "tag_name=$TAG" >> "$GITHUB_OUTPUT" + + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + tag_name: "${{ steps.create_tag.outputs.tag_name }}" + name: "${{ steps.create_tag.outputs.tag_name }}" + draft: false + generate_release_notes: true + make_latest: true + + - name: Notify Slack success (single-line) + if: success() + env: + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} + REPO: ${{ github.repository }} + PACKAGE_NAME: ${{ env.PACKAGE_NAME }} + PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} + TAG: ${{ steps.create_tag.outputs.tag_name }} + run: | + set -euo pipefail + + # Build release URL from tag (URL-encoded to handle '@' etc.) + enc_tag="$(printf '%s' "$TAG" | jq -sRr @uri)" + RELEASE_URL="https://github.com/$REPO/releases/tag/$enc_tag" + + text="${PACKAGE_NAME} ${PACKAGE_VERSION} has been succesfully released and published to npm.js. Release URL: ${RELEASE_URL}" + text="${text//\\n/ }" + + curl -sS -X POST https://slack.com/api/chat.postMessage \ + -H "Authorization: Bearer $SLACK_TOKEN" \ + -H "Content-Type: application/json; charset=utf-8" \ + -d "$(jq -n --arg channel "#test-alert" --arg text "$text" '{channel:$channel, text:$text}')" + + - name: Notify Slack if tests fail + if: failure() + env: + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} + run: | + MESSAGE="❌ Tests failed for xrpl.js ${{ env.PACKAGE_VERSION }}. Check the logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + curl -X POST https://slack.com/api/chat.postMessage \ + -H "Authorization: Bearer $SLACK_TOKEN" \ + -H "Content-Type: application/json" \ + -d "$(jq -n \ + --arg channel "#test-alert" \ + --arg text "$MESSAGE" \ + '{channel: $channel, text: $text}')" diff --git a/package-lock.json b/package-lock.json index 3e6a7b2cda..e14b5ddf6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2688,6 +2688,14 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@shichengsh001/isomorphic": { + "resolved": "packages/isomorphic", + "link": true + }, + "node_modules/@shichengsh001/secret-numbers": { + "resolved": "packages/secret-numbers", + "link": true + }, "node_modules/@shikijs/engine-oniguruma": { "version": "3.9.2", "dev": true, @@ -4530,6 +4538,14 @@ "node": "*" } }, + "node_modules/cheng-ripple-binary-codec": { + "resolved": "packages/cheng-ripple-binary-codec", + "link": true + }, + "node_modules/cheng-xrpl": { + "resolved": "packages/xrpl", + "link": true + }, "node_modules/chokidar": { "version": "3.6.0", "dev": true, @@ -15261,9 +15277,62 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/isomorphic": { - "name": "@xrplf/isomorphic", + "packages/cheng-ripple-binary-codec": { + "version": "2.5.2", + "license": "ISC", + "dependencies": { + "@xrplf/isomorphic": "^1.0.1", + "bignumber.js": "^9.0.0", + "ripple-address-codec": "^5.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "packages/cheng-ripple-binary-codec/node_modules/@xrplf/isomorphic": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.1.tgz", + "integrity": "sha512-0bIpgx8PDjYdrLFeC3csF305QQ1L7sxaWnL5y71mCvhenZzJgku9QsA+9QCXBC1eNYtxWO/xR91zrXJy2T/ixg==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.0.0", + "eventemitter3": "5.0.1", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "packages/cheng-ripple-binary-codec/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "packages/cheng-ripple-binary-codec/node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "packages/isomorphic": { + "name": "@shichengsh001/isomorphic", + "version": "3.0.0", "license": "ISC", "dependencies": { "@noble/hashes": "^1.0.0", @@ -15306,14 +15375,56 @@ "license": "ISC", "dependencies": { "@scure/base": "^1.1.3", - "@xrplf/isomorphic": "^1.0.1" + "@shichengsh001/isomorphic": "^2.0.0-rc.1" }, "engines": { "node": ">= 18" } }, + "packages/ripple-address-codec/node_modules/@shichengsh001/isomorphic": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@shichengsh001/isomorphic/-/isomorphic-2.0.0-rc.1.tgz", + "integrity": "sha512-xUrv3d6/HQdKFWJRu7HJc1AZ6kGkAINPSQjOhHOIy7PjjGsdQCRTDkVNVdzCK5WOpcsjFIUoBAFX3fBUEzkUwg==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.0.0", + "eventemitter3": "5.0.1", + "ws": "^8.17.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "packages/ripple-address-codec/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "packages/ripple-address-codec/node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "packages/ripple-binary-codec": { - "version": "2.5.0", + "name": "cheng-ripple-binary-codec", + "version": "2.5.1", "license": "ISC", "dependencies": { "@xrplf/isomorphic": "^1.0.1", @@ -15324,6 +15435,47 @@ "node": ">= 18" } }, + "packages/ripple-binary-codec/node_modules/@xrplf/isomorphic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.1.tgz", + "integrity": "sha512-0bIpgx8PDjYdrLFeC3csF305QQ1L7sxaWnL5y71mCvhenZzJgku9QsA+9QCXBC1eNYtxWO/xR91zrXJy2T/ixg==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.0.0", + "eventemitter3": "5.0.1", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "packages/ripple-binary-codec/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "packages/ripple-binary-codec/node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "packages/ripple-keypairs": { "version": "2.0.0", "license": "ISC", @@ -15336,8 +15488,49 @@ "node": ">= 18" } }, + "packages/ripple-keypairs/node_modules/@xrplf/isomorphic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.1.tgz", + "integrity": "sha512-0bIpgx8PDjYdrLFeC3csF305QQ1L7sxaWnL5y71mCvhenZzJgku9QsA+9QCXBC1eNYtxWO/xR91zrXJy2T/ixg==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.0.0", + "eventemitter3": "5.0.1", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "packages/ripple-keypairs/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "packages/ripple-keypairs/node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "packages/secret-numbers": { - "name": "@xrplf/secret-numbers", + "name": "@shichengsh001/secret-numbers", "version": "2.0.0", "license": "ISC", "dependencies": { @@ -15345,18 +15538,60 @@ "ripple-keypairs": "^2.0.0" } }, + "packages/secret-numbers/node_modules/@xrplf/isomorphic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.1.tgz", + "integrity": "sha512-0bIpgx8PDjYdrLFeC3csF305QQ1L7sxaWnL5y71mCvhenZzJgku9QsA+9QCXBC1eNYtxWO/xR91zrXJy2T/ixg==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.0.0", + "eventemitter3": "5.0.1", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "packages/secret-numbers/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" + }, + "packages/secret-numbers/node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "packages/xrpl": { + "name": "cheng-xrpl", "version": "4.4.1", "license": "ISC", "dependencies": { "@scure/bip32": "^1.3.1", "@scure/bip39": "^1.2.1", - "@xrplf/isomorphic": "^1.0.1", - "@xrplf/secret-numbers": "^2.0.0", + "@shichengsh001/isomorphic": "^2.0.0-rc.1", + "@shichengsh001/secret-numbers": "^2.0.0", "bignumber.js": "^9.0.0", + "cheng-ripple-binary-codec": "^2.5.1", "eventemitter3": "^5.0.1", "ripple-address-codec": "^5.0.0", - "ripple-binary-codec": "^2.5.0", "ripple-keypairs": "^2.0.0" }, "devDependencies": { @@ -15377,6 +15612,20 @@ "node": ">=18.0.0" } }, + "packages/xrpl/node_modules/@shichengsh001/isomorphic": { + "version": "2.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@shichengsh001/isomorphic/-/isomorphic-2.0.0-rc.1.tgz", + "integrity": "sha512-xUrv3d6/HQdKFWJRu7HJc1AZ6kGkAINPSQjOhHOIy7PjjGsdQCRTDkVNVdzCK5WOpcsjFIUoBAFX3fBUEzkUwg==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.0.0", + "eventemitter3": "5.0.1", + "ws": "^8.17.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, "packages/xrpl/node_modules/agent-base": { "version": "7.1.0", "dev": true, @@ -15390,7 +15639,6 @@ }, "packages/xrpl/node_modules/eventemitter3": { "version": "5.0.1", - "dev": true, "license": "MIT" }, "packages/xrpl/node_modules/https-proxy-agent": { @@ -15407,7 +15655,6 @@ }, "packages/xrpl/node_modules/ws": { "version": "8.18.3", - "dev": true, "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/packages/ripple-binary-codec/CONTRIBUTING.md b/packages/cheng-ripple-binary-codec/CONTRIBUTING.md similarity index 100% rename from packages/ripple-binary-codec/CONTRIBUTING.md rename to packages/cheng-ripple-binary-codec/CONTRIBUTING.md diff --git a/packages/ripple-binary-codec/HISTORY.md b/packages/cheng-ripple-binary-codec/HISTORY.md similarity index 100% rename from packages/ripple-binary-codec/HISTORY.md rename to packages/cheng-ripple-binary-codec/HISTORY.md diff --git a/packages/ripple-binary-codec/LICENSE b/packages/cheng-ripple-binary-codec/LICENSE similarity index 100% rename from packages/ripple-binary-codec/LICENSE rename to packages/cheng-ripple-binary-codec/LICENSE diff --git a/packages/ripple-binary-codec/README.md b/packages/cheng-ripple-binary-codec/README.md similarity index 100% rename from packages/ripple-binary-codec/README.md rename to packages/cheng-ripple-binary-codec/README.md diff --git a/packages/ripple-binary-codec/eslint.config.js b/packages/cheng-ripple-binary-codec/eslint.config.js similarity index 100% rename from packages/ripple-binary-codec/eslint.config.js rename to packages/cheng-ripple-binary-codec/eslint.config.js diff --git a/packages/ripple-binary-codec/jest.config.js b/packages/cheng-ripple-binary-codec/jest.config.js similarity index 100% rename from packages/ripple-binary-codec/jest.config.js rename to packages/cheng-ripple-binary-codec/jest.config.js diff --git a/packages/ripple-binary-codec/karma.config.js b/packages/cheng-ripple-binary-codec/karma.config.js similarity index 100% rename from packages/ripple-binary-codec/karma.config.js rename to packages/cheng-ripple-binary-codec/karma.config.js diff --git a/packages/ripple-binary-codec/package.json b/packages/cheng-ripple-binary-codec/package.json similarity index 87% rename from packages/ripple-binary-codec/package.json rename to packages/cheng-ripple-binary-codec/package.json index 63030e59db..702930acd4 100644 --- a/packages/ripple-binary-codec/package.json +++ b/packages/cheng-ripple-binary-codec/package.json @@ -1,6 +1,6 @@ { - "name": "ripple-binary-codec", - "version": "2.5.0", + "name": "cheng-ripple-binary-codec", + "version": "2.5.2", "description": "XRP Ledger binary codec", "files": [ "dist/*", @@ -32,7 +32,7 @@ ], "repository": { "type": "git", - "url": "git@github.com:XRPLF/xrpl.js.git" + "url": "git@github.com:xpring-eng/xrpl.js.git" }, "bugs": { "url": "https://github.com/XRPLF/xrpl.js/issues" @@ -43,5 +43,6 @@ "prettier": "@xrplf/prettier-config", "engines": { "node": ">= 18" - } + }, + "gitHead": "9ecf80ce3767e32a9009a14e4ec2f38f71c3acb3" } diff --git a/packages/ripple-binary-codec/src/README.md b/packages/cheng-ripple-binary-codec/src/README.md similarity index 100% rename from packages/ripple-binary-codec/src/README.md rename to packages/cheng-ripple-binary-codec/src/README.md diff --git a/packages/ripple-binary-codec/src/binary.ts b/packages/cheng-ripple-binary-codec/src/binary.ts similarity index 100% rename from packages/ripple-binary-codec/src/binary.ts rename to packages/cheng-ripple-binary-codec/src/binary.ts diff --git a/packages/ripple-binary-codec/src/coretypes.ts b/packages/cheng-ripple-binary-codec/src/coretypes.ts similarity index 100% rename from packages/ripple-binary-codec/src/coretypes.ts rename to packages/cheng-ripple-binary-codec/src/coretypes.ts diff --git a/packages/ripple-binary-codec/src/enums/README.md b/packages/cheng-ripple-binary-codec/src/enums/README.md similarity index 100% rename from packages/ripple-binary-codec/src/enums/README.md rename to packages/cheng-ripple-binary-codec/src/enums/README.md diff --git a/packages/ripple-binary-codec/src/enums/bytes.ts b/packages/cheng-ripple-binary-codec/src/enums/bytes.ts similarity index 100% rename from packages/ripple-binary-codec/src/enums/bytes.ts rename to packages/cheng-ripple-binary-codec/src/enums/bytes.ts diff --git a/packages/ripple-binary-codec/src/enums/constants.ts b/packages/cheng-ripple-binary-codec/src/enums/constants.ts similarity index 100% rename from packages/ripple-binary-codec/src/enums/constants.ts rename to packages/cheng-ripple-binary-codec/src/enums/constants.ts diff --git a/packages/ripple-binary-codec/src/enums/definitions.json b/packages/cheng-ripple-binary-codec/src/enums/definitions.json similarity index 100% rename from packages/ripple-binary-codec/src/enums/definitions.json rename to packages/cheng-ripple-binary-codec/src/enums/definitions.json diff --git a/packages/ripple-binary-codec/src/enums/field.ts b/packages/cheng-ripple-binary-codec/src/enums/field.ts similarity index 100% rename from packages/ripple-binary-codec/src/enums/field.ts rename to packages/cheng-ripple-binary-codec/src/enums/field.ts diff --git a/packages/ripple-binary-codec/src/enums/index.ts b/packages/cheng-ripple-binary-codec/src/enums/index.ts similarity index 100% rename from packages/ripple-binary-codec/src/enums/index.ts rename to packages/cheng-ripple-binary-codec/src/enums/index.ts diff --git a/packages/ripple-binary-codec/src/enums/utils-renumber.ts b/packages/cheng-ripple-binary-codec/src/enums/utils-renumber.ts similarity index 100% rename from packages/ripple-binary-codec/src/enums/utils-renumber.ts rename to packages/cheng-ripple-binary-codec/src/enums/utils-renumber.ts diff --git a/packages/ripple-binary-codec/src/enums/xrpl-definitions-base.ts b/packages/cheng-ripple-binary-codec/src/enums/xrpl-definitions-base.ts similarity index 100% rename from packages/ripple-binary-codec/src/enums/xrpl-definitions-base.ts rename to packages/cheng-ripple-binary-codec/src/enums/xrpl-definitions-base.ts diff --git a/packages/ripple-binary-codec/src/enums/xrpl-definitions.ts b/packages/cheng-ripple-binary-codec/src/enums/xrpl-definitions.ts similarity index 100% rename from packages/ripple-binary-codec/src/enums/xrpl-definitions.ts rename to packages/cheng-ripple-binary-codec/src/enums/xrpl-definitions.ts diff --git a/packages/ripple-binary-codec/src/hash-prefixes.ts b/packages/cheng-ripple-binary-codec/src/hash-prefixes.ts similarity index 100% rename from packages/ripple-binary-codec/src/hash-prefixes.ts rename to packages/cheng-ripple-binary-codec/src/hash-prefixes.ts diff --git a/packages/ripple-binary-codec/src/hashes.ts b/packages/cheng-ripple-binary-codec/src/hashes.ts similarity index 96% rename from packages/ripple-binary-codec/src/hashes.ts rename to packages/cheng-ripple-binary-codec/src/hashes.ts index ad5e4c3b6c..de63d5dde1 100644 --- a/packages/ripple-binary-codec/src/hashes.ts +++ b/packages/cheng-ripple-binary-codec/src/hashes.ts @@ -57,6 +57,7 @@ class Sha512Half extends BytesList { * @returns the sha512half hash of the arguments. */ function sha512Half(...args: Uint8Array[]): Uint8Array { + console.log('xrpl automated release testing xxx2.5.2') const hash = new Sha512Half() args.forEach((a) => hash.put(a)) return hash.finish256() diff --git a/packages/ripple-binary-codec/src/index.ts b/packages/cheng-ripple-binary-codec/src/index.ts similarity index 100% rename from packages/ripple-binary-codec/src/index.ts rename to packages/cheng-ripple-binary-codec/src/index.ts diff --git a/packages/ripple-binary-codec/src/ledger-hashes.ts b/packages/cheng-ripple-binary-codec/src/ledger-hashes.ts similarity index 100% rename from packages/ripple-binary-codec/src/ledger-hashes.ts rename to packages/cheng-ripple-binary-codec/src/ledger-hashes.ts diff --git a/packages/ripple-binary-codec/src/quality.ts b/packages/cheng-ripple-binary-codec/src/quality.ts similarity index 100% rename from packages/ripple-binary-codec/src/quality.ts rename to packages/cheng-ripple-binary-codec/src/quality.ts diff --git a/packages/ripple-binary-codec/src/serdes/binary-parser.ts b/packages/cheng-ripple-binary-codec/src/serdes/binary-parser.ts similarity index 100% rename from packages/ripple-binary-codec/src/serdes/binary-parser.ts rename to packages/cheng-ripple-binary-codec/src/serdes/binary-parser.ts diff --git a/packages/ripple-binary-codec/src/serdes/binary-serializer.ts b/packages/cheng-ripple-binary-codec/src/serdes/binary-serializer.ts similarity index 100% rename from packages/ripple-binary-codec/src/serdes/binary-serializer.ts rename to packages/cheng-ripple-binary-codec/src/serdes/binary-serializer.ts diff --git a/packages/ripple-binary-codec/src/shamap.ts b/packages/cheng-ripple-binary-codec/src/shamap.ts similarity index 100% rename from packages/ripple-binary-codec/src/shamap.ts rename to packages/cheng-ripple-binary-codec/src/shamap.ts diff --git a/packages/ripple-binary-codec/src/types/account-id.ts b/packages/cheng-ripple-binary-codec/src/types/account-id.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/account-id.ts rename to packages/cheng-ripple-binary-codec/src/types/account-id.ts diff --git a/packages/ripple-binary-codec/src/types/amount.ts b/packages/cheng-ripple-binary-codec/src/types/amount.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/amount.ts rename to packages/cheng-ripple-binary-codec/src/types/amount.ts diff --git a/packages/ripple-binary-codec/src/types/blob.ts b/packages/cheng-ripple-binary-codec/src/types/blob.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/blob.ts rename to packages/cheng-ripple-binary-codec/src/types/blob.ts diff --git a/packages/ripple-binary-codec/src/types/currency.ts b/packages/cheng-ripple-binary-codec/src/types/currency.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/currency.ts rename to packages/cheng-ripple-binary-codec/src/types/currency.ts diff --git a/packages/ripple-binary-codec/src/types/hash-128.ts b/packages/cheng-ripple-binary-codec/src/types/hash-128.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/hash-128.ts rename to packages/cheng-ripple-binary-codec/src/types/hash-128.ts diff --git a/packages/ripple-binary-codec/src/types/hash-160.ts b/packages/cheng-ripple-binary-codec/src/types/hash-160.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/hash-160.ts rename to packages/cheng-ripple-binary-codec/src/types/hash-160.ts diff --git a/packages/ripple-binary-codec/src/types/hash-192.ts b/packages/cheng-ripple-binary-codec/src/types/hash-192.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/hash-192.ts rename to packages/cheng-ripple-binary-codec/src/types/hash-192.ts diff --git a/packages/ripple-binary-codec/src/types/hash-256.ts b/packages/cheng-ripple-binary-codec/src/types/hash-256.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/hash-256.ts rename to packages/cheng-ripple-binary-codec/src/types/hash-256.ts diff --git a/packages/ripple-binary-codec/src/types/hash.ts b/packages/cheng-ripple-binary-codec/src/types/hash.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/hash.ts rename to packages/cheng-ripple-binary-codec/src/types/hash.ts diff --git a/packages/ripple-binary-codec/src/types/index.ts b/packages/cheng-ripple-binary-codec/src/types/index.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/index.ts rename to packages/cheng-ripple-binary-codec/src/types/index.ts diff --git a/packages/ripple-binary-codec/src/types/issue.ts b/packages/cheng-ripple-binary-codec/src/types/issue.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/issue.ts rename to packages/cheng-ripple-binary-codec/src/types/issue.ts diff --git a/packages/ripple-binary-codec/src/types/path-set.ts b/packages/cheng-ripple-binary-codec/src/types/path-set.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/path-set.ts rename to packages/cheng-ripple-binary-codec/src/types/path-set.ts diff --git a/packages/ripple-binary-codec/src/types/serialized-type.ts b/packages/cheng-ripple-binary-codec/src/types/serialized-type.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/serialized-type.ts rename to packages/cheng-ripple-binary-codec/src/types/serialized-type.ts diff --git a/packages/ripple-binary-codec/src/types/st-array.ts b/packages/cheng-ripple-binary-codec/src/types/st-array.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/st-array.ts rename to packages/cheng-ripple-binary-codec/src/types/st-array.ts diff --git a/packages/ripple-binary-codec/src/types/st-number.ts b/packages/cheng-ripple-binary-codec/src/types/st-number.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/st-number.ts rename to packages/cheng-ripple-binary-codec/src/types/st-number.ts diff --git a/packages/ripple-binary-codec/src/types/st-object.ts b/packages/cheng-ripple-binary-codec/src/types/st-object.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/st-object.ts rename to packages/cheng-ripple-binary-codec/src/types/st-object.ts diff --git a/packages/ripple-binary-codec/src/types/uint-16.ts b/packages/cheng-ripple-binary-codec/src/types/uint-16.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/uint-16.ts rename to packages/cheng-ripple-binary-codec/src/types/uint-16.ts diff --git a/packages/ripple-binary-codec/src/types/uint-32.ts b/packages/cheng-ripple-binary-codec/src/types/uint-32.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/uint-32.ts rename to packages/cheng-ripple-binary-codec/src/types/uint-32.ts diff --git a/packages/ripple-binary-codec/src/types/uint-64.ts b/packages/cheng-ripple-binary-codec/src/types/uint-64.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/uint-64.ts rename to packages/cheng-ripple-binary-codec/src/types/uint-64.ts diff --git a/packages/ripple-binary-codec/src/types/uint-8.ts b/packages/cheng-ripple-binary-codec/src/types/uint-8.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/uint-8.ts rename to packages/cheng-ripple-binary-codec/src/types/uint-8.ts diff --git a/packages/ripple-binary-codec/src/types/uint.ts b/packages/cheng-ripple-binary-codec/src/types/uint.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/uint.ts rename to packages/cheng-ripple-binary-codec/src/types/uint.ts diff --git a/packages/ripple-binary-codec/src/types/vector-256.ts b/packages/cheng-ripple-binary-codec/src/types/vector-256.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/vector-256.ts rename to packages/cheng-ripple-binary-codec/src/types/vector-256.ts diff --git a/packages/ripple-binary-codec/src/types/xchain-bridge.ts b/packages/cheng-ripple-binary-codec/src/types/xchain-bridge.ts similarity index 100% rename from packages/ripple-binary-codec/src/types/xchain-bridge.ts rename to packages/cheng-ripple-binary-codec/src/types/xchain-bridge.ts diff --git a/packages/ripple-binary-codec/src/utils.ts b/packages/cheng-ripple-binary-codec/src/utils.ts similarity index 100% rename from packages/ripple-binary-codec/src/utils.ts rename to packages/cheng-ripple-binary-codec/src/utils.ts diff --git a/packages/ripple-binary-codec/test/amount.test.ts b/packages/cheng-ripple-binary-codec/test/amount.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/amount.test.ts rename to packages/cheng-ripple-binary-codec/test/amount.test.ts diff --git a/packages/ripple-binary-codec/test/binary-json.test.ts b/packages/cheng-ripple-binary-codec/test/binary-json.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/binary-json.test.ts rename to packages/cheng-ripple-binary-codec/test/binary-json.test.ts diff --git a/packages/ripple-binary-codec/test/binary-parser.test.ts b/packages/cheng-ripple-binary-codec/test/binary-parser.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/binary-parser.test.ts rename to packages/cheng-ripple-binary-codec/test/binary-parser.test.ts diff --git a/packages/ripple-binary-codec/test/binary-serializer.test.ts b/packages/cheng-ripple-binary-codec/test/binary-serializer.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/binary-serializer.test.ts rename to packages/cheng-ripple-binary-codec/test/binary-serializer.test.ts diff --git a/packages/ripple-binary-codec/test/definitions.test.ts b/packages/cheng-ripple-binary-codec/test/definitions.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/definitions.test.ts rename to packages/cheng-ripple-binary-codec/test/definitions.test.ts diff --git a/packages/ripple-binary-codec/test/fixtures/codec-fixtures.json b/packages/cheng-ripple-binary-codec/test/fixtures/codec-fixtures.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/codec-fixtures.json rename to packages/cheng-ripple-binary-codec/test/fixtures/codec-fixtures.json diff --git a/packages/ripple-binary-codec/test/fixtures/data-driven-tests.json b/packages/cheng-ripple-binary-codec/test/fixtures/data-driven-tests.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/data-driven-tests.json rename to packages/cheng-ripple-binary-codec/test/fixtures/data-driven-tests.json diff --git a/packages/ripple-binary-codec/test/fixtures/delivermin-tx-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/delivermin-tx-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/delivermin-tx-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/delivermin-tx-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/delivermin-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/delivermin-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/delivermin-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/delivermin-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/deposit-preauth-tx-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/deposit-preauth-tx-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/deposit-preauth-tx-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/deposit-preauth-tx-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/deposit-preauth-tx-meta-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/deposit-preauth-tx-meta-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/deposit-preauth-tx-meta-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/deposit-preauth-tx-meta-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/deposit-preauth-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/deposit-preauth-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/deposit-preauth-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/deposit-preauth-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/escrow-cancel-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/escrow-cancel-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/escrow-cancel-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/escrow-cancel-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/escrow-cancel-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/escrow-cancel-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/escrow-cancel-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/escrow-cancel-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/escrow-create-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/escrow-create-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/escrow-create-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/escrow-create-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/escrow-create-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/escrow-create-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/escrow-create-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/escrow-create-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/escrow-finish-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/escrow-finish-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/escrow-finish-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/escrow-finish-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/escrow-finish-meta-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/escrow-finish-meta-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/escrow-finish-meta-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/escrow-finish-meta-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/escrow-finish-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/escrow-finish-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/escrow-finish-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/escrow-finish-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/ledger-full-38129.json b/packages/cheng-ripple-binary-codec/test/fixtures/ledger-full-38129.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/ledger-full-38129.json rename to packages/cheng-ripple-binary-codec/test/fixtures/ledger-full-38129.json diff --git a/packages/ripple-binary-codec/test/fixtures/ledger-full-40000.json b/packages/cheng-ripple-binary-codec/test/fixtures/ledger-full-40000.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/ledger-full-40000.json rename to packages/cheng-ripple-binary-codec/test/fixtures/ledger-full-40000.json diff --git a/packages/ripple-binary-codec/test/fixtures/negative-unl.json b/packages/cheng-ripple-binary-codec/test/fixtures/negative-unl.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/negative-unl.json rename to packages/cheng-ripple-binary-codec/test/fixtures/negative-unl.json diff --git a/packages/ripple-binary-codec/test/fixtures/nf-token.json b/packages/cheng-ripple-binary-codec/test/fixtures/nf-token.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/nf-token.json rename to packages/cheng-ripple-binary-codec/test/fixtures/nf-token.json diff --git a/packages/ripple-binary-codec/test/fixtures/payment-channel-claim-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-claim-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/payment-channel-claim-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-claim-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/payment-channel-claim-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-claim-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/payment-channel-claim-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-claim-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/payment-channel-create-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-create-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/payment-channel-create-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-create-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/payment-channel-create-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-create-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/payment-channel-create-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-create-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/payment-channel-fund-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-fund-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/payment-channel-fund-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-fund-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/payment-channel-fund-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-fund-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/payment-channel-fund-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/payment-channel-fund-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/signerlistset-tx-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/signerlistset-tx-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/signerlistset-tx-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/signerlistset-tx-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/signerlistset-tx-meta-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/signerlistset-tx-meta-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/signerlistset-tx-meta-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/signerlistset-tx-meta-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/signerlistset-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/signerlistset-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/signerlistset-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/signerlistset-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/ticket-create-binary.json b/packages/cheng-ripple-binary-codec/test/fixtures/ticket-create-binary.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/ticket-create-binary.json rename to packages/cheng-ripple-binary-codec/test/fixtures/ticket-create-binary.json diff --git a/packages/ripple-binary-codec/test/fixtures/ticket-create-tx.json b/packages/cheng-ripple-binary-codec/test/fixtures/ticket-create-tx.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/ticket-create-tx.json rename to packages/cheng-ripple-binary-codec/test/fixtures/ticket-create-tx.json diff --git a/packages/ripple-binary-codec/test/fixtures/x-codec-fixtures.json b/packages/cheng-ripple-binary-codec/test/fixtures/x-codec-fixtures.json similarity index 100% rename from packages/ripple-binary-codec/test/fixtures/x-codec-fixtures.json rename to packages/cheng-ripple-binary-codec/test/fixtures/x-codec-fixtures.json diff --git a/packages/ripple-binary-codec/test/hash.test.ts b/packages/cheng-ripple-binary-codec/test/hash.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/hash.test.ts rename to packages/cheng-ripple-binary-codec/test/hash.test.ts diff --git a/packages/ripple-binary-codec/test/issue.test.ts b/packages/cheng-ripple-binary-codec/test/issue.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/issue.test.ts rename to packages/cheng-ripple-binary-codec/test/issue.test.ts diff --git a/packages/ripple-binary-codec/test/ledger.test.ts b/packages/cheng-ripple-binary-codec/test/ledger.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/ledger.test.ts rename to packages/cheng-ripple-binary-codec/test/ledger.test.ts diff --git a/packages/ripple-binary-codec/test/lower-case-hex.test.ts b/packages/cheng-ripple-binary-codec/test/lower-case-hex.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/lower-case-hex.test.ts rename to packages/cheng-ripple-binary-codec/test/lower-case-hex.test.ts diff --git a/packages/ripple-binary-codec/test/pseudo-transaction.test.ts b/packages/cheng-ripple-binary-codec/test/pseudo-transaction.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/pseudo-transaction.test.ts rename to packages/cheng-ripple-binary-codec/test/pseudo-transaction.test.ts diff --git a/packages/ripple-binary-codec/test/quality.test.ts b/packages/cheng-ripple-binary-codec/test/quality.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/quality.test.ts rename to packages/cheng-ripple-binary-codec/test/quality.test.ts diff --git a/packages/ripple-binary-codec/test/shamap.test.ts b/packages/cheng-ripple-binary-codec/test/shamap.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/shamap.test.ts rename to packages/cheng-ripple-binary-codec/test/shamap.test.ts diff --git a/packages/ripple-binary-codec/test/signing-data-encoding.test.ts b/packages/cheng-ripple-binary-codec/test/signing-data-encoding.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/signing-data-encoding.test.ts rename to packages/cheng-ripple-binary-codec/test/signing-data-encoding.test.ts diff --git a/packages/ripple-binary-codec/test/st-number.test.ts b/packages/cheng-ripple-binary-codec/test/st-number.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/st-number.test.ts rename to packages/cheng-ripple-binary-codec/test/st-number.test.ts diff --git a/packages/ripple-binary-codec/test/tx-encode-decode.test.ts b/packages/cheng-ripple-binary-codec/test/tx-encode-decode.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/tx-encode-decode.test.ts rename to packages/cheng-ripple-binary-codec/test/tx-encode-decode.test.ts diff --git a/packages/ripple-binary-codec/test/types.test.ts b/packages/cheng-ripple-binary-codec/test/types.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/types.test.ts rename to packages/cheng-ripple-binary-codec/test/types.test.ts diff --git a/packages/ripple-binary-codec/test/uint.test.ts b/packages/cheng-ripple-binary-codec/test/uint.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/uint.test.ts rename to packages/cheng-ripple-binary-codec/test/uint.test.ts diff --git a/packages/ripple-binary-codec/test/utils.ts b/packages/cheng-ripple-binary-codec/test/utils.ts similarity index 100% rename from packages/ripple-binary-codec/test/utils.ts rename to packages/cheng-ripple-binary-codec/test/utils.ts diff --git a/packages/ripple-binary-codec/test/webpack.config.js b/packages/cheng-ripple-binary-codec/test/webpack.config.js similarity index 100% rename from packages/ripple-binary-codec/test/webpack.config.js rename to packages/cheng-ripple-binary-codec/test/webpack.config.js diff --git a/packages/ripple-binary-codec/test/x-address.test.ts b/packages/cheng-ripple-binary-codec/test/x-address.test.ts similarity index 100% rename from packages/ripple-binary-codec/test/x-address.test.ts rename to packages/cheng-ripple-binary-codec/test/x-address.test.ts diff --git a/packages/ripple-binary-codec/tools/generateDefinitions.js b/packages/cheng-ripple-binary-codec/tools/generateDefinitions.js similarity index 100% rename from packages/ripple-binary-codec/tools/generateDefinitions.js rename to packages/cheng-ripple-binary-codec/tools/generateDefinitions.js diff --git a/packages/ripple-binary-codec/tsconfig.build.json b/packages/cheng-ripple-binary-codec/tsconfig.build.json similarity index 100% rename from packages/ripple-binary-codec/tsconfig.build.json rename to packages/cheng-ripple-binary-codec/tsconfig.build.json diff --git a/packages/ripple-binary-codec/tsconfig.eslint.json b/packages/cheng-ripple-binary-codec/tsconfig.eslint.json similarity index 100% rename from packages/ripple-binary-codec/tsconfig.eslint.json rename to packages/cheng-ripple-binary-codec/tsconfig.eslint.json diff --git a/packages/ripple-binary-codec/tsconfig.json b/packages/cheng-ripple-binary-codec/tsconfig.json similarity index 100% rename from packages/ripple-binary-codec/tsconfig.json rename to packages/cheng-ripple-binary-codec/tsconfig.json diff --git a/packages/isomorphic/package.json b/packages/isomorphic/package.json index f0137a6ad3..85a2b5b40e 100644 --- a/packages/isomorphic/package.json +++ b/packages/isomorphic/package.json @@ -1,6 +1,6 @@ { - "name": "@xrplf/isomorphic", - "version": "1.0.1", + "name": "@shichengsh001/isomorphic", + "version": "3.0.0", "description": "A collection of isomorphic and tree-shakeable crypto hashes and utils for xrpl.js", "keywords": [ "crypto", @@ -38,11 +38,12 @@ }, "repository": { "type": "git", - "url": "git@github.com:XRPLF/xrpl.js.git" + "url": "git@github.com:xpring-eng/xrpl.js.git" }, "license": "ISC", "prettier": "@xrplf/prettier-config", "engines": { "node": ">=18.0.0" - } + }, + "gitHead": "9ecf80ce3767e32a9009a14e4ec2f38f71c3acb3" } diff --git a/packages/isomorphic/src/internal/wrapCryptoCreateHash.ts b/packages/isomorphic/src/internal/wrapCryptoCreateHash.ts index 4aab8808c3..78a250e1b0 100644 --- a/packages/isomorphic/src/internal/wrapCryptoCreateHash.ts +++ b/packages/isomorphic/src/internal/wrapCryptoCreateHash.ts @@ -12,6 +12,8 @@ export default function wrapCryptoCreateHash( type: string, fn: typeof createHash, ): HashFn { + // eslint-disable-next-line no-console -- Automated release testing + console.log('xrpl automated release testing 3.0.0') function hashFn(input: Input): Uint8Array { return fn(type).update(normalizeInput(input)).digest() } diff --git a/packages/ripple-address-codec/package.json b/packages/ripple-address-codec/package.json index 3f18d3163f..1a6bf5d467 100644 --- a/packages/ripple-address-codec/package.json +++ b/packages/ripple-address-codec/package.json @@ -11,7 +11,7 @@ "license": "ISC", "dependencies": { "@scure/base": "^1.1.3", - "@xrplf/isomorphic": "^1.0.1" + "@shichengsh001/isomorphic": "^2.0.0-rc.1" }, "keywords": [ "ripple", diff --git a/packages/ripple-address-codec/src/index.ts b/packages/ripple-address-codec/src/index.ts index 594b8bcb33..2e34f9e99e 100644 --- a/packages/ripple-address-codec/src/index.ts +++ b/packages/ripple-address-codec/src/index.ts @@ -1,4 +1,4 @@ -import { concat, equal, hexToBytes } from '@xrplf/isomorphic/utils' +import { concat, equal, hexToBytes } from '@shichengsh001/isomorphic/utils' import { codec, diff --git a/packages/ripple-address-codec/src/xrp-codec.ts b/packages/ripple-address-codec/src/xrp-codec.ts index 29637b826f..d47ee7a4b9 100644 --- a/packages/ripple-address-codec/src/xrp-codec.ts +++ b/packages/ripple-address-codec/src/xrp-codec.ts @@ -3,7 +3,7 @@ */ import { base58xrp, BytesCoder } from '@scure/base' -import { sha256 } from '@xrplf/isomorphic/sha256' +import { sha256 } from '@shichengsh001/isomorphic/sha256' import { arrayEqual, concatArgs, ByteArray } from './utils' diff --git a/packages/ripple-address-codec/test/index.test.ts b/packages/ripple-address-codec/test/index.test.ts index 63c3b6ca6a..0ddbd45ddd 100644 --- a/packages/ripple-address-codec/test/index.test.ts +++ b/packages/ripple-address-codec/test/index.test.ts @@ -1,4 +1,4 @@ -import { bytesToHex, hexToBytes } from '@xrplf/isomorphic/utils' +import { bytesToHex, hexToBytes } from '@shichengsh001/isomorphic/utils' import { classicAddressToXAddress, diff --git a/packages/ripple-address-codec/test/xrp-codec.test.ts b/packages/ripple-address-codec/test/xrp-codec.test.ts index 7d35323d14..26044aaf75 100644 --- a/packages/ripple-address-codec/test/xrp-codec.test.ts +++ b/packages/ripple-address-codec/test/xrp-codec.test.ts @@ -1,4 +1,8 @@ -import { bytesToHex, hexToBytes, stringToHex } from '@xrplf/isomorphic/utils' +import { + bytesToHex, + hexToBytes, + stringToHex, +} from '@shichengsh001/isomorphic/utils' import { codec, diff --git a/packages/secret-numbers/package.json b/packages/secret-numbers/package.json index ff06ec1a03..b6d4a9fed1 100644 --- a/packages/secret-numbers/package.json +++ b/packages/secret-numbers/package.json @@ -1,5 +1,5 @@ { - "name": "@xrplf/secret-numbers", + "name": "@shichengsh001/secret-numbers", "version": "2.0.0", "description": "Generate XRPL Accounts with a number-based secret: 8 chunks of 6 digits", "main": "dist/index.js", @@ -35,7 +35,7 @@ "prettier": "@xrplf/prettier-config", "repository": { "type": "git", - "url": "git@github.com:XRPLF/xrpl.js.git" + "url": "git@github.com:xpring-eng/xrpl.js.git" }, "license": "ISC", "readmeFilename": "README.md", @@ -44,5 +44,6 @@ "xrpl-ledger", "multi sign", "sign" - ] + ], + "gitHead": "9ecf80ce3767e32a9009a14e4ec2f38f71c3acb3" } diff --git a/packages/secret-numbers/src/utils/index.ts b/packages/secret-numbers/src/utils/index.ts index 47b9bd9a96..0b300b805b 100644 --- a/packages/secret-numbers/src/utils/index.ts +++ b/packages/secret-numbers/src/utils/index.ts @@ -73,6 +73,8 @@ function secretToEntropy(secret: string[]): Uint8Array { } function parseSecretString(secret: string): string[] { + // eslint-disable-next-line no-console -- Automated release testing + console.log('xrpl automated release testing') const normalizedSecret = secret.replace(/[^0-9]/gu, '') if (normalizedSecret.length !== 48) { throw new Error( diff --git a/packages/xrpl/package.json b/packages/xrpl/package.json index cbffc09387..bda706f430 100644 --- a/packages/xrpl/package.json +++ b/packages/xrpl/package.json @@ -1,5 +1,5 @@ { - "name": "xrpl", + "name": "cheng-xrpl", "version": "4.4.1", "license": "ISC", "description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser", @@ -24,12 +24,12 @@ "dependencies": { "@scure/bip32": "^1.3.1", "@scure/bip39": "^1.2.1", - "@xrplf/isomorphic": "^1.0.1", - "@xrplf/secret-numbers": "^2.0.0", + "@shichengsh001/isomorphic": "^2.0.0-rc.1", + "@shichengsh001/secret-numbers": "^2.0.0", "bignumber.js": "^9.0.0", "eventemitter3": "^5.0.1", "ripple-address-codec": "^5.0.0", - "ripple-binary-codec": "^2.5.0", + "cheng-ripple-binary-codec": "^2.5.1", "ripple-keypairs": "^2.0.0" }, "devDependencies": { @@ -69,7 +69,7 @@ "prettier": "@xrplf/prettier-config", "repository": { "type": "git", - "url": "git@github.com:XRPLF/xrpl.js.git" + "url": "git@github.com:xpring-eng/xrpl.js.git" }, "readmeFilename": "README.md", "keywords": [ @@ -81,5 +81,6 @@ ], "engines": { "node": ">=18.0.0" - } + }, + "gitHead": "9ecf80ce3767e32a9009a14e4ec2f38f71c3acb3" } diff --git a/packages/xrpl/src/Wallet/authorizeChannel.ts b/packages/xrpl/src/Wallet/authorizeChannel.ts index b9185b444a..07bbb0d683 100644 --- a/packages/xrpl/src/Wallet/authorizeChannel.ts +++ b/packages/xrpl/src/Wallet/authorizeChannel.ts @@ -1,4 +1,4 @@ -import { encodeForSigningClaim } from 'ripple-binary-codec' +import { encodeForSigningClaim } from 'cheng-ripple-binary-codec' import { sign } from 'ripple-keypairs' import { Wallet } from './index' diff --git a/packages/xrpl/src/Wallet/batchSigner.ts b/packages/xrpl/src/Wallet/batchSigner.ts index a64c235944..c6cb905a00 100644 --- a/packages/xrpl/src/Wallet/batchSigner.ts +++ b/packages/xrpl/src/Wallet/batchSigner.ts @@ -1,4 +1,4 @@ -import { encode, encodeForSigningBatch } from 'ripple-binary-codec' +import { encode, encodeForSigningBatch } from 'cheng-ripple-binary-codec' import { sign } from 'ripple-keypairs' import { ValidationError } from '../errors' diff --git a/packages/xrpl/src/Wallet/index.ts b/packages/xrpl/src/Wallet/index.ts index 20b36c42d3..9fe19da127 100644 --- a/packages/xrpl/src/Wallet/index.ts +++ b/packages/xrpl/src/Wallet/index.ts @@ -1,19 +1,19 @@ import { HDKey } from '@scure/bip32' import { mnemonicToSeedSync, validateMnemonic } from '@scure/bip39' import { wordlist } from '@scure/bip39/wordlists/english' -import { bytesToHex } from '@xrplf/isomorphic/utils' +import { bytesToHex } from '@shichengsh001/isomorphic/utils' import BigNumber from 'bignumber.js' +import { + encodeForSigning, + encodeForMultisigning, + encode, +} from 'cheng-ripple-binary-codec' import { classicAddressToXAddress, isValidXAddress, xAddressToClassicAddress, encodeSeed, } from 'ripple-address-codec' -import { - encodeForSigning, - encodeForMultisigning, - encode, -} from 'ripple-binary-codec' import { deriveAddress, deriveKeypair, diff --git a/packages/xrpl/src/Wallet/rfc1751.ts b/packages/xrpl/src/Wallet/rfc1751.ts index b825a87e53..418c728195 100644 --- a/packages/xrpl/src/Wallet/rfc1751.ts +++ b/packages/xrpl/src/Wallet/rfc1751.ts @@ -10,7 +10,7 @@ *is part of the public domain. */ -import { hexToBytes, concat } from '@xrplf/isomorphic/utils' +import { hexToBytes, concat } from '@shichengsh001/isomorphic/utils' import rfc1751Words from './rfc1751Words.json' diff --git a/packages/xrpl/src/Wallet/signer.ts b/packages/xrpl/src/Wallet/signer.ts index 205f64bc7d..2f5a27b032 100644 --- a/packages/xrpl/src/Wallet/signer.ts +++ b/packages/xrpl/src/Wallet/signer.ts @@ -1,4 +1,4 @@ -import { encode, encodeForSigning } from 'ripple-binary-codec' +import { encode, encodeForSigning } from 'cheng-ripple-binary-codec' import { verify } from 'ripple-keypairs' import { ValidationError } from '../errors' diff --git a/packages/xrpl/src/Wallet/utils.ts b/packages/xrpl/src/Wallet/utils.ts index 90a1db7674..271895e362 100644 --- a/packages/xrpl/src/Wallet/utils.ts +++ b/packages/xrpl/src/Wallet/utils.ts @@ -1,7 +1,7 @@ -import { bytesToHex } from '@xrplf/isomorphic/utils' +import { bytesToHex } from '@shichengsh001/isomorphic/utils' import BigNumber from 'bignumber.js' +import { decode, encode } from 'cheng-ripple-binary-codec' import { decodeAccountID } from 'ripple-address-codec' -import { decode, encode } from 'ripple-binary-codec' import { Transaction } from '../models' diff --git a/packages/xrpl/src/Wallet/walletFromSecretNumbers.ts b/packages/xrpl/src/Wallet/walletFromSecretNumbers.ts index 1670a5378a..c60febead5 100644 --- a/packages/xrpl/src/Wallet/walletFromSecretNumbers.ts +++ b/packages/xrpl/src/Wallet/walletFromSecretNumbers.ts @@ -1,4 +1,4 @@ -import { Account } from '@xrplf/secret-numbers' +import { Account } from '@shichengsh001/secret-numbers' import ECDSA from '../ECDSA' diff --git a/packages/xrpl/src/client/connection.ts b/packages/xrpl/src/client/connection.ts index 54ad7a288f..a97dc4adf7 100644 --- a/packages/xrpl/src/client/connection.ts +++ b/packages/xrpl/src/client/connection.ts @@ -1,8 +1,8 @@ /* eslint-disable max-lines -- Connection is a large file w/ lots of imports/exports */ import type { Agent } from 'http' -import { bytesToHex, hexToString } from '@xrplf/isomorphic/utils' -import WebSocket, { ClientOptions } from '@xrplf/isomorphic/ws' +import { bytesToHex, hexToString } from '@shichengsh001/isomorphic/utils' +import WebSocket, { ClientOptions } from '@shichengsh001/isomorphic/ws' import { EventEmitter } from 'eventemitter3' import { diff --git a/packages/xrpl/src/client/partialPayment.ts b/packages/xrpl/src/client/partialPayment.ts index e039f76584..6936dc912a 100644 --- a/packages/xrpl/src/client/partialPayment.ts +++ b/packages/xrpl/src/client/partialPayment.ts @@ -1,5 +1,5 @@ import BigNumber from 'bignumber.js' -import { decode } from 'ripple-binary-codec' +import { decode } from 'cheng-ripple-binary-codec' import type { TransactionEntryResponse, diff --git a/packages/xrpl/src/models/transactions/CredentialCreate.ts b/packages/xrpl/src/models/transactions/CredentialCreate.ts index 8c82b7c74c..a38e3fa574 100644 --- a/packages/xrpl/src/models/transactions/CredentialCreate.ts +++ b/packages/xrpl/src/models/transactions/CredentialCreate.ts @@ -1,4 +1,4 @@ -import { HEX_REGEX } from '@xrplf/isomorphic/utils' +import { HEX_REGEX } from '@shichengsh001/isomorphic/utils' import { ValidationError } from '../../errors' diff --git a/packages/xrpl/src/models/transactions/common.ts b/packages/xrpl/src/models/transactions/common.ts index b08476142c..1e1c1bb146 100644 --- a/packages/xrpl/src/models/transactions/common.ts +++ b/packages/xrpl/src/models/transactions/common.ts @@ -1,7 +1,7 @@ /* eslint-disable max-lines -- common utility file */ -import { HEX_REGEX, hexToString } from '@xrplf/isomorphic/utils' +import { HEX_REGEX, hexToString } from '@shichengsh001/isomorphic/utils' +import { TRANSACTION_TYPES } from 'cheng-ripple-binary-codec' import { isValidClassicAddress, isValidXAddress } from 'ripple-address-codec' -import { TRANSACTION_TYPES } from 'ripple-binary-codec' import { ValidationError } from '../../errors' import { diff --git a/packages/xrpl/src/utils/getNFTokenID.ts b/packages/xrpl/src/utils/getNFTokenID.ts index f36c7357a7..64d14cb231 100644 --- a/packages/xrpl/src/utils/getNFTokenID.ts +++ b/packages/xrpl/src/utils/getNFTokenID.ts @@ -1,4 +1,4 @@ -import { decode } from 'ripple-binary-codec' +import { decode } from 'cheng-ripple-binary-codec' import { NFToken } from '../models/ledger/NFTokenPage' import { diff --git a/packages/xrpl/src/utils/getXChainClaimID.ts b/packages/xrpl/src/utils/getXChainClaimID.ts index 5e640a8c1f..6b1633b105 100644 --- a/packages/xrpl/src/utils/getXChainClaimID.ts +++ b/packages/xrpl/src/utils/getXChainClaimID.ts @@ -1,4 +1,4 @@ -import { decode } from 'ripple-binary-codec' +import { decode } from 'cheng-ripple-binary-codec' import { CreatedNode, diff --git a/packages/xrpl/src/utils/hashes/hashLedger.ts b/packages/xrpl/src/utils/hashes/hashLedger.ts index 8301dca50d..e1e1ef73ff 100644 --- a/packages/xrpl/src/utils/hashes/hashLedger.ts +++ b/packages/xrpl/src/utils/hashes/hashLedger.ts @@ -3,9 +3,9 @@ /* eslint-disable no-bitwise -- this file mimics behavior in rippled. It uses bitwise operators for and-ing numbers with a mask and bit shifting. */ -import { bytesToHex } from '@xrplf/isomorphic/utils' +import { bytesToHex } from '@shichengsh001/isomorphic/utils' import BigNumber from 'bignumber.js' -import { decode, encode } from 'ripple-binary-codec' +import { decode, encode } from 'cheng-ripple-binary-codec' import { ValidationError, XrplError } from '../../errors' import { APIVersion } from '../../models' diff --git a/packages/xrpl/src/utils/hashes/index.ts b/packages/xrpl/src/utils/hashes/index.ts index 9d32f6bfa1..f9d0ba977e 100644 --- a/packages/xrpl/src/utils/hashes/index.ts +++ b/packages/xrpl/src/utils/hashes/index.ts @@ -3,7 +3,7 @@ /* eslint-disable no-bitwise -- this file mimics behavior in rippled. It uses bitwise operators for and-ing numbers with a mask and bit shifting. */ -import { bytesToHex } from '@xrplf/isomorphic/utils' +import { bytesToHex } from '@shichengsh001/isomorphic/utils' import BigNumber from 'bignumber.js' import { decodeAccountID } from 'ripple-address-codec' diff --git a/packages/xrpl/src/utils/hashes/sha512Half.ts b/packages/xrpl/src/utils/hashes/sha512Half.ts index 29b05c4698..2310e8f620 100644 --- a/packages/xrpl/src/utils/hashes/sha512Half.ts +++ b/packages/xrpl/src/utils/hashes/sha512Half.ts @@ -1,5 +1,5 @@ -import { sha512 } from '@xrplf/isomorphic/sha512' -import { bytesToHex, hexToBytes } from '@xrplf/isomorphic/utils' +import { sha512 } from '@shichengsh001/isomorphic/sha512' +import { bytesToHex, hexToBytes } from '@shichengsh001/isomorphic/utils' const HASH_BYTES = 32 diff --git a/packages/xrpl/src/utils/index.ts b/packages/xrpl/src/utils/index.ts index 2304384e90..dbdf712072 100644 --- a/packages/xrpl/src/utils/index.ts +++ b/packages/xrpl/src/utils/index.ts @@ -1,3 +1,10 @@ +import { + encode as rbcEncode, + decode as rbcDecode, + encodeForMultisigning as rbcEncodeForMultisigning, + encodeForSigning as rbcEncodeForSigning, + encodeForSigningClaim as rbcEncodeForSigningClaim, +} from 'cheng-ripple-binary-codec' import { classicAddressToXAddress, decodeAccountID, @@ -14,13 +21,6 @@ import { isValidXAddress, xAddressToClassicAddress, } from 'ripple-address-codec' -import { - encode as rbcEncode, - decode as rbcDecode, - encodeForMultisigning as rbcEncodeForMultisigning, - encodeForSigning as rbcEncodeForSigning, - encodeForSigningClaim as rbcEncodeForSigningClaim, -} from 'ripple-binary-codec' import { verify as verifyKeypairSignature } from 'ripple-keypairs' import type { APIVersion } from '../models' diff --git a/packages/xrpl/src/utils/parseNFTokenID.ts b/packages/xrpl/src/utils/parseNFTokenID.ts index 0315d4bda3..4d56cd0957 100644 --- a/packages/xrpl/src/utils/parseNFTokenID.ts +++ b/packages/xrpl/src/utils/parseNFTokenID.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-magic-numbers -- Doing hex string parsing. */ -import { hexToBytes } from '@xrplf/isomorphic/utils' +import { hexToBytes } from '@shichengsh001/isomorphic/utils' import BigNumber from 'bignumber.js' import { encodeAccountID } from 'ripple-address-codec' diff --git a/packages/xrpl/src/utils/signPaymentChannelClaim.ts b/packages/xrpl/src/utils/signPaymentChannelClaim.ts index 14d95183ca..03881aecdf 100644 --- a/packages/xrpl/src/utils/signPaymentChannelClaim.ts +++ b/packages/xrpl/src/utils/signPaymentChannelClaim.ts @@ -1,4 +1,4 @@ -import { encodeForSigningClaim } from 'ripple-binary-codec' +import { encodeForSigningClaim } from 'cheng-ripple-binary-codec' import { sign } from 'ripple-keypairs' import { xrpToDrops } from './xrpConversion' diff --git a/packages/xrpl/src/utils/stringConversion.ts b/packages/xrpl/src/utils/stringConversion.ts index c2ab9261a3..899159dfd4 100644 --- a/packages/xrpl/src/utils/stringConversion.ts +++ b/packages/xrpl/src/utils/stringConversion.ts @@ -1,4 +1,4 @@ -import { stringToHex, hexToString } from '@xrplf/isomorphic/utils' +import { stringToHex, hexToString } from '@shichengsh001/isomorphic/utils' /** * Converts a string to its hex equivalent. Useful for Memos. diff --git a/packages/xrpl/src/utils/verifyPaymentChannelClaim.ts b/packages/xrpl/src/utils/verifyPaymentChannelClaim.ts index fdf3eb9378..7b784ec158 100644 --- a/packages/xrpl/src/utils/verifyPaymentChannelClaim.ts +++ b/packages/xrpl/src/utils/verifyPaymentChannelClaim.ts @@ -1,4 +1,4 @@ -import { encodeForSigningClaim } from 'ripple-binary-codec' +import { encodeForSigningClaim } from 'cheng-ripple-binary-codec' import { verify } from 'ripple-keypairs' import { xrpToDrops } from './xrpConversion' diff --git a/packages/xrpl/test/integration/requests/submit.test.ts b/packages/xrpl/test/integration/requests/submit.test.ts index a9f7c521b9..a9381913ef 100644 --- a/packages/xrpl/test/integration/requests/submit.test.ts +++ b/packages/xrpl/test/integration/requests/submit.test.ts @@ -1,5 +1,5 @@ import { assert } from 'chai' -import { decode } from 'ripple-binary-codec' +import { decode } from 'cheng-ripple-binary-codec' import { AccountSet, diff --git a/packages/xrpl/test/integration/requests/submitMultisigned.test.ts b/packages/xrpl/test/integration/requests/submitMultisigned.test.ts index 90dfe99e4b..f74fc3f98c 100644 --- a/packages/xrpl/test/integration/requests/submitMultisigned.test.ts +++ b/packages/xrpl/test/integration/requests/submitMultisigned.test.ts @@ -1,5 +1,5 @@ import { assert } from 'chai' -import { decode } from 'ripple-binary-codec' +import { decode } from 'cheng-ripple-binary-codec' import { AccountSet, diff --git a/packages/xrpl/test/integration/transactions/xchainAddAccountCreateAttestation.test.ts b/packages/xrpl/test/integration/transactions/xchainAddAccountCreateAttestation.test.ts index 1e72b61b2c..15f6e2a98e 100644 --- a/packages/xrpl/test/integration/transactions/xchainAddAccountCreateAttestation.test.ts +++ b/packages/xrpl/test/integration/transactions/xchainAddAccountCreateAttestation.test.ts @@ -1,4 +1,4 @@ -import { encode } from 'ripple-binary-codec' +import { encode } from 'cheng-ripple-binary-codec' import { sign } from 'ripple-keypairs' import { diff --git a/packages/xrpl/test/integration/transactions/xchainAddClaimAttestation.test.ts b/packages/xrpl/test/integration/transactions/xchainAddClaimAttestation.test.ts index 9462f0823f..ca1faad39e 100644 --- a/packages/xrpl/test/integration/transactions/xchainAddClaimAttestation.test.ts +++ b/packages/xrpl/test/integration/transactions/xchainAddClaimAttestation.test.ts @@ -1,6 +1,6 @@ /* eslint-disable max-statements -- necessary because transfers require a lot of steps */ import { assert } from 'chai' -import { encode } from 'ripple-binary-codec' +import { encode } from 'cheng-ripple-binary-codec' import { sign } from 'ripple-keypairs' import { diff --git a/packages/xrpl/test/integration/transactions/xchainClaim.test.ts b/packages/xrpl/test/integration/transactions/xchainClaim.test.ts index 3465ed4724..b6df4f515b 100644 --- a/packages/xrpl/test/integration/transactions/xchainClaim.test.ts +++ b/packages/xrpl/test/integration/transactions/xchainClaim.test.ts @@ -1,5 +1,5 @@ import { assert } from 'chai' -import { encode } from 'ripple-binary-codec' +import { encode } from 'cheng-ripple-binary-codec' import { sign } from 'ripple-keypairs' import { diff --git a/packages/xrpl/test/integration/utils.ts b/packages/xrpl/test/integration/utils.ts index a3260b57d7..e65df6dc66 100644 --- a/packages/xrpl/test/integration/utils.ts +++ b/packages/xrpl/test/integration/utils.ts @@ -1,8 +1,8 @@ import BigNumber from 'bignumber.js' import { assert } from 'chai' +import { decode } from 'cheng-ripple-binary-codec' import omit from 'lodash/omit' import throttle from 'lodash/throttle' -import { decode } from 'ripple-binary-codec' import { Client, diff --git a/packages/xrpl/test/utils/hashes.test.ts b/packages/xrpl/test/utils/hashes.test.ts index 6b75989de4..07c1f53c2a 100644 --- a/packages/xrpl/test/utils/hashes.test.ts +++ b/packages/xrpl/test/utils/hashes.test.ts @@ -2,7 +2,7 @@ import fs from 'fs' import path from 'path' import { assert } from 'chai' -import { encode } from 'ripple-binary-codec' +import { encode } from 'cheng-ripple-binary-codec' import { EnableAmendment, diff --git a/packages/xrpl/test/wallet/index.test.ts b/packages/xrpl/test/wallet/index.test.ts index cf564173ea..c57b07b713 100644 --- a/packages/xrpl/test/wallet/index.test.ts +++ b/packages/xrpl/test/wallet/index.test.ts @@ -1,5 +1,5 @@ import { assert } from 'chai' -import { decode } from 'ripple-binary-codec' +import { decode } from 'cheng-ripple-binary-codec' import { NFTokenMint, diff --git a/packages/xrpl/test/wallet/signer.test.ts b/packages/xrpl/test/wallet/signer.test.ts index afd3373dda..57abcd51bc 100644 --- a/packages/xrpl/test/wallet/signer.test.ts +++ b/packages/xrpl/test/wallet/signer.test.ts @@ -1,5 +1,5 @@ import { assert } from 'chai' -import { decode, encode } from 'ripple-binary-codec' +import { decode, encode } from 'cheng-ripple-binary-codec' import { Transaction, ValidationError } from '../../src' import { Wallet } from '../../src/Wallet' diff --git a/packages/xrpl/tsconfig.build.json b/packages/xrpl/tsconfig.build.json index 9599cd590f..15e5d8e70b 100644 --- a/packages/xrpl/tsconfig.build.json +++ b/packages/xrpl/tsconfig.build.json @@ -12,7 +12,7 @@ "path": "../ripple-address-codec/tsconfig.build.json" }, { - "path": "../ripple-binary-codec/tsconfig.json" + "path": "../cheng-ripple-binary-codec/tsconfig.json" }, { "path": "../ripple-keypairs/tsconfig.json"