@icp-sdk/core 4.2.2 → 5.0.0-beta.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/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 +7 -0
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.d.ts.map +1 -0
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.js +19 -0
- package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.js.map +1 -0
- package/lib/cjs/agent/agent/http/index.d.ts +171 -0
- package/lib/cjs/agent/agent/http/index.d.ts.map +1 -0
- package/lib/cjs/agent/agent/http/index.js +1079 -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 +93 -0
- package/lib/cjs/agent/canisterStatus/index.d.ts.map +1 -0
- package/lib/cjs/agent/canisterStatus/index.js +301 -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 +228 -0
- package/lib/cjs/agent/certificate.d.ts.map +1 -0
- package/lib/cjs/agent/certificate.js +591 -0
- package/lib/cjs/agent/certificate.js.map +1 -0
- package/lib/cjs/agent/constants.d.ts +14 -0
- package/lib/cjs/agent/constants.d.ts.map +1 -0
- package/lib/cjs/agent/constants.js +18 -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 +380 -0
- package/lib/cjs/agent/errors.d.ts.map +1 -0
- package/lib/cjs/agent/errors.js +733 -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 +31 -1
- package/lib/cjs/agent/index.d.ts.map +1 -1
- package/lib/cjs/agent/index.js +59 -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/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/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 +11 -1
- package/lib/cjs/candid/index.d.ts.map +1 -1
- package/lib/cjs/candid/index.js +33 -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 +15 -1
- package/lib/cjs/identity/index.d.ts.map +1 -1
- package/lib/cjs/identity/index.js +24 -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 +4 -1
- package/lib/cjs/identity/secp256k1/index.d.ts.map +1 -1
- package/lib/cjs/identity/secp256k1/index.js +4 -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 +3 -1
- package/lib/cjs/principal/index.d.ts.map +1 -1
- package/lib/cjs/principal/index.js +7 -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 +7 -0
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.d.ts.map +1 -0
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.js +16 -0
- package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.js.map +1 -0
- package/lib/esm/agent/agent/http/index.d.ts +171 -0
- package/lib/esm/agent/agent/http/index.d.ts.map +1 -0
- package/lib/esm/agent/agent/http/index.js +1037 -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 +110 -1
- package/lib/esm/agent/canister-env/index.d.ts.map +1 -1
- package/lib/esm/agent/canister-env/index.js +110 -1
- package/lib/esm/agent/canister-env/index.js.map +1 -1
- package/lib/esm/agent/canisterStatus/index.d.ts +93 -0
- package/lib/esm/agent/canisterStatus/index.d.ts.map +1 -0
- package/lib/esm/agent/canisterStatus/index.js +261 -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 +228 -0
- package/lib/esm/agent/certificate.d.ts.map +1 -0
- package/lib/esm/agent/certificate.js +545 -0
- package/lib/esm/agent/certificate.js.map +1 -0
- package/lib/esm/agent/constants.d.ts +14 -0
- package/lib/esm/agent/constants.d.ts.map +1 -0
- package/lib/esm/agent/constants.js +15 -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 +380 -0
- package/lib/esm/agent/errors.d.ts.map +1 -0
- package/lib/esm/agent/errors.js +678 -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 +31 -1
- package/lib/esm/agent/index.d.ts.map +1 -1
- package/lib/esm/agent/index.js +31 -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/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/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 +11 -1
- package/lib/esm/candid/index.d.ts.map +1 -1
- package/lib/esm/candid/index.js +10 -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 +15 -1
- package/lib/esm/identity/index.d.ts.map +1 -1
- package/lib/esm/identity/index.js +17 -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 +4 -1
- package/lib/esm/identity/secp256k1/index.d.ts.map +1 -1
- package/lib/esm/identity/secp256k1/index.js +4 -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 +3 -1
- package/lib/esm/principal/index.d.ts.map +1 -1
- package/lib/esm/principal/index.js +3 -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 +1405 -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 +191 -1
- package/src/agent/canisterStatus/index.ts +412 -0
- package/src/agent/cbor.ts +63 -0
- package/src/agent/certificate.ts +841 -0
- package/src/agent/constants.ts +19 -0
- package/src/agent/der.ts +170 -0
- package/src/agent/errors.ts +868 -0
- package/src/agent/fetch_candid.ts +37 -0
- package/src/agent/index.ts +37 -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/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/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 +16 -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 +19 -1
- package/src/identity/secp256k1/der.ts +156 -0
- package/src/identity/secp256k1/index.ts +5 -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 +3 -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,33 @@
|
|
|
1
|
+
export declare const encodeLenBytes: (len: number) => number;
|
|
2
|
+
export declare const encodeLen: (buf: Uint8Array, offset: number, len: number) => number;
|
|
3
|
+
export declare const decodeLenBytes: (buf: Uint8Array, offset: number) => number;
|
|
4
|
+
export declare const decodeLen: (buf: Uint8Array, offset: number) => number;
|
|
5
|
+
/**
|
|
6
|
+
* A DER encoded `SEQUENCE(OID)` for DER-encoded-COSE
|
|
7
|
+
*/
|
|
8
|
+
export declare const DER_COSE_OID: Uint8Array<ArrayBuffer>;
|
|
9
|
+
/**
|
|
10
|
+
* A DER encoded `SEQUENCE(OID)` for the Ed25519 algorithm
|
|
11
|
+
*/
|
|
12
|
+
export declare const ED25519_OID: Uint8Array<ArrayBuffer>;
|
|
13
|
+
/**
|
|
14
|
+
* A DER encoded `SEQUENCE(OID)` for secp256k1 with the ECDSA algorithm
|
|
15
|
+
*/
|
|
16
|
+
export declare const SECP256K1_OID: Uint8Array<ArrayBuffer>;
|
|
17
|
+
/**
|
|
18
|
+
* Wraps the given `payload` in a DER encoding tagged with the given encoded `oid` like so:
|
|
19
|
+
* `SEQUENCE(oid, BITSTRING(payload))`
|
|
20
|
+
* @param payload The payload to encode as the bit string
|
|
21
|
+
* @param oid The DER encoded (and SEQUENCE wrapped!) OID to tag the payload with
|
|
22
|
+
*/
|
|
23
|
+
export declare function wrapDER(payload: Uint8Array, oid: Uint8Array): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* Extracts a payload from the given `derEncoded` data, and checks that it was tagged with the given `oid`.
|
|
26
|
+
*
|
|
27
|
+
* `derEncoded = SEQUENCE(oid, BITSTRING(payload))`
|
|
28
|
+
* @param derEncoded The DER encoded and tagged data
|
|
29
|
+
* @param oid The DER encoded (and SEQUENCE wrapped!) expected OID
|
|
30
|
+
* @returns The unwrapped payload
|
|
31
|
+
*/
|
|
32
|
+
export declare const unwrapDER: (derEncoded: Uint8Array, oid: Uint8Array) => Uint8Array;
|
|
33
|
+
//# sourceMappingURL=der.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"der.d.ts","sourceRoot":"","sources":["../../../../src/identity/secp256k1/der.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MAY5C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,KAAK,UAAU,EAAE,QAAQ,MAAM,EAAE,KAAK,MAAM,KAAG,MAsBxE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,UAAU,EAAE,QAAQ,MAAM,KAAG,MAOhE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,KAAK,UAAU,EAAE,QAAQ,MAAM,KAAG,MAQ3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,yBAIvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW,yBAItB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,yBAMxB,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,UAAU,CAuBxE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,GAAI,YAAY,UAAU,EAAE,KAAK,UAAU,KAAG,UA4BnE,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unwrapDER = exports.SECP256K1_OID = exports.ED25519_OID = exports.DER_COSE_OID = exports.decodeLen = exports.decodeLenBytes = exports.encodeLen = exports.encodeLenBytes = void 0;
|
|
4
|
+
exports.wrapDER = wrapDER;
|
|
5
|
+
const _candid_1 = require("../../candid/index.js");
|
|
6
|
+
const encodeLenBytes = (len) => {
|
|
7
|
+
if (len <= 0x7f) {
|
|
8
|
+
return 1;
|
|
9
|
+
}
|
|
10
|
+
else if (len <= 0xff) {
|
|
11
|
+
return 2;
|
|
12
|
+
}
|
|
13
|
+
else if (len <= 0xffff) {
|
|
14
|
+
return 3;
|
|
15
|
+
}
|
|
16
|
+
else if (len <= 0xffffff) {
|
|
17
|
+
return 4;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
throw new Error('Length too long (> 4 bytes)');
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.encodeLenBytes = encodeLenBytes;
|
|
24
|
+
const encodeLen = (buf, offset, len) => {
|
|
25
|
+
if (len <= 0x7f) {
|
|
26
|
+
buf[offset] = len;
|
|
27
|
+
return 1;
|
|
28
|
+
}
|
|
29
|
+
else if (len <= 0xff) {
|
|
30
|
+
buf[offset] = 0x81;
|
|
31
|
+
buf[offset + 1] = len;
|
|
32
|
+
return 2;
|
|
33
|
+
}
|
|
34
|
+
else if (len <= 0xffff) {
|
|
35
|
+
buf[offset] = 0x82;
|
|
36
|
+
buf[offset + 1] = len >> 8;
|
|
37
|
+
buf[offset + 2] = len;
|
|
38
|
+
return 3;
|
|
39
|
+
}
|
|
40
|
+
else if (len <= 0xffffff) {
|
|
41
|
+
buf[offset] = 0x83;
|
|
42
|
+
buf[offset + 1] = len >> 16;
|
|
43
|
+
buf[offset + 2] = len >> 8;
|
|
44
|
+
buf[offset + 3] = len;
|
|
45
|
+
return 4;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
throw new Error('Length too long (> 4 bytes)');
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.encodeLen = encodeLen;
|
|
52
|
+
const decodeLenBytes = (buf, offset) => {
|
|
53
|
+
if (buf[offset] < 0x80)
|
|
54
|
+
return 1;
|
|
55
|
+
if (buf[offset] === 0x80)
|
|
56
|
+
throw new Error('Invalid length 0');
|
|
57
|
+
if (buf[offset] === 0x81)
|
|
58
|
+
return 2;
|
|
59
|
+
if (buf[offset] === 0x82)
|
|
60
|
+
return 3;
|
|
61
|
+
if (buf[offset] === 0x83)
|
|
62
|
+
return 4;
|
|
63
|
+
throw new Error('Length too long (> 4 bytes)');
|
|
64
|
+
};
|
|
65
|
+
exports.decodeLenBytes = decodeLenBytes;
|
|
66
|
+
const decodeLen = (buf, offset) => {
|
|
67
|
+
const lenBytes = (0, exports.decodeLenBytes)(buf, offset);
|
|
68
|
+
if (lenBytes === 1)
|
|
69
|
+
return buf[offset];
|
|
70
|
+
else if (lenBytes === 2)
|
|
71
|
+
return buf[offset + 1];
|
|
72
|
+
else if (lenBytes === 3)
|
|
73
|
+
return (buf[offset + 1] << 8) + buf[offset + 2];
|
|
74
|
+
else if (lenBytes === 4)
|
|
75
|
+
return (buf[offset + 1] << 16) + (buf[offset + 2] << 8) + buf[offset + 3];
|
|
76
|
+
throw new Error('Length too long (> 4 bytes)');
|
|
77
|
+
};
|
|
78
|
+
exports.decodeLen = decodeLen;
|
|
79
|
+
/**
|
|
80
|
+
* A DER encoded `SEQUENCE(OID)` for DER-encoded-COSE
|
|
81
|
+
*/
|
|
82
|
+
exports.DER_COSE_OID = Uint8Array.from([
|
|
83
|
+
...[0x30, 0x0c], // SEQUENCE
|
|
84
|
+
...[0x06, 0x0a], // OID with 10 bytes
|
|
85
|
+
...[0x2b, 0x06, 0x01, 0x04, 0x01, 0x83, 0xb8, 0x43, 0x01, 0x01], // DER encoded COSE
|
|
86
|
+
]);
|
|
87
|
+
/**
|
|
88
|
+
* A DER encoded `SEQUENCE(OID)` for the Ed25519 algorithm
|
|
89
|
+
*/
|
|
90
|
+
exports.ED25519_OID = Uint8Array.from([
|
|
91
|
+
...[0x30, 0x05], // SEQUENCE
|
|
92
|
+
...[0x06, 0x03], // OID with 3 bytes
|
|
93
|
+
...[0x2b, 0x65, 0x70], // id-Ed25519 OID
|
|
94
|
+
]);
|
|
95
|
+
/**
|
|
96
|
+
* A DER encoded `SEQUENCE(OID)` for secp256k1 with the ECDSA algorithm
|
|
97
|
+
*/
|
|
98
|
+
exports.SECP256K1_OID = Uint8Array.from([
|
|
99
|
+
...[0x30, 0x10], // SEQUENCE
|
|
100
|
+
...[0x06, 0x07], // OID with 7 bytes
|
|
101
|
+
...[0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01], // OID ECDSA
|
|
102
|
+
...[0x06, 0x05], // OID with 5 bytes
|
|
103
|
+
...[0x2b, 0x81, 0x04, 0x00, 0x0a], // OID secp256k1
|
|
104
|
+
]);
|
|
105
|
+
/**
|
|
106
|
+
* Wraps the given `payload` in a DER encoding tagged with the given encoded `oid` like so:
|
|
107
|
+
* `SEQUENCE(oid, BITSTRING(payload))`
|
|
108
|
+
* @param payload The payload to encode as the bit string
|
|
109
|
+
* @param oid The DER encoded (and SEQUENCE wrapped!) OID to tag the payload with
|
|
110
|
+
*/
|
|
111
|
+
function wrapDER(payload, oid) {
|
|
112
|
+
// The Bit String header needs to include the unused bit count byte in its length
|
|
113
|
+
const bitStringHeaderLength = 2 + (0, exports.encodeLenBytes)(payload.byteLength + 1);
|
|
114
|
+
const len = oid.byteLength + bitStringHeaderLength + payload.byteLength;
|
|
115
|
+
let offset = 0;
|
|
116
|
+
const buf = new Uint8Array(1 + (0, exports.encodeLenBytes)(len) + len);
|
|
117
|
+
// Sequence
|
|
118
|
+
buf[offset++] = 0x30;
|
|
119
|
+
// Sequence Length
|
|
120
|
+
offset += (0, exports.encodeLen)(buf, offset, len);
|
|
121
|
+
// OID
|
|
122
|
+
buf.set(oid, offset);
|
|
123
|
+
offset += oid.byteLength;
|
|
124
|
+
// Bit String Header
|
|
125
|
+
buf[offset++] = 0x03;
|
|
126
|
+
offset += (0, exports.encodeLen)(buf, offset, payload.byteLength + 1);
|
|
127
|
+
// 0 padding
|
|
128
|
+
buf[offset++] = 0x00;
|
|
129
|
+
buf.set(new Uint8Array(payload), offset);
|
|
130
|
+
return buf;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Extracts a payload from the given `derEncoded` data, and checks that it was tagged with the given `oid`.
|
|
134
|
+
*
|
|
135
|
+
* `derEncoded = SEQUENCE(oid, BITSTRING(payload))`
|
|
136
|
+
* @param derEncoded The DER encoded and tagged data
|
|
137
|
+
* @param oid The DER encoded (and SEQUENCE wrapped!) expected OID
|
|
138
|
+
* @returns The unwrapped payload
|
|
139
|
+
*/
|
|
140
|
+
const unwrapDER = (derEncoded, oid) => {
|
|
141
|
+
let offset = 0;
|
|
142
|
+
const expect = (n, msg) => {
|
|
143
|
+
if (buf[offset++] !== n) {
|
|
144
|
+
throw new Error('Expected: ' + msg);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const buf = new Uint8Array(derEncoded);
|
|
148
|
+
expect(0x30, 'sequence');
|
|
149
|
+
offset += (0, exports.decodeLenBytes)(buf, offset);
|
|
150
|
+
if (!(0, _candid_1.uint8Equals)(buf.slice(offset, offset + oid.byteLength), oid)) {
|
|
151
|
+
throw new Error('Not the expected OID.');
|
|
152
|
+
}
|
|
153
|
+
offset += oid.byteLength;
|
|
154
|
+
expect(0x03, 'bit string');
|
|
155
|
+
const payloadLen = (0, exports.decodeLen)(buf, offset) - 1; // Subtracting 1 to account for the 0 padding
|
|
156
|
+
offset += (0, exports.decodeLenBytes)(buf, offset);
|
|
157
|
+
expect(0x00, '0 padding');
|
|
158
|
+
const result = buf.slice(offset);
|
|
159
|
+
if (payloadLen !== result.length) {
|
|
160
|
+
throw new Error(`DER payload mismatch: Expected length ${payloadLen} actual length ${result.length}`);
|
|
161
|
+
}
|
|
162
|
+
return result;
|
|
163
|
+
};
|
|
164
|
+
exports.unwrapDER = unwrapDER;
|
|
165
|
+
//# sourceMappingURL=der.js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AAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,UAAU,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,yCAAyC,UAAU,kBAAkB,MAAM,CAAC,MAAM,EAAE,CACrF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AA5BW,QAAA,SAAS,aA4BpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/identity/secp256k1/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/identity/secp256k1/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module api
|
|
4
|
+
*/
|
|
2
5
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
6
|
if (k2 === undefined) k2 = k;
|
|
4
7
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -14,5 +17,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
17
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
18
|
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("
|
|
20
|
+
__exportStar(require("./secp256k1.js"), exports);
|
|
18
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/identity/secp256k1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/identity/secp256k1/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,iDAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pem.d.ts","sourceRoot":"","sources":["../../../../src/identity/secp256k1/pem.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CA6BtD"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.pemToSecretKey = pemToSecretKey;
|
|
37
|
+
const asn1js = __importStar(require("asn1js"));
|
|
38
|
+
const HEADER = `-----BEGIN EC PRIVATE KEY-----`;
|
|
39
|
+
const FOOTER = `-----END EC PRIVATE KEY-----`;
|
|
40
|
+
/**
|
|
41
|
+
* Parse a PEM-encoded key into a Uint8Array
|
|
42
|
+
* @param pem - the PEM-encoded key
|
|
43
|
+
* @returns secret key as a Uint8Array
|
|
44
|
+
*/
|
|
45
|
+
function pemToSecretKey(pem) {
|
|
46
|
+
const lines = pem.trim().split('\n');
|
|
47
|
+
const header = lines[0].trim();
|
|
48
|
+
const footer = lines[lines.length - 1].trim();
|
|
49
|
+
if (lines.length < 3) {
|
|
50
|
+
throw new Error('Invalid PEM format');
|
|
51
|
+
}
|
|
52
|
+
if (!header.startsWith(HEADER)) {
|
|
53
|
+
throw new Error('Invalid PEM header');
|
|
54
|
+
}
|
|
55
|
+
if (!footer.startsWith(FOOTER)) {
|
|
56
|
+
throw new Error('Invalid PEM footer');
|
|
57
|
+
}
|
|
58
|
+
const base64Data = lines.slice(1, -1).join('').replace(/\r?\n/g, '');
|
|
59
|
+
const rawKey = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
|
60
|
+
// Parse the key as ASN.1 object
|
|
61
|
+
try {
|
|
62
|
+
const asn1 = asn1js.fromBER(rawKey);
|
|
63
|
+
// OID for secp256k1
|
|
64
|
+
if (!asn1.result.toString().includes(`OBJECT IDENTIFIER : 1.3.132.0.10`)) {
|
|
65
|
+
throw new Error('Invalid curve, must be secp256k1');
|
|
66
|
+
}
|
|
67
|
+
// Returns the 32-byte raw private key at the appropriate offset
|
|
68
|
+
return rawKey.slice(7, 39);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
console.error(error);
|
|
72
|
+
throw new Error('Encountered error while parsing PEM key');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=pem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pem.js","sourceRoot":"","sources":["../../../../src/identity/secp256k1/pem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,wCA6BC;AAvCD,+CAAiC;AAEjC,MAAM,MAAM,GAAG,gCAAgC,CAAC;AAChD,MAAM,MAAM,GAAG,8BAA8B,CAAC;AAE9C;;;;GAIG;AACH,SAAgB,cAAc,CAAC,GAAW;IACxC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;IACD,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACrE,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAEvE,gCAAgC;IAChC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACpC,oBAAoB;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC,EAAE,CAAC;YACzE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;QACD,gEAAgE;QAChE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type DerEncodedPublicKey, type KeyPair, type Signature, type PublicKey, SignIdentity } from '../../agent/index.js';
|
|
2
|
+
declare type PublicKeyHex = string;
|
|
3
|
+
declare type SecretKeyHex = string;
|
|
4
|
+
export declare type JsonableSecp256k1Identity = [PublicKeyHex, SecretKeyHex];
|
|
5
|
+
export declare class Secp256k1PublicKey implements PublicKey {
|
|
6
|
+
#private;
|
|
7
|
+
static fromRaw(rawKey: Uint8Array): Secp256k1PublicKey;
|
|
8
|
+
static fromDer(derKey: DerEncodedPublicKey): Secp256k1PublicKey;
|
|
9
|
+
/**
|
|
10
|
+
* Construct Secp256k1PublicKey from an existing PublicKey
|
|
11
|
+
* @param {unknown} maybeKey - existing PublicKey, ArrayBuffer, DerEncodedPublicKey, or hex string
|
|
12
|
+
* @returns {Secp256k1PublicKey} Instance of Secp256k1PublicKey
|
|
13
|
+
*/
|
|
14
|
+
static from(maybeKey: unknown): Secp256k1PublicKey;
|
|
15
|
+
private static derEncode;
|
|
16
|
+
private static derDecode;
|
|
17
|
+
get rawKey(): Uint8Array;
|
|
18
|
+
get derKey(): DerEncodedPublicKey;
|
|
19
|
+
private constructor();
|
|
20
|
+
toDer(): DerEncodedPublicKey;
|
|
21
|
+
toRaw(): Uint8Array;
|
|
22
|
+
}
|
|
23
|
+
export declare class Secp256k1KeyIdentity extends SignIdentity {
|
|
24
|
+
protected _privateKey: Uint8Array;
|
|
25
|
+
/**
|
|
26
|
+
* Generates an identity. If a seed is provided, the keys are generated from the
|
|
27
|
+
* seed according to BIP 0032. Otherwise, the key pair is randomly generated.
|
|
28
|
+
* This method throws an error in case the seed is not 32 bytes long or invalid
|
|
29
|
+
* for use as a private key.
|
|
30
|
+
* @param {Uint8Array} seed the optional seed
|
|
31
|
+
* @returns {Secp256k1KeyIdentity} Secp256k1KeyIdentity
|
|
32
|
+
*/
|
|
33
|
+
static generate(seed?: Uint8Array): Secp256k1KeyIdentity;
|
|
34
|
+
static fromParsedJson(obj: JsonableSecp256k1Identity): Secp256k1KeyIdentity;
|
|
35
|
+
static fromJSON(json: string): Secp256k1KeyIdentity;
|
|
36
|
+
/**
|
|
37
|
+
* generates an identity from a public and private key. Please ensure that you are generating these keys securely and protect the user's private key
|
|
38
|
+
* @param {Uint8Array} publicKey - Uint8Array
|
|
39
|
+
* @param {Uint8Array} privateKey - Uint8Array
|
|
40
|
+
* @returns {Secp256k1KeyIdentity} Secp256k1KeyIdentity
|
|
41
|
+
*/
|
|
42
|
+
static fromKeyPair(publicKey: Uint8Array, privateKey: Uint8Array): Secp256k1KeyIdentity;
|
|
43
|
+
/**
|
|
44
|
+
* generates an identity from an existing secret key, and is the correct method to generate an identity from a seed phrase. Please ensure you protect the user's private key.
|
|
45
|
+
* @param {Uint8Array} secretKey - Uint8Array
|
|
46
|
+
* @returns {Secp256k1KeyIdentity} - Secp256k1KeyIdentity
|
|
47
|
+
*/
|
|
48
|
+
static fromSecretKey(secretKey: Uint8Array): Secp256k1KeyIdentity;
|
|
49
|
+
/**
|
|
50
|
+
* Generates an identity from a seed phrase. Use carefully - seed phrases should only be used in secure contexts, and you should avoid having users copying and pasting seed phrases as much as possible.
|
|
51
|
+
* @param {string | string[]} seedPhrase - either an array of words or a string of words separated by spaces.
|
|
52
|
+
* @param password - optional password to be used by bip39
|
|
53
|
+
* @returns Secp256k1KeyIdentity
|
|
54
|
+
*/
|
|
55
|
+
static fromSeedPhrase(seedPhrase: string | string[], password?: string | undefined): Secp256k1KeyIdentity;
|
|
56
|
+
/**
|
|
57
|
+
* Utility method to create a Secp256k1KeyIdentity from a PEM-encoded key.
|
|
58
|
+
* @param pemKey - PEM-encoded key as a string
|
|
59
|
+
* @returns - Secp256k1KeyIdentity
|
|
60
|
+
*/
|
|
61
|
+
static fromPem(pemKey: string): Secp256k1KeyIdentity;
|
|
62
|
+
_publicKey: Secp256k1PublicKey;
|
|
63
|
+
protected constructor(publicKey: Secp256k1PublicKey, _privateKey: Uint8Array);
|
|
64
|
+
/**
|
|
65
|
+
* Serialize this key to JSON-serializable object.
|
|
66
|
+
* @returns {JsonableSecp256k1Identity} JsonableSecp256k1Identity
|
|
67
|
+
*/
|
|
68
|
+
toJSON(): JsonableSecp256k1Identity;
|
|
69
|
+
/**
|
|
70
|
+
* Return a copy of the key pair.
|
|
71
|
+
* @returns {KeyPair} KeyPair
|
|
72
|
+
*/
|
|
73
|
+
getKeyPair(): KeyPair;
|
|
74
|
+
/**
|
|
75
|
+
* Return the public key.
|
|
76
|
+
* @returns {Required<PublicKey>} Required<PublicKey>
|
|
77
|
+
*/
|
|
78
|
+
getPublicKey(): Required<PublicKey>;
|
|
79
|
+
/**
|
|
80
|
+
* Signs a blob of data, with this identity's private key.
|
|
81
|
+
* @param {Uint8Array} data - bytes to hash and sign with this identity's secretKey, producing a signature
|
|
82
|
+
* @returns {Promise<Signature>} signature
|
|
83
|
+
*/
|
|
84
|
+
sign(data: Uint8Array): Promise<Signature>;
|
|
85
|
+
}
|
|
86
|
+
export default Secp256k1KeyIdentity;
|
|
87
|
+
//# sourceMappingURL=secp256k1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secp256k1.d.ts","sourceRoot":"","sources":["../../../../src/identity/secp256k1/secp256k1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,SAAS,EACd,YAAY,EACb,MAAM,QAAQ,CAAC;AAUhB,OAAO,MAAM,YAAY,GAAG,MAAM,CAAC;AACnC,OAAO,MAAM,YAAY,GAAG,MAAM,CAAC;AACnC,MAAM,CAAC,OAAO,MAAM,yBAAyB,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;AAQ7E,qBAAa,kBAAmB,YAAW,SAAS;;WACpC,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,kBAAkB;WAI/C,OAAO,CAAC,MAAM,EAAE,mBAAmB,GAAG,kBAAkB;IAItE;;;;OAIG;WACW,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,kBAAkB;IAwBzD,OAAO,CAAC,MAAM,CAAC,SAAS;IAMxB,OAAO,CAAC,MAAM,CAAC,SAAS;IAMxB,IAAW,MAAM,IAAI,UAAU,CAE9B;IAID,IAAW,MAAM,IAAI,mBAAmB,CAEvC;IAGD,OAAO;IAKA,KAAK,IAAI,mBAAmB;IAI5B,KAAK,IAAI,UAAU;CAG3B;AAED,qBAAa,oBAAqB,SAAQ,YAAY;IA2HlD,SAAS,CAAC,WAAW,EAAE,UAAU;IA1HnC;;;;;;;OAOG;WACW,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,oBAAoB;WA0BjD,cAAc,CAAC,GAAG,EAAE,yBAAyB,GAAG,oBAAoB;WAQpE,QAAQ,CAAC,IAAI,EAAE,MAAM,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