@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
package/dist/esm/index.web118.js
CHANGED
|
@@ -1,139 +1,50 @@
|
|
|
1
|
-
import "@coinbase/cdp-api-client";
|
|
2
|
-
import "viem";
|
|
3
|
-
import { mockUser as e } from "./index.web107.js";
|
|
4
1
|
class n {
|
|
5
|
-
|
|
6
|
-
authStateChangeCallback = null;
|
|
2
|
+
events = {};
|
|
7
3
|
/**
|
|
8
|
-
*
|
|
4
|
+
* Add an event listener.
|
|
9
5
|
*
|
|
10
|
-
* @param
|
|
6
|
+
* @param event - The name of the event to listen for.
|
|
7
|
+
* @param listener - The function to call when the event is emitted.
|
|
11
8
|
*/
|
|
12
|
-
|
|
9
|
+
on(e, s) {
|
|
10
|
+
this.events[e] || (this.events[e] = []), this.events[e].push(s);
|
|
13
11
|
}
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
13
|
+
* Remove an event listener.
|
|
16
14
|
*
|
|
17
|
-
* @
|
|
15
|
+
* @param event - The name of the event to remove the listener from.
|
|
16
|
+
* @param listener - The function to remove from the event listeners.
|
|
18
17
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
removeListener(e, s) {
|
|
19
|
+
if (!this.events[e])
|
|
20
|
+
return;
|
|
21
|
+
const t = this.events[e].indexOf(s);
|
|
22
|
+
t > -1 && this.events[e].splice(t, 1);
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
|
-
*
|
|
25
|
+
* Emit an event.
|
|
24
26
|
*
|
|
25
|
-
* @
|
|
27
|
+
* @param event - The name of the event to emit.
|
|
28
|
+
* @param args - The arguments to pass to the event listeners.
|
|
26
29
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*/
|
|
36
|
-
async isSignedIn() {
|
|
37
|
-
return this.authState ? Promise.resolve(this.authState.expiresAt > Date.now()) : Promise.resolve(!1);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Signs out the user, clearing all authentication state.
|
|
41
|
-
* In the mock implementation, this simply clears the local auth state.
|
|
42
|
-
*/
|
|
43
|
-
async signOut() {
|
|
44
|
-
await this.clearAuthState();
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Sets a callback to be called when the auth state changes.
|
|
48
|
-
* The callback is immediately called with the current auth state.
|
|
49
|
-
*
|
|
50
|
-
* @param callback - The function to call when the auth state changes.
|
|
51
|
-
* Will be called with the current user or null.
|
|
52
|
-
*/
|
|
53
|
-
addAuthStateChangeCallback(t) {
|
|
54
|
-
this.authStateChangeCallback = t, t(this.authState?.user ?? null);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Gets the access token. For mock, this always returns a valid token if signed in.
|
|
58
|
-
* If the current token is expired, it will be refreshed automatically.
|
|
59
|
-
*
|
|
60
|
-
* @param options - The options for getting the token.
|
|
61
|
-
* @param options.forceRefresh - Whether to force a refresh of the token.
|
|
62
|
-
* @returns The mock access token if signed in, null otherwise.
|
|
63
|
-
*/
|
|
64
|
-
async getToken(t) {
|
|
65
|
-
return this.authState ? ((t?.forceRefresh || this.authState.expiresAt <= Date.now()) && await this.refreshToken(), this.authState?.accessToken ?? null) : null;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Gets the expiration time of the access token, or null if the user is not signed in.
|
|
69
|
-
*
|
|
70
|
-
* @returns The expiration time of the access token.
|
|
71
|
-
*/
|
|
72
|
-
async getTokenExpiration() {
|
|
73
|
-
return this.authState?.expiresAt ?? null;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Gets the currentlly registered wallet secret ID.
|
|
77
|
-
*
|
|
78
|
-
* @returns The wallet secret ID.
|
|
79
|
-
*/
|
|
80
|
-
async getWalletSecretId() {
|
|
81
|
-
return "mock-wallet-secret-id";
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Gets the X-Wallet-Auth header value.
|
|
85
|
-
*
|
|
86
|
-
* @param _options - The options for the request.
|
|
87
|
-
* @param _options.requestMethod - The HTTP method of the request.
|
|
88
|
-
* @param _options.requestHost - The host of the request.
|
|
89
|
-
* @param _options.requestPath - The path of the request.
|
|
90
|
-
* @param _options.requestData - The data of the request.
|
|
91
|
-
* @returns The X-Wallet-Auth header value.
|
|
92
|
-
*/
|
|
93
|
-
async getXWalletAuth(t) {
|
|
94
|
-
if (!this.authState)
|
|
95
|
-
throw new Error("User not signed in");
|
|
96
|
-
return "x-wallet-auth";
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Gets the authentication state.
|
|
100
|
-
*
|
|
101
|
-
* @returns The authentication state.
|
|
102
|
-
*/
|
|
103
|
-
getAuthState() {
|
|
104
|
-
return this.authState;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Sets the authentication state.
|
|
108
|
-
* This will trigger the auth state change callback if one is registered.
|
|
109
|
-
*
|
|
110
|
-
* @param authState - The new authentication state to set.
|
|
111
|
-
*/
|
|
112
|
-
async setAuthState(t) {
|
|
113
|
-
this.authState = t, this.authStateChangeCallback && this.authStateChangeCallback(this.authState?.user ?? null);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Clears the authentication state.
|
|
117
|
-
* This will trigger the auth state change callback if one is registered.
|
|
118
|
-
*/
|
|
119
|
-
async clearAuthState() {
|
|
120
|
-
this.authState = null, this.authStateChangeCallback && this.authStateChangeCallback(null);
|
|
30
|
+
emit(e, ...s) {
|
|
31
|
+
this.events[e] && this.events[e].forEach((t) => {
|
|
32
|
+
try {
|
|
33
|
+
t(...s);
|
|
34
|
+
} catch (i) {
|
|
35
|
+
console.error(`Error in event listener for ${e}:`, i);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
121
38
|
}
|
|
122
39
|
/**
|
|
123
|
-
*
|
|
124
|
-
* Only refreshes if there is an existing auth state (user is signed in).
|
|
125
|
-
* Sets a new mock token with a 24-hour expiration.
|
|
40
|
+
* Remove all listeners for an event.
|
|
126
41
|
*
|
|
127
|
-
* @
|
|
42
|
+
* @param event - The name of the event to remove all listeners from. If not provided, removes all listeners for all events.
|
|
128
43
|
*/
|
|
129
|
-
|
|
130
|
-
this.
|
|
131
|
-
accessToken: "mock-access-token",
|
|
132
|
-
expiresAt: Date.now() + 1e3 * 60 * 60 * 24,
|
|
133
|
-
user: e
|
|
134
|
-
});
|
|
44
|
+
removeAllListeners(e) {
|
|
45
|
+
e ? delete this.events[e] : this.events = {};
|
|
135
46
|
}
|
|
136
47
|
}
|
|
137
48
|
export {
|
|
138
|
-
n as
|
|
49
|
+
n as EventEmitter
|
|
139
50
|
};
|
package/dist/esm/index.web119.js
CHANGED
|
@@ -1,71 +1,30 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "viem";
|
|
3
|
-
import "./index.web2.js";
|
|
1
|
+
import { Analytics as E } from "./index.web2.js";
|
|
4
2
|
import "./index.web3.js";
|
|
3
|
+
import { VERSION as r } from "./index.web9.js";
|
|
4
|
+
import { APIError as P, ErrorType as U, EvmEip7702DelegationNetwork as s, EvmSwapsNetwork as F, HttpErrorType as I, OAuth2ProviderType as N, SendEvmTransactionWithEndUserAccountBodyNetwork as d, SendSolanaTransactionWithEndUserAccountBodyNetwork as y } from "@coinbase/cdp-api-client";
|
|
5
5
|
import "jose";
|
|
6
|
-
import
|
|
7
|
-
import "./index.
|
|
8
|
-
import {
|
|
9
|
-
import "./index.
|
|
10
|
-
import "./index.web99.js";
|
|
6
|
+
import "viem";
|
|
7
|
+
import "./index.web103.js";
|
|
8
|
+
import { DEFAULT_SECURE_IFRAME_BASE_PATH as k, DEFAULT_SECURE_IFRAME_THEME as w, SECURE_IFRAME_EVENT_TYPE as C, SECURE_IFRAME_EVENT_TYPE_PREFIX as V, SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE as f } from "./index.web97.js";
|
|
9
|
+
import "./index.web104.js";
|
|
11
10
|
import "@solana/web3.js";
|
|
12
11
|
import "bs58";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* Initializes the mock OAuth manager.
|
|
18
|
-
*/
|
|
19
|
-
constructor() {
|
|
20
|
-
this.handleOAuthCode();
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Gets the current user, or null if there is no user signed in.
|
|
24
|
-
*
|
|
25
|
-
* @returns The current mock user if signed in, null otherwise.
|
|
26
|
-
*/
|
|
27
|
-
async getOAuthFlowState() {
|
|
28
|
-
return this.oauthFlowState ?? null;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Sets the OAuth flow state.
|
|
32
|
-
*
|
|
33
|
-
* @param oauthFlowState - The OAuth flow state to set.
|
|
34
|
-
*/
|
|
35
|
-
async setOAuthFlowState(t) {
|
|
36
|
-
this.oauthFlowState = t, this.oauthStateChangeCallbacks.forEach((o) => o(this.oauthFlowState));
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Adds a callback to be called when the OAuth state changes.
|
|
40
|
-
*
|
|
41
|
-
* @param callback - The function to call when the OAuth state changes.
|
|
42
|
-
*/
|
|
43
|
-
async addOAuthStateChangeCallback(t) {
|
|
44
|
-
this.oauthStateChangeCallbacks.push(t), t(this.oauthFlowState);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Clears the OAuth flow state.
|
|
48
|
-
*/
|
|
49
|
-
async clearOAuthFlowState() {
|
|
50
|
-
this.oauthFlowState = null, this.oauthStateChangeCallbacks.forEach((t) => t(null));
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Awaitable method whose promise only resolves when the OAuth manager is ready to be used.
|
|
54
|
-
*/
|
|
55
|
-
async handleOAuthCode() {
|
|
56
|
-
await a()?.cleanupOAuthParams(), await this.setOAuthFlowState({
|
|
57
|
-
providerType: "google",
|
|
58
|
-
status: "pending",
|
|
59
|
-
code: "mock-oauth-code",
|
|
60
|
-
flowId: "mock-flow-id"
|
|
61
|
-
}), await e({ code: "mock-oauth-code", providerType: "google", flowId: "mock-flow-id" }), await this.setOAuthFlowState({
|
|
62
|
-
providerType: "google",
|
|
63
|
-
status: "success",
|
|
64
|
-
code: "mock-oauth-code",
|
|
65
|
-
flowId: "mock-flow-id"
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
12
|
+
import "@solana/kit";
|
|
13
|
+
import "./index.web110.js";
|
|
14
|
+
import "zustand";
|
|
15
|
+
E.registerPackageVersion("core", r);
|
|
69
16
|
export {
|
|
70
|
-
|
|
17
|
+
P as APIError,
|
|
18
|
+
k as DEFAULT_SECURE_IFRAME_BASE_PATH,
|
|
19
|
+
w as DEFAULT_SECURE_IFRAME_THEME,
|
|
20
|
+
U as ErrorType,
|
|
21
|
+
s as EvmEip7702DelegationNetwork,
|
|
22
|
+
F as EvmSwapsNetwork,
|
|
23
|
+
I as HttpErrorType,
|
|
24
|
+
N as OAuth2ProviderType,
|
|
25
|
+
C as SECURE_IFRAME_EVENT_TYPE,
|
|
26
|
+
V as SECURE_IFRAME_EVENT_TYPE_PREFIX,
|
|
27
|
+
f as SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE,
|
|
28
|
+
d as SendEvmTransactionWithEndUserAccountBodyNetwork,
|
|
29
|
+
y as SendSolanaTransactionWithEndUserAccountBodyNetwork
|
|
71
30
|
};
|
package/dist/esm/index.web12.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Analytics as i } from "./index.web2.js";
|
|
2
2
|
import "./index.web3.js";
|
|
3
|
-
import { initiateSignIn as t } from "./index.
|
|
3
|
+
import { initiateSignIn as t } from "./index.web126.js";
|
|
4
4
|
import "@coinbase/cdp-api-client";
|
|
5
5
|
import "viem";
|
|
6
6
|
const p = async (n) => (i.sendActionCallEvent({ name: "sign_in_with_sms" }), t(
|
package/dist/esm/index.web120.js
CHANGED
|
@@ -1,29 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
e,
|
|
17
|
-
|
|
1
|
+
import { DisconnectedError as l, from as d } from "./index.web134.js";
|
|
2
|
+
import { validateRequest as h, EIP1193ProviderError as m, STANDARD_ERROR_CODES as _ } from "./index.web95.js";
|
|
3
|
+
import { createEOAHandlers as p } from "./index.web135.js";
|
|
4
|
+
import { createSmartAccountHandlers as g } from "./index.web136.js";
|
|
5
|
+
import "viem";
|
|
6
|
+
import "zustand";
|
|
7
|
+
import "@coinbase/cdp-api-client";
|
|
8
|
+
function v(c, a, r) {
|
|
9
|
+
a.subscribe(
|
|
10
|
+
(e) => e.chainId,
|
|
11
|
+
(e, t) => {
|
|
12
|
+
e !== t && c.emit("chainChanged", e);
|
|
13
|
+
}
|
|
14
|
+
), a.subscribe(
|
|
15
|
+
(e) => e.user,
|
|
16
|
+
(e, t) => {
|
|
17
|
+
if (!(e?.userId === t?.userId && e?.evmAccounts?.length === t?.evmAccounts?.length)) {
|
|
18
|
+
if (!e && t) {
|
|
19
|
+
c.emit("disconnect", new l());
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (e && e.evmAccounts?.length && (!t || t.evmAccounts?.length === 0)) {
|
|
23
|
+
const s = a.getState().chainId;
|
|
24
|
+
c.emit("connect", { chainId: s });
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
18
29
|
);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
const { chainId: i, setChainId: o } = a.getState(), u = i || r.chains[0].id;
|
|
31
|
+
return i || o(u), d({
|
|
32
|
+
request: async (e) => {
|
|
33
|
+
h(e, r);
|
|
34
|
+
const t = e, s = a.getState().user, n = !!(s?.evmSmartAccounts && s.evmSmartAccounts.length > 0) ? g() : p();
|
|
35
|
+
switch (t.method) {
|
|
36
|
+
case "eth_accounts":
|
|
37
|
+
return n.eth_accounts();
|
|
38
|
+
case "eth_requestAccounts":
|
|
39
|
+
return n.eth_requestAccounts(c, a);
|
|
40
|
+
case "personal_sign":
|
|
41
|
+
return n.personal_sign(t.params, a);
|
|
42
|
+
case "eth_sendTransaction":
|
|
43
|
+
return n.eth_sendTransaction(t.params, a, r.transports);
|
|
44
|
+
case "wallet_disconnect":
|
|
45
|
+
return n.wallet_disconnect();
|
|
46
|
+
case "wallet_switchEthereumChain":
|
|
47
|
+
return n.wallet_switchEthereumChain(t.params, a);
|
|
48
|
+
case "eth_sign":
|
|
49
|
+
return n.eth_sign(t.params, a);
|
|
50
|
+
case "eth_signTypedData_v4":
|
|
51
|
+
return n.eth_signTypedData_v4(t.params, a);
|
|
52
|
+
case "eth_chainId":
|
|
53
|
+
return n.eth_chainId(a);
|
|
54
|
+
case "wallet_sendCalls":
|
|
55
|
+
return n.wallet_sendCalls(t.params, a);
|
|
56
|
+
case "wallet_getCallsStatus":
|
|
57
|
+
return n.wallet_getCallsStatus(t.params, a);
|
|
58
|
+
case "wallet_getCapabilities":
|
|
59
|
+
return n.wallet_getCapabilities();
|
|
60
|
+
// Catch-all for any unknown method
|
|
61
|
+
default:
|
|
62
|
+
throw new m(
|
|
63
|
+
_.provider.unsupportedMethod,
|
|
64
|
+
`Method ${t.method} not supported`
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
// Event emitter methods - only the ones required by the interface
|
|
69
|
+
on: c.on.bind(c),
|
|
70
|
+
removeListener: c.removeListener.bind(c)
|
|
71
|
+
});
|
|
72
|
+
}
|
|
27
73
|
export {
|
|
28
|
-
|
|
74
|
+
v as createProvider
|
|
29
75
|
};
|
package/dist/esm/index.web121.js
CHANGED
|
@@ -1,35 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
t.endUser
|
|
11
|
-
);
|
|
12
|
-
await a().setAuthState(e);
|
|
13
|
-
const c = n();
|
|
14
|
-
if (c.ethereum?.createOnLogin && (e = await f(
|
|
15
|
-
e,
|
|
16
|
-
t.accessToken,
|
|
17
|
-
t.validUntil,
|
|
18
|
-
c.ethereum.createOnLogin
|
|
19
|
-
)), c.solana?.createOnLogin && (e = await l(
|
|
20
|
-
e,
|
|
21
|
-
t.accessToken,
|
|
22
|
-
t.validUntil
|
|
23
|
-
)), c.bitcoin?.createOnLogin) {
|
|
24
|
-
const i = [c.bitcoin.createOnLogin].flat();
|
|
25
|
-
e = await r(
|
|
26
|
-
e,
|
|
27
|
-
t.accessToken,
|
|
28
|
-
t.validUntil,
|
|
29
|
-
i
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
1
|
+
import { encodeBase64 as c, decodeBase64 as t } from "./index.web101.js";
|
|
2
|
+
function a(e) {
|
|
3
|
+
const r = e instanceof Uint8Array ? e : new Uint8Array(e);
|
|
4
|
+
return c(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
5
|
+
}
|
|
6
|
+
function s(e) {
|
|
7
|
+
const r = e.replace(/-/g, "+").replace(/_/g, "/"), n = (4 - r.length % 4) % 4;
|
|
8
|
+
return t(r + "=".repeat(n));
|
|
9
|
+
}
|
|
33
10
|
export {
|
|
34
|
-
|
|
11
|
+
s as decodeBase64url,
|
|
12
|
+
a as encodeBase64url
|
|
35
13
|
};
|
package/dist/esm/index.web122.js
CHANGED
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
user: t
|
|
10
|
-
}), {
|
|
11
|
-
message: a,
|
|
12
|
-
user: t,
|
|
13
|
-
isNewUser: !1
|
|
14
|
-
};
|
|
15
|
-
const e = await c(r().projectId, s, s.idempotencyKey);
|
|
16
|
-
await m(e);
|
|
17
|
-
const i = o().getUser();
|
|
18
|
-
return {
|
|
19
|
-
message: e.message,
|
|
20
|
-
user: i,
|
|
21
|
-
isNewUser: e.isNewEndUser
|
|
22
|
-
};
|
|
23
|
-
};
|
|
1
|
+
import { AuthManager as r } from "./index.web89.js";
|
|
2
|
+
import { CustomAuthManager as o } from "./index.web129.js";
|
|
3
|
+
import "@coinbase/cdp-api-client";
|
|
4
|
+
import "viem";
|
|
5
|
+
import { getConfig as n } from "./index.web74.js";
|
|
6
|
+
function a(t) {
|
|
7
|
+
return n().customAuth?.getJwt ? new o(t) : new r(t);
|
|
8
|
+
}
|
|
24
9
|
export {
|
|
25
|
-
|
|
10
|
+
a as createAuthManager
|
|
26
11
|
};
|
package/dist/esm/index.web123.js
CHANGED
|
@@ -1,67 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { OAuth2ProviderType as l } from "@coinbase/cdp-api-client";
|
|
2
|
+
import "./index.web2.js";
|
|
3
|
+
import "./index.web3.js";
|
|
4
|
+
import "jose";
|
|
5
|
+
import "viem";
|
|
6
|
+
import { getPlatformOAuth as h } from "./index.web5.js";
|
|
7
|
+
import "./index.web103.js";
|
|
8
|
+
import { consumePendingOAuthFlowId as c } from "./index.web106.js";
|
|
9
|
+
import { verifyOAuth as w } from "./index.web17.js";
|
|
10
|
+
import "./index.web97.js";
|
|
11
|
+
import "./index.web104.js";
|
|
12
|
+
import "@solana/web3.js";
|
|
13
|
+
import "bs58";
|
|
14
|
+
class k {
|
|
15
|
+
oauthFlowState = null;
|
|
16
|
+
oauthStateChangeCallbacks = [];
|
|
6
17
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
18
|
+
* Adds a callback to be called when the OAuth state changes.
|
|
19
|
+
*
|
|
20
|
+
* @param callback - The function to call when the OAuth state changes.
|
|
10
21
|
*/
|
|
11
|
-
async
|
|
12
|
-
|
|
22
|
+
async addOAuthStateChangeCallback(t) {
|
|
23
|
+
this.oauthStateChangeCallbacks.push(t), t(this.oauthFlowState);
|
|
13
24
|
}
|
|
14
25
|
/**
|
|
15
|
-
*
|
|
16
|
-
* Returns null if the user is not signed in.
|
|
26
|
+
* Sets the OAuth flow state.
|
|
17
27
|
*
|
|
18
|
-
* @
|
|
28
|
+
* @param oauthFlowState - The OAuth flow state.
|
|
19
29
|
*/
|
|
20
|
-
async
|
|
21
|
-
|
|
22
|
-
if (!e.customAuth)
|
|
23
|
-
return console.error("Custom auth configuration not found"), await this.clearAuthState(), null;
|
|
24
|
-
try {
|
|
25
|
-
const t = await e.customAuth.getJwt();
|
|
26
|
-
return t ? (this.authState && (this.authState.accessToken = t, this.authState.expiresAt = Date.now() + n), t) : (await this.clearAuthState(), null);
|
|
27
|
-
} catch (t) {
|
|
28
|
-
const r = new s(
|
|
29
|
-
t instanceof Error ? t.message : "Failed to get custom auth JWT"
|
|
30
|
-
);
|
|
31
|
-
return console.error(r), await this.clearAuthState(), null;
|
|
32
|
-
}
|
|
30
|
+
async setOAuthFlowState(t) {
|
|
31
|
+
this.oauthFlowState = t, this.oauthStateChangeCallbacks.forEach((e) => e(this.oauthFlowState));
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
|
-
*
|
|
36
|
-
* No-op for custom auth since tokens are provided via customAuth.getJwt callback.
|
|
37
|
-
* Unlike standard CDP auth, custom auth doesn't need token refresh or OAuth handling.
|
|
34
|
+
* Clears the OAuth flow state.
|
|
38
35
|
*/
|
|
39
|
-
async
|
|
36
|
+
async clearOAuthFlowState() {
|
|
37
|
+
this.oauthFlowState = null, this.oauthStateChangeCallbacks.forEach((t) => t(null));
|
|
40
38
|
}
|
|
41
39
|
/**
|
|
42
|
-
*
|
|
40
|
+
* Gets the OAuth flow state.
|
|
43
41
|
*
|
|
44
|
-
* @returns
|
|
42
|
+
* @returns The OAuth flow state.
|
|
45
43
|
*/
|
|
46
|
-
|
|
47
|
-
return
|
|
44
|
+
async getOAuthFlowState() {
|
|
45
|
+
return this.oauthFlowState;
|
|
48
46
|
}
|
|
49
47
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Custom auth provides fresh tokens on each request via customAuth.getJwt,
|
|
58
|
-
* so no scheduled refresh is needed. This method is a no-op for custom auth.
|
|
48
|
+
* Handles the OAuth code.
|
|
49
|
+
*
|
|
50
|
+
* @param url - The URL to handle.
|
|
51
|
+
* @returns A promise that resolves when the OAuth code is handled.
|
|
52
|
+
* @throws An error if the URL is required and not provided.
|
|
59
53
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
async handleOAuthCode(t) {
|
|
55
|
+
try {
|
|
56
|
+
const e = await h().getOAuthParams(t);
|
|
57
|
+
await h().cleanupOAuthParams();
|
|
58
|
+
const i = await c();
|
|
59
|
+
if (!e)
|
|
60
|
+
return;
|
|
61
|
+
const { providerType: a, code: o, flowId: r, error: s, errorDescription: u } = e, n = a !== void 0 && Object.values(l).includes(a);
|
|
62
|
+
if (s || u) {
|
|
63
|
+
await this.setOAuthFlowState({
|
|
64
|
+
...n ? { providerType: a } : {},
|
|
65
|
+
status: "error",
|
|
66
|
+
errorDescription: s ?? u,
|
|
67
|
+
code: o,
|
|
68
|
+
flowId: r,
|
|
69
|
+
error: s
|
|
70
|
+
});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (!o || !a || !r)
|
|
74
|
+
return;
|
|
75
|
+
if (!n) {
|
|
76
|
+
await this.setOAuthFlowState({
|
|
77
|
+
status: "error",
|
|
78
|
+
errorDescription: "Invalid OAuth provider type.",
|
|
79
|
+
code: o,
|
|
80
|
+
flowId: r
|
|
81
|
+
});
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (!i || i !== r) {
|
|
85
|
+
await this.setOAuthFlowState({
|
|
86
|
+
providerType: a,
|
|
87
|
+
status: "error",
|
|
88
|
+
errorDescription: "OAuth flow could not be verified. Please try signing in again.",
|
|
89
|
+
code: o,
|
|
90
|
+
flowId: r
|
|
91
|
+
});
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
await this.setOAuthFlowState({
|
|
95
|
+
providerType: a,
|
|
96
|
+
status: "pending",
|
|
97
|
+
code: o,
|
|
98
|
+
flowId: r
|
|
99
|
+
}), await w({
|
|
100
|
+
code: o,
|
|
101
|
+
providerType: a,
|
|
102
|
+
flowId: r
|
|
103
|
+
}), await this.setOAuthFlowState({
|
|
104
|
+
providerType: a,
|
|
105
|
+
status: "success",
|
|
106
|
+
code: o,
|
|
107
|
+
flowId: r
|
|
108
|
+
});
|
|
109
|
+
} catch (e) {
|
|
110
|
+
const i = e instanceof Error ? e.message : "Unknown error";
|
|
111
|
+
await h().cleanupOAuthParams(), await this.setOAuthFlowState({
|
|
112
|
+
status: "error",
|
|
113
|
+
errorDescription: i
|
|
114
|
+
});
|
|
115
|
+
}
|
|
62
116
|
}
|
|
63
117
|
}
|
|
64
118
|
export {
|
|
65
|
-
|
|
66
|
-
l as CustomAuthManager
|
|
119
|
+
k as OAuthManager
|
|
67
120
|
};
|