All URIs are relative to https://cardano-mainnet.blockfrost.io/api/v0
| Method | HTTP request | Description |
|---|---|---|
| getScript | GET /scripts/{script_hash} | Specific script |
| getScriptRedeemers | GET /scripts/{script_hash}/redeemers | Redeemers of a specific script |
| getScripts | GET /scripts | Scripts |
open class func getScript(scriptHash: String, completion: @escaping (_ data: Script?, _ error: Error?) -> Void)Specific script
Information about a specific script
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import BlockfrostSwift
let scriptHash = "scriptHash_example" // String | Hash of the script
// Specific script
CardanoScriptsAPI.getScript(scriptHash: scriptHash) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| scriptHash | String | Hash of the script |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getScriptRedeemers(scriptHash: String, count: Int? = nil, page: Int? = nil, order: SortOrder? = nil, completion: @escaping (_ data: [ScriptRedeemer]?, _ error: Error?) -> Void)Redeemers of a specific script
List of redeemers of a specific script
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import BlockfrostSwift
let scriptHash = "scriptHash_example" // String | Hash of the script
let count = 987 // Int | The number of results displayed on one page. (optional) (default to 100)
let page = 987 // Int | The page number for listing the results. (optional) (default to 1)
let order = "order_example" // SortOrder | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. (optional) (default to .asc)
// Redeemers of a specific script
CardanoScriptsAPI.getScriptRedeemers(scriptHash: scriptHash, count: count, page: page, order: order) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| scriptHash | String | Hash of the script | |
| count | Int | The number of results displayed on one page. | [optional] [default to 100] |
| page | Int | The page number for listing the results. | [optional] [default to 1] |
| order | SortOrder | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. | [optional] [default to .asc] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getScripts(count: Int? = nil, page: Int? = nil, order: SortOrder? = nil, completion: @escaping (_ data: [Script]?, _ error: Error?) -> Void)Scripts
List of scripts.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import BlockfrostSwift
let count = 987 // Int | The number of results displayed on one page. (optional) (default to 100)
let page = 987 // Int | The page number for listing the results. (optional) (default to 1)
let order = "order_example" // SortOrder | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. (optional) (default to .asc)
// Scripts
CardanoScriptsAPI.getScripts(count: count, page: page, order: order) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| count | Int | The number of results displayed on one page. | [optional] [default to 100] |
| page | Int | The page number for listing the results. | [optional] [default to 1] |
| order | SortOrder | The ordering of items from the point of view of the blockchain, not the page listing itself. By default, we return oldest first, newest last. | [optional] [default to .asc] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]