@coinbase/cdp-core 0.0.121 → 0.0.122
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.web.js +110 -100
- package/dist/esm/index.web10.js +4 -4
- package/dist/esm/index.web100.js +86 -41
- package/dist/esm/index.web101.js +31 -13
- package/dist/esm/index.web102.js +25 -24
- package/dist/esm/index.web103.js +45 -15
- package/dist/esm/index.web104.js +3 -25
- package/dist/esm/index.web105.js +42 -20
- package/dist/esm/index.web106.js +13 -16
- package/dist/esm/index.web107.js +23 -28
- package/dist/esm/index.web108.js +14 -40
- package/dist/esm/index.web109.js +24 -48
- package/dist/esm/index.web11.js +1 -1
- package/dist/esm/index.web110.js +21 -81
- package/dist/esm/index.web111.js +15 -24
- package/dist/esm/index.web112.js +28 -158
- package/dist/esm/index.web113.js +39 -46
- package/dist/esm/index.web114.js +49 -28
- package/dist/esm/index.web115.js +77 -68
- package/dist/esm/index.web116.js +25 -8
- package/dist/esm/index.web117.js +156 -114
- package/dist/esm/index.web118.js +30 -119
- package/dist/esm/index.web119.js +24 -65
- package/dist/esm/index.web12.js +1 -1
- package/dist/esm/index.web120.js +72 -26
- package/dist/esm/index.web121.js +11 -33
- package/dist/esm/index.web122.js +9 -24
- package/dist/esm/index.web123.js +100 -47
- package/dist/esm/index.web124.js +137 -24
- package/dist/esm/index.web125.js +69 -51
- package/dist/esm/index.web126.js +26 -20
- package/dist/esm/index.web127.js +32 -152
- package/dist/esm/index.web128.js +24 -17
- package/dist/esm/index.web129.js +63 -21
- package/dist/esm/index.web13.js +3 -3
- package/dist/esm/index.web130.js +24 -51
- package/dist/esm/index.web131.js +48 -374
- package/dist/esm/index.web132.js +21 -29
- package/dist/esm/index.web133.js +152 -28
- package/dist/esm/index.web134.js +379 -2
- package/dist/esm/index.web135.js +28 -65
- package/dist/esm/index.web136.js +28 -364
- package/dist/esm/index.web137.js +2 -947
- package/dist/esm/index.web138.js +66 -2
- package/dist/esm/index.web139.js +364 -49
- package/dist/esm/index.web140.js +16 -26
- package/dist/esm/index.web141.js +21 -53
- package/dist/esm/index.web142.js +49 -9
- package/dist/esm/index.web143.js +5 -2
- package/dist/esm/index.web144.js +945 -45
- package/dist/esm/index.web145.js +2 -14
- package/dist/esm/index.web146.js +48 -11
- package/dist/esm/index.web147.js +26 -11
- package/dist/esm/index.web148.js +5 -5
- package/dist/esm/index.web149.js +48 -5
- package/dist/esm/index.web15.js +1 -1
- package/dist/esm/index.web150.js +50 -43
- package/dist/esm/index.web151.js +10 -14
- package/dist/esm/index.web152.js +2 -29
- package/dist/esm/index.web153.js +45 -8
- package/dist/esm/index.web154.js +13 -3
- package/dist/esm/index.web155.js +8 -22
- package/dist/esm/index.web156.js +28 -8
- package/dist/esm/index.web157.js +6 -6
- package/dist/esm/index.web158.js +3 -80
- package/dist/esm/index.web159.js +18 -18
- package/dist/esm/index.web16.js +1 -1
- package/dist/esm/index.web160.js +8 -3
- package/dist/esm/index.web161.js +7 -15
- package/dist/esm/index.web162.js +80 -4
- package/dist/esm/index.web163.js +21 -7
- package/dist/esm/index.web164.js +3 -19
- package/dist/esm/index.web165.js +8 -54
- package/dist/esm/index.web166.js +4 -17
- package/dist/esm/index.web167.js +14 -23
- package/dist/esm/index.web168.js +19 -8
- package/dist/esm/index.web169.js +47 -28
- package/dist/esm/index.web17.js +1 -1
- package/dist/esm/index.web170.js +17 -7
- package/dist/esm/index.web171.js +18 -15
- package/dist/esm/index.web172.js +8 -13
- package/dist/esm/index.web173.js +40 -53
- package/dist/esm/index.web174.js +7 -6
- package/dist/esm/index.web175.js +19 -20
- package/dist/esm/index.web176.js +11 -16
- package/dist/esm/index.web177.js +11 -45
- package/dist/esm/index.web178.js +2 -4
- package/dist/esm/index.web179.js +2 -4
- package/dist/esm/index.web18.js +2 -2
- package/dist/esm/index.web180.js +13 -34
- package/dist/esm/index.web181.js +53 -10
- package/dist/esm/index.web182.js +6 -4
- package/dist/esm/index.web183.js +21 -28
- package/dist/esm/index.web184.js +17 -6
- package/dist/esm/index.web185.js +42 -29
- package/dist/esm/index.web186.js +3 -12
- package/dist/esm/index.web187.js +3 -55
- package/dist/esm/index.web188.js +32 -40
- package/dist/esm/index.web189.js +11 -126
- package/dist/esm/index.web19.js +2 -2
- package/dist/esm/index.web190.js +4 -104
- package/dist/esm/index.web191.js +28 -6
- package/dist/esm/index.web192.js +7 -3
- package/dist/esm/index.web193.js +30 -76
- package/dist/esm/index.web194.js +13 -2
- package/dist/esm/index.web195.js +56 -2
- package/dist/esm/index.web196.js +39 -34
- package/dist/esm/index.web197.js +126 -5
- package/dist/esm/index.web198.js +101 -31
- package/dist/esm/index.web199.js +6 -14
- package/dist/esm/index.web2.js +2 -2
- package/dist/esm/index.web20.js +7 -7
- package/dist/esm/index.web200.js +3 -35
- package/dist/esm/index.web201.js +77 -17
- package/dist/esm/index.web202.js +2 -9
- package/dist/esm/index.web203.js +2 -11
- package/dist/esm/index.web204.js +37 -11
- package/dist/esm/index.web205.js +6 -13
- package/dist/esm/index.web206.js +34 -5
- package/dist/esm/index.web207.js +15 -5
- package/dist/esm/index.web208.js +34 -10
- package/dist/esm/index.web209.js +19 -2
- package/dist/esm/index.web21.js +1 -1
- package/dist/esm/index.web210.js +9 -2
- package/dist/esm/index.web211.js +9 -19
- package/dist/esm/index.web212.js +12 -10
- package/dist/esm/index.web213.js +14 -20
- package/dist/esm/index.web214.js +6 -94
- package/dist/esm/index.web215.js +4 -20
- package/dist/esm/index.web216.js +11 -118
- package/dist/esm/index.web217.js +106 -101
- package/dist/esm/index.web218.js +2 -79
- package/dist/esm/index.web219.js +2 -79
- package/dist/esm/index.web220.js +21 -2
- package/dist/esm/index.web221.js +10 -109
- package/dist/esm/index.web222.js +20 -2
- package/dist/esm/index.web223.js +94 -8
- package/dist/esm/index.web224.js +21 -2
- package/dist/esm/index.web225.js +110 -353
- package/dist/esm/index.web226.js +103 -852
- package/dist/esm/index.web227.js +77 -37
- package/dist/esm/index.web228.js +79 -2
- package/dist/esm/index.web229.js +36 -67
- package/dist/esm/index.web230.js +2 -35
- package/dist/esm/index.web231.js +69 -14
- package/dist/esm/index.web232.js +34 -46
- package/dist/esm/index.web233.js +12 -18
- package/dist/esm/index.web234.js +8 -2
- package/dist/esm/index.web235.js +2 -20
- package/dist/esm/index.web236.js +356 -28
- package/dist/esm/index.web237.js +852 -6
- package/dist/esm/index.web238.js +45 -16
- package/dist/esm/index.web239.js +20 -27
- package/dist/esm/index.web240.js +2 -8
- package/dist/esm/index.web241.js +19 -10
- package/dist/esm/index.web242.js +32 -12
- package/dist/esm/index.web243.js +6 -9
- package/dist/esm/index.web244.js +15 -14
- package/dist/esm/index.web245.js +25 -78
- package/dist/esm/index.web246.js +8 -2
- package/dist/esm/index.web247.js +11 -2
- package/dist/esm/index.web248.js +13 -2
- package/dist/esm/index.web249.js +8 -2
- package/dist/esm/index.web250.js +17 -5
- package/dist/esm/index.web251.js +80 -14
- package/dist/esm/index.web252.js +2 -79
- package/dist/esm/index.web253.js +6 -0
- package/dist/esm/index.web254.js +4 -0
- package/dist/esm/index.web255.js +4 -0
- package/dist/esm/index.web256.js +7 -0
- package/dist/esm/index.web257.js +81 -0
- package/dist/esm/index.web258.js +17 -0
- package/dist/esm/index.web28.js +5 -5
- package/dist/esm/index.web29.js +6 -6
- package/dist/esm/index.web3.js +1 -1
- package/dist/esm/index.web30.js +5 -5
- package/dist/esm/index.web31.js +5 -5
- package/dist/esm/index.web32.js +5 -5
- package/dist/esm/index.web33.js +5 -5
- package/dist/esm/index.web34.js +6 -6
- package/dist/esm/index.web35.js +5 -5
- package/dist/esm/index.web36.js +5 -5
- package/dist/esm/index.web37.js +1 -1
- package/dist/esm/index.web38.js +5 -5
- package/dist/esm/index.web39.js +5 -5
- package/dist/esm/index.web4.js +1 -1
- package/dist/esm/index.web40.js +6 -6
- package/dist/esm/index.web41.js +1 -1
- package/dist/esm/index.web42.js +5 -5
- package/dist/esm/index.web43.js +5 -5
- package/dist/esm/index.web45.js +2 -2
- package/dist/esm/index.web46.js +1 -1
- package/dist/esm/index.web49.js +4 -4
- package/dist/esm/index.web50.js +1 -1
- package/dist/esm/index.web52.js +3 -3
- package/dist/esm/index.web53.js +3 -3
- package/dist/esm/index.web54.js +2 -2
- package/dist/esm/index.web55.js +1 -1
- package/dist/esm/index.web57.js +3 -3
- package/dist/esm/index.web58.js +1 -1
- package/dist/esm/index.web59.js +2 -2
- package/dist/esm/index.web6.js +1 -1
- package/dist/esm/index.web60.js +4 -4
- package/dist/esm/index.web61.js +2 -2
- package/dist/esm/index.web62.js +3 -3
- package/dist/esm/index.web63.js +3 -3
- package/dist/esm/index.web64.js +3 -3
- package/dist/esm/index.web65.js +5 -5
- package/dist/esm/index.web66.js +5 -5
- package/dist/esm/index.web67.js +5 -5
- package/dist/esm/index.web68.js +5 -5
- package/dist/esm/index.web70.js +3 -3
- package/dist/esm/index.web71.js +9 -9
- package/dist/esm/index.web75.js +2 -2
- package/dist/esm/index.web76.js +3 -3
- package/dist/esm/index.web77.js +12 -12
- package/dist/esm/index.web78.js +1 -1
- package/dist/esm/index.web79.js +1 -1
- package/dist/esm/index.web80.js +1 -1
- package/dist/esm/index.web81.js +55 -19
- package/dist/esm/index.web82.js +62 -47
- package/dist/esm/index.web83.js +6 -40
- package/dist/esm/index.web84.js +17 -17
- package/dist/esm/index.web85.js +18 -349
- package/dist/esm/index.web86.js +47 -17
- package/dist/esm/index.web87.js +35 -127
- package/dist/esm/index.web88.js +18 -87
- package/dist/esm/index.web89.js +353 -6
- package/dist/esm/index.web9.js +1 -1
- package/dist/esm/index.web90.js +17 -54
- package/dist/esm/index.web91.js +125 -155
- package/dist/esm/index.web92.js +82 -61
- package/dist/esm/index.web93.js +7 -36
- package/dist/esm/index.web94.js +49 -99
- package/dist/esm/index.web95.js +156 -36
- package/dist/esm/index.web96.js +65 -29
- package/dist/esm/index.web97.js +36 -26
- package/dist/esm/index.web98.js +106 -45
- package/dist/esm/index.web99.js +43 -3
- package/dist/native/index.native11.js +1 -1
- package/dist/native/index.native110.js +3 -3
- package/dist/native/index.native113.js +2 -2
- package/dist/native/index.native117.js +3 -3
- package/dist/native/index.native129.js +12 -12
- package/dist/native/index.native130.js +2 -2
- package/dist/native/index.native131.js +13 -373
- package/dist/native/index.native132.js +25 -2
- package/dist/native/index.native133.js +48 -63
- package/dist/native/index.native134.js +189 -177
- package/dist/native/index.native135.js +2 -31
- package/dist/native/index.native136.js +65 -28
- package/dist/native/index.native137.js +360 -12
- package/dist/native/index.native138.js +28 -22
- package/dist/native/index.native139.js +28 -50
- package/dist/native/index.native144.js +2 -2
- package/dist/native/index.native146.js +13 -36
- package/dist/native/index.native147.js +11 -67
- package/dist/native/index.native148.js +36 -5
- package/dist/native/index.native149.js +66 -11
- package/dist/native/index.native150.js +4 -11
- package/dist/native/index.native151.js +7 -7
- package/dist/native/index.native158.js +13 -13
- package/dist/native/index.native159.js +54 -26
- package/dist/native/index.native160.js +6 -7
- package/dist/native/index.native161.js +21 -3
- package/dist/native/index.native162.js +16 -26
- package/dist/native/index.native163.js +45 -8
- package/dist/native/index.native164.js +3 -7
- package/dist/native/index.native165.js +3 -79
- package/dist/native/index.native166.js +32 -25
- package/dist/native/index.native167.js +12 -3
- package/dist/native/index.native168.js +4 -14
- package/dist/native/index.native169.js +28 -4
- package/dist/native/index.native170.js +6 -13
- package/dist/native/index.native171.js +31 -18
- package/dist/native/index.native172.js +9 -57
- package/dist/native/index.native173.js +55 -17
- package/dist/native/index.native174.js +41 -22
- package/dist/native/index.native175.js +127 -8
- package/dist/native/index.native176.js +102 -39
- package/dist/native/index.native177.js +6 -7
- package/dist/native/index.native178.js +3 -21
- package/dist/native/index.native179.js +78 -13
- package/dist/native/index.native180.js +2 -56
- package/dist/native/index.native181.js +2 -7
- package/dist/native/index.native182.js +34 -18
- package/dist/native/index.native183.js +5 -16
- package/dist/native/index.native184.js +31 -42
- package/dist/native/index.native185.js +14 -3
- package/dist/native/index.native186.js +34 -3
- package/dist/native/index.native187.js +17 -33
- package/dist/native/index.native188.js +8 -12
- package/dist/native/index.native189.js +10 -4
- package/dist/native/index.native190.js +11 -28
- package/dist/native/index.native191.js +13 -6
- package/dist/native/index.native192.js +5 -32
- package/dist/native/index.native193.js +5 -13
- package/dist/native/index.native194.js +10 -55
- package/dist/native/index.native195.js +13 -42
- package/dist/native/index.native196.js +26 -126
- package/dist/native/index.native197.js +7 -104
- package/dist/native/index.native198.js +3 -6
- package/dist/native/index.native199.js +28 -3
- package/dist/native/index.native200.js +8 -78
- package/dist/native/index.native201.js +8 -2
- package/dist/native/index.native202.js +80 -2
- package/dist/native/index.native203.js +25 -35
- package/dist/native/index.native204.js +3 -6
- package/dist/native/index.native205.js +14 -34
- package/dist/native/index.native206.js +4 -14
- package/dist/native/index.native207.js +13 -34
- package/dist/native/index.native208.js +18 -17
- package/dist/native/index.native209.js +60 -8
- package/dist/native/index.native210.js +17 -10
- package/dist/native/index.native211.js +23 -11
- package/dist/native/index.native212.js +8 -13
- package/dist/native/index.native213.js +41 -5
- package/dist/native/index.native214.js +8 -5
- package/dist/native/index.native215.js +20 -10
- package/dist/native/index.native216.js +104 -2
- package/dist/native/index.native217.js +77 -107
- package/dist/native/index.native218.js +79 -2
- package/dist/native/index.native219.js +2 -39
- package/dist/native/index.native220.js +109 -2
- package/dist/native/index.native221.js +2 -70
- package/dist/native/index.native222.js +20 -34
- package/dist/native/index.native223.js +10 -15
- package/dist/native/index.native224.js +20 -8
- package/dist/native/index.native225.js +94 -2
- package/dist/native/index.native226.js +21 -361
- package/dist/native/index.native227.js +118 -853
- package/dist/native/index.native228.js +38 -103
- package/dist/native/index.native229.js +2 -79
- package/dist/native/index.native230.js +69 -78
- package/dist/native/index.native231.js +34 -20
- package/dist/native/index.native232.js +15 -10
- package/dist/native/index.native233.js +8 -20
- package/dist/native/index.native234.js +2 -94
- package/dist/native/index.native235.js +361 -21
- package/dist/native/index.native236.js +853 -118
- package/dist/native/index.native237.js +1 -1
- package/dist/native/index.native240.js +5 -5
- package/dist/native/index.native241.js +2 -2
- package/dist/native/index.native242.js +3 -46
- package/dist/native/index.native243.js +46 -3
- package/dist/native/index.native244.js +2 -2
- package/dist/native/index.native245.js +2 -2
- package/dist/native/index.native246.js +2 -2
- package/dist/native/index.native248.js +1 -1
- package/dist/native/index.native250.js +1 -1
- package/dist/native/index.native254.js +1 -1
- package/dist/native/index.native256.js +78 -14
- package/dist/native/index.native257.js +14 -78
- package/dist/native/index.native3.js +1 -1
- package/dist/native/index.native79.js +12 -12
- package/dist/native/index.native84.js +12 -9
- package/dist/native/index.native90.js +4 -2
- package/dist/native-types/actions/deletePasskey.d.ts +21 -0
- package/dist/native-types/actions/enrollPasskey.d.ts +44 -0
- package/dist/native-types/actions/listPasskeys.d.ts +16 -0
- package/dist/native-types/actions/verifyPasskey.d.ts +30 -0
- package/dist/native-types/errors.d.ts +10 -2
- package/dist/native-types/index.web.d.ts +5 -0
- package/dist/native-types/mfa/utils.d.ts +3 -3
- package/dist/native-types/shared/base64url.d.ts +21 -0
- package/dist/native-types/shared/webauthn.d.ts +121 -0
- package/dist/native-types/types.d.ts +4 -2
- package/dist/native-types/version.d.ts +1 -1
- package/dist/types/actions/deletePasskey.d.ts +21 -0
- package/dist/types/actions/enrollPasskey.d.ts +44 -0
- package/dist/types/actions/listPasskeys.d.ts +16 -0
- package/dist/types/actions/verifyPasskey.d.ts +30 -0
- package/dist/types/errors.d.ts +10 -2
- package/dist/types/index.web.d.ts +5 -0
- package/dist/types/mfa/utils.d.ts +3 -3
- package/dist/types/shared/base64url.d.ts +21 -0
- package/dist/types/shared/webauthn.d.ts +121 -0
- package/dist/types/types.d.ts +4 -2
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index.web.js +110 -100
- package/dist/web/index.web10.js +4 -4
- package/dist/web/index.web100.js +86 -41
- package/dist/web/index.web101.js +31 -13
- package/dist/web/index.web102.js +25 -24
- package/dist/web/index.web103.js +45 -15
- package/dist/web/index.web104.js +3 -25
- package/dist/web/index.web105.js +42 -20
- package/dist/web/index.web106.js +13 -16
- package/dist/web/index.web107.js +23 -28
- package/dist/web/index.web108.js +14 -40
- package/dist/web/index.web109.js +24 -48
- package/dist/web/index.web11.js +1 -1
- package/dist/web/index.web110.js +21 -81
- package/dist/web/index.web111.js +15 -24
- package/dist/web/index.web112.js +28 -158
- package/dist/web/index.web113.js +39 -46
- package/dist/web/index.web114.js +49 -28
- package/dist/web/index.web115.js +77 -68
- package/dist/web/index.web116.js +25 -8
- package/dist/web/index.web117.js +156 -114
- package/dist/web/index.web118.js +30 -119
- package/dist/web/index.web119.js +24 -65
- package/dist/web/index.web12.js +1 -1
- package/dist/web/index.web120.js +72 -26
- package/dist/web/index.web121.js +11 -33
- package/dist/web/index.web122.js +9 -24
- package/dist/web/index.web123.js +100 -47
- package/dist/web/index.web124.js +137 -24
- package/dist/web/index.web125.js +69 -51
- package/dist/web/index.web126.js +26 -20
- package/dist/web/index.web127.js +32 -152
- package/dist/web/index.web128.js +24 -17
- package/dist/web/index.web129.js +63 -21
- package/dist/web/index.web13.js +3 -3
- package/dist/web/index.web130.js +24 -51
- package/dist/web/index.web131.js +48 -374
- package/dist/web/index.web132.js +21 -29
- package/dist/web/index.web133.js +152 -28
- package/dist/web/index.web134.js +379 -2
- package/dist/web/index.web135.js +28 -65
- package/dist/web/index.web136.js +28 -364
- package/dist/web/index.web137.js +2 -947
- package/dist/web/index.web138.js +66 -2
- package/dist/web/index.web139.js +364 -49
- package/dist/web/index.web140.js +16 -26
- package/dist/web/index.web141.js +21 -53
- package/dist/web/index.web142.js +49 -9
- package/dist/web/index.web143.js +5 -2
- package/dist/web/index.web144.js +945 -45
- package/dist/web/index.web145.js +2 -14
- package/dist/web/index.web146.js +48 -11
- package/dist/web/index.web147.js +26 -11
- package/dist/web/index.web148.js +5 -5
- package/dist/web/index.web149.js +48 -5
- package/dist/web/index.web15.js +1 -1
- package/dist/web/index.web150.js +50 -43
- package/dist/web/index.web151.js +10 -14
- package/dist/web/index.web152.js +2 -29
- package/dist/web/index.web153.js +45 -8
- package/dist/web/index.web154.js +13 -3
- package/dist/web/index.web155.js +8 -22
- package/dist/web/index.web156.js +28 -8
- package/dist/web/index.web157.js +6 -6
- package/dist/web/index.web158.js +3 -80
- package/dist/web/index.web159.js +18 -18
- package/dist/web/index.web16.js +1 -1
- package/dist/web/index.web160.js +8 -3
- package/dist/web/index.web161.js +7 -15
- package/dist/web/index.web162.js +80 -4
- package/dist/web/index.web163.js +21 -7
- package/dist/web/index.web164.js +3 -19
- package/dist/web/index.web165.js +8 -54
- package/dist/web/index.web166.js +4 -17
- package/dist/web/index.web167.js +14 -23
- package/dist/web/index.web168.js +19 -8
- package/dist/web/index.web169.js +47 -28
- package/dist/web/index.web17.js +1 -1
- package/dist/web/index.web170.js +17 -7
- package/dist/web/index.web171.js +18 -15
- package/dist/web/index.web172.js +8 -13
- package/dist/web/index.web173.js +40 -53
- package/dist/web/index.web174.js +7 -6
- package/dist/web/index.web175.js +19 -20
- package/dist/web/index.web176.js +11 -16
- package/dist/web/index.web177.js +11 -45
- package/dist/web/index.web178.js +2 -4
- package/dist/web/index.web179.js +2 -4
- package/dist/web/index.web18.js +2 -2
- package/dist/web/index.web180.js +13 -34
- package/dist/web/index.web181.js +53 -10
- package/dist/web/index.web182.js +6 -4
- package/dist/web/index.web183.js +21 -28
- package/dist/web/index.web184.js +17 -6
- package/dist/web/index.web185.js +42 -29
- package/dist/web/index.web186.js +3 -12
- package/dist/web/index.web187.js +3 -55
- package/dist/web/index.web188.js +32 -40
- package/dist/web/index.web189.js +11 -126
- package/dist/web/index.web19.js +2 -2
- package/dist/web/index.web190.js +4 -104
- package/dist/web/index.web191.js +28 -6
- package/dist/web/index.web192.js +7 -3
- package/dist/web/index.web193.js +30 -76
- package/dist/web/index.web194.js +13 -2
- package/dist/web/index.web195.js +56 -2
- package/dist/web/index.web196.js +39 -34
- package/dist/web/index.web197.js +126 -5
- package/dist/web/index.web198.js +101 -31
- package/dist/web/index.web199.js +6 -14
- package/dist/web/index.web2.js +2 -2
- package/dist/web/index.web20.js +7 -7
- package/dist/web/index.web200.js +3 -35
- package/dist/web/index.web201.js +77 -17
- package/dist/web/index.web202.js +2 -9
- package/dist/web/index.web203.js +2 -11
- package/dist/web/index.web204.js +37 -11
- package/dist/web/index.web205.js +6 -13
- package/dist/web/index.web206.js +34 -5
- package/dist/web/index.web207.js +15 -5
- package/dist/web/index.web208.js +34 -10
- package/dist/web/index.web209.js +19 -2
- package/dist/web/index.web21.js +1 -1
- package/dist/web/index.web210.js +9 -2
- package/dist/web/index.web211.js +9 -19
- package/dist/web/index.web212.js +12 -10
- package/dist/web/index.web213.js +14 -20
- package/dist/web/index.web214.js +6 -94
- package/dist/web/index.web215.js +4 -20
- package/dist/web/index.web216.js +11 -118
- package/dist/web/index.web217.js +106 -101
- package/dist/web/index.web218.js +2 -79
- package/dist/web/index.web219.js +2 -79
- package/dist/web/index.web220.js +21 -2
- package/dist/web/index.web221.js +10 -109
- package/dist/web/index.web222.js +20 -2
- package/dist/web/index.web223.js +94 -8
- package/dist/web/index.web224.js +21 -2
- package/dist/web/index.web225.js +110 -353
- package/dist/web/index.web226.js +103 -852
- package/dist/web/index.web227.js +77 -37
- package/dist/web/index.web228.js +79 -2
- package/dist/web/index.web229.js +36 -67
- package/dist/web/index.web230.js +2 -35
- package/dist/web/index.web231.js +69 -14
- package/dist/web/index.web232.js +34 -46
- package/dist/web/index.web233.js +12 -18
- package/dist/web/index.web234.js +8 -2
- package/dist/web/index.web235.js +2 -20
- package/dist/web/index.web236.js +356 -28
- package/dist/web/index.web237.js +852 -6
- package/dist/web/index.web238.js +45 -16
- package/dist/web/index.web239.js +20 -27
- package/dist/web/index.web240.js +2 -8
- package/dist/web/index.web241.js +19 -10
- package/dist/web/index.web242.js +32 -12
- package/dist/web/index.web243.js +6 -9
- package/dist/web/index.web244.js +15 -14
- package/dist/web/index.web245.js +25 -78
- package/dist/web/index.web246.js +8 -2
- package/dist/web/index.web247.js +11 -2
- package/dist/web/index.web248.js +13 -2
- package/dist/web/index.web249.js +8 -2
- package/dist/web/index.web250.js +17 -5
- package/dist/web/index.web251.js +80 -14
- package/dist/web/index.web252.js +2 -79
- package/dist/web/index.web253.js +6 -0
- package/dist/web/index.web254.js +4 -0
- package/dist/web/index.web255.js +4 -0
- package/dist/web/index.web256.js +7 -0
- package/dist/web/index.web257.js +81 -0
- package/dist/web/index.web258.js +17 -0
- package/dist/web/index.web28.js +5 -5
- package/dist/web/index.web29.js +6 -6
- package/dist/web/index.web3.js +1 -1
- package/dist/web/index.web30.js +5 -5
- package/dist/web/index.web31.js +5 -5
- package/dist/web/index.web32.js +5 -5
- package/dist/web/index.web33.js +5 -5
- package/dist/web/index.web34.js +6 -6
- package/dist/web/index.web35.js +5 -5
- package/dist/web/index.web36.js +5 -5
- package/dist/web/index.web37.js +1 -1
- package/dist/web/index.web38.js +5 -5
- package/dist/web/index.web39.js +5 -5
- package/dist/web/index.web4.js +1 -1
- package/dist/web/index.web40.js +6 -6
- package/dist/web/index.web41.js +1 -1
- package/dist/web/index.web42.js +5 -5
- package/dist/web/index.web43.js +5 -5
- package/dist/web/index.web45.js +2 -2
- package/dist/web/index.web46.js +1 -1
- package/dist/web/index.web49.js +4 -4
- package/dist/web/index.web50.js +1 -1
- package/dist/web/index.web52.js +3 -3
- package/dist/web/index.web53.js +3 -3
- package/dist/web/index.web54.js +2 -2
- package/dist/web/index.web55.js +1 -1
- package/dist/web/index.web57.js +3 -3
- package/dist/web/index.web58.js +1 -1
- package/dist/web/index.web59.js +2 -2
- package/dist/web/index.web6.js +1 -1
- package/dist/web/index.web60.js +4 -4
- package/dist/web/index.web61.js +2 -2
- package/dist/web/index.web62.js +3 -3
- package/dist/web/index.web63.js +3 -3
- package/dist/web/index.web64.js +3 -3
- package/dist/web/index.web65.js +5 -5
- package/dist/web/index.web66.js +5 -5
- package/dist/web/index.web67.js +5 -5
- package/dist/web/index.web68.js +5 -5
- package/dist/web/index.web70.js +3 -3
- package/dist/web/index.web71.js +9 -9
- package/dist/web/index.web75.js +2 -2
- package/dist/web/index.web76.js +3 -3
- package/dist/web/index.web77.js +12 -12
- package/dist/web/index.web78.js +1 -1
- package/dist/web/index.web79.js +1 -1
- package/dist/web/index.web80.js +1 -1
- package/dist/web/index.web81.js +55 -19
- package/dist/web/index.web82.js +62 -47
- package/dist/web/index.web83.js +6 -40
- package/dist/web/index.web84.js +17 -17
- package/dist/web/index.web85.js +18 -349
- package/dist/web/index.web86.js +47 -17
- package/dist/web/index.web87.js +35 -127
- package/dist/web/index.web88.js +18 -87
- package/dist/web/index.web89.js +353 -6
- package/dist/web/index.web9.js +1 -1
- package/dist/web/index.web90.js +17 -54
- package/dist/web/index.web91.js +125 -155
- package/dist/web/index.web92.js +82 -61
- package/dist/web/index.web93.js +7 -36
- package/dist/web/index.web94.js +49 -99
- package/dist/web/index.web95.js +156 -36
- package/dist/web/index.web96.js +65 -29
- package/dist/web/index.web97.js +36 -26
- package/dist/web/index.web98.js +106 -45
- package/dist/web/index.web99.js +43 -3
- package/dist/web-types/actions/deletePasskey.d.ts +21 -0
- package/dist/web-types/actions/enrollPasskey.d.ts +44 -0
- package/dist/web-types/actions/listPasskeys.d.ts +16 -0
- package/dist/web-types/actions/verifyPasskey.d.ts +30 -0
- package/dist/web-types/errors.d.ts +10 -2
- package/dist/web-types/index.web.d.ts +5 -0
- package/dist/web-types/mfa/utils.d.ts +3 -3
- package/dist/web-types/shared/base64url.d.ts +21 -0
- package/dist/web-types/shared/webauthn.d.ts +121 -0
- package/dist/web-types/types.d.ts +4 -2
- package/dist/web-types/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { maxBytesPerTransaction as y, bytesPerBlob as a, fieldElementsPerBlob as f, bytesPerFieldElement as p } from "./index.native255.js";
|
|
2
|
-
import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./index.
|
|
3
|
-
import { createCursor as B } from "./index.
|
|
4
|
-
import { size as u } from "./index.
|
|
5
|
-
import { hexToBytes as x } from "./index.
|
|
6
|
-
import { bytesToHex as d } from "./index.
|
|
2
|
+
import { EmptyBlobError as c, BlobSizeTooLargeError as h } from "./index.native182.js";
|
|
3
|
+
import { createCursor as B } from "./index.native175.js";
|
|
4
|
+
import { size as u } from "./index.native168.js";
|
|
5
|
+
import { hexToBytes as x } from "./index.native159.js";
|
|
6
|
+
import { bytesToHex as d } from "./index.native163.js";
|
|
7
7
|
function S(e) {
|
|
8
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
9
|
if (!o)
|
|
@@ -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.native163.js";
|
|
2
|
+
import { sha256 as m } from "./index.native177.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);
|
|
@@ -1,49 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
}
|
|
1
|
+
function e(t) {
|
|
2
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
43
3
|
}
|
|
44
4
|
export {
|
|
45
|
-
|
|
46
|
-
p as SizeExceedsPaddingSizeError,
|
|
47
|
-
m as fromNumber,
|
|
48
|
-
c as padLeft
|
|
5
|
+
e as getDefaultExportFromCjs
|
|
49
6
|
};
|
|
@@ -1,6 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { BaseError as f } from "./index.native136.js";
|
|
2
|
+
import { pad as g } from "./index.native257.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
|
+
}
|
|
3
43
|
}
|
|
4
44
|
export {
|
|
5
|
-
|
|
45
|
+
d as IntegerOutOfRangeError,
|
|
46
|
+
p as SizeExceedsPaddingSizeError,
|
|
47
|
+
m as fromNumber,
|
|
48
|
+
c as padLeft
|
|
6
49
|
};
|
|
@@ -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
|
};
|
|
@@ -1,81 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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);
|
|
1
|
+
import { SizeExceedsPaddingSizeError as a } from "./index.native243.js";
|
|
2
|
+
function o(r, i = {}) {
|
|
3
|
+
const { dir: n, size: e = 32 } = i;
|
|
4
|
+
if (e === 0)
|
|
5
|
+
return r;
|
|
6
|
+
const t = r.replace("0x", "");
|
|
7
|
+
if (t.length > e * 2)
|
|
8
|
+
throw new a({
|
|
9
|
+
size: Math.ceil(t.length / 2),
|
|
10
|
+
targetSize: e,
|
|
11
|
+
type: "Hex"
|
|
12
|
+
});
|
|
13
|
+
return `0x${t[n === "right" ? "padEnd" : "padStart"](e * 2, "0")}`;
|
|
78
14
|
}
|
|
79
15
|
export {
|
|
80
|
-
|
|
16
|
+
o as pad
|
|
81
17
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { __require as r } from "./index.
|
|
1
|
+
import { __require as r } from "./index.native233.js";
|
|
2
2
|
r();
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { submitMfaEnrollment as
|
|
2
|
-
import { Analytics as
|
|
1
|
+
import { submitMfaEnrollment as u } from "@coinbase/cdp-api-client";
|
|
2
|
+
import { Analytics as i } from "./index.native2.js";
|
|
3
3
|
import "./index.native3.js";
|
|
4
|
-
import { toAuthStateUser as
|
|
5
|
-
import { withAuth as
|
|
6
|
-
import { mockUser as
|
|
7
|
-
import { validateUserAuthState as
|
|
4
|
+
import { toAuthStateUser as f } from "./index.native104.js";
|
|
5
|
+
import { withAuth as c } from "./index.native99.js";
|
|
6
|
+
import { mockUser as l } from "./index.native109.js";
|
|
7
|
+
import { validateUserAuthState as h } from "./index.native105.js";
|
|
8
8
|
import { getConfig as o, getCoreAuthManager as p } from "./index.native76.js";
|
|
9
9
|
const E = async (e) => {
|
|
10
|
-
if (
|
|
10
|
+
if (i.sendActionCallEvent({ name: "submit_mfa_enrollment" }), o().useMock)
|
|
11
11
|
return {
|
|
12
|
-
user:
|
|
12
|
+
user: l
|
|
13
13
|
};
|
|
14
|
-
const t = p(), { authState:
|
|
15
|
-
|
|
14
|
+
const t = p(), { authState: a } = h(t.getUser(), t.getAuthState()), m = await c({}, t, async ({ user: s }) => u(
|
|
15
|
+
s.userId,
|
|
16
16
|
e.mfaMethod,
|
|
17
17
|
{
|
|
18
18
|
mfaCode: e.mfaCode
|
|
19
19
|
},
|
|
20
20
|
{ projectID: o().projectId },
|
|
21
21
|
e.idempotencyKey
|
|
22
|
-
)), r =
|
|
23
|
-
return await t.setAuthState({ ...
|
|
22
|
+
)), r = f(m.endUser), n = t.getAuthState() ?? a;
|
|
23
|
+
return await t.setAuthState({ ...n, user: r }), { user: r };
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
26
|
E as submitMfaEnrollment
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { getMfaConfigState as f } from "./index.native76.js";
|
|
2
2
|
import "@coinbase/cdp-api-client";
|
|
3
3
|
import "viem";
|
|
4
|
-
const r = ["totp", "sms"], o = (t, e) => {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const r = ["totp", "sms", "passkey"], s = (t) => !!t && Date.now() > new Date(t).getTime(), o = (t, e) => {
|
|
5
|
+
if (e === "passkey") {
|
|
6
|
+
const n = t.mfaMethods.passkey;
|
|
7
|
+
return Array.isArray(n) && n.some((a) => s(a.enrolledAt));
|
|
8
|
+
}
|
|
9
|
+
return s(t.mfaMethods[e]?.enrolledAt);
|
|
7
10
|
};
|
|
8
|
-
function
|
|
11
|
+
function M(t) {
|
|
9
12
|
return t.mfaMethods ? r.filter((e) => o(t, e)) : [];
|
|
10
13
|
}
|
|
11
|
-
function
|
|
14
|
+
function c(t, e) {
|
|
12
15
|
return e ? o(t, e) : t.mfaMethods ? r.some((n) => o(t, n)) : !1;
|
|
13
16
|
}
|
|
14
|
-
function
|
|
17
|
+
function m() {
|
|
15
18
|
const t = f(), e = r.filter((n) => t?.[`${n}Config`]?.enabled);
|
|
16
19
|
return e.length ? e : ["totp"];
|
|
17
20
|
}
|
|
18
21
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
m as getEnabledMfaMethods,
|
|
23
|
+
M as getEnrolledMfaMethods,
|
|
24
|
+
c as isEnrolledInMfa
|
|
22
25
|
};
|
|
@@ -59,9 +59,11 @@ class l extends Error {
|
|
|
59
59
|
*
|
|
60
60
|
* @param code - The error code identifying the type of MFA error.
|
|
61
61
|
* @param message - The error message.
|
|
62
|
+
* @param options - Additional error options.
|
|
63
|
+
* @param options.cause - The underlying error this one was mapped from, when there is one.
|
|
62
64
|
*/
|
|
63
|
-
constructor(r, e) {
|
|
64
|
-
super(e), this.name = "MfaError", this.code = r;
|
|
65
|
+
constructor(r, e, o) {
|
|
66
|
+
super(e, o), this.name = "MfaError", this.code = r;
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
class u extends Error {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deletes a single enrolled passkey (WebAuthn) credential by its credential ID.
|
|
3
|
+
*
|
|
4
|
+
* Last Method Protection: if deleting this passkey would leave the end user with
|
|
5
|
+
* no enrolled MFA methods of any type (no other passkeys, TOTP, or SMS) and the
|
|
6
|
+
* project requires MFA verification on login, the request is rejected with a 403.
|
|
7
|
+
*
|
|
8
|
+
* The signed-in user is refreshed afterwards, so `user.mfaMethods.passkey` and
|
|
9
|
+
* `isEnrolledInMfa(user, "passkey")` reflect the deletion. A `listPasskeys` result you are
|
|
10
|
+
* already holding is not refreshed; re-run it to get the new list.
|
|
11
|
+
*
|
|
12
|
+
* @param credentialId - The base64url-encoded WebAuthn credential ID of the passkey to delete.
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const [passkey] = await listPasskeys();
|
|
16
|
+
* await deletePasskey(passkey.credentialId);
|
|
17
|
+
* const remaining = await listPasskeys();
|
|
18
|
+
* ```
|
|
19
|
+
* @returns A promise that resolves once the passkey has been deleted.
|
|
20
|
+
*/
|
|
21
|
+
export declare const deletePasskey: (credentialId: string) => Promise<void>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { User } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Options for enrolling a passkey (WebAuthn) as an MFA method.
|
|
4
|
+
*/
|
|
5
|
+
export type EnrollPasskeyOptions = {
|
|
6
|
+
/** An optional human-friendly name for the passkey (e.g. the device or browser), shown when listing enrolled passkeys. */
|
|
7
|
+
name?: string;
|
|
8
|
+
/** Optional idempotency key for safe retries. */
|
|
9
|
+
idempotencyKey?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Result of enrollPasskey.
|
|
13
|
+
*/
|
|
14
|
+
export type EnrollPasskeyResult = {
|
|
15
|
+
/** The updated user with the passkey enrolled. */
|
|
16
|
+
user: User;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Enrolls a passkey (WebAuthn) as an MFA method for the current end user.
|
|
20
|
+
*
|
|
21
|
+
* This runs the full WebAuthn registration ceremony in one call: it initiates
|
|
22
|
+
* enrollment with the server to obtain credential creation options, prompts the
|
|
23
|
+
* browser to create a new credential via `navigator.credentials.create()`, and
|
|
24
|
+
* submits the resulting attestation to the server to complete enrollment.
|
|
25
|
+
*
|
|
26
|
+
* Passkey MFA is supported in web environments only. Call `isPasskeySupported`
|
|
27
|
+
* first to check availability before offering passkey enrollment in your UI.
|
|
28
|
+
*
|
|
29
|
+
* @param options - The options for enrolling the passkey.
|
|
30
|
+
* @param options.name - An optional human-friendly name for the passkey.
|
|
31
|
+
* @param options.idempotencyKey - Optional idempotency key for safe retries.
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* if (await isPasskeySupported()) {
|
|
35
|
+
* const { user } = await enrollPasskey({ name: "MacBook Pro" });
|
|
36
|
+
* console.log("Passkey enrolled for user:", user.userId);
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
* @returns The result containing the updated user.
|
|
40
|
+
* @throws {MfaError} With code `PASSKEY_NOT_SUPPORTED` when passkeys are not available in the current environment.
|
|
41
|
+
* @throws {MfaError} With code `CANCELLED` when the user dismisses the passkey prompt or it times out.
|
|
42
|
+
* @throws {MfaError} With code `PASSKEY_ALREADY_ENROLLED` when this device already holds a passkey for the account.
|
|
43
|
+
*/
|
|
44
|
+
export declare const enrollPasskey: (options?: EnrollPasskeyOptions) => Promise<EnrollPasskeyResult>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PasskeySummary } from '@coinbase/cdp-api-client';
|
|
2
|
+
/**
|
|
3
|
+
* Lists the passkey (WebAuthn) credentials enrolled by the current end user.
|
|
4
|
+
*
|
|
5
|
+
* Never returns the COSE public key or any other sensitive credential material.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const passkeys = await listPasskeys();
|
|
10
|
+
* for (const passkey of passkeys) {
|
|
11
|
+
* console.log(passkey.name, passkey.credentialId, passkey.enrolledAt);
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
* @returns A promise resolving to the list of enrolled passkey summaries.
|
|
15
|
+
*/
|
|
16
|
+
export declare const listPasskeys: () => Promise<PasskeySummary[]>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for verifying a passkey (WebAuthn).
|
|
3
|
+
*/
|
|
4
|
+
export type VerifyPasskeyOptions = {
|
|
5
|
+
/** Optional idempotency key for safe retries. */
|
|
6
|
+
idempotencyKey?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Completes an MFA verification using an enrolled passkey (WebAuthn).
|
|
10
|
+
*
|
|
11
|
+
* This runs the full WebAuthn authentication ceremony in one call: it initiates
|
|
12
|
+
* verification with the server to obtain credential request options, prompts the
|
|
13
|
+
* browser for an assertion via `navigator.credentials.get()`, and submits the
|
|
14
|
+
* resulting assertion to the server. After successful verification, any pending
|
|
15
|
+
* operation that was waiting for MFA will automatically continue.
|
|
16
|
+
*
|
|
17
|
+
* Passkey MFA is supported in web environments only. Call `isPasskeySupported`
|
|
18
|
+
* first to check availability before offering passkey verification in your UI.
|
|
19
|
+
*
|
|
20
|
+
* @param options - The options for the verification.
|
|
21
|
+
* @param options.idempotencyKey - Optional idempotency key for safe retries.
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* await verifyPasskey();
|
|
25
|
+
* ```
|
|
26
|
+
* @returns A promise that resolves if passkey verification is successful.
|
|
27
|
+
* @throws {MfaError} With code `PASSKEY_NOT_SUPPORTED` when passkeys are not available in the current environment.
|
|
28
|
+
* @throws {MfaError} With code `CANCELLED` when the user dismisses the passkey prompt or it times out.
|
|
29
|
+
*/
|
|
30
|
+
export declare const verifyPasskey: (options?: VerifyPasskeyOptions) => Promise<void>;
|
|
@@ -63,7 +63,11 @@ export type MfaErrorCode =
|
|
|
63
63
|
/** No MFA listener is registered to handle verification. */
|
|
64
64
|
| "LISTENER_REQUIRED"
|
|
65
65
|
/** MFA listeners are registered but none matched the trigger value. */
|
|
66
|
-
| "NO_LISTENER_MATCHED"
|
|
66
|
+
| "NO_LISTENER_MATCHED"
|
|
67
|
+
/** Passkeys (WebAuthn) are not supported in the current environment. */
|
|
68
|
+
| "PASSKEY_NOT_SUPPORTED"
|
|
69
|
+
/** This device already holds a passkey for this account, so it cannot enroll another. */
|
|
70
|
+
| "PASSKEY_ALREADY_ENROLLED";
|
|
67
71
|
/**
|
|
68
72
|
* Error thrown when an MFA operation fails.
|
|
69
73
|
*/
|
|
@@ -77,8 +81,12 @@ export declare class MfaError extends Error {
|
|
|
77
81
|
*
|
|
78
82
|
* @param code - The error code identifying the type of MFA error.
|
|
79
83
|
* @param message - The error message.
|
|
84
|
+
* @param options - Additional error options.
|
|
85
|
+
* @param options.cause - The underlying error this one was mapped from, when there is one.
|
|
80
86
|
*/
|
|
81
|
-
constructor(code: MfaErrorCode, message: string
|
|
87
|
+
constructor(code: MfaErrorCode, message: string, options?: {
|
|
88
|
+
cause?: unknown;
|
|
89
|
+
});
|
|
82
90
|
}
|
|
83
91
|
/**
|
|
84
92
|
* Error codes for swap-related errors returned by the backend.
|
|
@@ -49,6 +49,10 @@ export { submitMfaEnrollment, type SubmitMfaEnrollmentOptions, type SubmitMfaEnr
|
|
|
49
49
|
export { initiateMfaVerification } from './actions/initiateMfaVerification.js';
|
|
50
50
|
export { submitMfaVerification, type SubmitMfaVerificationOptions, } from './actions/submitMfaVerification.js';
|
|
51
51
|
export { cancelMfaVerification } from './actions/cancelMfaVerification.js';
|
|
52
|
+
export { enrollPasskey, type EnrollPasskeyOptions, type EnrollPasskeyResult, } from './actions/enrollPasskey.js';
|
|
53
|
+
export { verifyPasskey, type VerifyPasskeyOptions } from './actions/verifyPasskey.js';
|
|
54
|
+
export { listPasskeys } from './actions/listPasskeys.js';
|
|
55
|
+
export { deletePasskey } from './actions/deletePasskey.js';
|
|
52
56
|
export { getEnabledMfaMethods, getEnrolledMfaMethods, isEnrolledInMfa, isMfaProtectedAction, isMfaRequired, MFA_PROTECTED_ACTIONS, MFA_PROTECTED_FUNCTIONS, type MfaProtectedAction, type MfaListener, type MfaVerificationContext, } from './mfa/index.js';
|
|
53
57
|
export { registerMfaListener, type MfaListenerOptions } from './mfa/state.web.js';
|
|
54
58
|
export * from './auth/authManager.js';
|
|
@@ -66,3 +70,4 @@ export * from './secureIframe/index.js';
|
|
|
66
70
|
export { createEvmKeyExportIframe, createSolanaKeyExportIframe, type CreateKeyExportIframeOptions, type CreateKeyExportIframeResult, type SecureIframeStatusDetails, } from './actions/createKeyExportIframe.js';
|
|
67
71
|
export { getConfig } from './state.js';
|
|
68
72
|
export { toTransactionSigner } from './solana-kit/toTransactionSigner.js';
|
|
73
|
+
export { isPasskeySupported } from './shared/webauthn.js';
|
|
@@ -3,13 +3,13 @@ import { User, MfaMethod } from '../types.js';
|
|
|
3
3
|
* Gets the list of MFA methods that the user has enrolled in.
|
|
4
4
|
*
|
|
5
5
|
* @param user - The user object.
|
|
6
|
-
* @returns An array of enrolled MFA methods
|
|
6
|
+
* @returns An array of enrolled MFA methods, any of 'totp', 'sms', and 'passkey'.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```typescript
|
|
10
10
|
* const user = await getCurrentUser();
|
|
11
11
|
* const methods = getEnrolledMfaMethods(user);
|
|
12
|
-
* // methods = ['totp', '
|
|
12
|
+
* // methods = ['totp', 'passkey']
|
|
13
13
|
*
|
|
14
14
|
* if (methods.length > 1) {
|
|
15
15
|
* // Prompt user to choose which method to use
|
|
@@ -56,7 +56,7 @@ export declare function isEnrolledInMfa(user: User, method?: MfaMethod): boolean
|
|
|
56
56
|
* const config = getMfaConfigState();
|
|
57
57
|
* if (config) {
|
|
58
58
|
* const methods = getEnabledMfaMethods(config);
|
|
59
|
-
* // methods = ['totp', '
|
|
59
|
+
* // methods = ['totp', 'passkey']
|
|
60
60
|
* }
|
|
61
61
|
* ```
|
|
62
62
|
*/
|