@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.
Files changed (474) hide show
  1. package/lib/cjs/agent/actor.d.ts +203 -0
  2. package/lib/cjs/agent/actor.d.ts.map +1 -0
  3. package/lib/cjs/agent/actor.js +341 -0
  4. package/lib/cjs/agent/actor.js.map +1 -0
  5. package/lib/cjs/agent/agent/api.d.ts +216 -0
  6. package/lib/cjs/agent/agent/api.d.ts.map +1 -0
  7. package/lib/cjs/agent/agent/api.js +39 -0
  8. package/lib/cjs/agent/agent/api.js.map +1 -0
  9. package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.d.ts +37 -0
  10. package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.d.ts.map +1 -0
  11. package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.js +51 -0
  12. package/lib/cjs/agent/agent/http/__certificates__/goldenCertificates.js.map +1 -0
  13. package/lib/cjs/agent/agent/http/index.d.ts +190 -0
  14. package/lib/cjs/agent/agent/http/index.d.ts.map +1 -0
  15. package/lib/cjs/agent/agent/http/index.js +1159 -0
  16. package/lib/cjs/agent/agent/http/index.js.map +1 -0
  17. package/lib/cjs/agent/agent/http/transforms.d.ts +54 -0
  18. package/lib/cjs/agent/agent/http/transforms.d.ts.map +1 -0
  19. package/lib/cjs/agent/agent/http/transforms.js +135 -0
  20. package/lib/cjs/agent/agent/http/transforms.js.map +1 -0
  21. package/lib/cjs/agent/agent/http/types.d.ts +81 -0
  22. package/lib/cjs/agent/agent/http/types.d.ts.map +1 -0
  23. package/lib/cjs/agent/agent/http/types.js +43 -0
  24. package/lib/cjs/agent/agent/http/types.js.map +1 -0
  25. package/lib/cjs/agent/agent/index.d.ts +3 -0
  26. package/lib/cjs/agent/agent/index.d.ts.map +1 -0
  27. package/lib/cjs/agent/agent/index.js +19 -0
  28. package/lib/cjs/agent/agent/index.js.map +1 -0
  29. package/lib/cjs/agent/auth.d.ts +91 -0
  30. package/lib/cjs/agent/auth.d.ts.map +1 -0
  31. package/lib/cjs/agent/auth.js +65 -0
  32. package/lib/cjs/agent/auth.js.map +1 -0
  33. package/lib/cjs/agent/canisterStatus/index.d.ts +61 -0
  34. package/lib/cjs/agent/canisterStatus/index.d.ts.map +1 -0
  35. package/lib/cjs/agent/canisterStatus/index.js +239 -0
  36. package/lib/cjs/agent/canisterStatus/index.js.map +1 -0
  37. package/lib/cjs/agent/cbor.d.ts +26 -0
  38. package/lib/cjs/agent/cbor.d.ts.map +1 -0
  39. package/lib/cjs/agent/cbor.js +93 -0
  40. package/lib/cjs/agent/cbor.js.map +1 -0
  41. package/lib/cjs/agent/certificate.d.ts +286 -0
  42. package/lib/cjs/agent/certificate.d.ts.map +1 -0
  43. package/lib/cjs/agent/certificate.js +762 -0
  44. package/lib/cjs/agent/certificate.js.map +1 -0
  45. package/lib/cjs/agent/constants.d.ts +18 -0
  46. package/lib/cjs/agent/constants.d.ts.map +1 -0
  47. package/lib/cjs/agent/constants.js +22 -0
  48. package/lib/cjs/agent/constants.js.map +1 -0
  49. package/lib/cjs/agent/der.d.ts +34 -0
  50. package/lib/cjs/agent/der.d.ts.map +1 -0
  51. package/lib/cjs/agent/der.js +175 -0
  52. package/lib/cjs/agent/der.js.map +1 -0
  53. package/lib/cjs/agent/errors.d.ts +386 -0
  54. package/lib/cjs/agent/errors.d.ts.map +1 -0
  55. package/lib/cjs/agent/errors.js +745 -0
  56. package/lib/cjs/agent/errors.js.map +1 -0
  57. package/lib/cjs/agent/fetch_candid.d.ts +9 -0
  58. package/lib/cjs/agent/fetch_candid.d.ts.map +1 -0
  59. package/lib/cjs/agent/fetch_candid.js +69 -0
  60. package/lib/cjs/agent/fetch_candid.js.map +1 -0
  61. package/lib/cjs/agent/index.d.ts +125 -1
  62. package/lib/cjs/agent/index.d.ts.map +1 -1
  63. package/lib/cjs/agent/index.js +142 -1
  64. package/lib/cjs/agent/index.js.map +1 -1
  65. package/lib/cjs/agent/observable.d.ts +24 -0
  66. package/lib/cjs/agent/observable.d.ts.map +1 -0
  67. package/lib/cjs/agent/observable.js +34 -0
  68. package/lib/cjs/agent/observable.js.map +1 -0
  69. package/lib/cjs/agent/polling/backoff.d.ts +50 -0
  70. package/lib/cjs/agent/polling/backoff.d.ts.map +1 -0
  71. package/lib/cjs/agent/polling/backoff.js +90 -0
  72. package/lib/cjs/agent/polling/backoff.js.map +1 -0
  73. package/lib/cjs/agent/polling/index.d.ts +63 -0
  74. package/lib/cjs/agent/polling/index.d.ts.map +1 -0
  75. package/lib/cjs/agent/polling/index.js +183 -0
  76. package/lib/cjs/agent/polling/index.js.map +1 -0
  77. package/lib/cjs/agent/polling/strategy.d.ts +52 -0
  78. package/lib/cjs/agent/polling/strategy.d.ts.map +1 -0
  79. package/lib/cjs/agent/polling/strategy.js +104 -0
  80. package/lib/cjs/agent/polling/strategy.js.map +1 -0
  81. package/lib/cjs/agent/public_key.d.ts +16 -0
  82. package/lib/cjs/agent/public_key.d.ts.map +1 -0
  83. package/lib/cjs/agent/public_key.js +52 -0
  84. package/lib/cjs/agent/public_key.js.map +1 -0
  85. package/lib/cjs/agent/request_id.d.ts +24 -0
  86. package/lib/cjs/agent/request_id.d.ts.map +1 -0
  87. package/lib/cjs/agent/request_id.js +88 -0
  88. package/lib/cjs/agent/request_id.js.map +1 -0
  89. package/lib/cjs/agent/subnetStatus/index.d.ts +70 -0
  90. package/lib/cjs/agent/subnetStatus/index.d.ts.map +1 -0
  91. package/lib/cjs/agent/subnetStatus/index.js +224 -0
  92. package/lib/cjs/agent/subnetStatus/index.js.map +1 -0
  93. package/lib/cjs/agent/utils/bls.d.ts +10 -0
  94. package/lib/cjs/agent/utils/bls.d.ts.map +1 -0
  95. package/lib/cjs/agent/utils/bls.js +20 -0
  96. package/lib/cjs/agent/utils/bls.js.map +1 -0
  97. package/lib/cjs/agent/utils/buffer.d.ts +22 -0
  98. package/lib/cjs/agent/utils/buffer.d.ts.map +1 -0
  99. package/lib/cjs/agent/utils/buffer.js +55 -0
  100. package/lib/cjs/agent/utils/buffer.js.map +1 -0
  101. package/lib/cjs/agent/utils/expirableMap.d.ts +80 -0
  102. package/lib/cjs/agent/utils/expirableMap.d.ts.map +1 -0
  103. package/lib/cjs/agent/utils/expirableMap.js +148 -0
  104. package/lib/cjs/agent/utils/expirableMap.js.map +1 -0
  105. package/lib/cjs/agent/utils/leb.d.ts +3 -0
  106. package/lib/cjs/agent/utils/leb.d.ts.map +1 -0
  107. package/lib/cjs/agent/utils/leb.js +17 -0
  108. package/lib/cjs/agent/utils/leb.js.map +1 -0
  109. package/lib/cjs/agent/utils/random.d.ts +6 -0
  110. package/lib/cjs/agent/utils/random.d.ts.map +1 -0
  111. package/lib/cjs/agent/utils/random.js +29 -0
  112. package/lib/cjs/agent/utils/random.js.map +1 -0
  113. package/lib/cjs/agent/utils/readState.d.ts +84 -0
  114. package/lib/cjs/agent/utils/readState.d.ts.map +1 -0
  115. package/lib/cjs/agent/utils/readState.js +149 -0
  116. package/lib/cjs/agent/utils/readState.js.map +1 -0
  117. package/lib/cjs/candid/candid-core.d.ts +72 -0
  118. package/lib/cjs/candid/candid-core.d.ts.map +1 -0
  119. package/lib/cjs/candid/candid-core.js +251 -0
  120. package/lib/cjs/candid/candid-core.js.map +1 -0
  121. package/lib/cjs/candid/candid-ui.d.ts +35 -0
  122. package/lib/cjs/candid/candid-ui.d.ts.map +1 -0
  123. package/lib/cjs/candid/candid-ui.js +317 -0
  124. package/lib/cjs/candid/candid-ui.js.map +1 -0
  125. package/lib/cjs/candid/idl.d.ts +579 -0
  126. package/lib/cjs/candid/idl.d.ts.map +1 -0
  127. package/lib/cjs/candid/idl.js +2228 -0
  128. package/lib/cjs/candid/idl.js.map +1 -0
  129. package/lib/cjs/candid/index.d.ts +30 -1
  130. package/lib/cjs/candid/index.d.ts.map +1 -1
  131. package/lib/cjs/candid/index.js +52 -1
  132. package/lib/cjs/candid/index.js.map +1 -1
  133. package/lib/cjs/candid/types.d.ts +6 -0
  134. package/lib/cjs/candid/types.d.ts.map +1 -0
  135. package/lib/cjs/candid/types.js +4 -0
  136. package/lib/cjs/candid/types.js.map +1 -0
  137. package/lib/cjs/candid/utils/bigint-math.d.ts +14 -0
  138. package/lib/cjs/candid/utils/bigint-math.d.ts.map +1 -0
  139. package/lib/cjs/candid/utils/bigint-math.js +30 -0
  140. package/lib/cjs/candid/utils/bigint-math.js.map +1 -0
  141. package/lib/cjs/candid/utils/buffer.d.ts +86 -0
  142. package/lib/cjs/candid/utils/buffer.d.ts.map +1 -0
  143. package/lib/cjs/candid/utils/buffer.js +191 -0
  144. package/lib/cjs/candid/utils/buffer.js.map +1 -0
  145. package/lib/cjs/candid/utils/hash.d.ts +7 -0
  146. package/lib/cjs/candid/utils/hash.d.ts.map +1 -0
  147. package/lib/cjs/candid/utils/hash.js +33 -0
  148. package/lib/cjs/candid/utils/hash.js.map +1 -0
  149. package/lib/cjs/candid/utils/leb128.d.ts +65 -0
  150. package/lib/cjs/candid/utils/leb128.d.ts.map +1 -0
  151. package/lib/cjs/candid/utils/leb128.js +228 -0
  152. package/lib/cjs/candid/utils/leb128.js.map +1 -0
  153. package/lib/cjs/identity/identity/delegation.d.ts +164 -0
  154. package/lib/cjs/identity/identity/delegation.d.ts.map +1 -0
  155. package/lib/cjs/identity/identity/delegation.js +302 -0
  156. package/lib/cjs/identity/identity/delegation.js.map +1 -0
  157. package/lib/cjs/identity/identity/ecdsa.d.ts +62 -0
  158. package/lib/cjs/identity/identity/ecdsa.d.ts.map +1 -0
  159. package/lib/cjs/identity/identity/ecdsa.js +117 -0
  160. package/lib/cjs/identity/identity/ecdsa.js.map +1 -0
  161. package/lib/cjs/identity/identity/ed25519.d.ts +67 -0
  162. package/lib/cjs/identity/identity/ed25519.d.ts.map +1 -0
  163. package/lib/cjs/identity/identity/ed25519.js +200 -0
  164. package/lib/cjs/identity/identity/ed25519.js.map +1 -0
  165. package/lib/cjs/identity/identity/partial.d.ts +34 -0
  166. package/lib/cjs/identity/identity/partial.d.ts.map +1 -0
  167. package/lib/cjs/identity/identity/partial.js +54 -0
  168. package/lib/cjs/identity/identity/partial.js.map +1 -0
  169. package/lib/cjs/identity/identity/webauthn.d.ts +51 -0
  170. package/lib/cjs/identity/identity/webauthn.d.ts.map +1 -0
  171. package/lib/cjs/identity/identity/webauthn.js +197 -0
  172. package/lib/cjs/identity/identity/webauthn.js.map +1 -0
  173. package/lib/cjs/identity/index.d.ts +38 -1
  174. package/lib/cjs/identity/index.d.ts.map +1 -1
  175. package/lib/cjs/identity/index.js +44 -1
  176. package/lib/cjs/identity/index.js.map +1 -1
  177. package/lib/cjs/identity/secp256k1/der.d.ts +33 -0
  178. package/lib/cjs/identity/secp256k1/der.d.ts.map +1 -0
  179. package/lib/cjs/identity/secp256k1/der.js +165 -0
  180. package/lib/cjs/identity/secp256k1/der.js.map +1 -0
  181. package/lib/cjs/identity/secp256k1/index.d.ts +51 -1
  182. package/lib/cjs/identity/secp256k1/index.d.ts.map +1 -1
  183. package/lib/cjs/identity/secp256k1/index.js +51 -1
  184. package/lib/cjs/identity/secp256k1/index.js.map +1 -1
  185. package/lib/cjs/identity/secp256k1/pem.d.ts +7 -0
  186. package/lib/cjs/identity/secp256k1/pem.d.ts.map +1 -0
  187. package/lib/cjs/identity/secp256k1/pem.js +75 -0
  188. package/lib/cjs/identity/secp256k1/pem.js.map +1 -0
  189. package/lib/cjs/identity/secp256k1/secp256k1.d.ts +87 -0
  190. package/lib/cjs/identity/secp256k1/secp256k1.d.ts.map +1 -0
  191. package/lib/cjs/identity/secp256k1/secp256k1.js +260 -0
  192. package/lib/cjs/identity/secp256k1/secp256k1.js.map +1 -0
  193. package/lib/cjs/principal/index.d.ts +18 -1
  194. package/lib/cjs/principal/index.d.ts.map +1 -1
  195. package/lib/cjs/principal/index.js +22 -1
  196. package/lib/cjs/principal/index.js.map +1 -1
  197. package/lib/cjs/principal/principal.d.ts +50 -0
  198. package/lib/cjs/principal/principal.d.ts.map +1 -0
  199. package/lib/cjs/principal/principal.js +148 -0
  200. package/lib/cjs/principal/principal.js.map +1 -0
  201. package/lib/cjs/principal/utils/base32.d.ts +10 -0
  202. package/lib/cjs/principal/utils/base32.d.ts.map +1 -0
  203. package/lib/cjs/principal/utils/base32.js +90 -0
  204. package/lib/cjs/principal/utils/base32.js.map +1 -0
  205. package/lib/cjs/principal/utils/getCrc.d.ts +6 -0
  206. package/lib/cjs/principal/utils/getCrc.d.ts.map +1 -0
  207. package/lib/cjs/principal/utils/getCrc.js +53 -0
  208. package/lib/cjs/principal/utils/getCrc.js.map +1 -0
  209. package/lib/esm/agent/actor.d.ts +203 -0
  210. package/lib/esm/agent/actor.d.ts.map +1 -0
  211. package/lib/esm/agent/actor.js +337 -0
  212. package/lib/esm/agent/actor.js.map +1 -0
  213. package/lib/esm/agent/agent/api.d.ts +216 -0
  214. package/lib/esm/agent/agent/api.d.ts.map +1 -0
  215. package/lib/esm/agent/agent/api.js +34 -0
  216. package/lib/esm/agent/agent/api.js.map +1 -0
  217. package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.d.ts +37 -0
  218. package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.d.ts.map +1 -0
  219. package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.js +48 -0
  220. package/lib/esm/agent/agent/http/__certificates__/goldenCertificates.js.map +1 -0
  221. package/lib/esm/agent/agent/http/index.d.ts +190 -0
  222. package/lib/esm/agent/agent/http/index.d.ts.map +1 -0
  223. package/lib/esm/agent/agent/http/index.js +1117 -0
  224. package/lib/esm/agent/agent/http/index.js.map +1 -0
  225. package/lib/esm/agent/agent/http/transforms.d.ts +54 -0
  226. package/lib/esm/agent/agent/http/transforms.d.ts.map +1 -0
  227. package/lib/esm/agent/agent/http/transforms.js +128 -0
  228. package/lib/esm/agent/agent/http/transforms.js.map +1 -0
  229. package/lib/esm/agent/agent/http/types.d.ts +81 -0
  230. package/lib/esm/agent/agent/http/types.d.ts.map +1 -0
  231. package/lib/esm/agent/agent/http/types.js +39 -0
  232. package/lib/esm/agent/agent/http/types.js.map +1 -0
  233. package/lib/esm/agent/agent/index.d.ts +3 -0
  234. package/lib/esm/agent/agent/index.d.ts.map +1 -0
  235. package/lib/esm/agent/agent/index.js +3 -0
  236. package/lib/esm/agent/agent/index.js.map +1 -0
  237. package/lib/esm/agent/auth.d.ts +91 -0
  238. package/lib/esm/agent/auth.d.ts.map +1 -0
  239. package/lib/esm/agent/auth.js +59 -0
  240. package/lib/esm/agent/auth.js.map +1 -0
  241. package/lib/esm/agent/canister-env/index.d.ts +111 -1
  242. package/lib/esm/agent/canister-env/index.d.ts.map +1 -1
  243. package/lib/esm/agent/canister-env/index.js +111 -1
  244. package/lib/esm/agent/canister-env/index.js.map +1 -1
  245. package/lib/esm/agent/canisterStatus/index.d.ts +61 -0
  246. package/lib/esm/agent/canisterStatus/index.d.ts.map +1 -0
  247. package/lib/esm/agent/canisterStatus/index.js +199 -0
  248. package/lib/esm/agent/canisterStatus/index.js.map +1 -0
  249. package/lib/esm/agent/cbor.d.ts +26 -0
  250. package/lib/esm/agent/cbor.d.ts.map +1 -0
  251. package/lib/esm/agent/cbor.js +54 -0
  252. package/lib/esm/agent/cbor.js.map +1 -0
  253. package/lib/esm/agent/certificate.d.ts +286 -0
  254. package/lib/esm/agent/certificate.d.ts.map +1 -0
  255. package/lib/esm/agent/certificate.js +712 -0
  256. package/lib/esm/agent/certificate.js.map +1 -0
  257. package/lib/esm/agent/constants.d.ts +18 -0
  258. package/lib/esm/agent/constants.d.ts.map +1 -0
  259. package/lib/esm/agent/constants.js +19 -0
  260. package/lib/esm/agent/constants.js.map +1 -0
  261. package/lib/esm/agent/der.d.ts +34 -0
  262. package/lib/esm/agent/der.d.ts.map +1 -0
  263. package/lib/esm/agent/der.js +166 -0
  264. package/lib/esm/agent/der.js.map +1 -0
  265. package/lib/esm/agent/errors.d.ts +386 -0
  266. package/lib/esm/agent/errors.d.ts.map +1 -0
  267. package/lib/esm/agent/errors.js +689 -0
  268. package/lib/esm/agent/errors.js.map +1 -0
  269. package/lib/esm/agent/fetch_candid.d.ts +9 -0
  270. package/lib/esm/agent/fetch_candid.d.ts.map +1 -0
  271. package/lib/esm/agent/fetch_candid.js +33 -0
  272. package/lib/esm/agent/fetch_candid.js.map +1 -0
  273. package/lib/esm/agent/index.d.ts +125 -1
  274. package/lib/esm/agent/index.d.ts.map +1 -1
  275. package/lib/esm/agent/index.js +125 -1
  276. package/lib/esm/agent/index.js.map +1 -1
  277. package/lib/esm/agent/observable.d.ts +24 -0
  278. package/lib/esm/agent/observable.d.ts.map +1 -0
  279. package/lib/esm/agent/observable.js +29 -0
  280. package/lib/esm/agent/observable.js.map +1 -0
  281. package/lib/esm/agent/polling/backoff.d.ts +50 -0
  282. package/lib/esm/agent/polling/backoff.d.ts.map +1 -0
  283. package/lib/esm/agent/polling/backoff.js +85 -0
  284. package/lib/esm/agent/polling/backoff.js.map +1 -0
  285. package/lib/esm/agent/polling/index.d.ts +63 -0
  286. package/lib/esm/agent/polling/index.d.ts.map +1 -0
  287. package/lib/esm/agent/polling/index.js +144 -0
  288. package/lib/esm/agent/polling/index.js.map +1 -0
  289. package/lib/esm/agent/polling/strategy.d.ts +52 -0
  290. package/lib/esm/agent/polling/strategy.d.ts.map +1 -0
  291. package/lib/esm/agent/polling/strategy.js +94 -0
  292. package/lib/esm/agent/polling/strategy.js.map +1 -0
  293. package/lib/esm/agent/public_key.d.ts +16 -0
  294. package/lib/esm/agent/public_key.d.ts.map +1 -0
  295. package/lib/esm/agent/public_key.js +48 -0
  296. package/lib/esm/agent/public_key.js.map +1 -0
  297. package/lib/esm/agent/request_id.d.ts +24 -0
  298. package/lib/esm/agent/request_id.d.ts.map +1 -0
  299. package/lib/esm/agent/request_id.js +83 -0
  300. package/lib/esm/agent/request_id.js.map +1 -0
  301. package/lib/esm/agent/subnetStatus/index.d.ts +70 -0
  302. package/lib/esm/agent/subnetStatus/index.d.ts.map +1 -0
  303. package/lib/esm/agent/subnetStatus/index.js +183 -0
  304. package/lib/esm/agent/subnetStatus/index.js.map +1 -0
  305. package/lib/esm/agent/utils/bls.d.ts +10 -0
  306. package/lib/esm/agent/utils/bls.d.ts.map +1 -0
  307. package/lib/esm/agent/utils/bls.js +17 -0
  308. package/lib/esm/agent/utils/bls.js.map +1 -0
  309. package/lib/esm/agent/utils/buffer.d.ts +22 -0
  310. package/lib/esm/agent/utils/buffer.d.ts.map +1 -0
  311. package/lib/esm/agent/utils/buffer.js +50 -0
  312. package/lib/esm/agent/utils/buffer.js.map +1 -0
  313. package/lib/esm/agent/utils/expirableMap.d.ts +80 -0
  314. package/lib/esm/agent/utils/expirableMap.d.ts.map +1 -0
  315. package/lib/esm/agent/utils/expirableMap.js +144 -0
  316. package/lib/esm/agent/utils/expirableMap.js.map +1 -0
  317. package/lib/esm/agent/utils/leb.d.ts +3 -0
  318. package/lib/esm/agent/utils/leb.d.ts.map +1 -0
  319. package/lib/esm/agent/utils/leb.js +12 -0
  320. package/lib/esm/agent/utils/leb.js.map +1 -0
  321. package/lib/esm/agent/utils/random.d.ts +6 -0
  322. package/lib/esm/agent/utils/random.d.ts.map +1 -0
  323. package/lib/esm/agent/utils/random.js +25 -0
  324. package/lib/esm/agent/utils/random.js.map +1 -0
  325. package/lib/esm/agent/utils/readState.d.ts +84 -0
  326. package/lib/esm/agent/utils/readState.d.ts.map +1 -0
  327. package/lib/esm/agent/utils/readState.js +107 -0
  328. package/lib/esm/agent/utils/readState.js.map +1 -0
  329. package/lib/esm/candid/candid-core.d.ts +72 -0
  330. package/lib/esm/candid/candid-core.d.ts.map +1 -0
  331. package/lib/esm/candid/candid-core.js +241 -0
  332. package/lib/esm/candid/candid-core.js.map +1 -0
  333. package/lib/esm/candid/candid-ui.d.ts +35 -0
  334. package/lib/esm/candid/candid-ui.d.ts.map +1 -0
  335. package/lib/esm/candid/candid-ui.js +272 -0
  336. package/lib/esm/candid/candid-ui.js.map +1 -0
  337. package/lib/esm/candid/idl.d.ts +579 -0
  338. package/lib/esm/candid/idl.d.ts.map +1 -0
  339. package/lib/esm/candid/idl.js +2189 -0
  340. package/lib/esm/candid/idl.js.map +1 -0
  341. package/lib/esm/candid/index.d.ts +30 -1
  342. package/lib/esm/candid/index.d.ts.map +1 -1
  343. package/lib/esm/candid/index.js +29 -1
  344. package/lib/esm/candid/index.js.map +1 -1
  345. package/lib/esm/candid/types.d.ts +6 -0
  346. package/lib/esm/candid/types.d.ts.map +1 -0
  347. package/lib/esm/candid/types.js +3 -0
  348. package/lib/esm/candid/types.js.map +1 -0
  349. package/lib/esm/candid/utils/bigint-math.d.ts +14 -0
  350. package/lib/esm/candid/utils/bigint-math.d.ts.map +1 -0
  351. package/lib/esm/candid/utils/bigint-math.js +26 -0
  352. package/lib/esm/candid/utils/bigint-math.js.map +1 -0
  353. package/lib/esm/candid/utils/buffer.d.ts +86 -0
  354. package/lib/esm/candid/utils/buffer.d.ts.map +1 -0
  355. package/lib/esm/candid/utils/buffer.js +182 -0
  356. package/lib/esm/candid/utils/buffer.js.map +1 -0
  357. package/lib/esm/candid/utils/hash.d.ts +7 -0
  358. package/lib/esm/candid/utils/hash.d.ts.map +1 -0
  359. package/lib/esm/candid/utils/hash.js +30 -0
  360. package/lib/esm/candid/utils/hash.js.map +1 -0
  361. package/lib/esm/candid/utils/leb128.d.ts +65 -0
  362. package/lib/esm/candid/utils/leb128.d.ts.map +1 -0
  363. package/lib/esm/candid/utils/leb128.js +216 -0
  364. package/lib/esm/candid/utils/leb128.js.map +1 -0
  365. package/lib/esm/identity/identity/delegation.d.ts +164 -0
  366. package/lib/esm/identity/identity/delegation.d.ts.map +1 -0
  367. package/lib/esm/identity/identity/delegation.js +294 -0
  368. package/lib/esm/identity/identity/delegation.js.map +1 -0
  369. package/lib/esm/identity/identity/ecdsa.d.ts +62 -0
  370. package/lib/esm/identity/identity/ecdsa.d.ts.map +1 -0
  371. package/lib/esm/identity/identity/ecdsa.js +112 -0
  372. package/lib/esm/identity/identity/ecdsa.js.map +1 -0
  373. package/lib/esm/identity/identity/ed25519.d.ts +67 -0
  374. package/lib/esm/identity/identity/ed25519.d.ts.map +1 -0
  375. package/lib/esm/identity/identity/ed25519.js +195 -0
  376. package/lib/esm/identity/identity/ed25519.js.map +1 -0
  377. package/lib/esm/identity/identity/partial.d.ts +34 -0
  378. package/lib/esm/identity/identity/partial.d.ts.map +1 -0
  379. package/lib/esm/identity/identity/partial.js +50 -0
  380. package/lib/esm/identity/identity/partial.js.map +1 -0
  381. package/lib/esm/identity/identity/webauthn.d.ts +51 -0
  382. package/lib/esm/identity/identity/webauthn.d.ts.map +1 -0
  383. package/lib/esm/identity/identity/webauthn.js +192 -0
  384. package/lib/esm/identity/identity/webauthn.js.map +1 -0
  385. package/lib/esm/identity/index.d.ts +38 -1
  386. package/lib/esm/identity/index.d.ts.map +1 -1
  387. package/lib/esm/identity/index.js +38 -1
  388. package/lib/esm/identity/index.js.map +1 -1
  389. package/lib/esm/identity/secp256k1/der.d.ts +33 -0
  390. package/lib/esm/identity/secp256k1/der.d.ts.map +1 -0
  391. package/lib/esm/identity/secp256k1/der.js +156 -0
  392. package/lib/esm/identity/secp256k1/der.js.map +1 -0
  393. package/lib/esm/identity/secp256k1/index.d.ts +51 -1
  394. package/lib/esm/identity/secp256k1/index.d.ts.map +1 -1
  395. package/lib/esm/identity/secp256k1/index.js +51 -1
  396. package/lib/esm/identity/secp256k1/index.js.map +1 -1
  397. package/lib/esm/identity/secp256k1/pem.d.ts +7 -0
  398. package/lib/esm/identity/secp256k1/pem.d.ts.map +1 -0
  399. package/lib/esm/identity/secp256k1/pem.js +39 -0
  400. package/lib/esm/identity/secp256k1/pem.js.map +1 -0
  401. package/lib/esm/identity/secp256k1/secp256k1.d.ts +87 -0
  402. package/lib/esm/identity/secp256k1/secp256k1.d.ts.map +1 -0
  403. package/lib/esm/identity/secp256k1/secp256k1.js +222 -0
  404. package/lib/esm/identity/secp256k1/secp256k1.js.map +1 -0
  405. package/lib/esm/principal/index.d.ts +18 -1
  406. package/lib/esm/principal/index.d.ts.map +1 -1
  407. package/lib/esm/principal/index.js +18 -1
  408. package/lib/esm/principal/index.js.map +1 -1
  409. package/lib/esm/principal/principal.d.ts +50 -0
  410. package/lib/esm/principal/principal.d.ts.map +1 -0
  411. package/lib/esm/principal/principal.js +144 -0
  412. package/lib/esm/principal/principal.js.map +1 -0
  413. package/lib/esm/principal/utils/base32.d.ts +10 -0
  414. package/lib/esm/principal/utils/base32.d.ts.map +1 -0
  415. package/lib/esm/principal/utils/base32.js +86 -0
  416. package/lib/esm/principal/utils/base32.js.map +1 -0
  417. package/lib/esm/principal/utils/getCrc.d.ts +6 -0
  418. package/lib/esm/principal/utils/getCrc.d.ts.map +1 -0
  419. package/lib/esm/principal/utils/getCrc.js +50 -0
  420. package/lib/esm/principal/utils/getCrc.js.map +1 -0
  421. package/package.json +17 -11
  422. package/src/agent/actor.ts +576 -0
  423. package/src/agent/agent/api.ts +262 -0
  424. package/src/agent/agent/http/index.ts +1518 -0
  425. package/src/agent/agent/http/transforms.ts +158 -0
  426. package/src/agent/agent/http/types.ts +126 -0
  427. package/src/agent/agent/index.ts +2 -0
  428. package/src/agent/auth.ts +147 -0
  429. package/src/agent/canister-env/index.ts +192 -1
  430. package/src/agent/canisterStatus/index.ts +267 -0
  431. package/src/agent/cbor.ts +63 -0
  432. package/src/agent/certificate.ts +1060 -0
  433. package/src/agent/constants.ts +24 -0
  434. package/src/agent/der.ts +170 -0
  435. package/src/agent/errors.ts +881 -0
  436. package/src/agent/fetch_candid.ts +37 -0
  437. package/src/agent/index.ts +131 -1
  438. package/src/agent/observable.ts +49 -0
  439. package/src/agent/polling/backoff.ts +130 -0
  440. package/src/agent/polling/index.ts +250 -0
  441. package/src/agent/polling/strategy.ts +144 -0
  442. package/src/agent/public_key.ts +65 -0
  443. package/src/agent/request_id.ts +92 -0
  444. package/src/agent/subnetStatus/index.ts +270 -0
  445. package/src/agent/utils/bls.ts +18 -0
  446. package/src/agent/utils/buffer.ts +60 -0
  447. package/src/agent/utils/expirableMap.ts +163 -0
  448. package/src/agent/utils/leb.ts +14 -0
  449. package/src/agent/utils/random.ts +30 -0
  450. package/src/agent/utils/readState.ts +180 -0
  451. package/src/candid/candid-core.ts +276 -0
  452. package/src/candid/candid-ui.ts +289 -0
  453. package/src/candid/idl.ts +2556 -0
  454. package/src/candid/index.ts +35 -1
  455. package/src/candid/types.ts +7 -0
  456. package/src/candid/utils/bigint-math.ts +26 -0
  457. package/src/candid/utils/buffer.ts +221 -0
  458. package/src/candid/utils/hash.ts +31 -0
  459. package/src/candid/utils/leb128.ts +234 -0
  460. package/src/identity/identity/delegation.ts +411 -0
  461. package/src/identity/identity/ecdsa.ts +158 -0
  462. package/src/identity/identity/ed25519.ts +239 -0
  463. package/src/identity/identity/partial.ts +60 -0
  464. package/src/identity/identity/webauthn.ts +265 -0
  465. package/src/identity/index.ts +39 -1
  466. package/src/identity/secp256k1/der.ts +156 -0
  467. package/src/identity/secp256k1/index.ts +52 -1
  468. package/src/identity/secp256k1/pem.ts +40 -0
  469. package/src/identity/secp256k1/secp256k1.ts +270 -0
  470. package/src/package.json +4 -0
  471. package/src/principal/index.ts +19 -1
  472. package/src/principal/principal.ts +171 -0
  473. package/src/principal/utils/base32.ts +101 -0
  474. package/src/principal/utils/getCrc.ts +52 -0
