import 'package:multibaas/api.dart';
All URIs are relative to https://your_deployment.multibaas.com/api/v0
Method | HTTP request | Description |
---|---|---|
callContractFunction | POST /chains/{chain}/addresses/{address-or-label}/contracts/{contract}/methods/{method} | Call a contract function |
createContract | POST /contracts/{contract} | Create a contract |
createContracts | POST /contracts | Create multiple contracts |
deleteContract | DELETE /contracts/{contract} | Delete a contract |
deleteContractVersion | DELETE /contracts/{contract}/{version} | Delete a contract version |
deployContract | POST /contracts/{contract}/deploy | Deploy a contract |
deployContractVersion | POST /contracts/{contract}/{version}/deploy | Deploy a contract version |
getContract | GET /contracts/{contract} | Get a contract |
getContractVersion | GET /contracts/{contract}/{version} | Get a contract version |
getContractVersions | GET /contracts/{contract}/all | Get all contract versions |
getEventMonitorStatus | GET /chains/{chain}/addresses/{address-or-label}/contracts/{contract}/status | Get event monitor status |
getEventTypeConversions | GET /contracts/{contract}/{version}/events/{event} | Get event type conversions |
getFunctionTypeConversions | GET /contracts/{contract}/{version}/methods/{method} | Get function type conversions |
linkAddressContract | POST /chains/{chain}/addresses/{address-or-label}/contracts | Link address and contract |
listContractVersions | GET /contracts/{contract}/versions | List all contract versions |
listContracts | GET /contracts | List contracts |
setEventTypeConversions | POST /contracts/{contract}/{version}/events/{event} | Set event type conversions |
setFunctionTypeConversions | POST /contracts/{contract}/{version}/methods/{method} | Set function type conversions |
unlinkAddressContract | DELETE /chains/{chain}/addresses/{address-or-label}/contracts/{contract} | Unlink address and contract |
CallContractFunction200Response callContractFunction(chain, addressOrLabel, contract, method, postMethodArgs)
Call a contract function
Builds a transaction to call the given contract function. Returns a transaction to be signed and signs and submits to the blockchain it if the signAndSubmit
flag is enabled.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final ChainName chain = ; // ChainName | The blockchain chain label.
final String addressOrLabel = addressOrLabel_example; // String | An address or the label of an address.
final String contract = contract_example; // String |
final String method = method_example; // String | Contract function.
final PostMethodArgs postMethodArgs = ; // PostMethodArgs |
try {
final response = api.callContractFunction(chain, addressOrLabel, contract, method, postMethodArgs);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->callContractFunction: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
chain | ChainName | The blockchain chain label. | |
addressOrLabel | String | An address or the label of an address. | |
contract | String | ||
method | String | Contract function. | |
postMethodArgs | PostMethodArgs | [optional] |
CallContractFunction200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContract200Response createContract(contract, baseContract)
Create a contract
Adds a contract.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final BaseContract baseContract = ; // BaseContract |
try {
final response = api.createContract(contract, baseContract);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->createContract: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
baseContract | BaseContract | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse createContracts(baseContract)
Create multiple contracts
Adds multiple contracts.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final BuiltList<BaseContract> baseContract = ; // BuiltList<BaseContract> |
try {
final response = api.createContracts(baseContract);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->createContracts: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
baseContract | BuiltList<BaseContract> | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse deleteContract(contract)
Delete a contract
Deletes a contract and all its versions.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
try {
final response = api.deleteContract(contract);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->deleteContract: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse deleteContractVersion(contract, version)
Delete a contract version
Deletes a specific contract version.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final String version = version_example; // String | Contract Version.
try {
final response = api.deleteContractVersion(contract, version);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->deleteContractVersion: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
version | String | Contract Version. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeployContract200Response deployContract(contract, postMethodArgs)
Deploy a contract
Returns a transaction to deploy the given contract to the blockchain.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final PostMethodArgs postMethodArgs = ; // PostMethodArgs |
try {
final response = api.deployContract(contract, postMethodArgs);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->deployContract: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
postMethodArgs | PostMethodArgs | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeployContract200Response deployContractVersion(contract, version, postMethodArgs)
Deploy a contract version
Returns a transaction to deploy the given contract version to the blockchain.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final String version = version_example; // String | Contract Version.
final PostMethodArgs postMethodArgs = ; // PostMethodArgs |
try {
final response = api.deployContractVersion(contract, version, postMethodArgs);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->deployContractVersion: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
version | String | Contract Version. | |
postMethodArgs | PostMethodArgs | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContract200Response getContract(contract)
Get a contract
Returns the given contract.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
try {
final response = api.getContract(contract);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->getContract: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContract200Response getContractVersion(contract, version)
Get a contract version
Returns a specific contract version.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final String version = version_example; // String | Contract Version.
try {
final response = api.getContractVersion(contract, version);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->getContractVersion: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
version | String | Contract Version. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetContractVersions200Response getContractVersions(contract)
Get all contract versions
Returns all the versions of a contract.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
try {
final response = api.getContractVersions(contract);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->getContractVersions: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String |
GetContractVersions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEventMonitorStatus200Response getEventMonitorStatus(chain, addressOrLabel, contract)
Get event monitor status
Returns the event monitor status for a given address and contract.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final ChainName chain = ; // ChainName | The blockchain chain label.
final String addressOrLabel = addressOrLabel_example; // String | An address or the label of an address.
final String contract = contract_example; // String |
try {
final response = api.getEventMonitorStatus(chain, addressOrLabel, contract);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->getEventMonitorStatus: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
chain | ChainName | The blockchain chain label. | |
addressOrLabel | String | An address or the label of an address. | |
contract | String |
GetEventMonitorStatus200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEventTypeConversions200Response getEventTypeConversions(contract, version, event)
Get event type conversions
Returns the type conversion options for a given contract and event signature.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final String version = version_example; // String | Contract Version.
final String event = event_example; // String | Contract Event.
try {
final response = api.getEventTypeConversions(contract, version, event);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->getEventTypeConversions: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
version | String | Contract Version. | |
event | String | Contract Event. |
GetEventTypeConversions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetFunctionTypeConversions200Response getFunctionTypeConversions(contract, version, method)
Get function type conversions
Returns the type conversion options for a given contract and function signature.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final String version = version_example; // String | Contract Version.
final String method = method_example; // String | Contract function.
try {
final response = api.getFunctionTypeConversions(contract, version, method);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->getFunctionTypeConversions: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
version | String | Contract Version. | |
method | String | Contract function. |
GetFunctionTypeConversions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SetAddress201Response linkAddressContract(chain, addressOrLabel, linkAddressContractRequest)
Link address and contract
Links an address to a contract.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final ChainName chain = ; // ChainName | The blockchain chain label.
final String addressOrLabel = addressOrLabel_example; // String | An address or the label of an address.
final LinkAddressContractRequest linkAddressContractRequest = ; // LinkAddressContractRequest |
try {
final response = api.linkAddressContract(chain, addressOrLabel, linkAddressContractRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->linkAddressContract: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
chain | ChainName | The blockchain chain label. | |
addressOrLabel | String | An address or the label of an address. | |
linkAddressContractRequest | LinkAddressContractRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListContractVersions200Response listContractVersions(contract)
List all contract versions
Returns a list of the versions of a contract.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
try {
final response = api.listContractVersions(contract);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->listContractVersions: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String |
ListContractVersions200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListContracts200Response listContracts()
List contracts
Returns a list of contracts.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
try {
final response = api.listContracts();
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->listContracts: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse setEventTypeConversions(contract, version, event, contractEventOptions)
Set event type conversions
Sets the type conversion options for a given contract and event signature.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final String version = version_example; // String | Contract Version.
final String event = event_example; // String | Contract Event.
final ContractEventOptions contractEventOptions = ; // ContractEventOptions |
try {
final response = api.setEventTypeConversions(contract, version, event, contractEventOptions);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->setEventTypeConversions: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
version | String | Contract Version. | |
event | String | Contract Event. | |
contractEventOptions | ContractEventOptions | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseResponse setFunctionTypeConversions(contract, version, method, contractMethodOptions)
Set function type conversions
Sets the type conversion options for a given contract and function signature.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final String contract = contract_example; // String |
final String version = version_example; // String | Contract Version.
final String method = method_example; // String | Contract function.
final ContractMethodOptions contractMethodOptions = ; // ContractMethodOptions |
try {
final response = api.setFunctionTypeConversions(contract, version, method, contractMethodOptions);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->setFunctionTypeConversions: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
contract | String | ||
version | String | Contract Version. | |
method | String | Contract function. | |
contractMethodOptions | ContractMethodOptions | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SetAddress201Response unlinkAddressContract(chain, addressOrLabel, contract)
Unlink address and contract
Unlinks an address from a contract.
import 'package:multibaas/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
final api = Multibaas().getContractsApi();
final ChainName chain = ; // ChainName | The blockchain chain label.
final String addressOrLabel = addressOrLabel_example; // String | An address or the label of an address.
final String contract = contract_example; // String |
try {
final response = api.unlinkAddressContract(chain, addressOrLabel, contract);
print(response);
} catch on DioException (e) {
print('Exception when calling ContractsApi->unlinkAddressContract: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
chain | ChainName | The blockchain chain label. | |
addressOrLabel | String | An address or the label of an address. | |
contract | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]