# Blockchain Updates

Our API includes various endpoints that involve on-chain activities and updates, such as ownership verification and smart contract deployment. In order to provide smooth experience and maximum level of security, we employ cryptographic challenges and signatures tailored to each supported blockchain.

## Account Creation

To create a new account for the customer and set it up for fund transfers with OffBlocks, we need to deploy a smart-contract account to the respective blockchain. The customer remains the ultimate owner of this account, and to manage funds for off-chain transactions on the user's behalf, we need them to sign a session key issued in the form of a cryptographic challenge. Similar to other endpoints, the challenge returned by the endpoint is a Base64-encoded string.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/customers/{customerId}/accounts" method="post" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

To submit a signed challenge, please use the corresponding endpoint.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/accounts/{accountId}/challenge/sign" method="post" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}

If, for any reason, the original challenge is lost or cannot be signed immediately, you can fetch it again using a dedicated endpoint. If we encounter an error during signature validation via `/sign` endpoint, a new challenge will be issued for you to retrieve.

{% openapi src="/files/ZuFqAH96VVGgwQAJ2vzc" path="/accounts/{accountId}/challenge" method="get" %}
[offblocks-api-spec\_master\_api.yaml](https://1545901005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTToCQFhAYRMgObGgbSjC%2Fuploads%2FV89o79d3urx40FHQswwW%2Foffblocks-api-spec_master_api.yaml?alt=media\&token=762e0468-4f4f-407e-9281-df4ee98be768)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.offblocks.xyz/developer-guides/api-integration/blockchain-updates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
