@coinbase/cdp-core 0.0.113 → 0.0.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.web110.js +2 -2
- package/dist/esm/index.web114.js +2 -2
- package/dist/esm/index.web126.js +12 -12
- package/dist/esm/index.web127.js +3 -3
- package/dist/esm/index.web128.js +2 -31
- package/dist/esm/index.web129.js +65 -28
- package/dist/esm/index.web130.js +367 -2
- package/dist/esm/index.web131.js +28 -65
- package/dist/esm/index.web132.js +28 -364
- package/dist/esm/index.web133.js +1 -1
- package/dist/esm/index.web135.js +4 -4
- package/dist/esm/index.web138.js +1 -1
- package/dist/esm/index.web139.js +1 -1
- package/dist/esm/index.web140.js +2 -2
- package/dist/esm/index.web142.js +1 -1
- package/dist/esm/index.web143.js +12 -14
- package/dist/esm/index.web144.js +11 -28
- package/dist/esm/index.web145.js +54 -7
- package/dist/esm/index.web146.js +10 -3
- package/dist/esm/index.web147.js +2 -29
- package/dist/esm/index.web148.js +45 -9
- package/dist/esm/index.web149.js +13 -7
- package/dist/esm/index.web150.js +2 -81
- package/dist/esm/index.web151.js +2 -29
- package/dist/esm/index.web152.js +13 -3
- package/dist/esm/index.web153.js +55 -15
- package/dist/esm/index.web154.js +6 -4
- package/dist/esm/index.web155.js +21 -14
- package/dist/esm/index.web156.js +16 -18
- package/dist/esm/index.web157.js +42 -58
- package/dist/esm/index.web158.js +3 -17
- package/dist/esm/index.web159.js +3 -23
- package/dist/esm/index.web160.js +34 -8
- package/dist/esm/index.web161.js +10 -40
- package/dist/esm/index.web162.js +4 -7
- package/dist/esm/index.web163.js +27 -19
- package/dist/esm/index.web164.js +6 -54
- package/dist/esm/index.web165.js +32 -10
- package/dist/esm/index.web166.js +13 -2
- package/dist/esm/index.web167.js +55 -44
- package/dist/esm/index.web168.js +42 -13
- package/dist/esm/index.web169.js +126 -11
- package/dist/esm/index.web170.js +104 -11
- package/dist/esm/index.web171.js +7 -2
- package/dist/esm/index.web172.js +3 -2
- package/dist/esm/index.web173.js +78 -13
- package/dist/esm/index.web174.js +2 -56
- package/dist/esm/index.web175.js +2 -7
- package/dist/esm/index.web176.js +34 -18
- package/dist/esm/index.web177.js +5 -16
- package/dist/esm/index.web178.js +31 -42
- package/dist/esm/index.web179.js +14 -3
- package/dist/esm/index.web180.js +34 -3
- package/dist/esm/index.web181.js +17 -33
- package/dist/esm/index.web182.js +8 -12
- package/dist/esm/index.web183.js +10 -4
- package/dist/esm/index.web184.js +11 -28
- package/dist/esm/index.web185.js +13 -6
- package/dist/esm/index.web186.js +5 -32
- package/dist/esm/index.web187.js +5 -13
- package/dist/esm/index.web188.js +10 -55
- package/dist/esm/index.web189.js +14 -42
- package/dist/esm/index.web190.js +27 -126
- package/dist/esm/index.web191.js +7 -104
- package/dist/esm/index.web192.js +3 -6
- package/dist/esm/index.web193.js +29 -3
- package/dist/esm/index.web194.js +8 -78
- package/dist/esm/index.web195.js +8 -2
- package/dist/esm/index.web196.js +81 -2
- package/dist/esm/index.web197.js +26 -35
- package/dist/esm/index.web198.js +3 -6
- package/dist/esm/index.web199.js +15 -34
- package/dist/esm/index.web200.js +4 -14
- package/dist/esm/index.web201.js +14 -34
- package/dist/esm/index.web202.js +18 -17
- package/dist/esm/index.web203.js +61 -8
- package/dist/esm/index.web204.js +17 -10
- package/dist/esm/index.web205.js +23 -11
- package/dist/esm/index.web206.js +8 -13
- package/dist/esm/index.web207.js +42 -5
- package/dist/esm/index.web208.js +8 -5
- package/dist/esm/index.web209.js +20 -10
- package/dist/esm/index.web210.js +39 -2
- package/dist/esm/index.web211.js +2 -109
- package/dist/esm/index.web212.js +70 -2
- package/dist/esm/index.web213.js +34 -7
- package/dist/esm/index.web214.js +15 -2
- package/dist/esm/index.web215.js +7 -368
- package/dist/esm/index.web216.js +2 -827
- package/dist/esm/index.web217.js +357 -35
- package/dist/esm/index.web218.js +853 -2
- package/dist/esm/index.web219.js +107 -68
- package/dist/esm/index.web220.js +2 -35
- package/dist/esm/index.web221.js +2 -15
- package/dist/esm/index.web222.js +102 -19
- package/dist/esm/index.web223.js +79 -10
- package/dist/esm/index.web224.js +79 -20
- package/dist/esm/index.web225.js +20 -93
- package/dist/esm/index.web226.js +9 -20
- package/dist/esm/index.web227.js +16 -114
- package/dist/esm/index.web228.js +89 -99
- package/dist/esm/index.web229.js +20 -78
- package/dist/esm/index.web230.js +118 -79
- package/dist/esm/index.web231.js +2 -47
- package/dist/esm/index.web232.js +2 -4
- package/dist/esm/index.web233.js +2 -21
- package/dist/esm/index.web234.js +21 -2
- package/dist/esm/index.web235.js +2 -20
- package/dist/esm/index.web236.js +18 -31
- package/dist/esm/index.web237.js +2 -2
- package/dist/esm/index.web238.js +33 -2
- package/dist/esm/index.web239.js +4 -2
- package/dist/esm/index.web240.js +47 -2
- package/dist/esm/index.web244.js +1 -1
- package/dist/esm/index.web247.js +1 -1
- package/dist/esm/index.web250.js +78 -14
- package/dist/esm/index.web251.js +14 -78
- package/dist/esm/index.web3.js +1 -1
- package/dist/esm/index.web53.js +40 -35
- package/dist/esm/index.web69.js +52 -48
- package/dist/esm/index.web87.js +21 -21
- package/dist/esm/index.web9.js +1 -1
- package/dist/esm/index.web91.js +55 -49
- package/dist/esm/index.web92.js +22 -22
- package/dist/esm/index.web93.js +2 -1
- package/dist/esm/index.web94.js +62 -46
- package/dist/esm/index.web97.js +19 -11
- package/dist/native/index.native109.js +3 -3
- package/dist/native/index.native11.js +1 -1
- package/dist/native/index.native112.js +2 -2
- package/dist/native/index.native116.js +1 -1
- package/dist/native/index.native128.js +12 -12
- package/dist/native/index.native129.js +371 -84
- package/dist/native/index.native130.js +2 -19
- package/dist/native/index.native131.js +63 -20
- package/dist/native/index.native132.js +351 -37
- package/dist/native/index.native133.js +100 -371
- package/dist/native/index.native134.js +12 -12
- package/dist/native/index.native135.js +12 -12
- package/dist/native/index.native136.js +19 -2
- package/dist/native/index.native137.js +20 -63
- package/dist/native/index.native138.js +37 -351
- package/dist/native/index.native141.js +1 -1
- package/dist/native/index.native142.js +1 -1
- package/dist/native/index.native143.js +2 -2
- package/dist/native/index.native145.js +5 -35
- package/dist/native/index.native146.js +35 -67
- package/dist/native/index.native147.js +66 -53
- package/dist/native/index.native148.js +13 -10
- package/dist/native/index.native149.js +28 -2
- package/dist/native/index.native150.js +8 -45
- package/dist/native/index.native151.js +3 -13
- package/dist/native/index.native152.js +27 -4
- package/dist/native/index.native153.js +8 -12
- package/dist/native/index.native154.js +7 -11
- package/dist/native/index.native155.js +72 -6
- package/dist/native/index.native156.js +10 -10
- package/dist/native/index.native157.js +3 -7
- package/dist/native/index.native158.js +14 -3
- package/dist/native/index.native159.js +4 -27
- package/dist/native/index.native160.js +13 -8
- package/dist/native/index.native161.js +19 -7
- package/dist/native/index.native162.js +48 -67
- package/dist/native/index.native163.js +16 -26
- package/dist/native/index.native164.js +23 -3
- package/dist/native/index.native165.js +8 -14
- package/dist/native/index.native166.js +41 -4
- package/dist/native/index.native167.js +7 -13
- package/dist/native/index.native168.js +11 -10
- package/dist/native/index.native169.js +2 -61
- package/dist/native/index.native170.js +2 -18
- package/dist/native/index.native171.js +53 -22
- package/dist/native/index.native172.js +10 -8
- package/dist/native/index.native173.js +2 -42
- package/dist/native/index.native174.js +45 -8
- package/dist/native/index.native175.js +13 -20
- package/dist/native/index.native177.js +5 -5
- package/dist/native/index.native178.js +2 -2
- package/dist/native/index.native180.js +11 -17
- package/dist/native/index.native181.js +16 -44
- package/dist/native/index.native182.js +45 -3
- package/dist/native/index.native183.js +3 -3
- package/dist/native/index.native184.js +3 -34
- package/dist/native/index.native185.js +32 -10
- package/dist/native/index.native186.js +12 -4
- package/dist/native/index.native187.js +4 -28
- package/dist/native/index.native188.js +28 -6
- package/dist/native/index.native189.js +6 -32
- package/dist/native/index.native190.js +31 -11
- package/dist/native/index.native191.js +10 -53
- package/dist/native/index.native192.js +54 -41
- package/dist/native/index.native193.js +42 -127
- package/dist/native/index.native194.js +125 -102
- package/dist/native/index.native195.js +104 -6
- package/dist/native/index.native196.js +7 -3
- package/dist/native/index.native197.js +3 -79
- package/dist/native/index.native198.js +79 -2
- package/dist/native/index.native199.js +2 -2
- package/dist/native/index.native200.js +2 -38
- package/dist/native/index.native201.js +11 -5
- package/dist/native/index.native202.js +32 -29
- package/dist/native/index.native203.js +6 -14
- package/dist/native/index.native204.js +30 -30
- package/dist/native/index.native205.js +14 -18
- package/dist/native/index.native206.js +34 -8
- package/dist/native/index.native207.js +17 -9
- package/dist/native/index.native208.js +8 -11
- package/dist/native/index.native209.js +10 -13
- package/dist/native/index.native210.js +11 -5
- package/dist/native/index.native211.js +14 -5
- package/dist/native/index.native212.js +5 -10
- package/dist/native/index.native213.js +5 -2
- package/dist/native/index.native214.js +11 -2
- package/dist/native/index.native215.js +2 -21
- package/dist/native/index.native216.js +109 -10
- package/dist/native/index.native217.js +2 -20
- package/dist/native/index.native218.js +8 -94
- package/dist/native/index.native219.js +2 -21
- package/dist/native/index.native220.js +353 -110
- package/dist/native/index.native221.js +849 -105
- package/dist/native/index.native222.js +39 -2
- package/dist/native/index.native223.js +2 -2
- package/dist/native/index.native224.js +69 -103
- package/dist/native/index.native225.js +32 -76
- package/dist/native/index.native226.js +14 -78
- package/dist/native/index.native227.js +46 -38
- package/dist/native/index.native228.js +21 -2
- package/dist/native/index.native229.js +10 -70
- package/dist/native/index.native230.js +19 -34
- package/dist/native/index.native231.js +92 -13
- package/dist/native/index.native232.js +21 -8
- package/dist/native/index.native233.js +118 -2
- package/dist/native/index.native234.js +16 -364
- package/dist/native/index.native235.js +2 -827
- package/dist/native/index.native236.js +17 -18
- package/dist/native/index.native237.js +79 -2
- package/dist/native/index.native238.js +102 -18
- package/dist/native/index.native239.js +4 -4
- package/dist/native/index.native240.js +2 -2
- package/dist/native/index.native241.js +74 -42
- package/dist/native/index.native242.js +2 -18
- package/dist/native/index.native243.js +2 -28
- package/dist/native/index.native244.js +2 -8
- package/dist/native/index.native245.js +4 -11
- package/dist/native/index.native246.js +16 -11
- package/dist/native/index.native247.js +28 -10
- package/dist/native/index.native248.js +8 -17
- package/dist/native/index.native249.js +9 -79
- package/dist/native/index.native250.js +13 -2
- package/dist/native/index.native251.js +10 -2
- package/dist/native/index.native252.js +17 -2
- package/dist/native/index.native253.js +80 -3
- package/dist/native/index.native255.js +14 -78
- package/dist/native/index.native256.js +78 -14
- package/dist/native/index.native3.js +1 -1
- package/dist/native/index.native55.js +40 -35
- package/dist/native/index.native71.js +52 -48
- package/dist/native/index.native86.js +1 -1
- package/dist/native/index.native89.js +23 -23
- package/dist/native/index.native93.js +55 -49
- package/dist/native/index.native99.js +19 -11
- package/dist/native-types/actions/createKeyExportIframe.d.ts +60 -3
- package/dist/native-types/index.d.ts +1 -1
- package/dist/native-types/index.web.d.ts +1 -1
- package/dist/native-types/secureIframe/data.d.ts +1 -0
- package/dist/native-types/secureIframe/index.d.ts +1 -1
- package/dist/native-types/secureIframe/types.d.ts +64 -2
- package/dist/native-types/secureIframe/utils.d.ts +38 -0
- package/dist/native-types/version.d.ts +1 -1
- package/dist/types/actions/createKeyExportIframe.d.ts +60 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.web.d.ts +1 -1
- package/dist/types/secureIframe/data.d.ts +1 -0
- package/dist/types/secureIframe/index.d.ts +1 -1
- package/dist/types/secureIframe/types.d.ts +64 -2
- package/dist/types/secureIframe/utils.d.ts +38 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index.web110.js +2 -2
- package/dist/web/index.web114.js +2 -2
- package/dist/web/index.web126.js +12 -12
- package/dist/web/index.web127.js +3 -3
- package/dist/web/index.web128.js +2 -31
- package/dist/web/index.web129.js +65 -28
- package/dist/web/index.web130.js +367 -2
- package/dist/web/index.web131.js +28 -65
- package/dist/web/index.web132.js +28 -364
- package/dist/web/index.web133.js +1 -1
- package/dist/web/index.web135.js +4 -4
- package/dist/web/index.web138.js +1 -1
- package/dist/web/index.web139.js +1 -1
- package/dist/web/index.web140.js +2 -2
- package/dist/web/index.web142.js +1 -1
- package/dist/web/index.web143.js +12 -14
- package/dist/web/index.web144.js +11 -28
- package/dist/web/index.web145.js +54 -7
- package/dist/web/index.web146.js +10 -3
- package/dist/web/index.web147.js +2 -29
- package/dist/web/index.web148.js +45 -9
- package/dist/web/index.web149.js +13 -7
- package/dist/web/index.web150.js +2 -81
- package/dist/web/index.web151.js +2 -29
- package/dist/web/index.web152.js +13 -3
- package/dist/web/index.web153.js +55 -15
- package/dist/web/index.web154.js +6 -4
- package/dist/web/index.web155.js +21 -14
- package/dist/web/index.web156.js +16 -18
- package/dist/web/index.web157.js +42 -58
- package/dist/web/index.web158.js +3 -17
- package/dist/web/index.web159.js +3 -23
- package/dist/web/index.web160.js +34 -8
- package/dist/web/index.web161.js +10 -40
- package/dist/web/index.web162.js +4 -7
- package/dist/web/index.web163.js +27 -19
- package/dist/web/index.web164.js +6 -54
- package/dist/web/index.web165.js +32 -10
- package/dist/web/index.web166.js +13 -2
- package/dist/web/index.web167.js +55 -44
- package/dist/web/index.web168.js +42 -13
- package/dist/web/index.web169.js +126 -11
- package/dist/web/index.web170.js +104 -11
- package/dist/web/index.web171.js +7 -2
- package/dist/web/index.web172.js +3 -2
- package/dist/web/index.web173.js +78 -13
- package/dist/web/index.web174.js +2 -56
- package/dist/web/index.web175.js +2 -7
- package/dist/web/index.web176.js +34 -18
- package/dist/web/index.web177.js +5 -16
- package/dist/web/index.web178.js +31 -42
- package/dist/web/index.web179.js +14 -3
- package/dist/web/index.web180.js +34 -3
- package/dist/web/index.web181.js +17 -33
- package/dist/web/index.web182.js +8 -12
- package/dist/web/index.web183.js +10 -4
- package/dist/web/index.web184.js +11 -28
- package/dist/web/index.web185.js +13 -6
- package/dist/web/index.web186.js +5 -32
- package/dist/web/index.web187.js +5 -13
- package/dist/web/index.web188.js +10 -55
- package/dist/web/index.web189.js +14 -42
- package/dist/web/index.web190.js +27 -126
- package/dist/web/index.web191.js +7 -104
- package/dist/web/index.web192.js +3 -6
- package/dist/web/index.web193.js +29 -3
- package/dist/web/index.web194.js +8 -78
- package/dist/web/index.web195.js +8 -2
- package/dist/web/index.web196.js +81 -2
- package/dist/web/index.web197.js +26 -35
- package/dist/web/index.web198.js +3 -6
- package/dist/web/index.web199.js +15 -34
- package/dist/web/index.web200.js +4 -14
- package/dist/web/index.web201.js +14 -34
- package/dist/web/index.web202.js +18 -17
- package/dist/web/index.web203.js +61 -8
- package/dist/web/index.web204.js +17 -10
- package/dist/web/index.web205.js +23 -11
- package/dist/web/index.web206.js +8 -13
- package/dist/web/index.web207.js +42 -5
- package/dist/web/index.web208.js +8 -5
- package/dist/web/index.web209.js +20 -10
- package/dist/web/index.web210.js +39 -2
- package/dist/web/index.web211.js +2 -109
- package/dist/web/index.web212.js +70 -2
- package/dist/web/index.web213.js +34 -7
- package/dist/web/index.web214.js +15 -2
- package/dist/web/index.web215.js +7 -368
- package/dist/web/index.web216.js +2 -827
- package/dist/web/index.web217.js +357 -35
- package/dist/web/index.web218.js +853 -2
- package/dist/web/index.web219.js +107 -68
- package/dist/web/index.web220.js +2 -35
- package/dist/web/index.web221.js +2 -15
- package/dist/web/index.web222.js +102 -19
- package/dist/web/index.web223.js +79 -10
- package/dist/web/index.web224.js +79 -20
- package/dist/web/index.web225.js +20 -93
- package/dist/web/index.web226.js +9 -20
- package/dist/web/index.web227.js +16 -114
- package/dist/web/index.web228.js +89 -99
- package/dist/web/index.web229.js +20 -78
- package/dist/web/index.web230.js +118 -79
- package/dist/web/index.web231.js +2 -47
- package/dist/web/index.web232.js +2 -4
- package/dist/web/index.web233.js +2 -21
- package/dist/web/index.web234.js +21 -2
- package/dist/web/index.web235.js +2 -20
- package/dist/web/index.web236.js +18 -31
- package/dist/web/index.web237.js +2 -2
- package/dist/web/index.web238.js +33 -2
- package/dist/web/index.web239.js +4 -2
- package/dist/web/index.web240.js +47 -2
- package/dist/web/index.web244.js +1 -1
- package/dist/web/index.web247.js +1 -1
- package/dist/web/index.web250.js +78 -14
- package/dist/web/index.web251.js +14 -78
- package/dist/web/index.web3.js +1 -1
- package/dist/web/index.web53.js +40 -35
- package/dist/web/index.web69.js +52 -48
- package/dist/web/index.web87.js +21 -21
- package/dist/web/index.web9.js +1 -1
- package/dist/web/index.web91.js +55 -49
- package/dist/web/index.web92.js +22 -22
- package/dist/web/index.web93.js +2 -1
- package/dist/web/index.web94.js +62 -46
- package/dist/web/index.web97.js +19 -11
- package/dist/web-types/actions/createKeyExportIframe.d.ts +60 -3
- package/dist/web-types/index.d.ts +1 -1
- package/dist/web-types/index.web.d.ts +1 -1
- package/dist/web-types/secureIframe/data.d.ts +1 -0
- package/dist/web-types/secureIframe/index.d.ts +1 -1
- package/dist/web-types/secureIframe/types.d.ts +64 -2
- package/dist/web-types/secureIframe/utils.d.ts +38 -0
- package/dist/web-types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/esm/index.web230.js
CHANGED
|
@@ -1,81 +1,120 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
1
|
+
import { isJWK as p } from "./index.web247.js";
|
|
2
|
+
import { decode as m } from "./index.web225.js";
|
|
3
|
+
import y from "./index.web248.js";
|
|
4
|
+
import { isCryptoKey as S, isKeyObject as K } from "./index.web246.js";
|
|
5
|
+
let c;
|
|
6
|
+
const f = async (e, r, s, i = !1) => {
|
|
7
|
+
c ||= /* @__PURE__ */ new WeakMap();
|
|
8
|
+
let n = c.get(e);
|
|
9
|
+
if (n?.[s])
|
|
10
|
+
return n[s];
|
|
11
|
+
const t = await y({ ...r, alg: s });
|
|
12
|
+
return i && Object.freeze(e), n ? n[s] = t : c.set(e, { [s]: t }), t;
|
|
13
|
+
}, E = (e, r) => {
|
|
14
|
+
c ||= /* @__PURE__ */ new WeakMap();
|
|
15
|
+
let s = c.get(e);
|
|
16
|
+
if (s?.[r])
|
|
17
|
+
return s[r];
|
|
18
|
+
const i = e.type === "public", n = !!i;
|
|
19
|
+
let t;
|
|
20
|
+
if (e.asymmetricKeyType === "x25519") {
|
|
21
|
+
switch (r) {
|
|
22
|
+
case "ECDH-ES":
|
|
23
|
+
case "ECDH-ES+A128KW":
|
|
24
|
+
case "ECDH-ES+A192KW":
|
|
25
|
+
case "ECDH-ES+A256KW":
|
|
26
|
+
break;
|
|
27
|
+
default:
|
|
28
|
+
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
29
|
+
}
|
|
30
|
+
t = e.toCryptoKey(e.asymmetricKeyType, n, i ? [] : ["deriveBits"]);
|
|
31
|
+
}
|
|
32
|
+
if (e.asymmetricKeyType === "ed25519") {
|
|
33
|
+
if (r !== "EdDSA" && r !== "Ed25519")
|
|
34
|
+
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
35
|
+
t = e.toCryptoKey(e.asymmetricKeyType, n, [
|
|
36
|
+
i ? "verify" : "sign"
|
|
37
|
+
]);
|
|
38
|
+
}
|
|
39
|
+
if (e.asymmetricKeyType === "rsa") {
|
|
40
|
+
let a;
|
|
41
|
+
switch (r) {
|
|
42
|
+
case "RSA-OAEP":
|
|
43
|
+
a = "SHA-1";
|
|
44
|
+
break;
|
|
45
|
+
case "RS256":
|
|
46
|
+
case "PS256":
|
|
47
|
+
case "RSA-OAEP-256":
|
|
48
|
+
a = "SHA-256";
|
|
49
|
+
break;
|
|
50
|
+
case "RS384":
|
|
51
|
+
case "PS384":
|
|
52
|
+
case "RSA-OAEP-384":
|
|
53
|
+
a = "SHA-384";
|
|
54
|
+
break;
|
|
55
|
+
case "RS512":
|
|
56
|
+
case "PS512":
|
|
57
|
+
case "RSA-OAEP-512":
|
|
58
|
+
a = "SHA-512";
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
62
|
+
}
|
|
63
|
+
if (r.startsWith("RSA-OAEP"))
|
|
64
|
+
return e.toCryptoKey({
|
|
65
|
+
name: "RSA-OAEP",
|
|
66
|
+
hash: a
|
|
67
|
+
}, n, i ? ["encrypt"] : ["decrypt"]);
|
|
68
|
+
t = e.toCryptoKey({
|
|
69
|
+
name: r.startsWith("PS") ? "RSA-PSS" : "RSASSA-PKCS1-v1_5",
|
|
70
|
+
hash: a
|
|
71
|
+
}, n, [i ? "verify" : "sign"]);
|
|
72
|
+
}
|
|
73
|
+
if (e.asymmetricKeyType === "ec") {
|
|
74
|
+
const o = (/* @__PURE__ */ new Map([
|
|
75
|
+
["prime256v1", "P-256"],
|
|
76
|
+
["secp384r1", "P-384"],
|
|
77
|
+
["secp521r1", "P-521"]
|
|
78
|
+
])).get(e.asymmetricKeyDetails?.namedCurve);
|
|
79
|
+
if (!o)
|
|
80
|
+
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
81
|
+
r === "ES256" && o === "P-256" && (t = e.toCryptoKey({
|
|
82
|
+
name: "ECDSA",
|
|
83
|
+
namedCurve: o
|
|
84
|
+
}, n, [i ? "verify" : "sign"])), r === "ES384" && o === "P-384" && (t = e.toCryptoKey({
|
|
85
|
+
name: "ECDSA",
|
|
86
|
+
namedCurve: o
|
|
87
|
+
}, n, [i ? "verify" : "sign"])), r === "ES512" && o === "P-521" && (t = e.toCryptoKey({
|
|
88
|
+
name: "ECDSA",
|
|
89
|
+
namedCurve: o
|
|
90
|
+
}, n, [i ? "verify" : "sign"])), r.startsWith("ECDH-ES") && (t = e.toCryptoKey({
|
|
91
|
+
name: "ECDH",
|
|
92
|
+
namedCurve: o
|
|
93
|
+
}, n, i ? [] : ["deriveBits"]));
|
|
94
|
+
}
|
|
95
|
+
if (!t)
|
|
96
|
+
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
97
|
+
return s ? s[r] = t : c.set(e, { [r]: t }), t;
|
|
98
|
+
}, d = async (e, r) => {
|
|
99
|
+
if (e instanceof Uint8Array || S(e))
|
|
100
|
+
return e;
|
|
101
|
+
if (K(e)) {
|
|
102
|
+
if (e.type === "secret")
|
|
103
|
+
return e.export();
|
|
104
|
+
if ("toCryptoKey" in e && typeof e.toCryptoKey == "function")
|
|
105
|
+
try {
|
|
106
|
+
return E(e, r);
|
|
107
|
+
} catch (i) {
|
|
108
|
+
if (i instanceof TypeError)
|
|
109
|
+
throw i;
|
|
110
|
+
}
|
|
111
|
+
let s = e.export({ format: "jwk" });
|
|
112
|
+
return f(e, s, r);
|
|
113
|
+
}
|
|
114
|
+
if (p(e))
|
|
115
|
+
return e.k ? m(e.k) : f(e, e, r, !0);
|
|
116
|
+
throw new Error("unreachable");
|
|
117
|
+
};
|
|
63
118
|
export {
|
|
64
|
-
d as
|
|
65
|
-
r as abytes,
|
|
66
|
-
h as aexists,
|
|
67
|
-
w as anumber,
|
|
68
|
-
l as aoutput,
|
|
69
|
-
u as byteSwap,
|
|
70
|
-
c as byteSwap32,
|
|
71
|
-
g as clean,
|
|
72
|
-
E as createHasher,
|
|
73
|
-
p as createView,
|
|
74
|
-
o as isBytes,
|
|
75
|
-
i as isLE,
|
|
76
|
-
b as rotr,
|
|
77
|
-
x as swap32IfBE,
|
|
78
|
-
y as toBytes,
|
|
79
|
-
a as u32,
|
|
80
|
-
s as utf8ToBytes
|
|
119
|
+
d as default
|
|
81
120
|
};
|
package/dist/esm/index.web231.js
CHANGED
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { pad as g } from "./index.web250.js";
|
|
3
|
-
function m(t, i = {}) {
|
|
4
|
-
const { signed: r, size: e } = i, o = BigInt(t);
|
|
5
|
-
let n;
|
|
6
|
-
e ? r ? n = (1n << BigInt(e) * 8n - 1n) - 1n : n = 2n ** (BigInt(e) * 8n) - 1n : typeof t == "number" && (n = BigInt(Number.MAX_SAFE_INTEGER));
|
|
7
|
-
const u = typeof n == "bigint" && r ? -n - 1n : 0;
|
|
8
|
-
if (n && o > n || o < u) {
|
|
9
|
-
const s = typeof t == "bigint" ? "n" : "";
|
|
10
|
-
throw new d({
|
|
11
|
-
max: n ? `${n}${s}` : void 0,
|
|
12
|
-
min: `${u}${s}`,
|
|
13
|
-
signed: r,
|
|
14
|
-
size: e,
|
|
15
|
-
value: `${t}${s}`
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const a = `0x${(r && o < 0 ? (1n << BigInt(e * 8)) + BigInt(o) : o).toString(16)}`;
|
|
19
|
-
return e ? c(a, e) : a;
|
|
20
|
-
}
|
|
21
|
-
function c(t, i) {
|
|
22
|
-
return g(t, { dir: "left", size: i });
|
|
23
|
-
}
|
|
24
|
-
class d extends f {
|
|
25
|
-
constructor({ max: i, min: r, signed: e, size: o, value: n }) {
|
|
26
|
-
super(`Number \`${n}\` is not in safe${o ? ` ${o * 8}-bit` : ""}${e ? " signed" : " unsigned"} integer range ${i ? `(\`${r}\` to \`${i}\`)` : `(above \`${r}\`)`}`), Object.defineProperty(this, "name", {
|
|
27
|
-
enumerable: !0,
|
|
28
|
-
configurable: !0,
|
|
29
|
-
writable: !0,
|
|
30
|
-
value: "Hex.IntegerOutOfRangeError"
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
class p extends f {
|
|
35
|
-
constructor({ size: i, targetSize: r, type: e }) {
|
|
36
|
-
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (\`${i}\`) exceeds padding size (\`${r}\`).`), Object.defineProperty(this, "name", {
|
|
37
|
-
enumerable: !0,
|
|
38
|
-
configurable: !0,
|
|
39
|
-
writable: !0,
|
|
40
|
-
value: "Hex.SizeExceedsPaddingSizeError"
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
var r = { exports: {} };
|
|
44
2
|
export {
|
|
45
|
-
|
|
46
|
-
p as SizeExceedsPaddingSizeError,
|
|
47
|
-
m as fromNumber,
|
|
48
|
-
c as padLeft
|
|
3
|
+
r as __module
|
|
49
4
|
};
|
package/dist/esm/index.web232.js
CHANGED
package/dist/esm/index.web233.js
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
class i extends o {
|
|
3
|
-
constructor({ offset: e }) {
|
|
4
|
-
super(`Offset \`${e}\` cannot be negative.`, {
|
|
5
|
-
name: "NegativeOffsetError"
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
class n extends o {
|
|
10
|
-
constructor({ length: e, position: r }) {
|
|
11
|
-
super(`Position \`${r}\` is out of bounds (\`0 < position < ${e}\`).`, { name: "PositionOutOfBoundsError" });
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
class c extends o {
|
|
15
|
-
constructor({ count: e, limit: r }) {
|
|
16
|
-
super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${e}\`).`, { name: "RecursiveReadLimitExceededError" });
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
var e = { exports: {} };
|
|
19
2
|
export {
|
|
20
|
-
|
|
21
|
-
n as PositionOutOfBoundsError,
|
|
22
|
-
c as RecursiveReadLimitExceededError
|
|
3
|
+
e as __module
|
|
23
4
|
};
|
package/dist/esm/index.web234.js
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { BaseError as o } from "./index.web167.js";
|
|
2
|
+
class i extends o {
|
|
3
|
+
constructor({ offset: e }) {
|
|
4
|
+
super(`Offset \`${e}\` cannot be negative.`, {
|
|
5
|
+
name: "NegativeOffsetError"
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
class n extends o {
|
|
10
|
+
constructor({ length: e, position: r }) {
|
|
11
|
+
super(`Position \`${r}\` is out of bounds (\`0 < position < ${e}\`).`, { name: "PositionOutOfBoundsError" });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
class c extends o {
|
|
15
|
+
constructor({ count: e, limit: r }) {
|
|
16
|
+
super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${e}\`).`, { name: "RecursiveReadLimitExceededError" });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
2
19
|
export {
|
|
3
|
-
|
|
20
|
+
i as NegativeOffsetError,
|
|
21
|
+
n as PositionOutOfBoundsError,
|
|
22
|
+
c as RecursiveReadLimitExceededError
|
|
4
23
|
};
|
package/dist/esm/index.web235.js
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
const o =
|
|
2
|
-
function s(t, r = !1) {
|
|
3
|
-
return r ? { h: Number(t & o), l: Number(t >> i & o) } : { h: Number(t >> i & o) | 0, l: Number(t & o) | 0 };
|
|
4
|
-
}
|
|
5
|
-
function h(t, r = !1) {
|
|
6
|
-
const n = t.length;
|
|
7
|
-
let l = new Uint32Array(n), c = new Uint32Array(n);
|
|
8
|
-
for (let e = 0; e < n; e++) {
|
|
9
|
-
const { h: u, l: f } = s(t[e], r);
|
|
10
|
-
[l[e], c[e]] = [u, f];
|
|
11
|
-
}
|
|
12
|
-
return [l, c];
|
|
13
|
-
}
|
|
14
|
-
const m = (t, r, n) => t << n | r >>> 32 - n, A = (t, r, n) => r << n | t >>> 32 - n, B = (t, r, n) => r << n - 32 | t >>> 64 - n, a = (t, r, n) => t << n - 32 | r >>> 64 - n;
|
|
1
|
+
const o = "2.47.0";
|
|
15
2
|
export {
|
|
16
|
-
|
|
17
|
-
B as rotlBH,
|
|
18
|
-
a as rotlBL,
|
|
19
|
-
m as rotlSH,
|
|
20
|
-
A as rotlSL,
|
|
21
|
-
h as split
|
|
3
|
+
o as version
|
|
22
4
|
};
|
package/dist/esm/index.web236.js
CHANGED
|
@@ -1,35 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (o > y)
|
|
12
|
-
throw new h({
|
|
13
|
-
maxSize: y,
|
|
14
|
-
size: o
|
|
15
|
-
});
|
|
16
|
-
const s = [];
|
|
17
|
-
let n = !0, r = 0;
|
|
18
|
-
for (; n; ) {
|
|
19
|
-
const t = B(new Uint8Array(a));
|
|
20
|
-
let l = 0;
|
|
21
|
-
for (; l < f; ) {
|
|
22
|
-
const b = i.slice(r, r + (p - 1));
|
|
23
|
-
if (t.pushByte(0), t.pushBytes(b), b.length < 31) {
|
|
24
|
-
t.pushByte(128), n = !1;
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
l++, r += 31;
|
|
28
|
-
}
|
|
29
|
-
s.push(t);
|
|
1
|
+
const o = /* @__PURE__ */ BigInt(4294967295), i = /* @__PURE__ */ BigInt(32);
|
|
2
|
+
function s(t, r = !1) {
|
|
3
|
+
return r ? { h: Number(t & o), l: Number(t >> i & o) } : { h: Number(t >> i & o) | 0, l: Number(t & o) | 0 };
|
|
4
|
+
}
|
|
5
|
+
function h(t, r = !1) {
|
|
6
|
+
const n = t.length;
|
|
7
|
+
let l = new Uint32Array(n), c = new Uint32Array(n);
|
|
8
|
+
for (let e = 0; e < n; e++) {
|
|
9
|
+
const { h: u, l: f } = s(t[e], r);
|
|
10
|
+
[l[e], c[e]] = [u, f];
|
|
30
11
|
}
|
|
31
|
-
return
|
|
12
|
+
return [l, c];
|
|
32
13
|
}
|
|
14
|
+
const m = (t, r, n) => t << n | r >>> 32 - n, A = (t, r, n) => r << n | t >>> 32 - n, B = (t, r, n) => r << n - 32 | t >>> 64 - n, a = (t, r, n) => t << n - 32 | r >>> 64 - n;
|
|
33
15
|
export {
|
|
34
|
-
|
|
16
|
+
s as fromBig,
|
|
17
|
+
B as rotlBH,
|
|
18
|
+
a as rotlBL,
|
|
19
|
+
m as rotlSH,
|
|
20
|
+
A as rotlSL,
|
|
21
|
+
h as split
|
|
35
22
|
};
|
package/dist/esm/index.web237.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bytesToHex as i } from "./index.
|
|
2
|
-
import { sha256 as m } from "./index.
|
|
1
|
+
import { bytesToHex as i } from "./index.web157.js";
|
|
2
|
+
import { sha256 as m } from "./index.web171.js";
|
|
3
3
|
function f(t) {
|
|
4
4
|
const { commitment: e, version: s = 1 } = t, n = t.to ?? (typeof e == "string" ? "hex" : "bytes"), o = m(e);
|
|
5
5
|
return o.set([s], 0), n === "bytes" ? o : i(o);
|
package/dist/esm/index.web238.js
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
import { maxBytesPerTransaction as y, bytesPerBlob as a, fieldElementsPerBlob as f, bytesPerFieldElement as p } from "./index.web249.js";
|
|
2
|
+
import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./index.web176.js";
|
|
3
|
+
import { createCursor as B } from "./index.web169.js";
|
|
4
|
+
import { size as u } from "./index.web162.js";
|
|
5
|
+
import { hexToBytes as x } from "./index.web153.js";
|
|
6
|
+
import { bytesToHex as d } from "./index.web157.js";
|
|
7
|
+
function S(e) {
|
|
8
|
+
const m = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), i = typeof e.data == "string" ? x(e.data) : e.data, o = u(i);
|
|
9
|
+
if (!o)
|
|
10
|
+
throw new c();
|
|
11
|
+
if (o > y)
|
|
12
|
+
throw new h({
|
|
13
|
+
maxSize: y,
|
|
14
|
+
size: o
|
|
15
|
+
});
|
|
16
|
+
const s = [];
|
|
17
|
+
let n = !0, r = 0;
|
|
18
|
+
for (; n; ) {
|
|
19
|
+
const t = B(new Uint8Array(a));
|
|
20
|
+
let l = 0;
|
|
21
|
+
for (; l < f; ) {
|
|
22
|
+
const b = i.slice(r, r + (p - 1));
|
|
23
|
+
if (t.pushByte(0), t.pushBytes(b), b.length < 31) {
|
|
24
|
+
t.pushByte(128), n = !1;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
l++, r += 31;
|
|
28
|
+
}
|
|
29
|
+
s.push(t);
|
|
30
|
+
}
|
|
31
|
+
return m === "bytes" ? s.map((t) => t.bytes) : s.map((t) => d(t.bytes));
|
|
32
|
+
}
|
|
2
33
|
export {
|
|
3
|
-
|
|
34
|
+
S as toBlobs
|
|
4
35
|
};
|
package/dist/esm/index.web239.js
CHANGED
package/dist/esm/index.web240.js
CHANGED
|
@@ -1,4 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
import { BaseError as f } from "./index.web129.js";
|
|
2
|
+
import { pad as g } from "./index.web251.js";
|
|
3
|
+
function m(t, i = {}) {
|
|
4
|
+
const { signed: r, size: e } = i, o = BigInt(t);
|
|
5
|
+
let n;
|
|
6
|
+
e ? r ? n = (1n << BigInt(e) * 8n - 1n) - 1n : n = 2n ** (BigInt(e) * 8n) - 1n : typeof t == "number" && (n = BigInt(Number.MAX_SAFE_INTEGER));
|
|
7
|
+
const u = typeof n == "bigint" && r ? -n - 1n : 0;
|
|
8
|
+
if (n && o > n || o < u) {
|
|
9
|
+
const s = typeof t == "bigint" ? "n" : "";
|
|
10
|
+
throw new d({
|
|
11
|
+
max: n ? `${n}${s}` : void 0,
|
|
12
|
+
min: `${u}${s}`,
|
|
13
|
+
signed: r,
|
|
14
|
+
size: e,
|
|
15
|
+
value: `${t}${s}`
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const a = `0x${(r && o < 0 ? (1n << BigInt(e * 8)) + BigInt(o) : o).toString(16)}`;
|
|
19
|
+
return e ? c(a, e) : a;
|
|
20
|
+
}
|
|
21
|
+
function c(t, i) {
|
|
22
|
+
return g(t, { dir: "left", size: i });
|
|
23
|
+
}
|
|
24
|
+
class d extends f {
|
|
25
|
+
constructor({ max: i, min: r, signed: e, size: o, value: n }) {
|
|
26
|
+
super(`Number \`${n}\` is not in safe${o ? ` ${o * 8}-bit` : ""}${e ? " signed" : " unsigned"} integer range ${i ? `(\`${r}\` to \`${i}\`)` : `(above \`${r}\`)`}`), Object.defineProperty(this, "name", {
|
|
27
|
+
enumerable: !0,
|
|
28
|
+
configurable: !0,
|
|
29
|
+
writable: !0,
|
|
30
|
+
value: "Hex.IntegerOutOfRangeError"
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class p extends f {
|
|
35
|
+
constructor({ size: i, targetSize: r, type: e }) {
|
|
36
|
+
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (\`${i}\`) exceeds padding size (\`${r}\`).`), Object.defineProperty(this, "name", {
|
|
37
|
+
enumerable: !0,
|
|
38
|
+
configurable: !0,
|
|
39
|
+
writable: !0,
|
|
40
|
+
value: "Hex.SizeExceedsPaddingSizeError"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
2
44
|
export {
|
|
3
|
-
|
|
45
|
+
d as IntegerOutOfRangeError,
|
|
46
|
+
p as SizeExceedsPaddingSizeError,
|
|
47
|
+
m as fromNumber,
|
|
48
|
+
c as padLeft
|
|
4
49
|
};
|
package/dist/esm/index.web244.js
CHANGED
package/dist/esm/index.web247.js
CHANGED
package/dist/esm/index.web250.js
CHANGED
|
@@ -1,17 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
function r(t, e = "algorithm.name") {
|
|
2
|
+
return new TypeError(`CryptoKey does not support this operation, its ${e} must be ${t}`);
|
|
3
|
+
}
|
|
4
|
+
function o(t, e) {
|
|
5
|
+
return t.name === e;
|
|
6
|
+
}
|
|
7
|
+
function c(t) {
|
|
8
|
+
return parseInt(t.name.slice(4), 10);
|
|
9
|
+
}
|
|
10
|
+
function h(t) {
|
|
11
|
+
switch (t) {
|
|
12
|
+
case "ES256":
|
|
13
|
+
return "P-256";
|
|
14
|
+
case "ES384":
|
|
15
|
+
return "P-384";
|
|
16
|
+
case "ES512":
|
|
17
|
+
return "P-521";
|
|
18
|
+
default:
|
|
19
|
+
throw new Error("unreachable");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function i(t, e) {
|
|
23
|
+
if (!t.usages.includes(e))
|
|
24
|
+
throw new TypeError(`CryptoKey does not support this operation, its usages must include ${e}.`);
|
|
25
|
+
}
|
|
26
|
+
function u(t, e, n) {
|
|
27
|
+
switch (e) {
|
|
28
|
+
case "HS256":
|
|
29
|
+
case "HS384":
|
|
30
|
+
case "HS512": {
|
|
31
|
+
if (!o(t.algorithm, "HMAC"))
|
|
32
|
+
throw r("HMAC");
|
|
33
|
+
const a = parseInt(e.slice(2), 10);
|
|
34
|
+
if (c(t.algorithm.hash) !== a)
|
|
35
|
+
throw r(`SHA-${a}`, "algorithm.hash");
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
case "RS256":
|
|
39
|
+
case "RS384":
|
|
40
|
+
case "RS512": {
|
|
41
|
+
if (!o(t.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
42
|
+
throw r("RSASSA-PKCS1-v1_5");
|
|
43
|
+
const a = parseInt(e.slice(2), 10);
|
|
44
|
+
if (c(t.algorithm.hash) !== a)
|
|
45
|
+
throw r(`SHA-${a}`, "algorithm.hash");
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case "PS256":
|
|
49
|
+
case "PS384":
|
|
50
|
+
case "PS512": {
|
|
51
|
+
if (!o(t.algorithm, "RSA-PSS"))
|
|
52
|
+
throw r("RSA-PSS");
|
|
53
|
+
const a = parseInt(e.slice(2), 10);
|
|
54
|
+
if (c(t.algorithm.hash) !== a)
|
|
55
|
+
throw r(`SHA-${a}`, "algorithm.hash");
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
case "Ed25519":
|
|
59
|
+
case "EdDSA": {
|
|
60
|
+
if (!o(t.algorithm, "Ed25519"))
|
|
61
|
+
throw r("Ed25519");
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case "ES256":
|
|
65
|
+
case "ES384":
|
|
66
|
+
case "ES512": {
|
|
67
|
+
if (!o(t.algorithm, "ECDSA"))
|
|
68
|
+
throw r("ECDSA");
|
|
69
|
+
const a = h(e);
|
|
70
|
+
if (t.algorithm.namedCurve !== a)
|
|
71
|
+
throw r(a, "algorithm.namedCurve");
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
default:
|
|
75
|
+
throw new TypeError("CryptoKey does not support this operation");
|
|
76
|
+
}
|
|
77
|
+
i(t, n);
|
|
14
78
|
}
|
|
15
79
|
export {
|
|
16
|
-
|
|
80
|
+
u as checkSigCryptoKey
|
|
17
81
|
};
|