@icp-sdk/core 5.0.0-beta.0 → 5.0.0-beta.1
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/lib/cjs/agent/actor.js +2 -2
- package/lib/cjs/agent/actor.js.map +1 -1
- package/lib/cjs/agent/agent/api.d.ts +6 -6
- package/lib/cjs/agent/agent/api.js +4 -4
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.d.ts +30 -0
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.d.ts.map +1 -1
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.js +33 -1
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.js.map +1 -1
- package/lib/cjs/agent/agent/http/index.d.ts +22 -3
- package/lib/cjs/agent/agent/http/index.d.ts.map +1 -1
- package/lib/cjs/agent/agent/http/index.js +131 -51
- package/lib/cjs/agent/agent/http/index.js.map +1 -1
- package/lib/cjs/agent/canisterStatus/index.d.ts +18 -50
- package/lib/cjs/agent/canisterStatus/index.d.ts.map +1 -1
- package/lib/cjs/agent/canisterStatus/index.js +30 -92
- package/lib/cjs/agent/canisterStatus/index.js.map +1 -1
- package/lib/cjs/agent/certificate.d.ts +68 -10
- package/lib/cjs/agent/certificate.d.ts.map +1 -1
- package/lib/cjs/agent/certificate.js +198 -27
- package/lib/cjs/agent/certificate.js.map +1 -1
- package/lib/cjs/agent/constants.d.ts +4 -0
- package/lib/cjs/agent/constants.d.ts.map +1 -1
- package/lib/cjs/agent/constants.js +5 -1
- package/lib/cjs/agent/constants.js.map +1 -1
- package/lib/cjs/agent/errors.d.ts +7 -1
- package/lib/cjs/agent/errors.d.ts.map +1 -1
- package/lib/cjs/agent/errors.js +19 -7
- package/lib/cjs/agent/errors.js.map +1 -1
- package/lib/cjs/agent/index.d.ts +97 -3
- package/lib/cjs/agent/index.d.ts.map +1 -1
- package/lib/cjs/agent/index.js +92 -9
- package/lib/cjs/agent/index.js.map +1 -1
- package/lib/cjs/agent/polling/index.js +1 -1
- package/lib/cjs/agent/polling/index.js.map +1 -1
- package/lib/cjs/agent/subnetStatus/index.d.ts +70 -0
- package/lib/cjs/agent/subnetStatus/index.d.ts.map +1 -0
- package/lib/cjs/agent/subnetStatus/index.js +224 -0
- package/lib/cjs/agent/subnetStatus/index.js.map +1 -0
- package/lib/cjs/agent/utils/readState.d.ts +84 -0
- package/lib/cjs/agent/utils/readState.d.ts.map +1 -0
- package/lib/cjs/agent/utils/readState.js +149 -0
- package/lib/cjs/agent/utils/readState.js.map +1 -0
- package/lib/cjs/candid/index.d.ts +20 -1
- package/lib/cjs/candid/index.d.ts.map +1 -1
- package/lib/cjs/candid/index.js +20 -1
- package/lib/cjs/candid/index.js.map +1 -1
- package/lib/cjs/identity/index.d.ts +30 -7
- package/lib/cjs/identity/index.d.ts.map +1 -1
- package/lib/cjs/identity/index.js +31 -11
- package/lib/cjs/identity/index.js.map +1 -1
- package/lib/cjs/identity/secp256k1/index.d.ts +48 -1
- package/lib/cjs/identity/secp256k1/index.d.ts.map +1 -1
- package/lib/cjs/identity/secp256k1/index.js +48 -1
- package/lib/cjs/identity/secp256k1/index.js.map +1 -1
- package/lib/cjs/principal/index.d.ts +15 -0
- package/lib/cjs/principal/index.d.ts.map +1 -1
- package/lib/cjs/principal/index.js +15 -0
- package/lib/cjs/principal/index.js.map +1 -1
- package/lib/esm/agent/actor.js +3 -3
- package/lib/esm/agent/actor.js.map +1 -1
- package/lib/esm/agent/agent/api.d.ts +6 -6
- package/lib/esm/agent/agent/api.js +3 -3
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.d.ts +30 -0
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.d.ts.map +1 -1
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.js +33 -1
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.js.map +1 -1
- package/lib/esm/agent/agent/http/index.d.ts +22 -3
- package/lib/esm/agent/agent/http/index.d.ts.map +1 -1
- package/lib/esm/agent/agent/http/index.js +134 -54
- package/lib/esm/agent/agent/http/index.js.map +1 -1
- package/lib/esm/agent/canister-env/index.d.ts +2 -1
- package/lib/esm/agent/canister-env/index.d.ts.map +1 -1
- package/lib/esm/agent/canister-env/index.js +2 -1
- package/lib/esm/agent/canister-env/index.js.map +1 -1
- package/lib/esm/agent/canisterStatus/index.d.ts +18 -50
- package/lib/esm/agent/canisterStatus/index.d.ts.map +1 -1
- package/lib/esm/agent/canisterStatus/index.js +31 -93
- package/lib/esm/agent/canisterStatus/index.js.map +1 -1
- package/lib/esm/agent/certificate.d.ts +68 -10
- package/lib/esm/agent/certificate.d.ts.map +1 -1
- package/lib/esm/agent/certificate.js +196 -29
- package/lib/esm/agent/certificate.js.map +1 -1
- package/lib/esm/agent/constants.d.ts +4 -0
- package/lib/esm/agent/constants.d.ts.map +1 -1
- package/lib/esm/agent/constants.js +4 -0
- package/lib/esm/agent/constants.js.map +1 -1
- package/lib/esm/agent/errors.d.ts +7 -1
- package/lib/esm/agent/errors.d.ts.map +1 -1
- package/lib/esm/agent/errors.js +15 -4
- package/lib/esm/agent/errors.js.map +1 -1
- package/lib/esm/agent/index.d.ts +97 -3
- package/lib/esm/agent/index.d.ts.map +1 -1
- package/lib/esm/agent/index.js +97 -3
- package/lib/esm/agent/index.js.map +1 -1
- package/lib/esm/agent/polling/index.js +1 -1
- package/lib/esm/agent/polling/index.js.map +1 -1
- package/lib/esm/agent/subnetStatus/index.d.ts +70 -0
- package/lib/esm/agent/subnetStatus/index.d.ts.map +1 -0
- package/lib/esm/agent/subnetStatus/index.js +183 -0
- package/lib/esm/agent/subnetStatus/index.js.map +1 -0
- package/lib/esm/agent/utils/readState.d.ts +84 -0
- package/lib/esm/agent/utils/readState.d.ts.map +1 -0
- package/lib/esm/agent/utils/readState.js +107 -0
- package/lib/esm/agent/utils/readState.js.map +1 -0
- package/lib/esm/candid/index.d.ts +20 -1
- package/lib/esm/candid/index.d.ts.map +1 -1
- package/lib/esm/candid/index.js +20 -1
- package/lib/esm/candid/index.js.map +1 -1
- package/lib/esm/identity/index.d.ts +30 -7
- package/lib/esm/identity/index.d.ts.map +1 -1
- package/lib/esm/identity/index.js +30 -9
- package/lib/esm/identity/index.js.map +1 -1
- package/lib/esm/identity/secp256k1/index.d.ts +48 -1
- package/lib/esm/identity/secp256k1/index.d.ts.map +1 -1
- package/lib/esm/identity/secp256k1/index.js +48 -1
- package/lib/esm/identity/secp256k1/index.js.map +1 -1
- package/lib/esm/principal/index.d.ts +15 -0
- package/lib/esm/principal/index.d.ts.map +1 -1
- package/lib/esm/principal/index.js +15 -0
- package/lib/esm/principal/index.js.map +1 -1
- package/package.json +1 -1
- package/src/agent/actor.ts +3 -3
- package/src/agent/agent/api.ts +8 -8
- package/src/agent/agent/http/index.ts +171 -58
- package/src/agent/canister-env/index.ts +2 -1
- package/src/agent/canisterStatus/index.ts +46 -191
- package/src/agent/certificate.ts +271 -52
- package/src/agent/constants.ts +5 -0
- package/src/agent/errors.ts +17 -4
- package/src/agent/index.ts +97 -3
- package/src/agent/polling/index.ts +1 -1
- package/src/agent/subnetStatus/index.ts +270 -0
- package/src/agent/utils/readState.ts +180 -0
- package/src/candid/index.ts +20 -1
- package/src/identity/index.ts +30 -10
- package/src/identity/secp256k1/index.ts +48 -1
- package/src/principal/index.ts +16 -0
|
@@ -40,23 +40,17 @@ const certificate_ts_1 = require("../certificate.js");
|
|
|
40
40
|
const cbor = __importStar(require("../cbor.js"));
|
|
41
41
|
const leb_ts_1 = require("../utils/leb.js");
|
|
42
42
|
const utils_1 = require("@noble/hashes/utils");
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* @param {string} decodeStrategy the strategy to use to decode the returned value
|
|
48
|
-
*/
|
|
49
|
-
class CustomPath {
|
|
50
|
-
constructor(key, path, decodeStrategy) {
|
|
51
|
-
this.key = key;
|
|
52
|
-
this.path = path;
|
|
53
|
-
this.decodeStrategy = decodeStrategy;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.CustomPath = CustomPath;
|
|
43
|
+
const readState_ts_1 = require("../utils/readState.js");
|
|
44
|
+
// Re-export shared types for backwards compatibility
|
|
45
|
+
var readState_ts_2 = require("../utils/readState.js");
|
|
46
|
+
Object.defineProperty(exports, "CustomPath", { enumerable: true, get: function () { return readState_ts_2.CustomPath; } });
|
|
57
47
|
/**
|
|
58
48
|
* Requests information from a canister's `read_state` endpoint.
|
|
59
49
|
* Can be used to request information about the canister's controllers, time, module hash, candid interface, and more.
|
|
50
|
+
*
|
|
51
|
+
* > [!WARNING]
|
|
52
|
+
* > Requesting the `subnet` path from the canister status might be deprecated in the future.
|
|
53
|
+
* > Use {@link https://js.icp.build/core/latest/libs/agent/api/namespaces/subnetstatus/functions/request | SubnetStatus.request} to fetch subnet information instead.
|
|
60
54
|
* @param {CanisterStatusOptions} options The configuration for the canister status request.
|
|
61
55
|
* @see {@link CanisterStatusOptions} for detailed options.
|
|
62
56
|
* @returns {Promise<StatusMap>} A map populated with data from the requested paths. Each path is a key in the map, and the value is the data obtained from the certificate for that path.
|
|
@@ -87,7 +81,7 @@ const request = async (options) => {
|
|
|
87
81
|
const certificate = await certificate_ts_1.Certificate.create({
|
|
88
82
|
certificate: response.certificate,
|
|
89
83
|
rootKey,
|
|
90
|
-
canisterId,
|
|
84
|
+
principal: { canisterId },
|
|
91
85
|
disableTimeVerification: disableCertificateTimeVerification,
|
|
92
86
|
agent,
|
|
93
87
|
});
|
|
@@ -125,7 +119,7 @@ const request = async (options) => {
|
|
|
125
119
|
break;
|
|
126
120
|
}
|
|
127
121
|
case 'controllers': {
|
|
128
|
-
status.set(path, decodeControllers(data));
|
|
122
|
+
status.set(path, (0, readState_ts_1.decodeControllers)(data));
|
|
129
123
|
break;
|
|
130
124
|
}
|
|
131
125
|
case 'module_hash': {
|
|
@@ -142,27 +136,8 @@ const request = async (options) => {
|
|
|
142
136
|
}
|
|
143
137
|
default: {
|
|
144
138
|
// Check for CustomPath signature
|
|
145
|
-
if (
|
|
146
|
-
|
|
147
|
-
case 'raw':
|
|
148
|
-
status.set(path.key, data);
|
|
149
|
-
break;
|
|
150
|
-
case 'leb128': {
|
|
151
|
-
status.set(path.key, (0, leb_ts_1.decodeLeb128)(data));
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
case 'cbor': {
|
|
155
|
-
status.set(path.key, cbor.decode(data));
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
|
-
case 'hex': {
|
|
159
|
-
status.set(path.key, (0, utils_1.bytesToHex)(data));
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
case 'utf-8': {
|
|
163
|
-
status.set(path.key, new TextDecoder().decode(data));
|
|
164
|
-
}
|
|
165
|
-
}
|
|
139
|
+
if ((0, readState_ts_1.isCustomPath)(path)) {
|
|
140
|
+
status.set(path.key, (0, readState_ts_1.decodeValue)(data, path.decodeStrategy));
|
|
166
141
|
}
|
|
167
142
|
}
|
|
168
143
|
}
|
|
@@ -175,7 +150,7 @@ const request = async (options) => {
|
|
|
175
150
|
error.hasCode(errors_ts_1.CertificateTimeErrorCode))) {
|
|
176
151
|
throw error;
|
|
177
152
|
}
|
|
178
|
-
if (
|
|
153
|
+
if ((0, readState_ts_1.isCustomPath)(path)) {
|
|
179
154
|
status.set(path.key, null);
|
|
180
155
|
}
|
|
181
156
|
else {
|
|
@@ -193,63 +168,35 @@ const request = async (options) => {
|
|
|
193
168
|
return status;
|
|
194
169
|
};
|
|
195
170
|
exports.request = request;
|
|
171
|
+
/**
|
|
172
|
+
* Lookup node keys from a certificate for a given canister.
|
|
173
|
+
* The certificate is assumed to be already verified, including whether the canister is in range of the subnet.
|
|
174
|
+
* @param certificate the certificate to lookup node keys from
|
|
175
|
+
* @param canisterId the canister ID to lookup node keys for
|
|
176
|
+
* @param root_key the root key to use to lookup node keys
|
|
177
|
+
* @returns a map of node IDs to public keys
|
|
178
|
+
*/
|
|
196
179
|
const fetchNodeKeys = (certificate, canisterId, root_key) => {
|
|
197
180
|
if (!canisterId._isPrincipal) {
|
|
198
181
|
throw errors_ts_1.InputError.fromCode(new errors_ts_1.UnexpectedErrorCode('Invalid canisterId'));
|
|
199
182
|
}
|
|
200
183
|
const cert = cbor.decode(certificate);
|
|
201
|
-
const
|
|
202
|
-
let delegation = cert.delegation;
|
|
184
|
+
const { delegation } = cert;
|
|
203
185
|
let subnetId;
|
|
204
186
|
if (delegation && delegation.subnet_id) {
|
|
205
187
|
subnetId = _principal_1.Principal.fromUint8Array(new Uint8Array(delegation.subnet_id));
|
|
206
188
|
}
|
|
207
|
-
// On local replica, with System type subnet, there is no delegation
|
|
208
189
|
else if (!delegation && typeof root_key !== 'undefined') {
|
|
190
|
+
// On local replica, with System type subnet, there is no delegation
|
|
209
191
|
subnetId = _principal_1.Principal.selfAuthenticating(new Uint8Array(root_key));
|
|
210
|
-
delegation = {
|
|
211
|
-
subnet_id: subnetId.toUint8Array(),
|
|
212
|
-
certificate: new Uint8Array(0),
|
|
213
|
-
};
|
|
214
192
|
}
|
|
215
|
-
// otherwise use default NNS subnet id
|
|
216
193
|
else {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
subnet_id: subnetId.toUint8Array(),
|
|
220
|
-
certificate: new Uint8Array(0),
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
const canisterInRange = (0, certificate_ts_1.check_canister_ranges)({ canisterId, subnetId, tree });
|
|
224
|
-
if (!canisterInRange) {
|
|
225
|
-
throw errors_ts_1.TrustError.fromCode(new errors_ts_1.CertificateNotAuthorizedErrorCode(canisterId, subnetId));
|
|
194
|
+
// otherwise use default NNS subnet id
|
|
195
|
+
subnetId = readState_ts_1.IC_ROOT_SUBNET_ID;
|
|
226
196
|
}
|
|
227
|
-
const
|
|
228
|
-
if (subnetLookupResult.status !== certificate_ts_1.LookupSubtreeStatus.Found) {
|
|
229
|
-
throw errors_ts_1.ProtocolError.fromCode(new errors_ts_1.LookupErrorCode('Node not found', subnetLookupResult.status));
|
|
230
|
-
}
|
|
231
|
-
if (subnetLookupResult.value instanceof Uint8Array) {
|
|
232
|
-
throw errors_ts_1.UnknownError.fromCode(new errors_ts_1.HashTreeDecodeErrorCode('Invalid node tree'));
|
|
233
|
-
}
|
|
234
|
-
// The forks are all labeled trees with the <node_id> label
|
|
235
|
-
const nodeForks = (0, certificate_ts_1.flatten_forks)(subnetLookupResult.value);
|
|
236
|
-
const nodeKeys = new Map();
|
|
237
|
-
nodeForks.forEach(fork => {
|
|
238
|
-
const node_id = _principal_1.Principal.from(fork[1]).toText();
|
|
239
|
-
const publicKeyLookupResult = (0, certificate_ts_1.lookup_path)(['public_key'], fork[2]);
|
|
240
|
-
if (publicKeyLookupResult.status !== certificate_ts_1.LookupPathStatus.Found) {
|
|
241
|
-
throw errors_ts_1.ProtocolError.fromCode(new errors_ts_1.LookupErrorCode('Public key not found', publicKeyLookupResult.status));
|
|
242
|
-
}
|
|
243
|
-
const derEncodedPublicKey = publicKeyLookupResult.value;
|
|
244
|
-
if (derEncodedPublicKey.byteLength !== 44) {
|
|
245
|
-
throw errors_ts_1.ProtocolError.fromCode(new errors_ts_1.DerKeyLengthMismatchErrorCode(44, derEncodedPublicKey.byteLength));
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
nodeKeys.set(node_id, derEncodedPublicKey);
|
|
249
|
-
}
|
|
250
|
-
});
|
|
197
|
+
const nodeKeys = (0, readState_ts_1.lookupNodeKeysFromCertificate)(cert, subnetId);
|
|
251
198
|
return {
|
|
252
|
-
subnetId:
|
|
199
|
+
subnetId: subnetId.toText(),
|
|
253
200
|
nodeKeys,
|
|
254
201
|
};
|
|
255
202
|
};
|
|
@@ -274,15 +221,13 @@ const encodePath = (path, canisterId) => {
|
|
|
274
221
|
];
|
|
275
222
|
default: {
|
|
276
223
|
// Check for CustomPath signature
|
|
277
|
-
if (
|
|
224
|
+
if ((0, readState_ts_1.isCustomPath)(path)) {
|
|
278
225
|
// For simplified metadata queries
|
|
279
226
|
if (typeof path['path'] === 'string' || path['path'] instanceof Uint8Array) {
|
|
280
|
-
|
|
281
|
-
const encoded = typeof metaPath === 'string' ? (0, utils_1.utf8ToBytes)(metaPath) : metaPath;
|
|
282
|
-
return [(0, utils_1.utf8ToBytes)('canister'), canisterUint8Array, (0, utils_1.utf8ToBytes)('metadata'), encoded];
|
|
283
|
-
// For non-metadata, return the provided custompath
|
|
227
|
+
return (0, readState_ts_1.encodeMetadataPath)(path.path, canisterUint8Array);
|
|
284
228
|
}
|
|
285
229
|
else {
|
|
230
|
+
// For non-metadata, return the provided custom path
|
|
286
231
|
return path['path'];
|
|
287
232
|
}
|
|
288
233
|
}
|
|
@@ -291,11 +236,4 @@ const encodePath = (path, canisterId) => {
|
|
|
291
236
|
throw errors_ts_1.UnknownError.fromCode(new errors_ts_1.UnexpectedErrorCode(`Error while encoding your path for canister status. Please ensure that your path ${path} was formatted correctly.`));
|
|
292
237
|
};
|
|
293
238
|
exports.encodePath = encodePath;
|
|
294
|
-
// Controllers are CBOR-encoded buffers
|
|
295
|
-
const decodeControllers = (buf) => {
|
|
296
|
-
const controllersRaw = cbor.decode(buf);
|
|
297
|
-
return controllersRaw.map(buf => {
|
|
298
|
-
return _principal_1.Principal.fromUint8Array(buf);
|
|
299
|
-
});
|
|
300
|
-
};
|
|
301
239
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/agent/canisterStatus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/agent/canisterStatus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAuC;AACvC,4CASsB;AAEtB,sDAAiF;AACjF,iDAAmC;AACnC,4CAA6C;AAC7C,+CAA8D;AAC9D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AC,MAAM,CAAC,CAAC;gBACtB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,wBAAY,CAAC,QAAQ,CACzB,IAAI,+BAAmB,CACrB,oFAAoF,IAAI,2BAA2B,CACpH,CACF,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,UAAU,cAoCrB"}
|
|
@@ -38,6 +38,18 @@ interface Delegation extends Record<string, unknown> {
|
|
|
38
38
|
certificate: Uint8Array;
|
|
39
39
|
}
|
|
40
40
|
type VerifyFunc = (pk: Uint8Array, sig: Uint8Array, msg: Uint8Array) => Promise<boolean> | boolean;
|
|
41
|
+
export type CertificatePrincipal = {
|
|
42
|
+
/**
|
|
43
|
+
* The effective canister ID of the request when verifying a response, or
|
|
44
|
+
* the signing canister ID when verifying a certified variable.
|
|
45
|
+
*/
|
|
46
|
+
canisterId: Principal;
|
|
47
|
+
} | {
|
|
48
|
+
/**
|
|
49
|
+
* The subnet ID when verifying a certificate from a subnet.
|
|
50
|
+
*/
|
|
51
|
+
subnetId: Principal;
|
|
52
|
+
};
|
|
41
53
|
export interface CreateCertificateOptions {
|
|
42
54
|
/**
|
|
43
55
|
* The bytes encoding the certificate to be verified
|
|
@@ -49,10 +61,9 @@ export interface CreateCertificateOptions {
|
|
|
49
61
|
*/
|
|
50
62
|
rootKey: Uint8Array;
|
|
51
63
|
/**
|
|
52
|
-
* The
|
|
53
|
-
* the signing canister ID when verifying a certified variable.
|
|
64
|
+
* The principal for which the certificate is being verified.
|
|
54
65
|
*/
|
|
55
|
-
|
|
66
|
+
principal: CertificatePrincipal;
|
|
56
67
|
/**
|
|
57
68
|
* BLS Verification strategy. Default strategy uses bls12_381 from @noble/curves
|
|
58
69
|
*/
|
|
@@ -71,7 +82,7 @@ export interface CreateCertificateOptions {
|
|
|
71
82
|
disableTimeVerification?: boolean;
|
|
72
83
|
/**
|
|
73
84
|
* The agent used to sync time with the IC network, if the certificate fails the freshness check.
|
|
74
|
-
* If the agent does not implement the {@link HttpAgent.getTimeDiffMsecs}, {@link HttpAgent.hasSyncedTime} and {@link HttpAgent.
|
|
85
|
+
* If the agent does not implement the {@link HttpAgent.getTimeDiffMsecs}, {@link HttpAgent.hasSyncedTime}, {@link HttpAgent.syncTime} and {@link HttpAgent.syncTimeWithSubnet} methods,
|
|
75
86
|
* time will not be synced in case of a freshness check failure.
|
|
76
87
|
* @default undefined
|
|
77
88
|
*/
|
|
@@ -80,7 +91,7 @@ export interface CreateCertificateOptions {
|
|
|
80
91
|
export declare class Certificate {
|
|
81
92
|
#private;
|
|
82
93
|
private _rootKey;
|
|
83
|
-
private
|
|
94
|
+
private _principal;
|
|
84
95
|
private _blsVerify;
|
|
85
96
|
private _maxAgeInMinutes;
|
|
86
97
|
cert: Cert;
|
|
@@ -106,6 +117,7 @@ export declare class Certificate {
|
|
|
106
117
|
lookup_subtree(path: NodePath): SubtreeLookupResult;
|
|
107
118
|
private verify;
|
|
108
119
|
private _checkDelegationAndGetKey;
|
|
120
|
+
private _syncTime;
|
|
109
121
|
}
|
|
110
122
|
/**
|
|
111
123
|
* Utility function to constrain the type of a lookup result
|
|
@@ -211,6 +223,16 @@ export declare function flatten_forks(t: HashTree): Array<LabeledHashTree | Leaf
|
|
|
211
223
|
* @returns {LabelLookupResult} the result of the label lookup
|
|
212
224
|
*/
|
|
213
225
|
export declare function find_label(label: NodeLabel, tree: HashTree): LabelLookupResult;
|
|
226
|
+
export type CheckCanisterRangesParams = {
|
|
227
|
+
canisterId: Principal;
|
|
228
|
+
subnetId: Principal;
|
|
229
|
+
tree: HashTree;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Canister ranges in the form of an array of [start, end] principal tuples,
|
|
233
|
+
* usually decoded from the certificate.
|
|
234
|
+
*/
|
|
235
|
+
export type CanisterRanges = Array<[Principal, Principal]>;
|
|
214
236
|
/**
|
|
215
237
|
* Check if a canister ID falls within the canister ranges of a given subnet
|
|
216
238
|
* @param params the parameters with which to check the canister ranges
|
|
@@ -219,10 +241,46 @@ export declare function find_label(label: NodeLabel, tree: HashTree): LabelLooku
|
|
|
219
241
|
* @param params.tree the hash tree in which to lookup the subnet's canister ranges
|
|
220
242
|
* @returns {boolean} `true` if the canister is in the range, `false` otherwise
|
|
221
243
|
*/
|
|
222
|
-
export declare function check_canister_ranges(params:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
244
|
+
export declare function check_canister_ranges(params: CheckCanisterRangesParams): boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Lookup the canister ranges using the `/canister_ranges/<subnet_id>/<ranges>` path.
|
|
247
|
+
* Certificates returned by `/api/v4/canister/<effective_canister_id>/call`
|
|
248
|
+
* and `/api/v3/canister/<effective_canister_id>/read_state` use this path.
|
|
249
|
+
*
|
|
250
|
+
* If the new lookup is not found, it tries the fallback lookup with {@link lookupCanisterRangesFallback}.
|
|
251
|
+
* @param params the parameters with which to lookup the canister ranges
|
|
252
|
+
* @param params.subnetId the subnet ID to lookup the canister ranges for
|
|
253
|
+
* @param params.tree the tree to search
|
|
254
|
+
* @param params.canisterId the canister ID to check
|
|
255
|
+
* @returns the encoded canister ranges. Use {@link decodeCanisterRanges} to decode them.
|
|
256
|
+
* @see https://internetcomputer.org/docs/references/ic-interface-spec#http-read-state
|
|
257
|
+
* @see https://internetcomputer.org/docs/references/ic-interface-spec#state-tree-canister-ranges
|
|
258
|
+
*/
|
|
259
|
+
export declare function lookupCanisterRanges(params: CheckCanisterRangesParams): Uint8Array;
|
|
260
|
+
/**
|
|
261
|
+
* Lookup the canister ranges using the `/subnet/<subnet_id>/canister_ranges` path.
|
|
262
|
+
* Certificates returned by `/api/v3/canister/<effective_canister_id>/call`
|
|
263
|
+
* and `/api/v2/canister/<effective_canister_id>/read_state` use this path.
|
|
264
|
+
* @param subnetId the subnet ID to lookup the canister ranges for
|
|
265
|
+
* @param tree the tree to search
|
|
266
|
+
* @returns the encoded canister ranges. Use {@link decodeCanisterRanges} to decode them.
|
|
267
|
+
* @see https://internetcomputer.org/docs/references/ic-interface-spec#http-read-state
|
|
268
|
+
*/
|
|
269
|
+
export declare function lookupCanisterRangesFallback(subnetId: Principal, tree: HashTree): Uint8Array;
|
|
270
|
+
/**
|
|
271
|
+
* Decode canister ranges from CBOR-encoded buffer
|
|
272
|
+
* @param lookupValue the CBOR-encoded value read from the certificate
|
|
273
|
+
* @returns an array of canister range tuples [start, end]
|
|
274
|
+
*/
|
|
275
|
+
export declare function decodeCanisterRanges(lookupValue: Uint8Array): CanisterRanges;
|
|
276
|
+
/**
|
|
277
|
+
* Get the subnet ID from a certificate
|
|
278
|
+
* If the certificate has a delegation, it returns the subnet ID from the delegation.
|
|
279
|
+
* If the certificate has no delegation, it returns the root subnet ID.
|
|
280
|
+
* @param certificate the certificate to get the subnet ID from
|
|
281
|
+
* @param rootKey the root key to use to get the subnet ID
|
|
282
|
+
* @returns the subnet ID
|
|
283
|
+
*/
|
|
284
|
+
export declare function getSubnetIdFromCertificate(certificate: Cert, rootKey: Uint8Array): Principal;
|
|
227
285
|
export {};
|
|
228
286
|
//# sourceMappingURL=certificate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../../src/agent/certificate.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../../src/agent/certificate.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAQvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAc5C,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,UAAU,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,OAAO,IAAI;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