@coinbase/cdp-core 0.0.112 → 0.0.114
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.web107.js +3 -3
- package/dist/esm/index.web110.js +2 -2
- package/dist/esm/index.web126.js +11 -11
- package/dist/esm/index.web127.js +3 -3
- package/dist/esm/index.web128.js +12 -12
- package/dist/esm/index.web129.js +12 -12
- package/dist/esm/index.web130.js +2 -19
- package/dist/esm/index.web131.js +63 -20
- package/dist/esm/index.web132.js +351 -37
- package/dist/esm/index.web133.js +19 -2
- package/dist/esm/index.web134.js +20 -63
- package/dist/esm/index.web135.js +37 -351
- package/dist/esm/index.web136.js +11 -943
- package/dist/esm/index.web137.js +12 -2
- package/dist/esm/index.web138.js +944 -49
- package/dist/esm/index.web139.js +2 -27
- package/dist/esm/index.web140.js +45 -50
- package/dist/esm/index.web141.js +26 -10
- package/dist/esm/index.web142.js +15 -2
- package/dist/esm/index.web143.js +28 -44
- package/dist/esm/index.web144.js +7 -13
- package/dist/esm/index.web145.js +3 -12
- package/dist/esm/index.web146.js +28 -11
- package/dist/esm/index.web147.js +8 -4
- package/dist/esm/index.web148.js +8 -5
- package/dist/esm/index.web149.js +78 -45
- package/dist/esm/index.web150.js +18 -4
- package/dist/esm/index.web151.js +3 -28
- package/dist/esm/index.web152.js +15 -7
- package/dist/esm/index.web153.js +4 -3
- package/dist/esm/index.web154.js +5 -19
- package/dist/esm/index.web155.js +19 -8
- package/dist/esm/index.web156.js +61 -7
- package/dist/esm/index.web157.js +16 -79
- package/dist/esm/index.web158.js +19 -24
- package/dist/esm/index.web159.js +8 -3
- package/dist/esm/index.web160.js +33 -6
- package/dist/esm/index.web161.js +7 -4
- package/dist/esm/index.web162.js +20 -14
- package/dist/esm/index.web163.js +5 -20
- package/dist/esm/index.web164.js +42 -56
- package/dist/esm/index.web165.js +4 -17
- package/dist/esm/index.web166.js +53 -22
- package/dist/esm/index.web167.js +10 -8
- package/dist/esm/index.web168.js +2 -43
- package/dist/esm/index.web169.js +45 -8
- package/dist/esm/index.web170.js +13 -20
- package/dist/esm/index.web171.js +104 -2
- package/dist/esm/index.web172.js +79 -2
- package/dist/esm/index.web173.js +78 -13
- package/dist/esm/index.web174.js +20 -54
- package/dist/esm/index.web175.js +32 -6
- package/dist/esm/index.web176.js +10 -19
- package/dist/esm/index.web177.js +4 -17
- package/dist/esm/index.web178.js +49 -39
- package/dist/esm/index.web179.js +55 -3
- package/dist/esm/index.web181.js +1 -1
- package/dist/esm/index.web182.js +43 -10
- package/dist/esm/index.web183.js +13 -4
- package/dist/esm/index.web184.js +6 -28
- package/dist/esm/index.web185.js +104 -6
- package/dist/esm/index.web186.js +17 -32
- package/dist/esm/index.web187.js +8 -12
- package/dist/esm/index.web188.js +9 -54
- package/dist/esm/index.web189.js +11 -42
- package/dist/esm/index.web190.js +13 -127
- package/dist/esm/index.web191.js +3 -104
- package/dist/esm/index.web192.js +6 -6
- package/dist/esm/index.web193.js +43 -3
- package/dist/esm/index.web194.js +11 -11
- package/dist/esm/index.web195.js +15 -2
- package/dist/esm/index.web196.js +19 -2
- package/dist/esm/index.web197.js +9 -34
- package/dist/esm/index.web198.js +28 -6
- package/dist/esm/index.web199.js +126 -33
- package/dist/esm/index.web2.js +2 -2
- package/dist/esm/index.web200.js +6 -14
- package/dist/esm/index.web201.js +3 -35
- package/dist/esm/index.web202.js +2 -19
- package/dist/esm/index.web203.js +2 -9
- package/dist/esm/index.web204.js +36 -9
- package/dist/esm/index.web205.js +6 -11
- package/dist/esm/index.web206.js +33 -12
- package/dist/esm/index.web207.js +34 -5
- package/dist/esm/index.web208.js +6 -5
- package/dist/esm/index.web209.js +5 -11
- package/dist/esm/index.web210.js +10 -20
- package/dist/esm/index.web211.js +2 -10
- package/dist/esm/index.web212.js +2 -20
- package/dist/esm/index.web213.js +2 -94
- package/dist/esm/index.web214.js +109 -21
- package/dist/esm/index.web215.js +2 -118
- package/dist/esm/index.web216.js +43 -100
- package/dist/esm/index.web217.js +7 -78
- package/dist/esm/index.web218.js +2 -79
- package/dist/esm/index.web219.js +361 -2
- package/dist/esm/index.web220.js +849 -105
- package/dist/esm/index.web221.js +39 -2
- package/dist/esm/index.web222.js +2 -8
- package/dist/esm/index.web223.js +70 -2
- package/dist/esm/index.web224.js +30 -364
- package/dist/esm/index.web225.js +14 -826
- package/dist/esm/index.web226.js +20 -38
- package/dist/esm/index.web227.js +10 -2
- package/dist/esm/index.web228.js +20 -70
- package/dist/esm/index.web229.js +93 -34
- package/dist/esm/index.web230.js +20 -14
- package/dist/esm/index.web231.js +115 -18
- package/dist/esm/index.web232.js +20 -2
- package/dist/esm/index.web233.js +2 -20
- package/dist/esm/index.web234.js +6 -32
- package/dist/esm/index.web235.js +32 -6
- package/dist/esm/index.web236.js +14 -40
- package/dist/esm/index.web238.js +2 -18
- package/dist/esm/index.web239.js +2 -28
- package/dist/esm/index.web240.js +2 -8
- package/dist/esm/index.web241.js +18 -11
- package/dist/esm/index.web242.js +28 -13
- package/dist/esm/index.web243.js +8 -10
- package/dist/esm/index.web244.js +11 -17
- package/dist/esm/index.web245.js +12 -80
- package/dist/esm/index.web246.js +10 -2
- package/dist/esm/index.web247.js +17 -2
- package/dist/esm/index.web248.js +81 -2
- package/dist/esm/index.web250.js +14 -78
- package/dist/esm/index.web251.js +78 -14
- package/dist/esm/index.web3.js +1 -1
- package/dist/esm/index.web36.js +8 -7
- package/dist/esm/index.web53.js +40 -35
- package/dist/esm/index.web69.js +52 -48
- package/dist/esm/index.web87.js +21 -21
- package/dist/esm/index.web9.js +1 -1
- package/dist/esm/index.web91.js +55 -49
- package/dist/esm/index.web97.js +19 -11
- package/dist/esm/index.web99.js +1 -1
- package/dist/native/index.native101.js +1 -1
- package/dist/native/index.native109.js +3 -3
- package/dist/native/index.native11.js +1 -1
- package/dist/native/index.native112.js +2 -2
- package/dist/native/index.native116.js +1 -1
- package/dist/native/index.native128.js +12 -12
- package/dist/native/index.native129.js +16 -89
- package/dist/native/index.native130.js +21 -15
- package/dist/native/index.native131.js +49 -21
- package/dist/native/index.native132.js +363 -37
- package/dist/native/index.native133.js +2 -379
- package/dist/native/index.native134.js +68 -2
- package/dist/native/index.native135.js +336 -37
- package/dist/native/index.native136.js +87 -362
- package/dist/native/index.native137.js +12 -12
- package/dist/native/index.native138.js +12 -12
- package/dist/native/index.native139.js +944 -54
- package/dist/native/index.native140.js +2 -11
- package/dist/native/index.native141.js +50 -2
- package/dist/native/index.native142.js +27 -45
- package/dist/native/index.native143.js +54 -13
- package/dist/native/index.native144.js +10 -4
- package/dist/native/index.native145.js +2 -945
- package/dist/native/index.native146.js +45 -2
- package/dist/native/index.native147.js +13 -49
- package/dist/native/index.native148.js +4 -26
- package/dist/native/index.native149.js +5 -35
- package/dist/native/index.native150.js +40 -60
- package/dist/native/index.native151.js +35 -13
- package/dist/native/index.native152.js +67 -11
- package/dist/native/index.native153.js +14 -5
- package/dist/native/index.native154.js +24 -44
- package/dist/native/index.native155.js +7 -13
- package/dist/native/index.native156.js +3 -55
- package/dist/native/index.native157.js +27 -6
- package/dist/native/index.native158.js +8 -21
- package/dist/native/index.native159.js +7 -17
- package/dist/native/index.native160.js +78 -44
- package/dist/native/index.native161.js +27 -3
- package/dist/native/index.native162.js +3 -3
- package/dist/native/index.native163.js +14 -34
- package/dist/native/index.native164.js +4 -12
- package/dist/native/index.native165.js +13 -4
- package/dist/native/index.native166.js +18 -27
- package/dist/native/index.native167.js +60 -6
- package/dist/native/index.native168.js +17 -32
- package/dist/native/index.native169.js +21 -10
- package/dist/native/index.native170.js +8 -55
- package/dist/native/index.native171.js +40 -41
- package/dist/native/index.native172.js +7 -127
- package/dist/native/index.native173.js +19 -103
- package/dist/native/index.native174.js +12 -6
- package/dist/native/index.native175.js +12 -3
- package/dist/native/index.native176.js +13 -78
- package/dist/native/index.native177.js +56 -2
- package/dist/native/index.native178.js +7 -2
- package/dist/native/index.native179.js +18 -34
- package/dist/native/index.native180.js +16 -5
- package/dist/native/index.native181.js +42 -31
- package/dist/native/index.native182.js +3 -14
- package/dist/native/index.native183.js +3 -34
- package/dist/native/index.native184.js +33 -17
- package/dist/native/index.native185.js +12 -8
- package/dist/native/index.native186.js +4 -10
- package/dist/native/index.native187.js +28 -11
- package/dist/native/index.native188.js +6 -13
- package/dist/native/index.native189.js +32 -5
- package/dist/native/index.native190.js +13 -5
- package/dist/native/index.native191.js +55 -10
- package/dist/native/index.native192.js +43 -2
- package/dist/native/index.native193.js +128 -2
- package/dist/native/index.native194.js +104 -13
- package/dist/native/index.native195.js +6 -27
- package/dist/native/index.native196.js +3 -8
- package/dist/native/index.native197.js +78 -3
- package/dist/native/index.native198.js +2 -28
- package/dist/native/index.native199.js +2 -9
- package/dist/native/index.native2.js +2 -2
- package/dist/native/index.native200.js +37 -7
- package/dist/native/index.native201.js +6 -79
- package/dist/native/index.native202.js +32 -25
- package/dist/native/index.native203.js +14 -3
- package/dist/native/index.native204.js +34 -14
- package/dist/native/index.native205.js +18 -4
- package/dist/native/index.native206.js +8 -13
- package/dist/native/index.native207.js +9 -18
- package/dist/native/index.native208.js +11 -60
- package/dist/native/index.native209.js +13 -17
- package/dist/native/index.native210.js +5 -23
- package/dist/native/index.native211.js +5 -9
- package/dist/native/index.native212.js +10 -41
- package/dist/native/index.native213.js +2 -8
- package/dist/native/index.native214.js +2 -21
- package/dist/native/index.native215.js +2 -2
- package/dist/native/index.native216.js +3 -3
- package/dist/native/index.native218.js +3 -3
- package/dist/native/index.native219.js +1 -1
- package/dist/native/index.native220.js +3 -3
- package/dist/native/index.native224.js +38 -103
- package/dist/native/index.native225.js +2 -79
- package/dist/native/index.native226.js +69 -78
- package/dist/native/index.native227.js +34 -7
- package/dist/native/index.native228.js +15 -2
- package/dist/native/index.native229.js +7 -368
- package/dist/native/index.native230.js +2 -827
- package/dist/native/index.native231.js +357 -35
- package/dist/native/index.native232.js +853 -2
- package/dist/native/index.native233.js +103 -69
- package/dist/native/index.native234.js +76 -32
- package/dist/native/index.native235.js +78 -14
- package/dist/native/index.native236.js +1 -1
- package/dist/native/index.native239.js +5 -5
- package/dist/native/index.native240.js +2 -2
- package/dist/native/index.native241.js +45 -16
- package/dist/native/index.native242.js +18 -28
- package/dist/native/index.native243.js +26 -6
- package/dist/native/index.native244.js +6 -9
- package/dist/native/index.native245.js +11 -13
- package/dist/native/index.native246.js +11 -8
- package/dist/native/index.native247.js +7 -14
- package/dist/native/index.native248.js +16 -80
- package/dist/native/index.native249.js +80 -3
- package/dist/native/index.native250.js +2 -47
- package/dist/native/index.native253.js +4 -2
- package/dist/native/index.native256.js +1 -1
- package/dist/native/index.native3.js +1 -1
- package/dist/native/index.native38.js +8 -7
- package/dist/native/index.native55.js +40 -35
- package/dist/native/index.native71.js +52 -48
- package/dist/native/index.native86.js +1 -1
- package/dist/native/index.native89.js +23 -23
- package/dist/native/index.native93.js +55 -49
- package/dist/native/index.native99.js +19 -11
- package/dist/native-types/actions/sendUserOperation.d.ts +1 -0
- package/dist/native-types/types.d.ts +4 -2
- package/dist/native-types/version.d.ts +1 -1
- package/dist/types/actions/sendUserOperation.d.ts +1 -0
- package/dist/types/types.d.ts +4 -2
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index.web107.js +3 -3
- package/dist/web/index.web110.js +2 -2
- package/dist/web/index.web126.js +11 -11
- package/dist/web/index.web127.js +3 -3
- package/dist/web/index.web128.js +12 -12
- package/dist/web/index.web129.js +12 -12
- package/dist/web/index.web130.js +2 -19
- package/dist/web/index.web131.js +63 -20
- package/dist/web/index.web132.js +351 -37
- package/dist/web/index.web133.js +19 -2
- package/dist/web/index.web134.js +20 -63
- package/dist/web/index.web135.js +37 -351
- package/dist/web/index.web136.js +11 -943
- package/dist/web/index.web137.js +12 -2
- package/dist/web/index.web138.js +944 -49
- package/dist/web/index.web139.js +2 -27
- package/dist/web/index.web140.js +45 -50
- package/dist/web/index.web141.js +26 -10
- package/dist/web/index.web142.js +15 -2
- package/dist/web/index.web143.js +28 -44
- package/dist/web/index.web144.js +7 -13
- package/dist/web/index.web145.js +3 -12
- package/dist/web/index.web146.js +28 -11
- package/dist/web/index.web147.js +8 -4
- package/dist/web/index.web148.js +8 -5
- package/dist/web/index.web149.js +78 -45
- package/dist/web/index.web150.js +18 -4
- package/dist/web/index.web151.js +3 -28
- package/dist/web/index.web152.js +15 -7
- package/dist/web/index.web153.js +4 -3
- package/dist/web/index.web154.js +5 -19
- package/dist/web/index.web155.js +19 -8
- package/dist/web/index.web156.js +61 -7
- package/dist/web/index.web157.js +16 -79
- package/dist/web/index.web158.js +19 -24
- package/dist/web/index.web159.js +8 -3
- package/dist/web/index.web160.js +33 -6
- package/dist/web/index.web161.js +7 -4
- package/dist/web/index.web162.js +20 -14
- package/dist/web/index.web163.js +5 -20
- package/dist/web/index.web164.js +42 -56
- package/dist/web/index.web165.js +4 -17
- package/dist/web/index.web166.js +53 -22
- package/dist/web/index.web167.js +10 -8
- package/dist/web/index.web168.js +2 -43
- package/dist/web/index.web169.js +45 -8
- package/dist/web/index.web170.js +13 -20
- package/dist/web/index.web171.js +104 -2
- package/dist/web/index.web172.js +79 -2
- package/dist/web/index.web173.js +78 -13
- package/dist/web/index.web174.js +20 -54
- package/dist/web/index.web175.js +32 -6
- package/dist/web/index.web176.js +10 -19
- package/dist/web/index.web177.js +4 -17
- package/dist/web/index.web178.js +49 -39
- package/dist/web/index.web179.js +55 -3
- package/dist/web/index.web181.js +1 -1
- package/dist/web/index.web182.js +43 -10
- package/dist/web/index.web183.js +13 -4
- package/dist/web/index.web184.js +6 -28
- package/dist/web/index.web185.js +104 -6
- package/dist/web/index.web186.js +17 -32
- package/dist/web/index.web187.js +8 -12
- package/dist/web/index.web188.js +9 -54
- package/dist/web/index.web189.js +11 -42
- package/dist/web/index.web190.js +13 -127
- package/dist/web/index.web191.js +3 -104
- package/dist/web/index.web192.js +6 -6
- package/dist/web/index.web193.js +43 -3
- package/dist/web/index.web194.js +11 -11
- package/dist/web/index.web195.js +15 -2
- package/dist/web/index.web196.js +19 -2
- package/dist/web/index.web197.js +9 -34
- package/dist/web/index.web198.js +28 -6
- package/dist/web/index.web199.js +126 -33
- package/dist/web/index.web2.js +2 -2
- package/dist/web/index.web200.js +6 -14
- package/dist/web/index.web201.js +3 -35
- package/dist/web/index.web202.js +2 -19
- package/dist/web/index.web203.js +2 -9
- package/dist/web/index.web204.js +36 -9
- package/dist/web/index.web205.js +6 -11
- package/dist/web/index.web206.js +33 -12
- package/dist/web/index.web207.js +34 -5
- package/dist/web/index.web208.js +6 -5
- package/dist/web/index.web209.js +5 -11
- package/dist/web/index.web210.js +10 -20
- package/dist/web/index.web211.js +2 -10
- package/dist/web/index.web212.js +2 -20
- package/dist/web/index.web213.js +2 -94
- package/dist/web/index.web214.js +109 -21
- package/dist/web/index.web215.js +2 -118
- package/dist/web/index.web216.js +43 -100
- package/dist/web/index.web217.js +7 -78
- package/dist/web/index.web218.js +2 -79
- package/dist/web/index.web219.js +361 -2
- package/dist/web/index.web220.js +849 -105
- package/dist/web/index.web221.js +39 -2
- package/dist/web/index.web222.js +2 -8
- package/dist/web/index.web223.js +70 -2
- package/dist/web/index.web224.js +30 -364
- package/dist/web/index.web225.js +14 -826
- package/dist/web/index.web226.js +20 -38
- package/dist/web/index.web227.js +10 -2
- package/dist/web/index.web228.js +20 -70
- package/dist/web/index.web229.js +93 -34
- package/dist/web/index.web230.js +20 -14
- package/dist/web/index.web231.js +115 -18
- package/dist/web/index.web232.js +20 -2
- package/dist/web/index.web233.js +2 -20
- package/dist/web/index.web234.js +6 -32
- package/dist/web/index.web235.js +32 -6
- package/dist/web/index.web236.js +14 -40
- package/dist/web/index.web238.js +2 -18
- package/dist/web/index.web239.js +2 -28
- package/dist/web/index.web240.js +2 -8
- package/dist/web/index.web241.js +18 -11
- package/dist/web/index.web242.js +28 -13
- package/dist/web/index.web243.js +8 -10
- package/dist/web/index.web244.js +11 -17
- package/dist/web/index.web245.js +12 -80
- package/dist/web/index.web246.js +10 -2
- package/dist/web/index.web247.js +17 -2
- package/dist/web/index.web248.js +81 -2
- package/dist/web/index.web250.js +14 -78
- package/dist/web/index.web251.js +78 -14
- package/dist/web/index.web3.js +1 -1
- package/dist/web/index.web36.js +8 -7
- package/dist/web/index.web53.js +40 -35
- package/dist/web/index.web69.js +52 -48
- package/dist/web/index.web87.js +21 -21
- package/dist/web/index.web9.js +1 -1
- package/dist/web/index.web91.js +55 -49
- package/dist/web/index.web97.js +19 -11
- package/dist/web/index.web99.js +1 -1
- package/dist/web-types/actions/sendUserOperation.d.ts +1 -0
- package/dist/web-types/types.d.ts +4 -2
- package/dist/web-types/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import n from "./index.native143.js";
|
|
2
|
-
function r(t) {
|
|
3
|
-
return n(t) && typeof t.kty == "string";
|
|
4
|
-
}
|
|
5
|
-
function o(t) {
|
|
6
|
-
return t.kty !== "oct" && typeof t.d == "string";
|
|
7
|
-
}
|
|
8
1
|
function e(t) {
|
|
9
|
-
return t.
|
|
2
|
+
return t?.[Symbol.toStringTag] === "CryptoKey";
|
|
10
3
|
}
|
|
11
|
-
function
|
|
12
|
-
return t.
|
|
4
|
+
function r(t) {
|
|
5
|
+
return t?.[Symbol.toStringTag] === "KeyObject";
|
|
13
6
|
}
|
|
7
|
+
const n = (t) => e(t) || r(t);
|
|
14
8
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
c as isSecretJWK
|
|
9
|
+
n as default,
|
|
10
|
+
e as isCryptoKey,
|
|
11
|
+
r as isKeyObject
|
|
19
12
|
};
|
|
@@ -1,83 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
case "RS384":
|
|
14
|
-
case "RS512":
|
|
15
|
-
a = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
|
|
16
|
-
break;
|
|
17
|
-
case "RSA-OAEP":
|
|
18
|
-
case "RSA-OAEP-256":
|
|
19
|
-
case "RSA-OAEP-384":
|
|
20
|
-
case "RSA-OAEP-512":
|
|
21
|
-
a = {
|
|
22
|
-
name: "RSA-OAEP",
|
|
23
|
-
hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}`
|
|
24
|
-
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
25
|
-
break;
|
|
26
|
-
default:
|
|
27
|
-
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
28
|
-
}
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
case "EC": {
|
|
32
|
-
switch (e.alg) {
|
|
33
|
-
case "ES256":
|
|
34
|
-
a = { name: "ECDSA", namedCurve: "P-256" }, r = e.d ? ["sign"] : ["verify"];
|
|
35
|
-
break;
|
|
36
|
-
case "ES384":
|
|
37
|
-
a = { name: "ECDSA", namedCurve: "P-384" }, r = e.d ? ["sign"] : ["verify"];
|
|
38
|
-
break;
|
|
39
|
-
case "ES512":
|
|
40
|
-
a = { name: "ECDSA", namedCurve: "P-521" }, r = e.d ? ["sign"] : ["verify"];
|
|
41
|
-
break;
|
|
42
|
-
case "ECDH-ES":
|
|
43
|
-
case "ECDH-ES+A128KW":
|
|
44
|
-
case "ECDH-ES+A192KW":
|
|
45
|
-
case "ECDH-ES+A256KW":
|
|
46
|
-
a = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
47
|
-
break;
|
|
48
|
-
default:
|
|
49
|
-
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
50
|
-
}
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
case "OKP": {
|
|
54
|
-
switch (e.alg) {
|
|
55
|
-
case "Ed25519":
|
|
56
|
-
case "EdDSA":
|
|
57
|
-
a = { name: "Ed25519" }, r = e.d ? ["sign"] : ["verify"];
|
|
58
|
-
break;
|
|
59
|
-
case "ECDH-ES":
|
|
60
|
-
case "ECDH-ES+A128KW":
|
|
61
|
-
case "ECDH-ES+A192KW":
|
|
62
|
-
case "ECDH-ES+A256KW":
|
|
63
|
-
a = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
64
|
-
break;
|
|
65
|
-
default:
|
|
66
|
-
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
67
|
-
}
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
default:
|
|
71
|
-
throw new s('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
72
|
-
}
|
|
73
|
-
return { algorithm: a, keyUsages: r };
|
|
1
|
+
import n from "./index.native147.js";
|
|
2
|
+
function r(t) {
|
|
3
|
+
return n(t) && typeof t.kty == "string";
|
|
4
|
+
}
|
|
5
|
+
function o(t) {
|
|
6
|
+
return t.kty !== "oct" && typeof t.d == "string";
|
|
7
|
+
}
|
|
8
|
+
function e(t) {
|
|
9
|
+
return t.kty !== "oct" && typeof t.d > "u";
|
|
10
|
+
}
|
|
11
|
+
function c(t) {
|
|
12
|
+
return t.kty === "oct" && typeof t.k == "string";
|
|
74
13
|
}
|
|
75
|
-
const i = async (e) => {
|
|
76
|
-
if (!e.alg)
|
|
77
|
-
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
78
|
-
const { algorithm: a, keyUsages: r } = n(e), t = { ...e };
|
|
79
|
-
return delete t.alg, delete t.use, crypto.subtle.importKey("jwk", t, a, e.ext ?? !e.d, e.key_ops ?? r);
|
|
80
|
-
};
|
|
81
14
|
export {
|
|
82
|
-
|
|
15
|
+
r as isJWK,
|
|
16
|
+
o as isPrivateJWK,
|
|
17
|
+
e as isPublicJWK,
|
|
18
|
+
c as isSecretJWK
|
|
83
19
|
};
|
|
@@ -1,6 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { JOSENotSupported as s } from "./index.native130.js";
|
|
2
|
+
function n(e) {
|
|
3
|
+
let a, r;
|
|
4
|
+
switch (e.kty) {
|
|
5
|
+
case "RSA": {
|
|
6
|
+
switch (e.alg) {
|
|
7
|
+
case "PS256":
|
|
8
|
+
case "PS384":
|
|
9
|
+
case "PS512":
|
|
10
|
+
a = { name: "RSA-PSS", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
|
|
11
|
+
break;
|
|
12
|
+
case "RS256":
|
|
13
|
+
case "RS384":
|
|
14
|
+
case "RS512":
|
|
15
|
+
a = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
|
|
16
|
+
break;
|
|
17
|
+
case "RSA-OAEP":
|
|
18
|
+
case "RSA-OAEP-256":
|
|
19
|
+
case "RSA-OAEP-384":
|
|
20
|
+
case "RSA-OAEP-512":
|
|
21
|
+
a = {
|
|
22
|
+
name: "RSA-OAEP",
|
|
23
|
+
hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}`
|
|
24
|
+
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
25
|
+
break;
|
|
26
|
+
default:
|
|
27
|
+
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
case "EC": {
|
|
32
|
+
switch (e.alg) {
|
|
33
|
+
case "ES256":
|
|
34
|
+
a = { name: "ECDSA", namedCurve: "P-256" }, r = e.d ? ["sign"] : ["verify"];
|
|
35
|
+
break;
|
|
36
|
+
case "ES384":
|
|
37
|
+
a = { name: "ECDSA", namedCurve: "P-384" }, r = e.d ? ["sign"] : ["verify"];
|
|
38
|
+
break;
|
|
39
|
+
case "ES512":
|
|
40
|
+
a = { name: "ECDSA", namedCurve: "P-521" }, r = e.d ? ["sign"] : ["verify"];
|
|
41
|
+
break;
|
|
42
|
+
case "ECDH-ES":
|
|
43
|
+
case "ECDH-ES+A128KW":
|
|
44
|
+
case "ECDH-ES+A192KW":
|
|
45
|
+
case "ECDH-ES+A256KW":
|
|
46
|
+
a = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
50
|
+
}
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case "OKP": {
|
|
54
|
+
switch (e.alg) {
|
|
55
|
+
case "Ed25519":
|
|
56
|
+
case "EdDSA":
|
|
57
|
+
a = { name: "Ed25519" }, r = e.d ? ["sign"] : ["verify"];
|
|
58
|
+
break;
|
|
59
|
+
case "ECDH-ES":
|
|
60
|
+
case "ECDH-ES+A128KW":
|
|
61
|
+
case "ECDH-ES+A192KW":
|
|
62
|
+
case "ECDH-ES+A256KW":
|
|
63
|
+
a = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
64
|
+
break;
|
|
65
|
+
default:
|
|
66
|
+
throw new s('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
default:
|
|
71
|
+
throw new s('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
72
|
+
}
|
|
73
|
+
return { algorithm: a, keyUsages: r };
|
|
3
74
|
}
|
|
75
|
+
const i = async (e) => {
|
|
76
|
+
if (!e.alg)
|
|
77
|
+
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
78
|
+
const { algorithm: a, keyUsages: r } = n(e), t = { ...e };
|
|
79
|
+
return delete t.alg, delete t.use, crypto.subtle.importKey("jwk", t, a, e.ext ?? !e.d, e.key_ops ?? r);
|
|
80
|
+
};
|
|
4
81
|
export {
|
|
5
|
-
|
|
82
|
+
i as default
|
|
6
83
|
};
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { pad as g } from "./index.native256.js";
|
|
3
|
-
function m(t, i = {}) {
|
|
4
|
-
const { signed: r, size: e } = i, o = BigInt(t);
|
|
5
|
-
let n;
|
|
6
|
-
e ? r ? n = (1n << BigInt(e) * 8n - 1n) - 1n : n = 2n ** (BigInt(e) * 8n) - 1n : typeof t == "number" && (n = BigInt(Number.MAX_SAFE_INTEGER));
|
|
7
|
-
const u = typeof n == "bigint" && r ? -n - 1n : 0;
|
|
8
|
-
if (n && o > n || o < u) {
|
|
9
|
-
const s = typeof t == "bigint" ? "n" : "";
|
|
10
|
-
throw new d({
|
|
11
|
-
max: n ? `${n}${s}` : void 0,
|
|
12
|
-
min: `${u}${s}`,
|
|
13
|
-
signed: r,
|
|
14
|
-
size: e,
|
|
15
|
-
value: `${t}${s}`
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const a = `0x${(r && o < 0 ? (1n << BigInt(e * 8)) + BigInt(o) : o).toString(16)}`;
|
|
19
|
-
return e ? c(a, e) : a;
|
|
20
|
-
}
|
|
21
|
-
function c(t, i) {
|
|
22
|
-
return g(t, { dir: "left", size: i });
|
|
23
|
-
}
|
|
24
|
-
class d extends f {
|
|
25
|
-
constructor({ max: i, min: r, signed: e, size: o, value: n }) {
|
|
26
|
-
super(`Number \`${n}\` is not in safe${o ? ` ${o * 8}-bit` : ""}${e ? " signed" : " unsigned"} integer range ${i ? `(\`${r}\` to \`${i}\`)` : `(above \`${r}\`)`}`), Object.defineProperty(this, "name", {
|
|
27
|
-
enumerable: !0,
|
|
28
|
-
configurable: !0,
|
|
29
|
-
writable: !0,
|
|
30
|
-
value: "Hex.IntegerOutOfRangeError"
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
class p extends f {
|
|
35
|
-
constructor({ size: i, targetSize: r, type: e }) {
|
|
36
|
-
super(`${e.charAt(0).toUpperCase()}${e.slice(1).toLowerCase()} size (\`${i}\`) exceeds padding size (\`${r}\`).`), Object.defineProperty(this, "name", {
|
|
37
|
-
enumerable: !0,
|
|
38
|
-
configurable: !0,
|
|
39
|
-
writable: !0,
|
|
40
|
-
value: "Hex.SizeExceedsPaddingSizeError"
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
var r = { exports: {} };
|
|
44
2
|
export {
|
|
45
|
-
|
|
46
|
-
p as SizeExceedsPaddingSizeError,
|
|
47
|
-
m as fromNumber,
|
|
48
|
-
c as padLeft
|
|
3
|
+
r as __module
|
|
49
4
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { __require as r } from "./index.
|
|
1
|
+
import { __require as r } from "./index.native229.js";
|
|
2
2
|
r();
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { sendUserOperationWithEndUserAccount as s } from "@coinbase/cdp-api-client";
|
|
2
|
-
import { Analytics as
|
|
2
|
+
import { Analytics as o } from "./index.native2.js";
|
|
3
3
|
import "./index.native3.js";
|
|
4
4
|
import { withAuth as n } from "./index.native99.js";
|
|
5
|
-
import { getConfig as t, getCoreAuthManager as
|
|
5
|
+
import { getConfig as t, getCoreAuthManager as p } from "./index.native76.js";
|
|
6
6
|
import "viem";
|
|
7
|
-
import { withMfa as
|
|
7
|
+
import { withMfa as i } from "./index.native85.js";
|
|
8
8
|
import "jose";
|
|
9
9
|
import "./index.native100.js";
|
|
10
10
|
import "./index.native101.js";
|
|
11
11
|
import "@solana/web3.js";
|
|
12
12
|
import "bs58";
|
|
13
|
-
const U = async (r) => (
|
|
13
|
+
const U = async (r) => (o.sendActionCallEvent({ name: "send_user_operation" }), t().useMock ? {
|
|
14
14
|
userOperationHash: "0x1234567890123456789012345678901234567890123456789012345678901234"
|
|
15
|
-
} :
|
|
16
|
-
() => n(r,
|
|
15
|
+
} : i(
|
|
16
|
+
() => n(r, p(), async ({ user: a, walletSecretId: m }) => ({
|
|
17
17
|
userOperationHash: (await s(
|
|
18
18
|
a.userId,
|
|
19
19
|
r.evmSmartAccount,
|
|
@@ -24,9 +24,10 @@ const U = async (r) => (m.sendActionCallEvent({ name: "send_user_operation" }),
|
|
|
24
24
|
value: String(e.value ?? 0n),
|
|
25
25
|
data: e.data ?? "0x"
|
|
26
26
|
})),
|
|
27
|
-
walletSecretId:
|
|
27
|
+
walletSecretId: m,
|
|
28
28
|
useCdpPaymaster: r.useCdpPaymaster ?? !1,
|
|
29
29
|
paymasterUrl: r.paymasterUrl,
|
|
30
|
+
paymasterContext: r.paymasterContext,
|
|
30
31
|
dataSuffix: r.dataSuffix
|
|
31
32
|
},
|
|
32
33
|
{ projectID: t().projectId },
|
|
@@ -1,61 +1,66 @@
|
|
|
1
|
-
import { APIError as
|
|
2
|
-
import { Analytics as
|
|
1
|
+
import { APIError as A, createEndUserEvmSmartAccount as h } from "@coinbase/cdp-api-client";
|
|
2
|
+
import { Analytics as f } from "./index.native2.js";
|
|
3
3
|
import "./index.native3.js";
|
|
4
|
-
import { toAuthStateUser as
|
|
5
|
-
import { InternalError as
|
|
6
|
-
import { createEvmEoaAccount as
|
|
7
|
-
import { validateUserAuthState as
|
|
8
|
-
import { getCoreAuthManager as
|
|
9
|
-
async function
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import { toAuthStateUser as l } from "./index.native103.js";
|
|
5
|
+
import { InternalError as S } from "./index.native90.js";
|
|
6
|
+
import { createEvmEoaAccount as E } from "./index.native54.js";
|
|
7
|
+
import { validateUserAuthState as g } from "./index.native104.js";
|
|
8
|
+
import { getCoreAuthManager as p, getConfig as v } from "./index.native76.js";
|
|
9
|
+
async function M(r) {
|
|
10
|
+
f.sendActionCallEvent({ name: "create_evm_smart_account" });
|
|
11
|
+
const o = p(), { user: t, authState: d } = g(
|
|
12
|
+
o.getUser(),
|
|
13
|
+
o.getAuthState()
|
|
14
14
|
);
|
|
15
|
-
let
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
let n;
|
|
16
|
+
if (r?.owner) {
|
|
17
|
+
const e = r.owner.toLowerCase();
|
|
18
|
+
if (!t.evmAccountObjects?.some(
|
|
19
|
+
(a) => a.address.toLowerCase() === e
|
|
20
|
+
))
|
|
21
|
+
throw new Error(`Owner address ${r.owner} does not belong to the current user`);
|
|
19
22
|
const m = t.evmSmartAccountObjects?.find(
|
|
20
|
-
(
|
|
23
|
+
(a) => a.ownerAddresses.some(
|
|
24
|
+
(w) => w.toLowerCase() === e
|
|
25
|
+
)
|
|
21
26
|
);
|
|
22
27
|
if (m)
|
|
23
28
|
throw new Error(
|
|
24
|
-
`Owner address ${
|
|
29
|
+
`Owner address ${r.owner} already controls smart account ${m.address}`
|
|
25
30
|
);
|
|
26
|
-
|
|
31
|
+
n = r.owner;
|
|
27
32
|
} else
|
|
28
33
|
try {
|
|
29
|
-
|
|
30
|
-
} catch (
|
|
31
|
-
throw
|
|
34
|
+
n = await E();
|
|
35
|
+
} catch (e) {
|
|
36
|
+
throw e instanceof A && e.errorType === "account_limit_exceeded" ? new Error(
|
|
32
37
|
"Cannot create smart account: Maximum number of EOA accounts (10) reached. Please provide an existing EOA address using the 'owner' parameter."
|
|
33
|
-
) :
|
|
38
|
+
) : e;
|
|
34
39
|
}
|
|
35
|
-
const
|
|
40
|
+
const i = await h(
|
|
36
41
|
t.userId,
|
|
37
42
|
{
|
|
38
|
-
owner:
|
|
39
|
-
enableSpendPermissions:
|
|
43
|
+
owner: n,
|
|
44
|
+
enableSpendPermissions: r?.enableSpendPermissions ?? !1
|
|
40
45
|
},
|
|
41
|
-
{ projectID:
|
|
42
|
-
|
|
43
|
-
), s =
|
|
44
|
-
await
|
|
46
|
+
{ projectID: v().projectId },
|
|
47
|
+
r?.idempotencyKey
|
|
48
|
+
), s = l(i);
|
|
49
|
+
await o.setAuthState({
|
|
45
50
|
...d,
|
|
46
51
|
user: s
|
|
47
52
|
});
|
|
48
|
-
const
|
|
49
|
-
t.evmSmartAccountObjects?.map((
|
|
53
|
+
const u = new Set(
|
|
54
|
+
t.evmSmartAccountObjects?.map((e) => e.address) || []
|
|
50
55
|
), c = s.evmSmartAccountObjects?.find(
|
|
51
|
-
(
|
|
56
|
+
(e) => !u.has(e.address)
|
|
52
57
|
)?.address;
|
|
53
58
|
if (!c)
|
|
54
|
-
throw new
|
|
59
|
+
throw new S(
|
|
55
60
|
"EVM Smart Account was not created. Check the network log for more details."
|
|
56
61
|
);
|
|
57
62
|
return c;
|
|
58
63
|
}
|
|
59
64
|
export {
|
|
60
|
-
|
|
65
|
+
M as createEvmSmartAccount
|
|
61
66
|
};
|
|
@@ -2,50 +2,52 @@ import { Analytics as m } from "./index.native2.js";
|
|
|
2
2
|
import "./index.native3.js";
|
|
3
3
|
import { getCurrentUserSync as u } from "./index.native46.js";
|
|
4
4
|
import { sendEvmEoaUsdc as l } from "./index.native68.js";
|
|
5
|
-
import { sendEvmSmartAccountUsdc as
|
|
6
|
-
import { sendSolanaUsdc as
|
|
7
|
-
const
|
|
5
|
+
import { sendEvmSmartAccountUsdc as w } from "./index.native69.js";
|
|
6
|
+
import { sendSolanaUsdc as f } from "./index.native70.js";
|
|
7
|
+
const $ = async (t) => {
|
|
8
8
|
m.sendActionCallEvent({ name: "send_usdc" });
|
|
9
|
-
const { to:
|
|
9
|
+
const { to: o, amount: a } = t, r = u();
|
|
10
10
|
if (!r)
|
|
11
11
|
throw new Error("User must be authenticated to send USDC");
|
|
12
|
-
const e = "from" in t && t.from ? t.from : v(r),
|
|
13
|
-
return A(
|
|
12
|
+
const e = "from" in t && t.from ? t.from : v(r), s = t.network, { fromIsSolana: n } = E(e, o);
|
|
13
|
+
return A(s, n), y(r, e, n), n ? {
|
|
14
14
|
type: "solana",
|
|
15
|
-
transactionSignature: (await
|
|
15
|
+
transactionSignature: (await f({
|
|
16
16
|
solanaAccount: e,
|
|
17
|
-
to:
|
|
18
|
-
amount:
|
|
19
|
-
network:
|
|
17
|
+
to: o,
|
|
18
|
+
amount: a,
|
|
19
|
+
network: s,
|
|
20
20
|
createRecipientAta: "createRecipientAta" in t ? t.createRecipientAta : void 0,
|
|
21
21
|
idempotencyKey: t.idempotencyKey
|
|
22
22
|
})).transactionSignature,
|
|
23
23
|
from: e,
|
|
24
|
-
network:
|
|
25
|
-
} : r.evmAccountObjects?.some(
|
|
24
|
+
network: s
|
|
25
|
+
} : r.evmAccountObjects?.some(
|
|
26
|
+
(c) => c.address.toLowerCase() === e.toLowerCase()
|
|
27
|
+
) ? {
|
|
26
28
|
type: "evm-eoa",
|
|
27
29
|
transactionHash: (await l({
|
|
28
30
|
evmAccount: e,
|
|
29
|
-
to:
|
|
30
|
-
amount:
|
|
31
|
-
network:
|
|
31
|
+
to: o,
|
|
32
|
+
amount: a,
|
|
33
|
+
network: s,
|
|
32
34
|
idempotencyKey: t.idempotencyKey
|
|
33
35
|
})).transactionHash,
|
|
34
36
|
from: e,
|
|
35
|
-
network:
|
|
37
|
+
network: s
|
|
36
38
|
} : {
|
|
37
39
|
type: "evm-smart",
|
|
38
|
-
userOpHash: (await
|
|
40
|
+
userOpHash: (await w({
|
|
39
41
|
evmSmartAccount: e,
|
|
40
|
-
to:
|
|
41
|
-
amount:
|
|
42
|
-
network:
|
|
42
|
+
to: o,
|
|
43
|
+
amount: a,
|
|
44
|
+
network: s,
|
|
43
45
|
useCdpPaymaster: "useCdpPaymaster" in t ? t.useCdpPaymaster : void 0,
|
|
44
46
|
paymasterUrl: "paymasterUrl" in t ? t.paymasterUrl : void 0,
|
|
45
47
|
idempotencyKey: t.idempotencyKey
|
|
46
48
|
})).userOpHash,
|
|
47
49
|
from: e,
|
|
48
|
-
network:
|
|
50
|
+
network: s
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
function i(t) {
|
|
@@ -58,26 +60,26 @@ function h(t) {
|
|
|
58
60
|
return t === "solana" || t === "solana-devnet";
|
|
59
61
|
}
|
|
60
62
|
function v(t) {
|
|
61
|
-
const
|
|
62
|
-
if (!e && !
|
|
63
|
+
const o = t.solanaAccountObjects?.length || 0, a = t.evmSmartAccountObjects?.length || 0, r = t.evmAccountObjects?.length || 0, e = a > 0 || r > 0, s = o > 0;
|
|
64
|
+
if (!e && !s)
|
|
63
65
|
throw new Error(
|
|
64
66
|
"No accounts available. User must have at least one Solana, EVM Smart Account, or EVM Account."
|
|
65
67
|
);
|
|
66
|
-
if (e &&
|
|
68
|
+
if (e && s)
|
|
67
69
|
throw new Error(
|
|
68
70
|
"Multiple account types detected (EVM and Solana). Please specify 'from' address to select which account to send from."
|
|
69
71
|
);
|
|
70
72
|
if (e) {
|
|
71
|
-
if (
|
|
73
|
+
if (a === 1 && r === 1)
|
|
72
74
|
return t.evmSmartAccountObjects[0].address;
|
|
73
|
-
if (r === 1 &&
|
|
75
|
+
if (r === 1 && a === 0)
|
|
74
76
|
return t.evmAccountObjects[0].address;
|
|
75
77
|
throw new Error(
|
|
76
78
|
"Multiple EVM accounts available. Please specify 'from' address to select which account to send from."
|
|
77
79
|
);
|
|
78
80
|
}
|
|
79
|
-
if (
|
|
80
|
-
if (
|
|
81
|
+
if (s) {
|
|
82
|
+
if (o === 1)
|
|
81
83
|
return t.solanaAccountObjects[0].address;
|
|
82
84
|
throw new Error(
|
|
83
85
|
"Multiple Solana accounts available. Please specify 'from' address to select which account to send from."
|
|
@@ -85,35 +87,37 @@ function v(t) {
|
|
|
85
87
|
}
|
|
86
88
|
throw new Error("Unable to auto-select account");
|
|
87
89
|
}
|
|
88
|
-
function E(t,
|
|
89
|
-
const
|
|
90
|
-
if (!
|
|
90
|
+
function E(t, o) {
|
|
91
|
+
const a = i(t), r = d(t), e = i(o), s = d(o);
|
|
92
|
+
if (!a && !r)
|
|
91
93
|
throw new Error(`Invalid 'from' address format: ${t}`);
|
|
92
|
-
if (!e && !
|
|
93
|
-
throw new Error(`Invalid 'to' address format: ${
|
|
94
|
-
if (
|
|
94
|
+
if (!e && !s)
|
|
95
|
+
throw new Error(`Invalid 'to' address format: ${o}`);
|
|
96
|
+
if (a !== e)
|
|
95
97
|
throw new Error(
|
|
96
|
-
`Address type mismatch: 'from' is ${
|
|
98
|
+
`Address type mismatch: 'from' is ${a ? "Solana" : "EVM"} but 'to' is ${e ? "Solana" : "EVM"}`
|
|
97
99
|
);
|
|
98
|
-
return { fromIsSolana:
|
|
100
|
+
return { fromIsSolana: a, fromIsEvm: r };
|
|
99
101
|
}
|
|
100
|
-
function A(t,
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
102
|
+
function A(t, o) {
|
|
103
|
+
const a = h(t);
|
|
104
|
+
if (o && !a)
|
|
103
105
|
throw new Error(`Network mismatch: Solana address provided but network is ${t}`);
|
|
104
|
-
if (!
|
|
106
|
+
if (!o && a)
|
|
105
107
|
throw new Error(`Network mismatch: EVM address provided but network is ${t}`);
|
|
106
108
|
}
|
|
107
|
-
function y(t,
|
|
108
|
-
if (
|
|
109
|
-
if (!t.solanaAccountObjects?.some((e) => e.address ===
|
|
110
|
-
throw new Error(`User does not own Solana account: ${
|
|
109
|
+
function y(t, o, a) {
|
|
110
|
+
if (a) {
|
|
111
|
+
if (!t.solanaAccountObjects?.some((e) => e.address === o))
|
|
112
|
+
throw new Error(`User does not own Solana account: ${o}`);
|
|
111
113
|
} else {
|
|
112
|
-
const r = t.evmAccountObjects?.some((n) => n.address ===
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
const r = o.toLowerCase(), e = t.evmAccountObjects?.some((n) => n.address.toLowerCase() === r), s = t.evmSmartAccountObjects?.some(
|
|
115
|
+
(n) => n.address.toLowerCase() === r
|
|
116
|
+
);
|
|
117
|
+
if (!e && !s)
|
|
118
|
+
throw new Error(`User does not own EVM account: ${o}`);
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
export {
|
|
118
|
-
|
|
122
|
+
$ as sendUsdc
|
|
119
123
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSolanaKeyExportIframe as t, createEvmKeyExportIframe as m } from "./index.
|
|
1
|
+
import { createSolanaKeyExportIframe as t, createEvmKeyExportIframe as m } from "./index.native136.js";
|
|
2
2
|
import { signBitcoinHash as i } from "./index.native67.js";
|
|
3
3
|
import "@coinbase/cdp-api-client";
|
|
4
4
|
import "./index.native2.js";
|