SmartContractsApi - interface

export
interface

  SmartContractsApiInterface

### Hierarchy

- SmartContractsApiInterface

### Implemented by

- SmartContractsApi

## Index

### Methods

- callReadOnlyFunction
- callReadOnlyFunctionRaw
- getContractById
- getContractByIdRaw
- getContractDataMapEntry
- getContractDataMapEntryRaw
- getContractEventsById
- getContractEventsByIdRaw
- getContractInterface
- getContractInterfaceRaw
- getContractSource
- getContractSourceRaw

## Methods

### callReadOnlyFunction

- callReadOnlyFunction(requestParameters: CallReadOnlyFunctionRequest, initOverrides?: RequestInit): Promise< ReadOnlyFunctionSuccessResponse >

- - Defined in src/generated/apis/SmartContractsApi.ts:102

  Call a read-only public function on a given smart contract. The smart contract and function are specified using the URL path. The arguments and the simulated tx-sender are supplied via the POST body in the following JSON format: Call read-only function

  #### Parameters

  - ##### requestParameters: CallReadOnlyFunctionRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ReadOnlyFunctionSuccessResponse >

### callReadOnlyFunctionRaw

- callReadOnlyFunctionRaw(requestParameters: CallReadOnlyFunctionRequest, initOverrides?: RequestInit): Promise< ApiResponse < ReadOnlyFunctionSuccessResponse >>

- - Defined in src/generated/apis/SmartContractsApi.ts:96

  Call a read-only public function on a given smart contract. The smart contract and function are specified using the URL path. The arguments and the simulated tx-sender are supplied via the POST body in the following JSON format:

  summary

    Call read-only function

  throws

    {RequiredError}

  memberof

    SmartContractsApiInterface

  #### Parameters

  - ##### requestParameters: CallReadOnlyFunctionRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ApiResponse < ReadOnlyFunctionSuccessResponse >>

### getContractById

- getContractById(requestParameters: GetContractByIdRequest, initOverrides?: RequestInit): Promise<object>

- - Defined in src/generated/apis/SmartContractsApi.ts:119

  Get contract info using the contract ID Get contract info

  #### Parameters

  - ##### requestParameters: GetContractByIdRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise<object>

### getContractByIdRaw

- getContractByIdRaw(requestParameters: GetContractByIdRequest, initOverrides?: RequestInit): Promise< ApiResponse <object>>

- - Defined in src/generated/apis/SmartContractsApi.ts:113

  Get contract info using the contract ID

  summary

    Get contract info

  throws

    {RequiredError}

  memberof

    SmartContractsApiInterface

  #### Parameters

  - ##### requestParameters: GetContractByIdRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ApiResponse <object>>

### getContractDataMapEntry

- getContractDataMapEntry(requestParameters: GetContractDataMapEntryRequest, initOverrides?: RequestInit): Promise< MapEntryResponse >

- - Defined in src/generated/apis/SmartContractsApi.ts:140

  Attempt to fetch data from a contract data map. The contract is identified with [Stacks Address] and [Contract Name] in the URL path. The map is identified with [Map Name]. The key to lookup in the map is supplied via the POST body. This should be supplied as the hex string serialization of the key (which should be a Clarity value). Note, this is a JSON string atom. In the response, `data` is the hex serialization of the map response. Note that map responses are Clarity option types, for non-existent values, this is a serialized none, and for all other responses, it is a serialized (some ...) object. Get specific data-map inside a contract

  #### Parameters

  - ##### requestParameters: GetContractDataMapEntryRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< MapEntryResponse >

### getContractDataMapEntryRaw

- getContractDataMapEntryRaw(requestParameters: GetContractDataMapEntryRequest, initOverrides?: RequestInit): Promise< ApiResponse < MapEntryResponse >>

- - Defined in src/generated/apis/SmartContractsApi.ts:134

  Attempt to fetch data from a contract data map. The contract is identified with [Stacks Address] and [Contract Name] in the URL path. The map is identified with [Map Name]. The key to lookup in the map is supplied via the POST body. This should be supplied as the hex string serialization of the key (which should be a Clarity value). Note, this is a JSON string atom. In the response, `data` is the hex serialization of the map response. Note that map responses are Clarity option types, for non-existent values, this is a serialized none, and for all other responses, it is a serialized (some ...) object.

  summary

    Get specific data-map inside a contract

  throws

    {RequiredError}

  memberof

    SmartContractsApiInterface

  #### Parameters

  - ##### requestParameters: GetContractDataMapEntryRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ApiResponse < MapEntryResponse >>

### getContractEventsById

- getContractEventsById(requestParameters: GetContractEventsByIdRequest, initOverrides?: RequestInit): Promise<object>

- - Defined in src/generated/apis/SmartContractsApi.ts:159

  Get contract events using a contract ID Get contract events

  #### Parameters

  - ##### requestParameters: GetContractEventsByIdRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise<object>

### getContractEventsByIdRaw

- getContractEventsByIdRaw(requestParameters: GetContractEventsByIdRequest, initOverrides?: RequestInit): Promise< ApiResponse <object>>

- - Defined in src/generated/apis/SmartContractsApi.ts:153

  Get contract events using a contract ID

  summary

    Get contract events

  throws

    {RequiredError}

  memberof

    SmartContractsApiInterface

  #### Parameters

  - ##### requestParameters: GetContractEventsByIdRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ApiResponse <object>>

### getContractInterface

- getContractInterface(requestParameters: GetContractInterfaceRequest, initOverrides?: RequestInit): Promise< ContractInterfaceResponse >

- - Defined in src/generated/apis/SmartContractsApi.ts:177

  Get contract interface using a `contract_address` and `contract name` Get contract interface

  #### Parameters

  - ##### requestParameters: GetContractInterfaceRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ContractInterfaceResponse >

### getContractInterfaceRaw

- getContractInterfaceRaw(requestParameters: GetContractInterfaceRequest, initOverrides?: RequestInit): Promise< ApiResponse < ContractInterfaceResponse >>

- - Defined in src/generated/apis/SmartContractsApi.ts:171

  Get contract interface using a `contract_address` and `contract name`

  summary

    Get contract interface

  throws

    {RequiredError}

  memberof

    SmartContractsApiInterface

  #### Parameters

  - ##### requestParameters: GetContractInterfaceRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ApiResponse < ContractInterfaceResponse >>

### getContractSource

- getContractSource(requestParameters: GetContractSourceRequest, initOverrides?: RequestInit): Promise< ContractSourceResponse >

- - Defined in src/generated/apis/SmartContractsApi.ts:196

  Returns the Clarity source code of a given contract, along with the block height it was published in, and the MARF proof for the data Get contract source

  #### Parameters

  - ##### requestParameters: GetContractSourceRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ContractSourceResponse >

### getContractSourceRaw

- getContractSourceRaw(requestParameters: GetContractSourceRequest, initOverrides?: RequestInit): Promise< ApiResponse < ContractSourceResponse >>

- - Defined in src/generated/apis/SmartContractsApi.ts:190

  Returns the Clarity source code of a given contract, along with the block height it was published in, and the MARF proof for the data

  summary

    Get contract source

  throws

    {RequiredError}

  memberof

    SmartContractsApiInterface

  #### Parameters

  - ##### requestParameters: GetContractSourceRequest

  - ##### Optional initOverrides: RequestInit

  #### Returns Promise< ApiResponse < ContractSourceResponse >>

Generated using TypeDoc