@icp-sdk/core 4.2.3 → 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.d.ts +203 -0
- package/lib/cjs/agent/actor.d.ts.map +1 -0
- package/lib/cjs/agent/actor.js +341 -0
- package/lib/cjs/agent/actor.js.map +1 -0
- package/lib/cjs/agent/agent/api.d.ts +216 -0
- package/lib/cjs/agent/agent/api.d.ts.map +1 -0
- package/lib/cjs/agent/agent/api.js +39 -0
- package/lib/cjs/agent/agent/api.js.map +1 -0
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.d.ts +37 -0
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.d.ts.map +1 -0
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.js +51 -0
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.js.map +1 -0
- package/lib/cjs/agent/agent/http/index.d.ts +190 -0
- package/lib/cjs/agent/agent/http/index.d.ts.map +1 -0
- package/lib/cjs/agent/agent/http/index.js +1159 -0
- package/lib/cjs/agent/agent/http/index.js.map +1 -0
- package/lib/cjs/agent/agent/http/transforms.d.ts +54 -0
- package/lib/cjs/agent/agent/http/transforms.d.ts.map +1 -0
- package/lib/cjs/agent/agent/http/transforms.js +135 -0
- package/lib/cjs/agent/agent/http/transforms.js.map +1 -0
- package/lib/cjs/agent/agent/http/types.d.ts +81 -0
- package/lib/cjs/agent/agent/http/types.d.ts.map +1 -0
- package/lib/cjs/agent/agent/http/types.js +43 -0
- package/lib/cjs/agent/agent/http/types.js.map +1 -0
- package/lib/cjs/agent/agent/index.d.ts +3 -0
- package/lib/cjs/agent/agent/index.d.ts.map +1 -0
- package/lib/cjs/agent/agent/index.js +19 -0
- package/lib/cjs/agent/agent/index.js.map +1 -0
- package/lib/cjs/agent/auth.d.ts +91 -0
- package/lib/cjs/agent/auth.d.ts.map +1 -0
- package/lib/cjs/agent/auth.js +65 -0
- package/lib/cjs/agent/auth.js.map +1 -0
- package/lib/cjs/agent/canisterStatus/index.d.ts +61 -0
- package/lib/cjs/agent/canisterStatus/index.d.ts.map +1 -0
- package/lib/cjs/agent/canisterStatus/index.js +239 -0
- package/lib/cjs/agent/canisterStatus/index.js.map +1 -0
- package/lib/cjs/agent/cbor.d.ts +26 -0
- package/lib/cjs/agent/cbor.d.ts.map +1 -0
- package/lib/cjs/agent/cbor.js +93 -0
- package/lib/cjs/agent/cbor.js.map +1 -0
- package/lib/cjs/agent/certificate.d.ts +286 -0
- package/lib/cjs/agent/certificate.d.ts.map +1 -0
- package/lib/cjs/agent/certificate.js +762 -0
- package/lib/cjs/agent/certificate.js.map +1 -0
- package/lib/cjs/agent/constants.d.ts +18 -0
- package/lib/cjs/agent/constants.d.ts.map +1 -0
- package/lib/cjs/agent/constants.js +22 -0
- package/lib/cjs/agent/constants.js.map +1 -0
- package/lib/cjs/agent/der.d.ts +34 -0
- package/lib/cjs/agent/der.d.ts.map +1 -0
- package/lib/cjs/agent/der.js +175 -0
- package/lib/cjs/agent/der.js.map +1 -0
- package/lib/cjs/agent/errors.d.ts +386 -0
- package/lib/cjs/agent/errors.d.ts.map +1 -0
- package/lib/cjs/agent/errors.js +745 -0
- package/lib/cjs/agent/errors.js.map +1 -0
- package/lib/cjs/agent/fetch_candid.d.ts +9 -0
- package/lib/cjs/agent/fetch_candid.d.ts.map +1 -0
- package/lib/cjs/agent/fetch_candid.js +69 -0
- package/lib/cjs/agent/fetch_candid.js.map +1 -0
- package/lib/cjs/agent/index.d.ts +125 -1
- package/lib/cjs/agent/index.d.ts.map +1 -1
- package/lib/cjs/agent/index.js +142 -1
- package/lib/cjs/agent/index.js.map +1 -1
- package/lib/cjs/agent/observable.d.ts +24 -0
- package/lib/cjs/agent/observable.d.ts.map +1 -0
- package/lib/cjs/agent/observable.js +34 -0
- package/lib/cjs/agent/observable.js.map +1 -0
- package/lib/cjs/agent/polling/backoff.d.ts +50 -0
- package/lib/cjs/agent/polling/backoff.d.ts.map +1 -0
- package/lib/cjs/agent/polling/backoff.js +90 -0
- package/lib/cjs/agent/polling/backoff.js.map +1 -0
- package/lib/cjs/agent/polling/index.d.ts +63 -0
- package/lib/cjs/agent/polling/index.d.ts.map +1 -0
- package/lib/cjs/agent/polling/index.js +183 -0
- package/lib/cjs/agent/polling/index.js.map +1 -0
- package/lib/cjs/agent/polling/strategy.d.ts +52 -0
- package/lib/cjs/agent/polling/strategy.d.ts.map +1 -0
- package/lib/cjs/agent/polling/strategy.js +104 -0
- package/lib/cjs/agent/polling/strategy.js.map +1 -0
- package/lib/cjs/agent/public_key.d.ts +16 -0
- package/lib/cjs/agent/public_key.d.ts.map +1 -0
- package/lib/cjs/agent/public_key.js +52 -0
- package/lib/cjs/agent/public_key.js.map +1 -0
- package/lib/cjs/agent/request_id.d.ts +24 -0
- package/lib/cjs/agent/request_id.d.ts.map +1 -0
- package/lib/cjs/agent/request_id.js +88 -0
- package/lib/cjs/agent/request_id.js.map +1 -0
- 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/bls.d.ts +10 -0
- package/lib/cjs/agent/utils/bls.d.ts.map +1 -0
- package/lib/cjs/agent/utils/bls.js +20 -0
- package/lib/cjs/agent/utils/bls.js.map +1 -0
- package/lib/cjs/agent/utils/buffer.d.ts +22 -0
- package/lib/cjs/agent/utils/buffer.d.ts.map +1 -0
- package/lib/cjs/agent/utils/buffer.js +55 -0
- package/lib/cjs/agent/utils/buffer.js.map +1 -0
- package/lib/cjs/agent/utils/expirableMap.d.ts +80 -0
- package/lib/cjs/agent/utils/expirableMap.d.ts.map +1 -0
- package/lib/cjs/agent/utils/expirableMap.js +148 -0
- package/lib/cjs/agent/utils/expirableMap.js.map +1 -0
- package/lib/cjs/agent/utils/leb.d.ts +3 -0
- package/lib/cjs/agent/utils/leb.d.ts.map +1 -0
- package/lib/cjs/agent/utils/leb.js +17 -0
- package/lib/cjs/agent/utils/leb.js.map +1 -0
- package/lib/cjs/agent/utils/random.d.ts +6 -0
- package/lib/cjs/agent/utils/random.d.ts.map +1 -0
- package/lib/cjs/agent/utils/random.js +29 -0
- package/lib/cjs/agent/utils/random.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/candid-core.d.ts +72 -0
- package/lib/cjs/candid/candid-core.d.ts.map +1 -0
- package/lib/cjs/candid/candid-core.js +251 -0
- package/lib/cjs/candid/candid-core.js.map +1 -0
- package/lib/cjs/candid/candid-ui.d.ts +35 -0
- package/lib/cjs/candid/candid-ui.d.ts.map +1 -0
- package/lib/cjs/candid/candid-ui.js +317 -0
- package/lib/cjs/candid/candid-ui.js.map +1 -0
- package/lib/cjs/candid/idl.d.ts +579 -0
- package/lib/cjs/candid/idl.d.ts.map +1 -0
- package/lib/cjs/candid/idl.js +2228 -0
- package/lib/cjs/candid/idl.js.map +1 -0
- package/lib/cjs/candid/index.d.ts +30 -1
- package/lib/cjs/candid/index.d.ts.map +1 -1
- package/lib/cjs/candid/index.js +52 -1
- package/lib/cjs/candid/index.js.map +1 -1
- package/lib/cjs/candid/types.d.ts +6 -0
- package/lib/cjs/candid/types.d.ts.map +1 -0
- package/lib/cjs/candid/types.js +4 -0
- package/lib/cjs/candid/types.js.map +1 -0
- package/lib/cjs/candid/utils/bigint-math.d.ts +14 -0
- package/lib/cjs/candid/utils/bigint-math.d.ts.map +1 -0
- package/lib/cjs/candid/utils/bigint-math.js +30 -0
- package/lib/cjs/candid/utils/bigint-math.js.map +1 -0
- package/lib/cjs/candid/utils/buffer.d.ts +86 -0
- package/lib/cjs/candid/utils/buffer.d.ts.map +1 -0
- package/lib/cjs/candid/utils/buffer.js +191 -0
- package/lib/cjs/candid/utils/buffer.js.map +1 -0
- package/lib/cjs/candid/utils/hash.d.ts +7 -0
- package/lib/cjs/candid/utils/hash.d.ts.map +1 -0
- package/lib/cjs/candid/utils/hash.js +33 -0
- package/lib/cjs/candid/utils/hash.js.map +1 -0
- package/lib/cjs/candid/utils/leb128.d.ts +65 -0
- package/lib/cjs/candid/utils/leb128.d.ts.map +1 -0
- package/lib/cjs/candid/utils/leb128.js +228 -0
- package/lib/cjs/candid/utils/leb128.js.map +1 -0
- package/lib/cjs/identity/identity/delegation.d.ts +164 -0
- package/lib/cjs/identity/identity/delegation.d.ts.map +1 -0
- package/lib/cjs/identity/identity/delegation.js +302 -0
- package/lib/cjs/identity/identity/delegation.js.map +1 -0
- package/lib/cjs/identity/identity/ecdsa.d.ts +62 -0
- package/lib/cjs/identity/identity/ecdsa.d.ts.map +1 -0
- package/lib/cjs/identity/identity/ecdsa.js +117 -0
- package/lib/cjs/identity/identity/ecdsa.js.map +1 -0
- package/lib/cjs/identity/identity/ed25519.d.ts +67 -0
- package/lib/cjs/identity/identity/ed25519.d.ts.map +1 -0
- package/lib/cjs/identity/identity/ed25519.js +200 -0
- package/lib/cjs/identity/identity/ed25519.js.map +1 -0
- package/lib/cjs/identity/identity/partial.d.ts +34 -0
- package/lib/cjs/identity/identity/partial.d.ts.map +1 -0
- package/lib/cjs/identity/identity/partial.js +54 -0
- package/lib/cjs/identity/identity/partial.js.map +1 -0
- package/lib/cjs/identity/identity/webauthn.d.ts +51 -0
- package/lib/cjs/identity/identity/webauthn.d.ts.map +1 -0
- package/lib/cjs/identity/identity/webauthn.js +197 -0
- package/lib/cjs/identity/identity/webauthn.js.map +1 -0
- package/lib/cjs/identity/index.d.ts +38 -1
- package/lib/cjs/identity/index.d.ts.map +1 -1
- package/lib/cjs/identity/index.js +44 -1
- package/lib/cjs/identity/index.js.map +1 -1
- package/lib/cjs/identity/secp256k1/der.d.ts +33 -0
- package/lib/cjs/identity/secp256k1/der.d.ts.map +1 -0
- package/lib/cjs/identity/secp256k1/der.js +165 -0
- package/lib/cjs/identity/secp256k1/der.js.map +1 -0
- package/lib/cjs/identity/secp256k1/index.d.ts +51 -1
- package/lib/cjs/identity/secp256k1/index.d.ts.map +1 -1
- package/lib/cjs/identity/secp256k1/index.js +51 -1
- package/lib/cjs/identity/secp256k1/index.js.map +1 -1
- package/lib/cjs/identity/secp256k1/pem.d.ts +7 -0
- package/lib/cjs/identity/secp256k1/pem.d.ts.map +1 -0
- package/lib/cjs/identity/secp256k1/pem.js +75 -0
- package/lib/cjs/identity/secp256k1/pem.js.map +1 -0
- package/lib/cjs/identity/secp256k1/secp256k1.d.ts +87 -0
- package/lib/cjs/identity/secp256k1/secp256k1.d.ts.map +1 -0
- package/lib/cjs/identity/secp256k1/secp256k1.js +260 -0
- package/lib/cjs/identity/secp256k1/secp256k1.js.map +1 -0
- package/lib/cjs/principal/index.d.ts +18 -1
- package/lib/cjs/principal/index.d.ts.map +1 -1
- package/lib/cjs/principal/index.js +22 -1
- package/lib/cjs/principal/index.js.map +1 -1
- package/lib/cjs/principal/principal.d.ts +50 -0
- package/lib/cjs/principal/principal.d.ts.map +1 -0
- package/lib/cjs/principal/principal.js +148 -0
- package/lib/cjs/principal/principal.js.map +1 -0
- package/lib/cjs/principal/utils/base32.d.ts +10 -0
- package/lib/cjs/principal/utils/base32.d.ts.map +1 -0
- package/lib/cjs/principal/utils/base32.js +90 -0
- package/lib/cjs/principal/utils/base32.js.map +1 -0
- package/lib/cjs/principal/utils/getCrc.d.ts +6 -0
- package/lib/cjs/principal/utils/getCrc.d.ts.map +1 -0
- package/lib/cjs/principal/utils/getCrc.js +53 -0
- package/lib/cjs/principal/utils/getCrc.js.map +1 -0
- package/lib/esm/agent/actor.d.ts +203 -0
- package/lib/esm/agent/actor.d.ts.map +1 -0
- package/lib/esm/agent/actor.js +337 -0
- package/lib/esm/agent/actor.js.map +1 -0
- package/lib/esm/agent/agent/api.d.ts +216 -0
- package/lib/esm/agent/agent/api.d.ts.map +1 -0
- package/lib/esm/agent/agent/api.js +34 -0
- package/lib/esm/agent/agent/api.js.map +1 -0
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.d.ts +37 -0
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.d.ts.map +1 -0
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.js +48 -0
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.js.map +1 -0
- package/lib/esm/agent/agent/http/index.d.ts +190 -0
- package/lib/esm/agent/agent/http/index.d.ts.map +1 -0
- package/lib/esm/agent/agent/http/index.js +1117 -0
- package/lib/esm/agent/agent/http/index.js.map +1 -0
- package/lib/esm/agent/agent/http/transforms.d.ts +54 -0
- package/lib/esm/agent/agent/http/transforms.d.ts.map +1 -0
- package/lib/esm/agent/agent/http/transforms.js +128 -0
- package/lib/esm/agent/agent/http/transforms.js.map +1 -0
- package/lib/esm/agent/agent/http/types.d.ts +81 -0
- package/lib/esm/agent/agent/http/types.d.ts.map +1 -0
- package/lib/esm/agent/agent/http/types.js +39 -0
- package/lib/esm/agent/agent/http/types.js.map +1 -0
- package/lib/esm/agent/agent/index.d.ts +3 -0
- package/lib/esm/agent/agent/index.d.ts.map +1 -0
- package/lib/esm/agent/agent/index.js +3 -0
- package/lib/esm/agent/agent/index.js.map +1 -0
- package/lib/esm/agent/auth.d.ts +91 -0
- package/lib/esm/agent/auth.d.ts.map +1 -0
- package/lib/esm/agent/auth.js +59 -0
- package/lib/esm/agent/auth.js.map +1 -0
- package/lib/esm/agent/canister-env/index.d.ts +111 -1
- package/lib/esm/agent/canister-env/index.d.ts.map +1 -1
- package/lib/esm/agent/canister-env/index.js +111 -1
- package/lib/esm/agent/canister-env/index.js.map +1 -1
- package/lib/esm/agent/canisterStatus/index.d.ts +61 -0
- package/lib/esm/agent/canisterStatus/index.d.ts.map +1 -0
- package/lib/esm/agent/canisterStatus/index.js +199 -0
- package/lib/esm/agent/canisterStatus/index.js.map +1 -0
- package/lib/esm/agent/cbor.d.ts +26 -0
- package/lib/esm/agent/cbor.d.ts.map +1 -0
- package/lib/esm/agent/cbor.js +54 -0
- package/lib/esm/agent/cbor.js.map +1 -0
- package/lib/esm/agent/certificate.d.ts +286 -0
- package/lib/esm/agent/certificate.d.ts.map +1 -0
- package/lib/esm/agent/certificate.js +712 -0
- package/lib/esm/agent/certificate.js.map +1 -0
- package/lib/esm/agent/constants.d.ts +18 -0
- package/lib/esm/agent/constants.d.ts.map +1 -0
- package/lib/esm/agent/constants.js +19 -0
- package/lib/esm/agent/constants.js.map +1 -0
- package/lib/esm/agent/der.d.ts +34 -0
- package/lib/esm/agent/der.d.ts.map +1 -0
- package/lib/esm/agent/der.js +166 -0
- package/lib/esm/agent/der.js.map +1 -0
- package/lib/esm/agent/errors.d.ts +386 -0
- package/lib/esm/agent/errors.d.ts.map +1 -0
- package/lib/esm/agent/errors.js +689 -0
- package/lib/esm/agent/errors.js.map +1 -0
- package/lib/esm/agent/fetch_candid.d.ts +9 -0
- package/lib/esm/agent/fetch_candid.d.ts.map +1 -0
- package/lib/esm/agent/fetch_candid.js +33 -0
- package/lib/esm/agent/fetch_candid.js.map +1 -0
- package/lib/esm/agent/index.d.ts +125 -1
- package/lib/esm/agent/index.d.ts.map +1 -1
- package/lib/esm/agent/index.js +125 -1
- package/lib/esm/agent/index.js.map +1 -1
- package/lib/esm/agent/observable.d.ts +24 -0
- package/lib/esm/agent/observable.d.ts.map +1 -0
- package/lib/esm/agent/observable.js +29 -0
- package/lib/esm/agent/observable.js.map +1 -0
- package/lib/esm/agent/polling/backoff.d.ts +50 -0
- package/lib/esm/agent/polling/backoff.d.ts.map +1 -0
- package/lib/esm/agent/polling/backoff.js +85 -0
- package/lib/esm/agent/polling/backoff.js.map +1 -0
- package/lib/esm/agent/polling/index.d.ts +63 -0
- package/lib/esm/agent/polling/index.d.ts.map +1 -0
- package/lib/esm/agent/polling/index.js +144 -0
- package/lib/esm/agent/polling/index.js.map +1 -0
- package/lib/esm/agent/polling/strategy.d.ts +52 -0
- package/lib/esm/agent/polling/strategy.d.ts.map +1 -0
- package/lib/esm/agent/polling/strategy.js +94 -0
- package/lib/esm/agent/polling/strategy.js.map +1 -0
- package/lib/esm/agent/public_key.d.ts +16 -0
- package/lib/esm/agent/public_key.d.ts.map +1 -0
- package/lib/esm/agent/public_key.js +48 -0
- package/lib/esm/agent/public_key.js.map +1 -0
- package/lib/esm/agent/request_id.d.ts +24 -0
- package/lib/esm/agent/request_id.d.ts.map +1 -0
- package/lib/esm/agent/request_id.js +83 -0
- package/lib/esm/agent/request_id.js.map +1 -0
- 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/bls.d.ts +10 -0
- package/lib/esm/agent/utils/bls.d.ts.map +1 -0
- package/lib/esm/agent/utils/bls.js +17 -0
- package/lib/esm/agent/utils/bls.js.map +1 -0
- package/lib/esm/agent/utils/buffer.d.ts +22 -0
- package/lib/esm/agent/utils/buffer.d.ts.map +1 -0
- package/lib/esm/agent/utils/buffer.js +50 -0
- package/lib/esm/agent/utils/buffer.js.map +1 -0
- package/lib/esm/agent/utils/expirableMap.d.ts +80 -0
- package/lib/esm/agent/utils/expirableMap.d.ts.map +1 -0
- package/lib/esm/agent/utils/expirableMap.js +144 -0
- package/lib/esm/agent/utils/expirableMap.js.map +1 -0
- package/lib/esm/agent/utils/leb.d.ts +3 -0
- package/lib/esm/agent/utils/leb.d.ts.map +1 -0
- package/lib/esm/agent/utils/leb.js +12 -0
- package/lib/esm/agent/utils/leb.js.map +1 -0
- package/lib/esm/agent/utils/random.d.ts +6 -0
- package/lib/esm/agent/utils/random.d.ts.map +1 -0
- package/lib/esm/agent/utils/random.js +25 -0
- package/lib/esm/agent/utils/random.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/candid-core.d.ts +72 -0
- package/lib/esm/candid/candid-core.d.ts.map +1 -0
- package/lib/esm/candid/candid-core.js +241 -0
- package/lib/esm/candid/candid-core.js.map +1 -0
- package/lib/esm/candid/candid-ui.d.ts +35 -0
- package/lib/esm/candid/candid-ui.d.ts.map +1 -0
- package/lib/esm/candid/candid-ui.js +272 -0
- package/lib/esm/candid/candid-ui.js.map +1 -0
- package/lib/esm/candid/idl.d.ts +579 -0
- package/lib/esm/candid/idl.d.ts.map +1 -0
- package/lib/esm/candid/idl.js +2189 -0
- package/lib/esm/candid/idl.js.map +1 -0
- package/lib/esm/candid/index.d.ts +30 -1
- package/lib/esm/candid/index.d.ts.map +1 -1
- package/lib/esm/candid/index.js +29 -1
- package/lib/esm/candid/index.js.map +1 -1
- package/lib/esm/candid/types.d.ts +6 -0
- package/lib/esm/candid/types.d.ts.map +1 -0
- package/lib/esm/candid/types.js +3 -0
- package/lib/esm/candid/types.js.map +1 -0
- package/lib/esm/candid/utils/bigint-math.d.ts +14 -0
- package/lib/esm/candid/utils/bigint-math.d.ts.map +1 -0
- package/lib/esm/candid/utils/bigint-math.js +26 -0
- package/lib/esm/candid/utils/bigint-math.js.map +1 -0
- package/lib/esm/candid/utils/buffer.d.ts +86 -0
- package/lib/esm/candid/utils/buffer.d.ts.map +1 -0
- package/lib/esm/candid/utils/buffer.js +182 -0
- package/lib/esm/candid/utils/buffer.js.map +1 -0
- package/lib/esm/candid/utils/hash.d.ts +7 -0
- package/lib/esm/candid/utils/hash.d.ts.map +1 -0
- package/lib/esm/candid/utils/hash.js +30 -0
- package/lib/esm/candid/utils/hash.js.map +1 -0
- package/lib/esm/candid/utils/leb128.d.ts +65 -0
- package/lib/esm/candid/utils/leb128.d.ts.map +1 -0
- package/lib/esm/candid/utils/leb128.js +216 -0
- package/lib/esm/candid/utils/leb128.js.map +1 -0
- package/lib/esm/identity/identity/delegation.d.ts +164 -0
- package/lib/esm/identity/identity/delegation.d.ts.map +1 -0
- package/lib/esm/identity/identity/delegation.js +294 -0
- package/lib/esm/identity/identity/delegation.js.map +1 -0
- package/lib/esm/identity/identity/ecdsa.d.ts +62 -0
- package/lib/esm/identity/identity/ecdsa.d.ts.map +1 -0
- package/lib/esm/identity/identity/ecdsa.js +112 -0
- package/lib/esm/identity/identity/ecdsa.js.map +1 -0
- package/lib/esm/identity/identity/ed25519.d.ts +67 -0
- package/lib/esm/identity/identity/ed25519.d.ts.map +1 -0
- package/lib/esm/identity/identity/ed25519.js +195 -0
- package/lib/esm/identity/identity/ed25519.js.map +1 -0
- package/lib/esm/identity/identity/partial.d.ts +34 -0
- package/lib/esm/identity/identity/partial.d.ts.map +1 -0
- package/lib/esm/identity/identity/partial.js +50 -0
- package/lib/esm/identity/identity/partial.js.map +1 -0
- package/lib/esm/identity/identity/webauthn.d.ts +51 -0
- package/lib/esm/identity/identity/webauthn.d.ts.map +1 -0
- package/lib/esm/identity/identity/webauthn.js +192 -0
- package/lib/esm/identity/identity/webauthn.js.map +1 -0
- package/lib/esm/identity/index.d.ts +38 -1
- package/lib/esm/identity/index.d.ts.map +1 -1
- package/lib/esm/identity/index.js +38 -1
- package/lib/esm/identity/index.js.map +1 -1
- package/lib/esm/identity/secp256k1/der.d.ts +33 -0
- package/lib/esm/identity/secp256k1/der.d.ts.map +1 -0
- package/lib/esm/identity/secp256k1/der.js +156 -0
- package/lib/esm/identity/secp256k1/der.js.map +1 -0
- package/lib/esm/identity/secp256k1/index.d.ts +51 -1
- package/lib/esm/identity/secp256k1/index.d.ts.map +1 -1
- package/lib/esm/identity/secp256k1/index.js +51 -1
- package/lib/esm/identity/secp256k1/index.js.map +1 -1
- package/lib/esm/identity/secp256k1/pem.d.ts +7 -0
- package/lib/esm/identity/secp256k1/pem.d.ts.map +1 -0
- package/lib/esm/identity/secp256k1/pem.js +39 -0
- package/lib/esm/identity/secp256k1/pem.js.map +1 -0
- package/lib/esm/identity/secp256k1/secp256k1.d.ts +87 -0
- package/lib/esm/identity/secp256k1/secp256k1.d.ts.map +1 -0
- package/lib/esm/identity/secp256k1/secp256k1.js +222 -0
- package/lib/esm/identity/secp256k1/secp256k1.js.map +1 -0
- package/lib/esm/principal/index.d.ts +18 -1
- package/lib/esm/principal/index.d.ts.map +1 -1
- package/lib/esm/principal/index.js +18 -1
- package/lib/esm/principal/index.js.map +1 -1
- package/lib/esm/principal/principal.d.ts +50 -0
- package/lib/esm/principal/principal.d.ts.map +1 -0
- package/lib/esm/principal/principal.js +144 -0
- package/lib/esm/principal/principal.js.map +1 -0
- package/lib/esm/principal/utils/base32.d.ts +10 -0
- package/lib/esm/principal/utils/base32.d.ts.map +1 -0
- package/lib/esm/principal/utils/base32.js +86 -0
- package/lib/esm/principal/utils/base32.js.map +1 -0
- package/lib/esm/principal/utils/getCrc.d.ts +6 -0
- package/lib/esm/principal/utils/getCrc.d.ts.map +1 -0
- package/lib/esm/principal/utils/getCrc.js +50 -0
- package/lib/esm/principal/utils/getCrc.js.map +1 -0
- package/package.json +17 -11
- package/src/agent/actor.ts +576 -0
- package/src/agent/agent/api.ts +262 -0
- package/src/agent/agent/http/index.ts +1518 -0
- package/src/agent/agent/http/transforms.ts +158 -0
- package/src/agent/agent/http/types.ts +126 -0
- package/src/agent/agent/index.ts +2 -0
- package/src/agent/auth.ts +147 -0
- package/src/agent/canister-env/index.ts +192 -1
- package/src/agent/canisterStatus/index.ts +267 -0
- package/src/agent/cbor.ts +63 -0
- package/src/agent/certificate.ts +1060 -0
- package/src/agent/constants.ts +24 -0
- package/src/agent/der.ts +170 -0
- package/src/agent/errors.ts +881 -0
- package/src/agent/fetch_candid.ts +37 -0
- package/src/agent/index.ts +131 -1
- package/src/agent/observable.ts +49 -0
- package/src/agent/polling/backoff.ts +130 -0
- package/src/agent/polling/index.ts +250 -0
- package/src/agent/polling/strategy.ts +144 -0
- package/src/agent/public_key.ts +65 -0
- package/src/agent/request_id.ts +92 -0
- package/src/agent/subnetStatus/index.ts +270 -0
- package/src/agent/utils/bls.ts +18 -0
- package/src/agent/utils/buffer.ts +60 -0
- package/src/agent/utils/expirableMap.ts +163 -0
- package/src/agent/utils/leb.ts +14 -0
- package/src/agent/utils/random.ts +30 -0
- package/src/agent/utils/readState.ts +180 -0
- package/src/candid/candid-core.ts +276 -0
- package/src/candid/candid-ui.ts +289 -0
- package/src/candid/idl.ts +2556 -0
- package/src/candid/index.ts +35 -1
- package/src/candid/types.ts +7 -0
- package/src/candid/utils/bigint-math.ts +26 -0
- package/src/candid/utils/buffer.ts +221 -0
- package/src/candid/utils/hash.ts +31 -0
- package/src/candid/utils/leb128.ts +234 -0
- package/src/identity/identity/delegation.ts +411 -0
- package/src/identity/identity/ecdsa.ts +158 -0
- package/src/identity/identity/ed25519.ts +239 -0
- package/src/identity/identity/partial.ts +60 -0
- package/src/identity/identity/webauthn.ts +265 -0
- package/src/identity/index.ts +39 -1
- package/src/identity/secp256k1/der.ts +156 -0
- package/src/identity/secp256k1/index.ts +52 -1
- package/src/identity/secp256k1/pem.ts +40 -0
- package/src/identity/secp256k1/secp256k1.ts +270 -0
- package/src/package.json +4 -0
- package/src/principal/index.ts +19 -1
- package/src/principal/principal.ts +171 -0
- package/src/principal/utils/base32.ts +101 -0
- package/src/principal/utils/getCrc.ts +52 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Principal } from '../../principal/index.js';
|
|
2
|
+
import { HttpAgent } from '../agent/http/index.ts';
|
|
3
|
+
import { type BaseSubnetStatus, type BaseStatus, CustomPath } from '../utils/readState.ts';
|
|
4
|
+
export { type DecodeStrategy, CustomPath } from '../utils/readState.ts';
|
|
5
|
+
export type SubnetStatus = BaseSubnetStatus;
|
|
6
|
+
export type Status = BaseStatus | SubnetStatus;
|
|
7
|
+
/**
|
|
8
|
+
* Pre-configured fields for canister status paths
|
|
9
|
+
*/
|
|
10
|
+
export type Path = 'time' | 'controllers' | 'subnet' | 'module_hash' | 'candid' | CustomPath;
|
|
11
|
+
export type StatusMap = Map<Path | string, Status>;
|
|
12
|
+
export type CanisterStatusOptions = {
|
|
13
|
+
/**
|
|
14
|
+
* The effective canister ID to use in the underlying {@link HttpAgent.readState} call.
|
|
15
|
+
*/
|
|
16
|
+
canisterId: Principal;
|
|
17
|
+
/**
|
|
18
|
+
* The agent to use to make the canister request. Must be authenticated.
|
|
19
|
+
*/
|
|
20
|
+
agent: HttpAgent;
|
|
21
|
+
/**
|
|
22
|
+
* The paths to request.
|
|
23
|
+
* @default []
|
|
24
|
+
*/
|
|
25
|
+
paths?: Path[] | Set<Path>;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to disable the certificate freshness checks.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
disableCertificateTimeVerification?: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Requests information from a canister's `read_state` endpoint.
|
|
34
|
+
* Can be used to request information about the canister's controllers, time, module hash, candid interface, and more.
|
|
35
|
+
*
|
|
36
|
+
* > [!WARNING]
|
|
37
|
+
* > Requesting the `subnet` path from the canister status might be deprecated in the future.
|
|
38
|
+
* > Use {@link https://js.icp.build/core/latest/libs/agent/api/namespaces/subnetstatus/functions/request | SubnetStatus.request} to fetch subnet information instead.
|
|
39
|
+
* @param {CanisterStatusOptions} options The configuration for the canister status request.
|
|
40
|
+
* @see {@link CanisterStatusOptions} for detailed options.
|
|
41
|
+
* @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.
|
|
42
|
+
* @example
|
|
43
|
+
* const status = await canisterStatus({
|
|
44
|
+
* paths: ['controllers', 'candid'],
|
|
45
|
+
* ...options
|
|
46
|
+
* });
|
|
47
|
+
*
|
|
48
|
+
* const controllers = status.get('controllers');
|
|
49
|
+
*/
|
|
50
|
+
export declare const request: (options: CanisterStatusOptions) => Promise<StatusMap>;
|
|
51
|
+
/**
|
|
52
|
+
* Lookup node keys from a certificate for a given canister.
|
|
53
|
+
* The certificate is assumed to be already verified, including whether the canister is in range of the subnet.
|
|
54
|
+
* @param certificate the certificate to lookup node keys from
|
|
55
|
+
* @param canisterId the canister ID to lookup node keys for
|
|
56
|
+
* @param root_key the root key to use to lookup node keys
|
|
57
|
+
* @returns a map of node IDs to public keys
|
|
58
|
+
*/
|
|
59
|
+
export declare const fetchNodeKeys: (certificate: Uint8Array, canisterId: Principal, root_key?: Uint8Array) => BaseSubnetStatus;
|
|
60
|
+
export declare const encodePath: (path: Path, canisterId: Principal) => Uint8Array[];
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/agent/canisterStatus/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAWvC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAKnD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,UAAU,EAOX,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,KAAK,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAC5C,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE7F,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3B;;;OAGG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,OAAO,GAAU,SAAS,qBAAqB,KAAG,OAAO,CAAC,SAAS,CA+G/E,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACxB,aAAa,UAAU,EACvB,YAAY,SAAS,EACrB,WAAW,UAAU,KACpB,gBAuBF,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,EAAE,YAAY,SAAS,KAAG,UAAU,EAoCxE,CAAC"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.encodePath = exports.fetchNodeKeys = exports.request = exports.CustomPath = void 0;
|
|
37
|
+
const _principal_1 = require("../../principal/index.js");
|
|
38
|
+
const errors_ts_1 = require("../errors.js");
|
|
39
|
+
const certificate_ts_1 = require("../certificate.js");
|
|
40
|
+
const cbor = __importStar(require("../cbor.js"));
|
|
41
|
+
const leb_ts_1 = require("../utils/leb.js");
|
|
42
|
+
const utils_1 = require("@noble/hashes/utils");
|
|
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; } });
|
|
47
|
+
/**
|
|
48
|
+
* Requests information from a canister's `read_state` endpoint.
|
|
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.
|
|
54
|
+
* @param {CanisterStatusOptions} options The configuration for the canister status request.
|
|
55
|
+
* @see {@link CanisterStatusOptions} for detailed options.
|
|
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.
|
|
57
|
+
* @example
|
|
58
|
+
* const status = await canisterStatus({
|
|
59
|
+
* paths: ['controllers', 'candid'],
|
|
60
|
+
* ...options
|
|
61
|
+
* });
|
|
62
|
+
*
|
|
63
|
+
* const controllers = status.get('controllers');
|
|
64
|
+
*/
|
|
65
|
+
const request = async (options) => {
|
|
66
|
+
const { agent, paths, disableCertificateTimeVerification = false } = options;
|
|
67
|
+
const canisterId = _principal_1.Principal.from(options.canisterId);
|
|
68
|
+
const uniquePaths = [...new Set(paths)];
|
|
69
|
+
const status = new Map();
|
|
70
|
+
const promises = uniquePaths.map((path, index) => {
|
|
71
|
+
const encodedPath = (0, exports.encodePath)(path, canisterId);
|
|
72
|
+
return (async () => {
|
|
73
|
+
try {
|
|
74
|
+
if (agent.rootKey === null) {
|
|
75
|
+
throw errors_ts_1.ExternalError.fromCode(new errors_ts_1.MissingRootKeyErrorCode());
|
|
76
|
+
}
|
|
77
|
+
const rootKey = agent.rootKey;
|
|
78
|
+
const response = await agent.readState(canisterId, {
|
|
79
|
+
paths: [encodedPath],
|
|
80
|
+
});
|
|
81
|
+
const certificate = await certificate_ts_1.Certificate.create({
|
|
82
|
+
certificate: response.certificate,
|
|
83
|
+
rootKey,
|
|
84
|
+
principal: { canisterId },
|
|
85
|
+
disableTimeVerification: disableCertificateTimeVerification,
|
|
86
|
+
agent,
|
|
87
|
+
});
|
|
88
|
+
const lookup = (cert, path) => {
|
|
89
|
+
if (path === 'subnet') {
|
|
90
|
+
const data = (0, exports.fetchNodeKeys)(response.certificate, canisterId, rootKey);
|
|
91
|
+
return {
|
|
92
|
+
path,
|
|
93
|
+
data,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
return {
|
|
98
|
+
path,
|
|
99
|
+
data: (0, certificate_ts_1.lookupResultToBuffer)(cert.lookup_path(encodedPath)),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
// must pass in the rootKey if we have no delegation
|
|
104
|
+
const { path, data } = lookup(certificate, uniquePaths[index]);
|
|
105
|
+
if (!data) {
|
|
106
|
+
// Typically, the cert lookup will throw
|
|
107
|
+
console.warn(`Expected to find result for path ${path}, but instead found nothing.`);
|
|
108
|
+
if (typeof path === 'string') {
|
|
109
|
+
status.set(path, null);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
status.set(path.key, null);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
switch (path) {
|
|
117
|
+
case 'time': {
|
|
118
|
+
status.set(path, (0, leb_ts_1.decodeTime)(data));
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
case 'controllers': {
|
|
122
|
+
status.set(path, (0, readState_ts_1.decodeControllers)(data));
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
case 'module_hash': {
|
|
126
|
+
status.set(path, (0, utils_1.bytesToHex)(data));
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
case 'subnet': {
|
|
130
|
+
status.set(path, data);
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
case 'candid': {
|
|
134
|
+
status.set(path, new TextDecoder().decode(data));
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
default: {
|
|
138
|
+
// Check for CustomPath signature
|
|
139
|
+
if ((0, readState_ts_1.isCustomPath)(path)) {
|
|
140
|
+
status.set(path.key, (0, readState_ts_1.decodeValue)(data, path.decodeStrategy));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
// Throw on certificate errors
|
|
148
|
+
if (error instanceof errors_ts_1.AgentError &&
|
|
149
|
+
(error.hasCode(errors_ts_1.CertificateVerificationErrorCode) ||
|
|
150
|
+
error.hasCode(errors_ts_1.CertificateTimeErrorCode))) {
|
|
151
|
+
throw error;
|
|
152
|
+
}
|
|
153
|
+
if ((0, readState_ts_1.isCustomPath)(path)) {
|
|
154
|
+
status.set(path.key, null);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
status.set(path, null);
|
|
158
|
+
}
|
|
159
|
+
console.group();
|
|
160
|
+
console.warn(`Expected to find result for path ${path}, but instead found nothing.`);
|
|
161
|
+
console.warn(error);
|
|
162
|
+
console.groupEnd();
|
|
163
|
+
}
|
|
164
|
+
})();
|
|
165
|
+
});
|
|
166
|
+
// Fetch all values separately, as each option can fail
|
|
167
|
+
await Promise.all(promises);
|
|
168
|
+
return status;
|
|
169
|
+
};
|
|
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
|
+
*/
|
|
179
|
+
const fetchNodeKeys = (certificate, canisterId, root_key) => {
|
|
180
|
+
if (!canisterId._isPrincipal) {
|
|
181
|
+
throw errors_ts_1.InputError.fromCode(new errors_ts_1.UnexpectedErrorCode('Invalid canisterId'));
|
|
182
|
+
}
|
|
183
|
+
const cert = cbor.decode(certificate);
|
|
184
|
+
const { delegation } = cert;
|
|
185
|
+
let subnetId;
|
|
186
|
+
if (delegation && delegation.subnet_id) {
|
|
187
|
+
subnetId = _principal_1.Principal.fromUint8Array(new Uint8Array(delegation.subnet_id));
|
|
188
|
+
}
|
|
189
|
+
else if (!delegation && typeof root_key !== 'undefined') {
|
|
190
|
+
// On local replica, with System type subnet, there is no delegation
|
|
191
|
+
subnetId = _principal_1.Principal.selfAuthenticating(new Uint8Array(root_key));
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
// otherwise use default NNS subnet id
|
|
195
|
+
subnetId = readState_ts_1.IC_ROOT_SUBNET_ID;
|
|
196
|
+
}
|
|
197
|
+
const nodeKeys = (0, readState_ts_1.lookupNodeKeysFromCertificate)(cert, subnetId);
|
|
198
|
+
return {
|
|
199
|
+
subnetId: subnetId.toText(),
|
|
200
|
+
nodeKeys,
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
exports.fetchNodeKeys = fetchNodeKeys;
|
|
204
|
+
const encodePath = (path, canisterId) => {
|
|
205
|
+
const canisterUint8Array = canisterId.toUint8Array();
|
|
206
|
+
switch (path) {
|
|
207
|
+
case 'time':
|
|
208
|
+
return [(0, utils_1.utf8ToBytes)('time')];
|
|
209
|
+
case 'controllers':
|
|
210
|
+
return [(0, utils_1.utf8ToBytes)('canister'), canisterUint8Array, (0, utils_1.utf8ToBytes)('controllers')];
|
|
211
|
+
case 'module_hash':
|
|
212
|
+
return [(0, utils_1.utf8ToBytes)('canister'), canisterUint8Array, (0, utils_1.utf8ToBytes)('module_hash')];
|
|
213
|
+
case 'subnet':
|
|
214
|
+
return [(0, utils_1.utf8ToBytes)('subnet')];
|
|
215
|
+
case 'candid':
|
|
216
|
+
return [
|
|
217
|
+
(0, utils_1.utf8ToBytes)('canister'),
|
|
218
|
+
canisterUint8Array,
|
|
219
|
+
(0, utils_1.utf8ToBytes)('metadata'),
|
|
220
|
+
(0, utils_1.utf8ToBytes)('candid:service'),
|
|
221
|
+
];
|
|
222
|
+
default: {
|
|
223
|
+
// Check for CustomPath signature
|
|
224
|
+
if ((0, readState_ts_1.isCustomPath)(path)) {
|
|
225
|
+
// For simplified metadata queries
|
|
226
|
+
if (typeof path['path'] === 'string' || path['path'] instanceof Uint8Array) {
|
|
227
|
+
return (0, readState_ts_1.encodeMetadataPath)(path.path, canisterUint8Array);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
// For non-metadata, return the provided custom path
|
|
231
|
+
return path['path'];
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
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.`));
|
|
237
|
+
};
|
|
238
|
+
exports.encodePath = encodePath;
|
|
239
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,wDAU+B;AAE/B,qDAAqD;AACrD,sDAAwE;AAA1C,0GAAA,UAAU,OAAA;AAiCxC;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,OAAO,GAAG,KAAK,EAAE,OAA8B,EAAsB,EAAE;IAClF,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,kCAAkC,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAC7E,MAAM,UAAU,GAAG,sBAAS,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAEtD,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAyB,CAAC;IAEhD,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC/C,MAAM,WAAW,GAAG,IAAA,kBAAU,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAEjD,OAAO,CAAC,KAAK,IAAI,EAAE;YACjB,IAAI,CAAC;gBACH,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;oBAC3B,MAAM,yBAAa,CAAC,QAAQ,CAAC,IAAI,m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gBAClB,IAAA,mBAAW,EAAC,UAAU,CAAC;gBACvB,IAAA,mBAAW,EAAC,gBAAgB,CAAC;aAC9B,CAAC;QACJ,OAAO,CAAC,CAAC,CAAC;YACR,iCAAiC;YACjC,IAAI,IAAA,2BAAY,EAAC,IAAI,CAAC,EAAE,CAAC;gBACvB,kCAAkC;gBAClC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,UAAU,EAAE,CAAC;oBAC3E,OAAO,IAAA,iCAAkB,EAAC,IAAI,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;gBAC3D,CAAC;qBAAM,CAAC;oBACN,oDAAoD;oBACpD,OAAO,IAAI,CAAC,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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as cbor from '@dfinity/cbor';
|
|
2
|
+
/**
|
|
3
|
+
* Used to extend classes that need to provide a custom value for the CBOR encoding process.
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class ToCborValue {
|
|
6
|
+
/**
|
|
7
|
+
* Returns a value that can be encoded with CBOR. Typically called in the replacer function of the {@link encode} function.
|
|
8
|
+
*/
|
|
9
|
+
abstract toCborValue(): cbor.CborValue;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Encode a JavaScript value into CBOR. If the value is an instance of {@link ToCborValue},
|
|
13
|
+
* the {@link ToCborValue.toCborValue} method will be called to get the value to encode.
|
|
14
|
+
* @param value The value to encode
|
|
15
|
+
*/
|
|
16
|
+
export declare function encode(value: unknown): Uint8Array;
|
|
17
|
+
/**
|
|
18
|
+
* Decode a CBOR encoded value into a JavaScript value.
|
|
19
|
+
* @param input The CBOR encoded value
|
|
20
|
+
*/
|
|
21
|
+
export declare function decode<T>(input: Uint8Array): T;
|
|
22
|
+
export declare const Cbor: {
|
|
23
|
+
encode: typeof encode;
|
|
24
|
+
decode: typeof decode;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=cbor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbor.d.ts","sourceRoot":"","sources":["../../../src/agent/cbor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAItC;;GAEG;AACH,8BAAsB,WAAW;IAC/B;;OAEG;aACa,WAAW,IAAI,IAAI,CAAC,SAAS;CAC9C;AAMD;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAoBjD;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,CAM9C;AAGD,eAAO,MAAM,IAAI;;;CAGhB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Cbor = exports.ToCborValue = void 0;
|
|
37
|
+
exports.encode = encode;
|
|
38
|
+
exports.decode = decode;
|
|
39
|
+
const _principal_1 = require("../principal/index.js");
|
|
40
|
+
const cbor = __importStar(require("@dfinity/cbor"));
|
|
41
|
+
const errors_ts_1 = require("./errors.js");
|
|
42
|
+
const index_ts_1 = require("./agent/index.js");
|
|
43
|
+
/**
|
|
44
|
+
* Used to extend classes that need to provide a custom value for the CBOR encoding process.
|
|
45
|
+
*/
|
|
46
|
+
class ToCborValue {
|
|
47
|
+
}
|
|
48
|
+
exports.ToCborValue = ToCborValue;
|
|
49
|
+
function hasCborValueMethod(value) {
|
|
50
|
+
return typeof value === 'object' && value !== null && 'toCborValue' in value;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Encode a JavaScript value into CBOR. If the value is an instance of {@link ToCborValue},
|
|
54
|
+
* the {@link ToCborValue.toCborValue} method will be called to get the value to encode.
|
|
55
|
+
* @param value The value to encode
|
|
56
|
+
*/
|
|
57
|
+
function encode(value) {
|
|
58
|
+
try {
|
|
59
|
+
return cbor.encodeWithSelfDescribedTag(value, value => {
|
|
60
|
+
if (_principal_1.Principal.isPrincipal(value)) {
|
|
61
|
+
return value.toUint8Array();
|
|
62
|
+
}
|
|
63
|
+
if (index_ts_1.Expiry.isExpiry(value)) {
|
|
64
|
+
return value.toBigInt();
|
|
65
|
+
}
|
|
66
|
+
if (hasCborValueMethod(value)) {
|
|
67
|
+
return value.toCborValue();
|
|
68
|
+
}
|
|
69
|
+
return value;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
throw errors_ts_1.InputError.fromCode(new errors_ts_1.CborEncodeErrorCode(error, value));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Decode a CBOR encoded value into a JavaScript value.
|
|
78
|
+
* @param input The CBOR encoded value
|
|
79
|
+
*/
|
|
80
|
+
function decode(input) {
|
|
81
|
+
try {
|
|
82
|
+
return cbor.decode(input);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
throw errors_ts_1.InputError.fromCode(new errors_ts_1.CborDecodeErrorCode(error, input));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// Not strictly necessary, we're just keeping it for backwards compatibility.
|
|
89
|
+
exports.Cbor = {
|
|
90
|
+
encode,
|
|
91
|
+
decode,
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=cbor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cbor.js","sourceRoot":"","sources":["../../../src/agent/cbor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,wBAoBC;AAMD,wBAMC;AAxDD,2CAAuC;AACvC,oDAAsC;AACtC,2CAAmF;AACnF,+CAA0C;AAE1C;;GAEG;AACH,MAAsB,WAAW;CAKhC;AALD,kCAKC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,OAAO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