plutosdk 1.0.7 → 1.0.9-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +1 -83
  2. package/dist/pluto-sdk.js +265 -266
  3. package/package.json +34 -40
  4. package/lib/App.d.ts +0 -24
  5. package/lib/App.js +0 -73
  6. package/lib/adsgram.d.ts +0 -28
  7. package/lib/adsgram.js +0 -1
  8. package/lib/components/AddScreenButton/index.d.ts +0 -14
  9. package/lib/components/AddScreenButton/index.js +0 -29
  10. package/lib/components/BlurMask/index.d.ts +0 -10
  11. package/lib/components/BlurMask/index.js +0 -14
  12. package/lib/components/CatAni/index.d.ts +0 -22
  13. package/lib/components/CatAni/index.js +0 -223
  14. package/lib/components/CheckIn/index.d.ts +0 -49
  15. package/lib/components/CheckIn/index.js +0 -142
  16. package/lib/components/CheckInButton/index.d.ts +0 -31
  17. package/lib/components/CheckInButton/index.js +0 -51
  18. package/lib/components/CheckInInfo/index.d.ts +0 -10
  19. package/lib/components/CheckInInfo/index.js +0 -17
  20. package/lib/components/ContentBg/index.d.ts +0 -10
  21. package/lib/components/ContentBg/index.js +0 -15
  22. package/lib/components/ContentTitle/index.d.ts +0 -14
  23. package/lib/components/ContentTitle/index.js +0 -16
  24. package/lib/components/GameInfo/index.d.ts +0 -10
  25. package/lib/components/GameInfo/index.js +0 -18
  26. package/lib/components/GameTag/index.d.ts +0 -14
  27. package/lib/components/GameTag/index.js +0 -18
  28. package/lib/components/Index/index.d.ts +0 -10
  29. package/lib/components/Index/index.js +0 -15
  30. package/lib/components/Introduction/index.d.ts +0 -10
  31. package/lib/components/Introduction/index.js +0 -17
  32. package/lib/components/Loading/index.d.ts +0 -5
  33. package/lib/components/Loading/index.js +0 -77
  34. package/lib/components/Login/index.d.ts +0 -21
  35. package/lib/components/Login/index.js +0 -55
  36. package/lib/components/NetLoading/index.d.ts +0 -7
  37. package/lib/components/NetLoading/index.js +0 -12
  38. package/lib/components/OrientationChange/index.d.ts +0 -5
  39. package/lib/components/OrientationChange/index.js +0 -57
  40. package/lib/components/PayButton/index.d.ts +0 -18
  41. package/lib/components/PayButton/index.js +0 -23
  42. package/lib/components/PlayButton/index.d.ts +0 -29
  43. package/lib/components/PlayButton/index.js +0 -51
  44. package/lib/components/Purchase/index.d.ts +0 -68
  45. package/lib/components/Purchase/index.js +0 -242
  46. package/lib/components/PurchaseInfo/index.d.ts +0 -10
  47. package/lib/components/PurchaseInfo/index.js +0 -18
  48. package/lib/components/PurchaseTitle/index.d.ts +0 -10
  49. package/lib/components/PurchaseTitle/index.js +0 -15
  50. package/lib/components/ShareButton/index.d.ts +0 -14
  51. package/lib/components/ShareButton/index.js +0 -66
  52. package/lib/components/SignIn/index.d.ts +0 -44
  53. package/lib/components/SignIn/index.js +0 -91
  54. package/lib/components/SignInButton/index.d.ts +0 -31
  55. package/lib/components/SignInButton/index.js +0 -51
  56. package/lib/components/SingInInfo/index.d.ts +0 -14
  57. package/lib/components/SingInInfo/index.js +0 -16
  58. package/lib/components/StrokeText/index.d.ts +0 -19
  59. package/lib/components/StrokeText/index.js +0 -35
  60. package/lib/components/Toast/index.d.ts +0 -4
  61. package/lib/components/Toast/index.js +0 -94
  62. package/lib/components/WalletInfo/index.d.ts +0 -36
  63. package/lib/components/WalletInfo/index.js +0 -105
  64. package/lib/index.d.ts +0 -1
  65. package/lib/index.js +0 -4
  66. package/lib/interface.d.ts +0 -81
  67. package/lib/interface.js +0 -1
  68. package/lib/main.d.ts +0 -5
  69. package/lib/main.js +0 -46
  70. package/lib/sdk.d.ts +0 -145
  71. package/lib/sdk.js +0 -755
  72. package/lib/utils/Api.d.ts +0 -103
  73. package/lib/utils/Api.js +0 -226
  74. package/lib/utils/EventManager.d.ts +0 -43
  75. package/lib/utils/EventManager.js +0 -95
  76. package/lib/utils/Net.d.ts +0 -24
  77. package/lib/utils/Net.js +0 -72
  78. package/lib/utils/Platform.d.ts +0 -140
  79. package/lib/utils/Platform.js +0 -478
  80. package/lib/utils/User.d.ts +0 -71
  81. package/lib/utils/User.js +0 -91
  82. package/lib/utils/Utils.d.ts +0 -40
  83. package/lib/utils/Utils.js +0 -137
  84. package/lib/utils/WalletManager.d.ts +0 -60
  85. package/lib/utils/WalletManager.js +0 -272
  86. package/lib/utils/config.d.ts +0 -29
  87. package/lib/utils/config.js +0 -131
  88. package/lib/utils/constant.d.ts +0 -102
  89. package/lib/utils/constant.js +0 -110
