@tuwaio/nova-transactions 0.10.2 → 0.10.4

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.
@@ -0,0 +1,242 @@
1
+ /**
2
+ * @file This file defines the TypeScript type for the library's internationalization (i18n) labels.
3
+ * It provides a strict structure for all text used in the UI components, ensuring type safety for different languages.
4
+ */
5
+ /**
6
+ * Represents the set of labels used for various UI elements and features in a Tuwa-based application.
7
+ * This type defines structured labels for wallet modals, transaction statuses, toast notifications, and more.
8
+ */
9
+ type NovaTransactionsLabels = {
10
+ /** Labels for the main wallet information modal. */
11
+ transactionsModal: {
12
+ /** Labels of the transaction history. */
13
+ history: {
14
+ /** The title for the transaction history section. */
15
+ title: string;
16
+ /** The title displayed when the user needs to connect a wallet to see history. */
17
+ connectWalletTitle: string;
18
+ /** The message displayed when the user needs to connect a wallet. */
19
+ connectWalletMessage: string;
20
+ /** The title displayed when the connected wallet has no transaction history. */
21
+ noTransactionsTitle: string;
22
+ /** The message displayed when there are no transactions to show. */
23
+ noTransactionsMessage: string;
24
+ };
25
+ };
26
+ /** Labels related to toast notifications. */
27
+ toast: {
28
+ /** Text for the button/link within a toast to open the wallet modal. */
29
+ openTransaction: string;
30
+ };
31
+ /** Standard labels for transaction statuses. */
32
+ statuses: {
33
+ /** Text for a pending transaction. */
34
+ pending: string;
35
+ /**
36
+ * Text for a pending transaction that reached the `confirmed` commitment (Solana: voted on by a supermajority,
37
+ * usually within a second) and is waiting to be finalized.
38
+ */
39
+ confirmed: string;
40
+ /** Text for a successful transaction. */
41
+ success: string;
42
+ /** Text for a failed transaction. */
43
+ failed: string;
44
+ /** Text for a reverted transaction. */
45
+ reverted: string;
46
+ /** Text for a replaced transaction (e.g., sped up). */
47
+ replaced: string;
48
+ /** Text for an unknown or indeterminate status. */
49
+ unknown: string;
50
+ /** Text for a confirmation count label, e.g., "1 confirmation" or "10 confirmations" */
51
+ confirmationsLabel: string;
52
+ };
53
+ /** Labels for different types of transaction hashes/keys. */
54
+ hashLabels: {
55
+ /** Label for a Gelato Task ID. */
56
+ gelato: string;
57
+ /** Label for a Safe Transaction Hash. */
58
+ safe: string;
59
+ /** Label for an ERC-4337 UserOperation Hash. */
60
+ erc4337: string;
61
+ /** Label for the original transaction hash (before replacement). */
62
+ original: string;
63
+ /** Label for the new transaction hash that replaced the original. */
64
+ replaced: string;
65
+ /** Default label for a standard transaction hash. */
66
+ default: string;
67
+ /**
68
+ * Special label for the most recent blockhash. This is used for the "Recent Blockhash" field in the transaction
69
+ * details modal.
70
+ */
71
+ recentBlockhash: string;
72
+ /**
73
+ * Special label for the Solana signature. This is used for the "Signature" field in the transaction details modal.
74
+ */
75
+ solana: string;
76
+ };
77
+ /** Labels for the transaction information block. */
78
+ txInfo: {
79
+ /** Label indicating when the transaction was started. */
80
+ started: string;
81
+ /** Label for the network name. */
82
+ network: string;
83
+ /** Slot number for the transaction. This is used for the "Slot" field in the transaction details modal. */
84
+ slot: string;
85
+ };
86
+ /** Labels for the transaction error block. */
87
+ txError: {
88
+ /** The title for the error details section. */
89
+ title: string;
90
+ /** Confirmation text shown after copying an error message. */
91
+ copied: string;
92
+ };
93
+ /**
94
+ * Labels for the pre-submission validation error toast.
95
+ * This toast fires when `executeTxAction` throws before the transaction
96
+ * is added to the pool (e.g., validation failure, `beforeTxProcess` rejection).
97
+ */
98
+ validationError: {
99
+ /** The main title shown in the toast header. */
100
+ title: string;
101
+ /** Prefix label for the field that caused the validation failure, e.g. "Field: title". */
102
+ field: string;
103
+ /** Label for the copy-error button before it is clicked. */
104
+ copy: string;
105
+ /** Label for the copy-error button after a successful copy. */
106
+ copied: string;
107
+ };
108
+ /** Labels for the detailed transaction tracking modal. */
109
+ trackingModal: {
110
+ /** The main title of the tracking modal. */
111
+ title: string;
112
+ /** Text indicating that the transaction is being processed. */
113
+ processing: string;
114
+ /** Label for the close button. */
115
+ close: string;
116
+ /** Label for the button to open the main wallet info modal. */
117
+ allTransactions: string;
118
+ /** Label for a button to retry a transaction. */
119
+ retry: string;
120
+ /** Labels for the step-by-step progress indicator. */
121
+ progressIndicator: {
122
+ /** Label for the "transaction created" step. */
123
+ created: string;
124
+ /** Label for the "processing" step. */
125
+ processing: string;
126
+ /** Label for the "succeed" or final step. */
127
+ succeed: string;
128
+ };
129
+ };
130
+ /** Labels for the main transaction action button. */
131
+ trackedTxButton: {
132
+ /** Text shown on the button while the transaction is initializing. */
133
+ loading: string;
134
+ /** Text shown on the button after the transaction succeeds. */
135
+ succeed: string;
136
+ /** Text shown on the button if the transaction fails to initialize. */
137
+ failed: string;
138
+ /** Text shown on the button if the transaction replaced to initialize. */
139
+ replaced: string;
140
+ };
141
+ /** Labels for common action buttons/links. */
142
+ actions: {
143
+ /** Text for a "Copy" action (e.g., copy address or hash). */
144
+ copy: string;
145
+ /** Text for a link to view the transaction on a block explorer. */
146
+ viewOnExplorer: string;
147
+ /** Text for a generic "Close" action. */
148
+ close: string;
149
+ /** Text for a generic "Cancel" action. */
150
+ cancel: string;
151
+ /** Text for a generic "Speed up" action. */
152
+ speedUp: string;
153
+ };
154
+ /** Labels for the detailed transaction view. */
155
+ transactionDetails: {
156
+ /** Main title for the detailed view. */
157
+ title: string;
158
+ /** Subtitle for the detailed view. */
159
+ subtitle: string;
160
+ /** Label for the metadata section. */
161
+ metadata: string;
162
+ /** Label for the execution data section. */
163
+ executionData: string;
164
+ /** Label for the adapter type. */
165
+ adapter: string;
166
+ /** Label for the submission time. */
167
+ submittedAt: string;
168
+ /** Label for the completion time. */
169
+ finishedAt: string;
170
+ /** Label for the tracker name. */
171
+ tracker: string;
172
+ /** Label for the connector type. */
173
+ connector: string;
174
+ /** Label for the confirmations count. */
175
+ confirmations: string;
176
+ /** Label for the internal transaction key. */
177
+ txKey: string;
178
+ /** Label for the origin address. */
179
+ from: string;
180
+ /** Label for the recipient address. */
181
+ to: string;
182
+ /** Label for the transaction hash. */
183
+ hash: string;
184
+ /** Label for the network name. */
185
+ network: string;
186
+ /** Label for the raw input data. */
187
+ inputData: string;
188
+ /** Label for the payload data section. */
189
+ payload: string;
190
+ /** Label for the context block. */
191
+ context: string;
192
+ /** Label for the nonce. */
193
+ nonce: string;
194
+ /** Label for the raw value. */
195
+ value: string;
196
+ /** Label for the max fee per gas. */
197
+ maxFee: string;
198
+ /** Label for the max priority fee per gas. */
199
+ maxPriorityFee: string;
200
+ /** Label for the Solana section title. */
201
+ solanaTitle: string;
202
+ /** Label for the Starknet section title. */
203
+ starknetTitle: string;
204
+ /** Label for the Context section title. */
205
+ contextTitle: string;
206
+ /** Label for the Fee. */
207
+ fee: string;
208
+ /** Label for the Slot. */
209
+ slot: string;
210
+ /** Label for the Instructions. */
211
+ instructions: string;
212
+ /** Label for the Recent Blockhash. */
213
+ recentBlockhash: string;
214
+ /** Label for the Contract Address. */
215
+ contractAddress: string;
216
+ /** Label for the Actual Fee. */
217
+ actualFee: string;
218
+ /** Label for the Title Context. */
219
+ titleContext: string;
220
+ /** Label for the Description Context. */
221
+ descriptionContext: string;
222
+ /** Label for the Error Context. */
223
+ errorContext: string;
224
+ /** Label for the Full Payload. */
225
+ fullPayload: string;
226
+ /** Label for the Replaced Hash. */
227
+ replacedHash: string;
228
+ /** Labels for the sync status indicator. */
229
+ syncStatus: {
230
+ /** Badge shown while the transaction is not yet saved on the server (`syncStatus: 'pending-sync'`). */
231
+ pending: string;
232
+ /** Tooltip of the `pending` badge. */
233
+ pendingTooltip: string;
234
+ /** Badge shown when the transaction is saved on the server (`syncStatus: 'synced'`). */
235
+ synced: string;
236
+ /** Tooltip of the `synced` badge. */
237
+ syncedTooltip: string;
238
+ };
239
+ };
240
+ };
241
+
242
+ export type { NovaTransactionsLabels as N };
@@ -0,0 +1,242 @@
1
+ /**
2
+ * @file This file defines the TypeScript type for the library's internationalization (i18n) labels.
3
+ * It provides a strict structure for all text used in the UI components, ensuring type safety for different languages.
4
+ */
5
+ /**
6
+ * Represents the set of labels used for various UI elements and features in a Tuwa-based application.
7
+ * This type defines structured labels for wallet modals, transaction statuses, toast notifications, and more.
8
+ */
9
+ type NovaTransactionsLabels = {
10
+ /** Labels for the main wallet information modal. */
11
+ transactionsModal: {
12
+ /** Labels of the transaction history. */
13
+ history: {
14
+ /** The title for the transaction history section. */
15
+ title: string;
16
+ /** The title displayed when the user needs to connect a wallet to see history. */
17
+ connectWalletTitle: string;
18
+ /** The message displayed when the user needs to connect a wallet. */
19
+ connectWalletMessage: string;
20
+ /** The title displayed when the connected wallet has no transaction history. */
21
+ noTransactionsTitle: string;
22
+ /** The message displayed when there are no transactions to show. */
23
+ noTransactionsMessage: string;
24
+ };
25
+ };
26
+ /** Labels related to toast notifications. */
27
+ toast: {
28
+ /** Text for the button/link within a toast to open the wallet modal. */
29
+ openTransaction: string;
30
+ };
31
+ /** Standard labels for transaction statuses. */
32
+ statuses: {
33
+ /** Text for a pending transaction. */
34
+ pending: string;
35
+ /**
36
+ * Text for a pending transaction that reached the `confirmed` commitment (Solana: voted on by a supermajority,
37
+ * usually within a second) and is waiting to be finalized.
38
+ */
39
+ confirmed: string;
40
+ /** Text for a successful transaction. */
41
+ success: string;
42
+ /** Text for a failed transaction. */
43
+ failed: string;
44
+ /** Text for a reverted transaction. */
45
+ reverted: string;
46
+ /** Text for a replaced transaction (e.g., sped up). */
47
+ replaced: string;
48
+ /** Text for an unknown or indeterminate status. */
49
+ unknown: string;
50
+ /** Text for a confirmation count label, e.g., "1 confirmation" or "10 confirmations" */
51
+ confirmationsLabel: string;
52
+ };
53
+ /** Labels for different types of transaction hashes/keys. */
54
+ hashLabels: {
55
+ /** Label for a Gelato Task ID. */
56
+ gelato: string;
57
+ /** Label for a Safe Transaction Hash. */
58
+ safe: string;
59
+ /** Label for an ERC-4337 UserOperation Hash. */
60
+ erc4337: string;
61
+ /** Label for the original transaction hash (before replacement). */
62
+ original: string;
63
+ /** Label for the new transaction hash that replaced the original. */
64
+ replaced: string;
65
+ /** Default label for a standard transaction hash. */
66
+ default: string;
67
+ /**
68
+ * Special label for the most recent blockhash. This is used for the "Recent Blockhash" field in the transaction
69
+ * details modal.
70
+ */
71
+ recentBlockhash: string;
72
+ /**
73
+ * Special label for the Solana signature. This is used for the "Signature" field in the transaction details modal.
74
+ */
75
+ solana: string;
76
+ };
77
+ /** Labels for the transaction information block. */
78
+ txInfo: {
79
+ /** Label indicating when the transaction was started. */
80
+ started: string;
81
+ /** Label for the network name. */
82
+ network: string;
83
+ /** Slot number for the transaction. This is used for the "Slot" field in the transaction details modal. */
84
+ slot: string;
85
+ };
86
+ /** Labels for the transaction error block. */
87
+ txError: {
88
+ /** The title for the error details section. */
89
+ title: string;
90
+ /** Confirmation text shown after copying an error message. */
91
+ copied: string;
92
+ };
93
+ /**
94
+ * Labels for the pre-submission validation error toast.
95
+ * This toast fires when `executeTxAction` throws before the transaction
96
+ * is added to the pool (e.g., validation failure, `beforeTxProcess` rejection).
97
+ */
98
+ validationError: {
99
+ /** The main title shown in the toast header. */
100
+ title: string;
101
+ /** Prefix label for the field that caused the validation failure, e.g. "Field: title". */
102
+ field: string;
103
+ /** Label for the copy-error button before it is clicked. */
104
+ copy: string;
105
+ /** Label for the copy-error button after a successful copy. */
106
+ copied: string;
107
+ };
108
+ /** Labels for the detailed transaction tracking modal. */
109
+ trackingModal: {
110
+ /** The main title of the tracking modal. */
111
+ title: string;
112
+ /** Text indicating that the transaction is being processed. */
113
+ processing: string;
114
+ /** Label for the close button. */
115
+ close: string;
116
+ /** Label for the button to open the main wallet info modal. */
117
+ allTransactions: string;
118
+ /** Label for a button to retry a transaction. */
119
+ retry: string;
120
+ /** Labels for the step-by-step progress indicator. */
121
+ progressIndicator: {
122
+ /** Label for the "transaction created" step. */
123
+ created: string;
124
+ /** Label for the "processing" step. */
125
+ processing: string;
126
+ /** Label for the "succeed" or final step. */
127
+ succeed: string;
128
+ };
129
+ };
130
+ /** Labels for the main transaction action button. */
131
+ trackedTxButton: {
132
+ /** Text shown on the button while the transaction is initializing. */
133
+ loading: string;
134
+ /** Text shown on the button after the transaction succeeds. */
135
+ succeed: string;
136
+ /** Text shown on the button if the transaction fails to initialize. */
137
+ failed: string;
138
+ /** Text shown on the button if the transaction replaced to initialize. */
139
+ replaced: string;
140
+ };
141
+ /** Labels for common action buttons/links. */
142
+ actions: {
143
+ /** Text for a "Copy" action (e.g., copy address or hash). */
144
+ copy: string;
145
+ /** Text for a link to view the transaction on a block explorer. */
146
+ viewOnExplorer: string;
147
+ /** Text for a generic "Close" action. */
148
+ close: string;
149
+ /** Text for a generic "Cancel" action. */
150
+ cancel: string;
151
+ /** Text for a generic "Speed up" action. */
152
+ speedUp: string;
153
+ };
154
+ /** Labels for the detailed transaction view. */
155
+ transactionDetails: {
156
+ /** Main title for the detailed view. */
157
+ title: string;
158
+ /** Subtitle for the detailed view. */
159
+ subtitle: string;
160
+ /** Label for the metadata section. */
161
+ metadata: string;
162
+ /** Label for the execution data section. */
163
+ executionData: string;
164
+ /** Label for the adapter type. */
165
+ adapter: string;
166
+ /** Label for the submission time. */
167
+ submittedAt: string;
168
+ /** Label for the completion time. */
169
+ finishedAt: string;
170
+ /** Label for the tracker name. */
171
+ tracker: string;
172
+ /** Label for the connector type. */
173
+ connector: string;
174
+ /** Label for the confirmations count. */
175
+ confirmations: string;
176
+ /** Label for the internal transaction key. */
177
+ txKey: string;
178
+ /** Label for the origin address. */
179
+ from: string;
180
+ /** Label for the recipient address. */
181
+ to: string;
182
+ /** Label for the transaction hash. */
183
+ hash: string;
184
+ /** Label for the network name. */
185
+ network: string;
186
+ /** Label for the raw input data. */
187
+ inputData: string;
188
+ /** Label for the payload data section. */
189
+ payload: string;
190
+ /** Label for the context block. */
191
+ context: string;
192
+ /** Label for the nonce. */
193
+ nonce: string;
194
+ /** Label for the raw value. */
195
+ value: string;
196
+ /** Label for the max fee per gas. */
197
+ maxFee: string;
198
+ /** Label for the max priority fee per gas. */
199
+ maxPriorityFee: string;
200
+ /** Label for the Solana section title. */
201
+ solanaTitle: string;
202
+ /** Label for the Starknet section title. */
203
+ starknetTitle: string;
204
+ /** Label for the Context section title. */
205
+ contextTitle: string;
206
+ /** Label for the Fee. */
207
+ fee: string;
208
+ /** Label for the Slot. */
209
+ slot: string;
210
+ /** Label for the Instructions. */
211
+ instructions: string;
212
+ /** Label for the Recent Blockhash. */
213
+ recentBlockhash: string;
214
+ /** Label for the Contract Address. */
215
+ contractAddress: string;
216
+ /** Label for the Actual Fee. */
217
+ actualFee: string;
218
+ /** Label for the Title Context. */
219
+ titleContext: string;
220
+ /** Label for the Description Context. */
221
+ descriptionContext: string;
222
+ /** Label for the Error Context. */
223
+ errorContext: string;
224
+ /** Label for the Full Payload. */
225
+ fullPayload: string;
226
+ /** Label for the Replaced Hash. */
227
+ replacedHash: string;
228
+ /** Labels for the sync status indicator. */
229
+ syncStatus: {
230
+ /** Badge shown while the transaction is not yet saved on the server (`syncStatus: 'pending-sync'`). */
231
+ pending: string;
232
+ /** Tooltip of the `pending` badge. */
233
+ pendingTooltip: string;
234
+ /** Badge shown when the transaction is saved on the server (`syncStatus: 'synced'`). */
235
+ synced: string;
236
+ /** Tooltip of the `synced` badge. */
237
+ syncedTooltip: string;
238
+ };
239
+ };
240
+ };
241
+
242
+ export type { NovaTransactionsLabels as N };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuwaio/nova-transactions",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",
@@ -20,6 +20,11 @@
20
20
  "import": "./dist/providers/index.js",
