@tari-project/tarijs 0.12.0 → 0.12.2

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 (60) hide show
  1. package/.github/workflows/lint.yml +19 -0
  2. package/README.md +4 -1
  3. package/docusaurus/tari-docs/package.json +1 -1
  4. package/eslint.config.mjs +23 -6
  5. package/examples/vite-typescript-react/eslint.config.js +13 -10
  6. package/examples/vite-typescript-react/index.html +1 -1
  7. package/examples/vite-typescript-react/package.json +5 -6
  8. package/examples/vite-typescript-react/public/tari-logo.svg +18 -0
  9. package/examples/vite-typescript-react/tsconfig.json +2 -4
  10. package/knip.ts +18 -0
  11. package/package.json +7 -5
  12. package/packages/builders/package.json +3 -2
  13. package/packages/builders/src/helpers/submitTransaction.ts +11 -10
  14. package/packages/builders/src/helpers/workspace.ts +2 -2
  15. package/packages/builders/src/transaction/TransactionBuilder.ts +12 -13
  16. package/packages/indexer_provider/package.json +3 -2
  17. package/packages/indexer_provider/src/provider.ts +6 -7
  18. package/packages/indexer_provider/src/transports/IndexerProviderClient.ts +1 -0
  19. package/packages/indexer_provider/src/transports/fetch.ts +2 -2
  20. package/packages/indexer_provider/src/transports/rpc.ts +1 -0
  21. package/packages/metamask_signer/package.json +3 -2
  22. package/packages/metamask_signer/src/index.ts +7 -7
  23. package/packages/metamask_signer/src/utils.ts +36 -45
  24. package/packages/permissions/package.json +3 -2
  25. package/packages/permissions/src/helpers.ts +0 -1
  26. package/packages/permissions/src/permissions.ts +6 -13
  27. package/packages/react-mui-connect-button/package.json +3 -4
  28. package/packages/react-mui-connect-button/src/Logos.tsx +77 -48
  29. package/packages/react-mui-connect-button/src/TariConnectButton.tsx +1 -2
  30. package/packages/react-mui-connect-button/src/TariWalletSelectionDialog.tsx +64 -28
  31. package/packages/react-mui-connect-button/src/index.ts +6 -3
  32. package/packages/tari_provider/package.json +3 -2
  33. package/packages/tari_signer/package.json +3 -2
  34. package/packages/tari_universe/package.json +3 -2
  35. package/packages/tari_universe/src/types.ts +1 -0
  36. package/packages/tarijs/package.json +3 -2
  37. package/packages/tarijs/src/index.ts +2 -20
  38. package/packages/tarijs/src/templates/TestFaucet.ts +7 -2
  39. package/packages/tarijs/test/integration-tests/wallet_daemon/json_rpc_provider.spec.ts +9 -12
  40. package/packages/tarijs_types/package.json +3 -2
  41. package/packages/tarijs_types/src/Amount.ts +1 -1
  42. package/packages/tarijs_types/src/SubmitTransactionResponse.ts +3 -0
  43. package/packages/tarijs_types/src/TransactionArg.ts +1 -0
  44. package/packages/tarijs_types/src/consts.ts +1 -1
  45. package/packages/tarijs_types/src/helpers/hexString.ts +20 -19
  46. package/packages/tarijs_types/src/helpers/simpleResult.ts +23 -20
  47. package/packages/tarijs_types/src/helpers/txResult.ts +3 -4
  48. package/packages/tarijs_types/src/index.ts +9 -4
  49. package/packages/tarijs_types/src/signer.ts +3 -6
  50. package/packages/wallet_daemon/package.json +3 -2
  51. package/packages/wallet_daemon/src/provider.ts +14 -16
  52. package/packages/wallet_daemon/src/signer.ts +15 -17
  53. package/packages/wallet_daemon/src/webrtc.ts +18 -13
  54. package/packages/walletconnect/package.json +6 -6
  55. package/packages/walletconnect/src/index.ts +36 -22
  56. package/pnpm-workspace.yaml +8 -8
  57. package/tsconfig.json +1 -1
  58. package/typedoc.json +3 -2
  59. package/packages/react-mui-connect-button/src/defaultPermissions.ts +0 -0
  60. package/packages/tarijs_types/src/TransactionResult.ts +0 -16
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@tari-project/tari-permissions",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc -b"
10
+ "build": "tsc -b",
11
+ "lint": "eslint src/"
11
12
  },
