# Methods

## BlockChains

### func getBlockChainInfo()

#### Description

Retrieves the chain information using the Chain ID.

#### Parameters

| name    | type | Description |
| ------- | ---- | ----------- |
| chainId | Int  | Chain ID    |

#### Result

[**FncyChainInfo**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncychaininfo)

### func getContractInfo()

#### Description

Retrieves asset information using the Contract Address.

#### Parameters

| name            | type   | Description      |
| --------------- | ------ | ---------------- |
| chainId         | Int    | Chain ID         |
| contractAddress | String | Contract Address |

#### Result

[**FncyAssetInfo**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncyassetinfo)

### func getFncyInfo()

#### Description

Requests asset information and market price information for Fncy.

#### Result

[**FncyCurrency**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncycurrency)

### func getGasPrice()

#### Description

Requests information about the blockchain's network fee (gas fee).

#### Parameters

| name    | type | Description |
| ------- | ---- | ----------- |
| chainId | Int  | Chain ID    |

#### Result

[FncyGasPrice](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncygasprice)

#### See Also

[Chain ID](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/etc#chain-id)

## Wallet

### func getWallet()

#### Description

Returns the user's wallet information.

#### Result

[**FncyWallet**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#displayethpricefncywallet)

### func getWalletAllBalance()

#### Description

Requests the value of the total assets currently held by the wallet.

#### Parameters

| name | type | Description |
| ---- | ---- | ----------- |
| wid  | Int  | Wallet ID   |

#### Result

[**FncyBalance**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncybalance)

### func getAssetList()

#### Description

Requests a list of assets in the wallet (FNCY, ETH, BSC, etc).

#### Parameters

| name | type | Description |
| ---- | ---- | ----------- |
| wid  | Int  | Wallet ID   |

#### Result

**Array<**[**FncyAsset**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncyasset)**>**

### func getAssetById()

#### Description

Requests asset information for the wallet using the asset ID.

#### Parameters

| name    | type | Description |
| ------- | ---- | ----------- |
| wid     | Int  | Wallet ID   |
| assetId | Int  | Wallet ID   |

#### Result

[**FncyAsset**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncyasset)

### func getNFTList()

#### Description

Retreives list of NFTs held by the wallet.

#### Parameters

| name     | type | Description |
| -------- | ---- | ----------- |
| wid      | Int  | Wallet ID   |
| pageNo   | Int  | Page Number |
| pageSize | Int  | Page Size   |

#### Result

**Array<**[**FncyNFT**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncynft)**>**

### func getNFTById()

#### Description

Retrieves NFT unit information using NFTID.

#### Parameters

| name  | type | Description |
| ----- | ---- | ----------- |
| wid   | Int  | Wallet ID   |
| nftId | Int  | nft ID      |

#### Result

[**FncyNFT**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncynft)

### func makeWallet()

#### Description

Requests to create a wallet.

#### Parameters

| Name      | Type   | Description     |
| --------- | ------ | --------------- |
| walletNm  | String | Wallet Name     |
| pinNumber | String | Wallet Password |

#### Result

<mark style="color:blue;">**Int**</mark>**&#x20;: Returns the wallet's wid**

### func getQuesetionList()

#### Description

Requests a list of questions to restore your wallet.

#### Parameters

| Name     | Type | Description                                        |
| -------- | ---- | -------------------------------------------------- |
| pageNo   | Int  | Page Number to Request (default = 1)               |
| pageSize | Int  | Number of Items to Request at Once (default = 20 ) |

#### Result

**Array<**[**FncyQuestion**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/android/domain#fncyquestion)**>**

### func postRegisterRestorationKey()

#### Description

Registers the wallet's restore key (wallet recovery question/answer).

#### Parameters

| name        | type   | Description           |
| ----------- | ------ | --------------------- |
| wid         | Int    | Wallet ID             |
| questionSeq | String | Recovery Question seq |
| answer      | String | Answer                |
| pinNumber   | String | Wallet Password       |

### func checkWalletPin()

#### Description

Returns whether the entered wallet password matches or not.

#### parameters

| name      | type   | Description     |
| --------- | ------ | --------------- |
| pinNumber | String | Wallet Password |

#### Result

<mark style="color:blue;">**Bool**</mark>**&#x20;: Returns request Result (Success/Fail)**

### func checkResetAnswer()

#### Description&#x20;

Verifies the backup question answers match.

#### Parameters

| name   | type   | Description                  |
| ------ | ------ | ---------------------------- |
| answer | String | Answers for Backup Questions |

#### Result

<mark style="color:blue;">**Bool**</mark>**&#x20;: Returns request Result (Success/Fail)**

### func resetWalletPin()

#### Description

Changes the wallet password to a new password.

#### Parameters

| name         | type   | Description      |
| ------------ | ------ | ---------------- |
| oldPinNumber | String | Current Password |
| newPinNumber | String | New Password     |

#### Result&#x20;

<mark style="color:blue;">**Bool**</mark>**&#x20;: Returns request Result (Success/Fail)**

### func getResetQuestion()

#### Description

Requests questions user's registered for the backup.

#### Result

[**FncyQuestion**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncyquestion)

### func postResetQuestion()

#### Description

If the user's registered wallet recovery answer matches, changes the wallet password to the new password.

#### Parameters

| name         | type   | Description             |
| ------------ | ------ | ----------------------- |
| answer       | String | Wallet Recovery Answers |
| newPinNumber | String | New Password            |

#### Result

<mark style="color:blue;">**Bool**</mark>**&#x20;: Returns request Result (Success/Fail)**

## Transaction

### func estimateTicket()

#### Description

Before creating a transfer ticket, it checks for transfer availability, nonce, gasLimit, etc.

#### Parameter

| name              | type                                                                                          | Description                 |
| ----------------- | --------------------------------------------------------------------------------------------- | --------------------------- |
| wid               | Int                                                                                           | Wallet ID                   |
| chainId           | Int                                                                                           | Chain ID                    |
| signatureType     | [TicketType](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/etc#tickettype) | Transfer Type               |
| toAddress         | String                                                                                        | Send to Address             |
| transferVal       | String(Optional)                                                                              | Quantity to Send (in wei)   |
| txGasPrice        | String(Optional)                                                                              | Gas Price                   |
| txInput           | String(Optional)                                                                              | Data Information            |
| contractAddress   | String(Optional)                                                                              | Enter if Contract Execution |
| assetId           | Int(Optional)                                                                                 | Asset ID                    |
| nftId             | Int(Optional)                                                                                 | NFT ID                      |
| maxPriorityPerGas | String(Optional)                                                                              | Used for ETH Transfers      |
| maxFeePerGas      | String(Optional)                                                                              | Used for ETH Transfers      |

#### Chain ID

<table><thead><tr><th width="569">Chain</th><th>ID</th><th data-hidden></th></tr></thead><tbody><tr><td>Binanace Smart Chain(BSC)</td><td>1</td><td></td></tr><tr><td>Ethereum(ETH)</td><td>2</td><td></td></tr><tr><td>Fncy Chain (FNCY)</td><td>3</td><td></td></tr></tbody></table>

#### TicketType

<table><thead><tr><th width="479">Type</th><th>Description</th><th data-hidden>설명</th><th data-hidden></th></tr></thead><tbody><tr><td>SIGNATURE_TYPE_FOR_ASSET_TRANSFER</td><td>Coin Trasnfer</td><td></td><td></td></tr><tr><td>SIGNATURE_TYPE_FOR_SMARTCONTRACT_EXECUTION</td><td>Execute SmartContract (Send Token)</td><td></td><td></td></tr><tr><td>SIGNATURE_TYPE_FOR_WALLETCONNECT</td><td>WalletConnect Only</td><td></td><td></td></tr></tbody></table>

#### Result

[**FncyTicket**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncyticket)

### func makeTicket()

#### Description

Requests to create/register a transfer ticket.

#### Parameters

| name              | type                                                                                          | Description                 |
| ----------------- | --------------------------------------------------------------------------------------------- | --------------------------- |
| wid               | Int                                                                                           | Wallet ID                   |
| chainId           | Int                                                                                           | Chain ID                    |
| signatureType     | [TicketType](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/etc#tickettype) | Trasnfer Type               |
| toAddress         | String                                                                                        | Send to Address             |
| transferVal       | String                                                                                        | Quantity to Send (in wei)   |
| txGasPrice        | Int(Optional)                                                                                 | Gas Price                   |
| txGasLimit        | Int(Optional)                                                                                 | Gas Limit                   |
| txInput           | String(Optional)                                                                              | Data Information            |
| contractAddress   | String(Optional)                                                                              | Enter if Contract Execution |
| assetId           | Int(Optional)                                                                                 | Asset ID                    |
| nftId             | Int(Optional)                                                                                 | NFT ID                      |
| maxPriorityPerGas | String(Optional)                                                                              | Used for ETH Transfers      |
| maxFeePerGas      | String(Optional)                                                                              | Used for ETH Transfers      |

#### Result

<mark style="color:blue;">**String**</mark>**&#x20;: Returns the TicketUUID of the created ticket**

### func getTicketInfo()

#### Description

Retrieves information for the ticket by ticketUUID.

#### Parameters

| name       | type   | Description |
| ---------- | ------ | ----------- |
| ticketUuid | String | TicketUUID  |

#### Result

[**FncyTicket**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncyticket)

<table><thead><tr><th width="320.3333333333333">Code</th><th width="125">Number</th><th>Message</th></tr></thead><tbody><tr><td>TRANSFER_AVAILABLE</td><td>201</td><td>Tickets Available for Transfer</td></tr><tr><td>TICKET_TRANSFER_SUCCESS</td><td>200</td><td>Successful Ticket Transfer</td></tr><tr><td>TICKET_TRANSFER_FAILED</td><td>301</td><td>Failed Ticket Trasnfer</td></tr><tr><td>TICKET_EXPIRED</td><td>403</td><td>Expired Tickets (5 minutes after creation)</td></tr><tr><td>TICKET_NOT_FOUND</td><td>404</td><td>Tickets that Don't Exist</td></tr></tbody></table>

### func sendTicket()

#### Description

Executes a ticket (transaction).

#### Parameters

| name       | type   | Description     |
| ---------- | ------ | --------------- |
| ticketUuid | String | Ticket uuid     |
| pinNumber  | String | Wallet Password |

#### Result

<mark style="color:blue;">**String**</mark>**&#x20;: Returns transaction ID**

### func getTransferHistoryList()

#### Description

Retreives wallet's transaction sending history.

#### Parameters

| name     | type                                                                                      | Description                                                                                |
| -------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| wid      | Int                                                                                       | Wallet ID                                                                                  |
| assetId  | Int(Optional)                                                                             | Asset ID                                                                                   |
| pageNo   | Int(Optional)                                                                             | Page Number(Default: 1)                                                                    |
| pageSize | Int(Optional)                                                                             | Page Size(Default: 20)                                                                     |
| filter   | [InOutDcd](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/etc#inoutdcd) | <p>InOutDcd.all = All <br>InOutDcd.deposit = Deposit<br>InOutDcd.withdrawal = Withdraw</p> |

#### Result

**Array<**[**FncyTransaction**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncytransaction)**>**

### func getTransferHistoryDetail()

#### Description

Retreives transaction's sending history.

#### Parameters

| name       | type | Description     |
| ---------- | ---- | --------------- |
| wid        | Int  | Wallet ID       |
| historySeq | Int  | Transaction Seq |

#### Result

[**FncyTransaction**](https://docs.fncy.world/fncy-2.0.2-eng/for-developers/wallet/sdk/domain#fncytransaction)

### ETC

### func validateAddress()

#### Description

Verifies the wallet address is valid.

#### Parameters

| name    | type   | Description    |
| ------- | ------ | -------------- |
| chainId | Int    | Chain ID       |
| address | String | Wallet Address |

#### Result

<mark style="color:blue;">**Bool**</mark>

### func postWalletSign()

#### Description

Signs the message and data and returns the signed message.

#### Parameters

| name       | type   | Description                                                                                                           |
| ---------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| wid        | Int    | Wallet ID                                                                                                             |
| dataToSign | String | Data                                                                                                                  |
| signType   | String | <p>ethSign(default)<br>ethSignV2<br>ethSignPersonalWithPrefix<br>ethSignWithoutPrefix<br>signEip712StructuredData</p> |
| pinNumber  | String | Wallet Password                                                                                                       |

#### Result

<mark style="color:blue;">**String**</mark>