@@ -0,0 +1,65 @@
1
+ import { PipeArrayBuffer as Pipe } from './buffer.ts';
2
+ /**
3
+ *
4
+ * @param pipe Pipe from buffer-pipe
5
+ * @param num number
6
+ * @returns Uint8Array
7
+ */
8
+ export declare function safeRead(pipe: Pipe, num: number): Uint8Array;
9
+ /**
10
+ * @param pipe - PipeArrayBuffer simulating buffer-pipe api
11
+ */
12
+ export declare function safeReadUint8(pipe: Pipe): number;
13
+ /**
14
+ * Encode a positive number (or bigint) into a Buffer. The number will be floored to the
15
+ * nearest integer.
16
+ * @param value The number to encode.
17
+ */
18
+ export declare function lebEncode(value: bigint | number): Uint8Array;
19
+ /**
20
+ * Decode a leb encoded buffer into a bigint. The number will always be positive (does not
21
+ * support signed leb encoding).
22
+ * @param pipe A Buffer containing the leb encoded bits.
23
+ */
24
+ export declare function lebDecode(pipe: Pipe): bigint;
25
+ /**
26
+ * Encode a number (or bigint) into a Buffer, with support for negative numbers. The number
27
+ * will be floored to the nearest integer.
28
+ * @param value The number to encode.
29
+ */
30
+ export declare function slebEncode(value: bigint | number): Uint8Array;
31
+ /**
32
+ * Decode a leb encoded buffer into a bigint. The number is decoded with support for negative
33
+ * signed-leb encoding.
34
+ * @param pipe A Buffer containing the signed leb encoded bits.
35
+ */
36
+ export declare function slebDecode(pipe: Pipe): bigint;
37
+ /**
38
+ *
39
+ * @param value bigint or number
40
+ * @param byteLength number
41
+ * @returns Uint8Array
42
+ */
43
+ export declare function writeUIntLE(value: bigint | number, byteLength: number): Uint8Array;
44
+ /**
45
+ *
46
+ * @param value - bigint or number
47
+ * @param byteLength - number
48
+ * @returns Uint8Array
49
+ */
50
+ export declare function writeIntLE(value: bigint | number, byteLength: number): Uint8Array;
51
+ /**
52
+ *
53
+ * @param pipe Pipe from buffer-pipe
54
+ * @param byteLength number
55
+ * @returns bigint
56
+ */
57
+ export declare function readUIntLE(pipe: Pipe, byteLength: number): bigint;
58
+ /**
59
+ *
60
+ * @param pipe Pipe from buffer-pipe
61
+ * @param byteLength number
62
+ * @returns bigint
63
+ */
64
+ export declare function readIntLE(pipe: Pipe, byteLength: number): bigint;
65
+ //# sourceMappingURL=leb128.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leb128.d.ts","sourceRoot":"","sources":["../../../../src/candid/utils/leb128.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAOtD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAK5D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAMhD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAuB5D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAY5C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAmC7D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAoB7C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,UAAU,CAKlF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,UAAU,CAmBjF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAajE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAUhE"}
@@ -0,0 +1,216 @@
1
+ // Note: this file uses buffer-pipe, which on Node only, uses the Node Buffer
2
+ // implementation, which isn't compatible with the NPM buffer package
3
+ // which we use everywhere else. This means that we have to transform
4
+ // one into the other, hence why every function that returns a Buffer
5
+ // actually return `new Buffer(pipe.buffer)`.
6
+ // TODO: The best solution would be to have our own buffer type around
7
+ // Uint8Array which is standard.
8
+ import { PipeArrayBuffer as Pipe } from "./buffer.js";
9
+ import { ilog2 } from "./bigint-math.js";
10
+ function eob() {
11
+ throw new Error('unexpected end of buffer');
12
+ }
13
+ /**
14
+ *
15
+ * @param pipe Pipe from buffer-pipe
16
+ * @param num number
17
+ * @returns Uint8Array
18
+ */
19
+ export function safeRead(pipe, num) {
20
+ if (pipe.byteLength < num) {
21
+ eob();
22
+ }
23
+ return pipe.read(num);
24
+ }
25
+ /**
26
+ * @param pipe - PipeArrayBuffer simulating buffer-pipe api
27
+ */
28
+ export function safeReadUint8(pipe) {
29
+ const byte = pipe.readUint8();
30
+ if (byte === undefined) {
31
+ eob();
32
+ }
33
+ return byte;
34
+ }
35
+ /**
36
+ * Encode a positive number (or bigint) into a Buffer. The number will be floored to the
37
+ * nearest integer.
38
+ * @param value The number to encode.
39
+ */
40
+ export function lebEncode(value) {
41
+ if (typeof value === 'number') {
42
+ value = BigInt(value);
43
+ }
44
+ if (value < BigInt(0)) {
45
+ throw new Error('Cannot leb encode negative values.');
46
+ }
47
+ const byteLength = (value === BigInt(0) ? 0 : ilog2(value)) + 1;
48
+ const pipe = new Pipe(new Uint8Array(byteLength), 0);
49
+ while (true) {
50
+ const i = Number(value & BigInt(0x7f));
51
+ value /= BigInt(0x80);
52
+ if (value === BigInt(0)) {
53
+ pipe.write(new Uint8Array([i]));
54
+ break;
55
+ }
56
+ else {
57
+ pipe.write(new Uint8Array([i | 0x80]));
58
+ }
59
+ }
60
+ return pipe.buffer;
61
+ }
62
+ /**
63
+ * Decode a leb encoded buffer into a bigint. The number will always be positive (does not
64
+ * support signed leb encoding).
65
+ * @param pipe A Buffer containing the leb encoded bits.
66
+ */
67
+ export function lebDecode(pipe) {
68
+ let weight = BigInt(1);
69
+ let value = BigInt(0);
70
+ let byte;
71
+ do {
72
+ byte = safeReadUint8(pipe);
73
+ value += BigInt(byte & 0x7f).valueOf() * weight;
74
+ weight *= BigInt(128);
75
+ } while (byte >= 0x80);
76
+ return value;
77
+ }
78
+ /**
79
+ * Encode a number (or bigint) into a Buffer, with support for negative numbers. The number
80
+ * will be floored to the nearest integer.
81
+ * @param value The number to encode.
82
+ */
83
+ export function slebEncode(value) {
84
+ if (typeof value === 'number') {
85
+ value = BigInt(value);
86
+ }
87
+ const isNeg = value < BigInt(0);
88
+ if (isNeg) {
89
+ value = -value - BigInt(1);
90
+ }
91
+ const byteLength = (value === BigInt(0) ? 0 : ilog2(value)) + 1;
92
+ const pipe = new Pipe(new Uint8Array(byteLength), 0);
93
+ while (true) {
94
+ const i = getLowerBytes(value);
95
+ value /= BigInt(0x80);
96
+ // prettier-ignore
97
+ if ((isNeg && value === BigInt(0) && (i & 0x40) !== 0)
98
+ || (!isNeg && value === BigInt(0) && (i & 0x40) === 0)) {
99
+ pipe.write(new Uint8Array([i]));
100
+ break;
101
+ }
102
+ else {
103
+ pipe.write(new Uint8Array([i | 0x80]));
104
+ }
105
+ }
106
+ function getLowerBytes(num) {
107
+ const bytes = num % BigInt(0x80);
108
+ if (isNeg) {
109
+ // We swap the bits here again, and remove 1 to do two's complement.
110
+ return Number(BigInt(0x80) - bytes - BigInt(1));
111
+ }
112
+ else {
113
+ return Number(bytes);
114
+ }
115
+ }
116
+ return pipe.buffer;
117
+ }
118
+ /**
119
+ * Decode a leb encoded buffer into a bigint. The number is decoded with support for negative
120
+ * signed-leb encoding.
121
+ * @param pipe A Buffer containing the signed leb encoded bits.
122
+ */
123
+ export function slebDecode(pipe) {
124
+ // Get the size of the buffer, then cut a buffer of that size.
125
+ const pipeView = new Uint8Array(pipe.buffer);
126
+ let len = 0;
127
+ for (; len < pipeView.byteLength; len++) {
128
+ if (pipeView[len] < 0x80) {
129
+ // If it's a positive number, we reuse lebDecode.
130
+ if ((pipeView[len] & 0x40) === 0) {
131
+ return lebDecode(pipe);
132
+ }
133
+ break;
134
+ }
135
+ }
136
+ const bytes = new Uint8Array(safeRead(pipe, len + 1));
137
+ let value = BigInt(0);
138
+ for (let i = bytes.byteLength - 1; i >= 0; i--) {
139
+ value = value * BigInt(0x80) + BigInt(0x80 - (bytes[i] & 0x7f) - 1);
140
+ }
141
+ return -value - BigInt(1);
142
+ }
143
+ /**
144
+ *
145
+ * @param value bigint or number
146
+ * @param byteLength number
147
+ * @returns Uint8Array
148
+ */
149
+ export function writeUIntLE(value, byteLength) {
150
+ if (BigInt(value) < BigInt(0)) {
151
+ throw new Error('Cannot write negative values.');
152
+ }
153
+ return writeIntLE(value, byteLength);
154
+ }
155
+ /**
156
+ *
157
+ * @param value - bigint or number
158
+ * @param byteLength - number
159
+ * @returns Uint8Array
160
+ */
161
+ export function writeIntLE(value, byteLength) {
162
+ value = BigInt(value);
163
+ const pipe = new Pipe(new Uint8Array(Math.min(1, byteLength)), 0);
164
+ let i = 0;
165
+ let mul = BigInt(256);
166
+ let sub = BigInt(0);
167
+ let byte = Number(value % mul);
168
+ pipe.write(new Uint8Array([byte]));
169
+ while (++i < byteLength) {
170
+ if (value < 0 && sub === BigInt(0) && byte !== 0) {
171
+ sub = BigInt(1);
172
+ }
173
+ byte = Number((value / mul - sub) % BigInt(256));
174
+ pipe.write(new Uint8Array([byte]));
175
+ mul *= BigInt(256);
176
+ }
177
+ return pipe.buffer;
178
+ }
179
+ /**
180
+ *
181
+ * @param pipe Pipe from buffer-pipe
182
+ * @param byteLength number
183
+ * @returns bigint
184
+ */
185
+ export function readUIntLE(pipe, byteLength) {
186
+ if (byteLength <= 0 || !Number.isInteger(byteLength)) {
187
+ throw new Error('Byte length must be a positive integer');
188
+ }
189
+ let val = BigInt(safeReadUint8(pipe));
190
+ let mul = BigInt(1);
191
+ let i = 0;
192
+ while (++i < byteLength) {
193
+ mul *= BigInt(256);
194
+ const byte = BigInt(safeReadUint8(pipe));
195
+ val = val + mul * byte;
196
+ }
197
+ return val;
198
+ }
199
+ /**
200
+ *
201
+ * @param pipe Pipe from buffer-pipe
202
+ * @param byteLength number
203
+ * @returns bigint
204
+ */
205
+ export function readIntLE(pipe, byteLength) {
206
+ if (byteLength <= 0 || !Number.isInteger(byteLength)) {
207
+ throw new Error('Byte length must be a positive integer');
208
+ }
209
+ let val = readUIntLE(pipe, byteLength);
210
+ const mul = BigInt(2) ** (BigInt(8) * BigInt(byteLength - 1) + BigInt(7));
211
+ if (val >= mul) {
212
+ val -= mul * BigInt(2);
213
+ }
214
+ return val;
215
+ }
216
+ //# sourceMappingURL=leb128.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leb128.js","sourceRoot":"","sources":["../../../../src/candid/utils/leb128.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAC3E,2EAA2E;AAC3E,mDAAmD;AACnD,sEAAsE;AACtE,sCAAsC;AACtC,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,SAAS,GAAG;IACV,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAU,EAAE,GAAW;IAC9C,IAAI,IAAI,CAAC,UAAU,GAAG,GAAG,EAAE,CAAC;QAC1B,GAAG,EAAE,CAAC;IACR,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAU;IACtC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;IAC9B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,GAAG,EAAE,CAAC;IACR,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,KAAsB;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED,IAAI,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,UAAU,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CA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AC,CAAC,CAAC,CAAC,CAAC;IAC1E,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;QACf,GAAG,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,164 @@
1
+ import { type DerEncodedPublicKey, type HttpAgentRequest, type PublicKey, type Signature, SignIdentity, ToCborValue } from '../../agent/index.js';
2
+ import { Principal } from '../../principal/index.js';
3
+ import { PartialIdentity } from './partial.ts';
4
+ /**
5
+ * A single delegation object that is signed by a private key. This is constructed by
6
+ * `DelegationChain.create()`.
7
+ *
8
+ * {@see DelegationChain}
9
+ */
10
+ export declare class Delegation implements ToCborValue {
11
+ readonly pubkey: Uint8Array;
12
+ readonly expiration: bigint;
13
+ readonly targets?: Principal[] | undefined;
14
+ constructor(pubkey: Uint8Array, expiration: bigint, targets?: Principal[] | undefined);
15
+ toCborValue(): {
16
+ targets?: Principal[] | undefined;
17
+ pubkey: Uint8Array<ArrayBufferLike>;
18
+ expiration: bigint;
19
+ };
20
+ toJSON(): JsonnableDelegation;
21
+ }
22
+ /**
23
+ * Type of ReturnType<Delegation.toJSON>.
24
+ * The goal here is to stringify all non-JSON-compatible types to some bytes representation we can
25
+ * stringify as hex.
26
+ * (Hex shouldn't be ambiguous ever, because you can encode as DER with semantic OIDs).
27
+ */
28
+ interface JsonnableDelegation {
29
+ expiration: string;
30
+ pubkey: string;
31
+ targets?: string[];
32
+ }
33
+ /**
34
+ * A signed delegation, which lends its identity to the public key in the delegation
35
+ * object. This is constructed by `DelegationChain.create()`.
36
+ *
37
+ * {@see DelegationChain}
38
+ */
39
+ export interface SignedDelegation {
40
+ delegation: Delegation;
41
+ signature: Signature;
42
+ }
43
+ export interface JsonnableDelegationChain {
44
+ publicKey: string;
45
+ delegations: Array<{
46
+ signature: string;
47
+ delegation: {
48
+ pubkey: string;
49
+ expiration: string;
50
+ targets?: string[];
51
+ };
52
+ }>;
53
+ }
54
+ /**
55
+ * A chain of delegations. This is JSON Serializable.
56
+ * This is the object to serialize and pass to a DelegationIdentity. It does not keep any
57
+ * private keys.
58
+ */
59
+ export declare class DelegationChain {
60
+ readonly delegations: SignedDelegation[];
61
+ readonly publicKey: DerEncodedPublicKey;
62
+ /**
63
+ * Create a delegation chain between two (or more) keys. By default, the expiration time
64
+ * will be very short (15 minutes).
65
+ *
66
+ * To build a chain of more than 2 identities, this function needs to be called multiple times,
67
+ * passing the previous delegation chain into the options argument. For example:
68
+ * @example
69
+ * const rootKey = createKey();
70
+ * const middleKey = createKey();
71
+ * const bottomeKey = createKey();
72
+ *
73
+ * const rootToMiddle = await DelegationChain.create(
74
+ * root, middle.getPublicKey(), Date.parse('2100-01-01'),
75
+ * );
76
+ * const middleToBottom = await DelegationChain.create(
77
+ * middle, bottom.getPublicKey(), Date.parse('2100-01-01'), { previous: rootToMiddle },
78
+ * );
79
+ *
80
+ * // We can now use a delegation identity that uses the delegation above:
81
+ * const identity = DelegationIdentity.fromDelegation(bottomKey, middleToBottom);
82
+ * @param from The identity that will delegate.
83
+ * @param to The identity that gets delegated. It can now sign messages as if it was the
84
+ * identity above.
85
+ * @param expiration The length the delegation is valid. By default, 15 minutes from calling
86
+ * this function.
87
+ * @param options A set of options for this delegation. expiration and previous
88
+ * @param options.previous - Another DelegationChain that this chain should start with.
89
+ * @param options.targets - targets that scope the delegation (e.g. Canister Principals)
90
+ */
91
+ static create(from: SignIdentity, to: PublicKey, expiration?: Date, options?: {
92
+ previous?: DelegationChain;
93
+ targets?: Principal[];
94
+ }): Promise<DelegationChain>;
95
+ /**
96
+ * Creates a DelegationChain object from a JSON string.
97
+ * @param json The JSON string to parse.
98
+ */
99
+ static fromJSON(json: string | JsonnableDelegationChain): DelegationChain;
100
+ /**
101
+ * Creates a DelegationChain object from a list of delegations and a DER-encoded public key.
102
+ * @param delegations The list of delegations.
103
+ * @param publicKey The DER-encoded public key of the key-pair signing the first delegation.
104
+ */
105
+ static fromDelegations(delegations: SignedDelegation[], publicKey: DerEncodedPublicKey): DelegationChain;
106
+ protected constructor(delegations: SignedDelegation[], publicKey: DerEncodedPublicKey);
107
+ toJSON(): JsonnableDelegationChain;
108
+ }
109
+ /**
110
+ * An Identity that adds delegation to a request. Everywhere in this class, the name
111
+ * innerKey refers to the SignIdentity that is being used to sign the requests, while
112
+ * originalKey is the identity that is being borrowed. More identities can be used
113
+ * in the middle to delegate.
114
+ */
115
+ export declare class DelegationIdentity extends SignIdentity {
116
+ private _inner;
117
+ private _delegation;
118
+ /**
119
+ * Create a delegation without having access to delegateKey.
120
+ * @param key The key used to sign the requests.
121
+ * @param delegation A delegation object created using `createDelegation`.
122
+ */
123
+ static fromDelegation(key: Pick<SignIdentity, 'sign'>, delegation: DelegationChain): DelegationIdentity;
124
+ protected constructor(_inner: Pick<SignIdentity, 'sign'>, _delegation: DelegationChain);
125
+ getDelegation(): DelegationChain;
126
+ getPublicKey(): PublicKey;
127
+ sign(blob: Uint8Array): Promise<Signature>;
128
+ transformRequest(request: HttpAgentRequest): Promise<unknown>;
129
+ }
130
+ /**
131
+ * A partial delegated identity, representing a delegation chain and the public key that it targets
132
+ */
133
+ export declare class PartialDelegationIdentity extends PartialIdentity {
134
+ #private;
135
+ /**
136
+ * The Delegation Chain of this identity.
137
+ */
138
+ get delegation(): DelegationChain;
139
+ private constructor();
140
+ /**
141
+ * Create a {@link PartialDelegationIdentity} from a {@link PublicKey} and a {@link DelegationChain}.
142
+ * @param key The {@link PublicKey} to delegate to.
143
+ * @param delegation a {@link DelegationChain} targeting the inner key.
144
+ */
145
+ static fromDelegation(key: PublicKey, delegation: DelegationChain): PartialDelegationIdentity;
146
+ }
147
+ /**
148
+ * List of things to check for a delegation chain validity.
149
+ */
150
+ export interface DelegationValidChecks {
151
+ /**
152
+ * Check that the scope is amongst the scopes that this delegation has access to.
153
+ */
154
+ scope?: Principal | string | Array<Principal | string>;
155
+ }
156
+ /**
157
+ * Analyze a DelegationChain and validate that it's valid, ie. not expired and apply to the
158
+ * scope.
159
+ * @param chain The chain to validate.
160
+ * @param checks Various checks to validate on the chain.
161
+ */
162
+ export declare function isDelegationValid(chain: DelegationChain, checks?: DelegationValidChecks): boolean;
163
+ export {};
164
+ //# sourceMappingURL=delegation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegation.d.ts","sourceRoot":"","sources":["../../../../src/identity/identity/delegation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,YAAY,EAGZ,WAAW,EACZ,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAuB/C;;;;;GAKG;AACH,qBAAa,UAAW,YAAW,WAAW;aAE1B,MAAM,EAAE,UAAU;aAClB,UAAU,EAAE,MAAM;aAClB,OAAO,CAAC,EAAE,SAAS,EAAE;gBAFrB,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,SAAS,EAAE,YAAA;IAGhC,WAAW;;;;;IAUX,MAAM,IAAI,mBAAmB;CAUrC;AAED;;;;;GAKG;AACH,UAAU,mBAAmB;IAE3B,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;CACtB;AAqCD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,KAAK,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE;YACV,MAAM,EAAE,MAAM,CAAC;YACf,UAAU,EAAE,MAAM,CAAC;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