> For the complete documentation index, see [llms.txt](https://dev-docs.dcentwallet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-docs.dcentwallet.com/dcent-biometric-wallet-for-pc/dcent-web-connector/tezos-xtz-and-xtz_fa.md).

# Tezos (XTZ & XTZ\_FA)

## Sign Transaction

The D'CENT Web SDK provides functions for signing transaction of coins.

### **getTezosSignedTransaction()**

#### Supported Coin Type

* TEZOS (XTZ)
* TEZOS Token (XTZ\_FA)

#### Parameters&#x20;

* unsignedTx: unsigned hexadecimal tx [Tezos Docs](https://tezostaquito.io/docs/quick_start)
* path: key path, wallet sign with that private key with a given key path (BIP32 ex) "m/44'/1729'/0'/0/0").
* fee: fee, It is fee that wallet displays on the screen.
* symbol: symbol, It is a symbol that the wallet displays on the screen.
* decimals: tezos or tezos token's decimals.

#### Requirements

* `D'CENT Bridge` version 1.5.0 or higher is required.
* D'CENT Biometric Wallet version 2.24.1 or higher is required.

#### Useage&#x20;

```javascript
import { TezosToolkit, Estimate } from '@taquito/taquito'
import * as tezosUtils from '@taquito/utils'
import { Tzip12Module, tzip12 } from '@taquito/tzip12'
import BigNumber from 'bignumber.js'

const Tezos = new TezosToolkit('https://YOUR_PREFERRED_RPC_URL');
const TezosContext = Tezos._context

// https://github.com/ecadlabs/taquito/blob/3640373e5acd160767234e10bab4fe18ac3cb586/packages/taquito/src/prepare/prepare-provider.ts#L868

const BlockHash = await TezosContext.readProvider.getBlockHash('head~2')
const BlockProto = await TezosContext.readProvider.getNextProtocol('head')
const counter = Number(await TezosContext.readProvider.getCounter(account.recvAddress, 'head'))

let ops = []
ops.push({
    kind: 'transaction',
    fee,
    amount: DcentWebConnector.unitConverter(amount, decimals).num.toString(),
    gas_limit,
    storage_limit,
    destination: toAddr,
    counter: (counter + 1 + index).toString(),
    source: recvAddress,
})

const prepared = {
    opOb: {
      branch: BlockHash,
      contents: ops,
      protocol: BlockProto
    },
    counter: counter
  }
const forgedBytes = await Tezos.estimate.forge(prepared)

const sigHash = '03' + forgedBytes.opbytes

const transactionJson = {
    coinType: DcentWebConnector.coinType.TEZOS,
    sigHash: sigHash,
    path: `m/44'/1729'/0'/0/0`,
    decimals, // 6,
    fee: fee,
    symbol: 'XTZ',
}

var result
try {
    result = await DcentWebConnector.getTezosSignedTransaction(transactionJson);  
} catch (e) {
    console.log(e)
    result = e
}
```

#### Returned response object

```json
{
    "header": {
        "version": "1.0",
        "response_from": "tezos",
        "status": "success"
    },
    "body": {
        "command": "transaction",
        "parameter": {
            "signed_tx": "0x31aa13b5e04cb6fc6381ea0520bf7f6727ebdb6e96cd7ca8625bb3e3dd36cf0e2cee4ece13aa9f7ddc09ee10c74aa00af954201829d8016317f10f5a921dcc0d"
        }
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://dev-docs.dcentwallet.com/dcent-biometric-wallet-for-pc/dcent-web-connector/tezos-xtz-and-xtz_fa.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
