@startbahn/startrail-sdk-js 1.27.1 → 1.28.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 +13 -8
- package/dist/startrail-sdk.js +15405 -14593
- package/package.json +12 -8
- package/types/startrail-sdk-js.d.ts +60 -44
package/README.md
CHANGED
|
@@ -43,8 +43,8 @@ const startrail = new Startrail(params)
|
|
|
43
43
|
- `env` (optional): Environment that impacts on blockchain network, and EOA with startrail Email/Password
|
|
44
44
|
- `production`: Matic network. TORUS production account and Startrail production Auth0 account. It is designed to communicate to Startrail production API.
|
|
45
45
|
- `staging`: Mumbai network. TORUS production account and Startrail staging Auth0 account. It is designed to communicate to Startrail staging API.
|
|
46
|
-
- `
|
|
47
|
-
- `local`: https://localhost:8545 network for local dev. TORUS
|
|
46
|
+
- `lrc`: Mumbai network. TORUS lrc account and Startrail qa Auth0 account. It is designed to communicate to Startrail qa API.
|
|
47
|
+
- `local`: https://localhost:8545 network for local dev. TORUS lrc account and Startrail lrc Auth0 account. It is designed to communicate to localhost API.
|
|
48
48
|
|
|
49
49
|
[For Startrail wallet powered by TORUS]
|
|
50
50
|
- `authAction` (optional): Activate only selected action tab on the Email popup. Wording is also changed based on your choice. It points to
|
|
@@ -59,12 +59,13 @@ const startrail = new Startrail(params)
|
|
|
59
59
|
- `ja`: Japanese
|
|
60
60
|
- `loginProvider` (optional): Login provider preference
|
|
61
61
|
- `email_password`: Email Password login
|
|
62
|
-
- `google`: Google Oauth Login
|
|
63
|
-
- `customUi`: Customising UI. If no parameters are set, default values are applied.
|
|
62
|
+
- `google`: Google Oauth Login
|
|
63
|
+
- `customUi`: Customising UI. If no parameters are set, default values are applied.
|
|
64
64
|
- `logoUrl`: Applied to all logos in Startrail-sdk-js
|
|
65
65
|
- `serviceName`: Applied to all service name in Startrail-sdk-js
|
|
66
66
|
- `contactUrl`: Applied to the contact email in signup Email verification email
|
|
67
67
|
- `words`: See more details in Example section
|
|
68
|
+
- `logoWhiteUrl`: Applied to all white logos on black background in Startrail-sdk-js
|
|
68
69
|
- `callbackUrl` (optional): Callback URL to redirect to from E-Mail template for signup verification
|
|
69
70
|
- `withModal` (optional): Specifies if the Torus Login Provider Modal should be shown. Default value is set to `false`
|
|
70
71
|
- `rpcEndpoint` (optional): RpcEndpoint that is accessed from the wallet you login/signup
|
|
@@ -76,7 +77,7 @@ const startrail = new Startrail(params)
|
|
|
76
77
|
```
|
|
77
78
|
sdk = new Startrail({
|
|
78
79
|
apiPath:'http://localhost:3000/api/v1/',
|
|
79
|
-
env: '
|
|
80
|
+
env: 'lrc',
|
|
80
81
|
wallet: 'startrail',
|
|
81
82
|
authAction: { login: true, signup: false },
|
|
82
83
|
auth0ClientId: 'test-auth0-client-id',
|
|
@@ -88,6 +89,7 @@ sdk = new Startrail({
|
|
|
88
89
|
withModal: true,
|
|
89
90
|
customUi: {
|
|
90
91
|
logoUrl: 'https://sample.com/logo',
|
|
92
|
+
logoWhiteUrl: 'https://sample.com/white-logo',
|
|
91
93
|
serviceName: 'your service',
|
|
92
94
|
contactUrl: 'contact@startrail.io',
|
|
93
95
|
words: {
|
|
@@ -95,7 +97,8 @@ sdk = new Startrail({
|
|
|
95
97
|
modal: {
|
|
96
98
|
continueLogin: 'Login with previous {verifier} account', // {verifier} is optional but to be replaced programmatically with the login provider name if it exists in the sentence
|
|
97
99
|
termsConditions: 'your termsConditions',
|
|
98
|
-
termsConditionsLinkUrl: 'your termsConditionsLinkUrl'
|
|
100
|
+
termsConditionsLinkUrl: 'your termsConditionsLinkUrl',
|
|
101
|
+
privacyPolicyLinkUrl: 'your privacyPolicyLinkUrl'
|
|
99
102
|
},
|
|
100
103
|
signPopup: {
|
|
101
104
|
title: 'your title',
|
|
@@ -113,7 +116,8 @@ sdk = new Startrail({
|
|
|
113
116
|
modal: {
|
|
114
117
|
continueLogin: '前回の{verifier}アカウントを使う', // {verifier}は任意ですが、文言の中に存在していれば選択したログイン方法の名前へと自動的に置き換わります。
|
|
115
118
|
termsConditions: 'あなたの termsConditions',
|
|
116
|
-
termsConditionsLinkUrl: 'あなたの termsConditionsLinkUrl'
|
|
119
|
+
termsConditionsLinkUrl: 'あなたの termsConditionsLinkUrl',
|
|
120
|
+
privacyPolicyLinkUrl: 'あなたの privacyPolicyLinkUrl'
|
|
117
121
|
},
|
|
118
122
|
signPopup: {
|
|
119
123
|
title: 'あなたの title',
|
|
@@ -126,6 +130,7 @@ sdk = new Startrail({
|
|
|
126
130
|
titleLogin: 'あなたの titleLogin',
|
|
127
131
|
titleSignup: 'あなたの titleSignup'
|
|
128
132
|
}
|
|
133
|
+
}
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
})
|
|
@@ -133,4 +138,4 @@ sdk = new Startrail({
|
|
|
133
138
|
|
|
134
139
|
## Tips
|
|
135
140
|
If you use Metamask, call sdk.login() before requesting users to sign or call API, in order to fetch currently active EOA and compare
|
|
136
|
-
it in your web-application, because it is not possible by SDK to stop users from switching EOA.
|
|
141
|
+
it in your web-application, because it is not possible by SDK to stop users from switching EOA.
|