@metamask/tron-wallet-snap 1.0.3

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 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 2680.2 2915.7" viewBox="0 0 2680.2 2915.7"><path d="M1929.1 757.7 332 463.8l840.5 2114.9 1171.1-1426.8-414.5-394.2zm-25.7 129.5 244.3 232.2-668.2 121 423.9-353.2zm-569 329L630.1 632.1l1151.1 211.8-446.8 372.3zm-50.2 103.3-114.8 949.4L550.2 710.7l734 608.8zm106.3 50.4 739.9-134-848.7 1034 108.8-900z" style="fill:#eb0029"/></svg>
@@ -0,0 +1,149 @@
1
+ {
2
+ "locale": "en",
3
+ "messages": {
4
+ "reviewTransactionWarning": {
5
+ "message": "Review the transaction before proceeding"
6
+ },
7
+ "from": {
8
+ "message": "From"
9
+ },
10
+ "toAddress": {
11
+ "message": "To"
12
+ },
13
+ "continue": {
14
+ "message": "Continue"
15
+ },
16
+ "cancel": {
17
+ "message": "Cancel"
18
+ },
19
+ "clear": {
20
+ "message": "Clear"
21
+ },
22
+ "amount": {
23
+ "message": "Amount"
24
+ },
25
+ "balance": {
26
+ "message": "Balance"
27
+ },
28
+ "recipient": {
29
+ "message": "Recipient"
30
+ },
31
+ "network": {
32
+ "message": "Network"
33
+ },
34
+ "minutes": {
35
+ "message": "min"
36
+ },
37
+ "transactionSpeed": {
38
+ "message": "Transaction speed"
39
+ },
40
+ "transactionSpeedTooltip": {
41
+ "message": "The estimated time of the transaction"
42
+ },
43
+ "networkFee": {
44
+ "message": "Network fee"
45
+ },
46
+ "feeRate": {
47
+ "message": "Fee rate"
48
+ },
49
+ "networkFeeTooltip": {
50
+ "message": "The total network fee"
51
+ },
52
+ "total": {
53
+ "message": "Total"
54
+ },
55
+ "send": {
56
+ "message": "Send"
57
+ },
58
+ "asset": {
59
+ "message": "Asset"
60
+ },
61
+ "sending": {
62
+ "message": "Sending"
63
+ },
64
+ "max": {
65
+ "message": "Max"
66
+ },
67
+ "recipientPlaceholder": {
68
+ "message": "Enter receiving address"
69
+ },
70
+ "review": {
71
+ "message": "Review"
72
+ },
73
+ "error": {
74
+ "message": "Error"
75
+ },
76
+ "unknownError": {
77
+ "message": "An unknown error occurred"
78
+ },
79
+ "feeTooLow": {
80
+ "message": "Fee too low"
81
+ },
82
+ "feeRateTooLow": {
83
+ "message": "Fee rate too low"
84
+ },
85
+ "noUtxosSelected": {
86
+ "message": "Failed to build transaction: missing UTXOs"
87
+ },
88
+ "outputBelowDustLimit": {
89
+ "message": "Amount below dust limit"
90
+ },
91
+ "insufficientFunds": {
92
+ "message": "Funds are insufficient to cover amount plus fee"
93
+ },
94
+ "noRecipients": {
95
+ "message": "Missing recipients"
96
+ },
97
+ "psbt": {
98
+ "message": "Invalid PSBT"
99
+ },
100
+ "unknownUtxo": {
101
+ "message": "Failed to build transaction: unknown UTXO"
102
+ },
103
+ "MmssingNonWitnessUtxo": {
104
+ "message": "Failed to build transaction: missing non-witness UTXO"
105
+ },
106
+ "base58": {
107
+ "message": "Invalid Bitcoin address"
108
+ },
109
+ "bech32": {
110
+ "message": "Invalid Bitcoin address"
111
+ },
112
+ "witnessVersion": {
113
+ "message": "Invalid Bitcoin address: witness version"
114
+ },
115
+ "witnessProgram": {
116
+ "message": "Invalid Bitcoin address: witness program"
117
+ },
118
+ "legacyAddressTooLong": {
119
+ "message": "Invalid Bitcoin address"
120
+ },
121
+ "invalidBase58PayloadLength": {
122
+ "message": "Invalid Bitcoin address: invalid length"
123
+ },
124
+ "invalidLegacyPrefix": {
125
+ "message": "Invalid Bitcoin address: invalid legacy prefix"
126
+ },
127
+ "networkValidation": {
128
+ "message": "Invalid Bitcoin address: wrong network"
129
+ },
130
+ "outOfRange": {
131
+ "message": "Invalid amount: out of range"
132
+ },
133
+ "tooPrecise": {
134
+ "message": "Invalid amount: too precise"
135
+ },
136
+ "missingDigits": {
137
+ "message": "Invalid amount: missing digits"
138
+ },
139
+ "inputTooLarge": {
140
+ "message": "Invalid amount: too large"
141
+ },
142
+ "invalidCharacter": {
143
+ "message": "Invalid amount: invalid character"
144
+ },
145
+ "unexpected": {
146
+ "message": "An unexpected error occurred"
147
+ }
148
+ }
149
+ }
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@metamask/tron-wallet-snap",
3
+ "version": "1.0.3",
4
+ "description": "A Tron wallet Snap.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/MetaMask/snap-tron-wallet.git"
8
+ },
9
+ "license": "(MIT-0 OR Apache-2.0)",
10
+ "main": "./dist/bundle.js",
11
+ "files": [
12
+ "dist/",
13
+ "images/",
14
+ "snap.manifest.json",
15
+ "locales/"
16
+ ],
17
+ "scripts": {
18
+ "allow-scripts": "yarn workspace root allow-scripts",
19
+ "build": "mm-snap build && yarn build:locale && yarn build-preinstalled-snap",
20
+ "build-preinstalled-snap": "node scripts/build-preinstalled-snap.js",
21
+ "build:clean": "yarn clean && yarn build:locale && yarn build",
22
+ "build:locale": "node ./scripts/populate-en-locale.js && prettier 'locales/**/*.json' -w",
23
+ "build:locale:watch": "npx nodemon --watch packages/snap/messages.json --exec \"node ./scripts/populate-en-locale.js && prettier 'locales/**/*.json' -w\"",
24
+ "clean": "rimraf dist",
25
+ "lint": "yarn lint:eslint && yarn lint:misc && yarn lint:deps && yarn lint:types",
26
+ "lint:deps": "depcheck",
27
+ "lint:eslint": "eslint . --cache --ext js,jsx,ts,tsx",
28
+ "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
29
+ "lint:misc": "prettier '**/*.json' '**/*.md' --check",
30
+ "lint:types": "tsc --noEmit",
31
+ "format": "prettier '**/*.ts' '**/*.tsx' --write",
32
+ "prepublishOnly": "mm-snap manifest",
33
+ "serve": "mm-snap serve",
34
+ "start": "concurrently \"mm-snap watch\" \"yarn build:locale:watch\"",
35
+ "test": "jest --passWithNoTests",
36
+ "test:integration": "./integration-test/run-integration.sh"
37
+ },
38
+ "devDependencies": {
39
+ "@metamask/key-tree": "^10.1.1",
40
+ "@metamask/keyring-api": "patch:@metamask/keyring-api@npm%3A18.0.0#~/.yarn/patches/@metamask-keyring-api-npm-18.0.0-1987f8da30.patch",
41
+ "@metamask/keyring-snap-sdk": "^4.0.0",
42
+ "@metamask/snaps-cli": "^8.1.0",
43
+ "@metamask/snaps-jest": "^9.2.0",
44
+ "@metamask/snaps-sdk": "^9.3.0",
45
+ "@metamask/superstruct": "^3.2.1",
46
+ "@metamask/utils": "^11.4.2",
47
+ "@types/jest": "^30.0.0",
48
+ "@types/lodash": "^4.17.20",
49
+ "bignumber.js": "^9.3.1",
50
+ "concurrently": "^9.2.0",
51
+ "dotenv": "^17.0.0",
52
+ "jest": "^30.0.3",
53
+ "jest-transform-stub": "2.0.0",
54
+ "lodash": "^4.17.21",
55
+ "prettier": "^3.5.3",
56
+ "tronweb": "patch:tronweb@npm%3A6.0.4#~/.yarn/patches/tronweb-npm-6.0.4-2b661b7651.patch",
57
+ "ts-jest": "^29.4.0"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public",
61
+ "registry": "https://registry.npmjs.org/"
62
+ }
63
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "version": "1.0.3",
3
+ "description": "Manage Tron using MetaMask",
4
+ "proposedName": "Tron",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/MetaMask/snap-tron-wallet.git"
8
+ },
9
+ "source": {
10
+ "shasum": "Yzgo43Y67QNhg6WGyz7r9g0jRRo66HkgVLjM6VKOz4E=",
11
+ "location": {
12
+ "npm": {
13
+ "filePath": "dist/bundle.js",
14
+ "iconPath": "images/icon.svg",
15
+ "packageName": "@metamask/tron-wallet-snap",
16
+ "registry": "https://registry.npmjs.org/"
17
+ }
18
+ },
19
+ "locales": ["locales/en.json"]
20
+ },
21
+ "initialConnections": {
22
+ "https://portfolio.metamask.io": {},
23
+ "https://portfolio-builds.metafi-dev.codefi.network": {},
24
+ "https://dev.portfolio.metamask.io": {},
25
+ "https://ramps-dev.portfolio.metamask.io": {}
26
+ },
27
+ "initialPermissions": {
28
+ "endowment:rpc": {
29
+ "dapps": true,
30
+ "snaps": false
31
+ },
32
+ "endowment:keyring": {
33
+ "allowedOrigins": [
34
+ "http://localhost:3000",
35
+ "https://portfolio.metamask.io",
36
+ "https://portfolio-builds.metafi-dev.codefi.network",
37
+ "https://dev.portfolio.metamask.io",
38
+ "https://ramps-dev.portfolio.metamask.io"
39
+ ]
40
+ },
41
+ "snap_getBip32Entropy": [
42
+ {
43
+ "path": ["m", "44'", "195'"],
44
+ "curve": "secp256k1"
45
+ }
46
+ ],
47
+ "endowment:network-access": {},
48
+ "snap_manageAccounts": {},
49
+ "snap_manageState": {},
50
+ "snap_dialog": {},
51
+ "snap_getPreferences": {},
52
+ "endowment:cronjob": {},
53
+ "endowment:assets": {
54
+ "scopes": ["tron:728126428", "tron:3448148188", "tron:2494104990"]
55
+ }
56
+ },
57
+ "platformVersion": "9.3.0",
58
+ "manifestVersion": "0.1"
59
+ }