Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
502 commits
Select commit Hold shift + click to select a range
2eeaa5e
chore: remove dev from snap version
Julink-eth May 11, 2026
ad82b4b
chore: merge main
Julink-eth May 11, 2026
1a4a621
Merge pull request #62 from MetaMask/fix/sync-balance
stanleyyconsensys May 11, 2026
0075139
feat: harden setSelectedAccounts
stanleyyconsensys May 7, 2026
7583529
chore: update sign hashing
stanleyyconsensys May 7, 2026
bd202fd
fix: balance sync logic
stanleyyconsensys May 8, 2026
f80beb3
chore: simplify logic
stanleyyconsensys May 8, 2026
519f573
chore: update code logic
stanleyyconsensys May 8, 2026
c429314
chore: update logic
stanleyyconsensys May 8, 2026
f2dfbd8
chore: rename
stanleyyconsensys May 11, 2026
5b124eb
chore: get address from local or horizon tx
khanti42 May 11, 2026
dd74070
Merge pull request #49 from MetaMask/fix/price-service
stanleyyconsensys May 11, 2026
3b65ea9
feat: address comments + add PathPayment, ChangeTrust and Payment Ope…
Julink-eth May 11, 2026
8ac0ac6
chore: put back XlmAccountType
Julink-eth May 11, 2026
950c0ad
chore: handle comment
khanti42 May 11, 2026
544d9eb
Merge branch 'main' into feat/chg-trust-refine
khanti42 May 11, 2026
2405664
chore: lint
khanti42 May 11, 2026
993f4b1
Merge branch 'main' into feat/batch-accounts
khanti42 May 12, 2026
1736387
Merge pull request #55 from MetaMask/feat/batch-accounts
stanleyyconsensys May 12, 2026
2c39980
Update packages/snap/src/handlers/clientRequest/computeFee.ts
Julink-eth May 12, 2026
0278f96
Merge branch 'main' into feat/signAndSendTx
Julink-eth May 12, 2026
6568803
chore: handle comments
khanti42 May 12, 2026
50553ea
Merge branch 'main' into feat/chg-trust-refine
khanti42 May 12, 2026
afa16c5
fix: sync tomstrone asset
stanleyyconsensys May 12, 2026
7d3bf48
chore: address last comments
Julink-eth May 12, 2026
6c1e4d4
Merge pull request #51 from MetaMask/feat/chg-trust-refine
khanti42 May 12, 2026
b942cc1
chore: merge main
Julink-eth May 12, 2026
82de8b8
Merge pull request #61 from MetaMask/feat/signAndSendTx
Julink-eth May 12, 2026
dbc14d7
chore: update jsdoc
stanleyyconsensys May 12, 2026
a23d9fd
Merge pull request #65 from MetaMask/fix/sync_tombstone_asset
stanleyyconsensys May 13, 2026
10f2ec3
refactor: add account resolver
stanleyyconsensys May 13, 2026
83cdbb4
chore: add test
stanleyyconsensys May 13, 2026
ea8893f
fix: address comments
stanleyyconsensys May 13, 2026
482238e
Merge pull request #66 from MetaMask/refactor/account-resolver
stanleyyconsensys May 14, 2026
1824bae
fix: self transfer validation
stanleyyconsensys May 15, 2026
7161f58
chore: add in memory cache to NetworkService
stanleyyconsensys May 15, 2026
1448d59
chore: update context.ts
stanleyyconsensys May 15, 2026
8df639a
chore: update txn utils
stanleyyconsensys May 15, 2026
002b3ee
Update TransactionSimulator.ts
stanleyyconsensys May 15, 2026
549656e
chore:
stanleyyconsensys May 15, 2026
454e727
fix: remove cache from txn service
stanleyyconsensys May 15, 2026
7365f4e
fix: test
stanleyyconsensys May 15, 2026
db7dd58
fix: comment
stanleyyconsensys May 15, 2026
f6b3e00
fix: test
stanleyyconsensys May 15, 2026
260ae9c
fix: network service
stanleyyconsensys May 15, 2026
8468e69
fix: missing env
stanleyyconsensys May 15, 2026
67d69ea
fix: comment
stanleyyconsensys May 15, 2026
886a2ef
fix: test
stanleyyconsensys May 15, 2026
cf115ae
fix: keyring api asset balance
stanleyyconsensys May 18, 2026
0af51d5
feat: add security scanning to snap confirmations
wantedsystem May 18, 2026
4ff5169
fix: fix copilot comments
wantedsystem May 19, 2026
31bce83
fix: accept contract address
stanleyyconsensys May 20, 2026
5abcd31
chore: add env example
stanleyyconsensys May 20, 2026
e25d4cf
fix: keying test
stanleyyconsensys May 20, 2026
0252c22
Merge pull request #67 from MetaMask/fix/simulation-self-transfer
stanleyyconsensys May 20, 2026
f5e8751
chore: update code comment
stanleyyconsensys May 20, 2026
21a960d
Merge branch 'main' into chore/network-service-with-cache
stanleyyconsensys May 20, 2026
b6c77e3
chore: code comment
stanleyyconsensys May 20, 2026
64982f7
Merge pull request #68 from MetaMask/chore/network-service-with-cache
stanleyyconsensys May 20, 2026
20c9a1d
fix: code comment
stanleyyconsensys May 20, 2026
c17efbf
Merge pull request #69 from MetaMask/fix/asset-sync-visibiltity
stanleyyconsensys May 20, 2026
9c91d5c
Merge branch 'main' into feat/stellar-snap-security-scan
wantedsystem May 20, 2026
09f244c
ci: migrate publish-preview workflow to MetaMask/github-tools (#73)
mikesposito May 21, 2026
979fe13
fix: add fee multiplier (#75)
stanleyyconsensys May 21, 2026
bbe661c
feat: add `onAmountInput ` and `onAddressInput` RPC (#63)
stanleyyconsensys May 21, 2026
80a27c3
refactor: add confirmation refresher (#74)
stanleyyconsensys May 21, 2026
84ae645
feat: allow payment only op for bridging
Julink-eth May 25, 2026
3edb343
chore: addess copilot's comments
Julink-eth May 25, 2026
42ea190
Merge pull request #77 from MetaMask/fix/add-allowed-op-for-bridging
Julink-eth May 25, 2026
0d4e371
Merge branch 'main' into feat/stellar-snap-security-scan
wantedsystem May 25, 2026
a39f0c4
fix: fix copilot ai comment
wantedsystem May 25, 2026
5519c94
chore: add expire time validation (#78)
stanleyyconsensys May 27, 2026
063f713
feat: add Stellar account asset info RPC
khanti42 May 27, 2026
11201df
Merge branch 'main' into feat/stellar-account-asset-info
khanti42 May 27, 2026
7a6ea64
chore: fix lint and tests
khanti42 May 27, 2026
49a1420
fix: fix comments
wantedsystem May 28, 2026
5a9556d
chore: use rpc instead of keyring for extra asset info
khanti42 May 28, 2026
4ade948
feat: add confirmSend RPC (#76)
stanleyyconsensys May 28, 2026
a130134
fix: fix comments
wantedsystem May 29, 2026
66c5c23
Merge pull request #70 from MetaMask/feat/stellar-snap-security-scan
wantedsystem May 29, 2026
4145a73
feat: add qr code on account activation dialog (#82)
stanleyyconsensys May 29, 2026
f11663a
feat: add transaction analysis (#83)
stanleyyconsensys May 29, 2026
eeabcff
fix: enforces SEP-29 “memo required” (#84)
stanleyyconsensys Jun 1, 2026
6c4a979
Merge branch 'main' into feat/stellar-account-asset-info
khanti42 Jun 1, 2026
3e00ee9
chore: address comment
khanti42 Jun 1, 2026
0d30583
chore: remove AccountAssetInfoService
khanti42 Jun 1, 2026
e9b1edf
chore: revert track transaction change
khanti42 Jun 1, 2026
c73a99b
feat: enable security scan for send confirmations
wantedsystem Jun 1, 2026
03326dd
feat: add transaction validation refresh to confirmation flows
wantedsystem Jun 1, 2026
0bc2e3b
fix: fix lint
wantedsystem Jun 1, 2026
1c52b48
fix: fix copilot comments
wantedsystem Jun 1, 2026
5b3e1b4
fix: fix comments
wantedsystem Jun 2, 2026
c462882
feat: replace soroban polling by horizon tx tracking
khanti42 Jun 2, 2026
fabf03a
chore: handle comments
khanti42 Jun 2, 2026
7e093d7
chore: handle comment 2
khanti42 Jun 3, 2026
e9d03b1
chore: simplify logic in buildAccountAssetInfoResponse
khanti42 Jun 3, 2026
9f0b905
Merge branch 'feat/stellar-account-asset-info' into feat/track-tx-thr…
khanti42 Jun 3, 2026
580447f
fix: fix comments
wantedsystem Jun 3, 2026
ee078ac
chore: handle comment
khanti42 Jun 3, 2026
fca6750
Merge pull request #85 from MetaMask/feat/enable-security-scan-send-flow
wantedsystem Jun 3, 2026
98ef090
chore: todo is a todo
khanti42 Jun 3, 2026
896c3a5
Merge pull request #81 from MetaMask/feat/stellar-account-asset-info
khanti42 Jun 3, 2026
8b3bc46
chore: use native raw balance (#80)
stanleyyconsensys Jun 4, 2026
9edcdba
feat: transaction scanning patch 1 - refactor transaction object and…
stanleyyconsensys Jun 4, 2026
81f40e7
feat: align computeFee and signAndSendTransaction param struct with S…
Julink-eth Jun 4, 2026
a6999cb
Merge branch 'main' into feat/track-tx-thrrough-horizon
stanleyyconsensys Jun 5, 2026
6826e5a
chore: refactor
stanleyyconsensys Jun 5, 2026
dc9b472
chore: rollback unuse change
stanleyyconsensys Jun 5, 2026
acbcd0a
fix: add config
stanleyyconsensys Jun 5, 2026
5b223aa
fix: comment
stanleyyconsensys Jun 5, 2026
11d5c63
Merge pull request #89 from MetaMask/feat/adjust-computeFee-struct
Julink-eth Jun 5, 2026
1469587
fix: skip memo require validation for self payment / swap (#91)
stanleyyconsensys Jun 5, 2026
35efc1b
fix: return required balance for fee exception
Julink-eth Jun 5, 2026
b3f07aa
Potential fix for pull request finding
Julink-eth Jun 5, 2026
2765706
chore: restore wrongly removed accepted shape
Julink-eth Jun 5, 2026
b831d61
chore: update the unit tests
Julink-eth Jun 5, 2026
4c311f4
chore: fix comments
Julink-eth Jun 5, 2026
0e5e134
Merge pull request #92 from MetaMask/fix/computeFee-exception-handling
Julink-eth Jun 5, 2026
62f47eb
Merge branch 'main' into feat/add-swap-struct-checks
Julink-eth Jun 5, 2026
a6508a9
Merge pull request #93 from MetaMask/feat/add-swap-struct-checks
Julink-eth Jun 5, 2026
a161786
Merge pull request #88 from MetaMask/feat/track-tx-thrrough-horizon
khanti42 Jun 5, 2026
2166e87
feat: transaction scan batch 2 (#96)
stanleyyconsensys Jun 10, 2026
685ed56
Feat/transcation scan 3 - add transaction mapper (#97)
stanleyyconsensys Jun 10, 2026
6f9d9e9
feat: refresh transaction on confirm
wantedsystem Jun 10, 2026
1cc6308
fix: fix comments
wantedsystem Jun 11, 2026
e5be1f7
refactor: centralize confirmation alert priority into a single helper
wantedsystem Jun 11, 2026
bbd2326
chore: bump keyring API and keyring SDK (#102)
stanleyyconsensys Jun 11, 2026
01f51f8
feat: add friction for malicious transactions instead of blocking
wantedsystem Jun 11, 2026
3410446
Merge branch 'main' into refactor/confirmation-alert-priority-help
wantedsystem Jun 11, 2026
0b8cffe
Merge branch 'main' into feat/malicious-transaction-acknowledgement
wantedsystem Jun 11, 2026
093e30a
fix: fix icon
wantedsystem Jun 11, 2026
82df766
fix: prioritize blocking state over ack swap and guard proceed handler
wantedsystem Jun 11, 2026
fb3ea97
feat: expose XLM base reserve in asset metadata
khanti42 Jun 11, 2026
75d31da
Merge branch 'main' into feat/refresh-transaction-on-confirm
wantedsystem Jun 12, 2026
e8990d8
fix: fix comments
wantedsystem Jun 12, 2026
7d27cb8
fix: extract destination amount from transaction result instead of u…
stanleyyconsensys Jun 12, 2026
4da869f
fix: return false for changeTrustOpt on unfunded accounts
khanti42 Jun 12, 2026
70a6b6e
Merge pull request #105 from MetaMask/feat/xlm-base-reserve-asset-met…
khanti42 Jun 12, 2026
6d3d309
Merge branch 'main' into fix/change-trust-unfunded-account-status
khanti42 Jun 12, 2026
937a644
feat: add sep41 transfer support in transaction mapper (#106)
stanleyyconsensys Jun 12, 2026
f3bcc9e
refactor: rename buildEmptyTrustLineEntries to buildDefaultAccountAss…
khanti42 Jun 12, 2026
ac75a5a
refactor: drop remote simulation from transaction scan
wantedsystem Jun 12, 2026
e247958
Revert "refactor: drop remote simulation from transaction scan"
wantedsystem Jun 12, 2026
0f907c8
mohamedamine.harty.external@banque-france.fr
wantedsystem Jun 12, 2026
90d2e66
Merge branch 'main' into feat/malicious-transaction-acknowledgement
wantedsystem Jun 12, 2026
83650bf
Merge branch 'main' into refactor/confirmation-alert-priority-help
wantedsystem Jun 12, 2026
88b215c
Merge pull request #103 from MetaMask/refactor/confirmation-alert-pri…
wantedsystem Jun 12, 2026
b7d657f
Merge remote-tracking branch 'origin/main' into feat/malicious-transa…
wantedsystem Jun 12, 2026
fe9d5e3
Merge pull request #107 from MetaMask/fix/change-trust-unfunded-accou…
khanti42 Jun 12, 2026
94de1cf
feat: transaction scan 4 - add transacstion scan service (#101)
stanleyyconsensys Jun 12, 2026
149e70c
fix: re-check transaction validity before proceeding from ack screen
wantedsystem Jun 12, 2026
faa3092
feat: add asset sync per hour (#108)
stanleyyconsensys Jun 15, 2026
486d2f7
fix: comments
wantedsystem Jun 15, 2026
f075d7c
feat: map SEP41 asset receive on transaction sync (#109)
stanleyyconsensys Jun 15, 2026
7c6e908
Merge pull request #104 from MetaMask/feat/malicious-transaction-ackn…
wantedsystem Jun 15, 2026
c7e6d62
refactor: rebuild transaction with fresh expiry for security scan
wantedsystem Jun 15, 2026
754c2a4
chore: update snap manifest
wantedsystem Jun 15, 2026
aa30c06
refactor(scan): make remote simulation flow-aware
wantedsystem Jun 15, 2026
328f6ff
chore: fix sync issue on account, add change trust keyring txn type a…
stanleyyconsensys Jun 16, 2026
b51209b
Merge pull request #112 from MetaMask/refactor/flow-aware-scan-simula…
wantedsystem Jun 16, 2026
fdbf8ff
Merge branch 'main' into refactor/rebuild-tx-expiry-for-scan
wantedsystem Jun 16, 2026
f141f41
chore: update native token name from `Lumen` to `XLM` (#115)
stanleyyconsensys Jun 16, 2026
e79dfb4
chore: adjust dust payment amount (#114)
stanleyyconsensys Jun 16, 2026
197acdd
feat: local-simulation fund flow on sign-transaction confirmation
wantedsystem Jun 16, 2026
6a6bee2
Merge remote-tracking branch origin/main into feat/sign-transaction-l…
wantedsystem Jun 16, 2026
e6a584c
fix(confirmation): only schedule security scan when useSecurityAlerts…
wantedsystem Jun 17, 2026
d34371f
fix: fix comments
wantedsystem Jun 17, 2026
e46035b
feat: use srcChainId and destChaindId to improve swap/bridge history
Julink-eth Jun 17, 2026
368ec91
fix: support operation-source estimated changes
wantedsystem Jun 17, 2026
f8ea848
fix: hide native icon in estimated changes
wantedsystem Jun 17, 2026
120d85a
Potential fix for pull request finding
Julink-eth Jun 18, 2026
ef7c25c
chore: add missing unit test
Julink-eth Jun 18, 2026
01aa06a
fix: asset disappear after import (#116)
stanleyyconsensys Jun 18, 2026
d8943dc
fix: skip failed receive txn (#120)
stanleyyconsensys Jun 18, 2026
63c5770
chore: use asset Ids instead of chain Ids and simplify signAndSendTra…
Julink-eth Jun 19, 2026
383dfd0
feat: use blockaid simulation for estimated changes on sign-tx and send
wantedsystem Jun 19, 2026
fbad712
fix: fix comments
wantedsystem Jun 19, 2026
138cf49
fix: remove and adjust locate (#121)
stanleyyconsensys Jun 22, 2026
a7d03de
fix: incorrect icon url (#122)
stanleyyconsensys Jun 22, 2026
5dab9d8
fix: transaction mapping to better handle swaps during pending to con…
stanleyyconsensys Jun 22, 2026
26c6339
fix: incorrect network icon (#124)
stanleyyconsensys Jun 22, 2026
2ed3884
refactor: error handle batch 1 - add generic error class and implemen…
stanleyyconsensys Jun 22, 2026
6fc96b9
Merge branch 'main' into feat/improve-bridge-tx-history
Julink-eth Jun 22, 2026
7d64930
Merge remote-tracking branch origin/main into feat/sign-transaction-l…
wantedsystem Jun 22, 2026
3ce6809
fix: update deriveEstimatedChanges tests to use loadOnChainAccountsSafe
wantedsystem Jun 22, 2026
2c580a2
chore: make asset Ids non optional
Julink-eth Jun 22, 2026
b724d29
chore: fix unit tests
Julink-eth Jun 22, 2026
3bf3399
Merge pull request #117 from MetaMask/feat/improve-bridge-tx-history
Julink-eth Jun 22, 2026
8cab5ac
chore: refactor sign and send
stanleyyconsensys Jun 22, 2026
28934ae
Potential fix for pull request finding
Julink-eth Jun 22, 2026
19ab0a0
Potential fix for pull request finding
Julink-eth Jun 22, 2026
78c7083
Potential fix for pull request finding
Julink-eth Jun 22, 2026
006bf67
Potential fix for pull request finding
Julink-eth Jun 22, 2026
5c2b1e2
Potential fix for pull request finding
Julink-eth Jun 22, 2026
c78ea5c
chore: fix format in unit tests
Julink-eth Jun 22, 2026
25bc657
chore: build manifest
Julink-eth Jun 22, 2026
c645113
Merge pull request #128 from MetaMask/refactor/sign-and-send
Julink-eth Jun 22, 2026
9a498b1
refactor: re-validate transaction every cycle
wantedsystem Jun 22, 2026
b0d1b10
refactor: AssetMetadataService error handle (#125)
stanleyyconsensys Jun 23, 2026
a30b7da
refactor: PriceService error handle (#126)
stanleyyconsensys Jun 23, 2026
32a53d9
refactor: TransactionScanService error handle (#127)
stanleyyconsensys Jun 23, 2026
faf28dd
chore: remove unuse config (#130)
stanleyyconsensys Jun 23, 2026
f7d18d5
refactor: Keyring Handler and AccountService error handle (#129)
stanleyyconsensys Jun 23, 2026
19462c1
refactor: OnChainAccount error handle (#131)
stanleyyconsensys Jun 23, 2026
64afb8c
fix: rebuild expired envelopes and always feed security scan request
wantedsystem Jun 23, 2026
7de4ea4
fix: fix comments
wantedsystem Jun 23, 2026
10d8a00
Merge branch 'main' into refactor/rebuild-tx-expiry-for-scan
wantedsystem Jun 23, 2026
b9c240c
Merge remote-tracking branch origin/main into feat/show-estimated-bal…
wantedsystem Jun 23, 2026
eba4dd9
fix: adjust fee multiplier with theshold (#132)
stanleyyconsensys Jun 24, 2026
2155d19
Merge pull request #111 from MetaMask/refactor/rebuild-tx-expiry-for-…
wantedsystem Jun 24, 2026
f4089f3
feat: estimated balance changes in confirmation dialog
wantedsystem Jun 24, 2026
0ba64c2
Merge branch 'main' into feat/show-estimated-balance-changes-in-confi…
wantedsystem Jun 24, 2026
cf90956
fix: copilot comments
wantedsystem Jun 24, 2026
4775090
refactor: TransacationService and ClientRequest handler error handle …
stanleyyconsensys Jun 25, 2026
645f4c2
fix: comments
wantedsystem Jun 25, 2026
ee6f083
fix: fix comments
wantedsystem Jun 25, 2026
d3ed195
fix: surface Blockaid estimated changes and clarify scan error copy
wantedsystem Jun 25, 2026
6ccc4cd
fix: comments
wantedsystem Jun 25, 2026
30b61e2
Merge pull request #134 from MetaMask/feat/show-estimated-balance-cha…
wantedsystem Jun 26, 2026
89404bf
feat: enhance transaction alert scanning (#138)
stanleyyconsensys Jun 26, 2026
56e2f7b
fix: handle non-url origins
0xEdouardEth Jun 25, 2026
b4fdd1d
feat: Add pending transaction reconcile max attempt and max age in Tr…
stanleyyconsensys Jun 27, 2026
2ccc2c8
bump: ts-jest to 29.4.11 (#143)
stanleyyconsensys Jun 29, 2026
018ec2c
refactor: WalletService error handle (#141)
stanleyyconsensys Jun 29, 2026
a127425
chore: remove fee compute for swap transaction and muliplier base inc…
stanleyyconsensys Jun 29, 2026
135a6d5
chore: remove test dapp (#146)
stanleyyconsensys Jun 29, 2026
f9fb79c
refactor: wrap method `trackError` with `trackErrorIfNeeded` and merg…
stanleyyconsensys Jun 29, 2026
df75342
chore: fill error track gap - add trackError when track transaction /…
stanleyyconsensys Jun 30, 2026
e2f438b
fix: review
0xEdouardEth Jun 30, 2026
83ccdb6
Merge pull request #140 from MetaMask/fix/validate-origin-url
0xEdouardEth Jun 30, 2026
97f29c8
chore: bump concurrently to 10.0.3 (#144)
stanleyyconsensys Jul 2, 2026
7e697b3
chore: update XLM icon (#152)
stanleyyconsensys Jul 3, 2026
7a17f85
fix: update env example (#153)
stanleyyconsensys Jul 6, 2026
0f33683
fix: preserve decimal notation for small amounts (#156)
jeremytsng Jul 15, 2026
3e9987e
chore: enhancement performance by avoid parallel account sync (#158)
stanleyyconsensys Jul 16, 2026
84e39dc
fix: emit balance update when it become zero (#161)
stanleyyconsensys Jul 22, 2026
9fb941e
fix: add default fallback URLs for token, static, and price APIs (#162)
jeremytsng Jul 22, 2026
475005f
chore: align dependencies typescript, eslint, Oxfmt with monorepo (#154)
Julink-eth Jul 22, 2026
88da4db
chore: add explorer fallback url (#163)
stanleyyconsensys Jul 27, 2026
3644acf
fix: poll Horizon after 5s to match Stellar block time
jeremytsng Jul 24, 2026
d167ed0
feat: add read me (#166)
stanleyyconsensys Jul 27, 2026
9ce262f
fix: lint readme (#167)
stanleyyconsensys Jul 27, 2026
f3b6814
Merge pull request #165 from MetaMask/fix/update-track-tx-time
jeremytsng Jul 27, 2026
af808d1
fix: read only for asset handler (#168)
stanleyyconsensys Jul 27, 2026
c98b6af
chore: align package tsconfig, jest and eslint config with monorepo
jeremytsng Jul 27, 2026
682439b
Merge pull request #164 from MetaMask/chore/monorepo-prestage
jeremytsng Jul 29, 2026
43ffc4f
feat: enrich asset trustline information via keyring api (#170)
stanleyyconsensys Jul 29, 2026
87cecff
fix: remove base64 decode on `SignMessage` (#171)
stanleyyconsensys Jul 30, 2026
ba8f7b6
fix: sign transaction and sign auth entry layout (#172)
stanleyyconsensys Aug 1, 2026
113fc1a
Merge remote-tracking branch 'stellar-wallet-snap/main' into chore/st…
jeremytsng Aug 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions merged-packages/stellar-wallet-snap/.depcheckrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ignores": [
"jest-transform-stub",
"ts-jest",
"@metamask/auto-changelog",
"@metamask/key-tree",
"@stellar/stellar-sdk",
"@types/lodash",
"async-mutex",
"bignumber.js",
"lodash"
]
}
80 changes: 80 additions & 0 deletions merged-packages/stellar-wallet-snap/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Use:
# - local for local development
# - test for running tests locally (mandatory)
# - production before submitting a PR
ENVIRONMENT=local

# Use:
# - all for all logs
# - error for error logs
# - warn for warn logs
# - info for info logs
# - debug for debug logs
# - silent for silent logs
LOG_LEVEL=all

# Mainnet RPC URLs
RPC_URL_MAINNET=https://mainnet.sorobanrpc.com

# Mainnet Horizon URLs
HORIZON_URL_MAINNET=https://horizon.stellar.org

# Mainnet Explorer Base URLs
EXPLORER_MAINNET_BASE_URL=https://stellar.expert/explorer/public

# Testnet RPC URLs
RPC_URL_TESTNET=https://soroban-testnet.stellar.org

# Testnet Horizon URLs
HORIZON_URL_TESTNET=https://horizon-testnet.stellar.org

# Testnet Explorer Base URLs
EXPLORER_TESTNET_BASE_URL=https://stellar.expert/explorer/testnet

# Token API Base URL
TOKEN_API_BASE_URL=https://tokens.api.cx.metamask.io

# Static API Base URL
STATIC_API_BASE_URL=https://static.cx.metamask.io

# Price API Base URL
PRICE_API_BASE_URL=https://price.api.cx.metamask.io

# Security Alerts API Base URL
SECURITY_ALERTS_API_BASE_URL=https://security-alerts.api.cx.metamask.io

# Cache TTL Milliseconds for base fee
#BASE_FEE_TTL_MILLISECONDS=

# Cache TTL Milliseconds for load on chain account
#LOAD_ON_CHAIN_ACCOUNT_TTL_MILLISECONDS=

# Cache TTL Milliseconds for SEP41 transfer simulate transaction
#SIMULATE_TRANSACTION_TTL_MILLISECONDS=

# Cache TTL Milliseconds for sep41 asset balance
#SEP41_ASSET_BALANCE_TTL_MILLISECONDS=

# Cache TTL Milliseconds for spot prices
#SPOT_PRICES_TTL_MILLISECONDS=

# Cache TTL Milliseconds for fiat exchange rates
#FIAT_EXCHANGE_RATES_TTL_MILLISECONDS=

# Cache TTL Milliseconds for historical prices
#HISTORICAL_PRICES_TTL_MILLISECONDS=

# Inclusion fee multiplier (applied to Stellar network base fee per operation)
#BASE_FEE_MULTIPLIER=

# Maximum fee threshold in XLM
#MAX_FEE_THRESHOLD_IN_XLM=

# Maximum background reschedules for the track-transaction cron job while Horizon has not
#TRACK_TRANSACTION_MAX_RESCHEDULES=10

# Maximum number of reconcile attempts for a pending transaction
#MAX_RECONCILE_ATTEMPTS=5

# Maximum age of a pending transaction in milliseconds
#MAX_PENDING_TRANSACTION_AGE=30000
2 changes: 2 additions & 0 deletions merged-packages/stellar-wallet-snap/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
coverage/
10 changes: 10 additions & 0 deletions merged-packages/stellar-wallet-snap/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

[Unreleased]: https://github.com/MetaMask/snap-stellar-wallet/
201 changes: 201 additions & 0 deletions merged-packages/stellar-wallet-snap/LICENSE.APACHE2
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 ConsenSys Software Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
16 changes: 16 additions & 0 deletions merged-packages/stellar-wallet-snap/LICENSE.MIT0
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
MIT No Attribution

Copyright 2022 ConsenSys Software Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
69 changes: 69 additions & 0 deletions merged-packages/stellar-wallet-snap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Stellar Wallet Snap

MetaMask Snap that implements Stellar account management, signing, sends, trustlines, and related multichain client APIs.

## Configuration

Rename `.env.example` to `.env`. Runtime settings are loaded from `.env`.

## Folder structure

High-level layout of `packages/snap` (nested implementation folders like `services/transaction/simulation` are omitted):

| Folder | Purpose |
| -------------------------------- | ------------------------------------------------------------------------------ |
| `locales/` | Localized UI strings (built from `messages.json`) |
| `images/` | Snap icons / static assets |
| `scripts/` | Build helpers (manifest, locale, preinstalled snap) |
| `docs/` | Package documentation (folder map, use cases, transaction pipeline) |
| `docs/use-cases/` | Use-case docs grouped by domain (`keyring`, `client-request`, `cron-job`, ...) |
| `docs/misc/transaction/` | Transaction build / validate / submit reference |
| `docs/misc/synchronization/` | Background sync flow and component details |
| `src/api/` | Shared types and Superstruct validators (CAIP, XDR, amounts, …) |
| `src/handlers/` | Snap RPC / lifecycle entry handlers; orchestrates use cases |
| `src/handlers/asset/` | `onAssets*` lookups, conversion, market data, historical price |
| `src/handlers/clientRequest/` | SIP-31 client methods (send, trustline, fees, …) |
| `src/handlers/cronjob/` | Background sync, transaction tracking, confirmation refresh |
| `src/handlers/keyring/` | Keyring API (accounts, sign tx / message / auth entry) |
| `src/handlers/user-input/` | Confirmation dialog button / form events |
| `src/services/` | Domain logic (no Snap entry-point routing) |
| `src/services/account/` | Keyring account persistence and lookups |
| `src/services/asset-metadata/` | Asset metadata resolution (symbol, icon, …) |
| `src/services/cache/` | In-memory and state-backed caches |
| `src/services/network/` | Horizon / network calls, fees, activation checks |
| `src/services/on-chain-account/` | On-chain balances, trustlines, and sync |
| `src/services/price/` | Spot / conversion prices |
| `src/services/state/` | Snap state manager |
| `src/services/sync/` | Assets / Balances / Transactions synchronization orchestration |
| `src/services/transaction/` | Build, validate, map, send, and pending keyring transactions |
| `src/services/transaction-scan/` | Security / Blockaid scanning |
| `src/services/wallet/` | HD wallet and signing |
| `src/ui/` | Snap UI (JSX screens shown inside MetaMask) |
| `src/ui/confirmation/` | Confirmation dialogs and UX controller |
| `src/ui/images/` | Inline UI assets |
| `src/utils/` | Cross-cutting helpers (logging, i18n, CAIP, snap APIs, …) |

## Use cases

End-to-end flows (handler → services → UI) live under [`docs/use-cases/`](./docs/use-cases/).
Background synchronization overview: [`docs/misc/synchronization/overview.md`](./docs/misc/synchronization/overview.md).
Shared transaction build / validate / send: [`docs/misc/transaction/`](./docs/misc/transaction/README.md).

## API examples

### `keyring_createAccount`

```typescript
provider.request({
method: 'wallet_invokeKeyring',
params: {
snapId,
request: {
method: 'keyring_createAccount',
params: {
scope: 'stellar:pubnet', // CAIP-2 chain ID
},
},
},
});
```
Loading
Loading