Skip to content

Commit

Permalink
Add initial support for Ripple, RippleHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
sosaucily committed Sep 25, 2024
1 parent 2807a76 commit 0a35add
Show file tree
Hide file tree
Showing 7 changed files with 593 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"prompts": "^2.4.2",
"ramda": "^0.30.1",
"scure": "^1.6.0",
"tiny-secp256k1": "^2.2.3"
"tiny-secp256k1": "^2.2.3",
"xrpl": "^4.0.0"
}
}
4 changes: 3 additions & 1 deletion src/functions/bitcoin/bitcoin-request-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export async function fetchBitcoinTransaction(
const response = await fetch(bitcoinBlockchainAPITransactionEndpoint);

if (!response.ok)
throw new Error(`Bitcoin Network Transaction Response was not OK: ${response.statusText}`);
throw new Error(
`Bitcoin Network Transaction Response was not OK: ${response.statusText} - btc tx id: ${txID}`
);

return await response.json();
} catch (error) {
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { LedgerDLCHandler } from './dlc-handlers/ledger-dlc-handler.js';
import { PrivateKeyDLCHandler } from './dlc-handlers/private-key-dlc-handler.js';
import { SoftwareWalletDLCHandler } from './dlc-handlers/software-wallet-dlc-handler.js';
import { EthereumHandler } from './network-handlers/ethereum-handler.js';
import { RippleHandler } from './network-handlers/ripple-handler.js';
import { ProofOfReserveHandler } from './proof-of-reserve-handlers/proof-of-reserve-handler.js';

export {
Expand All @@ -10,4 +11,5 @@ export {
SoftwareWalletDLCHandler,
EthereumHandler,
ProofOfReserveHandler,
RippleHandler,
};
4 changes: 3 additions & 1 deletion src/models/attestor.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ export type AttestorChainID =
| 'evm-arbsepolia'
| 'evm-localhost'
| 'evm-hardhat-arb'
| 'evm-hardhat-eth';
| 'evm-hardhat-eth'
| 'ripple-xrpl-mainnet'
| 'ripple-xrpl-testnet';

export interface FundingTXAttestorInfo {
vaultUUID: string;
Expand Down
7 changes: 7 additions & 0 deletions src/models/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ export class LedgerError extends Error {
this.name = 'LedgerError';
}
}

export class RippleError extends Error {
constructor(message: string) {
super(message);
this.name = 'RippleError';
}
}
Loading

0 comments on commit 0a35add

Please sign in to comment.