@taquito/contracts-library 11.1.0 → 12.0.0-beta-RC.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/errors.js +8 -29
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/read-provider-wrapper.js +87 -0
- package/dist/lib/read-provider-wrapper.js.map +1 -0
- package/dist/lib/rpc-wrapper.js +223 -344
- package/dist/lib/rpc-wrapper.js.map +1 -1
- package/dist/lib/taquito-contracts-library.js +24 -38
- package/dist/lib/taquito-contracts-library.js.map +1 -1
- package/dist/lib/version.js +2 -4
- package/dist/lib/version.js.map +1 -1
- package/dist/taquito-contracts-library.es6.js +183 -0
- package/dist/taquito-contracts-library.es6.js.map +1 -0
- package/dist/taquito-contracts-library.umd.js +180 -492
- package/dist/taquito-contracts-library.umd.js.map +1 -1
- package/dist/types/read-provider-wrapper.d.ts +33 -0
- package/dist/types/rpc-wrapper.d.ts +7 -2
- package/package.json +24 -25
- package/dist/taquito-contracts-library.es5.js +0 -496
- package/dist/taquito-contracts-library.es5.js.map +0 -1
package/dist/lib/errors.js
CHANGED
|
@@ -1,37 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.InvalidScriptFormatError = exports.InvalidAddressError = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _this = _super.call(this, message) || this;
|
|
21
|
-
Object.setPrototypeOf(_this, InvalidAddressError.prototype);
|
|
22
|
-
return _this;
|
|
4
|
+
class InvalidAddressError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
23
7
|
}
|
|
24
|
-
|
|
25
|
-
}(Error));
|
|
8
|
+
}
|
|
26
9
|
exports.InvalidAddressError = InvalidAddressError;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var _this = _super.call(this, message) || this;
|
|
31
|
-
Object.setPrototypeOf(_this, InvalidScriptFormatError.prototype);
|
|
32
|
-
return _this;
|
|
10
|
+
class InvalidScriptFormatError extends Error {
|
|
11
|
+
constructor(message) {
|
|
12
|
+
super(message);
|
|
33
13
|
}
|
|
34
|
-
|
|
35
|
-
}(Error));
|
|
14
|
+
}
|
|
36
15
|
exports.InvalidScriptFormatError = InvalidScriptFormatError;
|
|
37
16
|
//# sourceMappingURL=errors.js.map
|
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAJD,kDAIC;AAED,MAAa,wBAAyB,SAAQ,KAAK;IACjD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAJD,4DAIC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ReadWrapperContractsLibrary = void 0;
|
|
13
|
+
class ReadWrapperContractsLibrary {
|
|
14
|
+
constructor(readProvider, contractslibrary) {
|
|
15
|
+
this.readProvider = readProvider;
|
|
16
|
+
this.contractslibrary = contractslibrary;
|
|
17
|
+
}
|
|
18
|
+
getScript(address, block) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const contractData = this.contractslibrary.getContract(address);
|
|
21
|
+
if (contractData) {
|
|
22
|
+
return contractData.script;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return this.readProvider.getScript(address, block);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
getEntrypoints(contract) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const contractData = this.contractslibrary.getContract(contract);
|
|
32
|
+
if (contractData) {
|
|
33
|
+
return contractData.entrypoints;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return this.readProvider.getEntrypoints(contract);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
getBalance(address, block) {
|
|
41
|
+
return this.readProvider.getBalance(address, block);
|
|
42
|
+
}
|
|
43
|
+
getDelegate(address, block) {
|
|
44
|
+
return this.readProvider.getDelegate(address, block);
|
|
45
|
+
}
|
|
46
|
+
getNextProtocol(block) {
|
|
47
|
+
return this.readProvider.getNextProtocol(block);
|
|
48
|
+
}
|
|
49
|
+
getProtocolConstants(block) {
|
|
50
|
+
return this.readProvider.getProtocolConstants(block);
|
|
51
|
+
}
|
|
52
|
+
getStorage(contract, block) {
|
|
53
|
+
return this.readProvider.getStorage(contract, block);
|
|
54
|
+
}
|
|
55
|
+
getBlockHash(block) {
|
|
56
|
+
return this.readProvider.getBlockHash(block);
|
|
57
|
+
}
|
|
58
|
+
getBlockLevel(block) {
|
|
59
|
+
return this.readProvider.getBlockLevel(block);
|
|
60
|
+
}
|
|
61
|
+
getCounter(pkh, block) {
|
|
62
|
+
return this.readProvider.getCounter(pkh, block);
|
|
63
|
+
}
|
|
64
|
+
getBlockTimestamp(block) {
|
|
65
|
+
return this.readProvider.getBlockTimestamp(block);
|
|
66
|
+
}
|
|
67
|
+
getBigMapValue(bigMapQuery, block) {
|
|
68
|
+
return this.readProvider.getBigMapValue(bigMapQuery, block);
|
|
69
|
+
}
|
|
70
|
+
getSaplingDiffById(saplingStateQuery, block) {
|
|
71
|
+
return this.readProvider.getSaplingDiffById(saplingStateQuery, block);
|
|
72
|
+
}
|
|
73
|
+
getChainId() {
|
|
74
|
+
return this.readProvider.getChainId();
|
|
75
|
+
}
|
|
76
|
+
isAccountRevealed(publicKeyHash, block) {
|
|
77
|
+
return this.readProvider.isAccountRevealed(publicKeyHash, block);
|
|
78
|
+
}
|
|
79
|
+
getBlock(block) {
|
|
80
|
+
return this.readProvider.getBlock(block);
|
|
81
|
+
}
|
|
82
|
+
getLiveBlocks(block) {
|
|
83
|
+
return this.readProvider.getLiveBlocks(block);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.ReadWrapperContractsLibrary = ReadWrapperContractsLibrary;
|
|
87
|
+
//# sourceMappingURL=read-provider-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-provider-wrapper.js","sourceRoot":"","sources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