Skip to content

Commit

Permalink
add xrp default accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
moe-dev committed Dec 20, 2024
1 parent d9a0465 commit aa36768
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/sdk-browser/src/turnkey-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ interface WalletAccount {
| "ADDRESS_FORMAT_DOGE_TESTNET"
| "ADDRESS_FORMAT_SUI"
| "ADDRESS_FORMAT_APTOS"
| "ADDRESS_FORMAT_XRP"
| "ADDRESS_FORMAT_TON_V3R2"
| "ADDRESS_FORMAT_TON_V4R2";
}
Expand Down Expand Up @@ -451,6 +452,16 @@ export const defaultSeiAccountAtIndex = (pathIndex: number): WalletAccount => {
};
};

// Xrp
export const defaultXrpAccountAtIndex = (pathIndex: number): WalletAccount => {
return {
curve: "CURVE_SECP256K1",
pathFormat: "PATH_FORMAT_BIP32",
path: `m/44'/144'/${pathIndex}'/0'/0'`,
addressFormat: "ADDRESS_FORMAT_XRP",
};
};

export const DEFAULT_SEI_ACCOUNTS: WalletAccount[] = [
defaultSeiAccountAtIndex(0),
];
Expand Down
11 changes: 11 additions & 0 deletions packages/sdk-server/src/turnkey-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ interface WalletAccount {
| "ADDRESS_FORMAT_DOGE_TESTNET"
| "ADDRESS_FORMAT_SUI"
| "ADDRESS_FORMAT_APTOS"
| "ADDRESS_FORMAT_XRP"
| "ADDRESS_FORMAT_TON_V3R2"
| "ADDRESS_FORMAT_TON_V4R2";
}
Expand Down Expand Up @@ -451,6 +452,16 @@ export const defaultSeiAccountAtIndex = (pathIndex: number): WalletAccount => {
};
};

// Xrp
export const defaultXrpAccountAtIndex = (pathIndex: number): WalletAccount => {
return {
curve: "CURVE_SECP256K1",
pathFormat: "PATH_FORMAT_BIP32",
path: `m/44'/144'/${pathIndex}'/0'/0'`,
addressFormat: "ADDRESS_FORMAT_XRP",
};
};

export const DEFAULT_SEI_ACCOUNTS: WalletAccount[] = [
defaultSeiAccountAtIndex(0),
];
Expand Down

0 comments on commit aa36768

Please sign in to comment.