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.
- package/README.md +1 -83
- package/dist/pluto-sdk.js +265 -266
- package/package.json +34 -40
- package/lib/App.d.ts +0 -24
- package/lib/App.js +0 -73
- package/lib/adsgram.d.ts +0 -28
- package/lib/adsgram.js +0 -1
- package/lib/components/AddScreenButton/index.d.ts +0 -14
- package/lib/components/AddScreenButton/index.js +0 -29
- package/lib/components/BlurMask/index.d.ts +0 -10
- package/lib/components/BlurMask/index.js +0 -14
- package/lib/components/CatAni/index.d.ts +0 -22
- package/lib/components/CatAni/index.js +0 -223
- package/lib/components/CheckIn/index.d.ts +0 -49
- package/lib/components/CheckIn/index.js +0 -142
- package/lib/components/CheckInButton/index.d.ts +0 -31
- package/lib/components/CheckInButton/index.js +0 -51
- package/lib/components/CheckInInfo/index.d.ts +0 -10
- package/lib/components/CheckInInfo/index.js +0 -17
- package/lib/components/ContentBg/index.d.ts +0 -10
- package/lib/components/ContentBg/index.js +0 -15
- package/lib/components/ContentTitle/index.d.ts +0 -14
- package/lib/components/ContentTitle/index.js +0 -16
- package/lib/components/GameInfo/index.d.ts +0 -10
- package/lib/components/GameInfo/index.js +0 -18
- package/lib/components/GameTag/index.d.ts +0 -14
- package/lib/components/GameTag/index.js +0 -18
- package/lib/components/Index/index.d.ts +0 -10
- package/lib/components/Index/index.js +0 -15
- package/lib/components/Introduction/index.d.ts +0 -10
- package/lib/components/Introduction/index.js +0 -17
- package/lib/components/Loading/index.d.ts +0 -5
- package/lib/components/Loading/index.js +0 -77
- package/lib/components/Login/index.d.ts +0 -21
- package/lib/components/Login/index.js +0 -55
- package/lib/components/NetLoading/index.d.ts +0 -7
- package/lib/components/NetLoading/index.js +0 -12
- package/lib/components/OrientationChange/index.d.ts +0 -5
- package/lib/components/OrientationChange/index.js +0 -57
- package/lib/components/PayButton/index.d.ts +0 -18
- package/lib/components/PayButton/index.js +0 -23
- package/lib/components/PlayButton/index.d.ts +0 -29
- package/lib/components/PlayButton/index.js +0 -51
- package/lib/components/Purchase/index.d.ts +0 -68
- package/lib/components/Purchase/index.js +0 -242
- package/lib/components/PurchaseInfo/index.d.ts +0 -10
- package/lib/components/PurchaseInfo/index.js +0 -18
- package/lib/components/PurchaseTitle/index.d.ts +0 -10
- package/lib/components/PurchaseTitle/index.js +0 -15
- package/lib/components/ShareButton/index.d.ts +0 -14
- package/lib/components/ShareButton/index.js +0 -66
- package/lib/components/SignIn/index.d.ts +0 -44
- package/lib/components/SignIn/index.js +0 -91
- package/lib/components/SignInButton/index.d.ts +0 -31
- package/lib/components/SignInButton/index.js +0 -51
- package/lib/components/SingInInfo/index.d.ts +0 -14
- package/lib/components/SingInInfo/index.js +0 -16
- package/lib/components/StrokeText/index.d.ts +0 -19
- package/lib/components/StrokeText/index.js +0 -35
- package/lib/components/Toast/index.d.ts +0 -4
- package/lib/components/Toast/index.js +0 -94
- package/lib/components/WalletInfo/index.d.ts +0 -36
- package/lib/components/WalletInfo/index.js +0 -105
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -4
- package/lib/interface.d.ts +0 -81
- package/lib/interface.js +0 -1
- package/lib/main.d.ts +0 -5
- package/lib/main.js +0 -46
- package/lib/sdk.d.ts +0 -145
- package/lib/sdk.js +0 -755
- package/lib/utils/Api.d.ts +0 -103
- package/lib/utils/Api.js +0 -226
- package/lib/utils/EventManager.d.ts +0 -43
- package/lib/utils/EventManager.js +0 -95
- package/lib/utils/Net.d.ts +0 -24
- package/lib/utils/Net.js +0 -72
- package/lib/utils/Platform.d.ts +0 -140
- package/lib/utils/Platform.js +0 -478
- package/lib/utils/User.d.ts +0 -71
- package/lib/utils/User.js +0 -91
- package/lib/utils/Utils.d.ts +0 -40
- package/lib/utils/Utils.js +0 -137
- package/lib/utils/WalletManager.d.ts +0 -60
- package/lib/utils/WalletManager.js +0 -272
- package/lib/utils/config.d.ts +0 -29
- package/lib/utils/config.js +0 -131
- package/lib/utils/constant.d.ts +0 -102
- 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
|