12
13
  "keywords": [],
13
14
  "author": "The Tari Community",
@@ -10,7 +10,6 @@ import {
10
10
  TariPermissionTransactionSend,
11
11
  } from "./permissions";
12
12
 
13
- /* eslint-disable @typescript-eslint/no-explicit-any */
14
13
  export function createPermissionFromType(permission: any): TariPermission {
15
14
  if (Object.prototype.hasOwnProperty.call(permission, "AccountBalance")) {
16
15
  return new TariPermissionAccountBalance(permission.AccountBalance);
@@ -119,7 +119,6 @@ export class NonFungibleAddress {
119
119
  }
120
120
  }
121
121
 
122
-
123
122
  export class ComponentAddress {
124
123
  private tagged: Tagged;
125
124
 
@@ -186,8 +185,7 @@ export class TariPermissionAccountBalance {
186
185
  }
187
186
 
188
187
  export class TariPermissionAccountInfo {
189
- constructor() {
190
- }
188
+ constructor() {}
191
189
 
192
190
  toJSON() {
193
191
  return "AccountInfo";
@@ -216,8 +214,7 @@ export class TariPermissionAccountList {
216
214
  }
217
215
 
218
216
  export class TariPermissionKeyList {
219
- constructor() {
220
- }
217
+ constructor() {}
221
218
 
222
219
  toJSON() {
223
220
  return "KeyList";
@@ -225,8 +222,7 @@ export class TariPermissionKeyList {
225
222
  }
226
223
 
227
224
  export class TariPermissionTransactionGet {
228
- constructor() {
229
- }
225
+ constructor() {}
230
226
 
231
227
  toJSON() {
232
228
  return "TransactionGet";
@@ -277,8 +273,7 @@ export class TariPermissionNftGetOwnershipProof {
277
273
  }
278
274
 
279
275
  export class TariPermissionTransactionsGet {
280
- constructor() {
281
- }
276
+ constructor() {}
282
277
 
283
278
  toJSON() {
284
279
  return "TransactionGet";
@@ -286,8 +281,7 @@ export class TariPermissionTransactionsGet {
286
281
  }
287
282
 
288
283
  export class TariPermissionSubstatesRead {
289
- constructor() {
290
- }
284
+ constructor() {}
291
285
 
292
286
  toJSON() {
293
287
  return "SubstatesRead";
@@ -295,8 +289,7 @@ export class TariPermissionSubstatesRead {
295
289
  }
296
290
 
297
291
  export class TariPermissionTemplatesRead {
298
- constructor() {
299
- }
292
+ constructor() {}
300
293
 
301
294
  toJSON() {
302
295
  return "TemplatesRead";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/react-mui-connect-button",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "React component to connect your website to the Tari Ootle Wallet",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -9,15 +9,15 @@
9
9
  "scripts": {
10
10
  "build": "tsc -b",
11
11
  "test": "echo 'no tests'",
12
- "integration-tests": "vitest run integration-tests"
12
+ "lint": "eslint src/"
13
13
  },
14
14
  "keywords": [],
15
15
  "author": "",
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
18
  "@tari-project/tari-permissions": "workspace:^",
19
+ "@tari-project/tari-provider": "workspace:*",
19
20
  "@tari-project/tari-signer": "workspace:^",
20
- "@tari-project/tari-provider": "workspace:^",
21
21
  "@tari-project/wallet-connect-signer": "workspace:^",
22
22
  "@tari-project/wallet-daemon-signer": "workspace:^"
23
23
  },
@@ -29,7 +29,6 @@
29
29
  "devDependencies": {
30
30
  "@types/node": "catalog:",
31
31
  "@types/react": "^19.1.8",
32
- "@types/react-dom": "^19.1.6",
33
32
  "typescript": "catalog:"
34
33
  },
35
34
  "files": [
@@ -1,60 +1,89 @@
1
1
  export function TariLogo() {
2
- return (<svg width="25px" height="25px" viewBox="0 0 25 25" version="1.1" xmlns="http://www.w3.org/2000/svg">
3
- <title>node-icon</title>
4
- <defs>
5
- <linearGradient x1="18.2919102%" y1="10.0218476%" x2="75.2362057%" y2="77.3326874%" id="linearGradient-1">
6
- <stop stopColor="#6239FF" offset="0%"></stop>
7
- <stop stopColor="#C326D6" offset="100%"></stop>
8
- </linearGradient>
9
- </defs>
10
- <g id="Final-Designs" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
11
- <g id="Icons">
12
- <g id="node-icon">
13
- <polygon id="Path" points="0 0 25 0 25 25 0 25"></polygon>
14
- <path
15
- d="M20.1635307,8.81670631 L20.1635307,11.1649473 L6.39264373,7.6223935 L11.0366915,4.59938041 L20.1635307,8.81670631 Z M11.8116251,18.6587023 L11.8116251,10.9999256 L19.1635161,12.8911326 L11.8116251,18.6587023 Z M9.89076494,17.9185993 L4.8364693,12.2747253 L4.8364693,9.20558518 L9.89076494,10.5058018 L9.89076494,17.9185993 Z M2.91551501,7.5936818 L2.91551501,13.0091801 L10.8424874,21.8606694 L22.084485,13.0410925 L22.084485,7.58822187 L10.8784476,2.41013641 L2.91551501,7.5936818 Z"
16
- fill="url(#linearGradient-1)"></path>
2
+ return (
3
+ <svg
4
+ width="50px"
5
+ height="50px"
6
+ viewBox="0 0 25 25"
7
+ version="1.1"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ style={{ display: "block", margin: "0 auto" }}
10
+ >
11
+ <title>node-icon</title>
12
+ <defs>
13
+ <linearGradient x1="18.2919102%" y1="10.0218476%" x2="75.2362057%" y2="77.3326874%" id="linearGradient-1">
14
+ <stop stopColor="#6239FF" offset="0%"></stop>
15
+ <stop stopColor="#C326D6" offset="100%"></stop>
16
+ </linearGradient>
17
+ </defs>
18
+ <g id="Final-Designs" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
19
+ <g id="Icons">
20
+ <g id="node-icon">
21
+ <polygon id="Path" points="0 0 25 0 25 25 0 25"></polygon>
22
+ <path
23
+ d="M20.1635307,8.81670631 L20.1635307,11.1649473 L6.39264373,7.6223935 L11.0366915,4.59938041 L20.1635307,8.81670631 Z M11.8116251,18.6587023 L11.8116251,10.9999256 L19.1635161,12.8911326 L11.8116251,18.6587023 Z M9.89076494,17.9185993 L4.8364693,12.2747253 L4.8364693,9.20558518 L9.89076494,10.5058018 L9.89076494,17.9185993 Z M2.91551501,7.5936818 L2.91551501,13.0091801 L10.8424874,21.8606694 L22.084485,13.0410925 L22.084485,7.58822187 L10.8784476,2.41013641 L2.91551501,7.5936818 Z"
24
+ fill="url(#linearGradient-1)"
25
+ ></path>
26
+ </g>
17
27
  </g>
18
28
  </g>
19
- </g>
20
- </svg>);
29
+ </svg>
30
+ );
21
31
  }
22
32
 
23
33
  export function TariLogoWhite() {
24
- return (<svg width="25px" height="25px" viewBox="0 0 25 25" version="1.1" xmlns="http://www.w3.org/2000/svg">
25
- <title>node-icon</title>
26
- <defs>
27
- <linearGradient x1="18.2919102%" y1="10.0218476%" x2="75.2362057%" y2="77.3326874%" id="linearGradient-1">
28
- <stop stopColor="#FFFFFF" offset="0%"></stop>
29
- <stop stopColor="#FFFFFF" offset="100%"></stop>
30
- </linearGradient>
31
- </defs>
32
- <g id="Final-Designs" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
33
- <g id="Icons">
34
- <g id="node-icon">
35
- <polygon id="Path" points="0 0 25 0 25 25 0 25"></polygon>
36
- <path
37
- d="M20.1635307,8.81670631 L20.1635307,11.1649473 L6.39264373,7.6223935 L11.0366915,4.59938041 L20.1635307,8.81670631 Z M11.8116251,18.6587023 L11.8116251,10.9999256 L19.1635161,12.8911326 L11.8116251,18.6587023 Z M9.89076494,17.9185993 L4.8364693,12.2747253 L4.8364693,9.20558518 L9.89076494,10.5058018 L9.89076494,17.9185993 Z M2.91551501,7.5936818 L2.91551501,13.0091801 L10.8424874,21.8606694 L22.084485,13.0410925 L22.084485,7.58822187 L10.8784476,2.41013641 L2.91551501,7.5936818 Z"
38
- fill="url(#linearGradient-1)"></path>
34
+ return (
35
+ <svg
36
+ width="50px"
37
+ height="50px"
38
+ viewBox="0 0 25 25"
39
+ version="1.1"
40
+ xmlns="http://www.w3.org/2000/svg"
41
+ style={{ display: "block", margin: "0 auto" }}
42
+ >
43
+ <title>node-icon</title>
44
+ <defs>
45
+ <linearGradient x1="18.2919102%" y1="10.0218476%" x2="75.2362057%" y2="77.3326874%" id="linearGradient-1">
46
+ <stop stopColor="#FFFFFF" offset="0%"></stop>
47
+ <stop stopColor="#FFFFFF" offset="100%"></stop>
48
+ </linearGradient>
49
+ </defs>
50
+ <g id="Final-Designs" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
51
+ <g id="Icons">
52
+ <g id="node-icon">
53
+ <polygon id="Path" points="0 0 25 0 25 25 0 25"></polygon>
54
+ <path
55
+ d="M20.1635307,8.81670631 L20.1635307,11.1649473 L6.39264373,7.6223935 L11.0366915,4.59938041 L20.1635307,8.81670631 Z M11.8116251,18.6587023 L11.8116251,10.9999256 L19.1635161,12.8911326 L11.8116251,18.6587023 Z M9.89076494,17.9185993 L4.8364693,12.2747253 L4.8364693,9.20558518 L9.89076494,10.5058018 L9.89076494,17.9185993 Z M2.91551501,7.5936818 L2.91551501,13.0091801 L10.8424874,21.8606694 L22.084485,13.0410925 L22.084485,7.58822187 L10.8784476,2.41013641 L2.91551501,7.5936818 Z"
56
+ fill="url(#linearGradient-1)"
57
+ ></path>
58
+ </g>
39
59
  </g>
40
60
  </g>
41
- </g>
42
- </svg>);
61
+ </svg>
62
+ );
43
63
  }
44
64
 
45
65
  export function WalletConnectLogo() {
46
-
47
66
  return (
48
- <svg version="1.1" baseProfile="basic" id="Layer_1"
49
- xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
50
- viewBox="0 0 387.6 237.6">
51
- <path id="WalletConnect_00000073703063438220642730000002917717552236472496_" fill="#3B99FC" d="M79.4,46.4
52
- c63.2-61.9,165.7-61.9,228.9,0l7.6,7.4c3.2,3.1,3.2,8.1,0,11.2l-26,25.5c-1.6,1.5-4.1,1.5-5.7,0l-10.5-10.3
53
- c-44.1-43.2-115.6-43.2-159.7,0l-11.2,11c-1.6,1.5-4.1,1.5-5.7,0L71,65.8c-3.2-3.1-3.2-8.1,0-11.2L79.4,46.4z M362.1,99.1l23.2,22.7
54
- c3.2,3.1,3.2,8.1,0,11.2L280.8,235.3c-3.2,3.1-8.3,3.1-11.4,0c0,0,0,0,0,0l-74.1-72.6c-0.8-0.8-2.1-0.8-2.9,0c0,0,0,0,0,0
55
- l-74.1,72.6c-3.2,3.1-8.3,3.1-11.4,0c0,0,0,0,0,0L2.4,133c-3.2-3.1-3.2-8.1,0-11.2l23.2-22.7c3.2-3.1,8.3-3.1,11.4,0l74.1,72.6
56
- c0.8,0.8,2.1,0.8,2.9,0c0,0,0,0,0,0l74.1-72.6c3.2-3.1,8.3-3.1,11.4,0c0,0,0,0,0,0l74.1,72.6c0.8,0.8,2.1,0.8,2.9,0l74.1-72.6
57
- C353.8,96,358.9,96,362.1,99.1z" />
58
- </svg>);
59
-
60
- }
67
+ <svg
68
+ version="1.1"
69
+ baseProfile="basic"
70
+ id="Layer_1"
71
+ xmlns="http://www.w3.org/2000/svg"
72
+ viewBox="0 0 387.6 237.6"
73
+ width="50px"
74
+ height="50px"
75
+ style={{ display: "block", margin: "0 auto" }}
76
+ >
77
+ <path
78
+ fill="#3B99FC"
79
+ d="M79.4,46.4
80
+ c63.2-61.9,165.7-61.9,228.9,0l7.6,7.4c3.2,3.1,3.2,8.1,0,11.2l-26,25.5c-1.6,1.5-4.1,1.5-5.7,0l-10.5-10.3
81
+ c-44.1-43.2-115.6-43.2-159.7,0l-11.2,11c-1.6,1.5-4.1,1.5-5.7,0L71,65.8c-3.2-3.1-3.2-8.1,0-11.2L79.4,46.4z M362.1,99.1l23.2,22.7
82
+ c3.2,3.1,3.2,8.1,0,11.2L280.8,235.3c-3.2,3.1-8.3,3.1-11.4,0c0,0,0,0,0,0l-74.1-72.6c-0.8-0.8-2.1-0.8-2.9,0c0,0,0,0,0,0
83
+ l-74.1,72.6c-3.2,3.1-8.3,3.1-11.4,0c0,0,0,0,0,0L2.4,133c-3.2-3.1-3.2-8.1,0-11.2l23.2-22.7c3.2-3.1,8.3-3.1,11.4,0l74.1,72.6
84
+ c0.8,0.8,2.1,0.8,2.9,0c0,0,0,0,0,0l74.1-72.6c3.2-3.1,8.3-3.1,11.4,0c0,0,0,0,0,0l74.1,72.6c0.8,0.8,2.1,0.8,2.9,0l74.1-72.6
85
+ C353.8,96,358.9,96,362.1,99.1z"
86
+ />
87
+ </svg>
88
+ );
89
+ }
@@ -7,12 +7,11 @@ import { TariLogoWhite } from "./Logos";
7
7
  import { WalletDaemonFetchParameters } from "@tari-project/wallet-daemon-signer";
8
8
  import { WalletConnectParameters } from "@tari-project/wallet-connect-signer";
9
9
 
10
-
11
10
  export interface TariConnectButtonProps {
12
11
  isConnected: boolean;
13
12
  disabled?: boolean;
14
13
  onConnected?: (signer: TariSigner) => void;
15
- walletConnectParams?: WalletConnectParameters,
14
+ walletConnectParams?: WalletConnectParameters;
16
15
  walletDaemonParams?: WalletDaemonFetchParameters;
17
16
  }
18
17
 
@@ -9,7 +9,6 @@ import { ReactElement, useState } from "react";
9
9
  import { WalletConnectTariSigner, WalletConnectParameters } from "@tari-project/wallet-connect-signer";
10
10
  import { TariLogo, WalletConnectLogo } from "./Logos";
11
11
 
12
-
13
12
  export interface WalletSelectionProps {
14
13
  open: boolean;
15
14
  onConnected?: (signer: TariSigner) => void;
@@ -49,16 +48,18 @@ export function TariWalletSelectionDialog(props: WalletSelectionProps): ReactEle
49
48
  onConnected?.(walletConnectSigner);
50
49
  } catch (err) {
51
50
  console.error("Error connecting to WalletConnect:", err);
52
- setError(`Failed to connect to WalletConnect. ${err instanceof Error ? err.message : String(err)}`);
51
+ setError(
52
+ `Failed to connect to WalletConnect. ${
53
+ err instanceof Error ? err.message : typeof err === "string" ? err : JSON.stringify(err)
54
+ }`,
55
+ );
53
56
  } finally {
54
57
  setIsBusy(false);
55
58
  }
56
-
57
59
  };
58
60
 
59
61
  return (
60
62
  <Dialog fullWidth={true} onClose={handleClose} open={open}>
61
-
62
63
  <Box sx={{ padding: 4, borderRadius: 4 }}>
63
64
  <Stack direction="row" justifyContent="space-between" spacing={2}>
64
65
  <Typography style={{ fontSize: 24 }}>Connect a wallet</Typography>
@@ -73,20 +74,29 @@ export function TariWalletSelectionDialog(props: WalletSelectionProps): ReactEle
73
74
  </Box>
74
75
  )}
75
76
  <Grid container spacing={2} justifyContent="center">
76
- {walletDaemonParams && (
77
+ {walletConnectParams?.projectId && (
77
78
  <Grid size={{ xs: 4 }}>
78
- <WalletConnectionMethodCard logo={<TariLogo />} text="Tari Wallet Daemon"
79
- callback={onWalletDaemonClick}></WalletConnectionMethodCard>
79
+ {isBusy ? (
80
+ <CircularProgress />
81
+ ) : (
82
+ <Grid container rowSpacing={1} columnSpacing={{ xs: 4 }}>
83
+ <WalletConnectionMethodCard
84
+ logo={<WalletConnectLogo />}
85
+ text="WalletConnect"
86
+ callback={onWalletConnectClick}
87
+ ></WalletConnectionMethodCard>
88
+ </Grid>
89
+ )}
80
90
  </Grid>
81
91
  )}
82
- {walletConnectParams?.projectId && (
83
- <Grid size={{ xs: 4 }}>
84
- {isBusy ? <CircularProgress /> :
85
- <WalletConnectionMethodCard
86
- logo={<WalletConnectLogo />}
87
- text="WalletConnect"
88
- callback={onWalletConnectClick}
89
- />}
92
+
93
+ {walletDaemonParams && (
94
+ <Grid container rowSpacing={1} columnSpacing={{ xs: 4 }}>
95
+ <WalletConnectionMethodCard
96
+ logo={<TariLogo />}
97
+ text="Tari Wallet Daemon"
98
+ callback={onWalletDaemonClick}
99
+ ></WalletConnectionMethodCard>
90
100
  </Grid>
91
101
  )}
92
102
  </Grid>
@@ -95,21 +105,47 @@ export function TariWalletSelectionDialog(props: WalletSelectionProps): ReactEle
95
105
  );
96
106
  }
97
107
 
98
- function WalletConnectionMethodCard({ logo, text, callback }: {
99
- logo: ReactElement,
100
- text: string,
101
- callback: () => void
108
+ function WalletConnectionMethodCard({
109
+ logo,
110
+ text,
111
+ callback,
112
+ }: {
113
+ logo: ReactElement;
114
+ text: string;
115
+ callback: () => Promise<void>;
102
116
  }) {
103
117
  return (
104
- <Card variant="outlined" elevation={0}
105
- sx={{ mty: 4, padding: 4, borderRadius: 4, width: "175px", height: "175px", cursor: "pointer" }}>
106
- <CardContent onClick={callback}>
107
- <Stack direction="column" spacing={2} alignItems="center">
108
- <Box sx={{ textAlign: "center", width: "100%" }}>
109
- <div style={{ borderRadius: 8, width: "50px", height: "50px" }}>{logo}</div>
110
- </Box>
111
- <Typography textAlign="center">{text}</Typography>
112
- </Stack>
118
+ <Card
119
+ variant="outlined"
120
+ elevation={0}
121
+ sx={{
122
+ padding: 4,
123
+ borderRadius: 4,
124
+ width: "175px",
125
+ height: "175px",
126
+ cursor: "pointer",
127
+ display: "flex",
128
+ alignItems: "center",
129
+ justifyContent: "center",
130
+ }}
131
+ onClick={async () => {
132
+ await callback();
133
+ }}
134
+ >
135
+ <CardContent
136
+ sx={{
137
+ display: "flex",
138
+ flexDirection: "column",
139
+ alignItems: "center",
140
+ justifyContent: "center",
141
+ height: "100%",
142
+ padding: 0,
143
+ }}
144
+ >
145
+ {logo}
146
+ <Typography textAlign="center" sx={{ mt: 2 }}>
147
+ {text}
148
+ </Typography>
113
149
  </CardContent>
114
150
  </Card>
115
151
  );
@@ -3,13 +3,16 @@ export { TariWalletSelectionDialog, WalletSelectionProps } from "./TariWalletSel
3
3
  import {
4
4
  TariPermissionAccountInfo,
5
5
  TariPermissionKeyList,
6
- TariPermissions, TariPermissionSubstatesRead, TariPermissionTemplatesRead, TariPermissionTransactionSend,
6
+ TariPermissions,
7
+ TariPermissionSubstatesRead,
8
+ TariPermissionTemplatesRead,
9
+ TariPermissionTransactionSend,
7
10
  TariPermissionTransactionsGet,
8
11
  } from "@tari-project/tari-permissions";
9
12
 
10
13
  export function defaultPermissions() {
11
14
  // Minimal permissions for the example site
12
- // But each application will have different permission needs
15
+ // But each application will have different permission needs
13
16
  const walletDaemonPermissions = new TariPermissions();
14
17
  walletDaemonPermissions
15
18
  // Required for createFreeTestCoins
@@ -21,4 +24,4 @@ export function defaultPermissions() {
21
24
  .addPermission(new TariPermissionTemplatesRead())
22
25
  .addPermission(new TariPermissionTransactionSend());
23
26
  return walletDaemonPermissions;
24
- }
27
+ }
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@tari-project/tari-provider",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc -b"
10
+ "build": "tsc -b",
11
+ "lint": "eslint src/"
11
12
  },
12
13
  "keywords": [],
13
14
  "author": "The Tari Community",
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@tari-project/tari-signer",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc -b"
10
+ "build": "tsc -b",
11
+ "lint": "eslint src/"
11
12
  },
12
13
  "keywords": [],
13
14
  "author": "The Tari Community",
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@tari-project/tari-universe-signer",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc -b"
10
+ "build": "tsc -b",
11
+ "lint": "eslint src/"
11
12
  },
12
13
  "keywords": [],
13
14
  "author": "The Tari Community",
@@ -14,6 +14,7 @@ export type WindowSize = {
14
14
  };
15
15
 
16
16
  export type PickMatching<T, V> = { [K in keyof T as T[K] extends V ? K : never]: T[K] };
17
+ /* eslint-disable @typescript-eslint/no-unsafe-function-type */
17
18
  export type ExtractMethods<T> = PickMatching<T, Function>;
18
19
  export type SignerMethods = ExtractMethods<TariUniverseSigner>;
19
20
  export type SignerMethodNames = keyof SignerMethods;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs-all",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -9,7 +9,8 @@
9
9
  "scripts": {
10
10
  "build": "tsc -b",
11
11
  "test": "vitest run unit-tests",
12
- "integration-tests": "vitest run integration-tests"
12
+ "integration-tests": "vitest run integration-tests",
13
+ "lint": "eslint src/"
13
14
  },
14
15
  "keywords": [],
15
16
  "author": "The Tari Community",
@@ -40,27 +40,9 @@ export {
40
40
  getCborValueByPath,
41
41
  } from "@tari-project/tarijs-types";
42
42
  export { IndexerProvider, IndexerProviderParameters } from "@tari-project/indexer-provider";
43
- export {
44
- Amount,
45
- BuiltInAccount,
46
- VaultSubstate,
47
- TransactionArg,
48
- ConfidentialClaim,
49
- ConfidentialOutput,
50
- ConfidentialWithdrawProof,
51
- SubstateType,
52
- SimpleTransactionResult,
53
- SimpleSubstateDiff,
54
- AnySubstate,
55
- DownSubstate,
56
- UpSubstate,
57
- TransactionSignature,
58
- } from "@tari-project/tarijs-types";
43
+ export * from "@tari-project/tarijs-types";
59
44
 
60
45
  import * as templates from "./templates";
61
46
  import * as permissions from "@tari-project/tari-permissions";
62
47
 
63
- export {
64
- permissions,
65
- templates,
66
- };
48
+ export { permissions, templates };
@@ -1,4 +1,9 @@
1
- import { Amount, ConfidentialWithdrawProof, TariFunctionDefinition, TariMethodDefinition } from "@tari-project/tarijs-builders";
1
+ import {
2
+ Amount,
3
+ ConfidentialWithdrawProof,
4
+ TariFunctionDefinition,
5
+ TariMethodDefinition,
6
+ } from "@tari-project/tarijs-builders";
2
7
  import { TemplateFactory } from "./TemplateFactory";
3
8
 
4
9
  interface MintFunction extends TariFunctionDefinition {
@@ -33,7 +38,7 @@ interface TakeFreeCoinsConfidentialMethod extends TariMethodDefinition {
33
38
 
34
39
  interface BurnCoinsMethod extends TariMethodDefinition {
35
40
  methodName: "burn_coins";
36
- args?: [BigInt];
41
+ args?: [bigint];
37
42
  }
38
43
 
39
44
  interface TotalSupplyMethod extends TariMethodDefinition {
@@ -108,7 +108,7 @@ describe("WalletDaemonTariSigner", () => {
108
108
 
109
109
  const request: SubmitTransactionRequest = {
110
110
  transaction: {
111
- network: Network.LocalNet,
111
+ network: NETWORK,
112
112
  fee_instructions,
113
113
  instructions: [],
114
114
  inputs: [],
@@ -133,7 +133,7 @@ describe("WalletDaemonTariSigner", () => {
133
133
 
134
134
  const request: SubmitTransactionRequest = {
135
135
  transaction: {
136
- network: Network.LocalNet,
136
+ network: NETWORK,
137
137
  fee_instructions: [],
138
138
  instructions: [
139
139
  {
@@ -164,7 +164,7 @@ describe("WalletDaemonTariSigner", () => {
164
164
  const account = await signer.getAccount();
165
165
  const nextKey = await signer.newTransactionKey();
166
166
 
167
- const fee = Amount.new(2000);
167
+ const fee = Amount.of(2000);
168
168
  const transaction1 = TransactionBuilder
169
169
  .new(Network.LocalNet)
170
170
  .feeTransactionPayFromComponent(account.address, fee)
@@ -233,10 +233,7 @@ describe("WalletDaemonTariSigner", () => {
233
233
  .addInput({ substate_id: account.address, version: null })
234
234
  .buildUnsignedTransaction();
235
235
 
236
- const submitTransactionRequest = buildTransactionRequest(
237
- transaction,
238
- account.account_id,
239
- );
236
+ const submitTransactionRequest = buildTransactionRequest(transaction, account.account_id);
240
237
 
241
238
  const txResult = await submitAndWaitForTransaction(signer, submitTransactionRequest);
242
239
  expect(txResult.status).toBe(TransactionStatus.Accepted);
@@ -254,9 +251,9 @@ describe("WalletDaemonTariSigner", () => {
254
251
 
255
252
  assert(
256
253
  accountBalances &&
257
- typeof accountBalances === "object" &&
258
- "balances" in accountBalances &&
259
- accountBalances.balances,
254
+ typeof accountBalances === "object" &&
255
+ "balances" in accountBalances &&
256
+ accountBalances.balances,
260
257
  "accountBalances is not an object",
261
258
  );
262
259
  assert(Array.isArray(accountBalances.balances), "accountBalances.balances is not an array");
@@ -353,7 +350,7 @@ describe("WalletDaemonTariSigner", () => {
353
350
  const signer = await buildSigner();
354
351
  const account = await signer.getAccount();
355
352
 
356
- const fee = Amount.new(2000);
353
+ const fee = Amount.of(2000);
357
354
  const transaction = TransactionBuilder.new(Network.LocalNet)
358
355
  .feeTransactionPayFromComponent(account.address, fee)
359
356
  .allocateAddress("Component", "id-1")
@@ -383,7 +380,7 @@ describe("WalletDaemonTariSigner", () => {
383
380
  const transaction = TransactionBuilder.new(Network.LocalNet)
384
381
  .feeTransactionPayFromComponent(account.address, fee)
385
382
  // Have to use add instruction to submit the transaction since this error is caught by the builder
386
- // .assertBucketContains("not_exist", "resource_0000000000000000000000000000000000000000000000000000000000000000", Amount.new(1))
383
+ // .assertBucketContains("not_exist", "resource_0000000000000000000000000000000000000000000000000000000000000000", Amount.of(1))
387
384
  .addInstruction({
388
385
  AssertBucketContains: {
389
386
  key: { id: 123, offset: null },
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs-types",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc -b"
10
+ "build": "tsc -b",
11
+ "lint": "eslint src/"
11
12
  },
12
13
  "keywords": [],
13
14
  "author": "The Tari Community",