Skip to content

Release to production (add braga)#55

Merged
krzysiekfonal merged 24 commits into
mainfrom
develop
May 6, 2026
Merged

Release to production (add braga)#55
krzysiekfonal merged 24 commits into
mainfrom
develop

Conversation

@SewerynKras
Copy link
Copy Markdown
Collaborator

No description provided.

krzysiekfonal and others added 24 commits March 9, 2026 14:31
* Allow external tests

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Change examples, docs and tests to use braga instead of kaolin
@SewerynKras SewerynKras marked this pull request as ready for review May 6, 2026 12:19
Copilot AI review requested due to automatic review settings May 6, 2026 12:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK and its docs/tests to target the new Braga testnet, introduces a Braga chain definition, and tightens Entity payload conversion behavior (with accompanying tests). It also includes CI/release workflow adjustments.

Changes:

  • Add braga chain definition and wire it into chain selection + tests.
  • Update examples/smoke tests/README/workflows to use Braga as the default testnet.
  • Change Entity.toText() / Entity.toJson() to throw on missing/invalid payloads and add unit tests.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
test/src/utils.ts Removes unused localhost RPC URL helper.
test/src/smoke-tests/index.ts Switch smoke test chain from kaolin to braga (TS).
test/src/smoke-tests/index.mjs Switch smoke test chain from kaolin to braga (ESM).
test/src/smoke-tests/index.js Switch smoke test chain from kaolin to braga (JS).
test/src/smoke-tests/index.cjs Switch smoke test chain from kaolin to braga (CJS).
test/src/network-health.test.ts Adds braga to chain list and makes it the default CHAIN.
test/src/arkiv.test.ts Adds external-RPC support, refactors entity creation, and makes timeouts configurable.
src/utils/chains.test.ts Adds test coverage for chainFromName("braga") + casing.
src/types/entity.ts Makes toText()/toJson() stricter with better errors/causes.
src/types/entity.test.ts Adds unit tests for new Entity conversion semantics.
src/clients/decorators/arkivWallet.ts Updates doc examples to use braga.
src/clients/decorators/arkivPublic.ts Updates doc examples to use braga.
src/clients/createWalletClient.ts Updates docs to reference Braga RPC.
src/clients/createPublicClient.ts Updates docs to reference Braga RPC.
src/chains/index.ts Exports the new braga chain.
src/chains/braga.ts Defines the Braga chain (IDs, RPC URLs, explorer).
sample/write_example.ts Updates sample to use braga.
sample/read_example.ts Updates sample to use braga.
README.md Updates README examples and faucet link to Braga.
package.json Bumps version and tweaks release scripts to include commit messages.
docs/main/interfaces/Entity.md Updates generated docs references for Entity methods.
.github/workflows/network-health.yml Defaults network health workflow to braga.
.github/workflows/ci.yml Uses a GitHub App token for checkout/push; avoids empty docs commits.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/src/arkiv.test.ts
Comment on lines +34 to +38
if (process.env.ARKIV_SDK_TEST_RPC_URL || process.env.ARKIV_SDK_TEST_WS_URL) {
httpUrls = [process.env.ARKIV_SDK_TEST_RPC_URL || "undefined"]
wsUrls = [process.env.ARKIV_SDK_TEST_WS_URL || "undefined"]
rpcName = "External Arkiv Node"
chainId = parseInt(process.env.ARKIV_SDK_TEST_CHAIN_ID || "1337")
Comment thread test/src/arkiv.test.ts
import { execCommand, launchLocalArkivNode } from "./utils.js"


const basicCRUDTestTimeout: number = parseInt(process.env.ARKIV_SDK_TEST_CRUD_TIMEOUT || "20000")
* - Docs: https://docs.arkiv.network/ts-sdk/clients/public
*
* A Public Client is an interface to "public" [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/), [Arkiv JSON-RPC API](https://docs.arkiv.network/json-rpc/), and [Kaolin JSON-RPC API](https://kaolin.holesky.arkiv.network/rpc) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).
* A Public Client is an interface to "public" [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/), [Arkiv JSON-RPC API](https://docs.arkiv.network/json-rpc/), and [Braga JSON-RPC API](https://braga.holesky.arkiv.network/rpc) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).
* - Docs: https://docs.arkiv.network/ts-sdk/clients/public
*
* A Public Client is an interface to "public" [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/), [Arkiv JSON-RPC API](https://docs.arkiv.network/json-rpc/), and [Kaolin JSON-RPC API](https://kaolin.holesky.arkiv.network/rpc) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).
* A Public Client is an interface to "public" [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/), [Arkiv JSON-RPC API](https://docs.arkiv.network/json-rpc/), and [Braga JSON-RPC API](https://braga.holesky.arkiv.network/rpc) methods such as retrieving block numbers, transactions, reading from smart contracts, etc through [Public Actions](/docs/actions/public/introduction).
Comment on lines 97 to +109
@@ -106,7 +106,7 @@ Defined in: [src/types/entity.ts:45](https://github.com/Arkiv-Network/arkiv-sdk-

> **toText**(): `string`

Defined in: [src/types/entity.ts:41](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/93d4c0c74e3503d5b045842ef9b11e8553a0c98b/src/types/entity.ts#L41)
Defined in: [src/types/entity.ts:50](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/develop/src/types/entity.ts#L50)
Comment thread src/types/entity.ts
Comment on lines 50 to +55
toText(): string {
return this.payload ? bytesToString(this.payload) : ""
if (this.payload === undefined) {
throw new Error(
"Entity has no payload – it was probably queried without withPayload(true) via QueryBuilder",
)
}
Comment thread src/types/entity.ts
Comment on lines 72 to +76
toJson(): any {
return this.payload ? JSON.parse(bytesToString(this.payload)) : {}
const text = this.toText()
if (!text) {
throw new Error("Entity has empty payload, cannot parse as JSON")
}
@SewerynKras SewerynKras requested a review from krzysiekfonal May 6, 2026 12:29
@SewerynKras SewerynKras enabled auto-merge May 6, 2026 12:33
@SewerynKras SewerynKras disabled auto-merge May 6, 2026 12:33
@krzysiekfonal krzysiekfonal merged commit b398f37 into main May 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants