# Types

### AccountType

```
type AccountType = {
    provider: string,
    providerSupports: string[]|undefined,
    cspr_name: string | null,
    public_key: string | null,
    connected_at: Number,
    token: string | null,
    custom?: any,
    balance?: string,
    liquid_balance?: string;
    logo?: string;
}
```

<table><thead><tr><th width="201.33333333333331">Property</th><th>Description</th></tr></thead><tbody><tr><td>provider</td><td>The provider to which the account belongs to.</td></tr><tr><td>providerSupports</td><td>An array of supported capabilities in the connected wallet. Possible values: "sign-deploy", "sign-transactionv1", "sign-message".</td></tr><tr><td>cspr_name</td><td>CSPR.name name</td></tr><tr><td>public_key</td><td>The public key.</td></tr><tr><td>connected_at</td><td>Timestamp for the initial connection of the account</td></tr><tr><td>token</td><td>n/a (for future use)</td></tr><tr><td>custom</td><td>Custom data. Depends on the provider.</td></tr><tr><td>balance</td><td>Total balance of the account in CSPR motes (includes liquid +staked balance)</td></tr><tr><td>liquid_balance</td><td>Liquid balance of the account in CSPR motes (includes liquid +staked balance)</td></tr><tr><td>logo</td><td>A URL to the account avatar or logo.</td></tr></tbody></table>

### CsprClickInitOptions

```
type CsprClickInitOptions = {
    appName: string,
    appId: string,
    contentMode: 'iframe' | 'popup',
    casperNode?: string,
    chainName?: string,
    providers: Array<string>,
}
```

<table><thead><tr><th width="201.33333333333331">Property</th><th>Description</th></tr></thead><tbody><tr><td>appName</td><td>The name of your app as it will be shown in the pop-up windows.</td></tr><tr><td>appId</td><td>An application identifier. Read more about it <a href="/pages/XE4wdI9S2eIeAIJpWLRE">here</a>.</td></tr><tr><td>contentMode</td><td>Defines whether the sign in interface is shown within an iframe in your application or in external pop-up windows.</td></tr><tr><td>casperNode</td><td>The RPC endpoint CSPR.click uses to get information from the Casper network and to send deploys.</td></tr><tr><td>chainName</td><td>Use <code>casper</code> or <code>casper-test</code> to interact with Casper Mainnet or Casper Testnet, respectively.</td></tr><tr><td>providers</td><td>The list of providers (wallets) you want to allow in your application</td></tr><tr><td></td><td></td></tr></tbody></table>

The wallets you can add to the `providers` array are:

* `casper-wallet`
* `ledger`
* `metamask-snap`

### DecryptMessageResult

```
export type DecryptMessageResult = {
    cancelled: boolean;
    decryptedMessage: string | null;
    error: string | null;
}
```

<table><thead><tr><th width="200">Property</th><th>Description</th></tr></thead><tbody><tr><td>cancelled</td><td><code>true</code> when the user has declined the decryption of a message. <code>false</code> otherwise</td></tr><tr><td>decryptedMessage</td><td>String with the decrypted message.</td></tr><tr><td>error</td><td><code>null</code> if the message has been successfully decrypted. It contains an error message otherwise..</td></tr></tbody></table>

### EncryptMessageResult

```
export type EncryptMessageResult = {
    cancelled: boolean;
    encryptedMessage: string | null;
    error: string | null;
}
```

<table><thead><tr><th width="200">Property</th><th>Description</th></tr></thead><tbody><tr><td>cancelled</td><td><code>true</code> when the user has declined the encryption of a message. <code>false</code> otherwise</td></tr><tr><td>encryptedMessage</td><td>Hexadecimal string with the encrypted message bytes.</td></tr><tr><td>error</td><td><code>null</code> if the message has been successfully encrypted. It contains an error message otherwise..</td></tr></tbody></table>

### ProviderInfo

```
type ProviderInfo = {
    key: string,
    name: string,
    version: string,
    supports: Array<string>,
}
```

<table><thead><tr><th width="200">Property</th><th>Description</th></tr></thead><tbody><tr><td>key</td><td>Internal name of the provider (wallet).</td></tr><tr><td>name</td><td>Friendly/Huma readable name of the provider.</td></tr><tr><td>version</td><td>Version of the provider. Only available for some wallets, when they're installed and/or connected.</td></tr><tr><td>supports</td><td><p>Array of keys of the features supported. The values returned may depend on the connected version of the provider.</p><p>Currently, the possible supported features are: <code>sign-deploy</code>, <code>sign-transactionv1</code>, and <code>sign-message</code>.</p></td></tr></tbody></table>

### SendResult

```
type SendResult = {
    cancelled: boolean,
    deployHash: string | null,
    transactionHash: string | null,
    error: string | null,
    errorData: object | null,
    status: string | null;
    csprCloudTransaction: any;
}
```

<table><thead><tr><th width="200">Property</th><th>Description</th></tr></thead><tbody><tr><td>cancelled</td><td><code>true</code> when the user has declined the signature of the transaction. <code>false</code> otherwise</td></tr><tr><td>deployHash</td><td>The hash of the deploy signed and sent to the Casper network. <code>null</code> when the deploy signature has been cancelled or there was an error sending it to the network</td></tr><tr><td>error</td><td><code>null</code> if the deploy has been successfully signed and sent to the network. It contains an error message when the network rejects the deploy.</td></tr><tr><td>errorData</td><td>extra information on the error. It's usually a json object.</td></tr><tr><td>status</td><td>Indicates the status of the transaction sent. This property is helpful when used in combination with the `waitProcessing` in the `send()` method. Possible values: "sent", "processed", "created", "cancelled", "error", "timeout".</td></tr><tr><td>csprCloudTransaction</td><td>Raw json object returned by CSPR.cloud streaming API for a processed transaction. Check CSPR.cloud docs for detailed info on the contents.</td></tr></tbody></table>

### SignResult

```
type SignResult = {
    cancelled: boolean,
    signatureHex: string | null,
    signature: Uint8Array | null,
    deploy: object | null,
    transaction: object | null,
    error: string | null,
}
```

<table><thead><tr><th width="200">Property</th><th>Description</th></tr></thead><tbody><tr><td>cancelled</td><td><code>true</code> when the user has declined the signature of the transaction. <code>false</code> otherwise</td></tr><tr><td>signatureHex</td><td>An hexadecimal string with the crytpographic signature of the deploy.</td></tr><tr><td>signature</td><td>A byte array with the cryptographic signature of the deploy.</td></tr><tr><td>deploy</td><td>A json object containing the deploy with the user approval entry (i.e., the new signature).</td></tr><tr><td>error</td><td><code>null</code> if the deploy has been successfully signed. It contains an error message otherwise.</td></tr></tbody></table>


---

# 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.cspr.click/cspr.click-sdk/reference/types.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.