package/README.md CHANGED
@@ -1,83 +1 @@
1
- # Pluto SDK for Telegram
2
-
3
- # Getting started
4
-
5
- ## Add the configuration required by sdk, and installation telegram web app sdk with cdn.
6
- Add the script to your HTML file:
7
- ```html
8
- <meta name="viewport" content="initial-scale=1, width=device-width" />
9
- <meta name="theme-color" content="#000000" />
10
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
11
- <script src="https://telegram.org/js/telegram-web-app.js"></script>
12
- ```
13
-
14
- ## Installation pluto sdk with cdn
15
- Add the script inside the body tag of your HTML file:
16
- ```html
17
- <script src="https://unpkg.com/plutosdk@latest/dist/pluto-sdk.js"></script>
18
- ```
19
-
20
- ℹ️ If you don't want auto-update the library, pass concrete version instead of `latest`, e.g.
21
- ```html
22
- <script src="https://unpkg.com/plutosdk@0.0.1/dist/pluto-sdk.js"></script>
23
- ```
24
-
25
- # Usage
26
-
27
- You can use global variable `PlutoSDK`
28
-
29
- ## init
30
- ```js
31
- PlutoSDK.init()
32
- ```
33
- It returns a promise that resolves after init success.
34
-
35
- ## login
36
- ```js
37
- PlutoSDK.login()
38
- ```
39
- It returns a promise that resolves after login success.
40
-
41
- ## ready
42
- ```js
43
- PlutoSDK.ready()
44
- ```
45
- This method is called after login is complete. Call this method at the appropriate time to notify the SDK to delete the loading animation.
46
-
47
- ## share
48
- ```js
49
- PlutoSDK.share()
50
- ```
51
- This method is shared in telegram.
52
-
53
- ## purchase
54
- ```js
55
- PlutoSDK.purchase(name, orderId, amount, customData, callback)
56
- ```
57
- This method accepts the `name orderId amount customData callback` as parameters. `customData` and `callback` are optional parameters.
58
- Please note that the this pointer of the callback method `callback` will be changed.
59
-
60
- ## getShareLink
61
- ```js
62
- PlutoSDK.getShareLink()
63
- ```
64
- This method is get share link.
65
-
66
- ## copyShareLink
67
- ```js
68
- PlutoSDK.copyShareLink()
69
- ```
70
- This method is copy share link to clipboard.
71
-
72
- ## getItem
73
- ```js
74
- PlutoSDK.getItem(key)
75
- ```
76
- This method that receives a value from the server using the specified key. It returns a promise.
77
-
78
- ## setItem
79
- ```js
80
- PlutoSDK.setItem(key, value)
81
- ```
82
- This method that stores a value in the server using the specified key. It returns a promise.
83
-
1
+ # Pluto SDK for Telegram mini app