21
21
  "require": "./dist/providers/index.cjs"
22
22
  },
23
+ "./i18n": {
24
+ "types": "./dist/i18n/index.d.ts",
25
+ "import": "./dist/i18n/index.js",
26
+ "require": "./dist/i18n/index.cjs"
27
+ },
23
28
  "./dist/index.css": "./dist/index.css"
24
29
  },
25
30
  "publishConfig": {
@@ -76,7 +81,7 @@
76
81
  "@heroicons/react": "^2.2.0",
77
82
  "@radix-ui/react-dialog": "^1.3.1",
78
83
  "@tailwindcss/postcss": "^4.3.3",
79
- "@tuwaio/nova-core": "^0.10.0",
84
+ "@tuwaio/nova-core": "^0.10.2",
80
85
  "@tuwaio/orbit-core": "0.6.0",
81
86
  "@tuwaio/pulsar-core": "0.11.0",
82
87
  "@types/react": "^19.3.0",
@@ -85,9 +90,9 @@
85
90
  "autoprefixer": "^10.6.1",
86
91
  "clsx": "^2.1.1",
87
92
  "dayjs": "^1.11.23",
88
- "framer-motion": "14.3.0",
93
+ "framer-motion": "14.4.0",
89
94
  "immer": "^11.1.21",
90
- "postcss": "^8.5.30",
95
+ "postcss": "^8.5.31",
91
96
  "postcss-cli": "^12.0.0",
92
97
  "react": "^19.3.1",
93
98
  "react-toastify": "^11.1.0",