@ledgerhq/types-live 6.24.0 → 6.24.1-nightly.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.
@@ -1,4 +1,4 @@
1
- @ledgerhq/types-live:build: cache hit, replaying output 1e652508a6d1f8d5
1
+ @ledgerhq/types-live:build: cache hit, replaying output db3b252c332e8f48
2
2
  @ledgerhq/types-live:build:
3
3
  @ledgerhq/types-live:build: > @ledgerhq/types-live@6.24.0 build /home/runner/work/ledger-live/ledger-live/libs/ledgerjs/packages/types-live
4
4
  @ledgerhq/types-live:build: > tsc && tsc -m ES6 --outDir lib-es
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ledgerhq/types-live
2
2
 
3
+ ## 6.24.1-nightly.0
4
+
5
+ ### Patch Changes
6
+
7
+ - [#943](https://github.com/LedgerHQ/ledger-live/pull/943) [`8465b5e317`](https://github.com/LedgerHQ/ledger-live/commit/8465b5e317baecaf8f893b9c090537d2d03ac835) Thanks [@ofreyssinet-ledger](https://github.com/ofreyssinet-ledger)! - Add postOnboarding types
8
+
3
9
  ## 6.24.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -134,26 +134,51 @@ Ledger Live main types.
134
134
  * [PortfolioRange](#portfoliorange)
135
135
  * [AssetsDistribution](#assetsdistribution)
136
136
  * [Properties](#properties-43)
137
- * [SwapOperation](#swapoperation)
137
+ * [PostOnboardingActionId](#postonboardingactionid)
138
+ * [PostOnboardingAction](#postonboardingaction)
138
139
  * [Properties](#properties-44)
139
- * [SwapOperationRaw](#swapoperationraw)
140
+ * [featureFlagId](#featureflagid)
141
+ * [navigationParams](#navigationparams)
142
+ * [Icon](#icon)
143
+ * [title](#title)
144
+ * [description](#description)
145
+ * [tagLabel](#taglabel)
146
+ * [actionCompletedPopupLabel](#actioncompletedpopuplabel)
147
+ * [actionCompletedHubTitle](#actioncompletedhubtitle)
148
+ * [startEvent](#startevent)
149
+ * [startEventProperties](#starteventproperties)
150
+ * [PostOnboardingActionState](#postonboardingactionstate)
140
151
  * [Properties](#properties-45)
141
- * [SignedOperation](#signedoperation)
152
+ * [completed](#completed)
153
+ * [PostOnboardingState](#postonboardingstate)
142
154
  * [Properties](#properties-46)
143
- * [SignedOperationRaw](#signedoperationraw)
155
+ * [deviceModelId](#devicemodelid)
156
+ * [walletEntryPointDismissed](#walletentrypointdismissed)
157
+ * [actionsToComplete](#actionstocomplete)
158
+ * [actionsCompleted](#actionscompleted)
159
+ * [lastActionCompleted](#lastactioncompleted)
160
+ * [PostOnboardingHubState](#postonboardinghubstate)
144
161
  * [Properties](#properties-47)
162
+ * [SwapOperation](#swapoperation)
163
+ * [Properties](#properties-48)
164
+ * [SwapOperationRaw](#swapoperationraw)
165
+ * [Properties](#properties-49)
166
+ * [SignedOperation](#signedoperation)
167
+ * [Properties](#properties-50)
168
+ * [SignedOperationRaw](#signedoperationraw)
169
+ * [Properties](#properties-51)
145
170
  * [SignOperationEvent](#signoperationevent)
146
171
  * [SignOperationEventRaw](#signoperationeventraw)
147
172
  * [TransactionCommon](#transactioncommon)
148
- * [Properties](#properties-48)
173
+ * [Properties](#properties-52)
149
174
  * [TransactionCommonRaw](#transactioncommonraw)
150
- * [Properties](#properties-49)
175
+ * [Properties](#properties-53)
151
176
  * [FeeStrategy](#feestrategy)
152
- * [Properties](#properties-50)
177
+ * [Properties](#properties-54)
153
178
  * [TransactionStatusCommon](#transactionstatuscommon)
154
- * [Properties](#properties-51)
179
+ * [Properties](#properties-55)
155
180
  * [TransactionStatusCommonRaw](#transactionstatuscommonraw)
156
- * [Properties](#properties-52)
181
+ * [Properties](#properties-56)
157
182
 
158
183
  ### TokenAccount
159
184
 
@@ -457,7 +482,7 @@ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
457
482
 
458
483
  Add others with union (e.g. "learn" | "market" | "foo")
459
484
 
460
- Type: (`"learn"` | `"pushNotifications"` | `"llmUsbFirmwareUpdate"` | `"ratings"` | `"counterValue"` | `"buyDeviceFromLive"` | `"ptxSmartRouting"` | `"currencyOsmosis"` | `"currencyOsmosisMobile"` | `"ptxSmartRoutingMobile"` | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))
485
+ Type: (`"learn"` | `"pushNotifications"` | `"llmUsbFirmwareUpdate"` | `"ratings"` | `"counterValue"` | `"buyDeviceFromLive"` | `"ptxSmartRouting"` | `"currencyOsmosis"` | `"currencyOsmosisMobile"` | `"currencyFantom"` | `"currencyMoonbeam"` | `"currencyCronos"` | `"currencySongbird"` | `"currencyFlare"` | `"currencyFantomMobile"` | `"currencyMoonbeamMobile"` | `"currencyCronosMobile"` | `"currencySongbirdMobile"` | `"currencyFlareMobile"` | `"ptxSmartRoutingMobile"` | `"mockFeature"` | `"walletConnectLiveApp"` | `"customImage"`)
461
486
 
462
487
  ### Feature
463
488
 
@@ -842,7 +867,7 @@ Type: {ticker: [string](https://developer.mozilla.org/docs/Web/JavaScript/Refere
842
867
 
843
868
  ### OperationType
844
869
 
845
- Type: (`"IN"` | `"OUT"` | `"NONE"` | `"CREATE"` | `"REVEAL"` | `"DELEGATE"` | `"UNDELEGATE"` | `"REDELEGATE"` | `"REWARD"` | `"FEES"` | `"FREEZE"` | `"UNFREEZE"` | `"VOTE"` | `"REWARD_PAYOUT"` | `"BOND"` | `"UNBOND"` | `"WITHDRAW_UNBONDED"` | `"SET_CONTROLLER"` | `"SLASH"` | `"NOMINATE"` | `"CHILL"` | `"SUPPLY"` | `"REDEEM"` | `"APPROVE"` | `"OPT_IN"` | `"OPT_OUT"` | `"NFT_IN"` | `"NFT_OUT"`)
870
+ Type: (`"IN"` | `"OUT"` | `"NONE"` | `"CREATE"` | `"REVEAL"` | `"DELEGATE"` | `"UNDELEGATE"` | `"REDELEGATE"` | `"REWARD"` | `"FEES"` | `"FREEZE"` | `"UNFREEZE"` | `"VOTE"` | `"REWARD_PAYOUT"` | `"BOND"` | `"UNBOND"` | `"WITHDRAW_UNBONDED"` | `"SET_CONTROLLER"` | `"SLASH"` | `"NOMINATE"` | `"CHILL"` | `"SUPPLY"` | `"REDEEM"` | `"APPROVE"` | `"OPT_IN"` | `"OPT_OUT"` | `"LOCK"` | `"UNLOCK"` | `"WITHDRAW"` | `"REVOKE"` | `"ACTIVATE"` | `"REGISTER"` | `"NFT_IN"` | `"NFT_OUT"`)
846
871
 
847
872
  ### Operation
848
873
 
@@ -1044,6 +1069,180 @@ Type: {isAvailable: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/
1044
1069
  * `showFirst` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
1045
1070
  * `sum` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**
1046
1071
 
1072
+ ### PostOnboardingActionId
1073
+
1074
+ Unique identifier of a post onboarding action.
1075
+
1076
+ ### PostOnboardingAction
1077
+
1078
+ All necessary information for complete integration of a post onboarding
1079
+ action.
1080
+
1081
+ Type: {id: [PostOnboardingActionId](#postonboardingactionid), featureFlagId: [FeatureId](#featureid)?, navigationParams: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<any>?, Icon: function (props: {size: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), color: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}): any, title: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), description: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), tagLabel: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, actionCompletedPopupLabel: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), actionCompletedHubTitle: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), startEvent: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, startEventProperties: any?}
1082
+
1083
+ #### Properties
1084
+
1085
+ * `id` **[PostOnboardingActionId](#postonboardingactionid)**
1086
+ * `featureFlagId` **[FeatureId](#featureid)?**
1087
+ * `navigationParams` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<any>?**
1088
+ * `Icon` **function (props: {size: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), color: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}): any**
1089
+ * `title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1090
+ * `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1091
+ * `tagLabel` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**
1092
+ * `actionCompletedPopupLabel` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1093
+ * `actionCompletedHubTitle` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1094
+ * `startEvent` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**
1095
+ * `startEventProperties` **any?**
1096
+
1097
+ #### featureFlagId
1098
+
1099
+ If this action is linked to a feature that is enabled by a feature flag,
1100
+ use this property to identify the feature flag.
1101
+
1102
+ Type: [FeatureId](#featureid)
1103
+
1104
+ #### navigationParams
1105
+
1106
+ Navigation params when the user presses the button for this action
1107
+
1108
+ * In LLM, this will be used like this:
1109
+ `navigation.navigate(...navigationParams)`
1110
+ * In LLD, this will be used like this:
1111
+ `history.push(...navigationParams)`
1112
+
1113
+ Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<any>
1114
+
1115
+ #### Icon
1116
+
1117
+ Icon displayed for this action in the post onboarding hub.
1118
+
1119
+ Type: function (props: {size: [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), color: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)}): any
1120
+
1121
+ #### title
1122
+
1123
+ Title displayed for this action in the post onboarding hub.
1124
+
1125
+ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
1126
+
1127
+ #### description
1128
+
1129
+ Description displayed for this action in the post onboarding hub.
1130
+
1131
+ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
1132
+
1133
+ #### tagLabel
1134
+
1135
+ Tag displayed for this action in the post onboarding hub.
1136
+
1137
+ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
1138
+
1139
+ #### actionCompletedPopupLabel
1140
+
1141
+ Will appear in an success alert at the bottom of the post-onboarding hub
1142
+ after completing this action.
1143
+
1144
+ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
1145
+
1146
+ #### actionCompletedHubTitle
1147
+
1148
+ Will be used as a title success alert at the bottom of the post-onboarding
1149
+ hub after completing this action.
1150
+
1151
+ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
1152
+
1153
+ #### startEvent
1154
+
1155
+ Event that will be dispatched when starting this action.
1156
+
1157
+ Type: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
1158
+
1159
+ #### startEventProperties
1160
+
1161
+ Event properties that will be dispatched when starting this action.
1162
+
1163
+ Type: any
1164
+
1165
+ ### PostOnboardingActionState
1166
+
1167
+ State of a post onboarding action.
1168
+
1169
+ Type: {completed: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)}
1170
+
1171
+ #### Properties
1172
+
1173
+ * `completed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
1174
+
1175
+ #### completed
1176
+
1177
+ Whether the user has completed this action. This will be reflected in the
1178
+ UI of the post onboarding hub.
1179
+
1180
+ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
1181
+
1182
+ ### PostOnboardingState
1183
+
1184
+ To be used for a redux reducer.
1185
+ Keeps all necessary information about the state of the post onboarding hub
1186
+ and can be persisted in storage.
1187
+
1188
+ Type: {deviceModelId: (DeviceModelId | null), walletEntryPointDismissed: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean), actionsToComplete: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[PostOnboardingActionId](#postonboardingactionid)>, actionsCompleted: any, lastActionCompleted: ([PostOnboardingActionId](#postonboardingactionid) | null)}
1189
+
1190
+ #### Properties
1191
+
1192
+ * `deviceModelId` **(DeviceModelId | null)**
1193
+ * `walletEntryPointDismissed` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
1194
+ * `actionsToComplete` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[PostOnboardingActionId](#postonboardingactionid)>**
1195
+ * `actionsCompleted` **any**
1196
+ * `lastActionCompleted` **([PostOnboardingActionId](#postonboardingactionid) | null)**
1197
+
1198
+ #### deviceModelId
1199
+
1200
+ Model Id of the device for which the post onboarding was started.
1201
+
1202
+ Type: (DeviceModelId | null)
1203
+
1204
+ #### walletEntryPointDismissed
1205
+
1206
+ Did the user dismiss the post onboarding entry point on the wallet page.
1207
+
1208
+ Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
1209
+
1210
+ #### actionsToComplete
1211
+
1212
+ List of all actions that have to be completed in this post onboarding
1213
+ (whether they are completed or).
1214
+ This is used to populate the list of actions in the post onboarding hub UI.
1215
+
1216
+ Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[PostOnboardingActionId](#postonboardingactionid)>
1217
+
1218
+ #### actionsCompleted
1219
+
1220
+ "completed" state for each action.
1221
+
1222
+ Type: any
1223
+
1224
+ #### lastActionCompleted
1225
+
1226
+ Last action that the user has completed.
1227
+
1228
+ This is used to display potentially different content in the post
1229
+ onboarding hub UI depending on the last action that was completed.
1230
+
1231
+ Type: ([PostOnboardingActionId](#postonboardingactionid) | null)
1232
+
1233
+ ### PostOnboardingHubState
1234
+
1235
+ Digest of the store & list of actions into something directly consumable
1236
+ by UI. (All UI data will be in there).
1237
+
1238
+ Type: {deviceModelId: (DeviceModelId | null), lastActionCompleted: ([PostOnboardingAction](#postonboardingaction) | null), actionsState: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<any>}
1239
+
1240
+ #### Properties
1241
+
1242
+ * `deviceModelId` **(DeviceModelId | null)**
1243
+ * `lastActionCompleted` **([PostOnboardingAction](#postonboardingaction) | null)**
1244
+ * `actionsState` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<any>**
1245
+
1047
1246
  ### SwapOperation
1048
1247
 
1049
1248
  Type: {provider: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), swapId: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), status: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), receiverAccountId: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), tokenId: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?, operationId: [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), fromAmount: BigNumber, toAmount: BigNumber}
package/lib/feature.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Add others with union (e.g. "learn" | "market" | "foo") */
2
- export declare type FeatureId = "learn" | "pushNotifications" | "llmUsbFirmwareUpdate" | "ratings" | "counterValue" | "buyDeviceFromLive" | "ptxSmartRouting" | "currencyOsmosis" | "currencyOsmosisMobile" | "ptxSmartRoutingMobile" | string;
2
+ export declare type FeatureId = "learn" | "pushNotifications" | "llmUsbFirmwareUpdate" | "ratings" | "counterValue" | "buyDeviceFromLive" | "ptxSmartRouting" | "currencyOsmosis" | "currencyOsmosisMobile" | "currencyFantom" | "currencyMoonbeam" | "currencyCronos" | "currencySongbird" | "currencyFlare" | "currencyFantomMobile" | "currencyMoonbeamMobile" | "currencyCronosMobile" | "currencySongbirdMobile" | "currencyFlareMobile" | "ptxSmartRoutingMobile" | "mockFeature" | "walletConnectLiveApp" | "customImage";
3
3
  /** We use objects instead of direct booleans for potential future improvements
4
4
  like feature versioning etc */
5
5
  export declare type Feature = {
@@ -19,6 +19,6 @@ export declare type Feature = {
19
19
  };
20
20
  /** */
21
21
  export declare type DefaultFeatures = {
22
- [key in FeatureId]: Feature;
22
+ [key in FeatureId]?: Feature;
23
23
  };
24
24
  //# sourceMappingURL=feature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../src/feature.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oBAAY,SAAS,GACjB,OAAO,GACP,mBAAmB,GACnB,sBAAsB,GACtB,SAAS,GACT,cAAc,GACd,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,uBAAuB,GACvB,uBAAuB,GACvB,MAAM,CAAC;AAEX;8BAC8B;AAC9B,oBAAY,OAAO,GAAG;IACpB,6GAA6G;IAC7G,OAAO,EAAE,OAAO,CAAC;IACjB,sJAAsJ;IACtJ,gHAAgH;IAChH,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACjC,0DAA0D;IAC1D,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACjC,oHAAoH;IACpH,mCAAmC,CAAC,EAAE,OAAO,CAAC;IAC9C,oEAAoE;IACpE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB;IACxB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM;AACN,oBAAY,eAAe,GAAG;KAAG,GAAG,IAAI,SAAS,GAAG,OAAO;CAAE,CAAC"}
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../src/feature.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oBAAY,SAAS,GACjB,OAAO,GACP,mBAAmB,GACnB,sBAAsB,GACtB,SAAS,GACT,cAAc,GACd,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,uBAAuB,GACvB,gBAAgB,GAChB,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,sBAAsB,GACtB,wBAAwB,GACxB,sBAAsB,GACtB,wBAAwB,GACxB,qBAAqB,GACrB,uBAAuB,GACvB,aAAa,GACb,sBAAsB,GACtB,aAAa,CAAC;AAElB;8BAC8B;AAC9B,oBAAY,OAAO,GAAG;IACpB,6GAA6G;IAC7G,OAAO,EAAE,OAAO,CAAC;IACjB,sJAAsJ;IACtJ,gHAAgH;IAChH,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACjC,0DAA0D;IAC1D,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACjC,oHAAoH;IACpH,mCAAmC,CAAC,EAAE,OAAO,CAAC;IAC9C,oEAAoE;IACpE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB;IACxB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM;AACN,oBAAY,eAAe,GAAG;KAAG,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO;CAAE,CAAC"}
package/lib/index.d.ts CHANGED
@@ -9,4 +9,5 @@ export * from "./operation";
9
9
  export * from "./pagination";
10
10
  export * from "./portfolio";
11
11
  export * from "./transaction";
12
+ export * from "./postOnboarding";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
package/lib/index.js CHANGED
@@ -25,4 +25,5 @@ __exportStar(require("./operation"), exports);
25
25
  __exportStar(require("./pagination"), exports);
26
26
  __exportStar(require("./portfolio"), exports);
27
27
  __exportStar(require("./transaction"), exports);
28
+ __exportStar(require("./postOnboarding"), exports);
28
29
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,4CAA0B;AAC1B,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,4CAA0B;AAC1B,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;AAC5B,gDAA8B;AAC9B,mDAAiC"}
@@ -3,7 +3,7 @@ import { NFTStandard } from "./nft";
3
3
  /**
4
4
  *
5
5
  */
6
- export declare type OperationType = "IN" | "OUT" | "NONE" | "CREATE" | "REVEAL" | "DELEGATE" | "UNDELEGATE" | "REDELEGATE" | "REWARD" | "FEES" | "FREEZE" | "UNFREEZE" | "VOTE" | "REWARD_PAYOUT" | "BOND" | "UNBOND" | "WITHDRAW_UNBONDED" | "SET_CONTROLLER" | "SLASH" | "NOMINATE" | "CHILL" | "SUPPLY" | "REDEEM" | "APPROVE" | "OPT_IN" | "OPT_OUT" | "NFT_IN" | "NFT_OUT";
6
+ export declare type OperationType = "IN" | "OUT" | "NONE" | "CREATE" | "REVEAL" | "DELEGATE" | "UNDELEGATE" | "REDELEGATE" | "REWARD" | "FEES" | "FREEZE" | "UNFREEZE" | "VOTE" | "REWARD_PAYOUT" | "BOND" | "UNBOND" | "WITHDRAW_UNBONDED" | "SET_CONTROLLER" | "SLASH" | "NOMINATE" | "CHILL" | "SUPPLY" | "REDEEM" | "APPROVE" | "OPT_IN" | "OPT_OUT" | "LOCK" | "UNLOCK" | "WITHDRAW" | "REVOKE" | "ACTIVATE" | "REGISTER" | "NFT_IN" | "NFT_OUT";
7
7
  /**
8
8
  *
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../src/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC;;GAEG;AACH,oBAAY,aAAa,GACrB,IAAI,GACJ,KAAK,GACL,MAAM,GACN,QAAQ,GACR,QAAQ,GAER,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,QAAQ,GAER,MAAM,GACN,QAAQ,GACR,UAAU,GAEV,MAAM,GACN,eAAe,GACf,MAAM,GACN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C;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,QAAQ,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE3B,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAG/B,kBAAkB,CAAC,EAAE,YAAY,EAAE,CAAC;IAEpC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC,GAAG,EAAE,IAAI,CAAC;IACV,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,oBAAY,eAAe,GAAG;IAE5B,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IAEnC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { DeviceModelId } from "@ledgerhq/types-devices";
2
+ import { FeatureId } from ".";
3
+ /**
4
+ * Unique identifier of a post onboarding action.
5
+ */
6
+ export declare enum PostOnboardingActionId {
7
+ claimMock = "claimMock",
8
+ migrateAssetsMock = "migrateAssetsMock",
9
+ personalizeMock = "personalizeMock"
10
+ }
11
+ /**
12
+ * All necessary information for complete integration of a post onboarding
13
+ * action.
14
+ */
15
+ export declare type PostOnboardingAction = {
16
+ id: PostOnboardingActionId;
17
+ /**
18
+ * If this action is linked to a feature that is enabled by a feature flag,
19
+ * use this property to identify the feature flag.
20
+ */
21
+ featureFlagId?: FeatureId;
22
+ /**
23
+ * Navigation params when the user presses the button for this action
24
+ * - In LLM, this will be used like this:
25
+ * `navigation.navigate(...navigationParams)`
26
+ * - In LLD, this will be used like this:
27
+ * `history.push(...navigationParams)`
28
+ */
29
+ navigationParams?: any[];
30
+ /**
31
+ * Icon displayed for this action in the post onboarding hub.
32
+ */
33
+ Icon: (props: {
34
+ size: number;
35
+ color: string;
36
+ }) => any;
37
+ /**
38
+ * Title displayed for this action in the post onboarding hub.
39
+ */
40
+ title: string;
41
+ /**
42
+ * Description displayed for this action in the post onboarding hub.
43
+ */
44
+ description: string;
45
+ /**
46
+ * Tag displayed for this action in the post onboarding hub.
47
+ */
48
+ tagLabel?: string;
49
+ /**
50
+ * Will appear in an success alert at the bottom of the post-onboarding hub
51
+ * after completing this action.
52
+ * */
53
+ actionCompletedPopupLabel: string;
54
+ /**
55
+ * Will be used as a title success alert at the bottom of the post-onboarding
56
+ * hub after completing this action.
57
+ * */
58
+ actionCompletedHubTitle: string;
59
+ /**
60
+ * Event that will be dispatched when starting this action.
61
+ */
62
+ startEvent?: string;
63
+ /**
64
+ * Event properties that will be dispatched when starting this action.
65
+ */
66
+ startEventProperties?: any;
67
+ };
68
+ /**
69
+ * State of a post onboarding action.
70
+ */
71
+ export declare type PostOnboardingActionState = {
72
+ /**
73
+ * Whether the user has completed this action. This will be reflected in the
74
+ * UI of the post onboarding hub.
75
+ */
76
+ completed: boolean;
77
+ };
78
+ /**
79
+ * To be used for a redux reducer.
80
+ * Keeps all necessary information about the state of the post onboarding hub
81
+ * and can be persisted in storage.
82
+ */
83
+ export declare type PostOnboardingState = {
84
+ /**
85
+ * Model Id of the device for which the post onboarding was started.
86
+ */
87
+ deviceModelId: DeviceModelId | null;
88
+ /**
89
+ * Did the user dismiss the post onboarding entry point on the wallet page.
90
+ */
91
+ walletEntryPointDismissed: boolean;
92
+ /**
93
+ * List of all actions that have to be completed in this post onboarding
94
+ * (whether they are completed or).
95
+ * This is used to populate the list of actions in the post onboarding hub UI.
96
+ */
97
+ actionsToComplete: PostOnboardingActionId[];
98
+ /**
99
+ * "completed" state for each action.
100
+ */
101
+ actionsCompleted: {
102
+ [key in PostOnboardingActionId]?: boolean;
103
+ };
104
+ /**
105
+ * Last action that the user has completed.
106
+ *
107
+ * This is used to display potentially different content in the post
108
+ * onboarding hub UI depending on the last action that was completed.
109
+ */
110
+ lastActionCompleted: PostOnboardingActionId | null;
111
+ };
112
+ /**
113
+ * Digest of the store & list of actions into something directly consumable
114
+ * by UI. (All UI data will be in there).
115
+ */
116
+ export declare type PostOnboardingHubState = {
117
+ deviceModelId: DeviceModelId | null;
118
+ lastActionCompleted: PostOnboardingAction | null;
119
+ actionsState: (PostOnboardingAction & PostOnboardingActionState)[];
120
+ };
121
+ //# sourceMappingURL=postOnboarding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postOnboarding.d.ts","sourceRoot":"","sources":["../src/postOnboarding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAE9B;;GAEG;AACH,oBAAY,sBAAsB;IAChC,SAAS,cAAc;IACvB,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;CACpC;AAED;;;GAGG;AACH,oBAAY,oBAAoB,GAAG;IACjC,EAAE,EAAE,sBAAsB,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,GAAG,EAAE,CAAC;IAEzB;;OAEG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC;IAEtD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;SAGK;IACL,yBAAyB,EAAE,MAAM,CAAC;IAElC;;;SAGK;IACL,uBAAuB,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,oBAAoB,CAAC,EAAE,GAAG,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,yBAAyB,GAAG;IACtC;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,oBAAY,mBAAmB,GAAG;IAChC;;OAEG;IACH,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,yBAAyB,EAAE,OAAO,CAAC;IAEnC;;;;OAIG;IACH,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAE5C;;OAEG;IACH,gBAAgB,EAAE;SAAG,GAAG,IAAI,sBAAsB,CAAC,CAAC,EAAE,OAAO;KAAE,CAAC;IAEhE;;;;;OAKG;IACH,mBAAmB,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACpD,CAAC;AAEF;;;GAGG;AACH,oBAAY,sBAAsB,GAAG;IACnC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,mBAAmB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,oBAAoB,GAAG,yBAAyB,CAAC,EAAE,CAAC;CACpE,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.PostOnboardingActionId = void 0;
4
+ /**
5
+ * Unique identifier of a post onboarding action.
6
+ */
7
+ var PostOnboardingActionId;
8
+ (function (PostOnboardingActionId) {
9
+ PostOnboardingActionId["claimMock"] = "claimMock";
10
+ PostOnboardingActionId["migrateAssetsMock"] = "migrateAssetsMock";
11
+ PostOnboardingActionId["personalizeMock"] = "personalizeMock";
12
+ })(PostOnboardingActionId = exports.PostOnboardingActionId || (exports.PostOnboardingActionId = {}));
13
+ //# sourceMappingURL=postOnboarding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postOnboarding.js","sourceRoot":"","sources":["../src/postOnboarding.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,iDAAuB,CAAA;IACvB,iEAAuC,CAAA;IACvC,6DAAmC,CAAA;AACrC,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC"}
@@ -1,5 +1,5 @@
1
1
  /** Add others with union (e.g. "learn" | "market" | "foo") */
2
- export declare type FeatureId = "learn" | "pushNotifications" | "llmUsbFirmwareUpdate" | "ratings" | "counterValue" | "buyDeviceFromLive" | "ptxSmartRouting" | "currencyOsmosis" | "currencyOsmosisMobile" | "ptxSmartRoutingMobile" | string;
2
+ export declare type FeatureId = "learn" | "pushNotifications" | "llmUsbFirmwareUpdate" | "ratings" | "counterValue" | "buyDeviceFromLive" | "ptxSmartRouting" | "currencyOsmosis" | "currencyOsmosisMobile" | "currencyFantom" | "currencyMoonbeam" | "currencyCronos" | "currencySongbird" | "currencyFlare" | "currencyFantomMobile" | "currencyMoonbeamMobile" | "currencyCronosMobile" | "currencySongbirdMobile" | "currencyFlareMobile" | "ptxSmartRoutingMobile" | "mockFeature" | "walletConnectLiveApp" | "customImage";
3
3
  /** We use objects instead of direct booleans for potential future improvements
4
4
  like feature versioning etc */
5
5
  export declare type Feature = {
@@ -19,6 +19,6 @@ export declare type Feature = {
19
19
  };
20
20
  /** */
21
21
  export declare type DefaultFeatures = {
22
- [key in FeatureId]: Feature;
22
+ [key in FeatureId]?: Feature;
23
23
  };
24
24
  //# sourceMappingURL=feature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../src/feature.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oBAAY,SAAS,GACjB,OAAO,GACP,mBAAmB,GACnB,sBAAsB,GACtB,SAAS,GACT,cAAc,GACd,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,uBAAuB,GACvB,uBAAuB,GACvB,MAAM,CAAC;AAEX;8BAC8B;AAC9B,oBAAY,OAAO,GAAG;IACpB,6GAA6G;IAC7G,OAAO,EAAE,OAAO,CAAC;IACjB,sJAAsJ;IACtJ,gHAAgH;IAChH,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACjC,0DAA0D;IAC1D,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACjC,oHAAoH;IACpH,mCAAmC,CAAC,EAAE,OAAO,CAAC;IAC9C,oEAAoE;IACpE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB;IACxB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM;AACN,oBAAY,eAAe,GAAG;KAAG,GAAG,IAAI,SAAS,GAAG,OAAO;CAAE,CAAC"}
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../src/feature.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,oBAAY,SAAS,GACjB,OAAO,GACP,mBAAmB,GACnB,sBAAsB,GACtB,SAAS,GACT,cAAc,GACd,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,uBAAuB,GACvB,gBAAgB,GAChB,kBAAkB,GAClB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,sBAAsB,GACtB,wBAAwB,GACxB,sBAAsB,GACtB,wBAAwB,GACxB,qBAAqB,GACrB,uBAAuB,GACvB,aAAa,GACb,sBAAsB,GACtB,aAAa,CAAC;AAElB;8BAC8B;AAC9B,oBAAY,OAAO,GAAG;IACpB,6GAA6G;IAC7G,OAAO,EAAE,OAAO,CAAC;IACjB,sJAAsJ;IACtJ,gHAAgH;IAChH,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACjC,0DAA0D;IAC1D,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IACjC,oHAAoH;IACpH,mCAAmC,CAAC,EAAE,OAAO,CAAC;IAC9C,oEAAoE;IACpE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB;IACxB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM;AACN,oBAAY,eAAe,GAAG;KAAG,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO;CAAE,CAAC"}
package/lib-es/index.d.ts CHANGED
@@ -9,4 +9,5 @@ export * from "./operation";
9
9
  export * from "./pagination";
10
10
  export * from "./portfolio";
11
11
  export * from "./transaction";
12
+ export * from "./postOnboarding";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
package/lib-es/index.js CHANGED
@@ -9,4 +9,5 @@ export * from "./operation";
9
9
  export * from "./pagination";
10
10
  export * from "./portfolio";
11
11
  export * from "./transaction";
12
+ export * from "./postOnboarding";
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
@@ -3,7 +3,7 @@ import { NFTStandard } from "./nft";
3
3
  /**
4
4
  *
5
5
  */
6
- export declare type OperationType = "IN" | "OUT" | "NONE" | "CREATE" | "REVEAL" | "DELEGATE" | "UNDELEGATE" | "REDELEGATE" | "REWARD" | "FEES" | "FREEZE" | "UNFREEZE" | "VOTE" | "REWARD_PAYOUT" | "BOND" | "UNBOND" | "WITHDRAW_UNBONDED" | "SET_CONTROLLER" | "SLASH" | "NOMINATE" | "CHILL" | "SUPPLY" | "REDEEM" | "APPROVE" | "OPT_IN" | "OPT_OUT" | "NFT_IN" | "NFT_OUT";
6
+ export declare type OperationType = "IN" | "OUT" | "NONE" | "CREATE" | "REVEAL" | "DELEGATE" | "UNDELEGATE" | "REDELEGATE" | "REWARD" | "FEES" | "FREEZE" | "UNFREEZE" | "VOTE" | "REWARD_PAYOUT" | "BOND" | "UNBOND" | "WITHDRAW_UNBONDED" | "SET_CONTROLLER" | "SLASH" | "NOMINATE" | "CHILL" | "SUPPLY" | "REDEEM" | "APPROVE" | "OPT_IN" | "OPT_OUT" | "LOCK" | "UNLOCK" | "WITHDRAW" | "REVOKE" | "ACTIVATE" | "REGISTER" | "NFT_IN" | "NFT_OUT";
7
7
  /**
8
8
  *
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../src/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC;;GAEG;AACH,oBAAY,aAAa,GACrB,IAAI,GACJ,KAAK,GACL,MAAM,GACN,QAAQ,GACR,QAAQ,GAER,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,QAAQ,GAER,MAAM,GACN,QAAQ,GACR,UAAU,GAEV,MAAM,GACN,eAAe,GACf,MAAM,GACN,QAAQ,GACR,mBAAmB,GACnB,gBAAgB,GAChB,OAAO,GACP,UAAU,GACV,OAAO,GAEP,QAAQ,GACR,QAAQ,GACR,SAAS,GAET,QAAQ,GACR,SAAS,GAET,QAAQ,GACR,SAAS,CAAC;AAEd;;GAEG;AACH,oBAAY,SAAS,GAAG;IAEtB,EAAE,EAAE,MAAM,CAAC;IAEX,IAAI,EAAE,MAAM,CAAC;IAKb,IAAI,EAAE,aAAa,C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GAAG,SAAS,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,QAAQ,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE3B,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAG/B,kBAAkB,CAAC,EAAE,YAAY,EAAE,CAAC;IAEpC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC,GAAG,EAAE,IAAI,CAAC;IACV,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,oBAAY,eAAe,GAAG;IAE5B,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IAEnC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { DeviceModelId } from "@ledgerhq/types-devices";
2
+ import { FeatureId } from ".";
3
+ /**
4
+ * Unique identifier of a post onboarding action.
5
+ */
6
+ export declare enum PostOnboardingActionId {
7
+ claimMock = "claimMock",
8
+ migrateAssetsMock = "migrateAssetsMock",
9
+ personalizeMock = "personalizeMock"
10
+ }
11
+ /**
12
+ * All necessary information for complete integration of a post onboarding
13
+ * action.
14
+ */
15
+ export declare type PostOnboardingAction = {
16
+ id: PostOnboardingActionId;
17
+ /**
18
+ * If this action is linked to a feature that is enabled by a feature flag,
19
+ * use this property to identify the feature flag.
20
+ */
21
+ featureFlagId?: FeatureId;
22
+ /**
23
+ * Navigation params when the user presses the button for this action
24
+ * - In LLM, this will be used like this:
25
+ * `navigation.navigate(...navigationParams)`
26
+ * - In LLD, this will be used like this:
27
+ * `history.push(...navigationParams)`
28
+ */
29
+ navigationParams?: any[];
30
+ /**
31
+ * Icon displayed for this action in the post onboarding hub.
32
+ */
33
+ Icon: (props: {
34
+ size: number;
35
+ color: string;
36
+ }) => any;
37
+ /**
38
+ * Title displayed for this action in the post onboarding hub.
39
+ */
40
+ title: string;
41
+ /**
42
+ * Description displayed for this action in the post onboarding hub.
43
+ */
44
+ description: string;
45
+ /**
46
+ * Tag displayed for this action in the post onboarding hub.
47
+ */
48
+ tagLabel?: string;
49
+ /**
50
+ * Will appear in an success alert at the bottom of the post-onboarding hub
51
+ * after completing this action.
52
+ * */
53
+ actionCompletedPopupLabel: string;
54
+ /**
55
+ * Will be used as a title success alert at the bottom of the post-onboarding
56
+ * hub after completing this action.
57
+ * */
58
+ actionCompletedHubTitle: string;
59
+ /**
60
+ * Event that will be dispatched when starting this action.
61
+ */
62
+ startEvent?: string;
63
+ /**
64
+ * Event properties that will be dispatched when starting this action.
65
+ */
66
+ startEventProperties?: any;
67
+ };
68
+ /**
69
+ * State of a post onboarding action.
70
+ */
71
+ export declare type PostOnboardingActionState = {
72
+ /**
73
+ * Whether the user has completed this action. This will be reflected in the
74
+ * UI of the post onboarding hub.
75
+ */
76
+ completed: boolean;
77
+ };
78
+ /**
79
+ * To be used for a redux reducer.
80
+ * Keeps all necessary information about the state of the post onboarding hub
81
+ * and can be persisted in storage.
82
+ */
83
+ export declare type PostOnboardingState = {
84
+ /**
85
+ * Model Id of the device for which the post onboarding was started.
86
+ */
87
+ deviceModelId: DeviceModelId | null;
88
+ /**
89
+ * Did the user dismiss the post onboarding entry point on the wallet page.
90
+ */
91
+ walletEntryPointDismissed: boolean;
92
+ /**
93
+ * List of all actions that have to be completed in this post onboarding
94
+ * (whether they are completed or).
95
+ * This is used to populate the list of actions in the post onboarding hub UI.
96
+ */
97
+ actionsToComplete: PostOnboardingActionId[];
98
+ /**
99
+ * "completed" state for each action.
100
+ */
101
+ actionsCompleted: {
102
+ [key in PostOnboardingActionId]?: boolean;
103
+ };
104
+ /**
105
+ * Last action that the user has completed.
106
+ *
107
+ * This is used to display potentially different content in the post
108
+ * onboarding hub UI depending on the last action that was completed.
109
+ */
110
+ lastActionCompleted: PostOnboardingActionId | null;
111
+ };
112
+ /**
113
+ * Digest of the store & list of actions into something directly consumable
114
+ * by UI. (All UI data will be in there).
115
+ */
116
+ export declare type PostOnboardingHubState = {
117
+ deviceModelId: DeviceModelId | null;
118
+ lastActionCompleted: PostOnboardingAction | null;
119
+ actionsState: (PostOnboardingAction & PostOnboardingActionState)[];
120
+ };
121
+ //# sourceMappingURL=postOnboarding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postOnboarding.d.ts","sourceRoot":"","sources":["../src/postOnboarding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAE9B;;GAEG;AACH,oBAAY,sBAAsB;IAChC,SAAS,cAAc;IACvB,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;CACpC;AAED;;;GAGG;AACH,oBAAY,oBAAoB,GAAG;IACjC,EAAE,EAAE,sBAAsB,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,GAAG,EAAE,CAAC;IAEzB;;OAEG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC;IAEtD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;SAGK;IACL,yBAAyB,EAAE,MAAM,CAAC;IAElC;;;SAGK;IACL,uBAAuB,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,oBAAoB,CAAC,EAAE,GAAG,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,yBAAyB,GAAG;IACtC;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,oBAAY,mBAAmB,GAAG;IAChC;;OAEG;IACH,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,yBAAyB,EAAE,OAAO,CAAC;IAEnC;;;;OAIG;IACH,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAE5C;;OAEG;IACH,gBAAgB,EAAE;SAAG,GAAG,IAAI,sBAAsB,CAAC,CAAC,EAAE,OAAO;KAAE,CAAC;IAEhE;;;;;OAKG;IACH,mBAAmB,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACpD,CAAC;AAEF;;;GAGG;AACH,oBAAY,sBAAsB,GAAG;IACnC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,mBAAmB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,oBAAoB,GAAG,yBAAyB,CAAC,EAAE,CAAC;CACpE,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Unique identifier of a post onboarding action.
3
+ */
4
+ export var PostOnboardingActionId;
5
+ (function (PostOnboardingActionId) {
6
+ PostOnboardingActionId["claimMock"] = "claimMock";
7
+ PostOnboardingActionId["migrateAssetsMock"] = "migrateAssetsMock";
8
+ PostOnboardingActionId["personalizeMock"] = "personalizeMock";
9
+ })(PostOnboardingActionId || (PostOnboardingActionId = {}));
10
+ //# sourceMappingURL=postOnboarding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postOnboarding.js","sourceRoot":"","sources":["../src/postOnboarding.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAN,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,iDAAuB,CAAA;IACvB,iEAAuC,CAAA;IACvC,6DAAmC,CAAA;AACrC,CAAC,EAJW,sBAAsB,KAAtB,sBAAsB,QAIjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/types-live",
3
- "version": "6.24.0",
3
+ "version": "6.24.1-nightly.0",
4
4
  "description": "Ledger Live main types.",
5
5
  "keywords": [
6
6
  "Ledger"
package/src/feature.ts CHANGED
@@ -9,8 +9,20 @@ export type FeatureId =
9
9
  | "ptxSmartRouting"
10
10
  | "currencyOsmosis"
11
11
  | "currencyOsmosisMobile"
12
+ | "currencyFantom"
13
+ | "currencyMoonbeam"
14
+ | "currencyCronos"
15
+ | "currencySongbird"
16
+ | "currencyFlare"
17
+ | "currencyFantomMobile"
18
+ | "currencyMoonbeamMobile"
19
+ | "currencyCronosMobile"
20
+ | "currencySongbirdMobile"
21
+ | "currencyFlareMobile"
12
22
  | "ptxSmartRoutingMobile"
13
- | string;
23
+ | "mockFeature"
24
+ | "walletConnectLiveApp"
25
+ | "customImage";
14
26
 
15
27
  /** We use objects instead of direct booleans for potential future improvements
16
28
  like feature versioning etc */
@@ -31,4 +43,4 @@ export type Feature = {
31
43
  };
32
44
 
33
45
  /** */
34
- export type DefaultFeatures = { [key in FeatureId]: Feature };
46
+ export type DefaultFeatures = { [key in FeatureId]?: Feature };
package/src/index.ts CHANGED
@@ -9,3 +9,4 @@ export * from "./operation";
9
9
  export * from "./pagination";
10
10
  export * from "./portfolio";
11
11
  export * from "./transaction";
12
+ export * from "./postOnboarding";
package/src/operation.ts CHANGED
@@ -36,6 +36,13 @@ export type OperationType =
36
36
  // ALGORAND
37
37
  | "OPT_IN"
38
38
  | "OPT_OUT"
39
+ // CELO
40
+ | "LOCK"
41
+ | "UNLOCK"
42
+ | "WITHDRAW"
43
+ | "REVOKE"
44
+ | "ACTIVATE"
45
+ | "REGISTER"
39
46
  // NFT
40
47
  | "NFT_IN"
41
48
  | "NFT_OUT";
@@ -0,0 +1,134 @@
1
+ import { DeviceModelId } from "@ledgerhq/types-devices";
2
+ import { FeatureId } from ".";
3
+
4
+ /**
5
+ * Unique identifier of a post onboarding action.
6
+ */
7
+ export enum PostOnboardingActionId {
8
+ claimMock = "claimMock",
9
+ migrateAssetsMock = "migrateAssetsMock",
10
+ personalizeMock = "personalizeMock",
11
+ }
12
+
13
+ /**
14
+ * All necessary information for complete integration of a post onboarding
15
+ * action.
16
+ */
17
+ export type PostOnboardingAction = {
18
+ id: PostOnboardingActionId;
19
+
20
+ /**
21
+ * If this action is linked to a feature that is enabled by a feature flag,
22
+ * use this property to identify the feature flag.
23
+ */
24
+ featureFlagId?: FeatureId;
25
+
26
+ /**
27
+ * Navigation params when the user presses the button for this action
28
+ * - In LLM, this will be used like this:
29
+ * `navigation.navigate(...navigationParams)`
30
+ * - In LLD, this will be used like this:
31
+ * `history.push(...navigationParams)`
32
+ */
33
+ navigationParams?: any[];
34
+
35
+ /**
36
+ * Icon displayed for this action in the post onboarding hub.
37
+ */
38
+ Icon: (props: { size: number; color: string }) => any;
39
+
40
+ /**
41
+ * Title displayed for this action in the post onboarding hub.
42
+ */
43
+ title: string;
44
+
45
+ /**
46
+ * Description displayed for this action in the post onboarding hub.
47
+ */
48
+ description: string;
49
+
50
+ /**
51
+ * Tag displayed for this action in the post onboarding hub.
52
+ */
53
+ tagLabel?: string;
54
+
55
+ /**
56
+ * Will appear in an success alert at the bottom of the post-onboarding hub
57
+ * after completing this action.
58
+ * */
59
+ actionCompletedPopupLabel: string;
60
+
61
+ /**
62
+ * Will be used as a title success alert at the bottom of the post-onboarding
63
+ * hub after completing this action.
64
+ * */
65
+ actionCompletedHubTitle: string;
66
+
67
+ /**
68
+ * Event that will be dispatched when starting this action.
69
+ */
70
+ startEvent?: string;
71
+
72
+ /**
73
+ * Event properties that will be dispatched when starting this action.
74
+ */
75
+ startEventProperties?: any;
76
+ };
77
+
78
+ /**
79
+ * State of a post onboarding action.
80
+ */
81
+ export type PostOnboardingActionState = {
82
+ /**
83
+ * Whether the user has completed this action. This will be reflected in the
84
+ * UI of the post onboarding hub.
85
+ */
86
+ completed: boolean;
87
+ };
88
+
89
+ /**
90
+ * To be used for a redux reducer.
91
+ * Keeps all necessary information about the state of the post onboarding hub
92
+ * and can be persisted in storage.
93
+ */
94
+ export type PostOnboardingState = {
95
+ /**
96
+ * Model Id of the device for which the post onboarding was started.
97
+ */
98
+ deviceModelId: DeviceModelId | null;
99
+
100
+ /**
101
+ * Did the user dismiss the post onboarding entry point on the wallet page.
102
+ */
103
+ walletEntryPointDismissed: boolean;
104
+
105
+ /**
106
+ * List of all actions that have to be completed in this post onboarding
107
+ * (whether they are completed or).
108
+ * This is used to populate the list of actions in the post onboarding hub UI.
109
+ */
110
+ actionsToComplete: PostOnboardingActionId[];
111
+
112
+ /**
113
+ * "completed" state for each action.
114
+ */
115
+ actionsCompleted: { [key in PostOnboardingActionId]?: boolean };
116
+
117
+ /**
118
+ * Last action that the user has completed.
119
+ *
120
+ * This is used to display potentially different content in the post
121
+ * onboarding hub UI depending on the last action that was completed.
122
+ */
123
+ lastActionCompleted: PostOnboardingActionId | null;
124
+ };
125
+
126
+ /**
127
+ * Digest of the store & list of actions into something directly consumable
128
+ * by UI. (All UI data will be in there).
129
+ */
130
+ export type PostOnboardingHubState = {
131
+ deviceModelId: DeviceModelId | null;
132
+ lastActionCompleted: PostOnboardingAction | null;
133
+ actionsState: (PostOnboardingAction & PostOnboardingActionState)[];
134
+ };