Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/integrate aptos #8396

Merged
merged 109 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
aad180d
WIP: ledger-live boilerplate
Mar 6, 2023
70304a8
Implement base functionality for aptos
belyokhin Apr 10, 2023
175b5cb
Merge branch 'develop' into merge-aptos-develop
belyokhin May 8, 2023
6484c0d
Add transaction configuration
belyokhin Jun 4, 2023
8ebf037
Merge branch 'develop' into aptos
belyokhin Jun 8, 2023
3c8d971
Fix issues
belyokhin Jun 9, 2023
d6398a2
Update dictionary
belyokhin Jun 20, 2023
43da6b5
Merge branch 'aptos' into merge_aptos_develop
belyokhin Sep 29, 2023
b71bf2b
update `hw-app-aptos` package
belyokhin Oct 3, 2023
2a2117c
Merge branch 'develop' into aptos
belyokhin Oct 29, 2023
ac8ed9d
Rework transaction receiving
belyokhin Nov 18, 2023
1b88abf
Merge branch 'develop' into aptos
belyokhin Nov 18, 2023
0f815c0
Fix dependencies
belyokhin Nov 18, 2023
870ee55
Merge branch 'develop' into aptos
belyokhin Dec 4, 2023
c0476cd
LLD small fixes
belyokhin Dec 5, 2023
365f479
Implement Aptos in LLM
belyokhin Dec 5, 2023
83bb756
Merge branch 'develop' into aptos
belyokhin Dec 27, 2023
bf7246f
Change transaction praparation, update operation signing
belyokhin Jan 12, 2024
8a8668b
Merge branch 'develop' into aptos
belyokhin Jan 12, 2024
9c0f307
Update `pnpm-lock.yaml` after merge with `develop`
belyokhin Jan 12, 2024
561c958
Calculate staked balance; display balance on account page
belyokhin Jan 16, 2024
3e2d8d8
Rename `xpub` field to `publicKey`
belyokhin Jan 16, 2024
926f35a
Merge branch 'develop' into aptos
belyokhin Jan 16, 2024
428493c
Remove unused field
belyokhin Jan 16, 2024
2540728
Fix staked amount
belyokhin Jan 16, 2024
0532097
Fix delegation dictionary
belyokhin Jan 16, 2024
3422bdd
Move `compareAddress` helper from `utils` to `logic`
belyokhin Jan 16, 2024
21e37bf
Rename `delegatedBalance` to `delegatedAmount`
belyokhin Jan 16, 2024
efdf39d
Fix typo in dictionary
belyokhin Jan 16, 2024
a0da2bc
Use mainnet
belyokhin Jan 16, 2024
faeeac4
Revert "Rename `xpub` field to `publicKey`"
belyokhin Jan 17, 2024
2a744ab
Handle the case when account's field `freshAddresses` is empty
belyokhin Jan 17, 2024
df02eb6
Get public key from account id if it can not be retrieved from the de…
belyokhin Jan 17, 2024
2c4c24b
Fix condition with xpub
belyokhin Jan 17, 2024
96a78b7
Implement `getStake` function to calculate stake rewards
belyokhin Jan 17, 2024
576c6c8
Use testnet endpoint if testnet selected
belyokhin Jan 17, 2024
00b2ab0
Change transaction `function`; add value to `type_arguments`
belyokhin Jan 18, 2024
b358627
Fix bug with the `recepient` field
belyokhin Jan 18, 2024
2476e80
Revert "Change transaction `function`; add value to `type_arguments`"
belyokhin Jan 18, 2024
667b529
Remove redundant translations
belyokhin Jan 19, 2024
d10ac5a
Add Aptos to CLI app
belyokhin Jan 19, 2024
51abfed
Add changeset
belyokhin Jan 19, 2024
0b7ebe5
Fix linter and types problems
belyokhin Jan 19, 2024
88294e7
Merge branch 'develop' into feat/aptos
belyokhin Jan 19, 2024
56fd855
Remove redundant dependency
belyokhin Jan 19, 2024
2a2ba68
Merge branch 'develop' into feat/aptos
belyokhin Jan 19, 2024
065354b
Merge branch 'LedgerHQ:develop' into feat/aptos
vldmkr Jan 23, 2024
4408d83
support/fix pnpm-lock.yaml after merge conflict
belyokhin Jan 24, 2024
57bfc8b
Merge branch 'develop' into feat/aptos
belyokhin Jan 24, 2024
3c25ea6
support(aptos): update pnpm-lock.yaml after merge conflict
belyokhin Jan 24, 2024
ffb8a92
feat(aptos): update transfer function
belyokhin Jan 24, 2024
bc26e23
Merge branch 'develop' into feat/integrate-aptos
hedi-edelbloute Nov 19, 2024
b96f07f
fix rebase issues
hedi-edelbloute Nov 19, 2024
5485226
fix remaining getAccountUnit imports
hedi-edelbloute Nov 19, 2024
0a58543
Merge branch 'develop' into feat/integrate-aptos
hedi-edelbloute Nov 21, 2024
d95527a
hw-app-aptos.js moved to lib/ledgerjs/packages/hw-app-aptos. Test fil…
joaoccmartins Nov 28, 2024
30369fe
Repurposed README.md from algorand. removed some unused dependencies …
joaoccmartins Nov 28, 2024
58995bc
Small cosmetic changes.
joaoccmartins Nov 28, 2024
b3a655f
Managed to make tests work.
joaoccmartins Nov 28, 2024
d9a13cf
Aptos fixing: History isn't full (#8512)
may01 Nov 29, 2024
0323377
fix(aptos): amount balance (#8462)
joaoccmartins Nov 29, 2024
b575976
feat(aptos): add coin feature flag (#8498)
jccguimaraes Nov 29, 2024
0eeef98
Removing fees from LLD
joaoccmartins Dec 3, 2024
c217cbb
Feedback from PR.
joaoccmartins Dec 4, 2024
8c509dc
Removed the custom fees from Ledger Live Mobile.
joaoccmartins Dec 5, 2024
92ce219
Removed a few files that are not needed after the custom fees removal.
joaoccmartins Dec 5, 2024
39fdfef
Merge pull request #8572 from LedgerHQ/aptos/move-hw-app-aptos
joaoccmartins Dec 5, 2024
189511b
fix(aptos): remove inexistent dependency (#8644)
semeano Dec 9, 2024
004ecb2
Removing unused imports.
joaoccmartins Dec 10, 2024
6653789
Merge pull request #8619 from LedgerHQ/aptos/remove-fees
joaoccmartins Dec 11, 2024
fd0af99
Feat/live 15120 aptos bst fix fees visibility for unparsed transactio…
may01 Dec 11, 2024
c70a5ec
feat(aptos): update aptos package (#8661)
semeano Dec 12, 2024
180a3f3
[QAA] adding Aptos send test (#8450)
VicAlbr Dec 12, 2024
509c274
Fix transaction parsing, after removing sender form aptos input argum…
may01 Dec 13, 2024
8673ad4
fix(aptos): add amount validation (#8481)
jccguimaraes Dec 13, 2024
35de23a
test(aptos): Unit tests for Aptos API (#8693)
semeano Dec 16, 2024
b60be46
Added a test file for the LedgerAccount based on Jest.
joaoccmartins Dec 17, 2024
d356913
Feat/live 15457 aptos send receive verify get max send balance logic …
may01 Dec 19, 2024
00dba47
Merge pull request #8716 from LedgerHQ/aptos/ledger-account-test
joaoccmartins Dec 19, 2024
fcbfca2
Merge branch 'develop' into feat/integrate-aptos
jccguimaraes Dec 19, 2024
8d5fe03
fix: merge conflicts
semeano Dec 20, 2024
698c42f
chore: update dependencies
semeano Dec 20, 2024
56302fb
Removed additional settings from Ledger Live Desktop.
joaoccmartins Dec 20, 2024
14b1222
Merge pull request #8747 from LedgerHQ/apptos/remove-additional-setti…
joaoccmartins Dec 26, 2024
ef4242c
Merge branch 'develop' into feat/integrate-aptos
hedi-edelbloute Dec 26, 2024
5d96801
fix merge issues
hedi-edelbloute Dec 26, 2024
25061bb
feat: add aptos bot tests (#8598)
jccguimaraes Dec 30, 2024
f664909
feat(aptos): update node and indexer endpoints (#8773)
semeano Dec 30, 2024
d4caafe
test(aptos): bridge integration tests (#8721)
semeano Dec 30, 2024
e9a6561
Feat/live 15540 aptos send receive fix when send max is toggled on th…
may01 Dec 30, 2024
089a7da
Feat/live 15542 aptos send receive fix send funds simulation failed w…
may01 Dec 31, 2024
2d897b1
Update transaction expiration ts (#8780)
may01 Dec 31, 2024
8aee213
Feat/hot fix tx expiration (#8791)
may01 Jan 2, 2025
3f89502
test(aptos): improve unit tests (#8784)
jccguimaraes Jan 3, 2025
89aea3a
test(aptos): index api (#8778)
semeano Jan 3, 2025
37d0efd
test(aptos): improve unit tests (#8792)
jccguimaraes Jan 3, 2025
854b90d
Feat/live 15126 aptos unit tests bride boradcast prepare transactions…
may01 Jan 3, 2025
4e7b8e3
fix(aptos): enhancements corrections (#8798)
jccguimaraes Jan 3, 2025
b901ba9
feat(aptos): improve aptos unit tests (#8781)
jccguimaraes Jan 6, 2025
86c03f9
test(aptos): synchronisation unit tests (#8794)
semeano Jan 6, 2025
f39521b
fix: transfer type label (#8811)
semeano Jan 6, 2025
940b324
test(aptos): improvement to unit tests (#8779)
jccguimaraes Jan 6, 2025
5e3d77e
update changeset
hedi-edelbloute Jan 6, 2025
babfb42
revert some diffs and disable aptos e2e speculos test
hedi-edelbloute Jan 6, 2025
6df595b
add todo jira link in e2e tests
hedi-edelbloute Jan 6, 2025
59092e1
regenerate lockfile
hedi-edelbloute Jan 6, 2025
bd874f0
fix(aptos): revert mobile gemfile.lock
jccguimaraes Jan 6, 2025
a7c933b
chore(aptos): generated file again
jccguimaraes Jan 6, 2025
9947f20
Merge pull request #8822 from LedgerHQ/fix/revert-gemfile-lock
hedi-edelbloute Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/fast-comics-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@ledgerhq/types-cryptoassets": minor
"@ledgerhq/cryptoassets": minor
"@ledgerhq/hw-app-aptos": minor
"@ledgerhq/types-live": minor
"@ledgerhq/crypto-icons-ui": minor
"@actions/turbo-affected": minor
"ledger-live-desktop": minor
"live-mobile": minor
"@ledgerhq/live-common": minor
"@ledgerhq/coin-framework": minor
"@ledgerhq/live-cli": minor
"@ledgerhq/live-env": minor
---

Support for Aptos blockchain
2 changes: 2 additions & 0 deletions apps/cli/src/live-common-setup-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { WALLET_API_VERSION } from "@ledgerhq/live-common/wallet-api/constants";
setWalletAPIVersion(WALLET_API_VERSION);

setSupportedCurrencies([
"aptos",
"aptos_testnet",
"bitcoin",
"ethereum",
"bsc",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/scripts/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = (path, options) => {
"@solana/codecs-numbers",
"@solana/codecs-strings",
"@solana/options",
"@aptos-labs/aptos-client",
]);

if (pkgNamesToTarget.has(pkg.name)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ setSupportedCurrencies([
"songbird",
"flare",
"near",
"aptos",
"aptos_testnet",
"icon",
"icon_berlin_testnet",
"optimism",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import IconFees from "~/renderer/icons/Fees";
import IconTrash from "~/renderer/icons/Trash";
import IconLink from "~/renderer/icons/LinkIcon";
import IconCoins from "~/renderer/icons/Coins";
import IconCheck from "~/renderer/icons/Check";
import Freeze from "~/renderer/icons/Freeze";
import Unfreeze from "~/renderer/icons/Unfreeze";
import Box from "~/renderer/components/Box";
Expand Down Expand Up @@ -120,6 +121,7 @@ const iconsComponent = {
STAKE: IconDelegate,
UNSTAKE: IconUndelegate,
WITHDRAW_UNSTAKED: IconCoins,
UNKNOWN: IconCheck,
};
class ConfirmationCheck extends PureComponent<{
marketColor: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { AptosFamily } from "./types";

const family: AptosFamily = {};

export default family;
14 changes: 14 additions & 0 deletions apps/ledger-live-desktop/src/renderer/families/aptos/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {
AptosAccount,
Transaction,
TransactionStatus,
} from "@ledgerhq/live-common/families/aptos/types";
import { Operation } from "@ledgerhq/types-live";
import { FieldComponentProps, LLDCoinFamily } from "../types";

export type AptosFamily = LLDCoinFamily<AptosAccount, Transaction, TransactionStatus, Operation>;
export type AptosFieldComponentProps = FieldComponentProps<
AptosAccount,
Transaction,
TransactionStatus
>;
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const listSupportedTokens = () =>
const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
const mock = useEnv("MOCK");

const aptos = useFeature("currencyAptos");
const aptosTestnet = useFeature("currencyAptosTestnet");
const axelar = useFeature("currencyAxelar");
const stargaze = useFeature("currencyStargaze");
const secretNetwork = useFeature("currencySecretNetwork");
Expand Down Expand Up @@ -89,6 +91,8 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {

const featureFlaggedCurrencies = useMemo(
(): Partial<Record<CryptoCurrencyId, Feature<unknown> | null>> => ({
aptos,
aptos_testnet: aptosTestnet,
axelar,
stargaze,
secret_network: secretNetwork,
Expand Down Expand Up @@ -142,6 +146,8 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
xion,
}),
[
aptos,
aptosTestnet,
axelar,
stargaze,
secretNetwork,
Expand Down
13 changes: 12 additions & 1 deletion apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,8 @@
"withdrawUnbondedAmount": "Withdrawn Amount",
"palletMethod": "Method",
"transferAmount": "Transfer Amount",
"validatorsCount": "Validators ({{number}})"
"validatorsCount": "Validators ({{number}})",
"version": "Version"
}
},
"operationList": {
Expand Down Expand Up @@ -5815,6 +5816,16 @@
"title": "Account not scanned by full node",
"description": "Please configure your full node to scan for the accounts associated with this device. Your full node must first scan the blockchain for this account before you can add it to your portfolio."
},
"SequenceNumberTooNew": {
"title": "Sequence number too new"
},
"SequenceNumberTooOld": {
"title": "Sequence number too old",
"description": "Sequence number too old"
},
"TransactionExpired": {
"title": "Transaction expired"
},
"SwapRateExpiredError": {
"title": "Rate Expired",
"description": "Exchange rate expired. Please refresh and try again."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ const transactionE2E = [
transaction: new Transaction(Account.XRP_1, Account.XRP_2, "0.0001", undefined, "noTag"),
xrayTicket: "B2CQA-2816",
},
/*
hedi-edelbloute marked this conversation as resolved.
Show resolved Hide resolved
TODO: https://ledgerhq.atlassian.net/browse/LIVE-15624 needs to be done to enable it
{
transaction: new Transaction(Account.APTOS_1, Account.APTOS_2, "0.0001"),
xrayTicket: "B2CQA-2920",
},
*/
];

const tokenTransactionInvalid = [
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-mobile/scripts/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = (path, options) => {
"@solana/codecs-numbers",
"@solana/codecs-strings",
"@solana/options",
"@aptos-labs/aptos-client",
]);

if (pkgNamesToTarget.has(pkg.name)) {
Expand Down
2 changes: 2 additions & 0 deletions apps/ledger-live-mobile/src/live-common-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ setSupportedCurrencies([
"casper",
"neon_evm",
"lukso",
"aptos",
"aptos_testnet",
"linea",
"linea_sepolia",
"blast",
Expand Down
13 changes: 13 additions & 0 deletions apps/ledger-live-mobile/src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,18 @@
"title": "Invalid Provider",
"description": "You have to change \"My Ledger provider\" setting. To change it, open Ledger Live \"Settings\", select \"Experimental features\", and then select a different provider."
},
"GasLessThanEstimate": {
"title": "This may be too low. Please increase"
},
"SequenceNumberTooNew": {
"title": "Sequence number too new"
},
"SequenceNumberTooOld": {
"title": "Sequence number too old"
},
"TransactionExpired": {
"title": "Transaction expired"
},
"SequenceNumberError": {
"title": "Sequence number error",
"description": "Please close the window and try again later"
Expand Down Expand Up @@ -3762,6 +3774,7 @@
"to": "To",
"infoTotalTitle": "Total debit",
"infoTotalDesc": "Includes transaction amount and the selected network fees",
"gasFee": "Gas fee",
"gasLimit": "Gas limit",
"gasPrice": "Gas price",
"maxFee": "Max fee",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) {

const mock = useEnv("MOCK");

const aptos = useFeature("currencyAptos");
const aptosTestnet = useFeature("currencyAptosTestnet");
const axelar = useFeature("currencyAxelar");
const stargaze = useFeature("currencyStargaze");
const secretNetwork = useFeature("currencySecretNetwork");
Expand Down Expand Up @@ -111,6 +113,8 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) {

const featureFlaggedCurrencies = useMemo(
(): Partial<Record<CryptoCurrencyId, Feature<unknown> | null>> => ({
aptos,
aptos_testnet: aptosTestnet,
axelar,
stargaze,
umee,
Expand Down Expand Up @@ -164,6 +168,8 @@ export default function AddAccountsSelectCrypto({ navigation, route }: Props) {
xion,
}),
[
aptos,
aptosTestnet,
axelar,
stargaze,
umee,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ exports[`formatCurrencyUnit with custom options with locale de-DE should correct

exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Algorand unit (ALGO) 1`] = `"12.345.678.900,000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Aptos (Testnet) unit (APT) 1`] = `"123.456.789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Aptos unit (APT) 1`] = `"123.456.789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0,012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Arbitrum unit (ETH) 1`] = `"0,012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -340,6 +344,10 @@ exports[`formatCurrencyUnit with custom options with locale en-US should correct

exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Algorand unit (ALGO) 1`] = `"12,345,678,900.000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Aptos (Testnet) unit (APT) 1`] = `"123,456,789.00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Aptos unit (APT) 1`] = `"123,456,789.00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0.012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Arbitrum unit (ETH) 1`] = `"0.012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -674,6 +682,10 @@ exports[`formatCurrencyUnit with custom options with locale es-ES should correct

exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Algorand unit (ALGO) 1`] = `"12.345.678.900,000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Aptos (Testnet) unit (APT) 1`] = `"123.456.789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Aptos unit (APT) 1`] = `"123.456.789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0,012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Arbitrum unit (ETH) 1`] = `"0,012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -1008,6 +1020,10 @@ exports[`formatCurrencyUnit with custom options with locale fr-FR should correct

exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Algorand unit (ALGO) 1`] = `"12β€―345β€―678β€―900,000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Aptos (Testnet) unit (APT) 1`] = `"123β€―456β€―789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Aptos unit (APT) 1`] = `"123β€―456β€―789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0,012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Arbitrum unit (ETH) 1`] = `"0,012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -1342,6 +1358,10 @@ exports[`formatCurrencyUnit with custom options with locale ja-JP should correct

exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Algorand unit (ALGO) 1`] = `"12,345,678,900.000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Aptos (Testnet) unit (APT) 1`] = `"123,456,789.00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Aptos unit (APT) 1`] = `"123,456,789.00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0.012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Arbitrum unit (ETH) 1`] = `"0.012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -1676,6 +1696,10 @@ exports[`formatCurrencyUnit with custom options with locale ko-KR should correct

exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Algorand unit (ALGO) 1`] = `"12,345,678,900.000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Aptos (Testnet) unit (APT) 1`] = `"123,456,789.00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Aptos unit (APT) 1`] = `"123,456,789.00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0.012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Arbitrum unit (ETH) 1`] = `"0.012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -2010,6 +2034,10 @@ exports[`formatCurrencyUnit with custom options with locale pt-BR should correct

exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Algorand unit (ALGO) 1`] = `"12.345.678.900,000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Aptos (Testnet) unit (APT) 1`] = `"123.456.789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Aptos unit (APT) 1`] = `"123.456.789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0,012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Arbitrum unit (ETH) 1`] = `"0,012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -2344,6 +2372,10 @@ exports[`formatCurrencyUnit with custom options with locale ru-RU should correct

exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Algorand unit (ALGO) 1`] = `"12Β 345Β 678Β 900,000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Aptos (Testnet) unit (APT) 1`] = `"123Β 456Β 789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Aptos unit (APT) 1`] = `"123Β 456Β 789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0,012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Arbitrum unit (ETH) 1`] = `"0,012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -2678,6 +2710,10 @@ exports[`formatCurrencyUnit with custom options with locale tr-TR should correct

exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Algorand unit (ALGO) 1`] = `"12.345.678.900,000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Aptos (Testnet) unit (APT) 1`] = `"123.456.789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Aptos unit (APT) 1`] = `"123.456.789,00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0,012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Arbitrum unit (ETH) 1`] = `"0,012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -3012,6 +3048,10 @@ exports[`formatCurrencyUnit with custom options with locale zh-CN should correct

exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Algorand unit (ALGO) 1`] = `"12,345,678,900.000000-Β -ALGO"`;

exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Aptos (Testnet) unit (APT) 1`] = `"123,456,789.00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Aptos unit (APT) 1`] = `"123,456,789.00000000-Β -APT"`;

exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0.012345678900000000- -𝚝ETH"`;

exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Arbitrum unit (ETH) 1`] = `"0.012345678900000000-Β -ETH"`;
Expand Down Expand Up @@ -3346,6 +3386,10 @@ exports[`formatCurrencyUnit with default options should correctly format Akroma

exports[`formatCurrencyUnit with default options should correctly format Algorand unit (ALGO) 1`] = `"12,345,678,900"`;

exports[`formatCurrencyUnit with default options should correctly format Aptos (Testnet) unit (APT) 1`] = `"123,456,789"`;

exports[`formatCurrencyUnit with default options should correctly format Aptos unit (APT) 1`] = `"123,456,789"`;

exports[`formatCurrencyUnit with default options should correctly format Arbitrum Sepolia unit (ether) 1`] = `"0.0123456"`;

exports[`formatCurrencyUnit with default options should correctly format Arbitrum unit (ETH) 1`] = `"0.0123456"`;
Expand Down
3 changes: 3 additions & 0 deletions libs/coin-framework/src/derivation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ const modes: Readonly<Record<DerivationMode, ModeSpec>> = Object.freeze({
startsAt: 1,
tag: "third-party",
},
aptos: {
overridesDerivation: "44'/637'/<account>'/0'/0'",
},
ton: {
overridesDerivation: "44'/607'/0'/0'/<account>'/0'",
},
Expand Down
20 changes: 20 additions & 0 deletions libs/env/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,26 @@ const envDefinitions = {
parser: stringParser,
desc: "Rosetta API for ICP",
},
APTOS_API_ENDPOINT: {
def: "https://apt.coin.ledger.com/node/v1",
parser: stringParser,
desc: "API enpoint for Aptos",
},
APTOS_TESTNET_API_ENDPOINT: {
def: "https://apt.coin.ledger-stg.com/node/v1",
parser: stringParser,
desc: "API enpoint for Aptos",
},
APTOS_INDEXER_ENDPOINT: {
def: "https://apt.coin.ledger.com/node/v1/graphql",
parser: stringParser,
desc: "Indexer endpoint for Aptos",
},
APTOS_TESTNET_INDEXER_ENDPOINT: {
def: "https://apt.coin.ledger-stg.com/node/v1/graphql",
parser: stringParser,
desc: "Indexer endpoint for Aptos",
},
API_CASPER_INDEXER_ENDPOINT: {
parser: stringParser,
def: "https://casper.coin.ledger.com/indexer",
Expand Down
Loading
Loading