-
Notifications
You must be signed in to change notification settings - Fork 178
Expand file tree
/
Copy pathindex.js
More file actions
59 lines (59 loc) · 2.37 KB
/
index.js
File metadata and controls
59 lines (59 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StacksDevnetOrchestrator = void 0;
var _a = require("../native/index.node"), stacksDevnetNew = _a.stacksDevnetNew, stacksDevnetStart = _a.stacksDevnetStart, stacksDevnetStop = _a.stacksDevnetStop, stacksDevnetWaitForStacksBlock = _a.stacksDevnetWaitForStacksBlock, stacksDevnetWaitForBitcoinBlock = _a.stacksDevnetWaitForBitcoinBlock, stacksDevnetGetStacksNodeUrl = _a.stacksDevnetGetStacksNodeUrl;
var StacksDevnetOrchestrator = /** @class */ (function () {
/**
* @summary Construct a new StacksDevnetOrchestrator
* @param {ClarinetManifest} manifest
* @memberof StacksDevnetOrchestrator
*/
function StacksDevnetOrchestrator(manifest) {
var manifestPath = manifest.path;
var logs = manifest.logs;
logs || (logs = false);
var accounts = manifest.accounts;
accounts || (accounts = []);
var devnet = manifest.devnet;
devnet || (devnet = {});
this.handle = stacksDevnetNew(manifestPath, logs, accounts, devnet);
}
/**
* @summary Start orchestrating containers
* @memberof StacksDevnetOrchestrator
*/
StacksDevnetOrchestrator.prototype.start = function () {
return stacksDevnetStart.call(this.handle);
};
/**
* @summary Returns the URL of the stacks-node container
* @memberof StacksDevnetOrchestrator
*/
StacksDevnetOrchestrator.prototype.getStacksNodeUrl = function () {
return stacksDevnetGetStacksNodeUrl.call(this.handle);
};
/**
* @summary Wait for the next Stacks block
* @memberof StacksDevnetOrchestrator
*/
StacksDevnetOrchestrator.prototype.waitForStacksBlock = function () {
return stacksDevnetWaitForStacksBlock.call(this.handle);
};
/**
* @summary Wait for the next Bitcoin block
* @memberof StacksDevnetOrchestrator
*/
StacksDevnetOrchestrator.prototype.waitForBitcoinBlock = function () {
return stacksDevnetWaitForBitcoinBlock.call(this.handle);
};
/**
* @summary Terminates the containers
* @memberof StacksDevnetOrchestrator
*/
StacksDevnetOrchestrator.prototype.stop = function () {
stacksDevnetStop.call(this.handle);
};
return StacksDevnetOrchestrator;
}());
exports.StacksDevnetOrchestrator = StacksDevnetOrchestrator;
//# sourceMappingURL=index.js.map